diff --git a/.gitattributes b/.gitattributes index cff40a7433963b7184bec90fabf7a84ef2b27af9..f5abc5983a2573c320984fb38778d197f4eb5b1d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -219,3 +219,9 @@ Lora/ryosios_GodMode.preview.png filter=lfs diff=lfs merge=lfs -text Lora/takedaXL_il_lokr_V6311P.preview.png filter=lfs diff=lfs merge=lfs -text Lora/Absolute_Cinema_meme__Concept_LoRA/Absolute_Cinema_meme__Concept_LoRA_0.jpeg filter=lfs diff=lfs merge=lfs -text Lora/Absolute_Cinema_meme__Concept_LoRA/Absolute_Cinema_meme__Concept_LoRA.preview.mp4 filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/4a3cc296-fb97-4926-a7ac-7cd33728ef08.jpeg filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/cover.jpeg filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/da14fac8-b0ad-4462-9e14-40808b725605.jpeg filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/f3242d40-1c87-44b3-b422-a0a6f39c1911.jpeg filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/user[[:space:]]avatar[[:space:]]decoration.jpeg filter=lfs diff=lfs merge=lfs -text +Lora/Age[[:space:]]Of[[:space:]]Chimeras[[:space:]]\[[[:space:]]PONY[[:space:]]_[[:space:]]NOOB[[:space:]]_[[:space:]]ANIMAGINE[[:space:]]_[[:space:]]WAI[[:space:]]\][[:space:]]-[[:space:]]v2.0[[:space:]]_[[:space:]]Illustrious[[:space:]]Checkpoint[[:space:]]_[[:space:]]Civitai_files/user[[:space:]]avatar[[:space:]]decoration(1).jpeg filter=lfs diff=lfs merge=lfs -text diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00083-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00083-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..102b0b6b1314aad4336f07c3eccbde588fbb63db Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00083-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00094-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00094-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..63f55e325f2f28c6e0be522674054e4bfdae1389 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00094-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00095-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00095-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d22cfdff6bdad924c9a7616856fe01e005d319fc Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00095-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00096-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00096-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..530dab6f4c1947cea961de559e91cefd15047df2 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00096-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00097-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00097-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0db8add96b57a664a5be8148ab74fd1f6b221904 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00097-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00098-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00098-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f0e806a2eca3ce2888728472b488e2ac99895406 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00098-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00099-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00099-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f8ddd6e99b52a4dbff7a13ff4c190147e1e879ad Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00099-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00100-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00100-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b001b2020399ff4f74fa6251a9ee69c073e8cbef Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00100-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00103-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00103-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5a21387670f0964d5edb7fa2bb3ef95fb030127a Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00103-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00104-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00104-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3f997980cee8c22de792407ea6e7b934f2f27ab0 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00104-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00105-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00105-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b2f7c4947da243689052194bb2ee91c53a791641 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00105-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00107-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00107-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7cde3c768dc0da13c638b74da2e60c59aa92a6a8 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00107-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00108-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00108-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..525789d48602ac7f40fce76ada9434d9a2ba53ba Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00108-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00109-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00109-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..44d9c946e0af7f470a3c5e09562f45a929b738e9 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00109-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00110-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00110-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e565f7934ad398f2438c936e3b58a73e98e89357 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00110-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00111-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00111-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5b3e4a9b609e2a78d1df74590686fedd870005c5 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00111-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00112-1.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00112-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..97be50f151df1d164da146770fa851ff05bb31f7 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00112-1.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00114-2.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00114-2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3861aa485ad8be70db0bffcb011c004877e808d1 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00114-2.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00115-2.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00115-2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3009bd63665bfd31443743173f984233202e3475 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00115-2.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00119-2931411395.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00119-2931411395.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0fd543aea1db5359799049955d21c424186ebd1f Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/00119-2931411395.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/02010-3316570972-cover,geometric background,Dojinshi,Graphic Design,illustration cover,Sense of form,planar composition,cover page,l.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/02010-3316570972-cover,geometric background,Dojinshi,Graphic Design,illustration cover,Sense of form,planar composition,cover page,l.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3260226cf806e8844b1885eb45492fa9b007e918 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/02010-3316570972-cover,geometric background,Dojinshi,Graphic Design,illustration cover,Sense of form,planar composition,cover page,l.jpeg differ diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1258-c8911e199f9130a9.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1258-c8911e199f9130a9.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..d78585bfb3a26b946f16bae8465990fba26d2e84 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1258-c8911e199f9130a9.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1258],{45380:function(e,t,n){n.d(t,{m:function(){return c}});var i=n(85893),r=n(97564),l=n(54777),s=n(71232),o=n(9094),a=n(95117),u=n(88269),d=n(90101);function c(){let e=(0,d.T)();return(0,i.jsxs)(r.K,{mt:"xl",children:[(0,i.jsx)(l.i,{size:"sm",label:(0,i.jsxs)(s.Z,{spacing:4,children:[(0,i.jsx)(u.Z,{size:16,stroke:1.5}),"You are all caught up"]}),labelPosition:"center",labelProps:{size:"sm"}}),(0,i.jsx)(o.M,{children:(0,i.jsxs)(r.K,{spacing:0,align:"center",children:[(0,i.jsx)(a.x,{size:"sm",color:"dimmed",children:"Consider changing your period or filters to find more"}),(0,i.jsx)(a.x,{variant:"link",size:"sm",onClick:()=>{var t;null==e||null===(t=e.current)||void 0===t||t.scrollTo({top:0,behavior:"smooth"})},sx:{cursor:"pointer"},children:"Back to the top"})]})})]})}},52718:function(e,t,n){n.d(t,{x:function(){return h}});var i=n(85893),r=n(11163),l=n(67294),s=n(1604),o=n(58456),a=n(89521),u=n(26491),d=n(25291);let c=s.z.object({tags:(0,d.RV)().optional()});function h(e){let{children:t}=e,n=(0,r.useRouter)(),{moderatedTags:s}=(0,a.u)(),d=(0,o.bT)();return(0,l.useMemo)(()=>{let{tags:e=[]}=c.parse(n.query),t=s.filter(t=>!!t.nsfwLevel&&t.nsfwLevel>d&&(null==e?void 0:e.includes(t.id))).map(e=>e.id);return!!e.length&&e.every(e=>t.includes(e))},[d,n,s])?(0,i.jsx)(u.d,{p:"xl"}):t}},26491:function(e,t,n){n.d(t,{d:function(){return a}});var i=n(85893),r=n(97564),l=n(5044),s=n(95117),o=n(41071);function a(e){let{message:t,iconSize:n=128,children:a,...u}=e;return(0,i.jsxs)(r.K,{...u,align:"center",children:[(0,i.jsx)(l.k,{size:n,radius:100,children:(0,i.jsx)(o.Z,{size:n/1.6})}),(0,i.jsx)(s.x,{size:32,align:"center",children:"No results found"}),(0,i.jsx)(s.x,{align:"center",children:null!=t?t:"Try adjusting your search or filters to find what you're looking for"}),a]})}},7154:function(e,t,n){n.d(t,{R:function(){return a}});var i=n(85893),r=n(35818),l=n(34531),s=n(57212),o=n(60800);function a(){let{query:e,replace:t}=(0,l.oQ)(),{data:n}=(0,o.h)({entityType:r.iB.Post});return(0,i.jsx)(s.u,{data:n,value:e.tags,onChange:e=>t({tags:e})})}},19222:function(e,t,n){n.d(t,{Z:function(){return K}});var i=n(85893),r=n(9094),l=n(20966),s=n(49737),o=n(97564),a=n(5044),u=n(95117),d=n(39759),c=n(35818),h=n(41071),f=n(77446),m=n(67294),g=n(45380),x=n(52718),v=n(55964),p=n(56053),j=n(64577),y=n(56817),k=n(10194),b=n(74818),z=n(28075),C=n(79323),w=n(85120),N=n(39164),T=n(49987),I=n(65521),S=n(20897),M=n(79543),P=n(80354),B=n(17578),L=n(31483);function Z(e){let{data:{images:t,id:n,stats:r,imageCount:l,cosmetic:s,user:o},height:a}=e,u=(0,B.xJ)(),d=t[0],{ref:h,inView:f}=(0,L.Y)({key:s?1:0}),{classes:m}=E(),{classes:g}=(0,k.v)({aspectRatio:1}),x=(null==u?void 0:u.id)===o.id;return(0,i.jsx)(S.b,{withBorder:!0,shadow:"sm",height:a,ref:h,frameDecoration:s,children:f&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(T.kL,{image:d,connectType:"post",connectId:n,children:e=>{var t,o,a,u;return(0,i.jsxs)(i.Fragment,{children:[d.onSite&&(0,i.jsx)(N.K,{isRemix:!!d.remixOfId}),(0,i.jsx)(T.kL.BlurToggle,{className:"absolute left-2 top-2 z-10"}),e&&(0,i.jsx)(w.t,{image:d,context:"post",className:"absolute right-2 top-2 z-10",additionalMenuItems:x?(0,i.jsx)(b.f,{entityType:c.iA.Post,entityId:n,image:d,currentCosmetic:s}):null}),(0,i.jsx)(M.p,{href:"/posts/".concat(n),children:e?(0,i.jsx)(z.P,{metadata:d.metadata,src:d.url,className:g.image,name:null!==(a=d.name)&&void 0!==a?a:d.id.toString(),alt:null!==(u=d.name)&&void 0!==u?u:void 0,skip:(0,C.Bn)(d),type:d.type,width:450,placeholder:"empty"}):(0,i.jsx)(j.o,{ratio:(null!==(t=null==d?void 0:d.width)&&void 0!==t?t:1)/(null!==(o=null==d?void 0:d.height)&&void 0!==o?o:1),children:(0,i.jsx)(I.R,{...d})})}),(0,i.jsx)(P.z,{className:m.reactions,imageCount:l,metrics:{likeCount:null==r?void 0:r.likeCount,dislikeCount:null==r?void 0:r.dislikeCount,heartCount:null==r?void 0:r.heartCount,laughCount:null==r?void 0:r.laughCount,cryCount:null==r?void 0:r.cryCount}})]})}})})})}let E=(0,y.k)(e=>({title:{lineHeight:1.1,fontSize:14,color:"white",fontWeight:500},reactions:{position:"absolute",bottom:6,left:6,borderRadius:e.radius.sm,background:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[6],.6):e.colors.gray[0],color:"dark"===e.colorScheme?e.colors.gray[0]:e.colors.dark[4],boxShadow:"0 -2px 6px 1px rgba(0,0,0,0.16)",padding:4}}));var R=n(34531),A=n(14619);function K(e){return(0,i.jsx)(x.x,{children:(0,i.jsx)(D,{...e})})}function D(e){let{filters:t={},showEof:n=!1,showAds:x,disableStoreFilters:j}=e,y=(0,R.Nx)(),k=j?t:(0,A.HO)({...y,...t});n=n&&k.period!==c.Tz.AllTime;let[b,z]=(0,d.c)(k,500),{posts:C,isLoading:w,fetchNextPage:N,hasNextPage:T,isRefetching:I}=(0,R.D1)(b,{keepPreviousData:!0});return(0,m.useEffect)(()=>{(0,f.Z)(k,b)&&z()},[z,b,k]),(0,i.jsx)(i.Fragment,{children:w?(0,i.jsx)(r.M,{p:"xl",children:(0,i.jsx)(l.a,{})}):C.length?(0,i.jsxs)("div",{style:{position:"relative"},children:[(0,i.jsx)(s.f,{visible:null!=I&&I,zIndex:9}),(0,i.jsx)(p.w,{data:C,imageDimensions:e=>{var t,n;let i=e.images[0];return{width:null!==(t=i.width)&&void 0!==t?t:450,height:null!==(n=i.height)&&void 0!==n?n:450}},maxItemHeight:600,render:Z,itemId:e=>e.id,withAds:x}),T&&(0,i.jsx)(v.T,{loadFn:N,loadCondition:!I,style:{gridColumn:"1/-1"},children:(0,i.jsx)(r.M,{p:"xl",sx:{height:36},mt:"md",children:(0,i.jsx)(l.a,{})})}),!T&&n&&(0,i.jsx)(g.m,{})]}):(0,i.jsxs)(o.K,{align:"center",py:"lg",children:[(0,i.jsx)(a.k,{size:128,radius:100,children:(0,i.jsx)(h.Z,{size:80})}),(0,i.jsx)(u.x,{size:32,align:"center",children:"No results found"}),(0,i.jsx)(u.x,{align:"center",children:"Try adjusting your search or filters to find what you're looking for"})]})})}},34531:function(e,t,n){n.d(t,{D1:function(){return j},Nx:function(){return v},ib:function(){return k},oQ:function(){return x},uY:function(){return y}});var i=n(35818),r=n(67294),l=n(1604),s=n(58456),o=n(36061),a=n(80937),u=n(38394),d=n(32957),c=n(2807),h=n(14619),f=n(27943),m=n(72456),g=n(25291);let x=()=>(0,a.s)(p),v=()=>{let e=(0,u.PH)(e=>e.posts),{query:t}=x(),n=(0,s.bT)();return(0,h.HO)({browsingLevel:n,...e,...t})},p=l.z.object({tags:(0,g.RV)(),modelId:(0,g.Cz)(),modelVersionId:(0,g.Cz)(),username:l.z.string().transform(f.Bm).nullish(),view:l.z.enum(["categories","feed"]),period:l.z.nativeEnum(i.Tz),sort:l.z.nativeEnum(d.H_),collectionId:(0,g.Cz)(),section:l.z.enum(["published","draft"]),followed:(0,g.rK)().optional()}).partial(),j=(e,t)=>{null!=e||(e={});let n=(0,s.bT)(),{data:i,isLoading:l,...a}=m.SX.post.getInfinite.useInfiniteQuery({...e,include:["cosmetics"],browsingLevel:n},{getNextPageParam:e=>e?e.nextCursor:0,getPreviousPageParam:e=>e?e.nextCursor:0,trpc:{context:{skipBatch:!0}},...t}),u=(0,r.useMemo)(()=>null==i?void 0:i.pages.flatMap(e=>e?e.items:[]),[i]),{items:d,loadingPreferences:c}=(0,o.f)({type:"posts",data:u,isRefetching:a.isRefetching});return{data:i,posts:d,isLoading:l||c,...a}},y=(e,t)=>{var n,i,r;let{data:l,...s}=m.SX.post.getContestCollectionDetails.useQuery({...e},{...t});return{collectionItems:null!==(n=null==l?void 0:l.items)&&void 0!==n?n:[],collection:null!==(i=null==l?void 0:l.collection)&&void 0!==i?i:null,permissions:null!==(r=null==l?void 0:l.permissions)&&void 0!==r?r:{manage:!1},...s}},k=()=>{let e=m.SX.post.updateCollectionTagId.useMutation({onError(e){t(e,"Failed to create a withdrawal request")}}),t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"There was an error while performing your request";try{let n=JSON.parse(e.message);(0,c.s9)({title:t,error:n})}catch(n){(0,c.s9)({title:t,error:Error(e.message)})}};return{updateCollectionTagId:async t=>{await e.mutateAsync(t)},updatingCollectionTagId:e.isLoading}}},57212:function(e,t,n){n.d(t,{u:function(){return o}});var i=n(85893),r=n(64761),l=n(67841),s=n(55076);function o(e){let{data:t,value:n=[],onChange:o}=e,a=(0,r.rZ)(),u=(e,t)=>{let i=[...n],r=i.findIndex(t=>t===e);t?(-1===r?i.push(e):i.splice(r,1),null==o||o(i)):-1===r||i.length>1?null==o||o([e]):null==o||o([])};return(null==t?void 0:t.length)?(0,i.jsx)(s.S,{className:"flex gap-1",children:t.map(e=>{let t=n.includes(e.id);return(0,i.jsx)(l.z,{variant:t?"filled":"dark"===a.colorScheme?"filled":"light",color:t?"blue":"gray",onClick:t=>{let n=t.ctrlKey;u(e.id,n)},className:"uppercase",compact:!0,children:e.name},e.id)})}):null}},60800:function(e,t,n){n.d(t,{h:function(){return o}});var i=n(35818),r=n(36061),l=n(32957),s=n(72456);function o(e){let t,{entityType:n}=e;n===i.iB.Model?t=l.t0.MostModels:n===i.iB.Image?t=l.t0.MostImages:n===i.iB.Post?t=l.t0.MostPosts:n===i.iB.Article&&(t=l.t0.MostArticles);let{data:o,isLoading:a}=s.SX.tag.getAll.useQuery({entityType:[n],sort:t,unlisted:!1,categories:!0,limit:100,include:["nsfwLevel"]}),u=o?o.items:void 0,{items:d,loadingPreferences:c}=(0,r.f)({type:"tags",data:u});return{data:d,isLoading:a||c}}},55076:function(e,t,n){n.d(t,{S:function(){return d}});var i=n(85893),r=n(49834),l=n(11621),s=n(77488),o=n(90512),a=n(67294),u=n(10558);function d(e){let{children:t,className:n,...d}=e,[c,h]=(0,a.useState)(null),f=c&&c.scrollWidth>c.offsetWidth,[m,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!c)return;function e(){c&&(0===c.scrollLeft?g("start"):c.scrollLeft>=c.scrollWidth-c.offsetWidth-1?g("end"):g(null))}e();let t=new MutationObserver(e);return t.observe(c,{subtree:!0,childList:!0}),null==c||c.addEventListener("scroll",e,{passive:!0}),()=>{t.disconnect(),null==c||c.removeEventListener("scroll",e)}},[c]);let x=(0,u.s)();return(0,i.jsxs)("div",{className:(0,o.Z)("relative overflow-hidden"),...d,children:[f&&"start"!==m&&(0,i.jsx)("div",{className:(0,o.Z)("absolute inset-y-0 left-0 z-10 flex items-center bg-gradient-to-r from-white/50 transition hover:bg-white dark:from-dark-7 hover:dark:bg-dark-7",{hidden:x}),children:(0,i.jsx)(r.A,{variant:"transparent",radius:0,onClick:()=>null==c?void 0:c.scrollBy({left:-200,behavior:"smooth"}),className:"h-full",children:(0,i.jsx)(l.Z,{stroke:2.5,size:28})})}),(0,i.jsx)("div",{ref:h,className:(0,o.Z)("overflow-x-auto scrollbar-none",n),children:t}),f&&"end"!==m&&(0,i.jsx)("div",{className:(0,o.Z)("absolute inset-y-0 right-0 z-10 flex items-center bg-gradient-to-l from-white/50 transition hover:bg-white dark:from-dark-7 hover:dark:bg-dark-7",{hidden:x}),children:(0,i.jsx)(r.A,{variant:"transparent",radius:0,onClick:()=>null==c?void 0:c.scrollBy({left:200,behavior:"smooth"}),className:"h-full",children:(0,i.jsx)(s.Z,{stroke:2.5,size:28})})})]})}}}]); +//# sourceMappingURL=1258-c8911e199f9130a9.js.map \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1740-f09afd11440f296d.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1740-f09afd11440f296d.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..5f185d655051c46d408705754f7503d9fa8ab1f4 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1740-f09afd11440f296d.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1740],{22338:function(e,t,n){n.d(t,{n:function(){return w}});var i=n(85893),o=n(95117),s=n(88002),r=n(49834),l=n(25963),d=n(94454),a=n(94351),c=n(60254),m=n(49659),u=n(78308),x=n(71033),h=n(97118),g=n(38047),j=n(7893),v=n(20573),p=n(40572),f=n(76326),y=n(70096),C=n(17578),k=n(9957),I=n(2807),z=n(72456);function w(e){var t,n;let{comment:w,size:b="xs",hideLockOption:S=!1,...Z}=e,M=z.SX.useContext(),D=(0,v.D)(),B=(0,C.xJ)(),E=null!==(t=null==B?void 0:B.isModerator)&&void 0!==t&&t,P=w.user.id===(null==B?void 0:B.id),T=null!==(n=null==B?void 0:B.muted)&&void 0!==n&&n,{data:R}=z.SX.model.getById.useQuery({id:w.modelId}),X=R&&B&&R.user.id===B.id,N=z.SX.comment.delete.useMutation({async onSuccess(){await M.comment.getAll.invalidate(),(0,l.pT)(),D.onClose()},onError(e){(0,I.s9)({error:Error(e.message),title:"Could not delete comment"})}}),A=z.SX.comment.toggleLock.useMutation({async onMutate(e){let{id:t}=e;await M.comment.getById.cancel();let n=M.comment.getById.getData({id:t});return n&&M.comment.getById.setData({id:t},()=>({...n,locked:!n.locked})),{prevComment:n}},async onSuccess(){await M.comment.getCommentsById.invalidate({id:w.id})},onError(e,t,n){(0,I.s9)({error:Error("Could not lock the thread, please try again")}),M.comment.getById.setData({id:t.id},null==n?void 0:n.prevComment)}}),O=z.SX.comment.setTosViolation.useMutation({async onSuccess(){await M.comment.getById.invalidate({id:w.id}),(0,l.Mr)("confirm-tos-violation"),D.onClose()},onError(e){(0,I.s9)({error:Error(e.message),title:"Could not report review, please try again"})}}),_=z.SX.comment.toggleHide.useMutation({async onMutate(e){let{id:t}=e;await M.comment.getById.cancel();let n=M.comment.getById.getData({id:t});return n&&M.comment.getById.setData({id:t},()=>({...n,hidden:!n.hidden})),{prevComment:n}},async onSuccess(){await M.comment.getAll.invalidate(),await M.comment.getCommentCountByModel.invalidate({modelId:w.modelId,hidden:!0})},onError(e){(0,I.s9)({title:"Could not hide comment",error:Error(e.message)})}});return(0,i.jsxs)(s.v,{position:"bottom-end",withinPortal:!0,...Z,children:[(0,i.jsx)(s.v.Target,{children:(0,i.jsx)(r.A,{size:b,variant:"subtle",children:(0,i.jsx)(d.Z,{size:14})})}),(0,i.jsxs)(s.v.Dropdown,{children:[(P||E)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.v.Item,{icon:(0,i.jsx)(a.Z,{size:14,stroke:1.5}),color:"red",onClick:()=>{(0,l._5)({title:"Delete Comment",children:(0,i.jsx)(o.x,{size:"sm",children:"Are you sure you want to delete this comment? This action is destructive and cannot be reverted."}),centered:!0,labels:{confirm:"Delete Comment",cancel:"No, don't delete it"},confirmProps:{color:"red",loading:N.isLoading},closeOnConfirm:!1,onConfirm:()=>{N.mutate({id:w.id})}})},children:"Delete comment"}),(!w.locked&&!T||E)&&(0,i.jsx)(s.v.Item,{icon:(0,i.jsx)(c.Z,{size:14,stroke:1.5}),onClick:()=>(0,p.NI)({name:"commentEdit",state:{commentId:w.id}}),children:"Edit comment"})]}),E&&!S&&(0,i.jsx)(s.v.Item,{icon:w.locked?(0,i.jsx)(m.Z,{size:14,stroke:1.5}):(0,i.jsx)(u.Z,{size:14,stroke:1.5}),onClick:()=>{A.mutate({id:w.id})},children:w.locked?"Unlock comment":"Lock comment"}),(X||E)&&(0,i.jsx)(s.v.Item,{icon:w.hidden?(0,i.jsx)(x.Z,{size:14,stroke:1.5}):(0,i.jsx)(h.Z,{size:14,stroke:1.5}),onClick:()=>{_.mutate({id:w.id})},children:w.hidden?"Unhide comment":"Hide comment"}),E&&(0,i.jsx)(s.v.Item,{icon:(0,i.jsx)(g.Z,{size:14,stroke:1.5}),onClick:()=>{(0,l._5)({modalId:"confirm-tos-violation",title:"Report ToS Violation",children:"Are you sure you want to report this comment as a Terms of Service violation?",centered:!0,labels:{confirm:"Yes",cancel:"Cancel"},confirmProps:{color:"red",disabled:O.isLoading},closeOnConfirm:!1,onConfirm:()=>O.mutate({id:w.id})})},children:"Remove as TOS Violation"}),(!B||!P)&&(0,i.jsx)(y.b,{reason:"report-model",children:(0,i.jsx)(s.v.Item,{icon:(0,i.jsx)(j.Z,{size:14,stroke:1.5}),onClick:()=>(0,f.$B)({entityType:k.Bj.Comment,entityId:w.id}),children:"Report"})})]})]})}},71740:function(e,t,n){n.d(t,{K:function(){return G}});var i=n(85893),o=n(49737),s=n(97564),r=n(95117),l=n(71232),d=n(82623),a=n(14613),c=n(67294),m=n(40572),u=n(64761),x=n(9094),h=n(20966),g=n(67841),j=n(23778),v=n(86685),p=n(5364),f=n(16575),y=n(32754),C=n(26575),k=n(67272),I=n(65440),z=n(55964);function w(e){var t,n;let{data:s=[],isLoading:r,hasNextPage:l,isRefetching:d,isFetchingNextPage:a,columnWidth:m,columnGutter:w,maxColumnCount:b,scrollToIndex:S,fetchNextPage:Z,filters:M,autoFetch:D=!0,...B}=e,E=(0,u.rZ)(),P=JSON.stringify(M),T=(0,k.D)(P),R=null!==(n=(0,k.D)(s))&&void 0!==n?n:[],X=d&&!a,N=(0,k.D)(d&&!a)&&!X||T!==P&&!X&&R.length!==s.length,A=(0,c.useRef)(null),[O,_]=(0,I.iP)(),L=null===(t=document)||void 0===t?void 0:t.documentElement.scrollHeight,{offset:H,width:J}=(0,j.q)(A,[O,_,L]),Q=(0,v.G)({width:J,maxColumnCount:b,columnWidth:m,columnGutter:null!=w?w:E.spacing.md},[N]),F=(0,p.y)(Q),{scrollTop:G,isScrolling:V}=(0,f.G)(H),W=(0,y.M)(Q,{offset:H,height:_,align:"center"});return(0,c.useEffect)(()=>{if(!s||!S)return;let e=S(s);e>-1&&W(e)},[]),(0,i.jsxs)("div",{style:{position:"relative"},children:[(0,i.jsx)(o.f,{visible:null!=d&&d,zIndex:9}),(0,C.$)({resizeObserver:F,positioner:Q,scrollTop:G,isScrolling:V,height:_,containerRef:A,items:s,overscanBy:10,...B}),l&&(D?(0,i.jsx)(z.T,{loadFn:Z,loadCondition:!d,style:{gridColumn:"1/-1"},children:(0,i.jsx)(x.M,{p:"xl",sx:{height:36},mt:"md",children:(0,i.jsx)(h.a,{})})}):(0,i.jsx)(x.M,{children:(0,i.jsx)(g.z,{onClick:Z,loading:a,color:"gray",variant:"dark"===E.colorScheme?"filled":"light",children:a?"Loading more...":"Load more"})}))]})}var b=n(21017),S=n(17789),Z=n(88393),M=n(5044),D=n(39825),B=n(78308),E=n(72623),P=n(82633),T=n(75471),R=n(22338),X=n(56836),N=n(68848),A=n(65297),O=n(17578),_=n(88182),L=n(72456);function H(e){let{data:t}=e,n=(0,O.xJ)(),{data:o=[]}=L.SX.comment.getReactions.useQuery({commentId:t.id},{initialData:t.reactions}),{data:s=0}=L.SX.comment.getCommentsCount.useQuery({id:t.id},{initialData:t._count.comments}),{data:d}=L.SX.model.getById.useQuery({id:t.modelId}),a=L.SX.useContext(),c=L.SX.comment.toggleReaction.useMutation({async onMutate(e){var t,i,o;let{id:s,reaction:r}=e;await a.comment.getReactions.cancel({commentId:s});let l=null!==(t=a.comment.getReactions.getData({commentId:s}))&&void 0!==t?t:[],d=l.length>0?l[l.length-1]:{id:0};if(n){let e={id:d.id+1,reaction:r,user:{id:n.id,deletedAt:null,username:null!==(i=n.username)&&void 0!==i?i:"",image:null!==(o=n.image)&&void 0!==o?o:"",profilePicture:null}},t=l.find(e=>e.reaction===r&&e.user.id===n.id);a.comment.getReactions.setData({commentId:s},function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t?n.filter(e=>e.id!==t.id):[...n,e]})}return{previousReactions:l}},onError(e,t,n){a.comment.getReactions.setData({commentId:t.id},null==n?void 0:n.previousReactions)}});return(0,i.jsxs)(b.Z,{radius:"md",p:"md",withBorder:!0,children:[(0,i.jsxs)(l.Z,{align:"flex-start",position:"apart",noWrap:!0,mb:"xs",children:[(0,i.jsx)(A.Y,{user:t.user,subText:(0,i.jsx)(T.i,{date:t.createdAt}),subTextForce:!0,avatarSize:"md",badge:t.user.id===(null==d?void 0:d.user.id)?(0,i.jsx)(S.C,{size:"xs",color:"violet",children:"OP"}):null,withUsername:!0,linkToProfile:!0}),(0,i.jsx)(R.n,{comment:t,hideLockOption:!0})]}),(0,i.jsx)(P.i,{maxHeight:100,children:(0,i.jsx)(N.u,{html:t.content,sx:e=>({fontSize:e.fontSizes.sm}),withMentions:!0})}),(0,i.jsxs)(l.Z,{mt:"sm",align:"flex-start",position:"apart",noWrap:!0,children:[(0,i.jsx)(X.$,{reactions:o,onSelect:e=>{c.mutate({id:t.id,reaction:e})},disabled:c.isLoading}),(0,i.jsxs)(l.Z,{spacing:4,noWrap:!0,children:[(null==n?void 0:n.isModerator)&&t.tosViolation&&(0,i.jsx)(Z.u,{label:"Has TOS Violation",children:(0,i.jsx)(M.k,{color:"orange",size:"xs",children:(0,i.jsx)(D.Z,{})})}),t.locked&&(0,i.jsx)(M.k,{color:"yellow",size:"xs",children:(0,i.jsx)(B.Z,{})}),(0,i.jsx)(g.z,{size:"xs",radius:"xl",variant:"subtle",onClick:()=>(0,m.NI)({name:"commentThread",state:{commentId:t.id}}),compact:!0,children:(0,i.jsxs)(l.Z,{spacing:2,noWrap:!0,children:[(0,i.jsx)(E.Z,{size:14}),(0,i.jsx)(r.x,{children:(0,_.dm)(s)})]})})]})]})]})}var J=n(32957),Q=n(63155),F=n(97012);function G(e){let{modelId:t,limit:n=8,onlyHidden:u}=e,x={modelId:t,limit:(0,F.y)("sm")?n/2:n,sort:J.nq.Newest,hidden:u},{data:h,isLoading:g,isFetchingNextPage:j,fetchNextPage:v,hasNextPage:p,isRefetching:f}=L.SX.comment.getAll.useInfiniteQuery(x,{getNextPageParam:e=>e.nextCursor,keepPreviousData:!1}),y=(0,c.useMemo)(()=>{var e;return null!==(e=null==h?void 0:h.pages.flatMap(e=>e.comments))&&void 0!==e?e:[]},[null==h?void 0:h.pages]),C=y.length>0,{data:k=0}=L.SX.comment.getCommentCountByModel.useQuery({modelId:t,hidden:!0},{enabled:!u});return(0,i.jsx)(Q.a,{gutter:"xl",children:(0,i.jsxs)(Q.a.Col,{span:12,sx:{position:"relative"},children:[(0,i.jsx)(o.f,{visible:g,zIndex:10}),C?(0,i.jsxs)(s.K,{spacing:8,children:[(0,i.jsx)(w,{data:y,render:H,isRefetching:f,isFetchingNextPage:j,hasNextPage:p,fetchNextPage:v,filters:x,columnWidth:300,autoFetch:!1}),k>0&&!u&&(0,i.jsx)(m.v4,{name:"hiddenModelComments",state:{modelId:t},style:{display:"flex",justifyContent:"center",alignSelf:"center"},children:(0,i.jsx)(r.x,{size:"xs",color:"dimmed",children:(0,i.jsxs)(l.Z,{spacing:4,position:"center",children:[(0,i.jsx)(a.Z,{size:16}),(0,i.jsx)(r.x,{inherit:!0,inline:!0,children:"See ".concat(k," more hidden ").concat(k>1?"comments":"comment")})]})})})]}):(0,i.jsx)(d.X,{p:"xl",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:200},children:(0,i.jsxs)(s.K,{children:[(0,i.jsx)(r.x,{size:"xl",children:"There are no comments for this model yet."}),(0,i.jsx)(r.x,{color:"dimmed",children:"Be the first to let the people know about this model by leaving your comment."})]})})]})})}},56836:function(e,t,n){n.d(t,{$:function(){return p}});var i=n(85893),o=n(71232),s=n(40633),r=n(67841),l=n(95117),d=n(88393),a=n(98729),c=n(14408),m=n(78680),u=n(33299),x=n(67294),h=n(38498),g=n(9242);let j=(0,x.createContext)({onEmojiClick:e=>e,reactions:[],disabled:!1}),v=()=>(0,x.useContext)(j);function p(e){let{reactions:t,disabled:n=!1,onSelect:d}=e,{data:h}=(0,u.useSession)(),g=null==h?void 0:h.user,v=(0,x.useMemo)(()=>(0,m.Z)(t,"reaction"),[t]);return(0,i.jsx)(j.Provider,{value:{onEmojiClick:d,user:g,reactions:t,disabled:n},children:(0,i.jsxs)(o.Z,{spacing:4,align:"center",children:[(0,i.jsxs)(s.J,{shadow:"md",position:"top-start",withArrow:!0,withinPortal:!0,children:[(0,i.jsx)(s.J.Target,{children:(0,i.jsx)(r.z,{variant:"subtle",size:"xs",color:"gray",radius:"xl",compact:!0,children:(0,i.jsxs)(o.Z,{spacing:2,children:[(0,i.jsx)(a.Z,{size:14,stroke:1.5}),(0,i.jsx)(c.Z,{size:14,stroke:1.5})]})})}),(0,i.jsx)(s.J.Dropdown,{p:4,children:h?(0,i.jsx)(y,{}):(0,i.jsx)(l.x,{color:"dimmed",size:"xs",px:"xs",children:"You must be logged in to react"})})]}),Object.entries(v).map((e,t)=>{let[n,o]=e;return(0,i.jsx)(f,{reaction:n,reactions:o},t)})]})})}function f(e){let{reaction:t,reactions:n}=e,{onEmojiClick:s,user:a,disabled:c}=v(),m=(0,g.aw)(n.map(e=>{var t;return e.user.username===(null==a?void 0:a.username)?"You":null!==(t=e.user.username)&&void 0!==t?t:""})),u=n.findIndex(e=>e.user.username===(null==a?void 0:a.username))>-1;return(0,i.jsx)(d.u,{label:m,withArrow:!0,withinPortal:!0,maw:300,multiline:!0,children:(0,i.jsx)(r.z,{size:"xs",radius:"xl",variant:"light",color:u?"blue":"gray",onClick:a&&!c?()=>s(t):void 0,compact:!0,children:(0,i.jsxs)(o.Z,{spacing:4,align:"center",children:[(0,i.jsx)(l.x,{inherit:!0,children:h._G.availableReactions[t]}),(0,i.jsx)(l.x,{inherit:!0,children:n.length})]})})})}function y(){let{onEmojiClick:e,disabled:t,user:n}=v(),s=n&&!t;return(0,i.jsx)(o.Z,{spacing:4,children:Object.entries(h._G.availableReactions).map((t,n)=>{let[o,l]=t;return(0,i.jsx)(d.u,{label:o,children:(0,i.jsx)(r.z,{size:"xs",radius:"sm",variant:"subtle",onClick:s?()=>e(o):void 0,children:l})},n)})})}}}]); +//# sourceMappingURL=1740-f09afd11440f296d.js.map \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1770-2c4a003ab544c5a8.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1770-2c4a003ab544c5a8.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..1b362d73054501e6da3ba6ac3e9030453580618b --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/1770-2c4a003ab544c5a8.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1770],{71135:function(e,t,r){"use strict";r.d(t,{N:function(){return d}});var s=r(85893),i=r(95117),n=r(71232),o=r(64523),l=r(82623),a=r(95078);r(67294);var c=r(18960);function d(e){let{items:t,title:r,labelWidth:d,withBorder:h=!0,paperProps:u,...p}=e,x=[];for(let e=0;e({backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],width:d,padding:"7px 7px !important"}),children:l}),(0,s.jsx)(o.x,{component:"td",className:r.className,sx:{padding:"7px 7px !important"},children:r.value})]},e))}return(0,s.jsxs)(l.X,{radius:"sm",...u,withBorder:h,children:[r&&"string"==typeof r?(0,s.jsx)(i.x,{size:"md",weight:"500",p:"xs",children:r}):r,(0,s.jsx)(a.i,{withColumnBorders:!0,...p,sx:e=>({borderTop:r?"1px ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]," solid"):void 0}),children:(0,s.jsx)(o.x,{component:"tbody",children:x})})]})}},55964:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var s=r(85893),i=r(67294),n=r(31483);function o(e){let{children:t,loadFn:r,loadCondition:o,loadTimeout:l=500,className:a,style:c,inViewOptions:d}=e,{ref:h,inView:u}=(0,n.Y)({rootMargin:"1200px 0px",...d}),[p,x]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{setTimeout(()=>{x(!0)},1500)},[]),(0,i.useEffect)(()=>{if(u&&o&&p&&g){let e=async()=>{await r(),setTimeout(()=>f(!0),l)};f(!1),e()}},[u,o,p,g]),(0,s.jsx)("div",{ref:h,className:a,style:c,children:t})}},18960:function(e,t,r){"use strict";r.d(t,{O:function(){return d}});var s=r(85893),i=r(6564),n=r(40633),o=r(49834),l=r(95117),a=r(74943),c=r(90512);let d=(0,r(67294).forwardRef)((e,t)=>{let{iconProps:r,buttonProps:d,size:h,variant:u,children:p,type:x="click",hideClick:g,customIcon:f,...v}=e,m="hover"===x?i.z:n.J,y=f||a.Z;return(0,s.jsxs)(m,{width:300,...v,shadow:"sm",children:[(0,s.jsx)(m.Target,{children:(0,s.jsx)(o.A,{ref:t,...d,size:h,variant:u,className:(0,c.Z)({"active:transform-none":!!g,"cursor-help":!!g}),children:(0,s.jsx)(l.x,{color:"dimmed",inline:!0,children:(0,s.jsx)(y,{...r})})})}),(0,s.jsx)(m.Dropdown,{children:p})]})});d.displayName="InfoPopover"},28663:function(e,t,r){"use strict";r.d(t,{r:function(){return a}});var s=r(85893);r(67294);var i=r(26339),n=r(58434),o=r.n(n),l=r(90512);function a(e){let{children:t,...r}=e,n=(0,i.a)(),{columnWidth:a,columnGap:c,maxColumnCount:d,columnCount:h,combinedWidth:u}=n,p={...n};return(0,s.jsx)(i.g,{px:"md",...r,className:(0,l.Z)("@container",r.className),maxColumnCount:h,children:(0,s.jsx)("div",{style:{width:h>1&&u?u:void 0},className:o().queries,children:"function"==typeof t?t(p):t})})}},26339:function(e,t,r){"use strict";r.d(t,{a:function(){return d},g:function(){return h}});var s=r(85893),i=r(64523),n=r(67294),o=r(72676),l=r(74865),a=r(85625);let c=(0,n.createContext)(null),d=()=>{let e=(0,n.useContext)(c);if(!e)throw Error("MasonryContext not in tree");return e};function h(e){let{children:t,columnWidth:r=320,maxColumnCount:d=7,gap:h=16,columnGap:u=h,rowGap:p=h,maxSingleColumnWidth:x=450,...g}=e,[f,v]=(0,n.useState)(0),m=(0,a.Di)(100),y=(0,l.y)(e=>{m(()=>v(e.contentRect.width))});(0,o.L)(()=>{let e=y.current;if(e){let t=getComputedStyle(e),r=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight);v(e.clientWidth-r)}},[]);let[j,k]=(0,n.useMemo)(()=>{if(0===f)return[0,0];let e=Math.min(Math.floor((f+16)/(r+16)),d)||1,t=e*r+(e-1)*16;return[e,t]},[f,r,d]);return(0,s.jsx)(c.Provider,{value:{columnWidth:r,columnGap:u,rowGap:p,maxColumnCount:d,maxSingleColumnWidth:x,columnCount:j,combinedWidth:k},children:(0,s.jsx)(i.x,{ref:y,...g,children:t})})}},10932:function(e,t,r){"use strict";r.d(t,{d:function(){return u}});var s=r(85893),i=r(71232),n=r(17789),o=r(50331),l=r(88393),a=r(49834),c=r(21997),d=r(77488),h=r(67294);let u=e=>{var t;let{hashes:r,initialType:u="AutoV2",color:p="gray",width:x=120}=e,[g,f]=(0,c._)({key:"preferredModelHashType",defaultValue:u}),[v,m]=(0,h.useState)(null!==(t=r.find(e=>e.type===g))&&void 0!==t?t:r[0]),{hash:y,type:j}=v,k=r.length>1;(0,h.useEffect)(()=>{var e;m(null!==(e=r.find(e=>e.type===g))&&void 0!==e?e:r[0])},[g,r]);let b=()=>{f(r[(r.indexOf(v)+1)%r.length].type)};return(0,s.jsxs)(i.Z,{spacing:0,noWrap:!0,sx:{userSelect:"none"},children:[(0,s.jsx)(n.C,{variant:"outline",color:p,px:6,sx:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:0,whiteSpace:"nowrap"},children:j}),(0,s.jsx)(o.q,{value:y,children:e=>{let{copied:t,copy:r}=e;return(0,s.jsx)(l.u,{label:"Copy",withArrow:!0,withinPortal:!0,children:(0,s.jsx)(n.C,{px:6,variant:"outline",color:t?"teal":p,sx:{cursor:"pointer",overflow:"hidden",width:x,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderTopRightRadius:k?0:void 0,borderBottomRightRadius:k?0:void 0},onClick:e=>{e.stopPropagation(),r()},children:t?"Copied":y})})}}),k&&(0,s.jsx)(a.A,{px:2,size:20,variant:"outline",color:p,sx:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:0,cursor:"pointer"},onClick:e=>{e.stopPropagation(),b()},children:(0,s.jsx)(d.Z,{})})]})}},46486:function(e,t,r){"use strict";r.d(t,{o:function(){return v},s:function(){return j}});var s=r(85893),i=r(71232),n=r(67084),o=r(88393),l=r(49834),a=r(40633),c=r(97564),d=r(95117),h=r(18060),u=r(63208),p=r(38615),x=r(94849),g=r(67294),f=r(27943);let v=e=>{let{baseModel:t,type:r,modelId:a,modelVersionId:c,withCopy:d=!0}=e,{copied:x,copy:v}=(0,h.V)(),y=(0,g.useMemo)(()=>(0,f.$C)({baseModel:t,type:r,modelId:a,id:c}),[t,r,a,c]);return y?(0,s.jsxs)(i.Z,{spacing:4,children:[(0,s.jsxs)(i.Z,{spacing:0,sx:{code:{borderRadius:0,lineHeight:1.2,paddingLeft:4,paddingRight:4,cursor:d?"pointer":void 0}},children:[(0,s.jsx)(n.E,{children:"civitai:"}),d?(0,s.jsx)(m,{copied:x,label:"Model ID",children:(0,s.jsx)(n.E,{color:"blue",onClick:()=>v(a),children:a})}):(0,s.jsx)(o.u,{label:"Model ID",children:(0,s.jsx)(n.E,{color:"blue",children:a})}),(0,s.jsx)(n.E,{children:"@"}),d?(0,s.jsx)(m,{copied:x,label:"Version ID",children:(0,s.jsx)(n.E,{color:"blue",onClick:()=>v(c),children:c})}):(0,s.jsx)(o.u,{label:"Version ID",children:(0,s.jsx)(n.E,{color:"blue",children:c})})]}),d&&(0,s.jsx)(l.A,{size:"xs",onClick:e=>{e.stopPropagation(),v(y)},children:x?(0,s.jsx)(u.Z,{size:"20"}):(0,s.jsx)(p.Z,{size:"20"})})]}):null},m=e=>{let{copied:t,children:r,label:i}=e;return(0,s.jsx)(o.u,{label:t?"Copied":null!=i?i:"Copy",withArrow:!0,children:r})},y=[{name:"ecosystem",description:"The resource ecosystem"},{name:"type",description:"The resource type"},{name:"source",description:"The resource source"},{name:"id",description:"The resource id at the source"}];function j(e){let{size:t}=e;return(0,s.jsxs)(a.J,{width:300,withArrow:!0,withinPortal:!0,shadow:"sm",children:[(0,s.jsx)(a.J.Target,{children:(0,s.jsx)(x.Z,{size:null!=t?t:16,style:{cursor:"pointer",opacity:.7}})}),(0,s.jsx)(a.J.Dropdown,{children:(0,s.jsxs)(c.K,{spacing:"xs",children:[(0,s.jsx)(d.x,{size:"sm",weight:500,children:"What is an AIR?"}),(0,s.jsx)(d.x,{size:"xs",lh:1.3,children:"AIR stands for Artificial Intelligence Resource. It is a comprehensive unique identifier, and is composed of the following parts:"}),(0,s.jsx)(c.K,{spacing:4,children:y.map(e=>{let{name:t,description:r}=e;return(0,s.jsxs)(d.x,{size:"xs",children:[(0,s.jsx)(n.E,{color:"blue",children:t})," ",r]},t)})}),(0,s.jsxs)(d.x,{size:"xs",lh:1.3,children:["For brevity we have opted not to show the full AIR here. To learn more about AIRs,"," ",(0,s.jsx)(d.x,{component:"a",variant:"link",td:"underline",href:"/github/wiki/AIR-‐-Uniform-Resource-Names-for-AI",target:"_blank",children:"Check out the specification"})]})]})})]})}},81276:function(e,t,r){"use strict";r.d(t,{j:function(){return c}});var s=r(85893),i=r(95117),n=r(71232),o=r(88393),l=r(79543),a=r(88182);function c(e){let{modelId:t,versionId:r,thumbsDownCount:c,thumbsUpCount:d}=e,h=d+c,u=h>0?d/h:0;if(0===h)return(0,s.jsx)(i.x,{children:"No reviews yet"});let{label:p,color:x}=function(e){let{positiveRating:t,totalCount:r}=e;return t<.2?r<10?{label:"Mixed",color:"yellow"}:r<50?{label:"Negative",color:"red"}:r<500?{label:"Very Negative",color:"red"}:{label:"Overwhelmingly negative",color:"red"}:t<.4?{label:"Mostly negative",color:"orange"}:t<.7?{label:"Mixed",color:"yellow"}:t<.8?{label:"Mostly Positive",color:"lime"}:r<50?{label:"Positive",color:"green"}:r<500?{label:"Very Positive",color:"green"}:r>=500&&t<.95?{label:"Very Positive",color:"green"}:{label:"Overwhelmingly Positive",color:"green"}}({positiveRating:u,totalCount:h});return(0,s.jsxs)(n.Z,{position:"left",align:"flex-start",spacing:4,children:[(0,s.jsx)(o.u,{label:"".concat(Math.round(100*u),"% of reviews are positive"),openDelay:500,color:"gray",children:(0,s.jsx)("div",{children:(0,s.jsx)(i.x,{component:l.p,href:"/models/".concat(t,"/reviews?modelVersionId=").concat(r),tt:"capitalize",variant:"link",color:x,children:p})})}),(0,s.jsxs)(i.x,{color:"dimmed",children:["(",(0,a.x6)(h),")"]})]})}},41524:function(e,t,r){"use strict";r.d(t,{t:function(){return w}});var s=r(85893),i=r(40633),n=r(71232),o=r(88393),l=r(64523),a=r(95117),c=r(8949),d=r(21955),h=(0,d.Z)("outline","spy-off","IconSpyOff",[["path",{d:"M3 11h8m4 0h6",key:"svg-0"}],["path",{d:"M5 11v-4c0 -.571 .16 -1.105 .437 -1.56m2.563 -1.44h8a3 3 0 0 1 3 3v4",key:"svg-1"}],["path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M14.88 14.877a3 3 0 1 0 4.239 4.247m.59 -3.414a3.012 3.012 0 0 0 -1.425 -1.422",key:"svg-3"}],["path",{d:"M10 17h4",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]]),u=r(22112),p=r(99759),x=(0,d.Z)("outline","brush-off","IconBrushOff",[["path",{d:"M3 17a4 4 0 1 1 4 4h-4v-4z",key:"svg-0"}],["path",{d:"M21 3a16 16 0 0 0 -9.309 4.704m-1.795 2.212a15.993 15.993 0 0 0 -1.696 3.284",key:"svg-1"}],["path",{d:"M21 3a16 16 0 0 1 -4.697 9.302m-2.195 1.786a15.993 15.993 0 0 1 -3.308 1.712",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),g=(0,d.Z)("outline","world-off","IconWorldOff",[["path",{d:"M5.657 5.615a9 9 0 1 0 12.717 12.739m1.672 -2.322a9 9 0 0 0 -12.066 -12.084",key:"svg-0"}],["path",{d:"M3.6 9h5.4m4 0h7.4",key:"svg-1"}],["path",{d:"M3.6 15h11.4m4 0h1.4",key:"svg-2"}],["path",{d:"M11.5 3a17.001 17.001 0 0 0 -1.493 3.022m-.847 3.145c-.68 4.027 .1 8.244 2.34 11.833",key:"svg-3"}],["path",{d:"M12.5 3a16.982 16.982 0 0 1 2.549 8.005m-.207 3.818a16.979 16.979 0 0 1 -2.342 6.177",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]]),f=(0,d.Z)("outline","shopping-cart-off","IconShoppingCartOff",[["path",{d:"M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M17 17a2 2 0 1 0 2 2",key:"svg-1"}],["path",{d:"M17 17h-11v-11",key:"svg-2"}],["path",{d:"M9.239 5.231l10.761 .769l-1 7h-2m-4 0h-7",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]]),v=(0,d.Z)("outline","exchange-off","IconExchangeOff",[["path",{d:"M5 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M19 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19 8v5c0 .594 -.104 1.164 -.294 1.692m-1.692 2.298a4.978 4.978 0 0 1 -3.014 1.01h-3l3 -3",key:"svg-2"}],["path",{d:"M14 21l-3 -3",key:"svg-3"}],["path",{d:"M5 16v-5c0 -1.632 .782 -3.082 1.992 -4m3.008 -1h3l-3 -3",key:"svg-4"}],["path",{d:"M11.501 7.499l1.499 -1.499",key:"svg-5"}],["path",{d:"M3 3l18 18",key:"svg-6"}]]),m=(0,d.Z)("outline","rotate-2","IconRotate2",[["path",{d:"M15 4.55a8 8 0 0 0 -6 14.9m0 -4.45v5h-5",key:"svg-0"}],["path",{d:"M18.37 7.16l0 .01",key:"svg-1"}],["path",{d:"M13 19.94l0 .01",key:"svg-2"}],["path",{d:"M16.84 18.37l0 .01",key:"svg-3"}],["path",{d:"M19.37 15.1l0 .01",key:"svg-4"}],["path",{d:"M19.94 11l0 .01",key:"svg-5"}]]),y=r(63208),j=r(38710);r(67294);var k=r(17578),b=r(35818);let w=e=>{var t;let{permissions:r,size:d=20,spacing:w=2,showNone:M=!1,...C}=e,Z=(0,k.xJ)(),N=null!==(t=null==Z?void 0:Z.isModerator)&&void 0!==t&&t,{allowNoCredit:R,allowCommercialUse:I,allowDerivatives:z,allowDifferentLicense:S,minor:A}=r,T=I.includes(b.fD.Image),E=I.includes(b.fD.RentCivit),P=I.includes(b.fD.Rent),B=I.includes(b.fD.Sell),L={"Use the model without crediting the creator":R,"Sell images they generate":T,"Run on services that generate for money":P,"Run on Civitai":E,"Share merges using this model":z,"Sell this model or merges using this model":B,"Have different permissions when sharing merges":S,...N&&{"Create NSFW generations":!A}},_={size:d,stroke:1.5},D=[N&&A&&{label:"No mature content",icon:(0,s.jsx)(h,{..._})},!R&&{label:"Creator credit required",icon:(0,s.jsx)(u.Z,{..._})},!T&&{label:"No selling generated content",icon:(0,s.jsx)(p.Z,{..._})},!E&&{label:"No Civitai generation",icon:(0,s.jsx)(x,{..._})},!P&&{label:"No generation services",icon:(0,s.jsx)(g,{..._})},!B&&{label:"No selling models",icon:(0,s.jsx)(f,{..._})},!z&&{label:"No sharing merges",icon:(0,s.jsx)(v,{..._})},!S&&{label:"Same permissions required",icon:(0,s.jsx)(m,{..._})}].filter(Boolean);return(0,s.jsxs)(i.J,{withArrow:!0,withinPortal:!0,children:[(0,s.jsx)(i.J.Target,{children:(0,s.jsxs)(n.Z,{spacing:w,sx:{cursor:"pointer"},noWrap:!0,...C,children:[D.map((e,t)=>{let{label:r,icon:i}=e;return(0,s.jsx)(o.u,{label:r,withArrow:!0,withinPortal:!0,position:"top",children:(0,s.jsx)(l.x,{sx:e=>({color:e.colors.gray[5]}),children:i})},t)}),M&&0===D.length&&(0,s.jsx)(a.x,{fs:"italic",size:"xs",children:"None"})]})}),(0,s.jsxs)(i.J.Dropdown,{children:[(0,s.jsx)(a.x,{weight:500,children:"This model permits users to:"}),(0,s.jsx)(c.a,{size:"xs",styles:{itemIcon:{marginRight:4,paddingTop:2}},children:Object.entries(L).map((e,t)=>{let[r,i]=e;return(0,s.jsx)(c.a.Item,{styles:e=>({itemIcon:{color:e.colors.red[4]}}),icon:i?(0,s.jsx)(y.Z,{style:{color:"green"},size:12,stroke:4}):(0,s.jsx)(j.Z,{style:{color:"red"},size:12,stroke:3}),children:r},t)})})]})]})}},60800:function(e,t,r){"use strict";r.d(t,{h:function(){return l}});var s=r(35818),i=r(36061),n=r(32957),o=r(72456);function l(e){let t,{entityType:r}=e;r===s.iB.Model?t=n.t0.MostModels:r===s.iB.Image?t=n.t0.MostImages:r===s.iB.Post?t=n.t0.MostPosts:r===s.iB.Article&&(t=n.t0.MostArticles);let{data:l,isLoading:a}=o.SX.tag.getAll.useQuery({entityType:[r],sort:t,unlisted:!1,categories:!0,limit:100,include:["nsfwLevel"]}),c=l?l.items:void 0,{items:d,loadingPreferences:h}=(0,i.f)({type:"tags",data:c});return{data:d,isLoading:a||h}}},70985:function(e,t,r){"use strict";r.d(t,{N:function(){return u}});var s=r(85893),i=r(71232),n=r(17789),o=r(50331),l=r(88393),a=r(35818),c=r(63208),d=r(38615),h=r(67294);function u(e){let{trainedWords:t=[],files:r=[],type:o,limit:l=10,badgeProps:c}=e,[d,u]=(0,h.useState)(!1),x=(0,h.useMemo)(()=>{let e=t,s=r.some(e=>"Negative"===e.type),[i]=t;return i&&s?[i,i+"-neg"]:(!d&&e.length>l&&(e=e.slice(0,l)),o===a.BY.Wildcards)?e.map(e=>"__".concat(e,"__")):e},[t,r,o,d,l]);return(0,s.jsxs)(i.Z,{spacing:4,children:[x.map((e,t)=>(0,s.jsx)(p,{word:e,...c},t)),t.length>l&&!d&&(0,s.jsxs)(n.C,{size:"sm",radius:"sm",color:"gray",sx:{cursor:"pointer"},onClick:()=>u(!0),children:["+",t.length-l," more"]})]})}function p(e){let{word:t,...r}=e;return(0,s.jsx)(o.q,{value:t.trim(),children:e=>{let{copy:o,copied:a}=e;return(0,s.jsx)(l.u,{label:"Copied!",opened:a,children:(0,s.jsx)(n.C,{size:"sm",radius:"sm",color:a?"green":"violet",sx:{cursor:"pointer",height:"auto"},onClick:o,pr:2,...r,children:(0,s.jsxs)(i.Z,{spacing:5,align:"center",noWrap:!0,sx:{whiteSpace:"normal"},children:[t,a?(0,s.jsx)(c.Z,{className:"shrink-0 grow-0",stroke:2,size:14}):(0,s.jsx)(d.Z,{className:"shrink-0 grow-0",stroke:2,size:14})]})})})}})}},55076:function(e,t,r){"use strict";r.d(t,{S:function(){return d}});var s=r(85893),i=r(49834),n=r(11621),o=r(77488),l=r(90512),a=r(67294),c=r(10558);function d(e){let{children:t,className:r,...d}=e,[h,u]=(0,a.useState)(null),p=h&&h.scrollWidth>h.offsetWidth,[x,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!h)return;function e(){h&&(0===h.scrollLeft?g("start"):h.scrollLeft>=h.scrollWidth-h.offsetWidth-1?g("end"):g(null))}e();let t=new MutationObserver(e);return t.observe(h,{subtree:!0,childList:!0}),null==h||h.addEventListener("scroll",e,{passive:!0}),()=>{t.disconnect(),null==h||h.removeEventListener("scroll",e)}},[h]);let f=(0,c.s)();return(0,s.jsxs)("div",{className:(0,l.Z)("relative overflow-hidden"),...d,children:[p&&"start"!==x&&(0,s.jsx)("div",{className:(0,l.Z)("absolute inset-y-0 left-0 z-10 flex items-center bg-gradient-to-r from-white/50 transition hover:bg-white dark:from-dark-7 hover:dark:bg-dark-7",{hidden:f}),children:(0,s.jsx)(i.A,{variant:"transparent",radius:0,onClick:()=>null==h?void 0:h.scrollBy({left:-200,behavior:"smooth"}),className:"h-full",children:(0,s.jsx)(n.Z,{stroke:2.5,size:28})})}),(0,s.jsx)("div",{ref:u,className:(0,l.Z)("overflow-x-auto scrollbar-none",r),children:t}),p&&"end"!==x&&(0,s.jsx)("div",{className:(0,l.Z)("absolute inset-y-0 right-0 z-10 flex items-center bg-gradient-to-l from-white/50 transition hover:bg-white dark:from-dark-7 hover:dark:bg-dark-7",{hidden:f}),children:(0,s.jsx)(i.A,{variant:"transparent",radius:0,onClick:()=>null==h?void 0:h.scrollBy({left:200,behavior:"smooth"}),className:"h-full",children:(0,s.jsx)(o.Z,{stroke:2.5,size:28})})})]})}},58434:function(e){e.exports={queries:"MasonryContainer_queries__bS_ak"}},88269:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var s=(0,r(21955).Z)("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]])},94849:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var s=(0,r(21955).Z)("outline","info-square-rounded","IconInfoSquareRounded",[["path",{d:"M12 9h.01",key:"svg-0"}],["path",{d:"M11 12h1v4h1",key:"svg-1"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-2"}]])},22112:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var s=(0,r(21955).Z)("outline","user-check","IconUserCheck",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]])}}]); +//# sourceMappingURL=1770-2c4a003ab544c5a8.js.map \ No newline at end of file diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/22152718 b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/22152718 new file mode 100644 index 0000000000000000000000000000000000000000..357d740d585febb0ae64aa1e9f73314ed25bb3c7 --- /dev/null +++ b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/22152718 @@ -0,0 +1,54 @@ +(function(){'use strict';function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); +q("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c0:!1}function Ca(){return D()?Ba("Chromium"):(C("Chrome")||C("CriOS"))&&!(D()?0:C("Edge"))||C("Silk")};function Da(a,b){for(var c=a.length,d=typeof a==="string"?a.split(""):a,e=0;e=Ma&&a<=Na:a[0]==="-"?Oa(a,Pa):Oa(a,Qa)}),Pa=Number.MIN_SAFE_INTEGER.toString(),Ma=La?BigInt(Number.MIN_SAFE_INTEGER):void 0,Qa=Number.MAX_SAFE_INTEGER.toString(),Na=La?BigInt(Number.MAX_SAFE_INTEGER):void 0; +function Oa(a,b){if(a.length>b.length)return!1;if(a.lengthe)return!1;if(d>>0;L=b;M=(a-b)/4294967296>>>0}function Ta(a){if(a<0){Sa(-a);var b=u(Ua(L,M));a=b.next().value;b=b.next().value;L=a>>>0;M=b>>>0}else Sa(a)}function Va(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else H()?c=""+(BigInt(b)<>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+Wa(c)+Wa(a));return c} +function Wa(a){a=String(a);return"0000000".slice(a.length)+a}function Xa(){var a=L,b=M;b&2147483648?H()?a=""+(BigInt(b|0)<>>0)):(b=u(Ua(a,b)),a=b.next().value,b=b.next().value,a="-"+Va(a,b)):a=Va(a,b);return a}function Ua(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};var Ya=typeof Symbol==="function"&&typeof Symbol()==="symbol",Za=new Set;function $a(a,b,c){var d=!0;d=d===void 0?!1:d;a=typeof Symbol==="function"&&typeof Symbol()==="symbol"?(c===void 0?0:c)&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol():b;d&&Za.add(a);return a}var ab=$a("jas",void 0,!0),bb=$a(void 0,Symbol());var N=Ya?ab:"D",cb={D:{value:0,configurable:!0,writable:!0,enumerable:!1}},db=Object.defineProperties;function eb(a,b){Ya||N in a||db(a,cb);a[N]|=b}function O(a,b){Ya||N in a||db(a,cb);a[N]=b}function fb(a,b){O(b,(a|0)&-30975)}function gb(a,b){O(b,(a|34)&-30941)};function P(a){return Array.prototype.slice.call(a)};var hb={};function ib(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}var jb,kb=[];O(kb,55);jb=Object.freeze(kb);function lb(a,b){var c=sa(bb);(b=c?b[c]:void 0)&&(a[bb]=P(b))};function mb(a){a=Error(a);a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity="warning";return a};var nb=typeof BigInt==="function"?BigInt.asIntN:void 0,R=Number.isSafeInteger,ob=Number.isFinite,pb=Math.trunc,qb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function rb(a){switch(typeof a){case "bigint":return!0;case "number":return ob(a);case "string":return qb.test(a);default:return!1}} +function sb(a){var b=0;b=b===void 0?0:b;if(!rb(a))throw mb("int64");var c=typeof a;switch(b){case 4096:switch(c){case "string":return tb(a);case "bigint":return String(nb(64,a));default:return ub(a)}case 8192:switch(c){case "string":return b=pb(Number(a)),R(b)?a=J(b):(b=a.indexOf("."),b!==-1&&(a=a.substring(0,b)),a=H()?J(nb(64,BigInt(a))):J(vb(a))),a;case "bigint":return J(nb(64,a));default:return R(a)?J(wb(a)):J(ub(a))}case 0:switch(c){case "string":return tb(a);case "bigint":return J(nb(64,a)); +default:return wb(a)}default:throw Error("Unknown format requested type for int64");}}function xb(a){var b=a.length;return a[0]==="-"?b<20?!0:b===20&&Number(a.substring(0,7))>-922337:b<19?!0:b===19&&Number(a.substring(0,6))<922337} +function vb(a){if(xb(a))return a;if(a.length<16)Ta(Number(a));else if(H())a=BigInt(a),L=Number(a&BigInt(4294967295))>>>0,M=Number(a>>BigInt(32)&BigInt(4294967295));else{var b=+(a[0]==="-");M=L=0;for(var c=a.length,d=b,e=(c-b)%6+b;e<=c;d=e,e+=6)d=Number(a.slice(d,e)),M*=1E6,L=L*1E6+d,L>=4294967296&&(M+=Math.trunc(L/4294967296),M>>>=0,L>>>=0);b&&(b=u(Ua(L,M)),a=b.next().value,b=b.next().value,L=a,M=b)}return Xa()} +function wb(a){a=pb(a);if(!R(a)){Ta(a);var b=L,c=M;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);var d=c*4294967296+(b>>>0);b=Number.isSafeInteger(d)?d:Va(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}function ub(a){a=pb(a);if(R(a))a=String(a);else{var b=String(a);xb(b)?a=b:(Ta(a),a=Xa())}return a}function tb(a){var b=pb(Number(a));if(R(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return vb(a)};function yb(a){return a};function zb(a,b,c){var d=P(a),e=d.length,g=b&256?d[e-1]:void 0;e+=g?-1:0;for(b=b&512?1:0;b>2];h=b[(h&3)<<4|k>>4];k=b[(k&15)<<2|f>>6];f=b[f&63];c[e++]=m+h+k+f}m=0;f=d;switch(a.length-g){case 2:m=a[g+1],f=b[(m&15)<<2]||d;case 1:a=a[g],c[e]=b[a>>2]+b[(a&3)<<4|m>>4]+f+d}a=c.join("")}return a}if(a.u===hb)return Fb(a);return}return a}var Gb; +function Hb(a){try{return Fb(a)}finally{Gb=void 0}} +function Fb(a){var b=a.i;a=Bb(b,Eb,void 0,void 0,!1);var c=b[N]|0;if((b=a.length)&&!(c&512)){var d=a[b-1],e=!1;ib(d)?(b--,e=!0):d=void 0;var g,m=(g=Gb)!=null?g:yb;g=c&512?0:-1;c=b-g;m=m(c,g,a,d);d&&(a[b]=void 0);if(c0;c=b-1)if(f=a[c],f==null)b--,e=!0;else if(c-=g,c>=m)e=void 0,((e=d)!=null?e:d={})[c]=f,b--,e=!0;else break;e&&(a.length= +b);d&&a.push(d)}return a};function S(a,b,c){if(a==null){var d=96;c?(a=[c],d|=512):a=[];b&&(d=d&-33521665|(b&1023)<<15)}else{if(!Array.isArray(a))throw Error("narr");d=a[N]|0;if(d&2048)throw Error("farr");if(d&64)return a;d|=64;if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;var e=c.length;if(e){var g=e-1;if(ib(c[g])){d|=256;b=g-(d&512?0:-1);if(b>=1024)throw Error("pvtlmt");d=d&-33521665|(b&1023)<<15;break a}}if(b){b=Math.max(b,e-(d&512?0:-1));if(b>1024)throw Error("spvt");d=d&-33521665|(b&1023)<<15}}}O(a,d);return a};function Ib(a,b,c){c=c===void 0?gb:c;if(a!=null){if(Ga&&a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[N]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(O(a,(d|34)&-12293),a):Bb(a,Ib,d&4?gb:c,!0,!0)}a.u===hb&&(c=a.i,d=c[N]|0,a=d&2?a:new a.constructor(Jb(c,d,!0)));return a}}function Jb(a,b,c){var d=c||b&2?gb:fb,e=!!(b&32);a=zb(a,b,function(g){return Ib(g,e,d)});eb(a,32|(c?2:0));return a};function Kb(a,b,c){var d=a.i,e=d[N]|0;if(e&2)throw Error();Lb(d,e,b,c);return a}function Lb(a,b,c,d){var e=b&512?0:-1,g=c+e,m=a.length-1;if(g>=m&&b&256)return a[m][c]=d,b;if(g<=m)return a[g]=d,b&256&&(a=a[m],c in a&&delete a[c]),b;d!==void 0&&(m=b>>15&1023||536870912,c>=m?d!=null&&(g={},a[m+e]=(g[c]=d,g),b|=256,O(a,b)):a[g]=d);return b}function Mb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}function Nb(a,b,c){c==null&&(c=void 0);return Kb(a,b,c)}function Ob(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049} +function Pb(a,b){32&b||(a&=-33);return a};function U(a,b,c){this.i=S(a,b,c)}U.prototype.toJSON=function(){return Hb(this)};function V(a){return JSON.stringify(Hb(a))}U.prototype.u=hb;U.prototype.toString=function(){return this.i.toString()};function W(a){return function(b){if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");eb(b,32);b=new a(b)}return b}};function Qb(a){this.i=S(a)}r(Qb,U);var Rb=W(Qb);function Sb(a){this.i=S(a)}r(Sb,U);var Tb=W(Sb);function Ub(a){this.i=S(a)}r(Ub,U);function Vb(a){var b=new Ub;if(a!=null){if(!ob(a))throw mb("enum");a|=0}return Kb(b,1,a)};function X(a){this.i=S(a)}r(X,U);function Wb(a,b){return Nb(a,2,b)}X.prototype.setCmpModeObject=function(a){return Nb(this,3,a)};X.prototype.setExperimentsObject=function(a){return Nb(this,5,a)};var Xb=W(X);function Y(){this.m=this.g=null;this.A=!1}Y.prototype.setCmpModeObject=function(a){try{this.g=Rb(a)}catch(b){}};Y.prototype.setExperimentsObject=function(a){try{this.m=Tb(a)}catch(b){}};Y.prototype.getSerializedReturnMessageForCommand=function(a){if(this.A)return V(Wb(new X,Vb(4)));switch(a){case "loaded":return V(Yb(this));case "prov":return V(Yb(this));default:return this.getSerializedReturnMessageForInvalidCommand()}}; +Y.prototype.getSerializedReturnMessageForInvalidCommand=function(){return V(Wb(new X,Vb(2)))};Y.prototype.setError=function(){this.A=!0};function Yb(a){return Wb((new X).setCmpModeObject(a.g).setExperimentsObject(a.m),Vb(1))}function Zb(a){var b=a.__fcInternalApiManager;if(typeof b!=="undefined")return b;b=new Y;return a.__fcInternalApiManager=b};function Z(a){this.i=S(a)}r(Z,U);var $b=W(Z);function ac(a){this.i=S(a)}r(ac,U);var bc=W(ac);function cc(a,b){this.o=b;this.v=new Map;this.s=new Map;this.l=0;this.B=Zb(a);this.s.set("prov",!0)} +cc.prototype.push=function(a,b){b=b&&typeof b==="object"&&typeof b.cb==="function"?b:{cb:b};if(!ua(a)){var c=this.B.getSerializedReturnMessageForInvalidCommand();dc(this,b.cb,c);return this.l}if(!this.s.get(a))return b=b.cb,c=this.v.get(a)||[],c.push(b),this.v.set(a,c),this.l;c=this.B.getSerializedReturnMessageForCommand(a);switch(a){case "prov":if(b.spsp){var d=$b(b.spsp);a=new ac;this.o.C.has(18)&&(a=(a=this.o.C.get(18))?bc(a):new ac);var e=a.i[N]|0;if(e&2)throw Error();var g,m=a.i,f=!!(2&e),h= +f?1:2;g&&(g=!f);f=1+(e&512?0:-1);var k=m.length-1;f=f>=k&&e&256?m[k][1]:f<=k?m[f]:void 0;f=Array.isArray(f)?f:jb;var l=f[N]|0;k=!!(4&l);if(!k){var n=l;n===0&&(n=Ob(n,e));l=f;n|=1;var B=e,y=!!(2&n);y&&(B|=2);for(var E=!y,Q=!0,F=0,K=0;F0;){var c=b.shift();typeof c==="function"&&this.push(a,c)}return this.l};cc.prototype.executeAllRemainingCommands=function(){for(var a=u(Object.values(ta)),b=a.next();!b.done;b=a.next())this.executeCommandType(b.value);return this.l}; +function dc(a,b,c){typeof b==="function"&&(b(c),a.l++)}function ec(a,b){var c=va(a).__fci||[];if(!Array.isArray(c))return c;a=new cc(a,b);if(c.length%2===0)for(b=0;b \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/2761-d3a79999ad2d2d9a.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/2761-d3a79999ad2d2d9a.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..7c25774caf9f503f7df5b47110ed24104442b7ec --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/2761-d3a79999ad2d2d9a.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2761],{4586:function(e,t){class n{constructor(){let e,t;this.set=void 0,this.get=void 0,this.get=n=>n===e?t:void 0,this.set=(n,i)=>{e=n,t=i}}}t.Z=n},65355:function(e,t,n){var i=n(67294);t.Z=e=>{let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),t}},37229:function(e,t,n){n.d(t,{_:function(){return i}});let i=new WeakMap},34814:function(e,t,n){n.d(t,{N:function(){return r}});var i=n(67294);function r(){let e=i.useState(o)[1];return i.useRef(()=>e({})).current}let o={}},26575:function(e,t,n){n.d(t,{$:function(){return f}});var i=(e,t)=>{let n,i;let o=t||r;return function(){return n&&o(arguments,n)?i:i=e.apply(null,n=arguments)}};let r=(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3];var o=n(4586),s=n(65355),u=n(67294),a=n(50579),c=n(37229),l=n(34814);n(83454);let h=u.createElement;function f(e){let t,{positioner:n,resizeObserver:i,items:r,as:o="div",id:a,className:c,style:f,role:p="grid",tabIndex:R=0,containerRef:w,itemAs:C="div",itemStyle:y,itemHeightEstimate:E=300,itemKey:z=P,overscanBy:L=2,scrollTop:T,isScrolling:M,height:S,render:B,onRender:O}=e,k=0,N=(0,l.N)(),_=m(n,i),A=r.length,{columnWidth:W,columnCount:D,range:F,estimateHeight:I,size:X,shortestColumn:j}=n,H=X(),V=j(),Z=[],q="list"===p?"listitem":"grid"===p?"gridcell":void 0,G=(0,s.Z)(O),J=T+(L*=S),U=V{let o=r[e],s=z(o,e),u={top:i,left:n,width:W,writingMode:"horizontal-tb",position:"absolute"};Z.push(h(C,{key:s,ref:_(e),role:q,style:"object"==typeof y&&null!==y?Object.assign({},u,y):u},v(B,e,o,W))),void 0===t?(k=e,t=e):(k=Math.min(k,e),t=Math.max(t,e))}),U){let e=Math.min(A-H,Math.ceil((T+L-V)/E*D)),t=H,n=x(W);for(;t{"function"==typeof G.current&&void 0!==t&&G.current(k,t,r),d="1"},[k,t,r,G]),u.useEffect(()=>{U&&N()},[U,n]);let Y=g(M,I(A,E));return h(o,{ref:w,key:d,id:a,role:p,className:c,tabIndex:R,style:"object"==typeof f?b(Y,f):Y,children:Z})}let d="0",v=(0,a.Z)([o.Z,{},WeakMap,o.Z],(e,t,n,i)=>h(e,{index:t,data:n,width:i})),g=i((e,t)=>({position:"relative",width:"100%",maxWidth:"100%",height:Math.ceil(t),maxHeight:Math.ceil(t),willChange:e?"contents":void 0,pointerEvents:e?"none":void 0})),p=(e,t)=>e[0]===t[0]&&e[1]===t[1],b=i((e,t)=>Object.assign({},e,t),p);function P(e,t){return t}let x=i(e=>({width:e,zIndex:-1e3,visibility:"hidden",position:"absolute",writingMode:"horizontal-tb"}),(e,t)=>e[0]===t[0]),m=i((e,t)=>n=>i=>{null!==i&&(t&&(t.observe(i),c._.set(i,n)),void 0===e.get(n)&&e.set(n,i.offsetHeight))},p)},86685:function(e,t,n){n.d(t,{G:function(){return l}});var i=n(67294);let r={low:0,max:0,high:0,C:2,P:void 0,R:void 0,L:void 0,list:void 0};function o(e){let t=e.high;e.L===r&&e.R===r?e.max=t:e.L===r?e.max=Math.max(e.R.max,t):e.R===r?e.max=Math.max(e.L.max,t):e.max=Math.max(Math.max(e.L.max,e.R.max),t)}function s(e){let t=e;for(;t.P!==r;)o(t.P),t=t.P}function u(e,t){if(t.R===r)return;let n=t.R;t.R=n.L,n.L!==r&&(n.L.P=t),n.P=t.P,t.P===r?e.root=n:t===t.P.L?t.P.L=n:t.P.R=n,n.L=t,t.P=n,o(t),o(n)}function a(e,t){if(t.L===r)return;let n=t.L;t.L=n.R,n.R!==r&&(n.R.P=t),n.P=t.P,t.P===r?e.root=n:t===t.P.R?t.P.R=n:t.P.L=n,n.R=t,t.P=n,o(t),o(n)}function c(e,t,n){t.P===r?e.root=n:t===t.P.L?t.P.L=n:t.P.R=n,n.P=t.P}function l(e,t){let{width:n,columnWidth:r=200,columnGutter:o=0,rowGutter:s,columnCount:u,maxColumnCount:a}=e;void 0===t&&(t=v);let c=()=>{let[e,t]=d(n,r,o,u,a);return h(t,e,o,null!=s?s:o)},l=i.useRef();void 0===l.current&&(l.current=c());let f=i.useRef(t),g=[n,r,o,s,u,a],p=i.useRef(g),b=!g.every((e,t)=>p.current[t]===e);if(b||!t.every((e,t)=>f.current[t]===e)){let e=l.current,n=c();if(f.current=t,p.current=g,b){let t=e.size();for(let i=0;ir.high)break;i=r,r=r.next}return i||(e.list={index:n,high:t,next:r}),i&&(i.next={index:n,high:t,next:i.next}),!0}(h,i,c))return;h.high=Math.max(h.high,i),o(h),s(h),t[c]=h,e.size++;return}let f={low:n,high:i,max:i,C:0,P:h,L:r,R:r,list:{index:c,high:i,next:null}};h===r?e.root=f:(f.lowe.max)&&(e.L!==r&&o.push(e.L),e.R!==r&&o.push(e.R),e.low<=n&&e.high>=t)){let n=e.list;for(;null!==n;)n.high>=t&&i(n.index,e.low),n=n.next}}},get size(){return e.size}}}(),h=Array(e),d=[],v=Array(e);for(let t=0;td[e],update:t=>{let n=Array(e),r=0,o=0;for(;rl.search(e,t,(e,t)=>n(e,d[e].left,t)),estimateHeight:(t,n)=>{let i=Math.max(0,Math.max.apply(null,h));return t===l.size?i:i+Math.ceil((t-l.size)/e)*n},shortestColumn:()=>h.length>1?Math.min.apply(null,h):h[0]||0,size:()=>l.size,all:()=>d}},f=(e,t)=>{let n=0,i=e.length-1;for(;n<=i;){let r=n+i>>>1,o=e[r];if(o===t)return r;o<=t?n=r+1:i=r-1}return -1},d=function(e,t,n,i,r){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=8),i=i||Math.min(Math.floor((e+n)/(t+n)),r||1/0)||1,[Math.floor((e-n*(i-1))/i),i]},v=[]},5364:function(e,t,n){n.d(t,{y:function(){return Q}});var i,r,o,s=[],u="ResizeObserver loop completed with undelivered notifications.",a=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:u}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=u),window.dispatchEvent(e)};(i=r||(r={})).BORDER_BOX="border-box",i.CONTENT_BOX="content-box",i.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var c=function(e){return Object.freeze(e)},l=function(e,t){this.inlineSize=e,this.blockSize=t,c(this)},h=function(){function e(e,t,n,i){return this.x=e,this.y=t,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,c(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),f=function(e){return e instanceof SVGElement&&"getBBox"in e},d=function(e){if(f(e)){var t=e.getBBox(),n=t.width,i=t.height;return!n&&!i}var r=e.offsetWidth,o=e.offsetHeight;return!(r||o||e.getClientRects().length)},v=function(e){if(e instanceof Element)return!0;var t,n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},g=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},p="undefined"!=typeof window?window:{},b=new WeakMap,P=/auto|scroll/,x=/^tb|vertical/,m=/msie|trident/i.test(p.navigator&&p.navigator.userAgent),R=function(e){return parseFloat(e||"0")},w=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new l((n?t:e)||0,(n?e:t)||0)},C=c({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new h(0,0,0,0)}),y=function(e,t){if(void 0===t&&(t=!1),b.has(e)&&!t)return b.get(e);if(d(e))return b.set(e,C),C;var n=getComputedStyle(e),i=f(e)&&e.ownerSVGElement&&e.getBBox(),r=!m&&"border-box"===n.boxSizing,o=x.test(n.writingMode||""),s=!i&&P.test(n.overflowY||""),u=!i&&P.test(n.overflowX||""),a=i?0:R(n.paddingTop),l=i?0:R(n.paddingRight),v=i?0:R(n.paddingBottom),g=i?0:R(n.paddingLeft),p=i?0:R(n.borderTopWidth),y=i?0:R(n.borderRightWidth),E=i?0:R(n.borderBottomWidth),z=i?0:R(n.borderLeftWidth),L=g+l,T=a+v,M=z+y,S=p+E,B=u?e.offsetHeight-S-e.clientHeight:0,O=s?e.offsetWidth-M-e.clientWidth:0,k=i?i.width:R(n.width)-(r?L+M:0)-O,N=i?i.height:R(n.height)-(r?T+S:0)-B,_=k+L+O+M,A=N+T+B+S,W=c({devicePixelContentBoxSize:w(Math.round(k*devicePixelRatio),Math.round(N*devicePixelRatio),o),borderBoxSize:w(_,A,o),contentBoxSize:w(k,N,o),contentRect:new h(g,a,k,N)});return b.set(e,W),W},E=function(e,t,n){var i=y(e,n),o=i.borderBoxSize,s=i.contentBoxSize,u=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return u;case r.BORDER_BOX:return o;default:return s}},z=function(e){var t=y(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=c([t.borderBoxSize]),this.contentBoxSize=c([t.contentBoxSize]),this.devicePixelContentBoxSize=c([t.devicePixelContentBoxSize])},L=function(e){if(d(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},T=function(){var e=1/0,t=[];s.forEach(function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach(function(t){var n=new z(t.target),r=L(t.target);i.push(n),t.lastReportedSize=E(t.target,t.observedBox),re?t.activeTargets.push(n):t.skippedTargets.push(n))})})},S=function(){var e=0;for(M(0);s.some(function(e){return e.activeTargets.length>0});)M(e=T());return s.some(function(e){return e.skippedTargets.length>0})&&a(),e>0},B=[],O=function(e){if(!o){var t=0,n=document.createTextNode("");new MutationObserver(function(){return B.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),o=function(){n.textContent="".concat(t?t--:t++)}}B.push(e),o()},k=function(e){O(function(){requestAnimationFrame(e)})},N=0,_={attributes:!0,characterData:!0,childList:!0,subtree:!0},A=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],W=function(e){return void 0===e&&(e=0),Date.now()+e},D=!1,F=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!D){D=!0;var n=W(e);k(function(){var i=!1;try{i=S()}finally{if(D=!1,e=n-W(),!N)return;i?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,_)};document.body?t():p.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),A.forEach(function(t){return p.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),A.forEach(function(t){return p.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),I=function(e){!N&&e>0&&F.start(),(N+=e)||F.stop()},X=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=E(this.target,this.observedBox,!0);return f(e=this.target)||g(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),j=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},H=new WeakMap,V=function(e,t){for(var n=0;nV(i.observationTargets,t)&&(r&&s.push(i),i.observationTargets.push(new X(t,n&&n.box)),I(1),F.schedule())},e.unobserve=function(e,t){var n=H.get(e),i=V(n.observationTargets,t),r=1===n.observationTargets.length;i>=0&&(r&&s.splice(s.indexOf(n),1),n.observationTargets.splice(i,1),I(-1))},e.disconnect=function(e){var t=this,n=H.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),q=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Z.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!v(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Z.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!v(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Z.unobserve(this,e)},e.prototype.disconnect=function(){Z.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),G=function(e){var t=[],n=null,i=function(){for(var i=arguments.length,r=Array(i),o=0;on,[t]),t}function ee(e){e.cancel()}let et=(0,U.Z)([WeakMap],(e,t)=>{let n=[],i=G(()=>{n.length>0&&(e.update(n),t(n)),n.length=0}),r=t=>{let r=t.offsetHeight;if(r>0){let i=Y._.get(t);if(void 0!==i){let t=e.get(i);void 0!==t&&r!==t.height&&n.push(i,r)}}i()},o=new Map,s=new K(e=>{let t=0;for(;t{u(),o.forEach(ee)},s})}}]); +//# sourceMappingURL=2761-d3a79999ad2d2d9a.js.map \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/34-e863b6b73281af1f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/34-e863b6b73281af1f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..2c8a6b153cf2ca5af5d05250c992371f3f3f4602 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/34-e863b6b73281af1f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34],{10327:function(e,t,n){n.d(t,{M:function(){return h}});var o=n(85893),r=n(88002),i=n(25963),a=n(94351),u=n(60254),s=(0,n(21955).Z)("outline","receipt-refund","IconReceiptRefund",[["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2",key:"svg-0"}],["path",{d:"M15 14v-2a2 2 0 0 0 -2 -2h-4l2 -2m0 4l-2 -2",key:"svg-1"}]]),l=n(79543),d=n(11163),c=n(17578),y=n(48600),g=n(22414),f=n(38903),v=n(9957),p=n(10523),m=n(76326),b=n(41605);function h(e){var t,n;let{bounty:h,buttonProps:B,...k}=e,I=(0,c.xJ)(),M=(0,d.useRouter)(),E=null!==(n=null==I?void 0:I.isModerator)&&void 0!==n&&n,w=(null==I?void 0:I.id)===(null===(t=h.user)||void 0===t?void 0:t.id)||E,x=h.expiresAt{e.stopPropagation(),e.preventDefault(),(0,i._5)({title:"Delete bounty",children:"Are you sure that you want to delete this bounty? This action is destructive and cannot be reverted.",centered:!0,closeOnConfirm:!1,labels:{cancel:"No, keep it",confirm:"Delete bounty"},confirmProps:{color:"red"},onConfirm:async()=>{try{await D(),(0,i.pT)(),"/bounties/[id]/[[...slug]]"===M.pathname&&await M.push("/bounties")}catch(e){}}})},children:"Delete"},"delete"):null,(0,o.jsx)(p.b,{entityType:"Bounty",entityId:h.id},"toggle-searchable-menu-item"),E||!x&&w?(0,o.jsx)(l.p,{legacyBehavior:!0,href:"/bounties/".concat(h.id,"/edit"),passHref:!0,children:(0,o.jsx)(r.v.Item,{component:"a",icon:(0,o.jsx)(u.Z,{size:14,stroke:1.5}),children:"Edit"})},"edit"):null,E&&!h.complete?(0,o.jsx)(r.v.Item,{disabled:C,component:"button",icon:(0,o.jsx)(s,{size:14,stroke:1.5}),onClick:()=>{(0,i._5)({title:"Refund bounty",children:"Are you sure that you want to refund this bounty? This action cannot be reverted.",centered:!0,closeOnConfirm:!1,labels:{cancel:"No, keep it",confirm:"Refund bounty"},confirmProps:{color:"yellow"},onConfirm:async()=>{try{await S(),(0,i.pT)()}catch(e){}}})},children:"Refund"},"refund"):null,!w||E?(0,o.jsx)(f.S,{label:"Report bounty",onReport:()=>(0,m.$B)({entityType:v.Bj.Bounty,entityId:h.id})},"report"):null].filter(y.$K);return T.length?(0,o.jsxs)(r.v,{...k,children:[(0,o.jsx)(r.v.Target,{children:(0,o.jsx)(b.z,{onClick:e=>{e.preventDefault(),e.stopPropagation()},...B})}),(0,o.jsx)(r.v.Dropdown,{children:T})]}):null}},22414:function(e,t,n){n.d(t,{Cv:function(){return p},H1:function(){return I},Pk:function(){return h},_o:function(){return B},fB:function(){return x},ff:function(){return E},ol:function(){return m},pU:function(){return b},sN:function(){return M}});var o=n(35818),r=n(67294),i=n(72456),a=n(38394),u=n(14619),s=n(38498),l=n(17578),d=n(27484),c=n.n(d),y=n(2807),g=n(9585),f=n(12902),v=n(36061);let p=e=>{if(!e||!e.user)return o.F.BUZZ;let t=e.benefactors.find(t=>{var n;return t.user.id===(null===(n=e.user)||void 0===n?void 0:n.id)});return t?t.currency:o.F.BUZZ},m=(e,t)=>{var n;return!!e&&!!t&&!!e.benefactors.find(t=>{var n;return t.user.id===(null===(n=e.user)||void 0===n?void 0:n.id)})&&(null===(n=e.user)||void 0===n?void 0:n.id)===(null==t?void 0:t.id)},b=()=>{let e=(0,a.PH)(e=>e.bounties);return(0,u.HO)(e)},h=(e,t)=>{let{data:n,isLoading:o,...a}=i.SX.bounty.getInfinite.useInfiniteQuery({...e},{getNextPageParam:e=>e.nextCursor,...t,trpc:{context:{skipBatch:!0}}}),u=(0,r.useMemo)(()=>null==n?void 0:n.pages.flatMap(e=>e?e.items:[]),[n]),{items:s,loadingPreferences:l}=(0,v.f)({type:"bounties",data:u,isRefetching:a.isRefetching});return{data:n,bounties:s,isLoading:o||l,...a}},B=e=>{if(!e)return 0;let t=e.benefactors.find(t=>m(e,t.user));return t?t.unitAmount:s._G.bounties.minCreateAmount},k=()=>{let e=(0,l.xJ)(),{data:t,isInitialLoading:n}=i.SX.user.getBountyEngagement.useQuery(void 0,{enabled:!!e,cacheTime:1/0,staleTime:1/0});return{engagements:t,loading:n}},I=()=>{let e=i.SX.useContext(),{engagements:t}=k(),n=i.SX.user.toggleBountyEngagement.useMutation({async onMutate(t){var n,r;let{type:i,bountyId:a}=t;await e.user.getBountyEngagement.cancel(),await e.bounty.getById.cancel();let u=null!==(n=e.user.getBountyEngagement.getData())&&void 0!==n?n:{},s=e.bounty.getById.getData({id:a}),l=null!==(r=u[i])&&void 0!==r?r:[],d=!!l.find(e=>e===a);return i===o.BC.Favorite&&e.bounty.getById.setData({id:a},(0,f.ZP)(e=>{if(!(null==e?void 0:e.stats))return;let t=e.stats.favoriteCountAllTime;e.stats.favoriteCountAllTime+=d?t>0?-1:0:1})),i===o.BC.Track&&e.bounty.getById.setData({id:a},(0,f.ZP)(e=>{if(!(null==e?void 0:e.stats))return;let t=e.stats.trackCountAllTime;e.stats.trackCountAllTime+=d?t>0?-1:0:1})),e.user.getBountyEngagement.setData(void 0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...e,[i]:d?l.filter(e=>e!==a):[...l,a]}}),{previousEngagements:u,previousBounty:s}},onError:(t,n,o)=>{let{bountyId:r}=n;e.user.getBountyEngagement.setData(void 0,null==o?void 0:o.previousEngagements),e.bounty.getById.setData({id:r},null==o?void 0:o.previousBounty)}});return{engagements:t,toggle:async e=>{await n.mutateAsync(e)},toggling:n.isLoading}},M=()=>{let e=c()().startOf("day");return{minStartDate:e.toDate(),maxStartDate:e.clone().add(1,"month").toDate(),minExpiresDate:e.clone().add(1,"day").endOf("day").toDate(),maxExpiresDate:e.clone().add(1,"day").add(1,"month").endOf("day").toDate()}},E=e=>{let{id:t}=e,{data:n,isLoading:o}=i.SX.bounty.getById.useQuery({id:t});return{bounty:n,loading:o}},w="DELETE_BOUNTY_TOAST_ID",x=e=>{let{bountyId:t}=null!=e?e:{},n=i.SX.useContext(),{toggle:r}=I(),a=i.SX.bounty.create.useMutation({async onSuccess(e){let{id:t}=e;await r({type:o.BC.Track,bountyId:t}),await n.bounty.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,y.s9)({title:"Failed to create bounty",error:t})}catch(t){(0,y.s9)({title:"Failed to create bounty",error:Error(e.message)})}}}),u=i.SX.bounty.update.useMutation({async onSuccess(e,t){let{id:o}=t;await n.bounty.getById.invalidate({id:o})},onError(e){(0,y.s9)({title:"Failed to update bounty",error:Error(e.message)})}}),s=i.SX.bounty.upsert.useMutation({async onSuccess(e,t){t.id?await n.bounty.getById.invalidate({id:t.id}):await r({type:o.BC.Track,bountyId:e.id}),await n.bounty.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,y.s9)({title:"Failed to save bounty",error:t})}catch(t){(0,y.s9)({title:"Failed to save bounty",error:Error(e.message)})}}}),l=i.SX.bounty.refund.useMutation({async onSuccess(){await n.bounty.getById.invalidate({id:t}),(0,y.LX)({message:"Bounty refunded"})},onError(e){(0,y.s9)({title:"Failed to refund bounty",error:Error(e.message)})}}),d=i.SX.bounty.delete.useMutation({onMutate(){(0,g.c0)({id:w,message:"Deleting bounty...",loading:!0})},async onSuccess(){await n.bounty.getInfinite.invalidate(),(0,y.LX)({message:"Bounty deleted"})},onError(e){(0,y.s9)({title:"Failed to delete bounty",error:Error(e.message)})},onSettled(){(0,g.yK)(w)}});return{createBounty:e=>a.mutateAsync(e),creating:a.isLoading,updateBounty:e=>{if(t)return u.mutateAsync({...e,id:t})},updating:u.isLoading,deleteBounty:()=>{if(t)return d.mutateAsync({id:t})},deleting:d.isLoading,refundBounty:()=>{if(t)return l.mutateAsync({id:t})},refunding:l.isLoading,upsertBounty:e=>s.mutateAsync(e),upserting:s.isLoading}}},97501:function(e,t,n){n.d(t,{Z:function(){return o}});var o=(0,n(21955).Z)("outline","clock-hour-4","IconClockHour4",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]])},50931:function(e,t,n){n.d(t,{Z:function(){return o}});var o=(0,n(21955).Z)("outline","swords","IconSwords",[["path",{d:"M21 3v5l-11 9l-4 4l-3 -3l4 -4l9 -11z",key:"svg-0"}],["path",{d:"M5 13l6 6",key:"svg-1"}],["path",{d:"M14.32 17.32l3.68 3.68l3 -3l-3.365 -3.365",key:"svg-2"}],["path",{d:"M10 5.5l-2 -2.5h-5v5l3 2.5",key:"svg-3"}]])},31244:function(e,t,n){n.d(t,{Z:function(){return o}});var o=(0,n(21955).Z)("outline","viewfinder","IconViewfinder",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 3l0 4",key:"svg-1"}],["path",{d:"M12 21l0 -3",key:"svg-2"}],["path",{d:"M3 12l4 0",key:"svg-3"}],["path",{d:"M21 12l-3 0",key:"svg-4"}],["path",{d:"M12 12l0 .01",key:"svg-5"}]])}}]); +//# sourceMappingURL=34-e863b6b73281af1f.js.map \ No newline at end of file diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/3fd02c25bee5ff4e.css b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/3fd02c25bee5ff4e.css new file mode 100644 index 0000000000000000000000000000000000000000..8236870f43840ef7f18d9a46ab19a76e3c545253 --- /dev/null +++ b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/3fd02c25bee5ff4e.css @@ -0,0 +1,2 @@ +.MasonryContainer_queries__bS_ak{box-sizing:content-box;margin:0 auto;width:100%}@container (min-width: 656px){.MasonryContainer_queries__bS_ak{width:656px}}@container (min-width: 992px){.MasonryContainer_queries__bS_ak{width:992px}}@container (min-width: 1328px){.MasonryContainer_queries__bS_ak{width:1328px}}@container (min-width: 1664px){.MasonryContainer_queries__bS_ak{width:1664px}}@container (min-width: 2000px){.MasonryContainer_queries__bS_ak{width:2000px}}@container (min-width: 2336px){.MasonryContainer_queries__bS_ak{width:2336px}} +/*# sourceMappingURL=3fd02c25bee5ff4e.css.map*/ \ No newline at end of file diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/4a3cc296-fb97-4926-a7ac-7cd33728ef08.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/4a3cc296-fb97-4926-a7ac-7cd33728ef08.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..858fdb00861d00416e576e198a91caecb54c3143 --- /dev/null +++ b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/4a3cc296-fb97-4926-a7ac-7cd33728ef08.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:527d6a377a3ca710eea16b45276b95987627d77a7a994b977181a49a37a4b162 +size 854500 diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/6063-a69dc3ce01987dba.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/6063-a69dc3ce01987dba.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..56446f559e2436b443ec9fbc1a11bc1545db55c0 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/6063-a69dc3ce01987dba.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6063],{25312:function(e,t,n){var r=n(67294);t.Z=function(e,t,n,u){let o=r.useRef(n),i=r.useRef(u);r.useEffect(()=>{o.current=n,i.current=u}),r.useEffect(()=>{let n=e&&"current"in e?e.current:e;if(!n)return;let r=0;function u(...e){r||o.current.apply(this,e)}n.addEventListener(t,u);let c=i.current;return()=>{r=1,n.removeEventListener(t,u),c&&c()}},[e,t])}},76706:function(e,t,n){n.d(t,{f:function(){return l},z:function(){return c}});var r=n(67294),u=n(65355);let o="undefined"!=typeof performance?performance:Date,i=()=>o.now();function c(e,t=30,n=!1){let o=(0,u.Z)(e),c=1e3/t,l=r.useRef(0),f=r.useRef(),a=()=>f.current&&clearTimeout(f.current),s=[t,n,o];function d(){l.current=0,a()}return r.useEffect(()=>d,s),r.useCallback(function(){let e=arguments,t=i(),r=()=>{l.current=t,a(),o.current.apply(null,e)},u=l.current;if(n&&0===u)return r();if(t-u>c){if(u>0)return r();l.current=t}a(),f.current=setTimeout(()=>{r(),l.current=0},c)},s)}function l(e,t,n){let u=r.useState(e);return[u[0],c(u[1],t,n)]}},65440:function(e,t,n){n.d(t,{iP:function(){return d}});var r=n(67294),u=n(65355);let o=(e,t=100,n=!1)=>{let o=(0,u.Z)(e),i=r.useRef(),c=[t,n,o];function l(){i.current&&clearTimeout(i.current),i.current=void 0}function f(){i.current=void 0}return r.useEffect(()=>l,c),r.useCallback(function(){let e=arguments,{current:r}=i;if(void 0===r&&n)return i.current=setTimeout(f,t),o.current.apply(null,e);r&&clearTimeout(r),i.current=setTimeout(()=>{i.current=void 0,o.current.apply(null,e)},t)},c)},i=(e,t,n)=>{let u=r.useState(e);return[u[0],o(u[1],t,n)]};var c=n(25312);let l={},f="undefined"==typeof window?null:window,a=f&&void 0!==f.visualViewport?f.visualViewport:null,s=()=>[document.documentElement.clientWidth,document.documentElement.clientHeight],d=function(e){void 0===e&&(e=l);let{wait:t,leading:n,initialWidth:r=0,initialHeight:u=0}=e,[o,d]=i("undefined"==typeof document?[r,u]:s,t,n),p=()=>d(s);return(0,c.Z)(f,"resize",p),(0,c.Z)(a,"resize",p),(0,c.Z)(f,"orientationchange",p),o}},23778:function(e,t,n){n.d(t,{q:function(){return o}});var r=n(67294);let u=r["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];function o(e,t){void 0===t&&(t=i);let[n,o]=r.useState({offset:0,width:0});return u(()=>{let{current:t}=e;if(null!==t){let e=0,r=t;do e+=r.offsetTop||0,r=r.offsetParent;while(r);(e!==n.offset||t.offsetWidth!==n.width)&&o({offset:e,width:t.offsetWidth})}},t),n}let i=[]},32754:function(e,t,n){n.d(t,{M:function(){return c}});var r=n(25312),u=n(65355),o=n(76706),i=n(67294);function c(e,t){var n;let{align:c="top",element:f="undefined"!=typeof window&&window,offset:a=0,height:s="undefined"!=typeof window?window.innerHeight:0}=t,d=(0,u.Z)({positioner:e,element:f,align:c,offset:a,height:s}),p=i.useRef(()=>{let e=d.current.element;return e&&"current"in e?e.current:e}).current,[v,h]=i.useReducer((e,t)=>{let n={position:e.position,index:e.index,prevTop:e.prevTop};if("scrollToIndex"===t.type){var r;return{position:d.current.positioner.get(null!==(r=t.value)&&void 0!==r?r:-1),index:t.value,prevTop:void 0}}if("setPosition"===t.type)n.position=t.value;else if("setPrevTop"===t.type)n.prevTop=t.value;else if("reset"===t.type)return l;return n},l),m=(0,o.z)(h,15);(0,r.Z)(p(),"scroll",()=>{if(!v.position&&v.index){let e=d.current.positioner.get(v.index);e&&h({type:"setPosition",value:e})}});let w=void 0!==v.index&&(null===(n=d.current.positioner.get(v.index))||void 0===n?void 0:n.top);return i.useEffect(()=>{let e=p();if(!e)return;let{height:t,align:n,offset:r,positioner:u}=d.current;if(v.position){let u=v.position.top;"bottom"===n?u=u-t+v.position.height:"center"===n&&(u-=(t-v.position.height)/2),e.scrollTo(0,Math.max(0,u+=r));let o=!1,i=setTimeout(()=>!o&&h({type:"reset"}),400);return()=>{o=!0,clearTimeout(i)}}if(void 0!==v.index){let n=u.shortestColumn()/u.size()*v.index;v.prevTop&&(n=Math.max(n,v.prevTop+t)),e.scrollTo(0,n),m({type:"setPrevTop",value:n})}},[w,v,d,p,m]),i.useRef(e=>{h({type:"scrollToIndex",value:e})}).current}let l={index:void 0,position:void 0,prevTop:void 0}},16575:function(e,t,n){n.d(t,{G:function(){return g}});let r="undefined",u=typeof window!==r?window:{},o=typeof performance!==r?performance:Date,i=()=>o.now(),c="AnimationFrame",l="cancel"+c,f="request"+c,a=u[f]&&u[f].bind(u),s=u[l]&&u[l].bind(u);if(!a||!s){let e=0;a=t=>{let n=i(),r=Math.max(e+1e3/60,n);return setTimeout(()=>{t(e=r)},r-n)},s=function(e){return clearTimeout(e)}}let d=e=>{s(e.v||-1)},p=(e,t)=>{let n=i(),r={},u=()=>{i()-n>=t?e.call(null):r.v=a(u)};return r.v=a(u),r};var v=n(76706),h=n(25312);let m="undefined"==typeof window?null:window,w=()=>void 0!==m.scrollY?m.scrollY:void 0===m.pageYOffset?0:m.pageYOffset;var y=(e=30)=>{let t=(0,v.f)("undefined"==typeof window?0:w,e,!0);return(0,h.Z)(m,"scroll",()=>t[1](w())),t[0]},T=n(67294);function g(e,t){void 0===e&&(e=0),void 0===t&&(t=12);let n=y(t),[r,u]=T.useState(!1),o=T.useRef(0);return T.useEffect(()=>{1===o.current&&u(!0);let e=!1,n=p(()=>{e||u(!1)},40+1e3/t);return o.current=1,()=>{e=!0,d(n)}},[t,n]),{scrollTop:Math.max(0,n-e),isScrolling:r}}},39825:function(e,t,n){n.d(t,{Z:function(){return r}});var r=(0,n(21955).Z)("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]])},14613:function(e,t,n){n.d(t,{Z:function(){return r}});var r=(0,n(21955).Z)("outline","message-cancel","IconMessageCancel",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M11.995 18.603l-3.995 2.397v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5",key:"svg-2"}],["path",{d:"M19 19m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}],["path",{d:"M17 21l4 -4",key:"svg-4"}]])},78680:function(e,t,n){n.d(t,{Z:function(){return h}});var r,u,o,i=n(40351),c=function(e,t,n,r){for(var u=-1,o=null==e?0:e.length;++u({opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"}}));function z(e){let{modelId:i,modelVersionId:t,modelName:s,children:l}=e,{currentUserReview:n,loading:a}=(0,f.LS)({modelId:i,modelVersionId:t});return l({userReview:n,modelId:i,modelVersionId:t,modelName:s,loading:a})}function k(e){var i;let{modelVersionId:t,modelName:l,innerRef:r,userReview:c,showReviewedAt:h=!0,opened:m=!1,autoFocus:g=!0}=e,{classes:z,cx:k}=b(),[w,y]=(0,v.useState)(m),{loading:S}=(0,f.LS)({modelVersionId:t}),Z=(0,x.cI)({schema:j,defaultValues:{details:null!==(i=null==c?void 0:c.details)&&void 0!==i?i:""}}),C=(0,f.nO)(),L=e=>{let{rating:i,details:t}=e;c&&C.mutate({id:c.id,rating:i,details:t},{onSuccess:(e,i)=>{i.details&&(R(),Z.reset({details:i.details}))}})},W=e=>{let{details:i}=e;return L({details:i})},R=(0,v.useCallback)(()=>y(e=>!e),[]);(0,v.useEffect)(()=>{var e;Z.reset({details:null!==(e=null==c?void 0:c.details)&&void 0!==e?e:""})},[null==c?void 0:c.details]);let I=!!(null==c?void 0:c.details),{isDirty:M}=Z.formState;return(0,v.useImperativeHandle)(r,()=>({save:()=>{Z.formState.isDirty&&Z.handleSubmit(W)()}})),(0,s.jsxs)(n.K,{spacing:"sm",pos:"relative",children:[(0,s.jsxs)(a.Z,{spacing:8,position:"apart",children:[(0,s.jsx)(d.x,{variant:"link",size:"sm",style:{cursor:"pointer"},onClick:R,children:(0,s.jsxs)(a.Z,{spacing:4,children:[(0,s.jsx)(u.Z,{className:k({[z.opened]:w}),size:20}),(0,s.jsxs)("span",{children:[I?"Edit":"Add"," Review Comments"]})]})}),c&&h&&(0,s.jsxs)(d.x,{color:"dimmed",size:"xs",children:["Reviewed ",(0,s.jsx)(p.i,{date:c.createdAt})]})]}),w&&(0,s.jsx)(x.l0,{form:Z,onSubmit:W,children:(0,s.jsxs)(n.K,{spacing:"xs",children:[(0,s.jsx)(x.zg,{name:"details",placeholder:l?"What did you think of ".concat(null!=l?l:"this resource","?"):"Tell us more about why? What was it good at? Where did it struggle?",maxRows:5,autoFocus:g,autosize:!0}),(0,s.jsxs)(a.Z,{grow:!0,spacing:"xs",children:[(0,s.jsx)(o.z,{size:"xs",variant:"default",onClick:()=>{var e;Z.reset({details:null!==(e=null==c?void 0:c.details)&&void 0!==e?e:""}),R()},children:"Cancel"}),(0,s.jsx)(o.z,{size:"xs",type:"submit",disabled:!M,loading:C.isLoading||S,children:"Post"})]})]})})]})}function w(e){var i;let{modelVersionId:t,modelId:l,userReview:n}=e,d=(0,m.useRouter)(),{loading:o}=(0,f.LS)({modelVersionId:t}),u=(0,x.cI)({schema:j,defaultValues:{details:null!==(i=null==n?void 0:n.details)&&void 0!==i?i:""}}),g=(0,f.nO)(),p=e=>{let{details:i}=e;if(n)return g.mutateAsync({id:n.id,details:i},{onSuccess:(e,i)=>{i.details&&u.reset({details:i.details})}})},b=e=>{let{details:i}=e;return p({details:i})},z=async()=>{await u.handleSubmit(b)(),await d.push("/posts/create?reviewing=true&modelId=".concat(l,"&modelVersionId=").concat(t))};(0,v.useEffect)(()=>{var e;u.reset({details:null!==(e=null==n?void 0:n.details)&&void 0!==e?e:""})},[null==n?void 0:n.details]);let{isDirty:k}=u.formState;return(0,s.jsx)(x.l0,{form:u,onSubmit:b,children:(0,s.jsxs)(a.Z,{spacing:0,align:"flex-end",noWrap:!0,children:[(0,s.jsx)(x.zg,{name:"details",variant:"unstyled",placeholder:"Tell us more about why? What was it good at? Where did it struggle?",maxRows:5,minRows:2,styles:{root:{flex:1},input:{padding:"0 2px !important"}},autoFocus:!0,autosize:!0}),(0,s.jsxs)(a.Z,{spacing:8,noWrap:!0,children:[(0,s.jsx)(r.A,{size:"lg",variant:"light",disabled:g.isLoading,onClick:z,children:(0,s.jsx)(c.Z,{size:16})}),(0,s.jsx)(r.A,{variant:"filled",size:"lg",color:"blue",type:"submit",disabled:!k,loading:g.isLoading||o,children:(0,s.jsx)(h.Z,{size:16})})]})]})})}},2614:function(e,i,t){t.d(i,{_:function(){return m}});var s=t(85893),l=t(56817),n=t(67841),a=t(95117),d=t(71232),o=t(70096),r=t(12260),u=t(88182);t(67614);var c=t(40099);t(72456),t(17578);let h=(0,l.k)(()=>({button:{overflow:"hidden",".mantine-Button-leftIcon":{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)"},"&:last-of-type .mantine-Button-leftIcon":{right:12,left:"auto",marginRight:0},"&[data-loading]::before":{borderRadius:0}}}));function m(e){var i;let{modelId:t,modelVersionId:l,userReview:m,withCount:v,size:g}=e,{classes:p}=h(),{totals:f,loading:x}=(0,r.Pr)({modelId:t,modelVersionId:l},{enabled:v}),{loading:j}=(0,r.LS)({modelVersionId:l}),b=(0,r.UV)(),z=(0,r.nO)(),k=(0,r.VV)(),w=e=>{let{recommended:i}=e;return(null==m?void 0:m.id)?z.mutate({id:m.id,recommended:i,rating:i?5:1}):b.mutate({modelId:t,modelVersionId:l,recommended:i,rating:i?5:1})},y=()=>{m&&k.mutate({id:m.id})},S=(null==m?void 0:m.recommended)===!0,Z=(null==m?void 0:m.recommended)===!1,C=b.isLoading||z.isLoading||k.isLoading,L=x||j||C;return(0,s.jsxs)(n.z.Group,{style:{gap:4},children:[(0,s.jsx)(o.b,{reason:"create-review",children:(0,s.jsx)(n.z,{variant:S?"light":"filled",color:S?"success":"dark.4",radius:"md",disabled:L,onClick:()=>S?y():w({recommended:!0}),className:p.button,size:g,fullWidth:!0,children:(0,s.jsx)(a.x,{color:"success.5",size:"xs",inline:!0,children:(0,s.jsxs)(d.Z,{spacing:4,noWrap:!0,children:[(0,s.jsx)(c.l,{size:20,filled:S})," ",v&&!x&&(0,u.dm)(null!==(i=null==f?void 0:f.up)&&void 0!==i?i:0)]})})})}),(0,s.jsx)(o.b,{reason:"create-review",children:(0,s.jsx)(n.z,{variant:Z?"light":"filled",color:Z?"red":"dark.4",radius:"md",disabled:L,onClick:()=>Z?y():w({recommended:!1}),className:p.button,size:g,fullWidth:!0,children:(0,s.jsx)(a.x,{color:"red",inline:!0,children:(0,s.jsx)(c.k,{size:20,filled:Z})})})})]})}},76382:function(e,i,t){t.d(i,{Z:function(){return s}});var s=(0,t(21955).Z)("outline","photo-plus","IconPhotoPlus",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l4 4",key:"svg-2"}],["path",{d:"M14 14l1 -1c.67 -.644 1.45 -.824 2.182 -.54",key:"svg-3"}],["path",{d:"M16 19h6",key:"svg-4"}],["path",{d:"M19 16v6",key:"svg-5"}]])}}]); +//# sourceMappingURL=622-cb7a919e461e43c4.js.map \ No newline at end of file diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/9248e9e33353c342.css b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/9248e9e33353c342.css new file mode 100644 index 0000000000000000000000000000000000000000..ee319bee22384f54c64431cfd5b1d7d3b463fe47 --- /dev/null +++ b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/9248e9e33353c342.css @@ -0,0 +1,3 @@ +.VimeoEmbed_vimeoWrapper__B_7LR{background:#000}.VimeoEmbed_vimeoWrapper__B_7LR iframe{height:100%;left:0;position:absolute;top:0;width:100%}.VimeoEmbed_vimeoWrapper__B_7LR iframe body{background:#000}.EdgeImage_image__iH4_q{height:auto;width:100%}.EdgeImage_loadError__2xPd8{background:rgba(255,0,0,.35);opacity:1}.EdgeImage_fadeIn__3cojs{opacity:0;transition:transform .4s ease}.ImageGuard_root__I2zH8{background-color:rgba(25,113,194,.2);color:#fefefe;padding-left:8px;padding-right:8px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ImageGuard_root__I2zH8>span{line-height:1}.ImageGuard_red__fOCqH{background-color:rgba(201,42,42,.6)}.CosmeticWrapper_wrapper__kH8WX{border-radius:8px;display:flex;flex-direction:column;position:relative}.CosmeticWrapper_wrapper__kH8WX>*{flex:1}.CosmeticWrapper_border__GnCwn{border:var(--borderWidth) solid var(--border)}.CosmeticWrapper_cssFrame__Lrn6N,.CosmeticWrapper_texture__cRC58{padding:6px}.CosmeticWrapper_cssFrame__Lrn6N{background-image:var(--bgGradient);box-shadow:inset 0 0 1px 1px hsla(0,0%,100%,.3),0 1px 2px rgba(0,0,0,.8)}.CosmeticWrapper_cssFrame__Lrn6N:after{border-radius:6px;box-shadow:inset 0 1px 2px 1px hsla(0,0%,100%,.3),0 1px 2px rgba(0,0,0,.4);content:"";inset:6px;pointer-events:none;position:absolute}.CosmeticWrapper_texture__cRC58{background-image:var(--bgImage);background-size:var(--bgSize)}.CosmeticWrapper_cssFrame__Lrn6N.CosmeticWrapper_texture__cRC58{background-image:var(--bgImage),var(--bgGradient)}.CosmeticWrapper_glow__KJ57U:before{background-image:var(--bgGradient);border-radius:8px;content:"";filter:blur(5px);inset:0;position:absolute}.CosmeticLights_light__Bsu6g{bottom:15px;left:-2px;pointer-events:none;position:absolute;right:-2px;top:15px;z-index:10}.CosmeticLights_light__Bsu6g span{box-shadow:inset 0 0 1px 1px rgba(0,0,0,.3);height:14px;position:absolute;width:18px}.CosmeticLights_light__Bsu6g span:before{content:"";filter:blur(3px);height:21px;opacity:.5;position:absolute;top:50%;transform:translateY(-50%);width:21px;will-change:width,opacity;z-index:-1}.CosmeticLights_light__Bsu6g span:nth-child(odd),.CosmeticLights_light__Bsu6g span:nth-child(odd):before{border-radius:6px 50% 50% 6px;left:0}.CosmeticLights_light__Bsu6g span:nth-child(2n),.CosmeticLights_light__Bsu6g span:nth-child(2n):before{border-radius:50% 6px 6px 50%;right:0}.CosmeticLights_light__Bsu6g span:first-child{top:0}.CosmeticLights_light__Bsu6g span:nth-child(2){top:8.33333%}.CosmeticLights_light__Bsu6g span:nth-child(3){top:16.66667%}.CosmeticLights_light__Bsu6g span:nth-child(4){top:25%}.CosmeticLights_light__Bsu6g span:nth-child(5){top:33.33333%}.CosmeticLights_light__Bsu6g span:nth-child(6){top:41.66667%}.CosmeticLights_light__Bsu6g span:nth-child(7){top:50%}.CosmeticLights_light__Bsu6g span:nth-child(8){top:58.33333%}.CosmeticLights_light__Bsu6g span:nth-child(9){top:66.66667%}.CosmeticLights_light__Bsu6g span:nth-child(10){top:75%}.CosmeticLights_light__Bsu6g span:nth-child(11){top:83.33333%}.CosmeticLights_light__Bsu6g span:nth-child(12){top:91.66667%}.CosmeticLights_light__Bsu6g.CosmeticLights_red__B0AgU span{background:red}.CosmeticLights_light__Bsu6g.CosmeticLights_red__B0AgU span:before{background:#c00}.CosmeticLights_light__Bsu6g.CosmeticLights_green__mLmRu span,.CosmeticLights_light__Bsu6g.CosmeticLights_green__mLmRu span:before{background:lime}.CosmeticLights_light__Bsu6g.CosmeticLights_blue__JfUiw span{background:#00c8ff}.CosmeticLights_light__Bsu6g.CosmeticLights_blue__JfUiw span:before{background:#00a0cc}.CosmeticLights_light__Bsu6g.CosmeticLights_yellow__xgHhY span,.CosmeticLights_light__Bsu6g.CosmeticLights_yellow__xgHhY span:before{background:#ff0}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-100__OaySp span:before{animation:CosmeticLights_flicker-100__UcHl7 1s ease infinite alternate}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-75__A1sPl span:before{animation:CosmeticLights_flicker-75__b_KbQ 1.25s ease infinite alternate}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-50__xBhRX span.CosmeticLights_yellow__xgHhY span{background:#e6e600}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-50__xBhRX span.CosmeticLights_red__B0AgU span{background:#e60000}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-50__xBhRX span.CosmeticLights_green__mLmRu span{background:#00e600}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-50__xBhRX span.CosmeticLights_blue__JfUiw span{background:#00b4e6}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-50__xBhRX span:before{animation:CosmeticLights_flicker-50__BEQxs 1.5s ease infinite alternate}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-25__7rR0x.CosmeticLights_yellow__xgHhY span{background:#cc0}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-25__7rR0x.CosmeticLights_red__B0AgU span{background:#c00}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-25__7rR0x.CosmeticLights_green__mLmRu span{background:#0c0}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-25__7rR0x.CosmeticLights_blue__JfUiw span{background:#00a0cc}.CosmeticLights_light__Bsu6g.CosmeticLights_brightness-25__7rR0x span:before{animation:CosmeticLights_flicker-25__YSqal 2s ease infinite alternate}@keyframes CosmeticLights_flicker-100__UcHl7{0%{opacity:.25;width:21px}to{opacity:.6;width:30px}}@keyframes CosmeticLights_flicker-75__b_KbQ{0%{opacity:.15;width:21px}to{opacity:.4;width:27px}}@keyframes CosmeticLights_flicker-50__BEQxs{0%{opacity:.05;width:21px}to{opacity:.3;width:25.5px}}@keyframes CosmeticLights_flicker-25__YSqal{0%{opacity:.05;width:21px}to{opacity:.2;width:24px}}.OnsiteIndicatore_indicator__0_Pxj{border-color:transparent transparent #fab005;border-style:solid;border-width:0 0 15px 15px;bottom:0;height:0;opacity:.5;position:absolute;right:0;width:0;z-index:10}.OnsiteIndicatore_indicator__0_Pxj>svg{display:none}.OnsiteIndicatore_indicator__0_Pxj:hover{border-width:0 0 25px 25px;opacity:1}.OnsiteIndicatore_indicator__0_Pxj:hover>svg{color:#fefefe;display:block;left:50%;position:absolute;top:50%;transform:translate(-100%,65%)}.OnsiteIndicatore_indicator__0_Pxj.OnsiteIndicatore_remix__l6jqm{border-color:transparent transparent #82c91e}.AspectRatioImageCard_content__IGj_A{color:#fefefe;display:flex;flex:1;height:100%;opacity:0;transition:opacity .2s ease}.AspectRatioImageCard_content__IGj_A:hover .AspectRatioImageCard_image__1xNTQ{transform:scale(1.05) rotate(.02deg)}.AspectRatioImageCard_content__IGj_A.AspectRatioImageCard_inView__UwqN_{opacity:1}.AspectRatioImageCard_linkOrClick__d_K_4{display:flex;flex:1;flex-direction:column}.AspectRatioImageCard_image__1xNTQ{flex:1;height:100%;min-width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:top;object-position:top;transition:transform .4s ease}.AspectRatioImageCard_image__1xNTQ .AspectRatioImageCard_top__JUBpc{-o-object-position:top center;object-position:top center}.AspectRatioImageCard_footer__FOU7a,.AspectRatioImageCard_header__Mmd__{display:flex;gap:.25rem;left:0;padding:.5rem;pointer-events:none;position:absolute;width:100%}.AspectRatioImageCard_header__Mmd__{top:0}.AspectRatioImageCard_footer__FOU7a{bottom:0}.AspectRatioImageCard_footer__FOU7a.AspectRatioImageCard_gradient__NApn_{background:linear-gradient(transparent,rgba(0,0,0,.6))}.AspectRatioImageCard_chip__Ht5bv{border-radius:.75rem;height:26px;overflow:unset;pointer-events:auto}.UserAvatarSimple_username__1HunV{filter:drop-shadow(1px 1px 1px rgba(0,0,0,.2));vertical-align:middle}.dark .UserAvatarSimple_username__1HunV{filter:drop-shadow(1px 1px 1px rgba(0,0,0,.8))}.Logo_logo__5xyYV{height:30px;position:relative}@container (max-width: 768px){.Logo_logo__5xyYV{height:45px;width:45px}}.Logo_svg__0CcnB{height:100%;position:relative}.Logo_c__5WyIP,.Logo_ivit__SHcJ3{fill:#222}.Logo_accent__l3oG0,.Logo_ai__HJ7wY{fill:#1971c2}.Logo_flyOver__9JjqA{height:45px;position:absolute}@container (max-width: 768px){.Logo_flyOver__9JjqA{height:40px}}.Logo_liveNow__p9O6E{background:#f1f3f5;bottom:-13px;left:50%;position:absolute;transform:translateX(-50%);z-index:3}@container (max-width: 768px){.Logo_liveNow__p9O6E{bottom:-7px}}.dark .Logo_c__5WyIP,.dark .Logo_ivit__SHcJ3{fill:#c1c2c5}.dark .Logo_liveNow__p9O6E{background:#141517}.green .Logo_accent__l3oG0,.green .Logo_ai__HJ7wY{fill:#2f9e44}@keyframes Logo_prance__d9Qqm{0%{left:-20%;opacity:0;top:0;transform:scale(.5) rotate(-15deg)}15%{left:0;opacity:1;top:-25px;transform:scale(1) rotate(-15deg)}50%{left:30%;opacity:1;top:-40px;transform:scale(1) rotate(0deg)}85%{left:70%;opacity:.8;top:-25px;transform:scale(1) rotate(15deg)}to{left:80%;opacity:0;top:0;transform:scale(.5) rotate(15deg)}}@keyframes Logo_peekOutDeer__WFFSE{0%{opacity:0;right:0;top:0;transform:scale(.5)}60%{opacity:1;right:-12px;top:-10px;transform:scale(1)}to{opacity:0;right:0;top:0;transform:scale(.5)}}@keyframes Logo_twinkle__jgHh0{0%{opacity:0}50%{opacity:1}to{opacity:0}}.Logo_christmas__YzSP5 .Logo_accent__l3oG0,.Logo_christmas__YzSP5 .Logo_ai__HJ7wY{fill:#e03131}.Logo_christmas__YzSP5 .Logo_svg__0CcnB{z-index:2}.Logo_christmas__YzSP5 .Logo_hat__9NNFq{height:25px;left:0;position:absolute;top:0;transform:rotate(-20deg) translate(-14%,-75%);z-index:3}@container (max-width: 768px){.Logo_christmas__YzSP5 .Logo_hat__9NNFq{display:none}}.Logo_christmas__YzSP5 .Logo_deer__3KGYX{animation:Logo_prance__d9Qqm 3s linear 4s;height:60px;opacity:0;position:absolute;width:60px;z-index:3}@container (max-width: 768px){.Logo_christmas__YzSP5 .Logo_deer__3KGYX{animation:Logo_peekOutDeer__WFFSE 5s ease infinite alternate;transform:rotate(-20deg);z-index:1}}.Logo_christmas__YzSP5 .Logo_deer__3KGYX img{height:100%;position:absolute}.Logo_christmas__YzSP5 .Logo_nose__SRCTr{z-index:2}.Logo_christmas__YzSP5 .Logo_glow__VVZge{animation:Logo_twinkle__jgHh0 1s ease infinite;opacity:0;z-index:1}@keyframes Logo_flyOver__9JjqA{0%{left:-10%;opacity:0;top:5px;transform:scale(.5) rotate(0deg)}15%{left:5%;opacity:1;top:-10px;transform:scale(1) rotate(2deg)}30%{left:70%;opacity:.8;top:0;transform:scale(1) rotate(15deg)}40%,to{left:70%;opacity:0;top:-5px;transform:scale(.5) rotate(-10deg)}}@keyframes Logo_peekOut__sb6je{0%{opacity:0;right:10px;top:5px;transform:scale(.5) rotate(0deg)}30%{opacity:1;right:-12px;top:-12px;transform:scale(1) rotate(40deg)}60%{opacity:1;right:-12px;top:-12px;transform:scale(1) rotate(40deg)}to{opacity:0;right:10px;top:5px;transform:scale(.5) rotate(0deg)}}.Logo_halloween__ZtZDt .Logo_flyOver__9JjqA{animation:Logo_flyOver__9JjqA 8s ease 4s;opacity:0;z-index:3}@container (max-width: 768px){.Logo_halloween__ZtZDt .Logo_flyOver__9JjqA{animation:Logo_peekOut__sb6je 5s ease infinite alternate;transform:rotate(20deg);z-index:1}}.Logo_halloween__ZtZDt .Logo_accent__l3oG0,.Logo_halloween__ZtZDt .Logo_ai__HJ7wY{fill:#fd7e14}.Logo_halloween__ZtZDt .Logo_svg__0CcnB{z-index:2}.Logo_stpatty__i9E77 .Logo_accent__l3oG0,.Logo_stpatty__i9E77 .Logo_ai__HJ7wY{fill:#2f9e44}.Logo_pride__hBnV1 .Logo_accent__l3oG0,.Logo_pride__hBnV1 .Logo_ai__HJ7wY{fill:url(#prideGradient)}.Burger_root__0ZjJO{align-items:center;border-radius:.125rem;cursor:pointer;display:flex;height:28px;padding:5px;width:28px}.dark .Burger_burger__oacyO,.dark .Burger_burger__oacyO:after,.dark .Burger_burger__oacyO:before{background-color:#fefefe}.Burger_burger__oacyO{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Burger_burger__oacyO,.Burger_burger__oacyO:after,.Burger_burger__oacyO:before{background-color:#222;display:block;height:2px;outline:1px solid transparent;transition-duration:.3s;transition-property:background-color,transform;width:18px}@media(prefers-reduced-motion){.Burger_burger__oacyO,.Burger_burger__oacyO:after,.Burger_burger__oacyO:before{transition-duration:0}}.Burger_burger__oacyO:after,.Burger_burger__oacyO:before{content:"";left:0;position:absolute}.Burger_burger__oacyO:before{top:-6px}.Burger_burger__oacyO:after{top:6px}.Burger_burger__oacyO[data-opened]{background-color:transparent}.Burger_burger__oacyO[data-opened]:before{transform:translateY(6px) rotate(45deg)}.Burger_burger__oacyO[data-opened]:after{transform:translateY(-6px) rotate(-45deg)}.ToolFiltersDropdown_label__cZmXo{font-size:12px;font-weight:600}.ToolFiltersDropdown_label__cZmXo[data-checked]{border:1px solid #228be6;color:#222}.ToolFiltersDropdown_label__cZmXo[data-variant=filled]{background-color:transparent}.dark .ToolFiltersDropdown_label__cZmXo[data-checked]{border:1px solid #1971c2;color:#fefefe}.ResizeableSidebar_sidebar__4diku{align-items:stretch;display:flex;height:100%;overflow-x:visible;position:relative}.ResizeableSidebar_resizer__p48VS{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:100}.ResizeableSidebar_resizer__p48VS:active,.ResizeableSidebar_resizer__p48VS:hover{background-color:#228be6}.ResizeableSidebar_content__PfNTD{border-color:#e9ecef;container-name:sidebar;container-type:inline-size;flex:1}.ResizeableSidebar_left__nk1Ld .ResizeableSidebar_resizer__p48VS{left:-2px}.ResizeableSidebar_left__nk1Ld .ResizeableSidebar_content__PfNTD{border-left:1px solid}.ResizeableSidebar_right__9FLVC .ResizeableSidebar_resizer__p48VS{right:-2px}.ResizeableSidebar_right__9FLVC .ResizeableSidebar_content__PfNTD{border-right:1px solid}.dark .ResizeableSidebar_resizer__p48VS:active,.dark .ResizeableSidebar_resizer__p48VS:hover{background-color:#1971c2}.dark .ResizeableSidebar_content__PfNTD{border-color:#2c2e33}:root{--header-height:60px;--footer-height:45px}@layer tailwind{ + /*! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}:is(.-rotate-90),:is(.-translate-x-1\/2),:is(.-translate-y-1\/2),:is(.-translate-y-\[60\%\]),:is(.\@max-md\:translate-y-\[calc\(100\%-60px\)\]),:is(.absolute-center),:is(.rotate-180),:is(.transform){--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}:is(.dark\:from-dark-7:where(.dark,.dark *)),:is(.from-black),:is(.from-white\/50){--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: }:is(.tabular-nums){--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: }:is(.card),:is(.shadow),:is(.shadow-2xl),:is(.shadow-\[0_0_4px_1px\]),:is(.shadow-\[0_0_7px_3px\]),:is(.shadow-\[inset_0_0_2px_1px_rgba\(255\2c 255\2c 255\2c 0\.2\)\]),:is(.shadow-lg),:is(.shadow-sm),:is(.shadow-xl){--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}:is(.\[\&\:not\(\[data-focus\]\)\]\:\[\&\:not\(\[data-checked\]\)\]\:ring-inset:not([data-checked]):not([data-focus])),:is(.data-\[checked\]\:ring-0[data-checked]),:is(.data-\[focus\]\:data-\[checked\]\:ring-2[data-checked][data-focus]),:is(.data-\[focus\]\:ring-2[data-focus]),:is(.ring-1),:is(.ring-inset){--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}:is(.blur),:is(.drop-shadow),:is(.filter),:is(.grayscale){--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }}.\!container{margin-left:auto!important;margin-right:auto!important;padding-left:1rem!important;padding-right:1rem!important;width:100%!important}.container{margin-left:auto;margin-right:auto;padding-left:1rem;padding-right:1rem;width:100%}@media (min-width:576px){.\!container{max-width:576px!important}.container{max-width:576px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:992px){.\!container{max-width:992px!important}.container{max-width:992px}}@media (min-width:1200px){.\!container{max-width:1200px!important}.container{max-width:1200px}}@media (min-width:1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}body :is(.pointer-events-none){pointer-events:none}body :is(.pointer-events-auto){pointer-events:auto}body :is(.\!visible){visibility:visible!important}body :is(.visible){visibility:visible}body :is(.invisible){visibility:hidden}body :is(.static){position:static}body :is(.fixed){position:fixed}body :is(.absolute){position:absolute}body :is(.relative){position:relative}body :is(.sticky){position:sticky}body :is(.inset-0){inset:0}body :is(.inset-x-0){left:0;right:0}body :is(.inset-y-0){bottom:0;top:0}body :is(.-right-2){right:-.5rem}body :is(.-right-2\.5){right:-.625rem}body :is(.-top-2){top:-.5rem}body :is(.-top-2\.5){top:-.625rem}body :is(.bottom-0){bottom:0}body :is(.bottom-0\.5){bottom:.125rem}body :is(.bottom-1){bottom:.25rem}body :is(.bottom-2){bottom:.5rem}body :is(.bottom-\[var\(--footer-height\)\]){bottom:var(--footer-height)}body :is(.bottom-full){bottom:100%}body :is(.left-0){left:0}body :is(.left-1){left:.25rem}body :is(.left-1\/2){left:50%}body :is(.left-2){left:.5rem}body :is(.left-3){left:.75rem}body :is(.right-0){right:0}body :is(.right-0\.5){right:.125rem}body :is(.right-1){right:.25rem}body :is(.right-10){right:2.5rem}body :is(.right-2){right:.5rem}body :is(.right-3){right:.75rem}body :is(.right-9){right:2.25rem}body :is(.top-0){top:0}body :is(.top-1\/2){top:50%}body :is(.top-2){top:.5rem}body :is(.top-2\.5){top:.625rem}body :is(.top-3){top:.75rem}body :is(.top-\[-48px\]){top:-48px}body :is(.z-10){z-index:10}body :is(.z-20){z-index:20}body :is(.z-30){z-index:30}body :is(.z-50){z-index:50}body :is(.z-\[1\]){z-index:1}body :is(.z-\[210\]){z-index:210}body :is(.z-\[2\]){z-index:2}body :is(.z-\[500\]){z-index:500}body :is(.order-last){order:9999}body :is(.col-start-1){grid-column-start:1}body :is(.row-start-1){grid-row-start:1}body :is(.-m-2){margin:-.5rem}body :is(.m-0){margin:0}body :is(.m-0\.5){margin:.125rem}body :is(.m-1){margin:.25rem}body :is(.m-2){margin:.5rem}body :is(.m-3){margin:.75rem}body :is(.-mx-1){margin-left:-.25rem;margin-right:-.25rem}body :is(.-mx-3){margin-left:-.75rem;margin-right:-.75rem}body :is(.-my-2){margin-bottom:-.5rem;margin-top:-.5rem}body :is(.mx-3){margin-left:.75rem;margin-right:.75rem}body :is(.mx-auto){margin-left:auto;margin-right:auto}body :is(.my-1){margin-bottom:.25rem;margin-top:.25rem}body :is(.my-2){margin-bottom:.5rem;margin-top:.5rem}body :is(.my-3){margin-bottom:.75rem;margin-top:.75rem}body :is(.-mb-1){margin-bottom:-.25rem}body :is(.-ml-2){margin-left:-.5rem}body :is(.-mr-3){margin-right:-.75rem}body :is(.-mt-2){margin-top:-.5rem}body :is(.-mt-3){margin-top:-.75rem}body :is(.-mt-4){margin-top:-1rem}body :is(.-mt-6){margin-top:-1.5rem}body :is(.mb-1){margin-bottom:.25rem}body :is(.mb-2){margin-bottom:.5rem}body :is(.mb-3){margin-bottom:.75rem}body :is(.mb-4){margin-bottom:1rem}body :is(.mb-5){margin-bottom:1.25rem}body :is(.ml-1){margin-left:.25rem}body :is(.ml-2){margin-left:.5rem}body :is(.ml-3){margin-left:.75rem}body :is(.ml-auto){margin-left:auto}body :is(.mr-1){margin-right:.25rem}body :is(.mt-1){margin-top:.25rem}body :is(.mt-1\.5){margin-top:.375rem}body :is(.mt-2){margin-top:.5rem}body :is(.mt-3){margin-top:.75rem}body :is(.mt-4){margin-top:1rem}body :is(.mt-5){margin-top:1.25rem}body :is(.mt-6){margin-top:1.5rem}body :is(.mt-auto){margin-top:auto}body :is(.box-content){box-sizing:content-box}body :is(.line-clamp-3){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3}body :is(.block){display:block}body :is(.inline-block){display:inline-block}body :is(.inline){display:inline}body :is(.flex){display:flex}body :is(.inline-flex){display:inline-flex}body :is(.\!table){display:table!important}body :is(.table){display:table}body :is(.grid){display:grid}body :is(.contents){display:contents}body :is(.\!hidden){display:none!important}body :is(.hidden){display:none}body :is(.aspect-square){aspect-ratio:1/1}body :is(.aspect-video){aspect-ratio:16/9}body :is(.size-1){height:.25rem;width:.25rem}body :is(.size-10){height:2.5rem;width:2.5rem}body :is(.size-16){height:4rem;width:4rem}body :is(.size-24){height:6rem;width:6rem}body :is(.size-3){height:.75rem;width:.75rem}body :is(.size-5){height:1.25rem;width:1.25rem}body :is(.size-8){height:2rem;width:2rem}body :is(.size-9){height:2.25rem;width:2.25rem}body :is(.size-\[120px\]){height:120px;width:120px}body :is(.size-auto){height:auto;width:auto}body :is(.size-full){height:100%;width:100%}body :is(.h-1){height:.25rem}body :is(.h-12){height:3rem}body :is(.h-2){height:.5rem}body :is(.h-2\.5){height:.625rem}body :is(.h-28){height:7rem}body :is(.h-3){height:.75rem}body :is(.h-44){height:11rem}body :is(.h-48){height:12rem}body :is(.h-72){height:18rem}body :is(.h-8){height:2rem}body :is(.h-9){height:2.25rem}body :is(.h-\[150px\]){height:150px}body :is(.h-\[210px\]){height:210px}body :is(.h-\[58px\]){height:58px}body :is(.h-\[var\(--footer-height\)\]){height:var(--footer-height)}body :is(.h-auto){height:auto}body :is(.h-dvh){height:100dvh}body :is(.h-full){height:100%}body :is(.max-h-56){max-height:14rem}body :is(.max-h-full){max-height:100%}body :is(.min-h-0){min-height:0}body :is(.min-h-28){min-height:7rem}body :is(.min-h-40){min-height:10rem}body :is(.min-h-8){min-height:2rem}body :is(.min-h-\[200\]){min-height:200}body :is(.min-h-full){min-height:100%}body :is(.\!w-full){width:100%!important}body :is(.w-1\/2){width:50%}body :is(.w-20){width:5rem}body :is(.w-24){width:6rem}body :is(.w-32){width:8rem}body :is(.w-40){width:10rem}body :is(.w-52){width:13rem}body :is(.w-56){width:14rem}body :is(.w-64){width:16rem}body :is(.w-80){width:20rem}body :is(.w-9){width:2.25rem}body :is(.w-96){width:24rem}body :is(.w-\[100px\]){width:100px}body :is(.w-\[320px\]){width:320px}body :is(.w-\[336px\]){width:336px}body :is(.w-\[calc\(100\%-1rem\)\]){width:calc(100% - 1rem)}body :is(.w-\[var\(--button-width\)\]){width:var(--button-width)}body :is(.w-auto){width:auto}body :is(.w-full){width:100%}body :is(.w-screen){width:100vw}body :is(.min-w-0){min-width:0}body :is(.min-w-80){min-width:20rem}body :is(.min-w-9){min-width:2.25rem}body :is(.min-w-\[32px\]){min-width:32px}body :is(.min-w-\[60px\]){min-width:60px}body :is(.max-w-0){max-width:0}body :is(.max-w-16){max-width:4rem}body :is(.max-w-24){max-width:6rem}body :is(.max-w-6){max-width:1.5rem}body :is(.max-w-80){max-width:20rem}body :is(.max-w-\[400px\]){max-width:400px}body :is(.max-w-\[450px\]){max-width:450px}body :is(.max-w-\[728px\]){max-width:728px}body :is(.max-w-full){max-width:100%}body :is(.max-w-lg){max-width:1200px}body :is(.max-w-md){max-width:992px}body :is(.max-w-sm){max-width:768px}body :is(.max-w-xs){max-width:576px}body :is(.flex-1){flex:1 1 0%}body :is(.flex-\[0\]){flex:0}body :is(.flex-auto){flex:1 1 auto}body :is(.flex-none){flex:none}body :is(.shrink-0){flex-shrink:0}body :is(.grow){flex-grow:1}body :is(.grow-0){flex-grow:0}body :is(.basis-20){flex-basis:5rem}body :is(.-translate-x-1\/2){--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.-translate-y-1\/2){--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.-translate-y-\[60\%\]){--tw-translate-y:-60%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.-rotate-90){--tw-rotate:-90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.rotate-180){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.transform-none){transform:none}@keyframes pulse{50%{opacity:.5}}body :is(.animate-pulse){animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}body :is(.animate-spin){animation:spin 1s linear infinite}@keyframes wiggle{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}body :is(.animate-wiggle){animation:wiggle 1s ease-in-out infinite}body :is(.cursor-auto){cursor:auto}body :is(.cursor-default){cursor:default}body :is(.cursor-help){cursor:help}body :is(.cursor-not-allowed){cursor:not-allowed}body :is(.cursor-pointer){cursor:pointer}body :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}body :is(.resize){resize:both}body :is(.list-inside){list-style-position:inside}body :is(.list-none){list-style-type:none}body :is(.grid-cols-1){grid-template-columns:repeat(1,minmax(0,1fr))}body :is(.grid-cols-2){grid-template-columns:repeat(2,minmax(0,1fr))}body :is(.grid-cols-3){grid-template-columns:repeat(3,minmax(0,1fr))}body :is(.grid-cols-4){grid-template-columns:repeat(4,minmax(0,1fr))}body :is(.flex-row){flex-direction:row}body :is(.flex-row-reverse){flex-direction:row-reverse}body :is(.flex-col){flex-direction:column}body :is(.flex-wrap){flex-wrap:wrap}body :is(.flex-nowrap){flex-wrap:nowrap}body :is(.items-start){align-items:flex-start}body :is(.items-end){align-items:flex-end}body :is(.items-center){align-items:center}body :is(.items-stretch){align-items:stretch}body :is(.\!justify-start){justify-content:flex-start!important}body :is(.justify-start){justify-content:flex-start}body :is(.justify-end){justify-content:flex-end}body :is(.justify-center){justify-content:center}body :is(.justify-between){justify-content:space-between}body :is(.justify-stretch){justify-content:stretch}body :is(.gap-0){gap:0}body :is(.gap-0\.5){gap:.125rem}body :is(.gap-1){gap:.25rem}body :is(.gap-1\.5){gap:.375rem}body :is(.gap-2){gap:.5rem}body :is(.gap-2\.5){gap:.625rem}body :is(.gap-3){gap:.75rem}body :is(.gap-4){gap:1rem}body :is(.gap-6){gap:1.5rem}body :is(.gap-8){gap:2rem}body :is(.self-end){align-self:flex-end}body :is(.self-center){align-self:center}body :is(.justify-self-end){justify-self:end}body :is(.overflow-auto){overflow:auto}body :is(.overflow-hidden){overflow:hidden}body :is(.\!overflow-visible){overflow:visible!important}body :is(.overflow-visible){overflow:visible}body :is(.overflow-x-auto){overflow-x:auto}body :is(.overflow-y-auto){overflow-y:auto}body :is(.overflow-x-hidden){overflow-x:hidden}body :is(.overflow-y-hidden){overflow-y:hidden}body :is(.truncate){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body :is(.text-nowrap){text-wrap:nowrap}body :is(.break-all){word-break:break-all}body :is(.rounded){border-radius:.25rem}body :is(.rounded-3xl){border-radius:1.5rem}body :is(.rounded-\[16px\]){border-radius:16px}body :is(.rounded-\[20px\]){border-radius:20px}body :is(.rounded-\[4px\]){border-radius:4px}body :is(.rounded-full){border-radius:9999px}body :is(.rounded-lg){border-radius:.5rem}body :is(.rounded-md){border-radius:.375rem}body :is(.rounded-none){border-radius:0}body :is(.rounded-xl){border-radius:.75rem}body :is(.rounded-b-lg){border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}body :is(.rounded-l-md){border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}body :is(.rounded-t-lg){border-top-left-radius:.5rem;border-top-right-radius:.5rem}body :is(.rounded-tl-lg){border-top-left-radius:.5rem}body :is(.rounded-tl-md){border-top-left-radius:.375rem}body :is(.rounded-tl-none){border-top-left-radius:0}body :is(.\!border){border-width:1px!important}body :is(.border){border-width:1px}body :is(.border-2){border-width:2px}body :is(.border-4){border-width:4px}body :is(.border-\[3px\]){border-width:3px}body :is(.border-b-0){border-bottom-width:0}body :is(.border-b-\[3px\]){border-bottom-width:3px}body :is(.border-l){border-left-width:1px}body :is(.border-r){border-right-width:1px}body :is(.border-t){border-top-width:1px}body :is(.border-t-\[3px\]){border-top-width:3px}body :is(.border-solid){border-style:solid}body :is(.border-dashed){border-style:dashed}body :is(.border-none){border-style:none}body :is(.\!border-green-6){--tw-border-opacity:1!important;border-color:rgb(64 192 87/var(--tw-border-opacity))!important}body :is(.\!border-yellow-6){--tw-border-opacity:1!important;border-color:rgb(250 176 5/var(--tw-border-opacity))!important}body :is(.border-blue-5){--tw-border-opacity:1;border-color:rgb(51 154 240/var(--tw-border-opacity))}body :is(.border-blue-8\/30){border-color:rgba(25,113,194,.3)}body :is(.border-dark-4){--tw-border-opacity:1;border-color:rgb(55 58 64/var(--tw-border-opacity))}body :is(.border-gray-1){--tw-border-opacity:1;border-color:rgb(241 243 245/var(--tw-border-opacity))}body :is(.border-gray-2){--tw-border-opacity:1;border-color:rgb(233 236 239/var(--tw-border-opacity))}body :is(.border-gray-3){--tw-border-opacity:1;border-color:rgb(222 226 230/var(--tw-border-opacity))}body :is(.border-gray-4){--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}body :is(.border-gray-400){--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}body :is(.border-green-8){--tw-border-opacity:1;border-color:rgb(47 158 68/var(--tw-border-opacity))}body :is(.border-red-500){--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}body :is(.border-red-6){--tw-border-opacity:1;border-color:rgb(250 82 82/var(--tw-border-opacity))}body :is(.border-yellow-6){--tw-border-opacity:1;border-color:rgb(250 176 5/var(--tw-border-opacity))}body :is(.bg-\[\#2F2F2F\]){--tw-bg-opacity:1;background-color:rgb(47 47 47/var(--tw-bg-opacity))}body :is(.bg-black){--tw-bg-opacity:1;background-color:rgb(34 34 34/var(--tw-bg-opacity))}body :is(.bg-blue-6){--tw-bg-opacity:1;background-color:rgb(34 139 230/var(--tw-bg-opacity))}body :is(.bg-dark-1){--tw-bg-opacity:1;background-color:rgb(166 167 171/var(--tw-bg-opacity))}body :is(.bg-dark-4){--tw-bg-opacity:1;background-color:rgb(55 58 64/var(--tw-bg-opacity))}body :is(.bg-dark-6){--tw-bg-opacity:1;background-color:rgb(37 38 43/var(--tw-bg-opacity))}body :is(.bg-dark-7){--tw-bg-opacity:1;background-color:rgb(26 27 30/var(--tw-bg-opacity))}body :is(.bg-gray-0){--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity))}body :is(.bg-gray-0\/50){background-color:rgba(248,249,250,.5)}body :is(.bg-gray-1){--tw-bg-opacity:1;background-color:rgb(241 243 245/var(--tw-bg-opacity))}body :is(.bg-gray-100){--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}body :is(.bg-gray-2){--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity))}body :is(.bg-gray-200){--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}body :is(.bg-gray-4){--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity))}body :is(.bg-gray-8){--tw-bg-opacity:1;background-color:rgb(52 58 64/var(--tw-bg-opacity))}body :is(.bg-green-400){--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}body :is(.bg-orange-400){--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}body :is(.bg-red-400){--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}body :is(.bg-white){--tw-bg-opacity:1;background-color:rgb(254 254 254/var(--tw-bg-opacity))}body :is(.bg-white\/30){background-color:hsla(0,0%,100%,.3)}body :is(.bg-gradient-to-b){background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}body :is(.bg-gradient-to-l){background-image:linear-gradient(to left,var(--tw-gradient-stops))}body :is(.bg-gradient-to-r){background-image:linear-gradient(to right,var(--tw-gradient-stops))}body :is(.from-black){--tw-gradient-from:#222 var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,34,34,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}body :is(.from-white\/50){--tw-gradient-from:hsla(0,0%,100%,.5) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}body :is(.fill-yellow-7){fill:#f59f00}body :is(.stroke-yellow-7){stroke:#f59f00}body :is(.object-cover){-o-object-fit:cover;object-fit:cover}body :is(.object-center){-o-object-position:center;object-position:center}body :is(.object-top){-o-object-position:top;object-position:top}body :is(.p-0){padding:0}body :is(.p-0\.5){padding:.125rem}body :is(.p-1){padding:.25rem}body :is(.p-2){padding:.5rem}body :is(.p-3){padding:.75rem}body :is(.p-4){padding:1rem}body :is(.p-5){padding:1.25rem}body :is(.p-8){padding:2rem}body :is(.px-1){padding-left:.25rem;padding-right:.25rem}body :is(.px-2){padding-left:.5rem;padding-right:.5rem}body :is(.px-2\.5){padding-left:.625rem;padding-right:.625rem}body :is(.px-3){padding-left:.75rem;padding-right:.75rem}body :is(.px-4){padding-left:1rem;padding-right:1rem}body :is(.py-0){padding-bottom:0;padding-top:0}body :is(.py-0\.5){padding-bottom:.125rem;padding-top:.125rem}body :is(.py-1){padding-bottom:.25rem;padding-top:.25rem}body :is(.py-1\.5){padding-bottom:.375rem;padding-top:.375rem}body :is(.py-2){padding-bottom:.5rem;padding-top:.5rem}body :is(.py-2\.5){padding-bottom:.625rem;padding-top:.625rem}body :is(.py-3){padding-bottom:.75rem;padding-top:.75rem}body :is(.py-4){padding-bottom:1rem;padding-top:1rem}body :is(.py-5){padding-bottom:1.25rem;padding-top:1.25rem}body :is(.py-6){padding-bottom:1.5rem;padding-top:1.5rem}body :is(.pb-2){padding-bottom:.5rem}body :is(.pb-3){padding-bottom:.75rem}body :is(.pb-4){padding-bottom:1rem}body :is(.pl-1){padding-left:.25rem}body :is(.pl-2){padding-left:.5rem}body :is(.pl-3){padding-left:.75rem}body :is(.pr-0){padding-right:0}body :is(.pr-1){padding-right:.25rem}body :is(.pr-1\.5){padding-right:.375rem}body :is(.pr-2){padding-right:.5rem}body :is(.pr-4){padding-right:1rem}body :is(.pr-6){padding-right:1.5rem}body :is(.pr-9){padding-right:2.25rem}body :is(.pr-\[30px\]){padding-right:30px}body :is(.pt-0){padding-top:0}body :is(.pt-2){padding-top:.5rem}body :is(.pt-6){padding-top:1.5rem}body :is(.text-left){text-align:left}body :is(.text-center){text-align:center}body :is(.text-end){text-align:end}body :is(.text-2xl){font-size:1.5rem;line-height:2rem}body :is(.text-5xl){font-size:3rem;line-height:1}body :is(.text-8xl){font-size:6rem;line-height:1}body :is(.text-base){font-size:1rem;line-height:1.5rem}body :is(.text-lg){font-size:1.125rem;line-height:1.75rem}body :is(.text-sm){font-size:.875rem;line-height:1.25rem}body :is(.text-sm\/6){font-size:.875rem;line-height:1.5rem}body :is(.text-xl){font-size:1.25rem;line-height:1.75rem}body :is(.text-xs){font-size:.75rem;line-height:1rem}body :is(.font-bold){font-weight:700}body :is(.font-extrabold){font-weight:800}body :is(.font-medium){font-weight:500}body :is(.font-normal){font-weight:400}body :is(.font-semibold){font-weight:600}body :is(.uppercase){text-transform:uppercase}body :is(.capitalize){text-transform:capitalize}body :is(.normal-case){text-transform:none}body :is(.italic){font-style:italic}body :is(.tabular-nums){--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}body :is(.leading-4){line-height:1rem}body :is(.leading-5){line-height:1.25rem}body :is(.leading-none){line-height:1}body :is(.leading-relaxed){line-height:1.625}body :is(.leading-snug){line-height:1.375}body :is(.tracking-tighter){letter-spacing:-.05em}body :is(.tracking-widest){letter-spacing:.1em}body :is(.text-black){--tw-text-opacity:1;color:rgb(34 34 34/var(--tw-text-opacity))}body :is(.text-blue-5){--tw-text-opacity:1;color:rgb(51 154 240/var(--tw-text-opacity))}body :is(.text-blue-6){--tw-text-opacity:1;color:rgb(34 139 230/var(--tw-text-opacity))}body :is(.text-blue-7){--tw-text-opacity:1;color:rgb(28 126 214/var(--tw-text-opacity))}body :is(.text-dark-2){--tw-text-opacity:1;color:rgb(140 143 163/var(--tw-text-opacity))}body :is(.text-dark-7){--tw-text-opacity:1;color:rgb(26 27 30/var(--tw-text-opacity))}body :is(.text-dark-8){--tw-text-opacity:1;color:rgb(20 21 23/var(--tw-text-opacity))}body :is(.text-dark-9){--tw-text-opacity:1;color:rgb(16 17 19/var(--tw-text-opacity))}body :is(.text-gray-500){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}body :is(.text-gray-6){--tw-text-opacity:1;color:rgb(134 142 150/var(--tw-text-opacity))}body :is(.text-red-400){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}body :is(.text-white){--tw-text-opacity:1;color:rgb(254 254 254/var(--tw-text-opacity))}body :is(.underline){text-decoration-line:underline}body :is(.line-through){text-decoration-line:line-through}body :is(.no-underline){text-decoration-line:none}body :is(.opacity-0){opacity:0}body :is(.opacity-20){opacity:.2}body :is(.opacity-25){opacity:.25}body :is(.opacity-30){opacity:.3}body :is(.opacity-40){opacity:.4}body :is(.opacity-50){opacity:.5}body :is(.opacity-60){opacity:.6}body :is(.opacity-70){opacity:.7}body :is(.opacity-75){opacity:.75}body :is(.mix-blend-difference){mix-blend-mode:difference}body :is(.shadow){--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-2xl){--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-\[0_0_4px_1px\]){--tw-shadow:0 0 4px 1px;--tw-shadow-colored:0 0 4px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-\[0_0_7px_3px\]){--tw-shadow:0 0 7px 3px;--tw-shadow-colored:0 0 7px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-\[inset_0_0_2px_1px_rgba\(255\2c 255\2c 255\2c 0\.2\)\]){--tw-shadow:inset 0 0 2px 1px hsla(0,0%,100%,.2);--tw-shadow-colored:inset 0 0 2px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-lg){--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-sm){--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.shadow-xl){--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}body :is(.\!shadow-blue-8){--tw-shadow-color:#1971c2!important;--tw-shadow:var(--tw-shadow-colored)!important}body :is(.shadow-black){--tw-shadow-color:#222;--tw-shadow:var(--tw-shadow-colored)}body :is(.shadow-black\/30){--tw-shadow-color:rgba(34,34,34,.3);--tw-shadow:var(--tw-shadow-colored)}body :is(.shadow-black\/50){--tw-shadow-color:rgba(34,34,34,.5);--tw-shadow:var(--tw-shadow-colored)}body :is(.shadow-blue-8){--tw-shadow-color:#1971c2;--tw-shadow:var(--tw-shadow-colored)}body :is(.shadow-gray-4){--tw-shadow-color:#ced4da;--tw-shadow:var(--tw-shadow-colored)}body :is(.outline){outline-style:solid}body :is(.outline-1){outline-width:1px}body :is(.-outline-offset-1){outline-offset:-1px}body :is(.outline-gray-4){outline-color:#ced4da}body :is(.ring-1){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}body :is(.ring-inset){--tw-ring-inset:inset}body :is(.ring-black\/5){--tw-ring-color:rgba(34,34,34,.05)}body :is(.ring-gray-4){--tw-ring-opacity:1;--tw-ring-color:rgb(206 212 218/var(--tw-ring-opacity))}body :is(.ring-gray-5\/10){--tw-ring-color:rgba(173,181,189,.1)}body :is(.blur){--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body :is(.drop-shadow){--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body :is(.grayscale){--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body :is(.transition){transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.transition-colors){transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.transition-opacity){transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.transition-transform){transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.duration-300){transition-duration:.3s}body :is(.duration-500){transition-duration:.5s}body :is(.ease-in){transition-timing-function:cubic-bezier(.4,0,1,1)}body :is(.ease-in-out){transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.ease-out){transition-timing-function:cubic-bezier(0,0,.2,1)}body :is(.\@container){container-type:inline-size}body :is(.text-shadow-default){text-shadow:0 2px 4px var(--tw-shadow-color)}body :is(.text-shadow-sm){text-shadow:0 1px 2px var(--tw-shadow-color)}body :is(.aspect-portrait){aspect-ratio:7/9}body :is(.scrollbar-none){scrollbar-width:none}body :is(.scrollbar-none)::-webkit-scrollbar{display:none}body :is(.scrollbar-thin){scrollbar-width:thin}body :is(.shadow-topper){box-shadow:inset 0 2px #e9ecef}body :is(.dark .shadow-topper){box-shadow:inset 0 2px #373a40}body :is(.card){border-radius:.375rem;display:flex;flex-direction:column;overflow:hidden;position:relative;--tw-border-opacity:1;border-color:rgb(222 226 230/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity));--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:#868e96;--tw-shadow:var(--tw-shadow-colored)}body :is(.absolute-center){left:50%;position:absolute;top:50%;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.dark .card){--tw-border-opacity:1;border-color:rgb(55 58 64/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(37 38 43/var(--tw-bg-opacity));--tw-shadow-color:#141517;--tw-shadow:var(--tw-shadow-colored)}body :is(.\[--anchor-gap\:4px\]){--anchor-gap:4px}body,html{block-size:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;inline-size:100%;margin:0;overflow:hidden;padding:0}#uniconsent-config{display:none}#__next{display:flex;flex-direction:column;height:100%;width:100%}a,button{pointer-events:auto}@media only screen and (hover:none) and (pointer:coarse){input:focus,select:focus,textarea:focus{font-size:16px!important}}.show-mobile{display:none}@media only screen and (max-width:768px){.hide-mobile{display:none}.show-mobile{display:block}.notifications-container{bottom:unset;left:50%;top:16px;transform:translateX(-50%)}}a{color:inherit;text-decoration:none}*{box-sizing:border-box}.popover-markdown pre{margin-top:5px;overflow:auto}.popover-markdown p{margin-bottom:5px}.popover-markdown{font-size:.75em}.popover-markdown :first-child{margin-top:0;padding-top:0}.popover-markdown :last-child{margin-bottom:0;padding-bottom:0}.markdown-content hr{border-width:0;border-top:4px solid #777;margin:30px 0}.markdown-content h2{line-height:1.1;margin-bottom:.25em}.markdown-content h2+p{margin-top:0}.markdown-content blockquote{background:#222;border-top:4px solid #333;margin:20px 0;padding:30px}.markdown-content blockquote :last-child{margin-bottom:0}.markdown-content img{max-width:100%}.markdown-content a{color:#4dabf7;text-decoration:underline}.mantine-Alert-body .markdown-content a{color:inherit}.light .markdown-content blockquote{background:#eee;border-top:4px solid #ddd}img.load-error{background:rgba(255,0,0,.35);opacity:1}iframe{border:none}.demo-25{opacity:.65;stroke-width:2px}.demo-50{opacity:.75;stroke-width:5px}.demo-75{opacity:.85;stroke-width:7px}.demo-100{opacity:.95;stroke-width:10px}.demo-25-animated,.frame-decor:hover .demo-25{animation:flicker-25 2.5s ease-in-out infinite alternate}.demo-50-animated,.frame-decor:hover .demo-50{animation:flicker-50 2s ease-in-out infinite alternate}.demo-75-animated,.frame-decor:hover .demo-75{animation:flicker-75 1.5s ease-in-out infinite alternate}.demo-100-animated,.frame-decor:hover .demo-100{animation:flicker-100 1s ease-in-out infinite alternate}@keyframes flicker-100{0%{opacity:.95;stroke-width:10px}to{opacity:1;stroke-width:20px}}@keyframes flicker-75{0%{opacity:.85;stroke-width:7px}to{opacity:.9;stroke-width:15px}}@keyframes flicker-50{0%{opacity:.75;stroke-width:5px}to{opacity:.8;stroke-width:10px}}@keyframes flicker-25{0%{opacity:.65;stroke-width:2px}to{opacity:.7;stroke-width:5px}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.frame-decor .footer{padding-bottom:36px!important}.frame-decor .footer-abs>*{bottom:36px!important}@keyframes overscroll-spin{0%{transform:translateX(-50%) rotate(0deg)}to{transform:translateX(-50%) rotate(1turn)}}@keyframes glowing{0%{background-position:0 0}50%{background-position:200% 0}to{background-position:0 0}}@keyframes button-highlight{0%{background-position:-300% 50%}30%{background-position:300% 50%}to{background-position:300% 50%}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.grecaptcha-badge{visibility:hidden}ul{list-style-type:disc}ol{list-style-type:decimal}[data-type=strawPoll]{border-radius:8px;display:flex;flex-direction:column;margin:0 auto;max-width:640px;overflow:hidden;width:100%}[data-type=strawPoll] iframe{flex-grow:1}div[data-youtube-video]>iframe{aspect-ratio:16/9;height:100%;max-width:640px;min-width:200px;width:100%}.scroll-area{display:flex;flex-direction:column;overflow-x:hidden;position:relative;scrollbar-width:thin;will-change:transform}::-moz-selection{background:#1864ab;color:#fff;text-shadow:1px 1px 1px #000}::selection{background:#1864ab;color:#fff;text-shadow:1px 1px 1px #000}#snigel-cmp-framework .sn-b-def.sn-blue{background-color:#1971c2!important;border-color:#1971c2!important;color:#fff!important}#snigel-cmp-framework .sn-b-def{border-color:#1971c2!important;color:#1971c2!important}#snigel-cmp-framework .sn-selector ul li{color:#1971c2!important}#snigel-cmp-framework .sn-selector ul li:after{background-color:#1971c2!important}#snigel-cmp-framework .sn-footer-tab .sn-privacy a{color:#1971c2!important}#snigel-cmp-framework .sn-arrow:after,#snigel-cmp-framework .sn-arrow:before,#snigel-cmp-framework .sn-switch input:checked+span:before{background-color:#1971c2!important}#adconsent-usp-link{border:1px solid #1971c2!important;color:#1971c2!important}#adconsent-usp-banner-btn,#adconsent-usp-banner-optout input:checked+.adconsent-usp-slider{background-color:#1971c2!important}#adconsent-usp-banner-btn{border:1px solid #1971c2!important;color:#fff}div[id*=google_ads_iframe][id$=outstream_0__container__]{height:0;width:0}body :is(.\*\:border-gray-4>*){--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}body :is(.hover\:border-gray-200:hover){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}body :is(.hover\:bg-gray-1:hover){--tw-bg-opacity:1;background-color:rgb(241 243 245/var(--tw-bg-opacity))}body :is(.hover\:bg-gray-2:hover){--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity))}body :is(.hover\:bg-white:hover){--tw-bg-opacity:1;background-color:rgb(254 254 254/var(--tw-bg-opacity))}body :is(.hover\:text-blue-6:hover){--tw-text-opacity:1;color:rgb(34 139 230/var(--tw-text-opacity))}body :is(.hover\:opacity-100:hover){opacity:1}body :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}body :is(.focus\:outline:focus){outline-style:solid}body :is(.focus\:outline-2:focus){outline-width:2px}body :is(.focus\:-outline-offset-2:focus){outline-offset:-2px}body :is(.focus\:outline-blue-5:focus){outline-color:#339af0}body :is(.active\:transform-none:active){transform:none}body :is(.group:hover .group-hover\:block){display:block}body :is(.group.no-scroll .group-\[\.no-scroll\]\:right-4){right:1rem}body :is(.group.no-scroll .group-\[\.no-scroll\]\:mb-3){margin-bottom:.75rem}body :is(.group:not([data-selected]) .group-\[\&\:not\(\[data-selected\]\)\]\:hidden){display:none}body :is(.aria-expanded\:border-b[aria-expanded=true]){border-bottom-width:1px}body :is(.aria-expanded\:border-solid[aria-expanded=true]){border-style:solid}body :is(.aria-expanded\:border-gray-2[aria-expanded=true]){--tw-border-opacity:1;border-color:rgb(233 236 239/var(--tw-border-opacity))}body :is(.data-\[checked\]\:bg-blue-400[data-checked]){--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}body :is(.data-\[checked\]\:bg-blue-5[data-checked]){--tw-bg-opacity:1;background-color:rgb(51 154 240/var(--tw-bg-opacity))}body :is(.data-\[focus\]\:bg-blue-5[data-focus]){--tw-bg-opacity:1;background-color:rgb(51 154 240/var(--tw-bg-opacity))}body :is(.data-\[checked\]\:text-white[data-checked]){--tw-text-opacity:1;color:rgb(254 254 254/var(--tw-text-opacity))}body :is(.data-\[focus\]\:text-white[data-focus]){--tw-text-opacity:1;color:rgb(254 254 254/var(--tw-text-opacity))}body :is(.data-\[closed\]\:data-\[leave\]\:opacity-0[data-leave][data-closed]){opacity:0}body :is(.data-\[disabled\]\:opacity-50[data-disabled]){opacity:.5}body :is(.data-\[focus\]\:outline-none[data-focus]){outline:2px solid transparent;outline-offset:2px}body :is(.data-\[checked\]\:ring-0[data-checked]){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}body :is(.data-\[focus\]\:data-\[checked\]\:ring-2[data-checked][data-focus]){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}body :is(.data-\[focus\]\:ring-2[data-focus]){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}body :is(.data-\[focus\]\:ring-blue-5[data-focus]){--tw-ring-opacity:1;--tw-ring-color:rgb(51 154 240/var(--tw-ring-opacity))}body :is(.data-\[focus\]\:ring-offset-2[data-focus]){--tw-ring-offset-width:2px}body :is(.data-\[leave\]\:transition[data-leave]){transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.data-\[leave\]\:duration-100[data-leave]){transition-duration:.1s}body :is(.data-\[leave\]\:ease-in[data-leave]){transition-timing-function:cubic-bezier(.4,0,1,1)}body :is(.group[data-checked] .group-data-\[checked\]\:visible){visibility:visible}body :is(.group[data-selected] .group-data-\[selected\]\:font-semibold){font-weight:600}body :is(.group[data-focus] .group-data-\[focus\]\:text-white){--tw-text-opacity:1;color:rgb(254 254 254/var(--tw-text-opacity))}@container (min-width: 768px){body :is(.\@sm\:hidden){display:none}body :is(.\@sm\:h-\[800px\]){height:800px}body :is(.\@sm\:w-4\/12){width:33.333333%}body :is(.\@sm\:w-4\/6){width:66.666667%}body :is(.\@sm\:w-72){width:18rem}body :is(.\@sm\:w-\[70\%\]){width:70%}body :is(.\@sm\:w-full){width:100%}body :is(.\@sm\:max-w-\[700px\]){max-width:700px}body :is(.\@sm\:grid-cols-2){grid-template-columns:repeat(2,minmax(0,1fr))}body :is(.\@sm\:flex-row){flex-direction:row}body :is(.\@sm\:flex-nowrap){flex-wrap:nowrap}body :is(.\@sm\:items-end){align-items:flex-end}body :is(.\@sm\:justify-center){justify-content:center}body :is(.\@sm\:gap-3){gap:.75rem}body :is(.\@sm\:gap-4){gap:1rem}body :is(.\@sm\:gap-6){gap:1.5rem}body :is(.\@sm\:p-6){padding:1.5rem}}@container (min-width: 992px){body :is(.\@md\:block){display:block}body :is(.\@md\:hidden){display:none}body :is(.\@md\:max-h-\[calc\(90vh-var\(--header-height\)\)\]){max-height:calc(90vh - var(--header-height))}body :is(.\@md\:w-\[450px\]){width:450px}body :is(.\@md\:min-w-\[450px\]){min-width:450px}body :is(.\@md\:flex-1){flex:1 1 0%}body :is(.\@md\:flex-initial){flex:0 1 auto}body :is(.\@md\:grid-cols-3){grid-template-columns:repeat(3,minmax(0,1fr))}body :is(.\@md\:flex-row){flex-direction:row}body :is(.\@md\:items-center){align-items:center}body :is(.\@md\:justify-start){justify-content:flex-start}body :is(.\@md\:overflow-y-auto){overflow-y:auto}body :is(.\@md\:overflow-y-hidden){overflow-y:hidden}body :is(.\@md\:rounded-\[32px\]){border-radius:32px}body :is(.\@md\:p-1){padding:.25rem}body :is(.\@md\:p-10){padding:2.5rem}body :is(.\@md\:px-3){padding-left:.75rem;padding-right:.75rem}body :is(.\@md\:px-4){padding-left:1rem;padding-right:1rem}body :is(.\@md\:py-2){padding-bottom:.5rem;padding-top:.5rem}body :is(.\@md\:py-2\.5){padding-bottom:.625rem;padding-top:.625rem}body :is(.\@md\:pr-1){padding-right:.25rem}body :is(.\@md\:pt-2){padding-top:.5rem}}@container (min-width: 1200px){body :is(.\@lg\:my-3){margin-bottom:.75rem;margin-top:.75rem}body :is(.\@lg\:flex){display:flex}body :is(.\@lg\:grid-cols-4){grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 1500px){body :is(.\@\[1500px\]\:hidden){display:none}}@container (width < 576px){body :is(.\@max-xs\:grid-cols-1){grid-template-columns:repeat(1,minmax(0,1fr))}body :is(.\@max-xs\:gap-2){gap:.5rem}}@container (width < 768px){body :is(.\@max-sm\:hidden){display:none}body :is(.\@max-sm\:w-full){width:100%}body :is(.\@max-sm\:px-1){padding-left:.25rem;padding-right:.25rem}}@container (width < 992px){body :is(.\@max-md\:absolute){position:absolute}body :is(.\@max-md\:inset-0){inset:0}body :is(.\@max-md\:ml-auto){margin-left:auto}body :is(.\@max-md\:mt-2){margin-top:.5rem}body :is(.\@max-md\:hidden){display:none}body :is(.\@max-md\:aspect-square){aspect-ratio:1/1}body :is(.\@max-md\:h-\[calc\(100\%-var\(--header-height\)\)\]){height:calc(100% - var(--header-height))}body :is(.\@max-md\:translate-y-\[calc\(100\%-60px\)\]){--tw-translate-y:calc(100% - 60px);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}body :is(.\@max-md\:flex-col){flex-direction:column}body :is(.\@max-md\:pb-\[60px\]){padding-bottom:60px}body :is(.\@max-md\:pt-0){padding-top:0}body :is(.\@max-md\:transition-transform){transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}body :is(.\@max-md\:shadow-topper){box-shadow:inset 0 2px #e9ecef}body :is(.dark .\@max-md\:shadow-topper){box-shadow:inset 0 2px #373a40}}body :is(.not-last\:\*\:border-b>:not(:last-child)){border-bottom-width:1px}@media (min-width:768px){body :is(.sm\:order-none){order:0}body :is(.sm\:size-4){height:1rem;width:1rem}body :is(.sm\:w-auto){width:auto}body :is(.sm\:min-w-96){min-width:24rem}body :is(.sm\:flex-1){flex:1 1 0%}body :is(.sm\:grid-cols-6){grid-template-columns:repeat(6,minmax(0,1fr))}body :is(.sm\:flex-row){flex-direction:row}body :is(.sm\:flex-nowrap){flex-wrap:nowrap}body :is(.sm\:items-center){align-items:center}body :is(.sm\:justify-between){justify-content:space-between}body :is(.sm\:gap-10){gap:2.5rem}body :is(.sm\:text-sm){font-size:.875rem;line-height:1.25rem}body :is(.sm\:text-sm\/6){font-size:.875rem;line-height:1.5rem}}@media (min-width:992px){body :is(.md\:block){display:block}body :is(.md\:hidden){display:none}body :is(.md\:size-20){height:5rem;width:5rem}body :is(.md\:h-\[205px\]){height:205px}body :is(.md\:w-auto){width:auto}body :is(.md\:flex-row){flex-direction:row}body :is(.md\:justify-end){justify-content:flex-end}}@media (min-width:1200px){body :is(.lg\:-mx-32){margin-left:-8rem;margin-right:-8rem}body :is(.lg\:px-11){padding-left:2.75rem;padding-right:2.75rem}}body :is(.dark\:\!border-green-8:where(.dark,.dark *)){--tw-border-opacity:1!important;border-color:rgb(47 158 68/var(--tw-border-opacity))!important}body :is(.dark\:\!border-yellow-8:where(.dark,.dark *)){--tw-border-opacity:1!important;border-color:rgb(240 140 0/var(--tw-border-opacity))!important}body :is(.dark\:border-dark-4:where(.dark,.dark *)){--tw-border-opacity:1;border-color:rgb(55 58 64/var(--tw-border-opacity))}body :is(.dark\:border-dark-5:where(.dark,.dark *)){--tw-border-opacity:1;border-color:rgb(44 46 51/var(--tw-border-opacity))}body :is(.dark\:border-dark-6:where(.dark,.dark *)){--tw-border-opacity:1;border-color:rgb(37 38 43/var(--tw-border-opacity))}body :is(.dark\:bg-black\/30:where(.dark,.dark *)){background-color:rgba(34,34,34,.3)}body :is(.dark\:bg-dark-3:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(92 95 102/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-4:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(55 58 64/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-5:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(44 46 51/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-6:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(37 38 43/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-6\/50:where(.dark,.dark *)){background-color:rgba(37,38,43,.5)}body :is(.dark\:bg-dark-7:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(26 27 30/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-8:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(20 21 23/var(--tw-bg-opacity))}body :is(.dark\:bg-dark-9:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(16 17 19/var(--tw-bg-opacity))}body :is(.dark\:bg-gray-700:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}body :is(.dark\:bg-white:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(254 254 254/var(--tw-bg-opacity))}body :is(.dark\:from-dark-7:where(.dark,.dark *)){--tw-gradient-from:#1a1b1e var(--tw-gradient-from-position);--tw-gradient-to:rgba(26,27,30,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}body :is(.dark\:text-blue-2:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(165 216 255/var(--tw-text-opacity))}body :is(.dark\:text-blue-8:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(25 113 194/var(--tw-text-opacity))}body :is(.dark\:text-dark-0:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(193 194 197/var(--tw-text-opacity))}body :is(.dark\:text-dark-1:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(166 167 171/var(--tw-text-opacity))}body :is(.dark\:text-gray-0:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(248 249 250/var(--tw-text-opacity))}body :is(.dark\:text-white:where(.dark,.dark *)){--tw-text-opacity:1;color:rgb(254 254 254/var(--tw-text-opacity))}body :is(.dark\:opacity-50:where(.dark,.dark *)){opacity:.5}body :is(.dark\:shadow-dark-8:where(.dark,.dark *)){--tw-shadow-color:#141517;--tw-shadow:var(--tw-shadow-colored)}body :is(.dark\:outline-dark-4:where(.dark,.dark *)){outline-color:#373a40}body :is(.dark\:ring-dark-3\/10:where(.dark,.dark *)){--tw-ring-color:rgba(92,95,102,.1)}body :is(.dark\:ring-dark-4:where(.dark,.dark *)){--tw-ring-opacity:1;--tw-ring-color:rgb(55 58 64/var(--tw-ring-opacity))}body :is(.dark\:\*\:border-dark-4>:where(.dark,.dark *)){--tw-border-opacity:1;border-color:rgb(55 58 64/var(--tw-border-opacity))}body :is(.dark\:hover\:bg-dark-4:hover:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(55 58 64/var(--tw-bg-opacity))}body :is(.dark\:hover\:bg-dark-5:hover:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(44 46 51/var(--tw-bg-opacity))}body :is(.hover\:dark\:bg-dark-4:where(.dark,.dark *):hover){--tw-bg-opacity:1;background-color:rgb(55 58 64/var(--tw-bg-opacity))}body :is(.hover\:dark\:bg-dark-5:where(.dark,.dark *):hover){--tw-bg-opacity:1;background-color:rgb(44 46 51/var(--tw-bg-opacity))}body :is(.hover\:dark\:bg-dark-7:where(.dark,.dark *):hover){--tw-bg-opacity:1;background-color:rgb(26 27 30/var(--tw-bg-opacity))}body :is(.dark\:focus\:outline-blue-8:focus:where(.dark,.dark *)){outline-color:#1971c2}body :is(.dark\:aria-expanded\:border-dark-4[aria-expanded=true]:where(.dark,.dark *)){--tw-border-opacity:1;border-color:rgb(55 58 64/var(--tw-border-opacity))}body :is(.dark\:data-\[checked\]\:bg-blue-8[data-checked]:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(25 113 194/var(--tw-bg-opacity))}body :is(.dark\:data-\[focus\]\:bg-blue-8[data-focus]:where(.dark,.dark *)){--tw-bg-opacity:1;background-color:rgb(25 113 194/var(--tw-bg-opacity))}body :is(.dark\:data-\[focus\]\:ring-blue-8[data-focus]:where(.dark,.dark *)){--tw-ring-opacity:1;--tw-ring-color:rgb(25 113 194/var(--tw-ring-opacity))}body :is(.\[\&\:not\(\[data-focus\]\)\]\:\[\&\:not\(\[data-checked\]\)\]\:ring-inset:not([data-checked]):not([data-focus])){--tw-ring-inset:inset}body :is(.\[\&_\*\]\:\!pointer-events-none *){pointer-events:none!important}body :is(.\[\&_\*\]\:text-gray-5 *){--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}body :is(.\[\&_\*\]\:dark\:text-dark-3:where(.dark,.dark *) *){--tw-text-opacity:1;color:rgb(92 95 102/var(--tw-text-opacity))}body :is(.\[\&_iframe\]\:hidden iframe){display:none} +/*# sourceMappingURL=9248e9e33353c342.css.map*/ \ No newline at end of file diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/CyberIL16_42.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/CyberIL16_42.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ab7cfdeac2e76e65694a8bd2b0387055c8925706 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/CyberIL16_42.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Eyeballs.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Eyeballs.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..84b7798052058cc9bd8798be50ede7287cc7ff76 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Eyeballs.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/FRXM66181PGS08DWDCYS5VVSD0.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/FRXM66181PGS08DWDCYS5VVSD0.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..65c057f450c41398e87e87d8d1986bcc6af27d0f Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/FRXM66181PGS08DWDCYS5VVSD0.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-ceres fauna_00157_.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-ceres fauna_00157_.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7c08307252cea37be5b6592fb7d02e8657641893 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-ceres fauna_00157_.jpeg differ diff --git a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-takane lui_00007_.jpeg b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-takane lui_00007_.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..98208c1290a89be665217224b7f0237cdfd82f35 Binary files /dev/null and b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/Hirez-takane lui_00007_.jpeg differ diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[[...slug]]-ac96f6bd8bd17c2b.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[[...slug]]-ac96f6bd8bd17c2b.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..41f2017de3a83c3328fe7fe55b38af08ef82bd37 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[[...slug]]-ac96f6bd8bd17c2b.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3687,3117],{40424:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/models/[id]/[[...slug]]",function(){return n(22979)}])},44446:function(e,i,n){"use strict";n.d(i,{u:function(){return l}});var s=n(85893),t=n(88393),o=n(64523);let l=(0,n(67294).forwardRef)((e,i)=>{let{children:n,...l}=e;return(0,s.jsx)(t.u,{...l,children:(0,s.jsx)(o.x,{ref:i,children:n})})});l.displayName="ButtonTooltip"},78830:function(e,i,n){"use strict";n.d(i,{F:function(){return d}});var s=n(85893),t=n(17789),o=n(71232),l=n(91759),r=n(67294),a=n(4586);function d(e){let{items:i,renderItem:n,limit:a=5,spacing:d=4,grouped:u=!1,badgeProps:h}=e,[m,{open:x,close:p}]=(0,l.q)();if(!i.length)return null;let g=i.slice(0,a),v=i.slice(a),j=(0,s.jsxs)(s.Fragment,{children:[g.map((e,i)=>(0,s.jsx)(r.Fragment,{children:c(n,i,e)},"displayed"+i)),v.length>0&&m?v.map((e,i)=>(0,s.jsx)(r.Fragment,{children:c(n,i,e)},"collapsed"+i)):null,v.length>0&&(m?(0,s.jsx)(t.C,{component:"button",color:"gray",size:"sm",...h,onClick:p,sx:{cursor:"pointer"},children:"- Hide"}):(0,s.jsxs)(t.C,{component:"button",color:"gray",size:"sm",...h,onClick:x,sx:{cursor:"pointer"},children:["+ ",v.length]}))]});return u?(0,s.jsx)(o.Z,{spacing:d,children:j}):j}let c=(0,n(50579).Z)([a.Z,{},WeakMap],(e,i,n)=>(0,s.jsx)(e,{index:i,...n}))},14602:function(e,i,n){"use strict";n.d(i,{I:function(){return d}});var s=n(85893),t=n(27484),o=n.n(t),l=n(67294),r=n(97755),a=n(9242);function d(e){let{endTime:i,refreshIntervalMs:n=6e4,format:t="long"}=e,d=(0,l.useRef)(),c=o()(),u=o()(i).unix()-c.unix(),h=(0,r.Z)(),m=o().duration(1e3*u,"milliseconds"),x=1>m.asHours(),p=x?1e3:n,[g,v]=(0,l.useState)(m);return((0,l.useEffect)(()=>{v(m)},[i]),(0,l.useEffect)(()=>(d.current||(d.current=setInterval(()=>{v(e=>o().duration(e.asMilliseconds()-p,"milliseconds"))},p)),()=>{clearInterval(d.current),d.current=void 0}),[i,p]),h)?(0,s.jsx)(s.Fragment,{children:function(e,i,n){let s=e.days(),t=e.hours(),o=e.minutes(),l=e.seconds(),r=[];return s>0&&r.push("long"===i?"".concat(s," ").concat(1===s?"day":"days"):"".concat(s,"d")),t>0&&r.push("long"===i?"".concat(t," ").concat(1===t?"hour":"hours"):"".concat(t,"h")),o>0&&r.push("long"===i?"".concat(o," ").concat(1===o?"minute":"minutes"):"".concat(o,"m")),l>0&&n&&r.push("long"===i?"".concat(l," ").concat(1===l?"second":"seconds"):"".concat(l,"s")),"long"===i?(0,a.aw)(r):r.join(" ")}(g,t,x)}):null}},11900:function(e,i,n){"use strict";n.d(i,{N:function(){return u}});var s=n(85893),t=n(74403),o=n(71232),l=n(95117),r=n(97564),a=n(56817),d=n(15208),c=n(76705);let u=e=>(0,c.O)()?e.id?(0,s.jsx)(h,{...e}):(0,s.jsx)(m,{...e}):null;function h(e){var i,n;let{id:t,getInitialValueInEffect:o=!0,storage:l="localStorage",...r}=e,[a,c]=(0,d.y)({type:l,key:"alert-dismissed-".concat(t),defaultValue:(null===(n=window)||void 0===n?void 0:null===(i=n.localStorage)||void 0===i?void 0:i.getItem("alert-dismissed-".concat(t)))==="true",getInitialValueInEffect:o});return a?null:(0,s.jsx)(m,{onDismiss:()=>c(!0),...r})}function m(e){let{id:i,title:n,content:a,color:d="blue",size:c="md",emoji:u,icon:h,className:m,children:p,onDismiss:g,...v}=e,{classes:j,cx:f}=x({color:d});return(0,s.jsx)(t.b,{py:8,...v,className:f(m,j.announcement),onClose:g,closeButtonLabel:"Close alert",withCloseButton:!!g,children:(0,s.jsxs)(o.Z,{spacing:"xs",noWrap:!0,pr:"xs",children:[u&&(0,s.jsx)(l.x,{size:36,p:0,sx:{lineHeight:1.2},children:u}),h,(0,s.jsxs)(r.K,{spacing:0,children:[n&&(0,s.jsx)(l.x,{size:c,weight:500,className:j.title,mb:4,children:n}),(0,s.jsx)(l.x,{size:"md"===c?"sm":"xs",className:j.text,children:null!=p?p:a})]})]})})}let x=(0,a.k)((e,i)=>{let{color:n}=i;return{announcement:{border:"1px solid ".concat("dark"===e.colorScheme?e.colors[n][9]:e.colors[n][2]),backgroundColor:"dark"===e.colorScheme?e.fn.darken(e.colors[n][8],.5):e.colors[n][1]},title:{color:"dark"===e.colorScheme?e.colors[n][0]:e.colors[n][7],lineHeight:1.1},text:{color:"dark"===e.colorScheme?e.colors[n][2]:e.colors[n][9],lineHeight:1.2,"& > div > a":{color:"dark"===e.colorScheme?e.colors[n][1]:e.colors[n][8]}}}})},25207:function(e,i,n){"use strict";n.d(i,{A:function(){return f},V:function(){return w}});var s=n(85893),t=n(97564),o=n(95117),l=n(71232),r=n(17789),a=n(67841),d=n(56817),c=n(67294),u=n(58456),h=n(89521),m=n(49630),x=n(17578),p=n(15131),g=n(5779),v=n(54671),j=n(7379);function f(e){let{hiddenBelowBrowsingLevel:i,hiddenByTags:n,hasHidden:d}=e,{classes:c}=y(),{data:h}=(0,m.HX)(),g=(0,x.xJ)(),f=(0,p.s7)(e=>e.showNsfw),w=(0,u.bT)(),{setBrowsingLevelOverride:b}=(0,u.NV)();if(!d)return null;let k=i.length,I=n.length,z=k>0&&f;return(0,s.jsxs)(t.K,{spacing:"sm",align:"center",children:[z&&(0,s.jsxs)(t.K,{spacing:4,children:[(0,s.jsx)(o.x,{size:"sm",color:"dimmed",ta:"center",children:"Hidden by your browsing level:"}),(0,s.jsx)(l.Z,{spacing:"xs",position:"center",children:i.map(e=>{let{browsingLevel:i,count:n}=e;return(0,s.jsx)(r.C,{rightSection:n,variant:"outline",classNames:c,children:v.vU[i]},i)})}),(0,s.jsx)(a.z,{mt:4,onClick:()=>{let e=(0,v.NK)(i.map(e=>e.browsingLevel));null==b||b(j.v.addFlag(e,w))},children:"Show Hidden"})]}),!z&&g&&I>0&&(0,s.jsxs)(t.K,{spacing:4,children:[(0,s.jsx)(o.x,{size:"sm",color:"dimmed",ta:"center",children:"Hidden by your tag preferences:"}),(0,s.jsx)(l.Z,{spacing:"xs",position:"center",children:n.map(e=>{var i;let{tagId:n,count:t}=e;return(0,s.jsx)(r.C,{rightSection:t,variant:"outline",classNames:c,children:null==h?void 0:null===(i=h.hiddenTags.find(e=>e.id===Number(n)))||void 0===i?void 0:i.name},n)})})]}),!I&&(0,s.jsx)(o.x,{children:"Images hidden due to mature content settings"})]})}let y=(0,d.k)(e=>({rightSection:{marginLeft:10,paddingLeft:10,borderLeft:"1px solid"}}));function w(e){let i=(0,u.bT)(),n=(0,h.u)(),{canViewNsfw:s}=(0,g.g)();return(0,c.useMemo)(()=>{let t={},o={},l={};for(let s of null!=e?e:[]){var r;if(s.nsfwLevel){for(let e of null!==(r=s.tagIds)&&void 0!==r?r:[])n.hiddenTags.get(e)&&(l[e]?l[e]++:l[e]=1);if(!j.v.intersects(i,s.nsfwLevel)&&s.nsfwLevel!==i){let e=s.nsfwLevel{let[i,n]=e;return{browsingLevel:Number(i),count:n}}),d=Object.entries(o).map(e=>{let[i,n]=e;return{browsingLevel:Number(i),count:n}}),c=Object.entries(l).map(e=>{let[i,n]=e;return{tagId:Number(i),count:n}});return{hiddenBelowBrowsingLevel:a,hiddenAboveBrowsingLevel:d,hiddenByTags:c,hasHidden:!!s&&(!!a.length||!!d.length||!!c.length)}},[i,n,e])}},88557:function(e,i,n){"use strict";n.d(i,{V:function(){return d}});var s=n(85893),t=n(57212),o=n(11163),l=n(73679),r=n(60800),a=n(35818);function d(){let e=(0,o.useRouter)(),i=(0,l.y)(e.query.tags);return(0,s.jsx)(c,{value:null!=i?i:[],onChange:i=>{let{pathname:n,query:s}=e;e.replace({pathname:n,query:{...s,tags:i}},void 0,{shallow:!0,scroll:!1})}})}function c(e){let{value:i,onChange:n}=e,{data:o}=(0,r.h)({entityType:a.iB.Image});return(0,s.jsx)(t.u,{data:o,value:i,onChange:n})}},44211:function(e,i,n){"use strict";n.d(i,{e:function(){return r}});var s=n(85893),t=n(65521),o=n(28075),l=n(90512);function r(e){var i;let{image:{id:n,url:r,name:a,type:d,width:c,height:u,hash:h,metadata:m},edgeImageProps:x={},nsfw:p,aspectRatio:g,withMeta:v,style:j,onClick:f,className:y,radius:w=0,...b}=e;if(null!=g||(g=Math.max((null!=c?c:16)/(null!=u?u:9),9/16)),null!==(i=x.width)&&void 0!==i||(x.width=null!=c?c:void 0),x.width||x.height||(!x.height&&c?x.width=c:x.width||!u||(x.height=u)),!c||!u)return null;let k={...x.style,maxHeight:"100%",maxWidth:"100%"};return((null==j?void 0:j.height)||(null==j?void 0:j.maxHeight))&&(k.maxHeight="100%"),(0,s.jsx)("div",{className:(0,l.Z)("relative overflow-hidden rounded-md",y),style:{...j,aspectRatio:g},...b,children:p?(0,s.jsx)(t.R,{hash:h,width:c,height:u}):(0,s.jsx)(o.P,{src:r,name:null!=a?a:n.toString(),alt:null!=a?a:void 0,type:d,...x,onClick:f,metadata:m,style:k})})}},8984:function(e,i,n){"use strict";n.d(i,{Q:function(){return v}});var s=n(85893),t=n(40633),o=n(97564),l=n(71232),r=n(5044),a=n(95117),d=n(67841),c=n(79543),u=n(78308),h=n(67294),m=n(73445),x=n(17578),p=n(57632);let g=(0,m.Ue)((e,i)=>({keys:{},toggleKey:n=>{let s=i().keys[n];e(()=>({keys:{[n]:!s}}))}}));function v(e){let{children:i,message:n,dependency:m=!0,trigger:v="onClick"}=e,[j]=(0,h.useState)((0,p.Z)()),f=(0,x.xJ)(),y=null==f?void 0:f.isMember,w=g(e=>e.keys[j]),b=g(e=>e.toggleKey);return!y&&m?(0,s.jsxs)(t.J,{width:300,position:"bottom",opened:w,withArrow:!0,closeOnClickOutside:!0,withinPortal:!0,children:[(0,s.jsx)(t.J.Target,{children:(0,h.cloneElement)(i,{[v]:e=>{e.stopPropagation(),e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),b(j)}})}),(0,s.jsx)(t.J.Dropdown,{children:(0,s.jsxs)(o.K,{spacing:"xs",children:[(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(r.k,{color:"red",size:"xl",variant:"outline",children:(0,s.jsx)(u.Z,{})}),"string"!=typeof n?n:(0,s.jsx)(a.x,{size:"sm",weight:500,sx:{flex:1},children:null!=n?n:"You must be a Member to access this content."})]}),(0,s.jsx)(d.z,{size:"xs",component:c.p,href:"/pricing",children:"Join Now"})]})})]}):(0,h.cloneElement)(i,{[v]:e=>{var n,s;e.stopPropagation(),e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),null===(n=(s=i.props)[v])||void 0===n||n.call(s,e)}})}},56053:function(e,i,n){"use strict";n.d(i,{w:function(){return g}});var s=n(85893),t=n(4586),o=n(50579),l=n(67294),r=n(41746),a=n(40828),d=n(58456),c=n(54671),u=n(28475),h=n(26339),m=n(87864),x=n(58192),p=n(90512);function g(e){let{data:i,render:n,imageDimensions:t,adjustHeight:o,maxItemHeight:g,itemId:v,staticItem:j,withAds:f}=e,{columnCount:y,columnWidth:w}=(0,h.a)(),b=function(e,i,n,s,t,o,h){let{adsEnabled:m}=(0,a.R)(),x=(0,d.bT)(),p=m&&(0,c.A_)(x)&&h,g=(0,r._0)();return(0,l.useMemo)(()=>{if(0===n)return[];let l=g({data:e,columnCount:n,options:p?[{width:300,height:250,AdUnit:u.ij}]:void 0}),r=Array(n).fill(0),a=Array(n).fill([]);for(let e of l){let l=0;if("ad"===e.type)l=e.data.height;else{var d;let{width:n,height:r}=s(e.data),a=r/n*i,c=null!==(d=null==t?void 0:t({imageRatio:i/a,width:i,height:a},e.data))&&void 0!==d?d:a;l=Math.floor(o?Math.min(c,o):c)}let c=0;for(let e=1;e(0,s.jsxs)("div",{className:(0,p.Z)("flex max-w-[450px] flex-col gap-4",1===y?"w-full":"w-[320px]"),style:y>1?{width:w}:void 0,children:[null==j?void 0:j({columnWidth:w,height:450}),e.map((e,i)=>{let{height:t,data:o}=e;switch(o.type){case"data":var l;return(0,s.jsx)(n,{index:i,data:o.data,width:w,height:t},null!==(l=null==v?void 0:v(o.data))&&void 0!==l?l:i);case"ad":return(0,s.jsx)(m.F,{children:(0,s.jsx)(x.I,{className:"w-full items-center justify-center shadow",children:(0,s.jsx)(o.data.AdUnit,{})})},"ad_".concat(i))}})]},i))})}(0,o.Z)([t.Z,{},WeakMap,t.Z,t.Z],(e,i,n,t,o)=>(0,s.jsx)(e,{index:i,data:n,width:t,height:o}))},43121:function(e,i,n){"use strict";n.d(i,{o:function(){return v}});var s=n(85893),t=n(64761),o=n(17789),l=n(71232),r=n(95117),a=n(88393),d=n(67841),c=n(48427),u=n(83425),h=n(14102),m=n(67294),x=n(8984),p=n(88182);let g=(0,m.forwardRef)((e,i)=>{let{iconOnly:n,canDownload:c,downloadPrice:m,children:g,tooltip:v,joinAlert:j,...f}=e,y=(0,t.rZ)(),w=(0,s.jsx)(o.C,{radius:"sm",size:"sm",variant:"filled",color:"yellow.7",style:{position:"absolute",top:"-8px",right:"-8px",boxShadow:y.shadows.sm,padding:"4px 2px",paddingRight:"6px"},children:(0,s.jsxs)(l.Z,{spacing:0,children:[(0,s.jsx)(u.Z,{style:{fill:y.colors.dark[9]},color:"dark.9",size:16})," ",(0,s.jsx)(r.x,{color:"dark.9",children:(0,p.dm)(null!=m?m:0,{decimals:0})})]})}),b=n?(0,s.jsx)(a.u,{label:null!=v?v:"Download options",withArrow:!0,children:(0,s.jsxs)(d.z,{pos:"relative",ref:i,...f,variant:"light",children:[(0,s.jsx)(h.Z,{size:24}),m&&(0,s.jsx)(s.Fragment,{children:w})]})}):(0,s.jsx)(d.z,{pos:"relative",ref:i,...f,children:(0,s.jsxs)(l.Z,{spacing:8,noWrap:!0,children:[(0,s.jsx)(h.Z,{size:20}),m&&(0,s.jsx)(s.Fragment,{children:w}),g]})});return c||(null!=m?m:0)>0?b:(0,s.jsx)(x.Q,{message:null!=j?j:"You need to be a member to start the download",children:b})});g.displayName="DownloadButton";let v=(0,c.F)(g)},17533:function(e,i,n){"use strict";n.d(i,{c:function(){return d}});var s=n(85893),t=n(29488),o=n(1566),l=n(95117),r=n(79543);let a={Bounty:"This bounty is a request to reproduce the likeness of a real person.",Model:"This resource is intended to reproduce the likeness of a real person."};function d(e){let{type:i="Model",...n}=e;return(0,s.jsxs)(o.L,{...n,icon:(0,s.jsx)(t.Z,{}),children:[a[i]," Out of respect for this individual and in accordance with our"," ",(0,s.jsx)(l.x,{component:r.p,href:"/content/rules/real-people",variant:"link",children:"Content Rules"}),", only"," ",(0,s.jsx)(l.x,{component:r.p,href:"/content/rules/real-people",variant:"link",children:"work-safe images"})," ","and non-commercial use is permitted.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),(0,s.jsx)(l.x,{weight:500,component:"strong",td:"underline",children:"If you are this person or a legal representative of this person"}),", and would like to request the removal of this ","Bounty"===i?"bounty":"resource",", you can do so"," ",(0,s.jsx)(l.x,{component:r.p,href:"/content/rules/real-people",variant:"link",children:"here"}),"."]})}},30897:function(e,i,n){"use strict";n.d(i,{R:function(){return p}});var s=n(85893),t=n(95117),o=n(67841),l=n(79543),r=n(97118),a=n(9236),d=n(11163);n(67294);var c=n(17578),u=n(5779),h=n(54671),m=n(33299),x=n(52119);function p(e){let{children:i,nsfw:n,contentNsfwLevel:p,isLoading:g}=e,v=(0,c.xJ)(),j=(0,d.useRouter)(),{canViewNsfw:f}=(0,u.g)(),{status:y}=(0,m.useSession)();return(0,h.eq)(p)||"loading"!==y?f||!n&&(0,h._7)(p)?v||(0,h.eq)(p)?(0,s.jsx)(s.Fragment,{children:i}):g?(0,s.jsx)(x.w,{}):(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 p-3",children:[(0,s.jsx)(r.Z,{size:56}),(0,s.jsx)(t.x,{size:"xl",weight:500,children:"Sensitive Content"}),(0,s.jsx)(t.x,{children:"This content has been marked as NSFW"}),(0,s.jsx)(o.z,{component:l.p,href:"/login?returnUrl=".concat(j.asPath),leftIcon:(0,s.jsx)(a.Z,{}),children:"Log in to view"})]})}):g?(0,s.jsx)(x.w,{}):(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsx)(t.x,{children:"This content is not available on this site"})}):null}},82206:function(e,i,n){"use strict";n.d(i,{T:function(){return Z}});var s=n(85893),t=n(5044),o=n(40633),l=n(97564),r=n(95117),a=n(69469),d=n(67841),c=n(18060),u=n(19434);n(67294);var h=n(70096),m=n(64761),x=n(9094),p=n(7479);function g(){let{background:e}=(0,m.rZ)().fn.variant({color:"gray",variant:"filled"});return(0,s.jsx)(x.M,{style:{height:"100%",width:"100%",background:e,borderRadius:"100%"},children:(0,s.jsx)(p.Z,{})})}var v=n(65695);function j(){let{background:e}=(0,m.rZ)().fn.variant({color:"gray",variant:"filled"});return(0,s.jsx)(x.M,{style:{height:"100%",width:"100%",background:e,borderRadius:"100%"},children:(0,s.jsx)(v.Z,{})})}var f=n(63208),y=n(38615);function w(e){let{copied:i}=e,{background:n}=(0,m.rZ)().fn.variant({color:i?"green":"gray",variant:"filled"});return(0,s.jsx)(x.M,{style:{height:"100%",width:"100%",background:n,borderRadius:"100%"},children:i?(0,s.jsx)(f.Z,{}):(0,s.jsx)(y.Z,{})})}var b=n(31065);function k(){let{background:e}=(0,m.rZ)().fn.variant({color:"gray",variant:"filled"});return(0,s.jsx)(x.M,{style:{height:"100%",width:"100%",background:e,borderRadius:"100%"},children:(0,s.jsx)(b.Z,{})})}function I(){return(0,s.jsx)("svg",{viewBox:"0 0 60 60",focusable:"false",style:{pointerEvents:"none",display:"block",width:"100%",height:"100%"},children:(0,s.jsxs)("g",{fillRule:"nonzero",fill:"none",children:[(0,s.jsx)("path",{d:"M28.4863253 59.9692983c-6.6364044-.569063-11.5630204-2.3269561-16.3219736-5.8239327C4.44376366 48.4721168 3e-7 39.6467924 3e-7 29.9869344c0-14.8753747 10.506778-27.18854591 25.2744118-29.61975392 6.0281072-.9924119 12.7038532.04926445 18.2879399 2.85362966C57.1386273 10.0389054 63.3436516 25.7618627 58.2050229 40.3239688 54.677067 50.3216743 45.4153135 57.9417536 34.81395 59.5689067c-2.0856252.3201125-5.0651487.5086456-6.3276247.4003916z",fill:"#FF4500"}),(0,s.jsx)("path",{d:"M34.1335847 43.9991814c1.6336774-.3831682 2.81654-.7939438 3.9781753-1.3815065 3.6153903-1.8286959 5.8788354-4.8645264 5.8788354-7.8849481 0-.9131088.0196207-.9556355.780668-1.6923265.6040409-.5847092.8404012-.962515 1.044679-1.6698428.2433185-.8425206.2441028-.9826228.0100139-1.7878614-.6566532-2.2588075-3.0054252-3.2764371-5.1075029-2.212882l-.8124519.4110627-.837264-.5151716c-1.6101652-.9907471-4.473974-1.96108051-6.3205111-2.14155924-.5059537-.04945042-1.143803-.1235464-1.4174535-.16465815l-.4975382-.07474783.2136595-1.06953332c.1175125-.5882423.3623778-1.7491883.5441475-2.57987956.181767-.83069153.4095191-1.95749071.5061138-2.50399817.1396137-.78991765.2348596-.99365031.4645331-.99365031.1589005 0 1.2955101.21462853 2.5257988.4769522 1.2302915.26232367 2.2622022.47695193 2.293134.47695193.0309345 0 .1003234.23497925.154203.52217616.1363137.72661143.4902897 1.17780487 1.2134714 1.54674469 1.7356128.8854428 3.6891485-.29431302 3.6891485-2.22790474 0-2.3956262-2.9538443-3.44186625-4.4550019-1.57794377-.2901205.36022881-.4356746.42625561-.7154284.32453216-.1931649-.07023833-1.5202546-.3669593-2.9490951-.65938053-1.8923676-.38728585-2.6686067-.48706487-2.8582979-.36740978-.2896185.1826864-.2522224.047706-1.0501419 3.79055007-.9490696 4.45187338-1.0064011 4.70400786-1.0882029 4.78580828-.0432388.04324046-.729551.14596475-1.5251367.22827402-2.413687.24971784-5.06621906 1.10194849-6.8544721 2.20227189l-.8268564.5087695-.81204644-.4046587c-2.11972653-1.0563058-4.47243958-.0382468-5.1287215 2.2192841-.23408885.8052386-.23330375.9453408.0100166 1.7878614.20427624.7073278.44063816 1.0851336 1.04467744 1.6698428.76105187.736691.78066878.7792177.78066878 1.6923265 0 4.172347 4.28816886 8.1540991 10.01599352 9.3002929 1.8975637.3797217 2.0263168.3894072 4.4515526.3349143 1.5849893-.0356103 2.7274992-.1508298 3.6566327-.3687526zm-6.6864685-3.0300366c-1.3154638-.2961613-2.8032079-.9569232-3.2391341-1.4386156-.34760429-.384099-.198986-.9659493.246724-.9659493.1736296 0 .5801788.1805458.9034441.4012095 2.1828306 1.4900284 7.1085991 1.484628 9.2987021-.0101767.7054363-.4814861 1.2827246-.468194 1.3538857.0311679.0334854.234998-.1164569.4687666-.4771278.7438635-1.7511846 1.3356924-5.2646974 1.8738181-8.086494 1.2385197v-.000019zm-4.01196195-5.9075609c-.81902983-.4443886-1.22403999-1.1532958-1.22477787-2.143771-.000787-1.135302.52653614-1.8699603 1.59778946-2.2257735.76240766-.253232.85344696-.2532238 1.51689516.0001492 1.785415.6818561 2.1507834 2.909296.6724678 4.0996229-.7705198.6204159-1.7299516.7214286-2.56237455.2697724zm11.09588945.0732995c-.7590038-.3947507-1.1832989-.8746601-1.3628596-1.5414995-.3321829-1.2336253.2931784-2.4377233 1.5067529-2.9011953.6634485-.253373.754488-.2533812 1.5168976-.0001492 1.0712525.3558132 1.5986343 1.0904715 1.5977903 2.2257735-.0008141 1.0085002-.4138259 1.7116813-1.2587076 2.1427072-.7599699.3877084-1.3548626.4098285-1.9998736.0743633z",fill:"#FDFDFD"})]})})}var z=n(76083),C=n(5779),S=n(99490),M=n(86164);function Z(e){let{children:i,url:n,title:m,collect:x}=e,p=(0,c.V)({timeout:void 0}),{requireLogin:v}=(0,h.j)({reason:"add-to-collection"}),f=(0,C.g)(),{trackShare:y}=(0,M.K)(),b=n?"".concat(location.protocol,"//").concat(location.host).concat(n):location.href,Z=[{type:p.copied?"Copied":"Copy Url",onClick:()=>{y({platform:"clipboard",url:b}),p.copy(b)},render:(0,s.jsx)(w,{copied:p.copied})},{type:"Reddit",onClick:()=>{y({platform:"reddit",url:b}),window.open("https://www.reddit.com/submit?".concat(S.QS.stringify({url:b,title:m})))},render:(0,s.jsx)(I,{})},{type:"X",onClick:()=>{y({platform:"twitter",url:b}),window.open("https://twitter.com/intent/tweet?".concat(S.QS.stringify({url:b,text:m,via:"HelloCivitai"})))},render:(0,s.jsx)(t.k,{variant:"filled",color:"#000",size:60,radius:"xl",children:(0,s.jsx)(u.Z,{size:30})})},{type:"Other",onClick:()=>navigator.share({url:b,title:m}),render:(0,s.jsx)(k,{})}];return f.chat&&Z.unshift({type:"Send Chat",onClick:()=>v(()=>{(0,z.C)("chatShareModal",{message:b})}),render:(0,s.jsx)(g,{})}),x&&f.collections&&Z.unshift({type:"Save",onClick:()=>v(()=>(0,z.C)("addToCollection",x)),render:(0,s.jsx)(j,{})}),(0,s.jsxs)(o.J,{withArrow:!0,shadow:"md",position:"top-end",width:320,children:[(0,s.jsx)(o.J.Target,{children:i}),(0,s.jsx)(o.J.Dropdown,{children:(0,s.jsxs)(l.K,{children:[(0,s.jsx)(r.x,{weight:500,children:"Share"}),(0,s.jsx)(a.M,{cols:3,children:Z.map(e=>{let{type:i,onClick:n,render:t}=e;return(0,s.jsx)(d.z,{variant:"subtle",color:"gray",sx:{height:"auto"},p:0,onClick:n,children:(0,s.jsxs)(l.K,{spacing:6,align:"center",p:6,children:[(0,s.jsx)("div",{style:{height:60,width:60},children:t}),i]})},i)})})]})})]})}},57212:function(e,i,n){"use strict";n.d(i,{u:function(){return r}});var s=n(85893),t=n(64761),o=n(67841),l=n(55076);function r(e){let{data:i,value:n=[],onChange:r}=e,a=(0,t.rZ)(),d=(e,i)=>{let s=[...n],t=s.findIndex(i=>i===e);i?(-1===t?s.push(e):s.splice(t,1),null==r||r(s)):-1===t||s.length>1?null==r||r([e]):null==r||r([])};return(null==i?void 0:i.length)?(0,s.jsx)(l.S,{className:"flex gap-1",children:i.map(e=>{let i=n.includes(e.id);return(0,s.jsx)(o.z,{variant:i?"filled":"dark"===a.colorScheme?"filled":"light",color:i?"blue":"gray",onClick:i=>{let n=i.ctrlKey;d(e.id,n)},className:"uppercase",compact:!0,children:e.name},e.id)})}):null}},58928:function(e,i,n){"use strict";n.d(i,{G:function(){return a}});var s=n(67294),t=n(40828),o=n(58456),l=n(15131),r=n(72456);function a(e){let{type:i,entityType:n,entityId:a,details:d,nsfw:c,nsfwLevel:u}=e,h=r.SX.track.addView.useMutation(),m=(0,s.useRef)(null),{adsEnabled:x,adsBlocked:p}=(0,t.R)(),g=(0,l.s7)(e=>e.showNsfw),v=(0,o.bT)();return(0,s.useEffect)(()=>{let e=setTimeout(()=>{a!==m.current&&(m.current=a,h.mutate({type:i,entityType:n,entityId:a,details:d,ads:p?"Blocked":x?"Served":"Off",nsfw:null!=c?c:g,browsingLevel:v,nsfwLevel:u}))},1e3);return()=>{clearTimeout(e)}},[a,i,n,d]),null}},10699:function(e,i,n){"use strict";n.d(i,{HF:function(){return r},em:function(){return a},im:function(){return l},uP:function(){return d}});var s=n(17578),t=n(2807),o=n(72456);let l=()=>{let e=o.SX.useContext(),i=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"There was an error while performing your request";try{console.log(JSON.stringify(e));let n=JSON.parse(e.message);(0,t.s9)({title:i,error:n})}catch(n){(0,t.s9)({title:i,error:Error(e.message)})}},n=o.SX.vault.toggleModelVersion.useMutation({onSuccess:async(i,n)=>{let{modelVersionId:s}=n;await e.vault.isModelVersionInVault.setData({modelVersionId:s},e=>!e)},onError:e=>{i(e,"Failed to toggle model version")}}),s=o.SX.vault.updateItemsNotes.useMutation({onSuccess:async()=>{await e.vault.getItemsPaged.invalidate()},onError:e=>{i(e,"Failed to update notes on these vault items")}}),l=o.SX.vault.removeItemsFromVault.useMutation({onSuccess:async()=>{await e.vault.getItemsPaged.invalidate(),await e.vault.get.invalidate()},onError:e=>{i(e,"Failed to rmeove these items from your Vault")}});return{toggleModelVersion:e=>n.mutateAsync(e),togglingModelVersion:n.isLoading,updateItemsNotes:e=>s.mutateAsync(e),updatingItemsNotes:s.isLoading,removeItems:e=>l.mutateAsync(e),removingItems:l.isLoading}},r=()=>{let e=(0,s.xJ)(),{data:i,...n}=o.SX.vault.get.useQuery(void 0,{enabled:!!e});return{vault:i,...n}},a=(e,i)=>{let n=(0,s.xJ)(),{data:t,...l}=o.SX.vault.getItemsPaged.useQuery({...e},{enabled:!!n,...i});if(t){let{items:e=[],...i}=t;return{items:e,pagination:i,...l}}return{items:[],pagination:null,...l}},d=e=>({models:"/api/download/vault/".concat(e.id,"?type=model"),images:"/api/download/vault/".concat(e.id,"?type=images"),details:"/api/download/vault/".concat(e.id,"?type=details")})},15208:function(e,i,n){"use strict";n.d(i,{y:function(){return l}});var s=n(84137),t=n(67294);function o(e){if(e)try{return JSON.parse(e)}catch(i){return e}}function l(e){let{type:i,key:n,defaultValue:l,getInitialValueInEffect:r=!0,deserialize:a=o,serialize:d=e=>(function(e){try{return JSON.stringify(e)}catch(e){throw Error("Failed to serialize the value")}})(e)}=e,c="use-storage",u=(0,t.useCallback)(e=>{if(!(i in window)||null===window[i]||e)return l;let s=window[i].getItem(n);return null!==s?a(s):l},[n,l]),[h,m]=(0,t.useState)(u(r)),x=(0,t.useCallback)(e=>{e instanceof Function?m(s=>{let t=e(s);return window[i].setItem(n,d(t)),window.dispatchEvent(new CustomEvent(c,{detail:{key:n,value:e(s)}})),t}):(window[i].setItem(n,d(e)),window.dispatchEvent(new CustomEvent(c,{detail:{key:n,value:e}})),m(e))},[n]),p=(0,t.useCallback)(()=>{window[i].removeItem(n),window.dispatchEvent(new CustomEvent(c,{detail:{key:n,value:l}}))},[]);return(0,s.s)("storage",e=>{if(e.storageArea===window[i]&&e.key===n){var s;m(a(null!==(s=e.newValue)&&void 0!==s?s:void 0))}}),(0,s.s)(c,e=>{e.detail.key===n&&m(e.detail.value)}),(0,t.useEffect)(()=>{void 0!==l&&void 0===h&&x(l)},[l,h,x]),(0,t.useEffect)(()=>{r&&m(u())},[]),[void 0===h?l:h,x,p]}},22979:function(e,i,n){"use strict";let s,t,o,l;n.r(i),n.d(i,{__N_SSP:function(){return s9},default:function(){return te}});var r=n(85893),a=n(9094),d=n(74403),c=n(95117),u=n(72445),h=n(97564),m=n(71232),x=n(19236),p=n(88393),g=n(54685),v=n(88002),j=n(49834),f=n(20966),y=n(54777),w=n(17789),b=n(5044),k=n(67841),I=n(82623),z=n(64523),C=n(56817),S=n(91759),M=n(25963),Z=n(14102),T=n(90693),A=n(65695),P=n(83425),D=n(88269),N=n(94454),B=n(38047),E=n(21955),V=(0,E.Z)("outline","repeat","IconRepeat",[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]]),L=n(36571),R=n(74943),U=n(94351),W=n(60254),G=n(7893),F=n(25954),O=n(19337),_=(0,E.Z)("outline","lock-off","IconLockOff",[["path",{d:"M15 11h2a2 2 0 0 1 2 2v2m0 4a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2h4",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-3m.719 -3.289a4 4 0 0 1 7.281 2.289v4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),X=n(78308),K=(0,E.Z)("outline","archive","IconArchive",[["path",{d:"M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]]),J=n(39782),H=n(49482),Y=n(29488),q=n(98729),Q=(0,E.Z)("outline","arrows-left-right","IconArrowsLeftRight",[["path",{d:"M21 17l-18 0",key:"svg-0"}],["path",{d:"M6 10l-3 -3l3 -3",key:"svg-1"}],["path",{d:"M3 7l18 0",key:"svg-2"}],["path",{d:"M18 20l3 -3l-3 -3",key:"svg-3"}]]),$=n(98883),ee=n(41149),ei=n(84993),en=n(11163),es=n(67294),et=n(70652),eo=n(42161),el=n(1566),er=n(62827),ea=n(49737),ed=n(6564),ec=(0,E.Z)("outline","rocket-off","IconRocketOff",[["path",{d:"M9.29 9.275a9.03 9.03 0 0 0 -.29 .725a6 6 0 0 0 -5 3a8 8 0 0 1 7 7a6 6 0 0 0 3 -5c.241 -.085 .478 -.18 .708 -.283m2.428 -1.61a9 9 0 0 0 2.864 -6.107a3 3 0 0 0 -3 -3a9 9 0 0 0 -6.107 2.864",key:"svg-0"}],["path",{d:"M7 14a6 6 0 0 0 -3 6a6 6 0 0 0 6 -3",key:"svg-1"}],["path",{d:"M15 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),eu=(0,E.Z)("outline","sparkles","IconSparkles",[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",key:"svg-0"}]]),eh=n(21782),em=n(58456),ex=n(9354),ep=n(75085),eg=n(4586),ev=n(11363),ej=n(50579),ef=n(26339);function ey(e){let{data:i,render:n,extra:s,height:t,itemId:o,id:l,empty:a,itemWrapperProps:d,viewportClassName:c}=e,{columnCount:u,columnWidth:h,maxSingleColumnWidth:m}=(0,ef.a)(),x=i.length+(s?1:0);return i.length?(0,r.jsxs)(ev.l,{classNames:{viewport:c},slideSize:u>1?"336px":"100%",slideGap:16,align:x<=u?"start":"end",withControls:x>u,slidesToScroll:u,controlSize:32,loop:!0,style:{width:1===u?m:"100%",maxWidth:"100%",margin:"0 auto",minHeight:t},children:[i.map((e,i)=>{let s=o?o(e):i;return(0,es.createElement)(ev.l.Slide,{...d,key:s,id:s.toString()},ew(n,i,e,t))}),s&&(0,r.jsx)(ev.l.Slide,{children:s})]},l):(0,r.jsx)("div",{style:{height:h},children:a})}let ew=(0,ej.Z)([eg.Z,{},WeakMap,eg.Z],(e,i,n,s)=>(0,r.jsx)(e,{index:i,data:n,height:s}));var eb=n(28663),ek=n(17578),eI=n(76083),ez=n(5779),eC=n(72456);function eS(e){let{fromId:i,type:n,label:s,ownerId:t,versionId:o}=e,l=(0,ek.xJ)(),a=(0,ez.g)(),d=(null==l?void 0:l.isModerator)||(null==l?void 0:l.id)===t,u=(0,em.bT)(),{data:p=[],isLoading:g}=eC.SX.model.getAssociatedResourcesCardData.useQuery({fromId:i,type:n,browsingLevel:u}),{data:v,isInitialLoading:j}=(0,eh.f)({modelVersionId:o},{enabled:!!o&&a.recommenders}),f=[...p,...v],y=()=>{(0,eI.C)("associateModels",{fromId:i,type:n,versionId:o})};return d||f.length?(0,r.jsx)(ef.g,{maxColumnCount:4,children:(0,r.jsx)(eb.r,{my:"xl",pt:"xl",pb:"xl",sx:e=>({background:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[1]}),children:e=>{let{columnCount:i}=e;return(0,r.jsxs)(h.K,{pb:i>1&&p.length?20:void 0,children:[(0,r.jsxs)(m.Z,{children:[(0,r.jsx)(x.D,{order:2,children:s}),d&&(0,r.jsxs)(k.z,{size:"xs",variant:"outline",onClick:y,children:["Manage ",n," Resources"]})]}),g||j?(0,r.jsx)("div",{style:{position:"relative",height:310},children:(0,r.jsx)(ea.f,{visible:!0})}):f.length?(0,r.jsx)(ey,{itemWrapperProps:{style:{paddingTop:4,paddingBottom:4}},data:f,viewportClassName:"py-4",render:e=>{let{data:i,...n}=e;return"model"===i.resourceType?(0,r.jsx)(ep.L,{...n,data:i,"data-activity":"follow-suggestion:model",forceInView:!0}):"recommended"===i.resourceType?(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsx)(eM,{}),(0,r.jsx)(ep.L,{...n,data:i,"data-activity":"follow-suggestion:model",forceInView:!0})]}):(0,r.jsx)(ex.T,{...n,data:i,"data-activity":"follow-suggestion:article"})},itemId:e=>e.id}):(0,r.jsxs)(m.Z,{spacing:"xs",mt:"xs",children:[(0,r.jsx)(b.k,{color:"gray",size:"xl",radius:"xl",children:(0,r.jsx)(ec,{})}),(0,r.jsx)(c.x,{size:"lg",color:"dimmed",children:"You aren't suggesting any other resources yet..."})]})]})}})}):null}function eM(){return(0,r.jsxs)(ed.z,{width:300,withArrow:!0,withinPortal:!0,children:[(0,r.jsx)(ed.z.Target,{children:(0,r.jsx)(b.k,{gradient:{from:"#4776E6",to:"#8E54E9",deg:90},variant:"gradient",radius:"xl",size:"md",className:"absolute -right-2 -top-2 z-10",children:(0,r.jsx)(eu,{size:16,stroke:1.5,fill:"currentColor"})})}),(0,r.jsxs)(ed.z.Dropdown,{px:"md",py:8,children:[(0,r.jsx)(c.x,{size:"sm",weight:600,color:"white",children:"AI Recommended"}),(0,r.jsx)(c.x,{size:"xs",children:"This resource has been recommended by Civitai AI"})]})]})}var eZ=n(27338),eT=n(44446),eA=n(78830),eP=n(76326),eD=n(40572),eN=n(75566),eB=n(61271),eE=n(67614),eV=n(16045),eL=n(71033),eR=n(97118),eU=n(84667),eW=n(41071),eG=n(97012),eF=n(61119),eO=n(43597),e_=n(36061),eX=n(12902),eK=n(2807);let eJ=e=>{let{modelId:i}=e,n=eC.SX.useUtils(),{data:s,isLoading:t}=eC.SX.model.getGallerySettings.useQuery({id:i}),o=eC.SX.model.updateGallerySettings.useMutation({onMutate:async e=>{let{id:i,gallerySettings:s}=e;await n.model.getGallerySettings.cancel({id:i}),await n.image.getImagesAsPostsInfinite.cancel();let t=n.model.getGallerySettings.getData({id:i});return n.model.getGallerySettings.setData({id:i},(0,eX.ZP)(e=>e?{...e,...s}:e)),{previousSettings:t}},onError:(e,i,s)=>{let{id:t}=i;(0,eK.s9)({title:"Unable to update gallery settings",error:Error(e.message)}),n.model.getGallerySettings.setData({id:t},null==s?void 0:s.previousSettings)}}),l=async e=>{var i,n,t,l,r,a,d,c,u;let{modelId:h,images:m,tags:x,users:p,level:g,pinnedPosts:v}=e;if(!s)return;let j={hiddenImages:m?m.some(e=>s.hiddenImages.includes(e.id))?s.hiddenImages.filter(e=>!m.find(i=>i.id===e)):[...s.hiddenImages,...m.map(e=>e.id)]:null!==(l=null==s?void 0:s.hiddenImages)&&void 0!==l?l:[],hiddenTags:x?x.some(e=>s.hiddenTags.map(e=>e.id).includes(e.id))?s.hiddenTags.filter(e=>!x.find(i=>i.id===e.id)):[...s.hiddenTags,...x]:null!==(r=null==s?void 0:s.hiddenTags)&&void 0!==r?r:[],hiddenUsers:p?p.some(e=>s.hiddenUsers.map(e=>e.id).includes(e.id))?s.hiddenUsers.filter(e=>!p.find(i=>i.id===e.id)):[...s.hiddenUsers,...p]:null!==(a=null==s?void 0:s.hiddenUsers)&&void 0!==a?a:[],level:null!=g?g:null==s?void 0:s.level,pinnedPosts:v?v.postIds.some(e=>{var i,n;return(null!==(n=null===(i=s.pinnedPosts)||void 0===i?void 0:i[v.modelVersionId])&&void 0!==n?n:[]).includes(e)})?{...s.pinnedPosts,[v.modelVersionId]:null!==(d=null===(n=s.pinnedPosts)||void 0===n?void 0:null===(i=n[v.modelVersionId])||void 0===i?void 0:i.filter(e=>!v.postIds.includes(e)))&&void 0!==d?d:[]}:{...s.pinnedPosts,[v.modelVersionId]:[...null!==(c=null===(t=s.pinnedPosts)||void 0===t?void 0:t[v.modelVersionId])&&void 0!==c?c:[],...v.postIds]}:null!==(u=null==s?void 0:s.pinnedPosts)&&void 0!==u?u:{}};return o.mutateAsync({id:h,gallerySettings:j})},r=eC.SX.model.copyGallerySettings.useMutation({onSuccess:async()=>{await n.model.getGallerySettings.invalidate({id:i})},onError:e=>{(0,eK.s9)({title:"Unable to copy gallery moderation preferences",error:Error(e.message)})}}),a=async e=>{await r.mutateAsync({id:e})};return{gallerySettings:s,loading:t,toggle:l,updating:o.isLoading,copySettings:a,copySettingsLoading:r.isLoading}};var eH=n(64761),eY=n(33704),eq=n(65729),eQ=(0,E.Z)("outline","automatic-gearbox","IconAutomaticGearbox",[["path",{d:"M17 17v4h1a2 2 0 1 0 0 -4h-1z",key:"svg-0"}],["path",{d:"M17 11h1.5a1.5 1.5 0 0 0 0 -3h-1.5v5",key:"svg-1"}],["path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M5 7v3a1 1 0 0 0 1 1h3v7a1 1 0 0 0 1 1h3",key:"svg-3"}],["path",{d:"M9 11h4",key:"svg-4"}]]),e$=n(88382),e0=(0,E.Z)("filled","pin-filled","IconPinFilled",[["path",{d:"M15.113 3.21l.094 .083l5.5 5.5a1 1 0 0 1 -1.175 1.59l-3.172 3.171l-1.424 3.797a1 1 0 0 1 -.158 .277l-.07 .08l-1.5 1.5a1 1 0 0 1 -1.32 .082l-.095 -.083l-2.793 -2.792l-3.793 3.792a1 1 0 0 1 -1.497 -1.32l.083 -.094l3.792 -3.793l-2.792 -2.793a1 1 0 0 1 -.083 -1.32l.083 -.094l1.5 -1.5a1 1 0 0 1 .258 -.187l.098 -.042l3.796 -1.425l3.171 -3.17a1 1 0 0 1 1.497 -1.26z",key:"svg-0"}]]),e1=n(68566),e2=n(75471),e3=n(28075),e4=n(79323),e5=n(85120),e8=n(39164),e6=n(24121),e7=n(49987),e9=n(65521),ie=n(79543),ii=n(80354),is=n(40099),it=n(58192),io=n(97693),il=n(65297),ir=n(31483),ia=n(38498),id=n(3153),ic=n(48600);function iu(e){var i,n,s,t,o;let{data:l,width:a,height:d}=e,u=(0,eH.rZ)(),{classes:x,cx:g}=im(),f=(0,ez.g)(),y=eC.SX.useUtils(),{modelVersions:k,showModerationOptions:z,model:C,filters:S}=no(),M=null==k?void 0:k.find(e=>e.id===l.modelVersionId),Z=null!==(o=l.postId)&&void 0!==o?o:void 0,A=S.modelVersionId,P=!M&&l.images.some(e=>{var i;return null===(i=e.modelVersionIds)||void 0===i?void 0:i.includes(A)}),D=!M&&l.images.some(e=>{var i;return null===(i=e.modelVersionIdsManual)||void 0===i?void 0:i.includes(A)}),N=l.images[0],[B,E]=(0,es.useState)(null),[V,L]=(0,es.useState)([]),{gallerySettings:U,toggle:W}=eJ({modelId:C.id}),G=async e=>{let{imageId:i,user:n}=e;z&&C&&(await W({modelId:C.id,images:i?[{id:i}]:void 0,users:n?[n]:void 0}).catch(()=>null),S.hidden&&await y.image.getImagesAsPostsInfinite.invalidate({...S}))},F=async e=>{let{postId:i,alreadyPinned:n}=e;if(C)try{await W({modelId:C.id,pinnedPosts:{modelVersionId:A,postIds:[i]}}),(0,eK.LX)({title:n?"Post unpinned":"Post pinned",message:n?"This post has been removed from the top of the gallery":"This post has been pinned and will appear at the top of the gallery for new visitors"})}catch(e){return null}};(0,es.useEffect)(()=>{if(!B)return;L(B.slidesInView(!0));let e=()=>L([...B.slidesInView(!0),...B.slidesInView()]);return B.on("select",e),()=>{B.off("select",e)}},[B]);let O=l.images.map(e=>e.id).join("_"),_=(0,es.useMemo)(()=>"".concat(O,"_").concat(a),[O,a]),X=e=>{var i,n,s,t,o;if(!z)return null;let l=!!U&&U.hiddenImages.indexOf(e.id)>-1,a=!!U&&U.hiddenUsers.findIndex(i=>i.id===e.user.id)>-1,d=!!U&&!!e.postId&&(null===(n=U.pinnedPosts)||void 0===n?void 0:null===(i=n[A])||void 0===i?void 0:i.includes(e.postId)),u=!!U&&(null!==(o=null===(t=U.pinnedPosts)||void 0===t?void 0:null===(s=t[A])||void 0===s?void 0:s.length)&&void 0!==o?o:0)>=ia._G.modelGallery.maxPinnedPosts;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Label,{children:"Gallery Moderation"},"menu-label"),e.postId?(0,r.jsx)(v.v.Item,{icon:d?(0,r.jsx)(eY.Z,{size:16,stroke:1.5}):(0,r.jsx)(eq.Z,{size:16,stroke:1.5}),sx:{alignItems:u?"flex-start":"center"},disabled:!d&&u,onClick:()=>F({postId:e.postId,alreadyPinned:d}),children:d?"Unpin this post":(0,r.jsxs)(h.K,{spacing:2,children:[(0,r.jsx)(c.x,{inline:!0,children:"Pin this post"}),u&&(0,r.jsx)(c.x,{size:"xs",color:"yellow",children:"Pin limit reached"})]})},"pin-post"):null,(0,r.jsx)(v.v.Item,{onClick:()=>G({imageId:e.id}),children:l?"Unhide image from gallery":"Hide image from gallery"},"hide-image-gallery"),(0,r.jsx)(v.v.Item,{onClick:()=>G({user:e.user}),children:a?"Show content from this user":"Hide content from this user"},"hide-user-gallery")]})},K=!!(null===(i=l.review)||void 0===i?void 0:i.recommended),J=!!U&&(null===(s=U.pinnedPosts)||void 0===s?void 0:null===(n=s[A])||void 0===n?void 0:n.includes(l.postId)),H=l.user.id===(null==C?void 0:C.user.id),q=d-58-8-0,Q=null===(t=l.images.find(e=>(0,ic.$K)(e.cosmetic)))||void 0===t?void 0:t.cosmetic,ee=(null==Q?void 0:Q.data)||J?{...null==Q?void 0:Q.data,...J?{border:u.colors.orange[u.fn.primaryShade()],borderWidth:2}:void 0}:void 0,{ref:ei,inView:en}=(0,ir.Y)({key:ee?1:0});return(0,r.jsx)(io.A,{className:"w-full",cosmetic:ee,style:ee?{height:d}:void 0,children:(0,r.jsxs)(r.Fragment,{children:[J&&(0,r.jsx)(ih,{radius:"xl",color:"orange",size:"md",iconProps:{size:16,stroke:1.5}}),(0,r.jsxs)(it.I,{style:ee?void 0:{height:d},className:g({border:!J}),ref:ei,children:[(0,r.jsx)(e9.R,{...N,className:g("opacity-70",Q&&"rounded-b-lg")}),-1!==l.user.id&&(0,r.jsx)(I.X,{p:"xs",radius:0,className:g("h-[58px] z-[2]",Q&&"rounded-t-lg "),children:en&&(0,r.jsxs)(m.Z,{spacing:8,align:"flex-start",position:"apart",noWrap:!0,children:[(0,r.jsx)(il.Y,{user:l.user,subText:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,children:[l.publishedAt?(0,r.jsx)(e2.i,{date:l.publishedAt}):(0,r.jsx)(c.x,{children:"Not published"}),(P||D)&&(0,r.jsxs)(m.Z,{ml:6,spacing:4,children:[P&&(0,r.jsx)(p.u,{label:"Auto-detected resource",withArrow:!0,children:(0,r.jsx)(b.k,{color:"teal",variant:"light",radius:"xl",size:18,children:(0,r.jsx)(eQ,{size:16})})}),D&&(0,r.jsx)(p.u,{label:"Manually-added resource",withArrow:!0,children:(0,r.jsx)(b.k,{color:"cyan",variant:"light",radius:"xl",size:18,children:(0,r.jsx)(e$.Z,{size:16})})})]})]}),subTextForce:!0,size:"md",spacing:"xs",badge:H?(0,r.jsx)(w.C,{size:"xs",color:"violet",radius:"xl",children:"OP"}):null,withUsername:!0,linkToProfile:!0}),(0,r.jsxs)(m.Z,{spacing:8,position:"right",noWrap:!0,children:[!l.publishedAt&&(0,r.jsx)(p.u,{label:"Post not Published",withArrow:!0,children:(0,r.jsx)(ie.p,{href:"/posts/".concat(l.postId,"/edit"),children:(0,r.jsx)(j.A,{color:"red",variant:"outline",children:(0,r.jsx)(Y.Z,{})})})}),l.review?(0,r.jsx)(eD.v4,{name:"resourceReview",state:{reviewId:l.review.id},children:(0,r.jsx)(w.C,{variant:"light",radius:"md",size:"lg",style:{userSelect:"none",padding:4,height:"auto"},color:K?"success.5":"red",children:(0,r.jsxs)(m.Z,{spacing:4,noWrap:!0,children:[K?(0,r.jsx)(is.l,{filled:!0}):(0,r.jsx)(is.k,{filled:!0}),l.review.details&&(0,r.jsx)($.Z,{size:18,strokeWidth:2.5})]})})}):null]})]})}),(0,r.jsx)("div",{className:"relative flex-1 overflow-hidden opacity-0 transition-opacity",style:{opacity:en?1:0},children:en&&(0,r.jsx)(r.Fragment,{children:1===l.images.length?(0,r.jsx)(e7.kL,{image:N,children:e=>{var i,n,s,t,o,l,a,d,c;return(0,r.jsxs)(r.Fragment,{children:[N.onSite&&(0,r.jsx)(e8.K,{isRemix:!!N.remixOfId}),(0,r.jsx)(e7.kL.BlurToggle,{className:"absolute left-2 top-2 z-10"}),e&&(0,r.jsxs)(h.K,{spacing:"xs",className:"absolute right-2 top-2 z-10",children:[(0,r.jsx)(e5.t,{image:N,additionalMenuItems:X(N)}),f.imageGeneration&&(null!==(a=N.hasPositivePrompt)&&void 0!==a?a:N.hasMeta)&&(0,r.jsx)(e1.Z,{label:"Remix",size:30,color:"white",variant:"filled","data-activity":"remix:model-gallery",onClick:e=>{e.preventDefault(),e.stopPropagation(),id.Ft.open({type:N.type,id:N.id})},children:(0,r.jsx)(T.Z,{stroke:2.5,size:16})})]}),(0,r.jsx)(eD.v4,{name:"imageDetail",state:{imageId:N.id,images:[N]},className:x.link,children:(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsx)(e3.P,{metadata:N.metadata,src:N.url,thumbnailUrl:N.thumbnailUrl,name:null!==(d=N.name)&&void 0!==d?d:N.id.toString(),alt:null!==(c=N.name)&&void 0!==c?c:void 0,type:N.type,width:450,placeholder:"empty",wrapperProps:{style:{zIndex:1}},skip:(0,e4.Bn)(N),fadeIn:!0,className:"z-[1] object-cover"})})}),(0,r.jsx)(ii.J,{entityId:N.id,entityType:"image",reactions:N.reactions,metrics:{likeCount:null===(i=N.stats)||void 0===i?void 0:i.likeCountAllTime,dislikeCount:null===(n=N.stats)||void 0===n?void 0:n.dislikeCountAllTime,heartCount:null===(s=N.stats)||void 0===s?void 0:s.heartCountAllTime,laughCount:null===(t=N.stats)||void 0===t?void 0:t.laughCountAllTime,cryCount:null===(o=N.stats)||void 0===o?void 0:o.cryCountAllTime,tippedAmountCount:null===(l=N.stats)||void 0===l?void 0:l.tippedAmountCountAllTime},readonly:!e,className:x.reactions,targetUserId:N.user.id}),N.hasMeta&&(0,r.jsx)("div",{className:"absolute bottom-0.5 right-0.5 z-10",children:(0,r.jsx)(e6.C,{imageId:N.id,type:N.type,children:(0,r.jsx)(j.A,{variant:"transparent",size:"lg",children:(0,r.jsx)(R.Z,{color:"white",filter:"drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))",opacity:.8,strokeWidth:2.5,size:26})})})})]})}}):(0,r.jsx)(ev.l,{withControls:!0,draggable:!0,loop:!0,style:{flex:1},withIndicators:!0,controlSize:32,height:q,getEmblaApi:E,styles:{indicators:{bottom:-8,zIndex:5,display:"flex",gap:1},indicator:{width:"auto",height:8,flex:1,transition:"width 250ms ease",borderRadius:0,boxShadow:"0 0 3px rgba(0, 0, 0, .3)"}},children:l.images.map((e,i)=>(0,r.jsx)(ev.l.Slide,{children:V.includes(i)&&(0,r.jsx)(e7.kL,{image:e,connectType:"post",connectId:Z,children:i=>{var n,s,t,o,a,d,c,u,m;return(0,r.jsxs)(r.Fragment,{children:[e.onSite&&(0,r.jsx)(e8.K,{isRemix:!!e.remixOfId}),(0,r.jsx)(e7.kL.BlurToggle,{className:"absolute left-2 top-2 z-10"}),i&&(0,r.jsxs)(h.K,{spacing:"xs",className:"absolute right-2 top-2 z-10",children:[(0,r.jsx)(e5.t,{image:e,additionalMenuItems:X(e)}),f.imageGeneration&&(null!==(c=e.hasPositivePrompt)&&void 0!==c?c:e.hasMeta)&&(0,r.jsx)(e1.Z,{label:"Remix",size:30,color:"white",variant:"filled","data-activity":"remix:model-gallery",onClick:i=>{i.preventDefault(),i.stopPropagation(),id.Ft.open({type:e.type,id:e.id})},children:(0,r.jsx)(T.Z,{stroke:2.5,size:16})})]}),(0,r.jsx)(eD.v4,{name:"imageDetail",state:{imageId:e.id,images:l.images},className:x.link,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e9.R,{...e,className:"opacity-70"}),i&&(0,r.jsx)(e3.P,{metadata:e.metadata,src:e.url,thumbnailUrl:e.thumbnailUrl,name:null!==(u=e.name)&&void 0!==u?u:e.id.toString(),alt:null!==(m=e.name)&&void 0!==m?m:void 0,type:e.type,width:450,placeholder:"empty",wrapperProps:{style:{zIndex:1}},skip:(0,e4.Bn)(e),fadeIn:!0,className:"z-[1] object-cover"})]})}),(0,r.jsx)(ii.J,{entityId:e.id,entityType:"image",reactions:e.reactions,metrics:{likeCount:null===(n=e.stats)||void 0===n?void 0:n.likeCountAllTime,dislikeCount:null===(s=e.stats)||void 0===s?void 0:s.dislikeCountAllTime,heartCount:null===(t=e.stats)||void 0===t?void 0:t.heartCountAllTime,laughCount:null===(o=e.stats)||void 0===o?void 0:o.laughCountAllTime,cryCount:null===(a=e.stats)||void 0===a?void 0:a.cryCountAllTime,tippedAmountCount:null===(d=e.stats)||void 0===d?void 0:d.tippedAmountCountAllTime},readonly:!i,className:x.reactions,targetUserId:e.user.id}),e.hasMeta&&(0,r.jsx)("div",{className:"absolute bottom-0.5 right-0.5 z-10",children:(0,r.jsx)(e6.C,{imageId:e.id,type:e.type,children:(0,r.jsx)(j.A,{variant:"transparent",size:"lg",children:(0,r.jsx)(R.Z,{color:"white",filter:"drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))",opacity:.8,strokeWidth:2.5,size:26})})})})]})}})},e.id))},_)})})]})]})})}function ih(e){let{iconProps:i,className:n,...s}=e;return(0,r.jsxs)(ed.z,{width:300,withArrow:!0,withinPortal:!0,children:[(0,r.jsx)(ed.z.Target,{children:(0,r.jsx)(b.k,{...s,className:"absolute -right-2.5 -top-2.5 z-10",children:(0,r.jsx)(e0,{...i})})}),(0,r.jsxs)(ed.z.Dropdown,{px:"md",py:8,children:[(0,r.jsx)(c.x,{size:"sm",weight:600,color:"white",children:"Pinned Post"}),(0,r.jsx)(c.x,{size:"xs",children:"The creator of this post has pinned this because it is an excellent showcase of the resource's ability"})]})]})}let im=(0,C.k)(e=>({title:{lineHeight:1.1,fontSize:14,color:"white",fontWeight:500},link:{width:"100%",height:"100%",display:"flex",justifyContent:"center"},reactions:{position:"absolute",bottom:6,left:6,borderRadius:e.radius.sm,background:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[6],.6):e.colors.gray[0],boxShadow:"0 -2px 6px 1px rgba(0,0,0,0.16)",padding:4,zIndex:1}}));var ix=n(88557),ip=n(49926),ig=n(81644),iv=n(55964),ij=n(70096),iy=n(56053),iw=n(14821),ib=n(21017),ik=n(22870),iI=n(40633),iz=n(73723),iC=n(64002),iS=n(94707),iM=n(11621),iZ=n(77488),iT=n(11900),iA=n(38090),iP=n(72050),iD=n(66214),iN=n(47838);function iB(e){var i;let{prompt:n,opened:s,versionId:t,modelId:o,nextIndex:l,onClose:a}=e,d=eC.SX.useContext(),c=(0,iD.cI)({schema:iN.QL,defaultValues:{...n,id:t,modelId:o,index:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:l}}),u=eC.SX.modelVersion.upsertExplorationPrompt.useMutation();(0,es.useEffect)(()=>{n?c.reset({...n,id:t,modelId:o}):c.reset({id:t,modelId:o,index:l})},[o,n,t]);let x=!!(null==n?void 0:n.name);return(0,r.jsx)(iA.u,{opened:s,onClose:a,title:x?"Editing ".concat(n.name," Prompt"):"Add Explorable Prompt",children:(0,r.jsx)(iD.l0,{form:c,onSubmit:e=>{u.mutate(e,{async onSuccess(){await d.modelVersion.getExplorationPromptsById.invalidate({id:t}),a()}})},children:(0,r.jsxs)(h.K,{spacing:"xs",children:[(0,r.jsx)(el.L,{icon:(0,r.jsx)(iP.Z,{}),px:"xs",children:"This will generate images similar to the one you've selected with the level of variation driven by your selection below."}),x?(0,r.jsx)(iD.oH,{name:"name",type:"hidden",clearable:!1,hidden:!0}):(0,r.jsx)(iD.oH,{name:"name",label:"Display name",placeholder:"e.g.: Unicorn kitten",withAsterisk:!0}),(0,r.jsx)(iD.zg,{name:"prompt",label:"Prompt",placeholder:"e.g.: A kitten with a unicorn horn",rows:3,autosize:!0,withAsterisk:!0}),(0,r.jsx)(iD.oH,{name:"id",type:"hidden",clearable:!1,hidden:!0}),(0,r.jsx)(iD.oH,{name:"modelId",type:"hidden",clearable:!1,hidden:!0}),(0,r.jsx)(m.Z,{position:"right",children:(0,r.jsx)(k.z,{type:"submit",loading:u.isLoading,children:x?"Save":"Add"})})]})})})}var iE=n(57632),iV=n(524),iL=n(27943);let iR={},iU=()=>{let e;if(iV.O.NEXT_PUBLIC_PICFINDER_API_KEY&&iV.O.NEXT_PUBLIC_PICFINDER_WS_ENDPOINT){if(t)return t;if(o){if(o.readyState===WebSocket.OPEN)return Promise.resolve(o);o.close(),o=void 0}return t=new Promise((i,n)=>{let l=new WebSocket(iV.O.NEXT_PUBLIC_PICFINDER_WS_ENDPOINT);l.onopen=()=>{let e={apiKey:iV.O.NEXT_PUBLIC_PICFINDER_API_KEY};s&&(e.connectionSessionUUID=s),(o=l).send(JSON.stringify({newConnection:e}))},l.onmessage=n=>{let t=JSON.parse(n.data);if(t.newConnectionSessionUUID&&(s=t.newConnectionSessionUUID.connectionSessionUUID,i(l)),t.newImages)for(let e of t.newImages.images)iR[e.taskUUID]&&iR[e.taskUUID](e);e&&clearTimeout(e),e=setTimeout(()=>l.close(),6e4)},l.onclose=()=>{o=void 0,t=void 0}})}},iW=async e=>{try{let i=await iU();null==i||i.send(JSON.stringify(e))}catch(e){console.error("PicFinder API Error: Couldn't setup connection",e)}},iG=()=>Math.floor(100*Math.random()),iF=e=>{var i,n;let s="".concat(e.modelId,":").concat((0,iL.Ld)(e.promptText));return l||(l=JSON.parse(null!==(i=localStorage.getItem("picfinder-request-offset"))&&void 0!==i?i:"{}")),void 0===l[s]?l[s]=iG():l[s]+=null!==(n=e.numberResults)&&void 0!==n?n:1,localStorage.setItem("picfinder-request-offset",JSON.stringify(l)),l[s]},iO=(e,i)=>{var n;return iW({newTask:{taskUUID:e=null!=e?e:(0,iE.Z)(),taskType:1,numberResults:null!==(n=i.numberResults)&&void 0!==n?n:1,sizeId:2,steps:30,modelId:3,gScale:7.5,offset:iF(i),...i}}),e},i_=(0,C.k)((e,i,n)=>({label:{padding:"0 ".concat(e.spacing.xs,"px"),"&[data-checked]":{"&, &:hover":{backgroundColor:e.colors.blue[e.fn.primaryShade()],color:e.white},["& .".concat(n("iconWrapper"))]:{display:"none"}}},iconWrapper:{ref:n("iconWrapper")},root:{display:"flex"},nextButton:{backgroundColor:e.colors.gray[0],color:e.colors.dark[9],opacity:.65,transition:"opacity 300ms ease","&:hover":{opacity:1,backgroundColor:e.colors.gray[0]},'&[data-loading="true"]':{backgroundColor:e.colors.dark[6]}}}));function iX(e){var i,n,s,t;let{columnWidth:o,height:l,versionId:d,modelId:u,withEditingActions:x}=e,{classes:p,theme:y}=i_(),w=eC.SX.useContext(),{data:b=[]}=eC.SX.modelVersion.getExplorationPromptsById.useQuery({id:d}),[k,I]=(0,es.useState)({modalOpened:!1,editingPrompt:b[0]}),[z,C]=(0,es.useState)(b.reduce((e,i)=>(e[i.name]={imageIndex:0},e),{})),S=(0,es.useRef)(null),Z=(0,es.useRef)(null),{images:T,loading:A,getImages:P,prompt:D,setPrompt:B}=function(e){var i,n;let{initialPrompt:s,modelId:t,initialFetchCount:o=0}=e;t=null!=t?t:3;let[l,r]=(0,es.useState)({}),[a,d]=(0,es.useState)({}),[c,u]=(0,es.useState)(s);(0,es.useEffect)(()=>{var e,i;let n=null!==(i=null===(e=l[c])||void 0===e?void 0:e.length)&&void 0!==i?i:0;o>0&&0===n&&c&&h(o)},[c]);let h=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;a[c]||(d(e=>({...e,[c]:!0})),function(e,i){var n;let{includeNsfw:s=!0,...t}=e;if(Object.keys(iR).length>5)throw Error("Too many requests");let o=(0,iE.Z)(),l=0,r=null!==(n=t.numberResults)&&void 0!==n?n:1,a=setTimeout(()=>{iR[o]&&delete iR[o],i(void 0,!0)},1e4*r);iR[o]=e=>{if(e.bNSFWContent&&!s){if(++l>5)throw delete iR[o],Error("Too many attempts");iO(o,t);return}let n=--r<=0;n&&(delete iR[o],clearTimeout(a)),i(e.imageSrc,n)},iO(o,t)}({promptText:c,modelId:t,numberResults:e},(e,i)=>{i&&d(e=>({...e,[c]:!1})),e&&r(i=>{var n;return{...i,[c]:[...null!==(n=i[c])&&void 0!==n?n:[],e]}})}))};return{images:null!==(i=l[c])&&void 0!==i?i:[],loading:null!==(n=a[c])&&void 0!==n&&n,prompt:c,getImages:h,setPrompt:e=>{u(e)},clear:()=>{r(e=>({...e,[c]:[]}))}}}({initialPrompt:null===(i=b[0])||void 0===i?void 0:i.prompt,modelId:u,initialFetchCount:9}),E=eC.SX.modelVersion.deleteExplorationPrompt.useMutation({async onMutate(e){let{name:i}=e;await w.modelVersion.getExplorationPromptsById.cancel();let n=w.modelVersion.getExplorationPromptsById.getData({id:d});if(n){let e=n.filter(e=>e.name!==i);w.modelVersion.getExplorationPromptsById.setData({id:d},e),e.length>0&&B(e[0].prompt)}return{previousData:n}},onError(e,i,n){(0,eK.s9)({title:"Failed to delete prompt",error:Error(e.message),reason:"Unable to delete prompt. Please try again"}),w.modelVersion.getExplorationPromptsById.setData({id:d},null==n?void 0:n.previousData)}}),V=e=>{(0,M._5)({title:"Delete Prompt",children:"Are you sure you want to delete this prompt?",labels:{confirm:"Delete",cancel:"No, don't delete it"},confirmProps:{color:"red"},onConfirm:()=>{E.mutate({id:d,name:e,modelId:u})}})},L=b.find(e=>e.prompt===D),G=L?null===(n=z[L.name])||void 0===n?void 0:n.imageIndex:0,F=null!==(t=null===(s=Z.current)||void 0===s?void 0:s.clientWidth)&&void 0!==t?t:0;return(0,es.useEffect)(()=>{b.length>0&&!D&&B(b[0].prompt)},[b,D,B]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(iw.z,{label:"New",radius:"sm",color:"yellow",size:24,styles:{indicator:{transform:"translate(5px,-10px) !important"}},withBorder:!0,children:(0,r.jsxs)(ib.Z,{ref:Z,sx:{backgroundColor:y.colors.dark[7],boxShadow:"0 0 8px 0 ".concat(y.colors.yellow[7])},withBorder:!0,children:[(0,r.jsx)(ib.Z.Section,{py:"xs",inheritPadding:!0,withBorder:!0,children:(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{spacing:"xs",position:"apart",children:[(0,r.jsxs)(m.Z,{spacing:8,children:[(0,r.jsx)(ik.E,{src:"https://downloads.intercomcdn.com/i/o/415875/17821df0928378c5e14e54e6/17c1c63527031e39c565ab2c57308471.png",width:32,height:32,alt:"some alt",radius:"sm",withPlaceholder:!0}),(0,r.jsxs)(h.K,{spacing:0,children:[(0,r.jsx)(c.x,{size:"sm",weight:"bold",children:"Generated Exploration"}),(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["A service provided by"," ",(0,r.jsx)(g.e,{href:"https://picfinder.ai",target:"_blank",rel:"nofollow noreferrer",inherit:!0,span:!0,children:"PicFinder"})]})]})]}),(0,r.jsxs)(iI.J,{width:300,withArrow:!0,withinPortal:!0,children:[(0,r.jsx)(iI.J.Target,{children:(0,r.jsx)(j.A,{radius:"xl",variant:"transparent",children:(0,r.jsx)(R.Z,{})})}),(0,r.jsx)(iI.J.Dropdown,{children:"The images you see here are being generated on demand by the PicFinder service. Select one of the pre-defined prompts from the creator below to start exploring the unlimited possibilities."})]})]}),(0,r.jsx)(iT.N,{id:"generated-exploration",content:"These images are generated on demand. Press the next button to generate another image or select a different preset prompt below."})]})}),(0,r.jsx)(ib.Z.Section,{sx:{position:"relative",height:l,overflow:"hidden"},onKeyDown:(0,iS.yr)([["ArrowLeft",e=>e.preventDefault()],["ArrowRight",e=>e.preventDefault()]]),children:A&&!T.length?(0,r.jsx)(a.M,{h:"100%",children:(0,r.jsx)(f.a,{size:"md",variant:"bars"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:S,style:{overflow:"hidden",display:"flex",scrollSnapType:"x mandatory"},children:T.map((e,i)=>(0,r.jsx)(ik.E,{src:e,height:l,width:F,alt:"AI generated image with prompt: ".concat(D),styles:{image:{objectPosition:"top"},root:{scrollSnapAlign:"start"}}},i))}),!!b.length&&!!T.length&&G>0&&(0,r.jsx)(j.A,{className:p.nextButton,radius:"xl",size:"md",color:"gray",p:4,sx:{position:"absolute",top:"50%",left:10},onClick:()=>{var e;null===(e=S.current)||void 0===e||e.scrollBy({left:-1*F,behavior:"smooth"}),L&&C(e=>{var i,n;return{...e,[L.name]:{imageIndex:(null!==(n=null===(i=e[L.name])||void 0===i?void 0:i.imageIndex)&&void 0!==n?n:0)-1}}})},children:(0,r.jsx)(iM.Z,{})}),!!b.length&&!!T.length&&(0,r.jsx)(j.A,{className:p.nextButton,radius:"xl",size:"md",color:"gray",p:4,loading:A&&G>=T.length,sx:{position:"absolute",top:"50%",right:10},onClick:()=>{var e;null===(e=S.current)||void 0===e||e.scrollBy({left:F,behavior:"smooth"}),G>T.length-3&&P(9),L&&C(e=>{var i,n;return{...e,[L.name]:{imageIndex:(null!==(n=null===(i=e[L.name])||void 0===i?void 0:i.imageIndex)&&void 0!==n?n:0)+1}}})},children:(0,r.jsx)(iZ.Z,{})})]})}),(0,r.jsx)(ib.Z.Section,{pt:"xs",inheritPadding:!0,withBorder:!0,children:(0,r.jsxs)(m.Z,{spacing:8,align:"flex-start",noWrap:!0,children:[x&&(0,r.jsx)(j.A,{variant:"outline",size:"sm",onClick:()=>I(e=>({...e,modalOpened:!0,editingPrompt:void 0})),children:(0,r.jsx)(q.Z,{})}),(0,r.jsx)(iz.x,{styles:{viewport:{overflowY:"hidden"}},offsetScrollbars:!0,children:(0,r.jsx)(iC.A.Group,{spacing:4,value:D,onChange:e=>{B(e);let i=b.find(i=>i.prompt===e);if(i){var n,s;let e=null===(n=z[i.name])||void 0===n?void 0:n.imageIndex;null===(s=S.current)||void 0===s||s.scrollTo({left:o*e})}},multiple:!1,noWrap:!0,children:b.map(e=>(0,r.jsx)(iC.A,{classNames:p,value:e.prompt,size:"xs",radius:"sm",children:(0,r.jsxs)(m.Z,{spacing:4,position:"apart",noWrap:!0,children:[(0,r.jsx)(c.x,{inherit:!0,inline:!0,children:e.name}),x&&(0,r.jsxs)(v.v,{position:"top-end",withinPortal:!0,children:[(0,r.jsx)(v.v.Target,{children:(0,r.jsx)(j.A,{size:"xs",variant:"transparent",children:(0,r.jsx)(N.Z,{})})}),(0,r.jsxs)(v.v.Dropdown,{children:[(0,r.jsx)(v.v.Item,{color:"red",icon:(0,r.jsx)(U.Z,{size:14,stroke:1.5}),onClick:()=>V(e.name),children:"Delete"}),(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(W.Z,{size:14,stroke:1.5}),onClick:()=>{let i=b.find(i=>i.prompt===e.prompt);i&&I(e=>({...e,modalOpened:!0,editingPrompt:i}))},children:"Edit"})]})]})]})},e.name))})})]})})]})}),x&&(0,r.jsx)(iB,{prompt:k.editingPrompt,opened:k.modalOpened,onClose:()=>{I(e=>({...e,modalOpened:!1,editingPrompt:void 0}))},modelId:u,versionId:d,nextIndex:b.length})]})}var iK=n(7379),iJ=n(14619),iH=n(99490),iY=n(52785),iq=n(39759),iQ=n(37048),i$=n(35744),i0=n(5140),i1=n(38710),i2=n(63208),i3=n(54671),i4=n(20573),i5=n(85625),i8=n(32957);function i6(e){let{modelId:i}=e,n=(0,i4.D)(),{copySettings:s,updating:t,copySettingsLoading:o}=eJ({modelId:i});return(0,r.jsx)(iA.u,{...n,title:"Gallery Moderation Preferences",children:(0,r.jsxs)(h.K,{children:[(0,r.jsx)(i7,{modelId:i}),(0,r.jsx)(i9,{modelId:i}),(0,r.jsx)(ne,{modelId:i}),(0,r.jsx)(k.z,{variant:"outline",size:"xs",onClick:()=>{(0,M._5)({title:(0,r.jsxs)("div",{className:"flex flex-row flex-nowrap gap-2",children:[(0,r.jsx)(i$.Z,{color:"gold"}),(0,r.jsx)("p",{className:"text-lg",children:"Copy Gallery Moderation Preferences"})]}),centered:!0,children:"This will copy the gallery moderation preferences from this model to all your models and future ones. Are you sure you want to proceed?",onConfirm:async()=>{try{await s(i),n.onClose()}catch(e){}},labels:{confirm:"Yes, continue",cancel:"No, cancel"}})},loading:t||o,children:"Apply these settings to all my models"})]})})}function i7(e){var i,n;let{modelId:s}=e,{gallerySettings:t,toggle:o}=eJ({modelId:s}),l=(0,es.useRef)(null),[a,d]=(0,es.useState)(""),[u]=(0,iq.c)(a,300),{data:x,isLoading:p}=eC.SX.tag.getAll.useQuery({query:u.toLowerCase().trim(),excludedTagIds:null==t?void 0:t.hiddenTags.map(e=>e.id),sort:i8.t0.MostHidden}),g=null!==(i=null==x?void 0:x.items.filter(e=>!(null==t?void 0:t.hiddenTags.some(i=>i.id===e.id))).map(e=>{let{id:i,name:n}=e;return{id:i,value:n}}))&&void 0!==i?i:[],v=null!==(n=null==t?void 0:t.hiddenTags)&&void 0!==n?n:[],y=async e=>{await o({modelId:s,tags:[e]}).catch(()=>null),d("")};return(0,r.jsxs)(ib.Z,{withBorder:!0,children:[(0,r.jsx)(ib.Z.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:(0,r.jsx)(c.x,{weight:500,children:"Hidden Tags"})}),(0,r.jsx)(ib.Z.Section,{withBorder:!0,sx:{marginTop:-1},children:(0,r.jsx)(iY.F,{name:"tag",ref:l,placeholder:"Search tags to hide",data:g,value:a,onChange:d,icon:p?(0,r.jsx)(f.a,{size:"xs"}):(0,r.jsx)(i0.Z,{size:14}),onItemSubmit:e=>{var i;y({id:e.id,name:e.value}),null===(i=l.current)||void 0===i||i.focus()},withinPortal:!0,variant:"unstyled"})}),(0,r.jsx)(ib.Z.Section,{inheritPadding:!0,pt:"md",pb:"xs",children:(0,r.jsxs)(h.K,{spacing:5,children:[v.length>0&&(0,r.jsx)(m.Z,{spacing:4,children:v.map(e=>(0,r.jsx)(w.C,{sx:{paddingRight:3},rightSection:(0,r.jsx)(j.A,{size:"xs",color:"blue",radius:"xl",variant:"transparent",onClick:()=>y(e),children:(0,r.jsx)(i1.Z,{size:10})}),children:e.name},e.id))}),(0,r.jsx)(c.x,{color:"dimmed",size:"xs",children:"Content with these tags will not show up in your resource gallery page."})]})})]})}function i9(e){var i;let{modelId:n}=e,{gallerySettings:s,toggle:t}=eJ({modelId:n}),o=(0,es.useRef)(null),[l,a]=(0,es.useState)(""),[d]=(0,iq.c)(l,300),{data:u,isLoading:x,isFetching:p}=eC.SX.user.getAll.useQuery({query:d.trim(),limit:10},{enabled:""!==d}),g=null!==(i=null==u?void 0:u.filter(e=>e.username).map(e=>{let{id:i,username:n}=e;return{id:i,value:null!=n?n:""}}))&&void 0!==i?i:[],v=async e=>{await t({modelId:n,users:[e]}).catch(()=>null),a("")};return(0,r.jsxs)(ib.Z,{withBorder:!0,children:[(0,r.jsx)(ib.Z.Section,{withBorder:!0,inheritPadding:!0,py:"xs",children:(0,r.jsx)(c.x,{weight:500,children:"Hidden Users"})}),(0,r.jsx)(ib.Z.Section,{withBorder:!0,sx:{marginTop:-1},children:(0,r.jsx)(iY.F,{name:"tag",ref:o,placeholder:"Search users to hide",data:g,value:l,onChange:a,icon:x&&p?(0,r.jsx)(f.a,{size:"xs"}):(0,r.jsx)(i0.Z,{size:14}),onItemSubmit:e=>{var i;let{id:n,value:s}=e;v({id:n,username:s}),null===(i=o.current)||void 0===i||i.focus()},withinPortal:!0,variant:"unstyled"})}),(0,r.jsx)(ib.Z.Section,{inheritPadding:!0,pt:"md",pb:"xs",children:(0,r.jsxs)(h.K,{spacing:5,children:[s&&s.hiddenUsers.length>0&&(0,r.jsx)(m.Z,{spacing:4,children:s.hiddenUsers.map(e=>(0,r.jsx)(w.C,{sx:{paddingRight:3},rightSection:(0,r.jsx)(j.A,{size:"xs",color:"blue",radius:"xl",variant:"transparent",onClick:()=>v(e),children:(0,r.jsx)(i1.Z,{size:10})}),children:e.username},e.id))}),(0,r.jsx)(c.x,{color:"dimmed",size:"xs",children:"Content from these users will not show up in your resource gallery page."})]})})]})}function ne(e){let{modelId:i}=e,{gallerySettings:n}=eJ({modelId:i});return n?(0,r.jsx)(nn,{level:n.level,modelId:i}):null}let ni=(0,i5.Ot)(1e3);function nn(e){let{level:i=i3.ki,modelId:n}=e,{classes:s,cx:t}=ns(),{toggle:o}=eJ({modelId:n}),[l,a]=(0,es.useState)(i),d=e=>{a(i=>iK.v.hasFlag(i,e)?iK.v.removeFlag(i,e):iK.v.addFlag(i,e))};return(0,iQ.l)(()=>{ni(()=>o({modelId:n,level:l}))},[l]),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(c.x,{children:"Allowed Browsing Levels"}),(0,r.jsx)(I.X,{withBorder:!0,p:0,className:s.root,children:i3.Us.map(e=>{let i=iK.v.hasFlag(l,e);return(0,r.jsxs)(m.Z,{position:"apart",p:"md",onClick:()=>d(e),className:t({[s.active]:i}),noWrap:!0,children:[(0,r.jsxs)(m.Z,{noWrap:!0,children:[(0,r.jsx)(c.x,{weight:700,w:50,ta:"center",children:i3.vU[e]}),(0,r.jsx)(c.x,{lh:1.2,size:"sm",ta:"left",sx:{flex:"1 1"},children:i3.PP[e]})]}),(0,r.jsx)(c.x,{color:"green",inline:!0,style:{visibility:i?void 0:"hidden"},children:(0,r.jsx)(i2.Z,{})})]},e)})})]})}let ns=(0,C.k)(e=>({root:{"& > div":{"&:hover":{background:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[2],cursor:"pointer"},"&:not(:last-child)":{borderBottom:"1px ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]," solid")}}},active:{background:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]}})),nt=(0,es.createContext)(null),no=()=>{let e=(0,es.useContext)(nt);if(!e)throw Error("ImagesInfiniteContext not in tree");return e};function nl(e){var i;let{model:n,username:s,modelVersions:t,selectedVersionId:o,generationOptions:l,showModerationOptions:d,showPOIWarning:u,canReview:p}=e,v=(0,ek.xJ)(),y=(0,en.useRouter)(),w=(0,eG.y)("sm"),[z,C]=(0,es.useState)(!1),S=(0,ig.G6)("modelImages"),M=(0,iJ.HO)({...S,modelVersionId:o,modelId:n.id,username:s,hidden:z}),Z=(0,em.bT)(),{gallerySettings:T}=eJ({modelId:n.id}),A=Z;(null==T?void 0:T.level)&&(A=iK.v.intersection(Z,T.level));let P=!!T&&A>0,{data:D,isLoading:N,fetchNextPage:B,hasNextPage:E,isRefetching:V,isFetching:L}=eC.SX.image.getImagesAsPostsInfinite.useInfiniteQuery({...M,limit:w?25:50,browsingLevel:A},{getNextPageParam:e=>e.nextCursor,trpc:{context:{skipBatch:!0}},keepPreviousData:!0,enabled:P}),R=(0,es.useMemo)(()=>null==T?void 0:T.hiddenUsers.map(e=>e.id),[null==T?void 0:T.hiddenUsers]),U=(0,es.useMemo)(()=>null==T?void 0:T.hiddenTags.map(e=>e.id),[null==T?void 0:T.hiddenTags]),W=(0,es.useMemo)(()=>null==D?void 0:D.pages.flatMap(e=>e?e.items:[]),[D]),{items:G}=(0,e_.f)({type:"posts",data:W,hiddenImages:z?void 0:null==T?void 0:T.hiddenImages,hiddenUsers:z?void 0:R,hiddenTags:z?void 0:U,browsingLevel:A}),F=e=>{let i=iH.QS.stringify({modelId:n.id,modelVersionId:o,returnUrl:y.asPath,reviewing:null==e?void 0:e.reviewing});y.push("/posts/create?".concat(i))};(0,es.useEffect)(()=>{(null==T?void 0:T.hiddenImages.length)||C(!1)},[null==T?void 0:T.hiddenImages]);let O=null!==(i=null==v?void 0:v.muted)&&void 0!==i&&i,_=!!(null==T?void 0:T.hiddenImages.length)||!!(null==T?void 0:T.hiddenUsers.length)||!!(null==T?void 0:T.hiddenTags.length);return(0,r.jsx)(nt.Provider,{value:{filters:M,modelVersions:t,showModerationOptions:d,model:n},children:(0,r.jsx)(ef.g,{columnWidth:320,maxColumnCount:6,maxSingleColumnWidth:450,style:{flex:1},children:(0,r.jsx)(eb.r,{children:(0,r.jsxs)(h.K,{spacing:"md",children:[(0,r.jsxs)(m.Z,{spacing:"xs",children:[(0,r.jsx)(x.D,{order:2,children:"Gallery"}),!O&&(0,r.jsxs)(m.Z,{children:[(0,r.jsx)(ij.b,{reason:"post-images",children:(0,r.jsx)(k.z,{variant:"outline",size:"xs",leftIcon:(0,r.jsx)(q.Z,{size:16}),onClick:()=>F(),children:"Add Post"})}),p&&(0,r.jsx)(ij.b,{reason:"create-review",children:(0,r.jsx)(k.z,{leftIcon:(0,r.jsx)(eV.Z,{size:16}),variant:"outline",size:"xs",onClick:()=>F({reviewing:!0}),children:"Add Review"})})]}),(0,r.jsxs)(m.Z,{ml:"auto",spacing:8,children:[(0,r.jsx)(eO.z,{type:"modelImages",variant:"button"}),(0,r.jsx)(ip.R,{size:"sm",filterType:"modelImages",compact:!0,hideBaseModels:!0}),d&&(0,r.jsxs)(r.Fragment,{children:[!!(null==T?void 0:T.hiddenImages.length)&&(0,r.jsx)(eT.u,{label:"".concat(z?"Hide":"Show"," hidden images"),children:(0,r.jsx)(j.A,{variant:"light",radius:"xl",color:"red",onClick:()=>C(e=>!e),children:z?(0,r.jsx)(eL.Z,{size:16}):(0,r.jsx)(eR.Z,{size:16})})}),(0,r.jsx)(eT.u,{label:"Gallery Moderation Preferences",children:(0,r.jsx)(j.A,{variant:"filled",radius:"xl",onClick:()=>eF.Pq.trigger({component:i6,props:{modelId:n.id}}),children:(0,r.jsx)(eU.Z,{size:16})})})]})]})]}),u&&(0,r.jsxs)(c.x,{size:"sm",color:"dimmed",lh:1.1,children:["This resource is intended to depict a real person. All images that use this resource are scanned for mature themes and manually reviewed by a moderator in accordance with our"," ",(0,r.jsx)(c.x,{component:ie.p,href:"/content/rules/real-people",variant:"link",td:"underline",children:"real person policy"}),"."," ",(0,r.jsx)(c.x,{td:"underline",component:"span",children:"If you see an image that violates this policy, please report it immediately."})]}),_?(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",mt:"-md",children:["Some images have been hidden based on moderation preferences set by the creator,"," ",(0,r.jsx)(ie.p,{legacyBehavior:!0,href:"/images?modelVersionId=".concat(o),passHref:!0,children:(0,r.jsx)(g.e,{span:!0,children:"view all images using this resource"})}),"."]}):null,(0,r.jsx)(ix.V,{}),P&&N?(0,r.jsx)(I.X,{style:{minHeight:200,position:"relative"},children:(0,r.jsx)(ea.f,{visible:!0,zIndex:10})}):G.length?(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsx)(ea.f,{visible:null!=V&&V,zIndex:9}),(0,r.jsx)(iy.w,{data:G,staticItem:(null==l?void 0:l.generationModelId)&&o?e=>(0,r.jsx)(iX,{...e,versionId:o,modelId:l.generationModelId,withEditingActions:null==l?void 0:l.includeEditingActions}):void 0,imageDimensions:e=>{var i,n;let s=e.images.sort((e,i)=>{var n,s,t,o;let l=null!==(n=e.height)&&void 0!==n?n:0,r=null!==(s=i.height)&&void 0!==s?s:0,a=l>0?(null!==(t=e.width)&&void 0!==t?t:0)/l:0,d=r>0?(null!==(o=i.width)&&void 0!==o?o:0)/r:0;return a<1&&d>=1?-1:d<1&&a<=1?1:l===r?0:l>r?-1:1})[0];return{width:null!==(i=null==s?void 0:s.width)&&void 0!==i?i:450,height:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:450}},adjustHeight:(e,i)=>{let{height:n}=e;return Math.min(n,600)+(-1!==i.user.id?58:0)+(i.images.length>1?8:0)},maxItemHeight:600,render:iu,itemId:e=>e.images.map(e=>e.id).join("_"),withAds:!0}),E&&(0,r.jsx)(iv.T,{loadFn:B,loadCondition:!L,style:{gridColumn:"1/-1"},children:(0,r.jsx)(a.M,{p:"xl",sx:{height:36},mt:"md",children:(0,r.jsx)(f.a,{})})})]}):(0,r.jsxs)(h.K,{align:"center",py:"lg",children:[(0,r.jsx)(b.k,{size:128,radius:100,children:(0,r.jsx)(eW.Z,{size:80})}),(0,r.jsx)(c.x,{size:32,align:"center",children:"No results found"}),(0,r.jsx)(c.x,{align:"center",children:"Try adjusting your search or filters to find what you're looking for"})]})]})})})})}var nr=n(18960),na=n(8984),nd=n(94652),nc=n(10523),nu=n(37398),nh=n(60887),nm=n(45587),nx=n(63324),np=n(77446),ng=n(83895);function nv(e){let{modelId:i,opened:n,onClose:s}=e,t=eC.SX.useContext(),o=(0,nh.Dy)((0,nh.VT)(nh.we,{activationConstraint:{distance:8}})),[l,d]=(0,es.useState)([]),{data:u,isLoading:p}=eC.SX.model.getVersions.useQuery({id:i},{enabled:n,onSuccess:e=>d(e)}),g=eC.SX.model.reorderVersions.useMutation({async onMutate(e){await t.model.getVersions.cancel(),await t.model.getById.cancel({id:e.id});let i=t.model.getById.getData({id:e.id});if(i){let n=e.modelVersions.map(e=>{let n=i.modelVersions.findIndex(i=>i.id===e.id);return i.modelVersions[n]});t.model.getById.setData({id:e.id},{...i,modelVersions:n})}return{previousData:i}},async onSuccess(){await t.model.getVersions.invalidate({id:i})},onError(e,i,n){n&&t.model.getById.setData({id:i.id},n.previousData),(0,eK.s9)({error:Error(e.message),title:"Failed to save"})}});return(0,r.jsxs)(iA.u,{opened:n,onClose:s,title:(0,r.jsxs)(h.K,{spacing:0,children:[(0,r.jsx)(x.D,{order:3,children:"Rearrange versions"}),(0,r.jsx)(c.x,{size:"sm",color:"dimmed",children:"Drag and drop the versions to set their order"})]}),styles:{header:{alignItems:"flex-start"}},centered:!0,children:[p?(0,r.jsx)(a.M,{children:(0,r.jsx)(f.a,{size:"lg"})}):(0,r.jsx)(nh.LB,{sensors:o,collisionDetection:nh.pE,onDragEnd:e=>{let{active:i,over:n}=e;n&&i.id!==n.id&&d(e=>{let s=e.map(e=>{let{id:i}=e;return i}),t=s.indexOf(i.id),o=s.indexOf(n.id);return(0,nm.Rp)(e,t,o)})},children:(0,r.jsx)(nm.Fo,{items:l.map(e=>e.id),strategy:nm.qw,children:(0,r.jsx)(h.K,{children:l.map(e=>(0,r.jsx)(ng.T,{id:e.id,children:(0,r.jsx)(ib.Z,{withBorder:!0,children:(0,r.jsxs)(m.Z,{align:"start",children:[(0,r.jsx)(nx.Z,{}),(0,r.jsx)(c.x,{size:"md",lineClamp:2,children:e.name})]})})},e.id))})})}),(0,r.jsxs)(m.Z,{position:"right",mt:"xl",children:[(0,r.jsx)(k.z,{variant:"default",onClick:s,children:"Cancel"}),(0,r.jsx)(k.z,{onClick:()=>{(0,np.Z)(u,l)||g.mutate({id:i,modelVersions:l}),s()},disabled:p,loading:g.isLoading,children:"Save"})]})]})}function nj(e){let{modelId:i,locked:n=!1,children:s}=e,t=eC.SX.useContext(),{mutate:o,isLoading:l}=eC.SX.model.toggleLock.useMutation({onSuccess:(e,n)=>{t.model.getById.setData({id:i},e=>e?{...e,locked:n.locked}:e)}});return s({onClick:()=>o({id:i,locked:!n}),isLoading:l})}var nf=n(35818),ny=(0,E.Z)("outline","bell-check","IconBellCheck",[["path",{d:"M11.5 17h-7.5a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3c.016 .129 .037 .256 .065 .382",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 2.502 2.959",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]]),nw=(0,E.Z)("outline","bell-plus","IconBellPlus",[["path",{d:"M12.5 17h-8.5a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6a2 2 0 1 1 4 0a7 7 0 0 1 4 6v1",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 3.51 2.957",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}],["path",{d:"M19 16v6",key:"svg-3"}]]);function nb(e){let{modelId:i,userId:n,...s}=e,t=(0,ek.xJ)(),o=eC.SX.useUtils(),{data:{Notify:l=[],Mute:a=[]}={Notify:[],Mute:[]}}=eC.SX.user.getEngagedModels.useQuery(void 0,{enabled:!!t}),{data:d=[]}=eC.SX.user.getFollowingUsers.useQuery(void 0,{enabled:!!t}),c=eC.SX.user.toggleNotifyModel.useMutation({async onSuccess(){await o.user.getEngagedModels.invalidate()},onError(e){(0,eK.s9)({title:"Failed to update notification settings",error:e})}}),u=l.includes(i),h=a.includes(i),m=(d.some(e=>n==e.id)||u)&&!h;return(0,r.jsx)(p.u,{label:m?"Stop getting notifications for this model":"Get notification when there is a new update on this model",children:(0,r.jsx)("div",{children:(0,r.jsx)(ij.b,{reason:"notify-model",children:(0,r.jsx)(j.A,{variant:"light",...s,color:m?"success":void 0,onClick:()=>c.mutate({modelId:i,type:m?nf.f_.Mute:void 0}),loading:c.isLoading,children:m?(0,r.jsx)(ny,{size:20}):(0,r.jsx)(nw,{size:20})})})})})}var nk=n(94849);let nI={[nf.BY.Checkpoint]:"#fine-tuned-model-checkpoints-dreambooth-models",[nf.BY.TextualInversion]:"#textual-inversions",[nf.BY.AestheticGradient]:"#aesthetic-gradients",[nf.BY.LORA]:"#lora",[nf.BY.LoCon]:"#locon",[nf.BY.Hypernetwork]:"#hypernetwork",[nf.BY.Controlnet]:"#controlnet",[nf.BY.Poses]:"#poses",[nf.BY.Wildcards]:"#wildcards",[nf.BY.MotionModule]:"#motion-module"},nz=e=>{let{type:i}=e;return nI[i]?(0,r.jsx)(nC,{href:"https://github.com/civitai/civitai/wiki/How-to-use-models".concat(nI[i])}):null},nC=e=>{let{href:i,size:n=20,tooltip:s="How to use this",...t}=e;return(0,r.jsx)(p.u,{label:s,position:"left",withArrow:!0,children:(0,r.jsx)(c.x,{component:"a",href:i,target:"_blank",rel:"nofollow noreferrer",td:"underline",size:"xs",color:"dimmed",sx:{lineHeight:1},children:(0,r.jsx)(nk.Z,{size:n,...t})})})};var nS=n(71740),nM=(0,E.Z)("outline","file-settings","IconFileSettings",[["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M12 10.5v1.5",key:"svg-1"}],["path",{d:"M12 16v1.5",key:"svg-2"}],["path",{d:"M15.031 12.25l-1.299 .75",key:"svg-3"}],["path",{d:"M10.268 15l-1.3 .75",key:"svg-4"}],["path",{d:"M15 15.803l-1.285 -.773",key:"svg-5"}],["path",{d:"M10.285 12.97l-1.285 -.773",key:"svg-6"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-7"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-8"}]]),nZ=(0,E.Z)("outline","photo-edit","IconPhotoEdit",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M11 20h-4a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v4",key:"svg-1"}],["path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-2"}],["path",{d:"M14 14l1 -1c.31 -.298 .644 -.497 .987 -.596",key:"svg-3"}],["path",{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z",key:"svg-4"}]]),nT=n(76382),nA=n(67731);let nP=(0,C.k)(e=>({scrollContainer:{position:"relative"},arrowButton:{"&:active":{transform:"none"}},hidden:{display:"none !important"},leftArrow:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",paddingRight:e.spacing.xl,zIndex:12,backgroundImage:e.fn.gradient({from:"dark"===e.colorScheme?e.colors.dark[7]:"white",to:"transparent",deg:90}),display:"block"},rightArrow:{position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",paddingLeft:e.spacing.xl,zIndex:12,backgroundImage:e.fn.gradient({from:"dark"===e.colorScheme?e.colors.dark[7]:"white",to:"transparent",deg:270}),display:"block"},viewport:{overflowX:"scroll",overflowY:"hidden"}}));function nD(e){let{versions:i,selected:n,showExtraIcons:s,showToggleCoverage:t,onVersionClick:o,onDeleteClick:l}=e,{classes:a,cx:d,theme:c}=nP(),u=(0,en.useRouter)(),h=(0,ek.xJ)(),x=(0,ez.g)(),p=(0,es.useRef)(null),[g,y]=(0,es.useState)({scrollPosition:{x:0,y:0},atStart:!0,atEnd:!1,largerThanViewport:!1}),{toggle:w,isLoading:I}=(0,nA.Pk)(),C=async e=>{let{modelId:i,versionId:n}=e;await w({id:i,versionId:n}).catch(()=>null)};return(0,es.useEffect)(()=>{if(p.current){let e=p.current.scrollWidth>p.current.offsetWidth;e!==g.largerThanViewport&&y(i=>({...i,largerThanViewport:e}))}},[g.largerThanViewport]),(0,r.jsxs)(iz.x,{className:a.scrollContainer,classNames:a,viewportRef:p,onScrollPositionChange:e=>y(i=>({...i,scrollPosition:e,largerThanViewport:!!p.current&&p.current.scrollWidth>p.current.offsetWidth,atStart:0===e.x,atEnd:!!p.current&&e.x>=p.current.scrollWidth-p.current.offsetWidth-1})),type:"never",children:[(0,r.jsx)(z.x,{className:d(a.leftArrow,g.atStart&&a.hidden),children:(0,r.jsx)(j.A,{className:a.arrowButton,variant:"transparent",radius:"xl",onClick:()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.scrollBy({left:-200,behavior:"smooth"})},children:(0,r.jsx)(iM.Z,{})})}),(0,r.jsx)(m.Z,{spacing:4,noWrap:!0,children:i.map(e=>{let a=n===e.id,d=!!e.trainingStatus,p=!e.files.length,g=!e.posts.length,j="Published"===e.status,y="Scheduled"===e.status,w=e.earlyAccessEndsAt&&new Date(e.earlyAccessEndsAt)>new Date,z=p||g||!j&&!y,S=(0,r.jsx)(b.k,{radius:"sm",size:"sm",color:"yellow.7",style:{width:20,height:26,borderTopLeftRadius:0,borderBottomLeftRadius:0,...s?{borderTopRightRadius:0,borderBottomRightRadius:0}:{}},children:(0,r.jsx)(P.Z,{style:{fill:c.colors.dark[9]},color:"dark.9",size:16})},"early-access-".concat(e.id)),M=(0,r.jsx)(k.z,{miw:40,ta:"center",className:"relative",variant:a?"filled":"dark"===c.colorScheme?"filled":"light",color:a?"blue":"gray",onClick:()=>{if(s){if(!j&&d)return u.push("/models/".concat(e.modelId,"/model-versions/").concat(e.id,"/wizard?step=1"));if(p)return u.push("/models/".concat(e.modelId,"/model-versions/").concat(e.id,"/wizard?step=2"));if(g)return u.push("/models/".concat(e.modelId,"/model-versions/").concat(e.id,"/wizard?step=3"))}return o(e)},leftIcon:s&&(z||y)?(0,r.jsx)(b.k,{color:"yellow",variant:"light",radius:"xl",size:"sm",sx:{backgroundColor:"transparent"},children:z?(0,r.jsx)(i$.Z,{size:14}):(0,r.jsx)(D.Z,{size:14})}):void 0,compact:!0,style:w?{borderTopRightRadius:0,borderBottomRightRadius:0}:void 0,children:(0,r.jsxs)(m.Z,{spacing:8,noWrap:!0,children:[x.imageGeneration&&e.canGenerate&&(0,r.jsx)(b.k,{title:"This version is available for image generation",color:"cyan",variant:"light",radius:"xl",size:"sm",sx:{backgroundColor:"transparent"},children:(0,r.jsx)(T.Z,{size:16,stroke:2.5})}),e.name]})},e.id);return s?(0,r.jsxs)(k.z.Group,{children:[M,w&&S,(0,r.jsxs)(v.v,{withinPortal:!0,children:[(0,r.jsx)(v.v.Target,{children:(0,r.jsx)(k.z,{variant:a?"filled":"dark"===c.colorScheme?"filled":"light",px:4,color:a?"blue":"gray",onClick:e=>{e.stopPropagation(),e.preventDefault()},compact:!0,children:(0,r.jsx)(N.Z,{size:14})})}),(0,r.jsxs)(v.v.Dropdown,{children:[i.length>1&&(0,r.jsx)(v.v.Item,{color:"red",icon:(0,r.jsx)(U.Z,{size:14,stroke:1.5}),onClick:i=>{i.stopPropagation(),i.preventDefault(),l(e.id)},children:"Delete version"}),(null==h?void 0:h.isModerator)&&j&&(0,r.jsx)(v.v.Item,{color:"yellow",icon:(0,r.jsx)(B.Z,{size:14,stroke:1.5}),onClick:()=>(0,eI.C)("unpublishModel",{modelId:e.modelId,versionId:e.id}),children:"Unpublish as Violation"}),(0,r.jsx)(v.v.Item,{component:ie.p,href:"/models/".concat(e.modelId,"/model-versions/").concat(e.id,"/edit"),icon:(0,r.jsx)(W.Z,{size:14,stroke:1.5}),children:"Edit details"}),(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(nM,{size:14,stroke:1.5}),onClick:i=>{i.stopPropagation(),(0,eD.NI)({name:"filesEdit",state:{modelVersionId:e.id}})},children:"Manage files"}),e.posts.length>0?(0,r.jsx)(v.v.Item,{component:ie.p,icon:(0,r.jsx)(nZ,{size:14,stroke:1.5}),onClick:e=>e.stopPropagation(),href:"/posts/".concat(e.posts[0].id,"/edit"),children:"Manage images"}):(0,r.jsx)(v.v.Item,{component:ie.p,icon:(0,r.jsx)(nT.Z,{size:14,stroke:1.5}),onClick:e=>e.stopPropagation(),href:"/models/".concat(e.modelId,"/model-versions/").concat(e.id,"/wizard?step=3"),children:"Add images"}),(null==h?void 0:h.isModerator)&&t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Divider,{}),(0,r.jsx)(v.v.Label,{children:"Moderation zone"}),(0,r.jsx)(v.v.Item,{disabled:I,icon:I?(0,r.jsx)(f.a,{size:"xs"}):void 0,onClick:()=>C({modelId:e.modelId,versionId:e.id}),closeMenuOnClick:!1,children:e.canGenerate?"Remove from generation":"Add to generation"})]})]})]})]},e.id):(0,r.jsxs)(m.Z,{spacing:0,noWrap:!0,children:[M," ",w&&S]},e.id)})}),(0,r.jsx)(z.x,{className:d(a.rightArrow,(g.atEnd||!g.largerThanViewport)&&a.hidden),children:(0,r.jsx)(j.A,{className:a.arrowButton,variant:"transparent",radius:"xl",onClick:()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.scrollBy({left:200,behavior:"smooth"})},children:(0,r.jsx)(iZ.Z,{})})})]})}var nN=n(12029),nB=n(15544),nE=n(21997),nV=n(33596),nL=n(33052),nR=n(71674),nU=n(33416),nW=(0,E.Z)("outline","license","IconLicense",[["path",{d:"M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11",key:"svg-0"}],["path",{d:"M9 7l4 0",key:"svg-1"}],["path",{d:"M9 11l4 0",key:"svg-2"}]]),nG=n(72623),nF=n(27484),nO=n.n(nF),n_=n(2273),nX=n(28475),nK=n(58055),nJ=n(38577),nH=n(63155),nY=n(82633),nq=n(42213),nQ=n(71135),n$=n(10932),n0=n(88182);function n1(e){var i,n,s;let{file:t}=e;if(!t.hashes||!t.hashes.length)return null;let o=[{label:"Hashes",value:(0,r.jsx)(n$.d,{hashes:t.hashes})},{label:"File Size",value:(0,n0.f4)(t.sizeKB)}];return(null===(i=t.metadata)||void 0===i?void 0:i.fp)&&o.push({label:"Precision",value:t.metadata.fp}),(null===(n=t.metadata)||void 0===n?void 0:n.format)&&t.name.endsWith(".zip")&&o.push({label:"Format",value:t.metadata.format}),(null===(s=t.metadata)||void 0===s?void 0:s.size)&&o.push({label:"Model Size",value:(0,n_.Z)(t.metadata.size)}),(0,r.jsxs)(iI.J,{withinPortal:!0,withArrow:!0,children:[(0,r.jsx)(iI.J.Target,{children:(0,r.jsx)(b.k,{variant:"light",size:"xs",radius:"xl",color:"gray",sx:{cursor:"pointer"},onClick:e=>e.stopPropagation(),children:(0,r.jsx)(R.Z,{})})}),(0,r.jsx)(iI.J.Dropdown,{p:0,children:(0,r.jsx)(nQ.N,{items:o})})]})}var n2=n(90512),n3=n(77996);function n4(e){let{modelId:i,loading:n}=e,{items:s=[],isLoading:t,hasNextPage:o,fetchNextPage:l,isFetching:a,isRefetching:d}=(0,nA.Lu)({modelId:i});return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(ea.f,{visible:d,zIndex:9}),(0,r.jsx)(iz.x.Autosize,{maxHeight:300,children:t||n?(0,r.jsx)("div",{className:"flex items-center justify-center p-2",children:(0,r.jsx)(f.a,{variant:"bars",size:"sm"})}):s.length>0?(0,r.jsxs)(r.Fragment,{children:[s.map(e=>(0,r.jsx)(n5,{...e},e.id)),o&&(0,r.jsx)(iv.T,{loadFn:l,loadCondition:!a,style:{gridColumn:"1/-1"},children:(0,r.jsx)("div",{className:"flex items-center justify-center px-4 py-2",children:(0,r.jsx)(f.a,{variant:"bars",size:"sm"})})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center p-2",children:(0,r.jsx)(c.x,{color:"dimmed",children:"There are no items for this collection"})})})]})}function n5(e){var i,n,s;let{id:t,name:o,images:l,rank:a,type:d,version:u}=e,h=(0,en.useRouter)(),[x]=l,p=h.query.id===t.toString();return(0,r.jsxs)(ie.p,{className:(0,n2.Z)("flex items-center gap-4 px-3 py-2 no-underline","hover:bg-gray-1 dark:hover:bg-dark-5",p&&"bg-gray-1 dark:bg-dark-5"),href:"/models/".concat(t,"/").concat((0,iL.vY)(o)),passHref:!0,children:[(0,r.jsx)(e7.kL,{image:x,explain:!1,children:e=>{var i;return(0,r.jsx)("div",{className:"relative size-16 shrink-0 grow-0 overflow-hidden rounded-lg bg-gray-2 dark:bg-dark-3",children:e?(0,r.jsx)(e3.i,{src:x.url,width:450,name:null!==(i=x.name)&&void 0!==i?i:x.id.toString(),type:x.type,loading:"lazy",wrapperProps:{style:{width:"100%",height:"100%"}},contain:!0,style:{objectFit:"cover",minHeight:"100%"}}):(0,r.jsxs)("div",{className:"flex size-full items-center justify-center",children:[(0,r.jsx)(e7.kL.BlurToggle,{children:i=>(0,r.jsx)(j.A,{color:"red",radius:"xl",sx:e=>({backgroundColor:e.fn.rgba(e.colors.red[9],.6),color:"white",backdropFilter:"blur(7px)",boxShadow:"1px 2px 3px -1px rgba(37,38,43,0.2)",zIndex:10}),onClick:i,children:e?(0,r.jsx)(eR.Z,{size:14,strokeWidth:2.5}):(0,r.jsx)(eL.Z,{size:14,strokeWidth:2.5})})}),(0,r.jsx)(e9.R,{...x})]})})}}),(0,r.jsxs)("div",{className:"flex flex-auto flex-col gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.x,{size:"sm",weight:500,lineClamp:1,children:o}),(0,r.jsx)(c.x,{size:"xs",color:"dimmed",weight:500,lineClamp:1,children:u.name})]}),a&&(0,r.jsxs)(m.Z,{align:"center",position:"apart",spacing:4,children:[(0,r.jsx)(n3.i,{classNames:{inner:"flex gap-2 flex-nowrap"},type:d,baseModel:u.baseModel}),(0,r.jsxs)(w.C,{variant:"light",color:"gray",radius:"xl",classNames:{inner:"flex gap-2 flex-nowrap"},children:[(0,r.jsxs)(m.Z,{spacing:2,children:[(0,r.jsx)(Z.Z,{size:14,strokeWidth:2.5}),(0,r.jsx)(c.x,{size:"xs",children:(0,n0.dm)(null!==(i=null==a?void 0:a.downloadCount)&&void 0!==i?i:0)})]}),(0,r.jsxs)(m.Z,{spacing:2,children:[(0,r.jsx)(A.Z,{size:14,strokeWidth:2.5}),(0,r.jsx)(c.x,{size:"xs",children:(0,n0.dm)(null!==(n=null==a?void 0:a.collectedCount)&&void 0!==n?n:0)})]}),(0,r.jsxs)(m.Z,{spacing:2,children:[(0,r.jsx)(nG.Z,{size:14,strokeWidth:2.5}),(0,r.jsx)(c.x,{size:"xs",children:(0,n0.dm)(null!==(s=null==a?void 0:a.commentCount)&&void 0!==s?s:0)})]})]})]})]})]})}var n8=n(14602),n6=n(36777);function n7(e){let{modelId:i,versionId:n,modelType:s,deadline:t}=e,o=(0,ez.g)(),l=(0,ek.xJ)(),a=eC.SX.useUtils(),{donationGoals:u}=(0,nN.L2)({modelVersionId:n}),m=o.earlyAccessModel&&!!t&&(0,n6.YI)(t),{data:{Notify:x=[]}={Notify:[]}}=eC.SX.user.getEngagedModelVersions.useQuery({id:i},{enabled:!!l&&m,cacheTime:1/0,staleTime:1/0}),p=x.includes(n),v=eC.SX.modelVersion.toggleNotifyEarlyAccess.useMutation({async onMutate(){await a.user.getEngagedModels.cancel();let e=a.user.getEngagedModelVersions.getData();return a.user.getEngagedModelVersions.setData({id:i},function(){let{Notify:e=[],...i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{Notify:[],Downloaded:[]};return p?{Notify:e.filter(e=>e!==n),...i}:{Notify:[...e,n],...i}}),{prevEngaged:e}},onSuccess(){(0,eK.LX)({message:p?"You will be notified when this is available for download":"You have been removed from the notification list"})},onError(e,n,s){(0,eK.s9)({error:Error(e.message)}),a.user.getEngagedModelVersions.setData({id:i},null==s?void 0:s.prevEngaged)}});if(!m)return null;let j=(null!=u?u:[]).find(e=>e.isEarlyAccess);return(0,r.jsx)(d.b,{color:"yellow",children:(0,r.jsxs)(h.K,{children:[(0,r.jsxs)(c.x,{size:"xs",children:["The creator of this ",(0,iL.Gf)(s)," has set this version to"," ",(0,r.jsx)(c.x,{weight:"bold",component:"span",children:"Early Access"})," ","and as such it is only available for people who purchase it. This"," ",(0,iL.Gf)(s)," will be available for free in"," ",(0,r.jsx)(c.x,{weight:"bold",component:"span",children:(0,r.jsx)(n8.I,{endTime:t})})," ",j?" or once the donation goal is met":"",". If you want to know more, check out our article"," ",(0,r.jsx)(g.e,{color:"yellow",td:"underline",target:"_blank",href:"/articles/".concat(ia._G.earlyAccess.article),children:"here"}),"."]}),(0,r.jsx)(ij.b,{reason:"notify-version",children:(0,r.jsx)(c.x,{variant:"link",onClick:v.isLoading?void 0:()=>{v.mutate({id:n})},sx:{cursor:v.isLoading?"not-allowed":"pointer",lineHeight:1},span:!0,color:"yellow",children:p?"Remove me from this notification.":"Notify me when it's available."})})]})})}var n9=n(25207),se=n(44211),si=n(81447);let sn=(0,C.k)(e=>({control:{svg:{width:24,height:24,[si.D.smallerThan("sm")]:{minWidth:16,minHeight:16}}},carousel:{display:"block",[si.D.smallerThan("sm")]:{display:"none"}},mobileBlock:{display:"block",[si.D.largerThan("sm")]:{display:"none"}},footer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",position:"absolute",bottom:0,left:0,right:0,background:e.fn.gradient({from:"rgba(37,38,43,0.8)",to:"rgba(37,38,43,0)",deg:0}),boxShadow:"0 -2px 6px 1px rgba(0,0,0,0.16)",zIndex:10,gap:6,padding:e.spacing.xs},reactions:{position:"absolute",bottom:6,left:6,borderRadius:e.radius.sm,background:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[6],.6):e.colors.gray[0],boxShadow:"0 -2px 6px 1px rgba(0,0,0,0.16)",padding:4},info:{position:"absolute",bottom:5,right:5},viewport:{overflowX:"clip",overflowY:"visible"},contentOverlay:{position:"absolute",width:"100%",left:0,zIndex:10,padding:e.spacing.sm},top:{top:0}}));function ss(e){return(0,r.jsx)(em.M9,{children:(0,r.jsx)(st,{...e})})}function st(e){let{modelId:i,modelVersionId:n,modelUserId:s,mobile:t=!1,limit:o=10,onBrowseClick:l}=e,d=(0,ez.g)(),{classes:c,cx:u}=sn(),{images:m,flatData:x,isLoading:p}=(0,ig.XQ)({modelVersionId:n,prioritizedUserIds:[s],period:"AllTime",sort:i8.FA.MostReactions,limit:o,pending:!0}),g=(0,n9.V)(x);return p?(0,r.jsx)(z.x,{className:u(!t&&c.carousel,t&&c.mobileBlock),sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:t?300:600},children:(0,r.jsx)(a.M,{children:(0,r.jsx)(f.a,{size:"md"})})}):(0,r.jsxs)(ev.l,{className:u(!t&&c.carousel,t&&c.mobileBlock),classNames:c,slideSize:"50%",breakpoints:[{maxWidth:"md",slideSize:"100%",slideGap:2}],slideGap:"xl",align:m.length>2?"start":"center",slidesToScroll:"auto",withControls:m.length>2,controlSize:t?32:56,loop:!0,children:[m.map(e=>{let n=e.user.id!==s;return(0,r.jsx)(ev.l.Slide,{children:(0,r.jsx)(a.M,{h:"100%",w:"100%",children:(0,r.jsx)("div",{style:{width:"100%",position:"relative"},children:(0,r.jsx)(e7.kL,{image:e,connectType:"model",connectId:i,children:i=>{var s,t,o,l,a,u,x,p;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e7.kL.BlurToggle,{className:"absolute left-2 top-2 z-10"}),(0,r.jsxs)(h.K,{spacing:"xs",align:"flex-end",className:"absolute right-2 top-2 z-10",children:[(0,r.jsx)(e5.t,{image:e}),d.imageGeneration&&(null!==(u=e.hasPositivePrompt)&&void 0!==u?u:e.hasMeta)&&(0,r.jsx)(e1.Z,{label:"Remix",size:30,color:"white",variant:"filled","data-activity":"remix:model-carousel",onClick:i=>{i.preventDefault(),i.stopPropagation(),id.Ft.open({type:e.type,id:e.id})},children:(0,r.jsx)(T.Z,{stroke:2.5,size:16})})]}),(0,r.jsx)(eD.v4,{name:"imageDetail",state:{imageId:e.id,images:m},children:(0,r.jsx)(iw.z,{label:"From Community",radius:"sm",position:"top-center",size:24,disabled:!n,withBorder:!0,children:(0,r.jsx)(se.e,{image:e,edgeImageProps:{width:450},aspectRatio:(null!==(x=e.width)&&void 0!==x?x:1)/(null!==(p=e.height)&&void 0!==p?p:1),style:{width:"100%"},nsfw:!i})})}),(0,r.jsx)(ii.J,{entityId:e.id,entityType:"image",reactions:e.reactions,metrics:{likeCount:null===(s=e.stats)||void 0===s?void 0:s.likeCountAllTime,dislikeCount:null===(t=e.stats)||void 0===t?void 0:t.dislikeCountAllTime,heartCount:null===(o=e.stats)||void 0===o?void 0:o.heartCountAllTime,laughCount:null===(l=e.stats)||void 0===l?void 0:l.laughCountAllTime,cryCount:null===(a=e.stats)||void 0===a?void 0:a.cryCountAllTime},readonly:!i,className:c.reactions,targetUserId:e.user.id}),e.hasMeta&&(0,r.jsx)("div",{className:"absolute bottom-0.5 right-0.5 z-10",children:(0,r.jsx)(e6.C,{imageId:e.id,type:e.type,children:(0,r.jsx)(j.A,{variant:"transparent",size:"lg",children:(0,r.jsx)(R.Z,{color:"white",filter:"drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))",opacity:.8,strokeWidth:2.5,size:26})})})})]})}})})})},e.id)}),g.hasHidden&&(0,r.jsx)(ev.l.Slide,{children:(0,r.jsx)(ib.Z,{withBorder:!0,component:a.M,mih:450,h:"100%",w:"100%",children:(0,r.jsx)(n9.A,{...g})})})]},i)}var so=n(42284);let sl=e=>{let{files:i,modelType:n,versionId:s,baseModel:t}=e,o=!1,l=!1,a=!1,d=!1,u=!0,h=n===nf.BY.Wildcards,m=n===nf.BY.MotionModule;if(i)for(let e of i)"PickleTensor"===e.metadata.format&&(d=!0),"PickleTensor"!==e.metadata.format&&"Model"===e.type&&(u=!1),n===nf.BY.TextualInversion&&"Negative"===e.type?o=!0:"Config"===e.type?l=!0:n===nf.BY.Checkpoint&&"VAE"===e.type&&(a=!0);return d||(u=!1),(0,r.jsxs)(r.Fragment,{children:[u&&(0,r.jsx)(el.L,{icon:(0,r.jsx)(iP.Z,{}),iconColor:"yellow",color:"yellow",children:(0,r.jsx)(c.x,{children:"TextualInversion"===n||"Hypernetwork"===n?"This asset is only available as a PickleTensor which is an insecure format. We've taken precautions to ensure the safety of these files but please be aware that some may harbor malicious code.":"This asset is only available as a PickleTensor which is a deprecated and insecure format. We caution against using this asset until it can be converted to the modern SafeTensor format."})}),h&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),children:["This is a Wildcard collection, it requires an"," ",(0,r.jsx)(g.e,{href:"https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards",rel:"nofollow",target:"_blank",children:"additional extension in Automatic 1111"})," ","to work."]}),m&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),children:["This is a Motion Module for"," ",(0,r.jsx)(g.e,{href:"https://github.com/guoyww/AnimateDiff/",rel:"nofollow",target:"_blank",children:"AnimateDiff"}),", it requires an"," ",(0,r.jsx)(g.e,{href:"https://github.com/continue-revolution/sd-webui-animatediff",rel:"nofollow",target:"_blank",children:"additional extension in Automatic 1111"})," ","to work."]}),o&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),children:["This Textual Inversion includes a"," ",(0,r.jsx)(g.e,{href:(0,so.zM)({versionId:s,type:"Negative"}),children:"Negative embed"}),", install the negative and use it in the negative prompt for full effect."]}),l&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),children:["This checkpoint includes a"," ",(0,r.jsx)(g.e,{href:(0,so.zM)({versionId:s,type:"Config"}),children:"config file"}),", download and place it along side the checkpoint."]}),a&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),children:["This checkpoint recommends a"," ",(0,r.jsx)(g.e,{href:(0,so.zM)({versionId:s,type:"VAE"}),children:"VAE"}),", download and place it in the VAE folder."]})]})};var sr=n(46486),sa=n(43121),sd=n(3941),sc=n(38623),su=n(67882),sh=n(13520);let sm=()=>{let e=eC.SX.useUtils(),i=eC.SX.donationGoal.donate.useMutation({async onSuccess(i,n){let{donationGoalId:s}=n;i&&i.modelVersionId&&(await e.modelVersion.donationGoals.setData({id:i.modelVersionId},e=>e?e.map(e=>e.id===s?{...e,total:i.total}:e):[]),i.total>=i.goalAmount&&i.isEarlyAccess&&await e.common.getEntityAccess.invalidate({entityId:[i.modelVersionId],entityType:"ModelVersion"}))},onError(e){(0,eC.bV)(e,"Failed to donate to goal")}});return{donate:e=>i.mutateAsync(e),donating:i.isLoading}};var sx=n(54163);let sp=(0,C.k)(e=>({donationGoalContainer:{background:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[2]}})),sg=e=>{var i,n;let{donationGoal:s,modelVersionId:t}=e,{classes:o}=sp(),l=Math.min(100,s.total/s.goalAmount*100),[a,d]=(0,es.useState)(10),u=(0,ek.xJ)(),{donate:x,donating:g}=sm(),{modelVersion:v}=(0,nN.S3)({modelVersionId:t});null==v||v.earlyAccessEndsAt;let j=(null==v?void 0:v.earlyAccessEndsAt)&&(null!==(i=null==v?void 0:v.earlyAccessEndsAt)&&void 0!==i?i:new Date)>new Date,f=s.userId!==(null==u?void 0:u.id)&&s.active,y=async()=>{g||(await x({donationGoalId:s.id,amount:a}),(0,eK.LX)({title:"Donation successful",message:"Thank you for supporting this model!"}))},w=(0,iL.Gf)(null!==(n=null==v?void 0:v.model.type)&&void 0!==n?n:"");return(0,r.jsx)(I.X,{radius:"md",p:"xs",sx:{position:"relative"},withBorder:!0,className:o.donationGoalContainer,children:(0,r.jsxs)(h.K,{spacing:"xs",children:[s.isEarlyAccess&&l<100&&j&&(0,r.jsxs)(c.x,{color:"yellow",size:"xs",weight:500,children:["The creator of this ",w," has set a donation goal! You can donate to make this resource available to everyone before the end of Early Access."]}),(0,r.jsxs)(m.Z,{position:"apart",noWrap:!0,align:"start",children:[(0,r.jsx)(c.x,{size:"sm",weight:500,children:s.title}),(0,r.jsxs)(m.Z,{spacing:0,position:"left",align:"center",noWrap:!0,children:[(0,r.jsx)(sh.r,{currency:nf.F.BUZZ,size:16}),(0,r.jsxs)(c.x,{size:"xs",sx:{whiteSpace:"nowrap"},children:[(0,n0.x6)(s.total)," / ",(0,n0.x6)(s.goalAmount)]})]})]}),s.description&&(0,r.jsx)(nY.i,{maxHeight:0,labelSize:"xs",label:"Show Description",children:(0,r.jsx)(c.x,{size:"xs",children:s.description})}),(0,r.jsx)(sd.E,{size:"xl",h:25,value:l,label:"".concat(Math.floor(l),"%"),color:l<100?"yellow.7":"green",striped:s.active,animate:s.active}),f&&(0,r.jsx)(h.K,{spacing:"xs",mt:"xs",children:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,children:[(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,children:[(0,r.jsx)(sx.N,{value:a,onChange:e=>d(null!=e?e:0),variant:"filled",label:"Amount to donate",rightSectionWidth:"10%",min:10,max:1e5,icon:(0,r.jsx)(sh.r,{currency:"BUZZ",size:16}),parser:e=>null==e?void 0:e.replace(/\$\s?|(,*)/g,""),formatter:e=>e&&!Number.isNaN(parseFloat(e))?e.replace(RegExp("\\B(?{let{modelVersionId:i}=e,{donationGoals:n,isLoading:s}=(0,nN.L2)({modelVersionId:i});return(0,ez.g)().donationGoals&&((null==n?void 0:n.length)!==0||s)?s?(0,r.jsxs)(h.K,{children:[(0,r.jsx)(sc.O,{height:20,width:"100%"}),(0,r.jsx)(sc.O,{height:50,width:"100%"})]}):(0,r.jsxs)(h.K,{spacing:"sm",children:[(0,r.jsx)(x.D,{order:4,mb:0,children:"Support this model"}),n.map(e=>(0,r.jsx)(sg,{donationGoal:e,modelVersionId:i},e.id))]}):null},sj=n(41169),sf=n(42381);let sy=e=>{var i;let{modelVersionId:n,reason:s}=e,t=(0,i4.D)(),o=t.onClose,l=(0,ez.g)(),{isLoadingAccess:d,canDownload:u,canGenerate:m,earlyAccessConfig:x,earlyAccessEndsAt:p,modelVersion:v}=(0,nN.S3)({modelVersionId:n}),{modelVersionEarlyAccessPurchase:j,purchasingModelVersionEarlyAccess:y}=(0,nN.$v)(),w=(0,sf.Db)(),b=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"download";try{await j({modelVersionId:n,type:e}),(0,eK.LX)({message:"You have successfully purchased access to this model version! You are now able to ".concat("download"===e?"download & generate with":"generate with"," this model version")}),"generation"===e&&w(),o()}catch(e){}},I=l.imageGeneration&&(null==v?void 0:v.canGenerate),z=(null==x?void 0:x.chargeForDownload)&&(null==x?void 0:x.downloadPrice),C=I&&(null==x?void 0:x.chargeForGeneration)&&(null==x?void 0:x.generationPrice),S=[z&&"download",C&&"generate"].filter(Boolean).join(" or "),M=(0,iL.Gf)(null!==(i=null==v?void 0:v.model.type)&&void 0!==i?i:"");return(0,r.jsx)(iA.u,{...t,title:"Get access to this Model Version!",size:"sm",withCloseButton:!0,children:!x||d?(0,r.jsx)(a.M,{my:"md",children:(0,r.jsx)(f.a,{})}):(0,r.jsxs)(h.K,{children:["generation"===s&&I&&!C&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),size:"xs",color:"yellow",iconColor:"yellow",children:["The creator of this ",M," has not made generation available during the early access period."]}),"download"===s&&!z&&(0,r.jsxs)(el.L,{icon:(0,r.jsx)(iP.Z,{}),size:"xs",color:"yellow",iconColor:"yellow",children:["The creator of this ",M," has not made download access available during the early access period."]}),(0,r.jsxs)(c.x,{size:"sm",children:["The creator of this ",M," has set this version to early access, You can"," ",S," with this ",M," by purchasing it during the early access period or just waiting until it becomes public. The remaining time for early access is"," ",(0,r.jsx)(c.x,{component:"span",weight:"bold",children:(0,r.jsx)(n8.I,{endTime:null!=p?p:new Date})})]}),(0,r.jsxs)(h.K,{children:[z&&(0,r.jsxs)(h.K,{spacing:"xs",children:[(0,r.jsx)(su.n,{type:"submit",label:"Get Download Access",loading:y,buzzAmount:null==x?void 0:x.downloadPrice,onPerformTransaction:()=>b("download"),disabled:u}),(0,r.jsx)(c.x,{size:"xs",color:"dimmed",children:"Download access also grants generation access."})]}),C&&(0,r.jsxs)(h.K,{spacing:"xs",children:[(0,r.jsx)(su.n,{type:"submit",label:"Get Generation Access",loading:y,buzzAmount:null==x?void 0:x.generationPrice,onPerformTransaction:()=>b("generation"),disabled:m}),(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["The creator of the ",M," has enabled"," ",x.generationTrialLimit," trials for generation. Test this"," ",M," ",(0,r.jsx)(sj.F,{modelVersionId:n,"data-activity":"create:version-stat",onClick:()=>{t.onClose()},children:(0,r.jsx)(g.e,{children:"here"})}),"."]}),(0,r.jsx)(c.x,{size:"xs",color:"dimmed",children:"By purchasing generation access, you will not be able to download this resource, but you can make unlimited generations with it"})]}),(0,r.jsx)(k.z,{onClick:o,variant:"light",color:"gray",compact:!0,children:"Cancel"})]})]})})};var sw=n(81276),sb=n(1604);let sk=sb.z.object({date:sb.z.date(),time:sb.z.date()}).transform(e=>{let i=nO()(e.time);return{date:nO()(e.date).set("hour",i.hour()).set("minute",i.minute()).toDate()}}).refine(e=>e.date>new Date,{message:"Must be in the future",path:["time"]});function sI(e){let{opened:i,onClose:n,onSubmit:s}=e,t=(0,iD.cI)({schema:sk}),{minDate:o,maxDate:l}=(0,es.useMemo)(()=>({minDate:new Date,maxDate:nO()().add(3,"month").toDate()}),[]),a=async e=>{let{date:i}=e;s(i),n()};return(0,r.jsx)(iA.u,{opened:i,onClose:n,title:"Schedule your model",size:"md",centered:!0,children:(0,r.jsxs)(h.K,{spacing:"md",children:[(0,r.jsx)(c.x,{size:"sm",color:"dimmed",children:"Select the date and time you want to publish this model."}),(0,r.jsx)(iD.l0,{form:t,onSubmit:a,children:(0,r.jsxs)(h.K,{spacing:"xl",children:[(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{spacing:8,grow:!0,children:[(0,r.jsx)(iD.$x,{name:"date",label:"Publish Date",placeholder:"Select a date",withAsterisk:!0,minDate:o,maxDate:l}),(0,r.jsx)(iD.lJ,{name:"time",label:"Publish Time",format:"12",withAsterisk:!0})]}),(0,r.jsx)(c.x,{size:"xs",color:"dimmed",children:"The date and time are in your local timezone."})]}),(0,r.jsxs)(m.Z,{position:"right",children:[(0,r.jsx)(k.z,{variant:"default",onClick:n,children:"Cancel"}),(0,r.jsx)(k.z,{type:"submit",children:"Schedule"})]})]})})]})})}var sz=n(41524),sC=n(17533),sS=n(68848),sM=n(21896),sZ=n(12260),sT=n(2614),sA=n(82206),sP=n(37901),sD=n(58928),sN=n(70985),sB=(0,E.Z)("outline","server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),sE=n(10699);let sV=()=>{let e=(0,i4.D)(),i=e.onClose,n=(0,en.useRouter)();return(0,r.jsx)(iA.u,{...e,title:"Civitai Vault",size:"sm",withCloseButton:!0,children:(0,r.jsxs)(h.K,{align:"center",children:[(0,r.jsx)(b.k,{size:100,radius:50,color:"teal",variant:"light",children:(0,r.jsx)(nR.Z,{size:50})}),(0,r.jsx)(c.x,{weight:700,align:"center",children:"Try Civitai Vault"}),(0,r.jsx)(c.x,{align:"center",size:"sm",children:"Civitai Vault is your secure, cloud-based storage solution for your most cherished AI models."}),(0,r.jsx)(k.z,{onClick:()=>{n.push("/pricing"),i()},fullWidth:!0,radius:"xl",children:"Become a Member"}),(0,r.jsx)(k.z,{onClick:()=>{n.push("/product/vault"),i()},fullWidth:!0,color:"gray",radius:"xl",children:"Learn more about Vault"})]})})},sL=()=>{let e=(0,i4.D)(),i=e.onClose,n=(0,en.useRouter)();return(0,r.jsx)(iA.u,{...e,title:"Whoops!",size:"sm",withCloseButton:!0,children:(0,r.jsxs)(h.K,{align:"center",children:[(0,r.jsx)(b.k,{size:100,radius:50,color:"teal",variant:"light",children:(0,r.jsx)(sB,{size:50})}),(0,r.jsx)(c.x,{weight:700,align:"center",children:"Looks like you’re running out of storage"}),(0,r.jsx)(c.x,{align:"center",size:"sm",children:"You can get more storage by upgrading to a higher Supporter tier, along with other great benefits!"}),(0,r.jsx)(k.z,{onClick:()=>{n.push("/pricing"),i()},fullWidth:!0,radius:"xl",children:"Upgrade my membership now"})]})})};function sR(e){let{modelVersionId:i,children:n}=e,s=(0,ek.xJ)(),t=(0,ez.g)(),{data:o=!1,isRefetching:l}=eC.SX.vault.isModelVersionInVault.useQuery({modelVersionId:i},{enabled:!!(null==s?void 0:s.isMember)}),{toggleModelVersion:r,togglingModelVersion:a}=(0,sE.im)(),d=(0,es.useCallback)(async()=>{if(!(null==s?void 0:s.isMember)){eF.Pq.trigger({component:sV});return}try{await r({modelVersionId:i})}catch(i){var e;i.hasOwnProperty("message")&&(null==i?void 0:null===(e=i.message)||void 0===e?void 0:e.includes("Vault storage limit exceeded"))&&eF.Pq.trigger({component:sL})}},[r,i]);return t.vault?n({isInVault:o,isLoading:a||l,toggleVaultItem:d}):null}var sU=(0,E.Z)("outline","shield-off","IconShieldOff",[["path",{d:"M17.67 17.667a12 12 0 0 1 -5.67 3.333a12 12 0 0 1 -8.5 -15c.794 .036 1.583 -.006 2.357 -.124m3.128 -.926a11.997 11.997 0 0 0 3.015 -1.95a12 12 0 0 0 8.5 3a12 12 0 0 1 -1.116 9.376",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),sW=(0,E.Z)("outline","shield-check","IconShieldCheck",[["path",{d:"M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]]),sG=(0,E.Z)("outline","shield-x","IconShieldX",[["path",{d:"M13.252 20.601c-.408 .155 -.826 .288 -1.252 .399a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.19 7.357",key:"svg-0"}],["path",{d:"M22 22l-5 -5",key:"svg-1"}],["path",{d:"M17 22l5 -5",key:"svg-2"}]]),sF=n(36128);let sO={Pending:"gray",Success:"green",Danger:"red",Error:"orange"},s_={Pending:(0,r.jsx)(sU,{size:16}),Success:(0,r.jsx)(sW,{size:16}),Danger:(0,r.jsx)(sG,{size:16}),Error:(0,r.jsx)(sU,{size:16})},sX={Pending:"This file hasn't been scanned yet, check back soon.",Success:"This file appears to be safe.",Danger:"This file appears to be dangerous.",Error:"We couldn't scan this file. Be extra cautious."},sK=["Pending","Danger","Error","Success"];function sJ(e){var i;let{file:n,iconOnly:s}=e,{classes:t}=sH();if(!n)return null;let{virusScanResult:o,virusScanMessage:l,pickleScanResult:a,pickleScanMessage:d,scannedAt:u}=n,h=null!==(i=sK.find(e=>e===o||e===a))&&void 0!==i?i:nf.G1.Pending,x=sO[h],p=s_[h],g=sX[h],v=h===nf.G1.Success,j=u?nO()(u):null;return(0,r.jsxs)(m.Z,{spacing:4,noWrap:!0,children:[(0,r.jsx)(b.k,{color:x,size:"xs",children:p}),s?null:(0,r.jsxs)(c.x,{color:"dimmed",size:"xs",children:[(0,r.jsxs)(c.x,{component:"span",children:[v?"Verified":"Unverified",": "]}),(0,r.jsxs)(iI.J,{withArrow:!0,width:350,position:"bottom",withinPortal:!0,children:[(0,r.jsx)(iI.J.Target,{children:(0,r.jsx)(c.x,{component:"a",sx:{cursor:"pointer"},children:j?(0,r.jsx)("abbr",{title:j.format(),children:j.fromNow()}):(0,r.jsx)(r.Fragment,{children:"Scan requested"})})}),(0,r.jsxs)(iI.J.Dropdown,{children:[(0,r.jsxs)(c.x,{weight:500,size:"md",color:v?"green":"red",pb:5,children:["File ",v?"Verified":"Unverified"]}),(0,r.jsx)(c.x,{pb:5,children:g}),l&&(0,r.jsx)(sF.t,{className:"popover-markdown",children:l}),d&&(0,r.jsx)(sF.t,{className:"popover-markdown",children:d}),(0,r.jsx)(c.x,{component:"a",href:"https://github.com/civitai/civitai/wiki/Model-Safety-Checks",target:"_blank",rel:"nofollow noreferrer",size:"xs",color:"dimmed",td:"underline",children:"What does this mean?"})]})]})]})]})}let sH=(0,C.k)(e=>({hideSm:{[si.D.smallerThan("md")]:{display:"none"}}}));var sY=n(76772);let sq={metadata:{format:"SafeTensor",size:"pruned",fp:"fp16"}},sQ={format:100,size:10,fp:1},s$=e=>{let{file:i,modelType:n}=e,{format:s,size:t,fp:o}=i.metadata;return"Model"===i.type?n===nf.BY.Checkpoint?"".concat((0,n_.Z)(t)," ").concat((0,n_.Z)(i.type)," ").concat(null!=o?o:""):(0,iL.Gf)(n):(0,n_.Z)(i.type)},s0=(0,C.k)(()=>({ctaContainer:{width:"100%",flexWrap:"wrap","> *":{flexGrow:1},[si.D.largerThan("sm")]:{"> *":{flexGrow:0}}}}));function s1(e){var i,n,s,t,o,l,d,u,x,j,y,I,C,S,M,A,P,N,B,E,V,L,R,U,W,G,F,O,_,K;let{model:J,version:H,onBrowseClick:q,onFavoriteClick:Q}=e,$=(0,ek.xJ)(),{classes:ee,cx:ei}=s0(),{connected:et}=(0,nJ.ex)(),eo=(0,en.useRouter)(),er=eC.SX.useUtils(),ea=(0,ez.g)(),ed=(0,es.useRef)(null),[ec,eu]=(0,es.useState)(!1),[eh,em]=(0,nE._)({key:"model-version-details-accordions",defaultValue:["version-details"]}),ex=(0,es.useRef)(null),{isLoadingAccess:ep,isDownloadable:eg,isSelectableInGenerator:ev,canDownload:ej,canGenerate:ef}=(0,nN.S3)({modelVersionId:H.id}),ey=!!(null==H?void 0:H.usageControl)&&(null==H?void 0:H.usageControl)!==nf.j3.Download,ew=!eg||ey,{collection:eb,setShowcaseCollection:eI,settingShowcase:eS}=(0,nA.Lu)({modelId:J.id}),eM=H.canDownload||ej,eZ=(null===(i=J.user)||void 0===i?void 0:i.id)===(null==$?void 0:$.id),eT=eZ||(null==$?void 0:$.isModerator),eA=function(e){var i;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sq;if(!e.length)return null;let s={...sq.metadata,...n.metadata},t=e=>{let i=1e3;for(let[n,t]of Object.entries(e.metadata)){let e=sQ[n];e&&(t===s[n]?i+=e:i-=e)}return("Model"===e.type||"Pruned Model"===e.type)&&(i+=1e3),i};return null===(i=e.map(e=>({file:e,score:t(e)})).sort((e,i)=>i.score-e.score)[0])||void 0===i?void 0:i.file}(H.files,{metadata:null==$?void 0:$.filePreferences}),eN=null!==(U=null==eA?void 0:eA.hashes)&&void 0!==U?U:[],eB=null===(n=H.files)||void 0===n?void 0:n.length,eV=null===(s=H.files)||void 0===s?void 0:s.filter(e=>e.visibility===nf.pm.Public||eT),eL=eV.length,eR=et&&!!H.hashes&&(null===(t=H.hashes)||void 0===t?void 0:t.length)>0&&ej,eU=J.reportStats&&J.reportStats.ownershipProcessing>0,eW=!!(null==H?void 0:H.earlyAccessEndsAt)&&H.earlyAccessEndsAt>new Date,eG=null==H?void 0:H.earlyAccessConfig,eO=ev&&ea.imageGeneration&&H.canGenerate&&(!eW||!!(null==eG?void 0:eG.chargeForGeneration)||ef),e_=eC.SX.modelVersion.publish.useMutation(),eX=eC.SX.model.publish.useMutation(),eJ=eC.SX.model.requestReview.useMutation(),eH=eC.SX.modelVersion.requestReview.useMutation(),eY=e=>{if(!ea.earlyAccessModel){(0,eK.s9)({error:Error("Unauthorized"),title:"Unauthorized",reason:"This model will be available for download once early access is enabled to the public. Please check back later."});return}eF.Pq.trigger({component:sy,props:{modelVersionId:H.id,reason:e}})},eq=(0,es.useCallback)(e=>ep?{}:ej?e?{href:(0,so.zM)({versionId:H.id,type:e.type,meta:e.metadata})}:void 0:{onClick:()=>{eY("download")}},[ep,ej,H.id,eo]),{currentUserReview:eQ}=(0,sZ.LS)({modelId:J.id,modelVersionId:H.id}),e$=null==eQ?void 0:eQ.recommended,{alreadyDownloaded:e0}=(0,nN.NL)({modelId:J.id,versionId:H.id}),e1=async e=>{try{if(J.status!==nf.GJ.Published){let i=J.status===nf.GJ.UnpublishedViolation&&(null==$?void 0:$.isModerator)?J.modelVersions.map(e=>{let{id:i}=e;return i}):[H.id];await eX.mutateAsync({id:J.id,publishedAt:e,versionIds:i})}else await e_.mutateAsync({id:H.id,publishedAt:e})}catch(n){var i;let e=(null==n?void 0:null===(i=n.message)||void 0===i?void 0:i.includes("Insufficient funds"))?"You do not have enough funds to publish this model. You can remove early access or purchase more buzz in order to publish.":"Something went wrong while publishing your model. Please try again later.";(0,eK.s9)({error:Error(n.message),title:"Error publishing model",reason:e})}await er.model.getById.invalidate({id:J.id}),await er.modelVersion.getById.invalidate({id:H.id}),await er.image.getInfinite.invalidate()},e2=async()=>{try{J.status===nf.GJ.UnpublishedViolation?await eJ.mutateAsync({id:J.id}):await eH.mutateAsync({id:H.id}),(0,eK.LX)({title:"Request sent",message:"Your request has been sent to the moderators. We will review it as soon as possible."}),await er.model.getById.invalidate({id:J.id}),await er.modelVersion.getById.invalidate({id:H.id})}catch(e){(0,eK.s9)({error:Error(e.message),title:"Error requesting review",reason:"Something went wrong while requesting a review. Please try again later."})}},e3=J.mode===nf.Ce.Archived,e4=[{label:"Type",value:(0,r.jsxs)(m.Z,{spacing:0,noWrap:!0,position:"apart",children:[(0,r.jsxs)(w.C,{radius:"sm",px:5,children:[(0,iL.Gf)(J.type)," ",J.checkpointType]}),H.status!==nf.GJ.Published?(0,r.jsx)(w.C,{color:"yellow",radius:"sm",children:H.status}):(0,r.jsx)(nz,{type:J.type})]})},{label:"Stats",value:(0,r.jsxs)(m.Z,{spacing:4,children:[!ey&&(0,r.jsx)(eE.G,{radius:"xs",icon:(0,r.jsx)(Z.Z,{size:14}),children:(0,r.jsx)(c.x,{children:(null!==(W=null===(o=H.rank)||void 0===o?void 0:o.downloadCountAllTime)&&void 0!==W?W:0).toLocaleString()})}),H.canGenerate&&(0,r.jsx)(sj.F,{modelVersionId:H.id,"data-activity":"create:version-stat",disabled:ep,generationPrice:!ef&&!ep&&(null==eG?void 0:eG.chargeForGeneration)?null==eG?void 0:eG.generationPrice:void 0,onPurchase:()=>eY("generation"),children:(0,r.jsx)(eE.G,{radius:"xs",icon:(0,r.jsx)(T.Z,{size:14}),children:(0,r.jsx)(c.x,{children:(null!==(G=null===(l=H.rank)||void 0===l?void 0:l.generationCountAllTime)&&void 0!==G?G:0).toLocaleString()})})})]})},{label:"Reviews",value:(0,r.jsx)(sw.j,{modelId:J.id,versionId:H.id,thumbsUpCount:null!==(F=null===(d=H.rank)||void 0===d?void 0:d.thumbsUpCountAllTime)&&void 0!==F?F:0,thumbsDownCount:null!==(O=null===(u=H.rank)||void 0===u?void 0:u.thumbsDownCountAllTime)&&void 0!==O?O:0})},"Published"===H.status&&H.publishedAt?{label:"Published",value:(0,n6.p6)(H.publishedAt)}:{label:"Uploaded",value:(0,n6.p6)(H.createdAt)},{label:"Base Model",value:"ODOR"===H.baseModel?(0,r.jsxs)(m.Z,{spacing:8,position:"apart",noWrap:!0,children:[(0,r.jsxs)(c.x,{component:ie.p,href:"/product/odor",target:"_blank",children:[H.baseModel," "]}),(0,r.jsx)(nC,{href:"https://youtu.be/7j_sakwGK8M",tooltip:"What is this?"})]}):(0,r.jsxs)(m.Z,{spacing:8,position:"apart",noWrap:!0,children:[(0,r.jsxs)(c.x,{children:[H.baseModel," ",H.baseModelType&&"Standard"===H.baseModelType?"":H.baseModelType]}),(0,r.jsx)(nC,{href:"https://youtu.be/IIy3YwsXtTE?si=YiJDxMODCOTkUUM4&t=417",tooltip:"What is this?"})]})},{label:"Training",value:(0,r.jsxs)(m.Z,{spacing:4,children:[H.steps&&(0,r.jsxs)(w.C,{size:"sm",radius:"sm",color:"teal",children:["Steps: ",H.steps.toLocaleString()]}),H.epochs&&(0,r.jsxs)(w.C,{size:"sm",radius:"sm",color:"teal",children:["Epochs: ",H.epochs.toLocaleString()]})]}),visible:!!H.steps||!!H.epochs},{label:"Usage Tips",value:(0,r.jsxs)(m.Z,{spacing:4,children:[H.clipSkip&&(0,r.jsxs)(w.C,{size:"sm",radius:"sm",color:"cyan",children:["Clip Skip: ",H.clipSkip.toLocaleString()]}),!!(null===(x=H.settings)||void 0===x?void 0:x.strength)&&(0,r.jsx)(w.C,{size:"sm",radius:"sm",color:"cyan",children:"Strength: ".concat(H.settings.strength)})]}),visible:!!H.clipSkip||!!(null===(j=H.settings)||void 0===j?void 0:j.strength)},{label:"Trigger Words",visible:!!(null===(y=H.trainedWords)||void 0===y?void 0:y.length),value:(0,r.jsx)(sN.N,{trainedWords:H.trainedWords,files:H.files,type:J.type})},{label:"Training Images",value:(0,r.jsx)(c.x,{variant:"link",component:"a",href:"/api/download/training-data/".concat(H.id),target:"_blank",download:!0,children:"Download"}),visible:!!eV.find(e=>"Training Data"===e.type)&&!e3},{label:"Hash",value:(0,r.jsx)(n$.d,{hashes:eN}),visible:!!eN.length},{label:(0,r.jsxs)(m.Z,{spacing:"xs",children:[(0,r.jsx)(c.x,{weight:500,children:"AIR"}),(0,r.jsx)(sr.s,{size:20})]}),value:(0,r.jsx)(sr.o,{baseModel:H.baseModel,type:J.type,modelId:J.id,modelVersionId:H.id}),visible:ea.air},{label:(0,r.jsx)(m.Z,{spacing:"xs",children:(0,r.jsx)(c.x,{weight:500,children:"Bounty"})}),value:(0,r.jsx)(c.x,{variant:"link",component:"a",href:"/bounties/".concat(null===(I=J.meta)||void 0===I?void 0:I.bountyId),children:"Go to bounty"}),visible:!!(null===(C=J.meta)||void 0===C?void 0:C.bountyId)}],e5=e=>(0,r.jsxs)(m.Z,{position:"apart",noWrap:!0,spacing:0,children:[(0,r.jsx)(sJ,{file:e}),(0,r.jsxs)(m.Z,{spacing:4,children:[(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["Pruned Model"===e.type?"Pruned ":"",e.metadata.format]}),(0,r.jsx)(n1,{file:e})]})]}),e8=eA&&!ew&&e5(eA),e6=eV.map(e=>e3?(0,r.jsx)(v.v.Item,{py:4,icon:(0,r.jsx)(sJ,{file:e,iconOnly:!0}),disabled:!0,children:"".concat((0,n_.Z)(e.type)).concat(["Model","Pruned Model"].includes(e.type)?" "+e.metadata.format:""," (").concat((0,n0.f4)(e.sizeKB),")")},e.id):(0,r.jsxs)(v.v.Item,{component:"a",py:4,icon:(0,r.jsx)(sJ,{file:e,iconOnly:!0}),...eq(e),children:[s$({file:e,modelType:J.type})," (",(0,n0.f4)(e.sizeKB),")"," ","Public"!==e.visibility&&(0,r.jsx)(p.u,{label:"Only visible to you",position:"top",withArrow:!0,children:(0,r.jsx)(b.k,{color:"blue",size:"xs",sx:{alignSelf:"center"},ml:"xs",children:(0,r.jsx)(X.Z,{})})})]},e.id)),e7=eV.map(e=>(0,r.jsx)(ib.Z,{radius:0,py:"xs",sx:e=>({backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]}),children:(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{position:"apart",noWrap:!0,children:[(0,r.jsxs)(m.Z,{spacing:4,children:[(0,r.jsxs)(c.x,{size:"xs",weight:500,lineClamp:2,children:[s$({file:e,modelType:J.type})," (",(0,n0.f4)(e.sizeKB),")"]}),"Public"!==e.visibility?(0,r.jsx)(w.C,{size:"xs",radius:"xl",color:"violet",children:e.visibility}):null]}),(0,r.jsx)(k.z,{component:"a",variant:"subtle",size:"xs",...eq(e),disabled:e3,compact:!0,children:"Download"})]}),e5(e)]})},e.id)),e9=H.description?(0,iL.av)(H.description):"",ii=!!(null===(S=H.posts)||void 0===S?void 0:S.length),it=eT&&(H.status!==nf.GJ.Published||J.status!==nf.GJ.Published)&&eB>0&&ii,io=H.status===nf.GJ.Scheduled?H.publishedAt:void 0,il=eX.isLoading||e_.isLoading,ir=eZ&&!(null==$?void 0:$.isModerator)&&(J.status===nf.GJ.UnpublishedViolation||H.status===nf.GJ.UnpublishedViolation),id=!!J.deletedAt&&J.status===nf.GJ.Deleted,ic=eT&&!id&&!ir,iu=null!==(_=null===(M=H.meta)||void 0===M?void 0:M.unpublishedReason)&&void 0!==_?_:"other",ih="other"!==iu?null===(A=sY.O[iu])||void 0===A?void 0:A.notificationMessage:"Removal reason: ".concat(null===(P=H.meta)||void 0===P?void 0:P.customMessage,"."),im=ia.iQ[H.baseModel],ix=!!H.trainingStatus,ip=ia._G.supportedBaseModelAddendums.includes(H.baseModel)&&(!J.allowCommercialUse.length||J.allowCommercialUse.some(e=>["None","Image","RentCivit","Rent","Sell"].includes(e))||!J.allowNoCredit||!J.allowDerivatives||J.allowDifferentLicense);return(0,r.jsxs)(nH.a,{gutter:"xl",gutterSm:"sm",gutterMd:"xl",children:[(0,r.jsx)(sD.G,{entityId:H.id,entityType:"ModelVersion",type:"ModelVersionView"}),(0,r.jsx)(nH.a.Col,{xs:12,sm:5,md:4,orderSm:2,ref:ex,children:(0,r.jsxs)(h.K,{children:[J.mode!==nf.Ce.TakenDown&&(0,r.jsx)(ss,{modelId:J.id,modelVersionId:H.id,modelUserId:J.user.id,limit:ia.LY,mobile:!0}),ir?(0,r.jsx)(k.z,{color:"yellow",onClick:e2,loading:eJ.isLoading||eH.isLoading,disabled:!!((null===(N=J.meta)||void 0===N?void 0:N.needsReview)||(null===(B=H.meta)||void 0===B?void 0:B.needsReview)),fullWidth:!0,children:"Request a Review"}):it?(0,r.jsxs)(h.K,{spacing:4,children:[H.canGenerate&&eT&&(0,r.jsx)(sj.F,{modelVersionId:H.id,"data-activity":"create:model",py:8}),(0,r.jsxs)(k.z.Group,{children:[(0,r.jsx)(k.z,{color:"green",onClick:()=>e1(),loading:il,fullWidth:!0,children:"Publish this version"}),(0,r.jsx)(p.u,{label:io?"Reschedule":"Schedule publish",withArrow:!0,children:(0,r.jsx)(k.z,{color:"green",variant:"outline",loading:il,onClick:()=>eu(e=>!e),children:(0,r.jsx)(D.Z,{size:20})})})]}),io&&eT&&(0,r.jsx)(h.K,{children:(0,r.jsxs)(m.Z,{spacing:4,children:[(0,r.jsx)(b.k,{color:"gray",variant:"filled",radius:"xl",children:(0,r.jsx)(D.Z,{size:20})}),(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["Scheduled for ",nO()(io).format("MMMM D, h:mma")]})]})})]}):(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{spacing:"xs",className:ee.ctaContainer,children:[(0,r.jsxs)(m.Z,{spacing:"xs",sx:{flex:1,"> *":{flexGrow:1}},noWrap:!0,children:[eO&&(0,r.jsx)(sj.F,{modelVersionId:H.id,"data-activity":"create:model",sx:{flex:"2 !important",paddingLeft:8,paddingRight:12},disabled:ep||!!J.mode,generationPrice:!ef&&!ep&&(null==eG?void 0:eG.chargeForGeneration)?null==eG?void 0:eG.generationPrice:void 0,onPurchase:()=>eY("generation")}),eR&&(0,r.jsx)(nK.h,{modelId:J.id,modelVersionId:H.id,modelName:J.name,modelType:J.type,hashes:H.hashes,noTooltip:!0,children:e=>{let{color:i,onClick:n,ref:s,icon:t,label:o}=e;return eO?(0,r.jsx)(p.u,{label:o,children:(0,r.jsx)(k.z,{ref:s,color:i,onClick:n,disabled:!eA,variant:"light",sx:{flex:1,paddingLeft:8,paddingRight:8},fullWidth:!0,children:t})}):(0,r.jsx)(k.z,{ref:s,color:i,onClick:n,leftIcon:t,disabled:!eA,sx:{flex:"2 !important",paddingLeft:8,paddingRight:12},fullWidth:!0,children:o})}}),ew?null:eR||eO?1===eB?(0,r.jsx)(sa.o,{canDownload:eM,downloadPrice:!ej&&!ep&&(null==eG?void 0:eG.chargeForDownload)?null==eG?void 0:eG.downloadPrice:void 0,component:"a",...eq(eA),tooltip:"Download",disabled:!eA||e3||ep,sx:{flex:1,paddingLeft:8,paddingRight:8},iconOnly:!0}):(0,r.jsxs)(v.v,{position:"bottom-end",children:[(0,r.jsx)(v.v.Target,{children:(0,r.jsx)(sa.o,{canDownload:eM,downloadPrice:!ej&&!ep&&(null==eG?void 0:eG.chargeForDownload)?null==eG?void 0:eG.downloadPrice:void 0,disabled:!eA||e3||ep,sx:{flex:1,paddingLeft:8,paddingRight:8},iconOnly:!0})}),(0,r.jsx)(v.v.Dropdown,{children:e6})]}):(0,r.jsx)(sa.o,{component:"a",...eq(eA),canDownload:eM,downloadPrice:!ej&&!ep&&(null==eG?void 0:eG.chargeForDownload)?null==eG?void 0:eG.downloadPrice:void 0,disabled:!eA||e3||ep,sx:{flex:"2 !important",paddingLeft:8,paddingRight:12},children:(0,r.jsx)(c.x,{align:"center",children:eA?(0,r.jsxs)(r.Fragment,{children:["Download ",(0,r.jsx)(c.x,{span:!0,children:"(".concat((0,n0.f4)(null==eA?void 0:eA.sizeKB),")")})]}):eg?"No file":"Download disabled"})})]}),(0,r.jsxs)(m.Z,{spacing:"xs",sx:{flex:1,"> *":{flexGrow:1}},noWrap:!0,children:[(0,r.jsx)(p.u,{label:"Share",position:"top",withArrow:!0,children:(0,r.jsx)("div",{children:(0,r.jsx)(sA.T,{url:eo.asPath,title:J.name,collect:{modelId:J.id,type:nf.yl.Model},children:(0,r.jsx)(k.z,{sx:{paddingLeft:8,paddingRight:8},color:"gray",fullWidth:!0,children:(0,r.jsx)(nV.Z,{size:24})})})})}),Q&&(0,r.jsx)(p.u,{label:e$?"Unlike":"Like",position:"top",withArrow:!0,children:(0,r.jsx)("div",{children:(0,r.jsx)(ij.b,{reason:"favorite-model",children:(0,r.jsx)(k.z,{onClick:()=>Q({versionId:H.id,setTo:!e$}),color:e$?"green":"gray",sx:{paddingLeft:8,paddingRight:8},fullWidth:!0,children:(0,r.jsx)(is.l,{color:"#fff",filled:e$,size:24})})})})}),ej&&!ey&&(0,r.jsx)(sR,{modelVersionId:H.id,children:e=>{let{isLoading:i,isInVault:n,toggleVaultItem:s}=e;return(0,r.jsx)(p.u,{label:n?"Remove from Vault":"Add To Vault",position:"top",withArrow:!0,children:(0,r.jsx)(k.z,{sx:{paddingLeft:8,paddingRight:8},color:n?"green":"gray",onClick:s,disabled:i,variant:n?"light":void 0,children:i?(0,r.jsx)(f.a,{size:"xs"}):n?(0,r.jsx)(nL.Z,{size:24}):(0,r.jsx)(nR.Z,{size:24})})})}})]})]}),e8]}),H.status===nf.GJ.UnpublishedViolation&&!(null===(E=H.meta)||void 0===E?void 0:E.needsReview)&&(0,r.jsxs)(el.L,{color:"red",iconColor:"red",icon:(0,r.jsx)(Y.Z,{}),children:[(0,r.jsxs)(c.x,{children:["This model has been unpublished due to a violation of our"," ",(0,r.jsx)(c.x,{component:"a",variant:"link",href:"/content/tos",target:"_blank",children:"guidelines"})," ","and is not visible to the community."," ",iu&&ih?ih:null]}),(0,r.jsxs)(c.x,{children:["If you adjust your model to comply with our guidelines, you can request a review from one of our moderators. If you believe this was done in error, you can"," ",(0,r.jsx)(c.x,{component:"a",variant:"link",href:"/appeal",target:"_blank",children:"submit an appeal"}),"."]})]}),H.status===nf.GJ.UnpublishedViolation&&(null===(V=H.meta)||void 0===V?void 0:V.needsReview)&&(0,r.jsx)(el.L,{color:"yellow",iconColor:"yellow",icon:(0,r.jsx)(Y.Z,{}),children:"This version is currently being reviewed by our moderators. It will be visible to the community once it has been approved."}),(0,r.jsx)(sv,{modelVersionId:H.id}),(0,r.jsx)(n7,{modelId:J.id,versionId:H.id,modelType:J.type,deadline:null!==(K=H.earlyAccessEndsAt)&&void 0!==K?K:void 0}),(0,r.jsx)(sl,{versionId:H.id,modelType:J.type,files:H.files,baseModel:H.baseModel}),ew&&(0,r.jsx)(el.L,{color:"blue",iconColor:"blue",icon:(0,r.jsx)(T.Z,{size:16}),size:"sm",children:eg&&!ep?(0,r.jsxs)(c.x,{children:["You've set this model to Generation-Only. Other users will not be able to download this model. Click"," ",(0,r.jsx)(c.x,{component:ie.p,variant:"link",td:"underline",href:"/models/".concat(H.modelId,"/model-versions/").concat(H.id,"/edit"),children:"here"})," ","to change this behavior."]}):(0,r.jsxs)(c.x,{children:["The creator has set this model to Generation-Only. ",(0,r.jsx)(c.x,{variant:"link",td:"underline",component:ie.p,href:"/articles/11494",children:"Learn more"})]})}),!J.locked&&e0&&(0,r.jsx)(sM.GN,{modelId:J.id,modelVersionId:H.id,modelName:J.name,children:e=>{let{modelId:i,modelVersionId:n,userReview:s,loading:t}=e;return(0,r.jsxs)(ib.Z,{p:8,withBorder:!0,children:[(0,r.jsx)(h.K,{spacing:8,children:(0,r.jsxs)(m.Z,{spacing:8,position:"apart",noWrap:!0,children:[(0,r.jsxs)(m.Z,{spacing:8,noWrap:!0,children:[t?(0,r.jsx)(f.a,{size:"xs"}):s?(0,r.jsx)(r.Fragment,{children:s.recommended?(0,r.jsx)(is.l,{size:18}):(0,r.jsx)(is.k,{size:18})}):(0,r.jsx)(nU.Z,{size:18}),s?(0,r.jsxs)(c.x,{size:"sm",children:["You reviewed this on ",(0,n6.jt)(s.createdAt,!1)]}):(0,r.jsx)(c.x,{size:"sm",children:"What did you think of this resource?"})]}),s&&s.details?(0,r.jsxs)(m.Z,{noWrap:!0,spacing:4,children:[(0,r.jsx)(k.z,{size:"xs",color:"gray",onClick:()=>(0,eP.IQ)(s),children:"See Review"}),(0,r.jsx)(k.z,{size:"xs",color:"gray",component:ie.p,px:7,href:"/posts/create?modelId=".concat(i,"&modelVersionId=").concat(n),children:(0,r.jsx)(nT.Z,{size:16})})]}):(0,r.jsx)(sT._,{modelId:i,modelVersionId:n,userReview:s,size:"xs"})]})}),s&&!s.details&&(0,r.jsx)(ib.Z.Section,{py:"sm",mt:"sm",inheritPadding:!0,withBorder:!0,children:(0,r.jsx)(sM.l_,{modelId:i,modelVersionId:n,userReview:s})})]})}}),(0,r.jsxs)(nB.U,{variant:"separated",multiple:!0,onChange:em,value:eh,styles:e=>({content:{padding:0},item:{overflow:"hidden",borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3],boxShadow:e.shadows.sm},control:{padding:e.spacing.sm}}),children:[(null===(L=J.meta)||void 0===L?void 0:L.showcaseCollectionId)&&eb&&(0,r.jsxs)(nB.U.Item,{value:"collection-showcase",children:[(0,r.jsx)(nB.U.Control,{disabled:eS,className:"aria-expanded:border-b aria-expanded:border-solid aria-expanded:border-gray-2 dark:aria-expanded:border-dark-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(ie.p,{href:"/collections/".concat(null===(R=J.meta)||void 0===R?void 0:R.showcaseCollectionId),passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(g.e,{variant:"text",onClick:e=>e.stopPropagation(),inherit:!0,children:eb.name})}),(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["Collection",eb.itemCount>0?" - ".concat(eb.itemCount.toLocaleString()," items"):""]})]}),eT&&(0,r.jsx)(g.e,{size:"sm",className:ei(eS&&"text-dark-2 cursor-not-allowed pointer-events-none"),onClick:e=>{e.stopPropagation(),e.preventDefault(),J.user.username&&(0,eP.O_)({username:J.user.username,onSelect:e=>{eb.id!==e&&eI(e).catch(()=>null)}})},children:"Edit"})]})}),(0,r.jsx)(nB.U.Panel,{children:(0,r.jsx)(n4,{modelId:J.id,loading:eS})})]}),(0,r.jsxs)(nB.U.Item,{value:"version-details",children:[(0,r.jsx)(nB.U.Control,{children:(0,r.jsxs)(m.Z,{position:"apart",children:["Details",ic&&(0,r.jsxs)(v.v,{withinPortal:!0,children:[(0,r.jsx)(v.v.Target,{children:(0,r.jsx)(g.e,{size:"sm",onClick:e=>e.stopPropagation(),children:"Edit"})}),(0,r.jsxs)(v.v.Dropdown,{children:[(0,r.jsx)(v.v.Item,{component:ie.p,onClick:e=>e.stopPropagation(),href:"/models/".concat(H.modelId,"/edit"),children:"Edit Model Details"}),(0,r.jsx)(v.v.Item,{component:ie.p,onClick:e=>e.stopPropagation(),href:"/models/".concat(H.modelId,"/model-versions/").concat(H.id,"/edit"),children:"Edit Version Details"})]})]})]})}),(0,r.jsx)(nB.U.Panel,{children:(0,r.jsx)(nQ.N,{items:e4,labelWidth:"30%",withBorder:!0,paperProps:{sx:{borderLeft:0,borderRight:0,borderBottom:0},radius:0}})})]}),eg&&(0,r.jsxs)(nB.U.Item,{value:"version-files",sx:e=>({marginTop:e.spacing.md,marginBottom:J.locked?void 0:e.spacing.md,borderColor:eB?void 0:"".concat(e.colors.red[4]," !important")}),children:[(0,r.jsx)(nB.U.Control,{disabled:e3,children:(0,r.jsxs)(m.Z,{position:"apart",children:[eL>0?"".concat(1===eL?"1 File":"".concat(eL," Files")):"Files",eT&&(0,r.jsx)(eD.v4,{name:"filesEdit",state:{modelVersionId:H.id},children:(0,r.jsx)(c.x,{variant:"link",size:"sm",children:"Manage Files"})})]})}),(0,r.jsx)(nB.U.Panel,{children:(0,r.jsx)(h.K,{spacing:2,children:eL>0?e7:(0,r.jsx)(a.M,{p:"xl",children:(0,r.jsx)(c.x,{size:"md",color:"dimmed",children:"This version is missing files"})})})})]}),H.recommendedResources&&H.recommendedResources.length>0&&(0,r.jsxs)(nB.U.Item,{value:"recommended-resources",children:[(0,r.jsx)(nB.U.Control,{children:"Recommended Resources"}),(0,r.jsx)(nB.U.Panel,{children:(0,r.jsx)(h.K,{spacing:2,children:H.recommendedResources.map(e=>(0,r.jsx)(ib.Z,{component:ie.p,href:"/models/".concat(e.model.id,"?modelVersionId=").concat(e.id),radius:0,py:"xs",sx:e=>({cursor:"pointer",backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]}),"data-activity":"follow-recommendation:details",children:(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{position:"apart",spacing:8,noWrap:!0,children:[(0,r.jsx)(c.x,{size:"xs",weight:500,lineClamp:2,children:e.model.name}),(0,r.jsx)(w.C,{size:"xs",children:(0,iL.Gf)(e.model.type)})]}),(0,r.jsx)(c.x,{color:"dimmed",size:"xs",children:e.name})]})},e.id))})})]}),H.description&&(0,r.jsxs)(nB.U.Item,{value:"version-description",children:[(0,r.jsx)(nB.U.Control,{children:"About this version"}),(0,r.jsx)(nB.U.Panel,{px:"sm",pb:"sm",children:(0,r.jsxs)(h.K,{spacing:4,children:[H.description&&(0,r.jsx)(z.x,{sx:{p:{fontSize:14,marginBottom:10}},children:(0,r.jsx)(nY.i,{maxHeight:200,controlRef:ed,styles:{control:{display:"none"}},children:(0,r.jsx)(sS.u,{html:H.description})})}),e9.length>150?(0,r.jsx)(c.x,{variant:"link",size:"xs",onClick:()=>{var e;return eF.Pq.trigger({component:s2,props:{description:null!==(e=H.description)&&void 0!==e?e:""}})},tabIndex:0,sx:{cursor:"pointer"},children:"Show more"}):null]})})]})]}),(0,r.jsx)(nq.xq,{user:J.user,tipBuzzEntityType:"Model",tipBuzzEntityId:J.id}),ix&&(0,r.jsxs)(m.Z,{align:"flex-start",position:"right",spacing:4,mt:-10,mb:-5,style:{opacity:.5},children:[(0,r.jsx)(sP.I,{size:14}),(0,r.jsx)(c.x,{size:"xs",lh:1,children:"Created on Civitai"})]}),(0,r.jsxs)(m.Z,{position:"apart",align:"flex-start",noWrap:!0,children:["Checkpoint"===J.type&&(0,r.jsxs)(m.Z,{spacing:4,noWrap:!0,style:{flex:1,overflow:"hidden"},align:"flex-start",children:[(0,r.jsx)(nW,{size:16}),(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",sx:{whiteSpace:"nowrap",lineHeight:1.1},children:["License",J.licenses.length>0?"s":"",":"]}),(0,r.jsxs)(h.K,{spacing:0,children:[im&&(0,r.jsx)(c.x,{component:"a",href:im.url,rel:"nofollow noreferrer",td:"underline",target:"_blank",size:"xs",color:"dimmed",sx:{lineHeight:1.1},children:im.name}),ip&&(0,r.jsx)(ie.p,{legacyBehavior:!0,href:"/models/license/".concat(H.id),passHref:!0,children:(0,r.jsx)(g.e,{variant:"text",td:"underline",size:"xs",color:"dimmed",sx:{lineHeight:1.1},children:"Addendum"})}),J.licenses.map(e=>{let{url:i,name:n}=e;return(0,r.jsx)(c.x,{component:"a",rel:"nofollow",href:i,td:"underline",size:"xs",color:"dimmed",target:"_blank",sx:{lineHeight:1.1},children:n},n)})]})]}),(0,r.jsx)(sz.t,{spacing:5,size:28,permissions:J,ml:"auto"})]}),(null==im?void 0:im.notice)&&(0,r.jsx)(c.x,{size:"xs",color:"dimmed",children:im.notice}),(null==im?void 0:im.poweredBy)&&(0,r.jsx)(c.x,{size:"xs",weight:500,children:im.poweredBy}),eU&&(0,r.jsx)(el.L,{icon:(0,r.jsx)(nG.Z,{}),children:"A verified artist believes this model was fine-tuned on their art. We're discussing this with the model creator and artist"}),J.poi&&(0,r.jsx)(sC.c,{}),!J.nsfw&&(0,r.jsx)(nX.KI,{})]})}),(0,r.jsx)(nH.a.Col,{xs:12,sm:7,md:8,orderSm:1,sx:e=>({[si.D.largerThan("xs")]:{padding:"0 ".concat(e.spacing.sm,"px"),margin:"".concat(e.spacing.sm,"px 0")}}),children:(0,r.jsxs)(h.K,{children:[J.mode!==nf.Ce.TakenDown&&(0,r.jsx)(ss,{modelId:J.id,modelVersionId:H.id,modelUserId:J.user.id,limit:ia.LY,onBrowseClick:q}),J.description?(0,r.jsx)(nY.i,{maxHeight:460,children:(0,r.jsx)(sS.u,{html:J.description,withMentions:!0})}):null]})}),(0,r.jsx)(sI,{opened:ec,onClose:()=>eu(e=>!e),onSubmit:e=>e1(e)})]})}function s2(e){let{description:i}=e,n=(0,i4.D)();return(0,r.jsx)(iA.u,{...n,title:"About this version",overflow:"inside",size:"lg",centered:!0,children:(0,r.jsx)(sS.u,{html:i})})}var s3=n(52119),s4=n(62777),s5=n(30897),s8=n(49630),s6=n(97755),s7=n(9957),s9=!0;function te(e){var i,n,s,t,o,l,C,E,ea,ed,ec,eu,eh,em,ex,ep,eg,ev,ej,ef,ey,ew,eb,eM,eV,eL,eR,eU,eW,eG,eF;let{id:eO}=e,e_=(0,ek.xJ)(),eX=(0,en.useRouter)(),{classes:eJ,theme:eH}=ti(),eY=eC.SX.useUtils(),eq=(0,s6.Z)(),eQ=(0,ez.g)(),[e$,{toggle:e0}]=(0,S.q)(),e1=(0,es.useRef)(null),e2=(0,es.useRef)(null),{blockedUsers:e3}=(0,s8.s9)(),{data:e4,isLoading:e5}=eC.SX.model.getById.useQuery({id:eO},{onSuccess(e){let i=e.modelVersions[0];i&&iu(i)}}),e8=eX.query.view,e6=eX.query.modelVersionId,e7=Number(null!==(ep=Array.isArray(e6)?e6[0]:e6)&&void 0!==ep?ep:null==e4?void 0:null===(i=e4.modelVersions[0])||void 0===i?void 0:i.id),{data:{Recommended:e9=[]}={Recommended:[]}}=eC.SX.user.getEngagedModels.useQuery(void 0,{enabled:!!e_,cacheTime:1/0,staleTime:1/0}),ii=e4&&e9.includes(e4.id),it=null!==(eg=null==e_?void 0:e_.isModerator)&&void 0!==eg&&eg,io=(null==e4?void 0:e4.user.id)===(null==e_?void 0:e_.id),il=io||it,ir=il?null!==(ej=null==e4?void 0:e4.modelVersions)&&void 0!==ej?ej:[]:null!==(ev=null==e4?void 0:e4.modelVersions.filter(e=>e.status===nf.GJ.Published))&&void 0!==ev?ev:[],id=null!==(ey=null!==(ef=ir.find(e=>e.id===e7))&&void 0!==ef?ef:ir[0])&&void 0!==ey?ey:null,[ic,iu]=(0,es.useState)(id),ih=(0,iL.W7)(null==ic?void 0:ic.baseModel),im=(0,eZ.A)({entityType:"Model",entityId:null!==(ew=null==e4?void 0:e4.id)&&void 0!==ew?ew:-1}),{canDownload:ix,canGenerate:ip}=(0,nN.S3)({modelVersionId:null==ic?void 0:ic.id}),iv=ir.find(e=>e.canGenerate),{images:iy,isLoading:iw}=(0,ig.XQ)({modelVersionId:null==id?void 0:id.id,prioritizedUserIds:e4?[e4.user.id]:void 0,period:"AllTime",sort:i8.FA.MostReactions,limit:ia.LY,pending:!0},{enabled:!!id}),ib=eC.SX.model.delete.useMutation({async onSuccess(e,i){let{permanently:n}=i;await eY.model.getAll.invalidate(),n||await eY.model.getById.invalidate({id:eO}),(!it||n)&&await eX.replace("/models"),(0,eK.LX)({title:"Successfully deleted the model",message:"Your model has been deleted"}),(0,M.pT)()},onError(e){var i;(0,eK.s9)({error:Error(e.message),title:"Could not delete model",reason:null!==(i=e.message)&&void 0!==i?i:"An unexpected error occurred, please try again"})}}),ik=e=>{let{permanently:i=!1}=e||{};(0,M._5)({title:"Delete Model",children:i?"Are you sure you want to permanently delete this model? This action is destructive and cannot be reverted.":"Are you sure you want to delete this model? This action is destructive and you will have to contact support to restore your data.",centered:!0,labels:{confirm:"Delete Model",cancel:"No, don't delete it"},confirmProps:{color:"red",disabled:ib.isLoading},closeOnConfirm:!1,onConfirm:()=>{e4&&ib.mutate({id:e4.id,permanently:i})}})},iI=eC.SX.model.unpublish.useMutation({async onSuccess(){await eY.model.getById.invalidate({id:eO})},onError(e){(0,eK.s9)({error:Error(e.message)})}}),iz=eC.SX.model.publish.useMutation({async onSuccess(){await eY.model.getById.invalidate({id:eO})},onError(e){(0,eK.s9)({error:Error(e.message)})}}),iC=eC.SX.model.restore.useMutation({async onSuccess(){await eY.model.getById.invalidate({id:eO}),await eY.model.getAll.invalidate()},onError(e){(0,eK.s9)({error:Error(e.message)})}}),iS=eC.SX.modelVersion.delete.useMutation({async onMutate(e){await eY.model.getById.cancel({id:eO});let i=eY.model.getById.getData({id:eO});if(i){let n=i.modelVersions.filter(i=>i.id!==e.id);eY.model.getById.setData({id:eO},{...i,modelVersions:n})}return{previousData:i}},async onSuccess(){var e;let i=null===(e=eY.model.getById.getData({id:eO}))||void 0===e?void 0:e.modelVersions[0];i&&eX.replace("/models/".concat(eO,"?modelVersionId=").concat(i.id)),(0,M.pT)()},onError(e,i,n){var s,t,o;(0,eK.s9)({error:Error(e.message),title:"Unable to delete version",reason:null!==(o=e.message)&&void 0!==o?o:"An unexpected error occurred, please try again"}),(null==n?void 0:null===(s=n.previousData)||void 0===s?void 0:s.id)&&eY.model.getById.setData({id:null==n?void 0:null===(t=n.previousData)||void 0===t?void 0:t.id},null==n?void 0:n.previousData)}}),iM=eC.SX.model.changeMode.useMutation(),iZ=async e=>{var i;let n=eY.model.getById.getData({id:eO});await eY.model.getById.cancel({id:eO}),n&&eY.model.getById.setData({id:eO},{...n,mode:e,meta:null!==(i=n.meta)&&void 0!==i?i:null}),iM.mutate({id:eO,mode:e},{async onSuccess(){await eY.model.getById.invalidate({id:eO})},onError(e){(0,eK.s9)({title:"Unable to change mode",error:Error(e.message)}),eY.model.getById.setData({id:eO},n)}})},iT=eC.SX.model.rescan.useMutation(),iA=async()=>{iT.mutate({id:eO})},iP=(0,sZ.KD)(),iD=e=>{let{versionId:i,setTo:n}=e;e4&&iP.mutate({modelId:e4.id,modelVersionId:i,setTo:n})};if((0,es.useEffect)(()=>{var e;if(e5)return;let i=ir.find(e=>e.id===e7);ir.some(e=>e.id===(null==ic?void 0:ic.id))||iu(null!==(e=null!=i?i:ir[0])&&void 0!==e?e:null),ic&&i!==ic&&eX.replace("/models/".concat(eO,"?modelVersionId=").concat(ic.id),void 0,{shallow:!0})},[eO,ir,ic,e7,e5]),e5)return(0,r.jsx)(s3.w,{});let iN=!e4,iB=!!e4&&!!e4.deletedAt&&e4.status===nf.GJ.Deleted,iE=e4&&!il&&!it&&(e4.status!==nf.GJ.Published||!e4.modelVersions.length),iR=e3.find(e=>e.id===(null==e4?void 0:e4.user.id));if(iB&&!il&&!it)return(0,r.jsx)(a.M,{p:"xl",children:(0,r.jsx)(d.b,{children:(0,r.jsx)(c.x,{size:"lg",children:"This resource has been removed by its owner"})})});if(iN||(iB||iE||iR)&&!it)return(0,r.jsx)(er.T,{});let iU=iy.find(e=>(0,i3.A_)(e.nsfwLevel)),iW=iU?(0,et.Qy)(iU.url,{width:1200}):void 0,iG={"@context":"https://schema.org","@type":"SoftwareApplication",applicationCategory:"Multimedia",applicationSubCategory:"".concat(ih," Model"),description:e4.description,name:e4.name,image:iW,author:e4.user.username,datePublished:e4.publishedAt,aggregateRating:{"@type":"AggregateRating",ratingValue:null===(n=e4.rank)||void 0===n?void 0:n.ratingAllTime,reviewCount:null===(s=e4.rank)||void 0===s?void 0:s.ratingCountAllTime}},iF=e4.status===nf.GJ.Published,iO=e4.modelVersions.some(e=>e.inaccurate),i_=null!==(eb=null==e_?void 0:e_.muted)&&void 0!==eb&&eb,iX=e4.modelVersions.every(e=>e.earlyAccessDeadline),iK=!i_&&(!iX||ix||ip||(null==e_?void 0:e_.isModerator)),iJ=e4.modelVersions.length,iH=e4.earlyAccessDeadline&&(0,n6.YI)(e4.earlyAccessDeadline),iY=ic&&!!ic.earlyAccessDeadline&&(0,n6.YI)(ic.earlyAccessDeadline),iq=null===(t=e4.tagsOnModels.find(e=>{let{tag:i}=e;return!!i.isCategory}))||void 0===t?void 0:t.tag,iQ=e4.tagsOnModels.filter(e=>{let{tag:i}=e;return!i.isCategory}).map(e=>e.tag),i$="basic"===e8&&it,i0=eq&&!e5&&!iw&&!i$,i1=null!==(eM=null===(o=e4.meta)||void 0===o?void 0:o.unpublishedReason)&&void 0!==eM?eM:"other",i2="other"!==i1?null===(l=sY.O[i1])||void 0===l?void 0:l.notificationMessage:"Removal reason: ".concat(null===(C=e4.meta)||void 0===C?void 0:C.customMessage,".");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nu.h,{title:"".concat(e4.name).concat(ic?" - "+ic.name:""," | ").concat(ih," ").concat((0,iL.Gf)(e4.type)," | Civitai"),description:(0,ei.Z)((0,iL.av)(null!==(eV=e4.description)&&void 0!==eV?eV:""),{length:150}),images:iy,links:[{href:"".concat(iV.O.NEXT_PUBLIC_BASE_URL,"/models/").concat(e4.id,"/").concat((0,iL.vY)(e4.name)),rel:"canonical"},{href:"".concat(iV.O.NEXT_PUBLIC_BASE_URL,"/models/").concat(e4.id),rel:"alternate"}],schema:iG,deIndex:e4.status!==nf.GJ.Published||e4.availability===nf.a8.Unsearchable}),(0,r.jsxs)(s5.R,{nsfw:e4.nsfw,contentNsfwLevel:e4.nsfwLevel,children:[(0,r.jsx)(sD.G,{entityId:e4.id,entityType:"Model",type:"ModelView"}),!e4.nsfw&&(0,r.jsx)(eo.X,{minContainerWidth:2800}),(0,r.jsxs)(u.W,{size:"xl",children:[(0,r.jsxs)(h.K,{spacing:"xl",children:[(0,r.jsxs)(h.K,{spacing:"xs",children:[(0,r.jsxs)(h.K,{spacing:4,children:[(0,r.jsxs)(m.Z,{align:"flex-start",sx:{justifyContent:"space-between"},noWrap:!0,children:[(0,r.jsxs)(m.Z,{className:eJ.titleWrapper,align:"center",children:[(0,r.jsx)(x.D,{className:eJ.title,order:1,lineClamp:2,children:null==e4?void 0:e4.name}),(0,r.jsx)(p.u,{label:"".concat((null!==(eL=null===(E=e4.rank)||void 0===E?void 0:E.thumbsUpCountAllTime)&&void 0!==eL?eL:0).toLocaleString()," unique positive reviews"),withinPortal:!0,children:(0,r.jsx)("div",{children:(0,r.jsx)(ij.b,{reason:"favorite-model",children:(0,r.jsx)(eE.G,{radius:"sm",color:ii?"green":"gray",size:"lg",icon:(0,r.jsx)(is.l,{size:18,color:ii?"green":void 0,filled:ii}),sx:{cursor:"pointer"},onClick:()=>iD({setTo:!ii}),children:(0,r.jsx)(c.x,{className:eJ.modelBadgeText,children:(0,n0.dm)(null!==(eR=null===(ea=e4.rank)||void 0===ea?void 0:ea.thumbsUpCountAllTime)&&void 0!==eR?eR:0)})})})})}),(0,r.jsx)(eE.G,{radius:"sm",size:"lg",icon:(0,r.jsx)(Z.Z,{size:18}),children:(0,r.jsx)(c.x,{className:eJ.modelBadgeText,children:(0,n0.dm)(null!==(eU=null===(ed=e4.rank)||void 0===ed?void 0:ed.downloadCountAllTime)&&void 0!==eU?eU:0)})}),e4.canGenerate&&iv&&(0,r.jsx)(sj.F,{modelVersionId:iv.id,"data-activity":"create:model-stat",children:(0,r.jsx)(eE.G,{radius:"sm",size:"lg",icon:(0,r.jsx)(T.Z,{size:18}),children:(0,r.jsx)(c.x,{className:eJ.modelBadgeText,children:(0,n0.dm)(null!==(eW=null===(ec=e4.rank)||void 0===ec?void 0:ec.generationCountAllTime)&&void 0!==eW?eW:0)})})}),eQ.collections&&(0,r.jsx)(ij.b,{reason:"add-to-collection",children:(0,r.jsx)(eE.G,{radius:"sm",size:"lg",icon:(0,r.jsx)(A.Z,{size:18}),sx:{cursor:"pointer"},onClick:()=>{(0,eI.C)("addToCollection",{modelId:eO,type:nf.yl.Model})},children:(0,r.jsx)(c.x,{className:eJ.modelBadgeText,children:(0,n0.dm)(null!==(eG=null===(eu=e4.rank)||void 0===eu?void 0:eu.collectedCountAllTime)&&void 0!==eG?eG:0)})})}),(0,r.jsx)(eZ.k,{toUserId:e4.user.id,entityId:e4.id,entityType:"Model",children:(0,r.jsx)(eE.G,{radius:"sm",size:"lg",icon:(0,r.jsx)(P.Z,{size:18,color:"yellow.7",style:{fill:eH.colors.yellow[7]}}),children:(0,r.jsx)(c.x,{className:eJ.modelBadgeText,children:(0,n0.dm)((null!==(eF=null===(eh=e4.rank)||void 0===eh?void 0:eh.tippedAmountCountAllTime)&&void 0!==eF?eF:0)+im)})})}),iH&&(0,r.jsx)(p.u,{label:(0,r.jsxs)(c.x,{children:["Early Access helps creators monetize,"," ",(0,r.jsx)(g.e,{href:"/articles/6341",children:"learn more here"})]}),children:(0,r.jsx)(eE.G,{radius:"sm",color:"green",size:"lg",icon:(0,r.jsx)(D.Z,{size:18}),children:"Early Access"})})]}),(0,r.jsxs)(m.Z,{spacing:8,noWrap:!0,children:[(0,r.jsx)(nC,{size:30,stroke:1.5,href:"https://education.civitai.com/civitais-guide-to-resource-types/#models",tooltip:"What is this?"}),(0,r.jsx)(nb,{className:eJ.headerButton,modelId:e4.id,userId:e4.user.id}),(0,r.jsxs)(v.v,{position:"bottom-end",transition:"pop-top-right",withinPortal:!0,children:[(0,r.jsx)(v.v.Target,{children:(0,r.jsx)(j.A,{className:eJ.headerButton,variant:"light",children:(0,r.jsx)(N.Z,{})})}),(0,r.jsxs)(v.v.Dropdown,{children:[e_&&io&&iF&&(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(B.Z,{size:14,stroke:1.5}),color:"yellow",onClick:()=>iI.mutate({id:eO}),disabled:iI.isLoading,children:"Unpublish"}),e_&&io&&e4.status===nf.GJ.Unpublished&&(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(V,{size:14,stroke:1.5}),color:"green",onClick:()=>{e4&&e4.status===nf.GJ.Unpublished&&io&&(0,M._5)({centered:!0,closeOnConfirm:!1,title:"Republish model",children:"This model and all of its versions will be publicly available. Are you sure you want to republish this model?",labels:{confirm:"Yes, republish",cancel:"No, go back"},onConfirm:()=>{iz.mutate({id:e4.id,versionIds:null==e4?void 0:e4.modelVersions.map(e=>e.id)},{onSuccess:()=>(0,M.pT)()})}})},disabled:iz.isLoading,children:"Republish"}),e_&&it&&iB&&(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(L.Z,{size:14,stroke:1.5}),color:"green",onClick:()=>iC.mutate({id:eO}),disabled:iC.isLoading,children:"Restore"}),e_&&it&&(0,r.jsxs)(r.Fragment,{children:[iV.O.NEXT_PUBLIC_MODEL_LOOKUP_URL&&(0,r.jsx)(v.v.Item,{component:"a",target:"_blank",icon:(0,r.jsx)(R.Z,{size:14,stroke:1.5}),href:"".concat(iV.O.NEXT_PUBLIC_MODEL_LOOKUP_URL).concat(e4.id),children:"Lookup Model"}),iF&&(0,r.jsx)(v.v.Item,{color:"yellow",icon:(0,r.jsx)(B.Z,{size:14,stroke:1.5}),onClick:()=>(0,eI.C)("unpublishModel",{modelId:e4.id}),children:"Unpublish as Violation"}),(0,r.jsx)(v.v.Item,{color:eH.colors.red[6],icon:(0,r.jsx)(U.Z,{size:14,stroke:1.5}),onClick:()=>ik({permanently:!0}),children:"Permanently Delete Model"})]}),e_&&il&&!iB&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Item,{color:eH.colors.red[6],icon:(0,r.jsx)(U.Z,{size:14,stroke:1.5}),onClick:()=>ik(),children:"Delete Model"}),(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(W.Z,{size:14,stroke:1.5}),component:ie.p,href:"/models/".concat(e4.id,"/edit"),children:"Edit Model"})]}),eQ.collections&&(0,r.jsx)(nd.a,{onClick:()=>(0,eI.C)("addToCollection",{modelId:e4.id,type:nf.yl.Model})}),il&&(0,r.jsx)(s4.M,{entityType:"Model",entityId:e4.id},"add-to-showcase"),(!e_||!il||it)&&(0,r.jsx)(ij.b,{reason:"report-model",children:(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(G.Z,{size:14,stroke:1.5}),onClick:()=>(0,eP.$B)({entityType:s7.Bj.Model,entityId:e4.id}),children:"Report"})}),it&&(0,r.jsx)(v.v.Item,{icon:iT.isLoading?(0,r.jsx)(f.a,{size:14}):(0,r.jsx)(F.Z,{size:14,stroke:1.5}),onClick:()=>iA(),children:"Rescan Files"}),e_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Label,{children:"Moderation"}),(0,r.jsx)(eB.A,{as:"menu-item",userId:e4.user.id}),(0,r.jsx)(eN.r,{as:"menu-item",modelId:e4.id}),(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(O.Z,{size:14,stroke:1.5}),onClick:()=>(0,eI.C)("blockModelTags",{modelId:e4.id}),children:"Hide content with these tags"}),it&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nj,{modelId:e4.id,locked:e4.locked,children:e=>{let{onClick:i}=e;return(0,r.jsxs)(v.v.Item,{icon:e4.locked?(0,r.jsx)(_,{size:14,stroke:1.5}):(0,r.jsx)(X.Z,{size:14,stroke:1.5}),onClick:i,children:[e4.locked?"Unlock":"Lock"," model discussion"]})}}),(0,r.jsx)(nc.b,{entityType:"Model",entityId:e4.id},"toggle-searchable-menu-item"),e4.mode?(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(H.Z,{size:14,stroke:1.5}),onClick:()=>iZ(null),children:"Bring Back"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(K,{size:14,stroke:1.5}),onClick:()=>iZ(nf.Ce.Archived),children:"Archive"}),(0,r.jsx)(v.v.Item,{icon:(0,r.jsx)(J.Z,{size:14,stroke:1.5}),onClick:()=>iZ(nf.Ce.TakenDown),children:"Take Down"})]})]})]}),iF&&(il||it)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.v.Label,{children:"Advanced"}),(0,r.jsx)(v.v.Item,{onClick:()=>(0,eP.kH)({modelId:e4.id}),children:"Migrate to Collection"})]})]})]})]})]}),(0,r.jsxs)(m.Z,{spacing:4,children:[(0,r.jsxs)(c.x,{size:"xs",color:"dimmed",children:["Updated: ",(0,n6.p6)(e4.updatedAt)]}),iq&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.i,{orientation:"vertical"}),(0,r.jsx)(ie.p,{href:"/tag/".concat(encodeURIComponent(iq.name.toLowerCase())),legacyBehavior:!0,passHref:!0,children:(0,r.jsx)(w.C,{component:"a",size:"sm",color:"blue",sx:{cursor:"pointer"},children:iq.name})})]}),iQ.length>0&&(0,r.jsx)(y.i,{orientation:"vertical"}),(0,r.jsx)(eA.F,{items:iQ,renderItem:e=>(0,r.jsx)(ie.p,{legacyBehavior:!0,href:"/tag/".concat(encodeURIComponent(e.name.toLowerCase())),passHref:!0,children:(0,r.jsx)(w.C,{component:"a",size:"sm",color:"gray",variant:"dark"===eH.colorScheme?"filled":void 0,sx:{cursor:"pointer"},children:e.name})})})]})]}),(e4.status===nf.GJ.Unpublished||iB)&&(0,r.jsx)(d.b,{color:"red",children:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,align:"flex-start",children:[(0,r.jsx)(b.k,{color:"red",children:(0,r.jsx)(Y.Z,{})}),(0,r.jsxs)(c.x,{size:"md",children:["This model has been ",iB?"deleted":"unpublished"," and is not visible to the community."]})]})}),e4.status===nf.GJ.UnpublishedViolation&&!(null===(em=e4.meta)||void 0===em?void 0:em.needsReview)&&(0,r.jsx)(d.b,{color:"red",children:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,align:"flex-start",children:[(0,r.jsx)(b.k,{color:"red",children:(0,r.jsx)(Y.Z,{})}),(0,r.jsxs)(c.x,{size:"sm",mt:-3,children:["This model has been unpublished due to a violation of our"," ",(0,r.jsx)(c.x,{component:"a",variant:"link",href:"/content/tos",target:"_blank",children:"guidelines"})," ","and is not visible to the community."," ",i1&&i2?i2:null," If you adjust your model to comply with our guidelines, you can request a review from one of our moderators."]})]})}),e4.status===nf.GJ.UnpublishedViolation&&(null===(ex=e4.meta)||void 0===ex?void 0:ex.needsReview)&&(0,r.jsx)(d.b,{color:"yellow",children:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,children:[(0,r.jsx)(b.k,{color:"yellow",children:(0,r.jsx)(Y.Z,{})}),(0,r.jsx)(c.x,{size:"md",children:"This model is currently being reviewed by our moderators. It will be visible to the community once it has been approved."})]})}),iO&&(0,r.jsx)(d.b,{color:"yellow",children:(0,r.jsxs)(m.Z,{spacing:"xs",noWrap:!0,align:"flex-start",children:[(0,r.jsx)(b.k,{color:"yellow",children:(0,r.jsx)(Y.Z,{})}),(0,r.jsxs)(c.x,{size:"md",children:["The images on this ",(0,iL.Yt)(e4.type).toLowerCase()," are inaccurate. Please submit reviews with images so that we can improve this page."]})]})}),(e4.mode===nf.Ce.TakenDown||e4.mode===nf.Ce.Archived)&&(0,r.jsx)(el.L,{color:"blue",icon:(0,r.jsx)(Y.Z,{}),size:"md",children:e4.mode===nf.Ce.Archived?"This model has been archived and is not available for download. You can still share your creations with the community.":"The visual assets associated with this model have been taken down. You can still download the resource, but you will not be able to share your creations."})]}),(0,r.jsxs)(m.Z,{spacing:4,noWrap:!0,children:[il?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eT.u,{label:"Add Version",children:(0,r.jsx)(ie.p,{href:"/models/".concat(e4.id,"/model-versions/create"),children:(0,r.jsx)(j.A,{variant:"light",color:"blue",children:(0,r.jsx)(q.Z,{size:14})})})}),iJ>1&&(0,r.jsx)(eT.u,{label:"Rearrange Versions",children:(0,r.jsx)(j.A,{onClick:e0,children:(0,r.jsx)(Q,{size:14})})})]}):null,(0,r.jsx)(nD,{versions:e4.modelVersions,selected:null==ic?void 0:ic.id,onVersionClick:e=>{e.id!==(null==ic?void 0:ic.id)&&iu(e)},onDeleteClick:e=>{(0,M._5)({title:"Delete Version",children:"Are you sure you want to delete this version? This action is destructive and cannot be reverted.",centered:!0,labels:{confirm:"Delete Version",cancel:"No, don't delete it"},confirmProps:{color:"red",loading:iS.isLoading},closeOnConfirm:!1,onConfirm:()=>iS.mutate({id:e})})},showExtraIcons:il||it,showToggleCoverage:e4.type===nf.BY.Checkpoint})]}),!!ic&&(0,r.jsx)(s1,{model:e4,version:ic,onFavoriteClick:iD,onBrowseClick:()=>{var e;null===(e=e2.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}})]}),iJ>1?(0,r.jsx)(nv,{modelId:e4.id,opened:e$,onClose:e0}):null]}),i0&&(il||e4.hasSuggestedResources)&&(0,r.jsx)(eS,{fromId:e4.id,type:"Suggested",versionId:null==ic?void 0:ic.id,label:(0,r.jsxs)(m.Z,{spacing:8,noWrap:!0,children:["Suggested Resources"," ",(0,r.jsx)(nr.O,{children:(0,r.jsx)(c.x,{size:"sm",weight:400,children:"These are resources suggested by the creator of this model. They may be related to this model or created by the same user."})})]}),ownerId:e4.user.id}),i0&&(e4.locked?(0,r.jsx)(I.X,{p:"lg",withBorder:!0,bg:"rgba(0, 0, 0, 0.1)",children:(0,r.jsx)(a.M,{children:(0,r.jsxs)(m.Z,{spacing:"xs",children:[(0,r.jsx)(b.k,{color:"gray",size:"xl",radius:"xl",children:(0,r.jsx)(ee.Z,{})}),(0,r.jsx)(c.x,{size:"lg",color:"dimmed",children:"Discussion is turned off for this model."})]})})}):(0,r.jsx)(u.W,{size:"xl",my:"xl",children:(0,r.jsxs)(h.K,{spacing:"md",children:[(0,r.jsx)(m.Z,{ref:e1,sx:{justifyContent:"space-between"},children:(0,r.jsxs)(m.Z,{spacing:"xs",children:[(0,r.jsx)(x.D,{order:2,children:"Discussion"}),iK?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(ij.b,{reason:"create-comment",children:(0,r.jsx)(k.z,{leftIcon:(0,r.jsx)($.Z,{size:16}),variant:"outline",onClick:()=>(0,eD.NI)({name:"commentEdit",state:{}}),size:"xs",children:"Add Comment"})})}):!i_&&iX&&(0,r.jsx)(na.Q,{message:"You must be a Civitai Member to join this discussion",children:(0,r.jsx)(k.z,{leftIcon:(0,r.jsx)(D.Z,{size:16}),variant:"outline",size:"xs",color:"green",children:"Early Access"})})]})}),(0,r.jsx)(nS.K,{modelId:e4.id})]})})),i0&&!e4.locked&&e4.mode!==nf.Ce.TakenDown&&(0,r.jsx)(z.x,{ref:e2,id:"gallery",mt:"md",children:(0,r.jsx)(nl,{model:e4,selectedVersionId:null==ic?void 0:ic.id,modelVersions:e4.modelVersions,showModerationOptions:il,showPOIWarning:e4.poi,generationOptions:{generationModelId:null==ic?void 0:ic.meta.picFinderModelId,includeEditingActions:il},canReview:!iY||(null==e_?void 0:e_.isMember)||(null==e_?void 0:e_.isModerator)})})]})]})}let ti=(0,C.k)(e=>({actions:{[si.D.smallerThan("sm")]:{width:"100%"}},titleWrapper:{gap:e.spacing.xs,[si.D.smallerThan("md")]:{gap:.4*e.spacing.xs}},title:{wordBreak:"break-word",[si.D.smallerThan("md")]:{fontSize:24,width:"100%",paddingBottom:0}},engagementBar:{[si.D.smallerThan("sm")]:{display:"none"}},mobileCarousel:{display:"none",[si.D.smallerThan("md")]:{display:"block"}},desktopCarousel:{display:"block",[si.D.smallerThan("md")]:{display:"none"}},modelBadgeText:{fontSize:e.fontSizes.md,[si.D.smallerThan("md")]:{fontSize:e.fontSizes.sm}},discussionActionButton:{[si.D.smallerThan("sm")]:{width:"100%"}},control:{svg:{width:24,height:24,[si.D.smallerThan("sm")]:{minWidth:16,minHeight:16}}},headerButton:{width:32,height:32,"> svg":{width:16,height:16},[si.D.largerThan("md")]:{width:44,height:44,"> svg":{width:20,height:20}}}}))},42284:function(e,i,n){"use strict";n.d(i,{OC:function(){return r},bj:function(){return l},zM:function(){return o}});var s=n(35818),t=n(99490);let o=e=>{let{versionId:i,type:n,meta:s,primary:o=!1}=e,{format:l,size:r,fp:a}=s||{},d=t.QS.stringify({type:o?null:n,format:o||"Training Data"===n?null:l,size:o?null:r,fp:o?null:a});return"/api/download/models/".concat(i).concat(d?"?"+d:"")};function l(e){let i=e._count.modelVersions>0,n=e.modelVersions.some(e=>e._count.files>0),s=e.modelVersions.some(e=>e._count.posts>0);return i?!i||n||s?i&&n&&!s?"/models/".concat(e.id,"/wizard?step=4"):"/models/".concat(e.id):"/models/".concat(e.id,"/wizard?step=3"):"/models/".concat(e.id,"/wizard?step=2")}function r(e){let i=e.trainingStatus;return e.model.status===s.GJ.Published?"/models/".concat(e.model.id,"/model-versions/").concat(e.id,"/wizard?step=1"):i&&i!==s.RE.Pending?"/models/".concat(e.model.id,"/wizard?step=1&modelVersionId=").concat(e.id):e.files.length?"/models/train?modelId=".concat(e.model.id,"&step=3"):"/models/train?modelId=".concat(e.model.id,"&step=2")}},39782:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","circle-minus","IconCircleMinus",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]])},33052:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","cloud-check","IconCloudCheck",[["path",{d:"M11 18.004h-4.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.388 0 2.585 .82 3.138 2.007",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]])},31065:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]])},9236:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","key","IconKey",[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]])},98883:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","message","IconMessage",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-2"}]])},41149:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","message-circle-off","IconMessageCircleOff",[["path",{d:"M8.595 4.577c3.223 -1.176 7.025 -.61 9.65 1.63c2.982 2.543 3.601 6.523 1.636 9.66m-1.908 2.109c-2.787 2.19 -6.89 2.666 -10.273 1.024l-4.7 1l1.3 -3.9c-2.229 -3.296 -1.494 -7.511 1.68 -10.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]])},49482:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747",key:"svg-0"}],["path",{d:"M20 4v5h-5",key:"svg-1"}]])},33596:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","share-3","IconShare3",[["path",{d:"M13 4v4c-6.575 1.028 -9.02 6.788 -10 12c-.037 .206 5.384 -5.962 10 -6v4l8 -7l-8 -7z",key:"svg-0"}]])},88382:function(e,i,n){"use strict";n.d(i,{Z:function(){return s}});var s=(0,n(21955).Z)("outline","user-plus","IconUserPlus",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]])}},function(e){e.O(0,[2761,6063,622,1770,1740,2888,9774,179],function(){return e(e.s=40424)}),_N_E=e.O()}]); +//# sourceMappingURL=[[...slug]]-ac96f6bd8bd17c2b.js.map \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[tagname]-497ae219ff70d7b2.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[tagname]-497ae219ff70d7b2.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..1208de2b6bf8520970c12dc827835fa3bf1ec586 --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/[tagname]-497ae219ff70d7b2.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1705,3117],{4586:function(e,n){"use strict";class t{constructor(){let e,n;this.set=void 0,this.get=void 0,this.get=t=>t===e?n:void 0,this.set=(t,i)=>{e=t,n=i}}}n.Z=t},77387:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tag/[tagname]",function(){return t(16822)}])},45380:function(e,n,t){"use strict";t.d(n,{m:function(){return u}});var i=t(85893),s=t(97564),r=t(54777),l=t(71232),a=t(9094),o=t(95117),c=t(88269),d=t(90101);function u(){let e=(0,d.T)();return(0,i.jsxs)(s.K,{mt:"xl",children:[(0,i.jsx)(r.i,{size:"sm",label:(0,i.jsxs)(l.Z,{spacing:4,children:[(0,i.jsx)(c.Z,{size:16,stroke:1.5}),"You are all caught up"]}),labelPosition:"center",labelProps:{size:"sm"}}),(0,i.jsx)(a.M,{children:(0,i.jsxs)(s.K,{spacing:0,align:"center",children:[(0,i.jsx)(o.x,{size:"sm",color:"dimmed",children:"Consider changing your period or filters to find more"}),(0,i.jsx)(o.x,{variant:"link",size:"sm",onClick:()=>{var n;null==e||null===(n=e.current)||void 0===n||n.scrollTo({top:0,behavior:"smooth"})},sx:{cursor:"pointer"},children:"Back to the top"})]})})]})}},55964:function(e,n,t){"use strict";t.d(n,{T:function(){return l}});var i=t(85893),s=t(67294),r=t(31483);function l(e){let{children:n,loadFn:t,loadCondition:l,loadTimeout:a=500,className:o,style:c,inViewOptions:d}=e,{ref:u,inView:h}=(0,r.Y)({rootMargin:"1200px 0px",...d}),[x,m]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{setTimeout(()=>{m(!0)},1500)},[]),(0,s.useEffect)(()=>{if(h&&l&&x&&f){let e=async()=>{await t(),setTimeout(()=>p(!0),a)};p(!1),e()}},[h,l,x,f]),(0,i.jsx)("div",{ref:u,className:o,style:c,children:n})}},28663:function(e,n,t){"use strict";t.d(n,{r:function(){return o}});var i=t(85893);t(67294);var s=t(26339),r=t(58434),l=t.n(r),a=t(90512);function o(e){let{children:n,...t}=e,r=(0,s.a)(),{columnWidth:o,columnGap:c,maxColumnCount:d,columnCount:u,combinedWidth:h}=r,x={...r};return(0,i.jsx)(s.g,{px:"md",...t,className:(0,a.Z)("@container",t.className),maxColumnCount:u,children:(0,i.jsx)("div",{style:{width:u>1&&h?h:void 0},className:l().queries,children:"function"==typeof n?n(x):n})})}},68714:function(e,n,t){"use strict";t.d(n,{e:function(){return b}});var i=t(85893),s=t(4586),r=t(50579),l=t(64761),a=t(67841),o=t(56817),c=t(67294),d=t(41746),u=t(40828),h=t(26339),x=t(95117),m=t(79543),f=t(87529),p=t(25675),g=t.n(p),j=t(28475),v=t(58192),y=t(58456),w=t(54671),_=t(87864);function b(e){let{data:n,render:t,itemId:s,empty:r=null,withAds:o}=e,p=(0,l.rZ)(),{columnCount:b,columnWidth:C,columnGap:T,rowGap:M,maxSingleColumnWidth:N}=(0,h.a)(),{classes:z}=k({columnWidth:C,columnGap:T,rowGap:M}),{adsEnabled:Z}=(0,u.R)(),S=(0,y.bT)(),E=Z&&(0,w.A_)(S)&&o,I=(0,d._0)(),A=(0,c.useMemo)(()=>I({data:n,columnCount:b,options:[{width:300,height:250,AdUnit:j.ij}]}),[b,n,E]);return A.length?(0,i.jsx)("div",{className:z.grid,style:{gridTemplateColumns:1===b?"minmax(".concat(C,"px, ").concat(N,"px)"):"repeat(".concat(b,", ").concat(C,"px)")},children:A.map((e,n)=>{var r;let l="data"===e.type?null!==(r=null==s?void 0:s(e.data))&&void 0!==r?r:n:"ad_".concat(n);return"data"===e.type?(0,i.jsx)(t,{index:n,data:e.data,width:C,height:C},l):(0,i.jsx)(_.F,{children:(0,i.jsxs)(v.I,{className:"mx-auto min-w-80 justify-between gap-2 border p-2 shadow",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)(g(),{src:"/images/logo_".concat(p.colorScheme,"_mode.png"),alt:"Civitai logo",height:30,width:142}),(0,i.jsx)(x.x,{children:"Become a Member to turn off ads today."}),(0,i.jsxs)(a.z,{component:m.p,href:"/pricing",compact:!0,color:"green",variant:"outline",className:"w-24",children:[(0,i.jsx)(x.x,{weight:500,children:"Do It"}),(0,i.jsx)(f.Z,{size:16})]})]}),(0,i.jsx)("div",{children:(0,i.jsx)(e.data.AdUnit,{})})]})},l)})}):(0,i.jsx)("div",{className:z.empty,children:r})}let k=(0,o.k)((e,n)=>{let{columnWidth:t,columnGap:i,rowGap:s}=n;return{empty:{height:t},grid:{display:"grid",columnGap:i,rowGap:s,justifyContent:"center"}}});(0,r.Z)([s.Z,{},WeakMap,s.Z,s.Z],(e,n,t,s)=>(0,i.jsx)(e,{index:n,data:t,width:s,height:s}))},26339:function(e,n,t){"use strict";t.d(n,{a:function(){return d},g:function(){return u}});var i=t(85893),s=t(64523),r=t(67294),l=t(72676),a=t(74865),o=t(85625);let c=(0,r.createContext)(null),d=()=>{let e=(0,r.useContext)(c);if(!e)throw Error("MasonryContext not in tree");return e};function u(e){let{children:n,columnWidth:t=320,maxColumnCount:d=7,gap:u=16,columnGap:h=u,rowGap:x=u,maxSingleColumnWidth:m=450,...f}=e,[p,g]=(0,r.useState)(0),j=(0,o.Di)(100),v=(0,a.y)(e=>{j(()=>g(e.contentRect.width))});(0,l.L)(()=>{let e=v.current;if(e){let n=getComputedStyle(e),t=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);g(e.clientWidth-t)}},[]);let[y,w]=(0,r.useMemo)(()=>{if(0===p)return[0,0];let e=Math.min(Math.floor((p+16)/(t+16)),d)||1,n=e*t+(e-1)*16;return[e,n]},[p,t,d]);return(0,i.jsx)(c.Provider,{value:{columnWidth:t,columnGap:h,rowGap:x,maxColumnCount:d,maxSingleColumnWidth:m,columnCount:y,combinedWidth:w},children:(0,i.jsx)(s.x,{ref:v,...f,children:n})})}},66929:function(e,n,t){"use strict";t.d(n,{E:function(){return b}});var i=t(85893),s=t(9094),r=t(20966),l=t(49737),a=t(71232),o=t(67841),c=t(39759),d=t(77446),u=t(79543),h=t(67294),x=t(58456),m=t(75085),f=t(96203),p=t(45380),g=t(55964),j=t(68714),v=t(67731),y=t(26491),w=t(17578),_=t(14619);function b(e){var n;let{filters:t={},showEof:b=!1,disableStoreFilters:k=!1,showAds:C,showEmptyCta:T}=e,M=(0,v._n)(),N=(0,w.xJ)(),z=null!==N&&t.username===N.username,Z=(0,_.HO)({...k?t:{...M,...t},pending:z}),[S,E]=(0,c.c)(Z,500),I=(0,x.bT)(),{models:A,isLoading:D,fetchNextPage:R,hasNextPage:L,isRefetching:P,isFetching:B}=(0,v.Rr)({...S,browsingLevel:I});return(0,h.useEffect)(()=>{(0,d.Z)(Z,S)&&E()},[S,Z]),(0,i.jsx)(f.I,{useModelVersionRedirect:(null!==(n=null==Z?void 0:Z.baseModels)&&void 0!==n?n:[]).length>0||!!(null==Z?void 0:Z.clubId),children:D?(0,i.jsx)(s.M,{p:"xl",children:(0,i.jsx)(r.a,{size:"xl"})}):A.length?(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(l.f,{visible:null!=P&&P,zIndex:9}),(0,i.jsx)(j.e,{data:A,render:m.L,itemId:e=>e.id,empty:(0,i.jsx)(y.d,{}),withAds:C}),L&&(0,i.jsx)(g.T,{loadFn:R,loadCondition:!B,style:{gridColumn:"1/-1"},children:(0,i.jsx)(s.M,{p:"xl",sx:{height:36},mt:"md",children:(0,i.jsx)(r.a,{})})}),!L&&b&&(0,i.jsx)(p.m,{})]}):(0,i.jsx)(y.d,{py:"lg",children:T&&(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(u.p,{href:"/models/create",children:(0,i.jsx)(o.z,{variant:"default",radius:"xl",children:"Upload a Model"})}),(0,i.jsx)(u.p,{href:"/models/train",children:(0,i.jsx)(o.z,{radius:"xl",children:"Train a LoRA"})})]})})})}},26491:function(e,n,t){"use strict";t.d(n,{d:function(){return o}});var i=t(85893),s=t(97564),r=t(5044),l=t(95117),a=t(41071);function o(e){let{message:n,iconSize:t=128,children:o,...c}=e;return(0,i.jsxs)(s.K,{...c,align:"center",children:[(0,i.jsx)(r.k,{size:t,radius:100,children:(0,i.jsx)(a.Z,{size:t/1.6})}),(0,i.jsx)(l.x,{size:32,align:"center",children:"No results found"}),(0,i.jsx)(l.x,{align:"center",children:null!=n?n:"Try adjusting your search or filters to find what you're looking for"}),o]})}},16822:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return _},default:function(){return b}});var i=t(85893),s=t(64523),r=t(9094),l=t(97564),a=t(19236),o=t(95117),c=t(71232),d=t(56817),u=t(43597),h=t(28663),x=t(26339),m=t(37398),f=t(73620),p=t(66929),g=t(67731),j=t(524),v=t(38498),y=t(81447),w=t(72456),_=!0;function b(e){var n;let{tagname:t}=e,{set:d,...y}=(0,g.Pb)(),{data:_=[]}=w.SX.tag.getTagWithModelCount.useQuery({name:t}),[b]=_,{classes:C}=k(),T=null!==(n=null==b?void 0:b.count)&&void 0!==n?n:0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.h,{title:"".concat(null==b?void 0:b.name," Stable Diffusion & Flux AI Models | Civitai"),description:"Browse ".concat(null==b?void 0:b.name," Stable Diffusion & Flux models, checkpoints, hypernetworks, textual inversions, embeddings, Aesthetic Gradients, and LORAs"),links:[{href:"".concat(j.O.NEXT_PUBLIC_BASE_URL,"/tag/").concat(t),rel:"canonical"}]}),b&&(0,i.jsx)(s.x,{className:C.banner,mb:"md",children:(0,i.jsx)(r.M,{children:(0,i.jsxs)(l.K,{spacing:"xs",children:[(0,i.jsx)(a.D,{order:1,align:"center",children:b.name}),(0,i.jsxs)(o.x,{transform:"uppercase",align:"center",children:[T," ",1===T?"model":"models"]})]})})}),(0,i.jsx)(x.g,{columnWidth:v._G.cardSizes.model,maxColumnCount:7,maxSingleColumnWidth:450,children:(0,i.jsx)(h.r,{children:(0,i.jsxs)(l.K,{spacing:"xs",children:[(0,i.jsxs)(c.Z,{position:"right",children:[(0,i.jsx)(u.z,{type:"models",variant:"button"}),(0,i.jsx)(f.L,{size:"sm",compact:!0})]}),(0,i.jsx)(p.E,{filters:{...y,followed:!1,hidden:!1},showEof:!0,showAds:!0})]})})})]})}let k=(0,d.k)(e=>({banner:{marginTop:"-".concat(e.spacing.md,"px"),paddingTop:2*e.spacing.xl,paddingBottom:2*e.spacing.xl,backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[1],[y.D.smallerThan("xs")]:{paddingTop:e.spacing.md,paddingBottom:e.spacing.md}},image:{width:"128px",borderRadius:e.radius.sm,overflow:"hidden"},wrapper:{alignItems:"flex-start",[y.D.smallerThan("xs")]:{alignItems:"center"}},outsideImage:{display:"none",[y.D.smallerThan("xs")]:{display:"block"}},insideImage:{[y.D.smallerThan("xs")]:{display:"none"}},card:{[y.D.smallerThan("xs")]:{width:"100%"}}}))},58434:function(e){e.exports={queries:"MasonryContainer_queries__bS_ak"}},88269:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var i=(0,t(21955).Z)("outline","clock","IconClock",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]])}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=77387)}),_N_E=e.O()}]); +//# sourceMappingURL=[tagname]-497ae219ff70d7b2.js.map \ No newline at end of file diff --git "a/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/_app-ceb8cadd9251b35f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/_app-ceb8cadd9251b35f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" new file mode 100644 index 0000000000000000000000000000000000000000..8ca7442b231cc0e83394af4c56f8a5714835dafc --- /dev/null +++ "b/Lora/Age Of Chimeras [ PONY _ NOOB _ ANIMAGINE _ WAI ] - v2.0 _ Illustrious Checkpoint _ Civitai_files/_app-ceb8cadd9251b35f.js.\320\221\320\265\320\267 \320\275\320\260\320\267\320\262\320\260\320\275\320\270\321\217" @@ -0,0 +1,38 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888,7716,524],{17331:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,i,o,a,s,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(void 0===(i=this._events[e]))return!1;if(r(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),i.apply(this,a)}else if(n(i))for(s=0,a=Array.prototype.slice.call(arguments,1),o=(l=i.slice()).length;s0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,o,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,o=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0==arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0==arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},60887:function(e,t,r){"use strict";let n;r.d(t,{LB:function(){return eq},y9:function(){return e7},g4:function(){return g},we:function(){return ey},pE:function(){return U},VK:function(){return $},Xo:function(){return B},Cj:function(){return eJ},O1:function(){return eX},Zj:function(){return eQ},VT:function(){return R},Dy:function(){return _}});var i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,x,w,S,k=r(67294),j=r(73935),E=r(24285);let O={display:"none"};function C(e){let{id:t,value:r}=e;return k.createElement("div",{id:t,style:O},r)}function I(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;return k.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":n,"aria-atomic":!0},r)}let P=(0,k.createContext)(null),A={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},T={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function z(e){let{announcements:t=T,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=A}=e,{announce:o,announcement:a}=function(){let[e,t]=(0,k.useState)("");return{announce:(0,k.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=(0,E.Ld)("DndLiveRegion"),[l,c]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{c(!0)},[]),!function(e){let t=(0,k.useContext)(P);(0,k.useEffect)(()=>{if(!t)throw Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}((0,k.useMemo)(()=>({onDragStart(e){let{active:r}=e;o(t.onDragStart({active:r}))},onDragMove(e){let{active:r,over:n}=e;t.onDragMove&&o(t.onDragMove({active:r,over:n}))},onDragOver(e){let{active:r,over:n}=e;o(t.onDragOver({active:r,over:n}))},onDragEnd(e){let{active:r,over:n}=e;o(t.onDragEnd({active:r,over:n}))},onDragCancel(e){let{active:r,over:n}=e;o(t.onDragCancel({active:r,over:n}))}}),[o,t])),!l)return null;let u=k.createElement(k.Fragment,null,k.createElement(C,{id:n,value:i.draggable}),k.createElement(I,{id:s,announcement:a}));return r?(0,j.createPortal)(u,r):u}function N(){}function R(e,t){return(0,k.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function _(){for(var e=arguments.length,t=Array(e),r=0;r[...t].filter(e=>null!=e),[...t])}(i=p||(p={})).DragStart="dragStart",i.DragMove="dragMove",i.DragEnd="dragEnd",i.DragCancel="dragCancel",i.DragOver="dragOver",i.RegisterDroppable="registerDroppable",i.SetDroppableDisabled="setDroppableDisabled",i.UnregisterDroppable="unregisterDroppable";let M=Object.freeze({x:0,y:0});function D(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function L(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function F(e,t,r){return void 0===t&&(t=e.left),void 0===r&&(r=e.top),{x:t+.5*e.width,y:r+.5*e.height}}let U=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=F(t,t.left,t.top),o=[];for(let e of n){let{id:t}=e,n=r.get(t);if(n){var a;let r=Math.sqrt(Math.pow((a=F(n)).x-i.x,2)+Math.pow(a.y-i.y,2));o.push({id:t,data:{droppableContainer:e,value:r}})}}return o.sort(D)},B=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=[];for(let e of n){let{id:n}=e,o=r.get(n);if(o){let r=function(e,t){let r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height);if(n0&&i.push({id:n,data:{droppableContainer:e,value:r}})}}return i.sort(L)};function H(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:M}let Z=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n({...e,top:e.top+1*t.y,bottom:e.bottom+1*t.y,left:e.left+1*t.x,right:e.right+1*t.x}),{...e})};function W(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}let V={ignoreTransform:!1};function $(e,t){void 0===t&&(t=V);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:n}=(0,E.Jj)(e).getComputedStyle(e);t&&(r=function(e,t,r){let n=W(t);if(!n)return e;let{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(r,t,n))}let{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function q(e){return $(e,{ignoreTransform:!0})}function G(e,t){let r=[];return e?function n(i){var o;if(null!=t&&r.length>=t||!i)return r;if((0,E.qk)(i)&&null!=i.scrollingElement&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!(0,E.Re)(i)||(0,E.vZ)(i)||r.includes(i))return r;let a=(0,E.Jj)(e).getComputedStyle(i);return(i!==e&&function(e,t){void 0===t&&(t=(0,E.Jj)(e).getComputedStyle(e));let r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{let n=t[e];return"string"==typeof n&&r.test(n)})}(i,a)&&r.push(i),void 0===(o=a)&&(o=(0,E.Jj)(i).getComputedStyle(i)),"fixed"===o.position)?r:n(i.parentNode)}(e):r}function K(e){let[t]=G(e,1);return null!=t?t:null}function X(e){return E.Nq&&e?(0,E.FJ)(e)?e:(0,E.UG)(e)?(0,E.qk)(e)||e===(0,E.r3)(e).scrollingElement?window:(0,E.Re)(e)?e:null:null:null}function J(e){return(0,E.FJ)(e)?e.scrollX:e.scrollLeft}function Y(e){return(0,E.FJ)(e)?e.scrollY:e.scrollTop}function Q(e){return{x:J(e),y:Y(e)}}function ee(e){return!!E.Nq&&!!e&&e===document.scrollingElement}function et(e){let t={x:0,y:0},r=ee(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y;return{isTop:i,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}(o=h||(h={}))[o.Forward=1]="Forward",o[o.Backward=-1]="Backward";let er={x:.2,y:.2};function en(e){return e.reduce((e,t)=>(0,E.IH)(e,Q(t)),M)}function ei(e,t){if(void 0===t&&(t=$),!e)return;let{top:r,left:n,bottom:i,right:o}=t(e);K(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}let eo=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+J(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Y(t),0)}]];class ea{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let r=G(t),n=en(r);for(let[t,i,o]of(this.rect={...e},this.width=e.width,this.height=e.height,eo))for(let e of i)Object.defineProperty(this,e,{get:()=>{let i=o(r),a=n[t]-i;return this.rect[e]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class es{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,r){var n;null==(n=this.target)||n.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function el(e,t){let r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}function ec(e){e.preventDefault()}function eu(e){e.stopPropagation()}(a=m||(m={})).Click="click",a.DragStart="dragstart",a.Keydown="keydown",a.ContextMenu="contextmenu",a.Resize="resize",a.SelectionChange="selectionchange",a.VisibilityChange="visibilitychange",(s=g||(g={})).Space="Space",s.Down="ArrowDown",s.Right="ArrowRight",s.Left="ArrowLeft",s.Up="ArrowUp",s.Esc="Escape",s.Enter="Enter";let ed={start:[g.Space,g.Enter],cancel:[g.Esc],end:[g.Space,g.Enter]},ef=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case g.Right:return{...r,x:r.x+25};case g.Left:return{...r,x:r.x-25};case g.Down:return{...r,y:r.y+25};case g.Up:return{...r,y:r.y-25}}};class ep{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new es((0,E.r3)(t)),this.windowListeners=new es((0,E.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(m.Resize,this.handleCancel),this.windowListeners.add(m.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(m.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&ei(r),t(M)}handleKeyDown(e){if((0,E.vd)(e)){let{active:t,context:r,options:n}=this.props,{keyboardCodes:i=ed,coordinateGetter:o=ef,scrollBehavior:a="smooth"}=n,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:l}=r.current,c=l?{x:l.left,y:l.top}:M;this.referenceCoordinates||(this.referenceCoordinates=c);let u=o(e,{active:t,context:r.current,currentCoordinates:c});if(u){let t=(0,E.$X)(u,c),n={x:0,y:0},{scrollableAncestors:i}=r.current;for(let r of i){let i=e.code,{isTop:o,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=et(r),p=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}(r),h={x:Math.min(i===g.Right?p.right-p.width/2:p.right,Math.max(i===g.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===g.Down?p.bottom-p.height/2:p.bottom,Math.max(i===g.Down?p.top:p.top+p.height/2,u.y))},m=i===g.Right&&!s||i===g.Left&&!l,v=i===g.Down&&!c||i===g.Up&&!o;if(m&&h.x!==u.x){let e=r.scrollLeft+t.x,o=i===g.Right&&e<=d.x||i===g.Left&&e>=f.x;if(o&&!t.y){r.scrollTo({left:e,behavior:a});return}o?n.x=r.scrollLeft-e:n.x=i===g.Right?r.scrollLeft-d.x:r.scrollLeft-f.x,n.x&&r.scrollBy({left:-n.x,behavior:a});break}if(v&&h.y!==u.y){let e=r.scrollTop+t.y,o=i===g.Down&&e<=d.y||i===g.Up&&e>=f.y;if(o&&!t.x){r.scrollTo({top:e,behavior:a});return}o?n.y=r.scrollTop-e:n.y=i===g.Down?r.scrollTop-d.y:r.scrollTop-f.y,n.y&&r.scrollBy({top:-n.y,behavior:a});break}}this.handleMove(e,(0,E.IH)((0,E.$X)(u,this.referenceCoordinates),n))}}}handleMove(e,t){let{onMove:r}=this.props;e.preventDefault(),r(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function eh(e){return!!(e&&"distance"in e)}function em(e){return!!(e&&"delay"in e)}ep.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=ed,onActivation:i}=t,{active:o}=r,{code:a}=e.nativeEvent;if(n.start.includes(a)){let t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class eg{constructor(e,t,r){var n;void 0===r&&(r=function(e){let{EventTarget:t}=(0,E.Jj)(e);return e instanceof t?e:(0,E.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=(0,E.r3)(o),this.documentListeners=new es(this.document),this.listeners=new es(r),this.windowListeners=new es((0,E.Jj)(o)),this.initialCoordinates=null!=(n=(0,E.DC)(i))?n:M,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(m.Resize,this.handleCancel),this.windowListeners.add(m.DragStart,ec),this.windowListeners.add(m.VisibilityChange,this.handleCancel),this.windowListeners.add(m.ContextMenu,ec),this.documentListeners.add(m.Keydown,this.handleKeydown),t){if(null!=r&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(em(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);return}if(eh(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(m.Click,eu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(m.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:r,initialCoordinates:n,props:i}=this,{onMove:o,options:{activationConstraint:a}}=i;if(!n)return;let s=null!=(t=(0,E.DC)(e))?t:M,l=(0,E.$X)(n,s);if(!r&&a){if(eh(a)){if(null!=a.tolerance&&el(l,a.tolerance))return this.handleCancel();if(el(l,a.distance))return this.handleStart()}return em(a)&&el(l,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){let{onEnd:e}=this.props;this.detach(),e()}handleCancel(){let{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===g.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let ev={move:{name:"pointermove"},end:{name:"pointerup"}};class ey extends eg{constructor(e){let{event:t}=e;super(e,ev,(0,E.r3)(t.target))}}ey.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!!r.isPrimary&&0===r.button&&(null==n||n({event:r}),!0)}}];let eb={move:{name:"mousemove"},end:{name:"mouseup"}};(l=v||(v={}))[l.RightClick=2]="RightClick";class ex extends eg{constructor(e){super(e,eb,(0,E.r3)(e.event.target))}}ex.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button!==v.RightClick&&(null==n||n({event:r}),!0)}}];let ew={move:{name:"touchmove"},end:{name:"touchend"}};class eS extends eg{constructor(e){super(e,ew)}static setup(){return window.addEventListener(ew.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ew.move.name,e)};function e(){}}}eS.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t,{touches:i}=r;return!(i.length>1)&&(null==n||n({event:r}),!0)}}],(c=y||(y={}))[c.Pointer=0]="Pointer",c[c.DraggableRect=1]="DraggableRect",(u=b||(b={}))[u.TreeOrder=0]="TreeOrder",u[u.ReversedTreeOrder=1]="ReversedTreeOrder";let ek={x:{[h.Backward]:!1,[h.Forward]:!1},y:{[h.Backward]:!1,[h.Forward]:!1}};(d=x||(x={}))[d.Always=0]="Always",d[d.BeforeDragging=1]="BeforeDragging",d[d.WhileDragging=2]="WhileDragging",(w||(w={})).Optimized="optimized";let ej=new Map;function eE(e,t){return(0,E.Gj)(r=>e?r||("function"==typeof t?t(e):e):null,[t,e])}function eO(e){let{callback:t,disabled:r}=e,n=(0,E.zX)(t),i=(0,k.useMemo)(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(n)},[r]);return(0,k.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function eC(e){return new ea($(e),e)}function eI(e,t,r){void 0===t&&(t=eC);let[n,i]=(0,k.useReducer)(function(n){if(!e)return null;if(!1===e.isConnected){var i;return null!=(i=null!=n?n:r)?i:null}let o=t(e);return JSON.stringify(n)===JSON.stringify(o)?n:o},null),o=function(e){let{callback:t,disabled:r}=e,n=(0,E.zX)(t),i=(0,k.useMemo)(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(n)},[n,r]);return(0,k.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(let r of t){let{type:t,target:n}=r;if("childList"===t&&n instanceof HTMLElement&&n.contains(e)){i();break}}}}),a=eO({callback:i});return(0,E.LI)(()=>{i(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),n}let eP=[];function eA(e,t){void 0===t&&(t=[]);let r=(0,k.useRef)(null);return(0,k.useEffect)(()=>{r.current=null},t),(0,k.useEffect)(()=>{let t=e!==M;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?(0,E.$X)(e,r.current):M}function eT(e){return(0,k.useMemo)(()=>e?function(e){let t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}(e):null,[e])}let ez=[];function eN(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return(0,E.Re)(t)?t:e}let eR=[{sensor:ey,options:{}},{sensor:ep,options:{}}],e_={current:{}},eM={draggable:{measure:q},droppable:{measure:q,strategy:x.WhileDragging,frequency:w.Optimized},dragOverlay:{measure:$}};class eD extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}let eL={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new eD,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:N},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eM,measureDroppableContainers:N,windowRect:null,measuringScheduled:!1},eF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:N,draggableNodes:new Map,over:null,measureDroppableContainers:N},eU=(0,k.createContext)(eF),eB=(0,k.createContext)(eL);function eH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new eD}}}function eZ(e,t){switch(t.type){case p.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case p.DragMove:if(!e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case p.DragEnd:case p.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case p.RegisterDroppable:{let{element:r}=t,{id:n}=r,i=new eD(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case p.SetDroppableDisabled:{let{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;let a=new eD(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case p.UnregisterDroppable:{let{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;let o=new eD(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function eW(e){let{disabled:t}=e,{active:r,activatorEvent:n,draggableNodes:i}=(0,k.useContext)(eU),o=(0,E.D9)(n),a=(0,E.D9)(null==r?void 0:r.id);return(0,k.useEffect)(()=>{if(!t&&!n&&o&&null!=a){if(!(0,E.vd)(o)||document.activeElement===o.target)return;let e=i.get(a);if(!e)return;let{activatorNode:t,node:r}=e;(t.current||r.current)&&requestAnimationFrame(()=>{for(let e of[t.current,r.current]){if(!e)continue;let t=(0,E.so)(e);if(t){t.focus();break}}})}},[n,t,i,a,o]),null}function eV(e,t){let{transform:r,...n}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...n}),r):r}let e$=(0,k.createContext)({...M,scaleX:1,scaleY:1});(f=S||(S={}))[f.Uninitialized=0]="Uninitialized",f[f.Initializing=1]="Initializing",f[f.Initialized=2]="Initialized";let eq=(0,k.memo)(function(e){var t,r,n,i,o,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:d=eR,collisionDetection:f=B,measuring:m,modifiers:g,...v}=e,[w,O]=(0,k.useReducer)(eZ,void 0,eH),[C,I]=function(){let[e]=(0,k.useState)(()=>new Set),t=(0,k.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,k.useCallback)(t=>{let{type:r,event:n}=t;e.forEach(e=>{var t;return null==(t=e[r])?void 0:t.call(e,n)})},[e]),t]}(),[A,T]=(0,k.useState)(S.Uninitialized),N=A===S.Initialized,{draggable:{active:R,nodes:_,translate:D},droppable:{containers:L}}=w,F=R?_.get(R):null,U=(0,k.useRef)({initial:null,translated:null}),W=(0,k.useMemo)(()=>{var e;return null!=R?{id:R,data:null!=(e=null==F?void 0:F.data)?e:e_,rect:U}:null},[R,F]),V=(0,k.useRef)(null),[q,J]=(0,k.useState)(null),[Y,ei]=(0,k.useState)(null),eo=(0,E.Ey)(v,Object.values(v)),es=(0,E.Ld)("DndDescribedBy",s),el=(0,k.useMemo)(()=>L.getEnabled(),[L]),ec=(0,k.useMemo)(()=>({draggable:{...eM.draggable,...null==m?void 0:m.draggable},droppable:{...eM.droppable,...null==m?void 0:m.droppable},dragOverlay:{...eM.dragOverlay,...null==m?void 0:m.dragOverlay}}),[null==m?void 0:m.draggable,null==m?void 0:m.droppable,null==m?void 0:m.dragOverlay]),{droppableRects:eu,measureDroppableContainers:ed,measuringScheduled:ef}=function(e,t){let{dragging:r,dependencies:n,config:i}=t,[o,a]=(0,k.useState)(null),{frequency:s,measure:l,strategy:c}=i,u=(0,k.useRef)(e),d=function(){switch(c){case x.Always:return!1;case x.BeforeDragging:return r;default:return!r}}(),f=(0,E.Ey)(d),p=(0,k.useCallback)(function(e){void 0===e&&(e=[]),f.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),h=(0,k.useRef)(null),m=(0,E.Gj)(t=>{if(d&&!r)return ej;if(!t||t===ej||u.current!==e||null!=o){let t=new Map;for(let r of e){if(!r)continue;if(o&&o.length>0&&!o.includes(r.id)&&r.rect.current){t.set(r.id,r.rect.current);continue}let e=r.node.current,n=e?new ea(l(e),e):null;r.rect.current=n,n&&t.set(r.id,n)}return t}return t},[e,o,r,d,l]);return(0,k.useEffect)(()=>{u.current=e},[e]),(0,k.useEffect)(()=>{d||p()},[r,d]),(0,k.useEffect)(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),(0,k.useEffect)(()=>{d||"number"!=typeof s||null!==h.current||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:null!=o}}(el,{dragging:N,dependencies:[D.x,D.y],config:ec.droppable}),ep=function(e,t){let r=null!==t?e.get(t):void 0,n=r?r.node.current:null;return(0,E.Gj)(e=>{var r;return null===t?null:null!=(r=null!=n?n:e)?r:null},[n,t])}(_,R),eh=(0,k.useMemo)(()=>Y?(0,E.DC)(Y):null,[Y]),em=function(){let e=(null==q?void 0:q.autoScrollEnabled)===!1,t="object"==typeof c?!1===c.enabled:!1===c,r=N&&!e&&!t;return"object"==typeof c?{...c,enabled:r}:{enabled:r}}(),eg=eE(ep,ec.draggable.measure);!function(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e,o=(0,k.useRef)(!1),{x:a,y:s}="boolean"==typeof i?{x:i,y:i}:i;(0,E.LI)(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let i=H(r(e),n);if(a||(i.x=0),s||(i.y=0),o.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=K(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,s,n,r])}({activeNode:R?_.get(R):null,config:em.layoutShiftCompensation,initialRect:eg,measure:ec.draggable.measure});let ev=eI(ep,ec.draggable.measure,eg),ey=eI(ep?ep.parentElement:null),eb=(0,k.useRef)({activatorEvent:null,active:null,activeNode:ep,collisionRect:null,collisions:null,droppableRects:eu,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ex=L.getNodeFor(null==(t=eb.current.over)?void 0:t.id),ew=function(e){let{measure:t}=e,[r,n]=(0,k.useState)(null),i=eO({callback:(0,k.useCallback)(e=>{for(let{target:r}of e)if((0,E.Re)(r)){n(e=>{let n=t(r);return e?{...e,width:n.width,height:n.height}:n});break}},[t])}),o=(0,k.useCallback)(e=>{let r=eN(e);null==i||i.disconnect(),r&&(null==i||i.observe(r)),n(r?t(r):null)},[t,i]),[a,s]=(0,E.wm)(o);return(0,k.useMemo)(()=>({nodeRef:a,rect:r,setRef:s}),[r,a,s])}({measure:ec.dragOverlay.measure}),eS=null!=(r=ew.nodeRef.current)?r:ep,eC=N?null!=(n=ew.rect)?n:ev:null,eD=!!(ew.nodeRef.current&&ew.rect),eL=function(e){let t=eE(e);return H(e,t)}(eD?null:ev),eF=eT(eS?(0,E.Jj)(eS):null),eq=function(e){let t=(0,k.useRef)(e),r=(0,E.Gj)(r=>e?r&&r!==eP&&e&&t.current&&e.parentNode===t.current.parentNode?r:G(e):eP,[e]);return(0,k.useEffect)(()=>{t.current=e},[e]),r}(N?null!=ex?ex:ep:null),eG=function(e,t){void 0===t&&(t=$);let[r]=e,n=eT(r?(0,E.Jj)(r):null),[i,o]=(0,k.useReducer)(function(){return e.length?e.map(e=>ee(e)?n:new ea(t(e),e)):ez},ez),a=eO({callback:o});return e.length>0&&i===ez&&o(),(0,E.LI)(()=>{e.length?e.forEach(e=>null==a?void 0:a.observe(e)):(null==a||a.disconnect(),o())},[e]),i}(eq),eK=eV(g,{transform:{x:D.x-eL.x,y:D.y-eL.y,scaleX:1,scaleY:1},activatorEvent:Y,active:W,activeNodeRect:ev,containerNodeRect:ey,draggingNodeRect:eC,over:eb.current.over,overlayNodeRect:ew.rect,scrollableAncestors:eq,scrollableAncestorRects:eG,windowRect:eF}),eX=eh?(0,E.IH)(eh,D):null,eJ=function(e){let[t,r]=(0,k.useState)(null),n=(0,k.useRef)(e),i=(0,k.useCallback)(e=>{let t=X(e.target);t&&r(e=>e?(e.set(t,Q(t)),new Map(e)):null)},[]);return(0,k.useEffect)(()=>{let t=n.current;if(e!==t){o(t);let a=e.map(e=>{let t=X(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,Q(t)]):null}).filter(e=>null!=e);r(a.length?new Map(a):null),n.current=e}return()=>{o(e),o(t)};function o(e){e.forEach(e=>{let t=X(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,k.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,E.IH)(e,t),M):en(e):M,[e,t])}(eq),eY=eA(eJ),eQ=eA(eJ,[ev]),e0=(0,E.IH)(eK,eY),e1=eC?Z(eC,eK):null,e2=W&&e1?f({active:W,collisionRect:e1,droppableRects:eu,droppableContainers:el,pointerCoordinates:eX}):null,e5=function(e,t){if(!e||0===e.length)return null;let[r]=e;return r.id}(e2,0),[e4,e3]=(0,k.useState)(null),e6=(o=eD?eK:(0,E.IH)(eK,eQ),a=null!=(i=null==e4?void 0:e4.rect)?i:null,{...o,scaleX:a&&ev?a.width/ev.width:1,scaleY:a&&ev?a.height/ev.height:1}),e8=(0,k.useCallback)((e,t)=>{let{sensor:r,options:n}=t;if(null==V.current)return;let i=_.get(V.current);if(!i)return;let o=e.nativeEvent,a=new r({active:V.current,activeNode:i,event:o,options:n,context:eb,onStart(e){let t=V.current;if(null==t)return;let r=_.get(t);if(!r)return;let{onDragStart:n}=eo.current,i={active:{id:t,data:r.data,rect:U}};(0,j.unstable_batchedUpdates)(()=>{null==n||n(i),T(S.Initializing),O({type:p.DragStart,initialCoordinates:e,active:t}),C({type:"onDragStart",event:i})})},onMove(e){O({type:p.DragMove,coordinates:e})},onEnd:s(p.DragEnd),onCancel:s(p.DragCancel)});function s(e){return async function(){let{active:t,collisions:r,over:n,scrollAdjustedTranslate:i}=eb.current,a=null;if(t&&i){let{cancelDrop:s}=eo.current;a={activatorEvent:o,active:t,collisions:r,delta:i,over:n},e===p.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=p.DragCancel)}V.current=null,(0,j.unstable_batchedUpdates)(()=>{O({type:e}),T(S.Uninitialized),e3(null),J(null),ei(null);let t=e===p.DragEnd?"onDragEnd":"onDragCancel";if(a){let e=eo.current[t];null==e||e(a),C({type:t,event:a})}})}}(0,j.unstable_batchedUpdates)(()=>{J(a),ei(e.nativeEvent)})},[_]),e7=(0,k.useCallback)((e,t)=>(r,n)=>{let i=r.nativeEvent,o=_.get(n);null!==V.current||!o||i.dndKit||i.defaultPrevented||!0!==e(r,t.options,{active:o})||(i.dndKit={capturedBy:t.sensor},V.current=n,e8(r,t))},[_,e8]),e9=(0,k.useMemo)(()=>d.reduce((e,t)=>{let{sensor:r}=t;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:e7(e.handler,t)}))]},[]),[d,e7]);(0,k.useEffect)(()=>{if(!E.Nq)return;let e=d.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},d.map(e=>{let{sensor:t}=e;return t})),(0,E.LI)(()=>{ev&&A===S.Initializing&&T(S.Initialized)},[ev,A]),(0,k.useEffect)(()=>{let{onDragMove:e}=eo.current,{active:t,activatorEvent:r,collisions:n,over:i}=eb.current;if(!t||!r)return;let o={active:t,activatorEvent:r,collisions:n,delta:{x:e0.x,y:e0.y},over:i};(0,j.unstable_batchedUpdates)(()=>{null==e||e(o),C({type:"onDragMove",event:o})})},[e0.x,e0.y]),(0,k.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:r,droppableContainers:n,scrollAdjustedTranslate:i}=eb.current;if(!e||null==V.current||!t||!i)return;let{onDragOver:o}=eo.current,a=n.get(e5),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:r,delta:{x:i.x,y:i.y},over:s};(0,j.unstable_batchedUpdates)(()=>{e3(s),null==o||o(l),C({type:"onDragOver",event:l})})},[e5]),(0,E.LI)(()=>{eb.current={activatorEvent:Y,active:W,activeNode:ep,collisionRect:e1,collisions:e2,droppableRects:eu,draggableNodes:_,draggingNode:eS,draggingNodeRect:eC,droppableContainers:L,over:e4,scrollableAncestors:eq,scrollAdjustedTranslate:e0},U.current={initial:eC,translated:e1}},[W,ep,e2,e1,_,eS,eC,eu,L,e4,eq,e0]),function(e){let{acceleration:t,activator:r=y.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=b.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=function(e){let{delta:t,disabled:r}=e,n=(0,E.D9)(t);return(0,E.Gj)(e=>{if(r||!n||!e)return ek;let i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[h.Backward]:e.x[h.Backward]||-1===i.x,[h.Forward]:e.x[h.Forward]||1===i.x},y:{[h.Backward]:e.y[h.Backward]||-1===i.y,[h.Forward]:e.y[h.Forward]||1===i.y}}},[r,t,n])}({delta:d,disabled:!o}),[m,g]=(0,E.Yz)(),v=(0,k.useRef)({x:0,y:0}),x=(0,k.useRef)({x:0,y:0}),w=(0,k.useMemo)(()=>{switch(r){case y.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case y.DraggableRect:return i}},[r,i,l]),S=(0,k.useRef)(null),j=(0,k.useCallback)(()=>{let e=S.current;if(!e)return;let t=v.current.x*x.current.x,r=v.current.y*x.current.y;e.scrollBy(t,r)},[]),O=(0,k.useMemo)(()=>s===b.TreeOrder?[...c].reverse():c,[s,c]);(0,k.useEffect)(()=>{if(!o||!c.length||!w){g();return}for(let e of O){if((null==n?void 0:n(e))===!1)continue;let r=u[c.indexOf(e)];if(!r)continue;let{direction:i,speed:o}=function(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;void 0===n&&(n=10),void 0===i&&(i=er);let{isTop:c,isBottom:u,isLeft:d,isRight:f}=et(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=h.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!u&&l>=t.bottom-g.height&&(p.y=h.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!f&&s>=t.right-g.width?(p.x=h.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!d&&a<=t.left+g.width&&(p.x=h.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}(e,r,w,t,f);for(let e of["x","y"])p[e][i[e]]||(o[e]=0,i[e]=0);if(o.x>0||o.y>0){g(),S.current=e,m(j,a),v.current=o,x.current=i;return}}v.current={x:0,y:0},x.current={x:0,y:0},g()},[t,j,n,g,o,a,JSON.stringify(w),JSON.stringify(p),m,c,O,u,JSON.stringify(f)])}({...em,delta:D,draggingRect:e1,pointerCoordinates:eX,scrollableAncestors:eq,scrollableAncestorRects:eG});let te=(0,k.useMemo)(()=>({active:W,activeNode:ep,activeNodeRect:ev,activatorEvent:Y,collisions:e2,containerNodeRect:ey,dragOverlay:ew,draggableNodes:_,droppableContainers:L,droppableRects:eu,over:e4,measureDroppableContainers:ed,scrollableAncestors:eq,scrollableAncestorRects:eG,measuringConfiguration:ec,measuringScheduled:ef,windowRect:eF}),[W,ep,ev,Y,e2,ey,ew,_,L,eu,e4,ed,eq,eG,ec,ef,eF]),tt=(0,k.useMemo)(()=>({activatorEvent:Y,activators:e9,active:W,activeNodeRect:ev,ariaDescribedById:{draggable:es},dispatch:O,draggableNodes:_,over:e4,measureDroppableContainers:ed}),[Y,e9,W,ev,O,es,_,e4,ed]);return k.createElement(P.Provider,{value:I},k.createElement(eU.Provider,{value:tt},k.createElement(eB.Provider,{value:te},k.createElement(e$.Provider,{value:e6},u)),k.createElement(eW,{disabled:(null==l?void 0:l.restoreFocus)===!1})),k.createElement(z,{...l,hiddenTextDescribedById:es}))}),eG=(0,k.createContext)(null),eK="button";function eX(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e,o=(0,E.Ld)("Droppable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,k.useContext)(eU),{role:p=eK,roleDescription:h="draggable",tabIndex:m=0}=null!=i?i:{},g=(null==l?void 0:l.id)===t,v=(0,k.useContext)(g?e$:eG),[y,b]=(0,E.wm)(),[x,w]=(0,E.wm)(),S=(0,k.useMemo)(()=>a.reduce((e,r)=>{let{eventName:n,handler:i}=r;return e[n]=e=>{i(e,t)},e},{}),[a,t]),j=(0,E.Ey)(r);return(0,E.LI)(()=>(d.set(t,{id:t,key:o,node:y,activatorNode:x,data:j}),()=>{let e=d.get(t);e&&e.key===o&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,k.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":!!g&&p===eK||void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[n,p,m,g,h,u.draggable]),isDragging:g,listeners:n?void 0:S,node:y,over:f,setNodeRef:b,setActivatorNodeRef:w,transform:v}}function eJ(){return(0,k.useContext)(eB)}let eY={timeout:25};function eQ(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e,o=(0,E.Ld)("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=(0,k.useContext)(eU),u=(0,k.useRef)({disabled:r}),d=(0,k.useRef)(!1),f=(0,k.useRef)(null),h=(0,k.useRef)(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={...eY,...i},y=(0,E.Ey)(null!=g?g:n),b=eO({callback:(0,k.useCallback)(()=>{if(!d.current){d.current=!0;return}null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},v)},[v]),disabled:m||!a}),x=(0,k.useCallback)((e,t)=>{b&&(t&&(b.unobserve(t),d.current=!1),e&&b.observe(e))},[b]),[w,S]=(0,E.wm)(x),j=(0,E.Ey)(t);return(0,k.useEffect)(()=>{b&&w.current&&(b.disconnect(),d.current=!1,b.observe(w.current))},[w,b]),(0,E.LI)(()=>(s({type:p.RegisterDroppable,element:{id:n,key:o,disabled:r,node:w,rect:f,data:j}}),()=>s({type:p.UnregisterDroppable,key:o,id:n})),[n]),(0,k.useEffect)(()=>{r!==u.current.disabled&&(s({type:p.SetDroppableDisabled,id:n,key:o,disabled:r}),u.current.disabled=r)},[n,o,r,s]),{active:a,rect:f,isOver:(null==l?void 0:l.id)===n,node:w,over:l,setNodeRef:S}}function e0(e){let{animation:t,children:r}=e,[n,i]=(0,k.useState)(null),[o,a]=(0,k.useState)(null),s=(0,E.D9)(r);return r||n||!s||i(s),(0,E.LI)(()=>{if(!o)return;let e=null==n?void 0:n.key,r=null==n?void 0:n.props.id;if(null==e||null==r){i(null);return}Promise.resolve(t(r,o)).then(()=>{i(null)})},[t,n,o]),k.createElement(k.Fragment,null,r,n?(0,k.cloneElement)(n,{ref:a}):null)}let e1={x:0,y:0,scaleX:1,scaleY:1};function e2(e){let{children:t}=e;return k.createElement(eU.Provider,{value:eF},k.createElement(e$.Provider,{value:e1},t))}let e5={position:"fixed",touchAction:"none"},e4=e=>(0,E.vd)(e)?"transform 250ms ease":void 0,e3=(0,k.forwardRef)((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:l,transform:c,transition:u=e4}=e;if(!s)return null;let d=i?c:{...c,scaleX:1,scaleY:1},f={...e5,width:s.width,height:s.height,top:s.top,left:s.left,transform:E.ux.Transform.toString(d),transformOrigin:i&&n?function(e,t){let r=(0,E.DC)(e);if(!r)return"0 0";let n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}(n,s):void 0,transition:"function"==typeof u?u(n):u,...l};return k.createElement(r,{className:a,style:f,ref:t},o)}),e6={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:E.ux.Transform.toString(t)},{transform:E.ux.Transform.toString(r)}]},sideEffects:(n={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:r}=e,i={},{styles:o,className:a}=n;if(null!=o&&o.active)for(let[e,r]of Object.entries(o.active))void 0!==r&&(i[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,r));if(null!=o&&o.dragOverlay)for(let[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&t.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(let[e,r]of Object.entries(i))t.node.style.setProperty(e,r);null!=a&&a.active&&t.node.classList.remove(a.active)}})},e8=0,e7=k.memo(e=>{var t;let{adjustScale:r=!1,children:n,dropAnimation:i,style:o,transition:a,modifiers:s,wrapperElement:l="div",className:c,zIndex:u=999}=e,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:h,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:y,measuringConfiguration:b,scrollableAncestors:x,scrollableAncestorRects:w,windowRect:S}=eJ(),j=(0,k.useContext)(e$),O=(t=null==f?void 0:f.id,(0,k.useMemo)(()=>{if(null!=t)return++e8},[t])),C=eV(s,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:v.rect,over:y,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:w,transform:j,windowRect:S}),I=eE(p),P=function(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return(0,E.zX)((e,o)=>{if(null===t)return;let a=r.get(e);if(!a)return;let s=a.node.current;if(!s)return;let l=eN(o);if(!l)return;let{transform:c}=(0,E.Jj)(o).getComputedStyle(o),u=W(c);if(!u)return;let d="function"==typeof t?t:function(e){let{duration:t,easing:r,sideEffects:n,keyframes:i}={...e6,...e};return e=>{let{active:o,dragOverlay:a,transform:s,...l}=e;if(!t)return;let c={x:a.rect.left-o.rect.left,y:a.rect.top-o.rect.top},u={scaleX:1!==s.scaleX?o.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?o.rect.height*s.scaleY/a.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},f=i({...l,active:o,dragOverlay:a,transform:{initial:s,final:d}}),[p]=f,h=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(h))return;let m=null==n?void 0:n({active:o,dragOverlay:a,...l}),g=a.node.animate(f,{duration:t,easing:r,fill:"forwards"});return new Promise(e=>{g.onfinish=()=>{null==m||m(),e()}})}}(t);return ei(s,i.draggable.measure),d({active:{id:e,data:a.data,node:s,rect:i.draggable.measure(s)},draggableNodes:r,dragOverlay:{node:o,rect:i.dragOverlay.measure(l)},droppableContainers:n,measuringConfiguration:i,transform:u})})}({config:i,draggableNodes:m,droppableContainers:g,measuringConfiguration:b}),A=I?v.setRef:void 0;return k.createElement(e2,null,k.createElement(e0,{animation:P},f&&O?k.createElement(e3,{key:O,id:f.id,ref:A,as:l,activatorEvent:d,adjustScale:r,className:c,transition:a,rect:I,style:{zIndex:u,...o},transform:C},n):null))})},45587:function(e,t,r){"use strict";r.d(t,{Fo:function(){return p},Rp:function(){return a},U2:function(){return l},nB:function(){return x},qw:function(){return u}});var n=r(67294),i=r(60887),o=r(24285);function a(e,t,r){let n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function s(e){return null!==e&&e>=0}let l=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e,o=a(t,n,r),s=t[i],l=o[i];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null},c={scaleX:1,scaleY:1},u=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:o,overIndex:a}=e,s=null!=(t=o[r])?t:n;if(!s)return null;if(i===r){let e=o[a];return e?{x:0,y:rr&&i<=a?{x:0,y:-s.height-l,...c}:i=a?{x:0,y:s.height+l,...c}:{x:0,y:0,...c}},d="Sortable",f=n.createContext({activeIndex:-1,containerId:d,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:l,disabled:{draggable:!1,droppable:!1}});function p(e){let{children:t,id:r,items:a,strategy:s=l,disabled:c=!1}=e,{active:u,dragOverlay:p,droppableRects:h,over:m,measureDroppableContainers:g}=(0,i.Cj)(),v=(0,o.Ld)(d,r),y=null!==p.rect,b=(0,n.useMemo)(()=>a.map(e=>"object"==typeof e&&"id"in e?e.id:e),[a]),x=null!=u,w=u?b.indexOf(u.id):-1,S=m?b.indexOf(m.id):-1,k=(0,n.useRef)(b),j=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r{j&&x&&g(b)},[j,b,x,g]),(0,n.useEffect)(()=>{k.current=b},[b]);let C=(0,n.useMemo)(()=>({activeIndex:w,containerId:v,disabled:O,disableTransforms:E,items:b,overIndex:S,useDragOverlay:y,sortedRects:b.reduce((e,t,r)=>{let n=h.get(t);return n&&(e[r]=n),e},Array(b.length)),strategy:s}),[w,v,O.draggable,O.droppable,E,b,S,h,y,s]);return n.createElement(f.Provider,{value:C},t)}let h=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return a(r,n,i).indexOf(t)},m=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!!c&&!!n&&(s===o||i!==a)&&(!!r||a!==i&&t===l)},g={duration:200,easing:"ease"},v="transform",y=o.ux.Transition.toString({property:v,duration:0,easing:"linear"}),b={roleDescription:"sortable"};function x(e){var t,r;let{animateLayoutChanges:a=m,attributes:l,disabled:c,data:u,getNewIndex:d=h,id:p,strategy:x,resizeObserverConfig:w,transition:S=g}=e,{items:k,containerId:j,activeIndex:E,disabled:O,disableTransforms:C,sortedRects:I,overIndex:P,useDragOverlay:A,strategy:T}=(0,n.useContext)(f),z="boolean"==typeof c?{draggable:c,droppable:!1}:{draggable:null!=(t=null==c?void 0:c.draggable)?t:O.draggable,droppable:null!=(r=null==c?void 0:c.droppable)?r:O.droppable},N=k.indexOf(p),R=(0,n.useMemo)(()=>({sortable:{containerId:j,index:N,items:k},...u}),[j,u,N,k]),_=(0,n.useMemo)(()=>k.slice(k.indexOf(p)),[k,p]),{rect:M,node:D,isOver:L,setNodeRef:F}=(0,i.Zj)({id:p,data:R,disabled:z.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...w}}),{active:U,activatorEvent:B,activeNodeRect:H,attributes:Z,setNodeRef:W,listeners:V,isDragging:$,over:q,setActivatorNodeRef:G,transform:K}=(0,i.O1)({id:p,data:R,attributes:{...b,...l},disabled:z.draggable}),X=(0,o.HB)(F,W),J=!!U,Y=J&&!C&&s(E)&&s(P),Q=!A&&$,ee=Q&&Y?K:null,et=Y?null!=ee?ee:(null!=x?x:T)({rects:I,activeNodeRect:H,activeIndex:E,overIndex:P,index:N}):null,er=s(E)&&s(P)?d({id:p,items:k,activeIndex:E,overIndex:P}):N,en=null==U?void 0:U.id,ei=(0,n.useRef)({activeId:en,items:k,newIndex:er,containerId:j}),eo=k!==ei.current.items,ea=a({active:U,containerId:j,isDragging:$,isSorting:J,id:p,index:N,items:k,newIndex:ei.current.newIndex,previousItems:ei.current.items,previousContainerId:ei.current.containerId,transition:S,wasDragging:null!=ei.current.activeId}),es=function(e){let{disabled:t,index:r,node:a,rect:s}=e,[l,c]=(0,n.useState)(null),u=(0,n.useRef)(r);return(0,o.LI)(()=>{if(!t&&r!==u.current&&a.current){let e=s.current;if(e){let t=(0,i.VK)(a.current,{ignoreTransform:!0}),r={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(r.x||r.y)&&c(r)}}r!==u.current&&(u.current=r)},[t,r,a,s]),(0,n.useEffect)(()=>{l&&c(null)},[l]),l}({disabled:!ea,index:N,node:D,rect:M});return(0,n.useEffect)(()=>{J&&ei.current.newIndex!==er&&(ei.current.newIndex=er),j!==ei.current.containerId&&(ei.current.containerId=j),k!==ei.current.items&&(ei.current.items=k)},[J,er,j,k]),(0,n.useEffect)(()=>{if(en===ei.current.activeId)return;if(en&&!ei.current.activeId){ei.current.activeId=en;return}let e=setTimeout(()=>{ei.current.activeId=en},50);return()=>clearTimeout(e)},[en]),{active:U,activeIndex:E,attributes:Z,data:R,rect:M,index:N,newIndex:er,items:k,isOver:L,isSorting:J,isDragging:$,listeners:V,node:D,overIndex:P,over:q,setNodeRef:X,setActivatorNodeRef:G,setDroppableNodeRef:F,setDraggableNodeRef:W,transform:null!=es?es:et,transition:es||eo&&ei.current.newIndex===N?y:(!Q||(0,o.vd)(B))&&S&&(J||ea)?o.ux.Transition.toString({...S,property:v}):void 0}}i.g4.Down,i.g4.Right,i.g4.Up,i.g4.Left},24285:function(e,t,r){"use strict";r.d(t,{$X:function(){return j},D9:function(){return b},DC:function(){return O},Ey:function(){return g},FJ:function(){return a},Gj:function(){return v},HB:function(){return i},IH:function(){return k},Jj:function(){return l},LI:function(){return p},Ld:function(){return w},Nq:function(){return o},Re:function(){return u},UG:function(){return s},Yz:function(){return m},qk:function(){return c},r3:function(){return f},so:function(){return P},ux:function(){return C},vZ:function(){return d},vd:function(){return E},wm:function(){return y},zX:function(){return h}});var n=r(67294);function i(){for(var e=arguments.length,t=Array(e),r=0;re=>{t.forEach(t=>t(e))},t)}let o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,r;return e?a(e)?e:s(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}function c(e){let{Document:t}=l(e);return e instanceof t}function u(e){return!a(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function f(e){return e?a(e)?e.document:s(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}let p=o?n.useLayoutEffect:n.useEffect;function h(e){let t=(0,n.useRef)(e);return p(()=>{t.current=e}),(0,n.useCallback)(function(){for(var e=arguments.length,r=Array(e),n=0;n{e.current=setInterval(t,r)},[]),(0,n.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function g(e,t){void 0===t&&(t=[e]);let r=(0,n.useRef)(e);return p(()=>{r.current!==e&&(r.current=e)},t),r}function v(e,t){let r=(0,n.useRef)();return(0,n.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function y(e){let t=h(e),r=(0,n.useRef)(null),i=(0,n.useCallback)(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,i]}function b(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}let x={};function w(e,t){return(0,n.useMemo)(()=>{if(t)return t;let r=null==x[e]?0:x[e]+1;return x[e]=r,e+"-"+r},[e,t])}function S(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i{for(let[n,i]of Object.entries(r)){let r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}let k=S(1),j=S(-1);function E(e){if(!e)return!1;let{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function O(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=l(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let C=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[C.Translate.toString(e),C.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),I="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function P(e){return e.matches(I)?e:e.querySelector(I)}},8417:function(e,t,r){"use strict";r.d(t,{Z:function(){return W}});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?m[w]+" "+S:s(S,/&\f/g,m[w])).trim())&&(d[x++]=k);return b(e,t,r,0===o?A:c,d,f,p)}function M(e,t,r,n){return b(e,t,r,T,u(e,0,n),u(e,n+1,-1),n)}var D=function(e,t,r){for(var n=0,i=0;n=i,i=S(),38===n&&12===i&&(t[r]=1),!k(i);)w();return u(y,e,g)},L=function(e,t){var r=-1,n=44;do switch(k(n)){case 0:38===n&&12===S()&&(t[r]=1),e[r]+=D(g-1,t,r);break;case 2:e[r]+=E(n);break;case 4:if(44===n){e[++r]=58===S()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=o(n)}while(n=w());return e},F=function(e,t){var r;return r=L(j(e),t),y="",r},U=new WeakMap,B=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||U.get(r))&&!n){U.set(e,!0);for(var i=[],o=F(t,i),a=r.props,s=0,l=0;s-1&&!e.return)switch(e.type){case T:e.return=function e(t,r){switch(45^c(t,0)?(((r<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3):0){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+C+t+O+t+t;case 6828:case 4268:return I+t+O+t+t;case 6165:return I+t+O+"flex-"+t+t;case 5187:return I+t+s(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+O+"flex-$1$2")+t;case 5443:return I+t+O+"flex-item-"+s(t,/flex-|-self/,"")+t;case 4675:return I+t+O+"flex-line-pack"+s(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+O+s(t,"shrink","negative")+t;case 5292:return I+t+O+s(t,"basis","preferred-size")+t;case 6060:return I+"box-"+s(t,"-grow","")+I+t+O+s(t,"grow","positive")+t;case 4554:return I+s(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return s(s(s(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return s(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return s(s(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return s(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d(t)-1-r>6)switch(c(t,r+1)){case 109:if(45!==c(t,r+4))break;case 102:return s(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+C+(108==c(t,r+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(s(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==c(t,r+1))break;case 6444:switch(c(t,d(t)-3-(~l(t,"!important")&&10))){case 107:return s(t,":",":"+I)+t;case 101:return s(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(45===c(t,14)?"inline-":"")+"box$3$1"+I+"$2$3$1"+O+"$2box$3")+t}break;case 5936:switch(c(t,r+11)){case 114:return I+t+O+s(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+O+s(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+O+s(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+O+t+t}return t}(e.value,e.length);break;case z:return N([x(e,{value:s(e.value,"@","@"+I)})],n);case A:if(e.length){var i,o;return i=e.props,o=function(t){var r;switch(r=t,(r=/(::plac\w+|:read-\w+)/.exec(r))?r[0]:r){case":read-only":case":read-write":return N([x(e,{props:[s(t,/:(read-\w+)/,":"+C+"$1")]})],n);case"::placeholder":return N([x(e,{props:[s(t,/:(plac\w+)/,":"+I+"input-$1")]}),x(e,{props:[s(t,/:(plac\w+)/,":"+C+"$1")]}),x(e,{props:[s(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""},i.map(o).join("")}}}],W=function(e){var t,r,i,a,m,x,O=e.key;if("css"===O){var C=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(C,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var I=e.stylisPlugins||Z,A={},T=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+O+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r2||k(v)>3?"":" "}(R);break;case 92:V+=function(e,t){for(var r;--t&&w()&&!(v<48)&&!(v>102)&&(!(v>57)||!(v<65))&&(!(v>70)||!(v<97)););return r=g+(t<6&&32==S()&&32==w()),u(y,e,r)}(g-1,7);continue;case 47:switch(S()){case 42:case 47:f(b(C=function(e,t){for(;w();)if(e+v===57)break;else if(e+v===84&&47===S())break;return"/*"+u(y,t,g-1)+"*"+o(47===e?e:w())}(w(),g),r,n,P,o(v),u(C,2,-2),0),O);break;default:V+="/"}break;case 123*D:j[I++]=d(V)*F;case 125*D:case 59:case 0:switch(U){case 0:case 125:L=0;case 59+A:N>0&&d(V)-T&&f(N>32?M(V+";",i,n,T-1):M(s(V," ","")+";",i,n,T-2),O);break;case 59:V+=";";default:if(f(W=_(V,r,n,I,A,a,j,B,H=[],Z=[],T),m),123===U){if(0===A)e(V,r,W,W,H,m,T,j,Z);else switch(99===z&&110===c(V,3)?100:z){case 100:case 109:case 115:e(t,W,W,i&&f(_(t,W,W,0,0,a,j,B,a,H=[],T),Z),a,Z,T,j,i?H:Z);break;default:e(V,W,W,W,[""],Z,0,j,Z)}}}I=A=N=0,D=F=1,B=V="",T=x;break;case 58:T=1+d(V),N=R;default:if(D<1){if(123==U)--D;else if(125==U&&0==D++&&125==(v=g>0?c(y,--g):0,h--,10===v&&(h=1,p--),v))continue}switch(V+=o(U),U*D){case 38:F=A>0?1:(V+="\f",-1);break;case 44:j[I++]=(d(V)-1)*F,F=1;break;case 64:45===S()&&(V+=E(w())),z=S(),A=T=d(B=V+=function(e){for(;!k(S());)w();return u(y,e,g)}(g)),U++;break;case 45:45===R&&2==d(V)&&(D=0)}}return m}("",null,null,null,[""],t=j(t=e),0,[0],t),y="",r),z)};m=function(e,t,r,n){x=r,D(e?e+"{"+t.styles+"}":t.styles),n&&(L.inserted[t.name]=!0)};var L={key:O,sheet:new n({key:O,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:A,registered:{},insert:m};return L.sheet.hydrate(T),L}},91683:function(e,t,r){"use strict";r.d(t,{T:function(){return c},a:function(){return d},w:function(){return l}});var n=r(67294),i=r(8417),o=r(87462),a=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}};r(7906),r(27278);var s=(0,n.createContext)("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null);s.Provider;var l=function(e){return(0,n.forwardRef)(function(t,r){return e(t,(0,n.useContext)(s),r)})},c=(0,n.createContext)({}),u=a(function(e){return a(function(t){return"function"==typeof t?t(e):(0,o.Z)({},e,t)})}),d=function(e){var t=(0,n.useContext)(c);return e.theme!==t&&(t=u(t)(e.theme)),(0,n.createElement)(c.Provider,{value:t},e.children)}},70917:function(e,t,r){"use strict";r.d(t,{F4:function(){return u},iv:function(){return c},xB:function(){return l}});var n=r(67294);r(8417);var i=r(91683);r(8679);var o=r(70444),a=r(7906),s=r(27278),l=(0,i.w)(function(e,t){var r=e.styles,l=(0,a.O)([r],void 0,(0,n.useContext)(i.T)),c=(0,n.useRef)();return(0,s.j)(function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==i&&(n=!0,i.setAttribute("data-emotion",e),r.hydrate([i])),c.current=[r,n],function(){r.flush()}},[t]),(0,s.j)(function(){var e=c.current,r=e[0];if(e[1]){e[1]=!1;return}if(void 0!==l.next&&(0,o.My)(t,l.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",l,r,!1)},[t,l.name]),null});function c(){for(var e=arguments.length,t=Array(e),r=0;r=4;++n,i-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&r)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*1540483477+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)},s={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},l=/[A-Z]|^ms/g,c=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},d=function(e){return null!=e&&"boolean"!=typeof e},f=(n=function(e){return u(e)?e:e.replace(l,"-$&").toLowerCase()},i=Object.create(null),function(e){return void 0===i[e]&&(i[e]=n(e)),i[e]}),p=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(c,function(e,t,r){return o={name:t,styles:r,next:o},t})}return 1===s[e]||u(e)||"number"!=typeof t||0===t?t:t+"px"};function h(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return o={name:r.name,styles:r.styles,next:o},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)o={name:n.name,styles:n.styles,next:o},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i{let{element:t,padding:r}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return(0,n.x7)({element:t.current,padding:r}).fn(e)}else if(t)return(0,n.x7)({element:t,padding:r}).fn(e);return{}}}};var l="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function c(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!c(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!c(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function u(e){let t=o.useRef(e);return l(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,whileElementsMounted:d,open:f}=e,[p,h]=o.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=o.useState(n);c(m,n)||g(n);let v=o.useRef(null),y=o.useRef(null),b=o.useRef(p),x=u(d),w=u(s),[S,k]=o.useState(null),[j,E]=o.useState(null),O=o.useCallback(e=>{v.current!==e&&(v.current=e,k(e))},[]),C=o.useCallback(e=>{y.current!==e&&(y.current=e,E(e))},[]),I=o.useCallback(()=>{if(!v.current||!y.current)return;let e={placement:t,strategy:r,middleware:m};w.current&&(e.platform=w.current),(0,i.oo)(v.current,y.current,e).then(e=>{let t={...e,isPositioned:!0};P.current&&!c(b.current,t)&&(b.current=t,a.flushSync(()=>{h(t)}))})},[m,t,r,w]);l(()=>{!1===f&&b.current.isPositioned&&(b.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[f]);let P=o.useRef(!1);l(()=>(P.current=!0,()=>{P.current=!1}),[]),l(()=>{if(S&&j){if(x.current)return x.current(S,j,I);I()}},[S,j,I,x]);let A=o.useMemo(()=>({reference:v,floating:y,setReference:O,setFloating:C}),[O,C]),T=o.useMemo(()=>({reference:S,floating:j}),[S,j]);return o.useMemo(()=>({...p,update:I,refs:A,elements:T,reference:O,floating:C}),[p,I,A,T,O,C])}},81461:function(e,t,r){"use strict";r.d(t,{KK:function(){return L},NI:function(){return H},Qu:function(){return I},XI:function(){return j},YF:function(){return U},bQ:function(){return D},e0:function(){return C},qs:function(){return F},tj:function(){return O}});var n,i=r(67294);r(73935);var o=r(55863),a=r(58463),s="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;let l=!1,c=0,u=()=>"floating-ui-"+c++,d=(n||(n=r.t(i,2)))["useId".toString()]||function(){let[e,t]=i.useState(()=>l?u():void 0);return s(()=>{null==e&&t(u())},[]),i.useEffect(()=>{l||(l=!0)},[]),e},f=i.createContext(null),p=i.createContext(null),h=()=>{var e;return(null==(e=i.useContext(f))?void 0:e.id)||null},m=()=>i.useContext(p);function g(e){return(null==e?void 0:e.ownerDocument)||document}function v(e){return g(e).defaultView||window}function y(e){return!!e&&e instanceof v(e).Element}function b(e){return!!e&&e instanceof v(e).HTMLElement}function x(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function w(e){let t=(0,i.useRef)(e);return s(()=>{t.current=e}),t}let S="data-floating-ui-safe-polygon";function k(e,t,r){return r&&!x(r)?0:"number"==typeof e?e:null==e?void 0:e[t]}let j=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:a=!1,restMs:l=0,move:c=!0}=void 0===t?{}:t,{open:u,onOpenChange:d,dataRef:f,events:p,elements:{domReference:v,floating:b},refs:j}=e,E=m(),O=h(),C=w(o),I=w(n),P=i.useRef(),A=i.useRef(),T=i.useRef(),z=i.useRef(),N=i.useRef(!0),R=i.useRef(!1),_=i.useRef(()=>{}),M=i.useCallback(()=>{var e;let t=null==(e=f.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[f]);i.useEffect(()=>{if(r)return p.on("dismiss",e),()=>{p.off("dismiss",e)};function e(){clearTimeout(A.current),clearTimeout(z.current),N.current=!0}},[r,p]),i.useEffect(()=>{if(!r||!C.current||!u)return;function e(){M()&&d(!1)}let t=g(b).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[b,u,d,r,C,f,M]);let D=i.useCallback(function(e){void 0===e&&(e=!0);let t=k(I.current,"close",P.current);t&&!T.current?(clearTimeout(A.current),A.current=setTimeout(()=>d(!1),t)):e&&(clearTimeout(A.current),d(!1))},[I,d]),L=i.useCallback(()=>{_.current(),T.current=void 0},[]),F=i.useCallback(()=>{if(R.current){let e=g(j.floating.current).body;e.style.pointerEvents="",e.removeAttribute(S),R.current=!1}},[j]);return i.useEffect(()=>{if(r&&y(v))return u&&v.addEventListener("mouseleave",o),null==b||b.addEventListener("mouseleave",o),c&&v.addEventListener("mousemove",n,{once:!0}),v.addEventListener("mouseenter",n),v.addEventListener("mouseleave",i),()=>{u&&v.removeEventListener("mouseleave",o),null==b||b.removeEventListener("mouseleave",o),c&&v.removeEventListener("mousemove",n),v.removeEventListener("mouseenter",n),v.removeEventListener("mouseleave",i)};function t(){return!!f.current.openEvent&&["click","mousedown"].includes(f.current.openEvent.type)}function n(e){if(clearTimeout(A.current),N.current=!1,a&&!x(P.current)||l>0&&0===k(I.current,"open"))return;f.current.openEvent=e;let t=k(I.current,"open",P.current);t?A.current=setTimeout(()=>{d(!0)},t):d(!0)}function i(r){if(t())return;_.current();let n=g(b);if(clearTimeout(z.current),C.current){u||clearTimeout(A.current),T.current=C.current({...e,tree:E,x:r.clientX,y:r.clientY,onClose(){F(),L(),D()}});let t=T.current;n.addEventListener("mousemove",t),_.current=()=>{n.removeEventListener("mousemove",t)};return}D()}function o(r){t()||null==C.current||C.current({...e,tree:E,x:r.clientX,y:r.clientY,onClose(){F(),L(),D()}})(r)}},[v,b,r,e,a,l,c,D,L,F,d,u,E,I,C,f]),s(()=>{var e,t,n;if(r&&u&&null!=(e=C.current)&&e.__options.blockPointerEvents&&M()){let e=g(b).body;if(e.setAttribute(S,""),e.style.pointerEvents="none",R.current=!0,y(v)&&b){let e=null==E?void 0:null==(t=E.nodesRef.current.find(e=>e.id===O))?void 0:null==(n=t.context)?void 0:n.elements.floating;return e&&(e.style.pointerEvents=""),v.style.pointerEvents="auto",b.style.pointerEvents="auto",()=>{v.style.pointerEvents="",b.style.pointerEvents=""}}}},[r,u,O,b,v,E,C,f,M]),s(()=>{u||(P.current=void 0,L(),F())},[u,L,F]),i.useEffect(()=>()=>{L(),clearTimeout(A.current),clearTimeout(z.current),F()},[r,L,F]),i.useMemo(()=>{if(!r)return{};function e(e){P.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){u||0===l||(clearTimeout(z.current),z.current=setTimeout(()=>{N.current||d(!0)},l))}},floating:{onMouseEnter(){clearTimeout(A.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),D(!1)}}}},[p,r,l,u,d,D])},E=i.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),O=()=>i.useContext(E),C=e=>{let{children:t,delay:r,timeoutMs:n=0}=e,[o,a]=i.useReducer((e,t)=>({...e,...t}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),l=i.useRef(null),c=i.useCallback(e=>{a({currentId:e})},[]);return s(()=>{o.currentId?null===l.current?l.current=o.currentId:a({isInstantPhase:!0}):(a({isInstantPhase:!1}),l.current=null)},[o.currentId]),i.createElement(E.Provider,{value:i.useMemo(()=>({...o,setState:a,setCurrentId:c}),[o,a,c])},t)},I=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t,{currentId:a,setCurrentId:s,initialDelay:l,setState:c,timeoutMs:u}=O();i.useEffect(()=>{a&&(c({delay:{open:1,close:k(l,"close")}}),a!==o&&n(!1))},[o,n,c,a,l]),i.useEffect(()=>{function e(){n(!1),c({delay:l,currentId:null})}if(!r&&a===o){if(u){let t=window.setTimeout(e,u);return()=>{clearTimeout(t)}}e()}},[r,c,a,o,n,l,u]),i.useEffect(()=>{r&&s(o)},[r,s,o])};function P(e,t){if(!e||!t)return!1;let r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&function(e){if("undefined"==typeof ShadowRoot)return!1;let t=v(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}(r)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function A(e,t){let r=e.filter(e=>{var r;return e.parentId===t&&(null==(r=e.context)?void 0:r.open)})||[],n=r;for(;n.length;)n=e.filter(e=>{var t;return null==(t=n)?void 0:t.some(t=>{var r;return e.parentId===t.id&&(null==(r=e.context)?void 0:r.open)})})||[],r=r.concat(n);return r}let T=(n||(n=r.t(i,2)))["useInsertionEffect".toString()]||(e=>e());function z(e){let t=i.useRef(()=>{});return T(()=>{t.current=e}),i.useCallback(function(){for(var e=arguments.length,r=Array(e),n=0;n!1),I="function"==typeof v?C:v,P=i.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:D}=M(j);return i.useEffect(()=>{if(!r||!f)return;function e(e){if("Escape"===e.key){let e=E?A(E.nodesRef.current,s):[];if(e.length>0){let t=!0;if(e.forEach(e=>{var r;if(null!=(r=e.context)&&r.open&&!e.context.dataRef.current.__escapeKeyBubbles){t=!1;return}}),!t)return}a.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function t(e){var t;let r=P.current;if(P.current=!1,r||"function"==typeof I&&!I(e))return;let i="composedPath"in e?e.composedPath()[0]:e.target;if(b(i)&&u){let t=u.ownerDocument.defaultView||window,r=i.scrollWidth>i.clientWidth,n=i.scrollHeight>i.clientHeight,o=n&&e.offsetX>i.clientWidth;if(n&&"rtl"===t.getComputedStyle(i).direction&&(o=e.offsetX<=i.offsetWidth-i.clientWidth),o||r&&e.offsetY>i.clientHeight)return}let o=E&&A(E.nodesRef.current,s).some(t=>{var r;return N(e,null==(r=t.context)?void 0:r.elements.floating)});if(N(e,u)||N(e,c)||o)return;let l=E?A(E.nodesRef.current,s):[];if(l.length>0){let e=!0;if(l.forEach(t=>{var r;if(null!=(r=t.context)&&r.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}a.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:function(e){if(0===e.mozInputSource&&e.isTrusted)return!0;let t=/Android/i;return(t.test(function(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||t.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:r}=e;return t+"/"+r}).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),n(!1)}function i(){n(!1)}d.current.__escapeKeyBubbles=T,d.current.__outsidePressBubbles=D;let h=g(u);p&&h.addEventListener("keydown",e),I&&h.addEventListener(x,t);let m=[];return k&&(y(c)&&(m=(0,o.Kx)(c)),y(u)&&(m=m.concat((0,o.Kx)(u))),!y(l)&&l&&l.contextElement&&(m=m.concat((0,o.Kx)(l.contextElement)))),(m=m.filter(e=>{var t;return e!==(null==(t=h.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",i,{passive:!0})}),()=>{p&&h.removeEventListener("keydown",e),I&&h.removeEventListener(x,t),m.forEach(e=>{e.removeEventListener("scroll",i)})}},[d,u,c,l,p,I,x,a,E,s,r,n,k,f,T,D,O]),i.useEffect(()=>{P.current=!1},[I,x]),i.useMemo(()=>f?{reference:{[R[S]]:()=>{w&&(a.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[_[x]]:()=>{P.current=!0}}}:{},[f,a,w,x,S,n])},L=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:a,refs:s,elements:{floating:l,domReference:c}}=e,{enabled:u=!0,keyboardOnly:d=!0}=void 0===t?{}:t,f=i.useRef(""),p=i.useRef(!1),h=i.useRef();return i.useEffect(()=>{if(!u)return;let e=g(l).defaultView||window;function t(){!r&&b(c)&&c===function(e){let t=e.activeElement;for(;(null==(r=t)?void 0:null==(n=r.shadowRoot)?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}(g(c))&&(p.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}},[l,c,r,u]),i.useEffect(()=>{if(u)return a.on("dismiss",e),()=>{a.off("dismiss",e)};function e(e){("referencePress"===e.type||"escapeKey"===e.type)&&(p.current=!0)}},[a,u]),i.useEffect(()=>()=>{clearTimeout(h.current)},[]),i.useMemo(()=>u?{reference:{onPointerDown(e){let{pointerType:t}=e;f.current=t,p.current=!!(t&&d)},onMouseLeave(){p.current=!1},onFocus(e){var t;p.current||"focus"===e.type&&(null==(t=o.current.openEvent)?void 0:t.type)==="mousedown"&&o.current.openEvent&&N(o.current.openEvent,c)||(o.current.openEvent=e.nativeEvent,n(!0))},onBlur(e){p.current=!1;let t=e.relatedTarget,r=y(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");h.current=setTimeout(()=>{P(s.floating.current,t)||P(c,t)||r||n(!1)})}}}:{},[u,d,c,s,o,n])},F=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=void 0===t?{}:t,a=d(),s=d();return i.useMemo(()=>{let e={id:a,role:o};return n?"tooltip"===o?{reference:{"aria-describedby":r?a:void 0},floating:e}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===o?"dialog":o,"aria-controls":r?a:void 0,..."listbox"===o&&{role:"combobox"},..."menu"===o&&{id:s}},floating:{...e,..."menu"===o&&{"aria-labelledby":s}}}:{}},[n,o,r,a,s])};function U(e){void 0===e&&(e={});let{open:t=!1,onOpenChange:r,nodeId:n}=e,o=(0,a.YF)(e),l=m(),c=i.useRef(null),u=i.useRef({}),d=i.useState(()=>(function(){let e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(e=>e!==r))}}})())[0],[f,p]=i.useState(null),h=i.useCallback(e=>{let t=y(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;o.refs.setReference(t)},[o.refs]),g=i.useCallback(e=>{(y(e)||null===e)&&(c.current=e,p(e)),(y(o.refs.reference.current)||null===o.refs.reference.current||null!==e&&!y(e))&&o.refs.setReference(e)},[o.refs]),v=i.useMemo(()=>({...o.refs,setReference:g,setPositionReference:h,domReference:c}),[o.refs,g,h]),b=i.useMemo(()=>({...o.elements,domReference:f}),[o.elements,f]),x=z(r),w=i.useMemo(()=>({...o,refs:v,elements:b,dataRef:u,nodeId:n,events:d,open:t,onOpenChange:x}),[o,n,d,t,x,v,b]);return s(()=>{let e=null==l?void 0:l.nodesRef.current.find(e=>e.id===n);e&&(e.context=w)}),i.useMemo(()=>({...o,context:w,refs:v,reference:g,positionReference:h}),[o,v,w,g,h])}function B(e,t,r){let n=new Map;return{..."floating"===r&&{tabIndex:-1},...e,...t.map(e=>e?e[r]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[r,i]=t;if(0===r.indexOf("on")){if(n.has(r)||n.set(r,[]),"function"==typeof i){var o;null==(o=n.get(r))||o.push(i),e[r]=function(){for(var e,t=arguments.length,i=Array(t),o=0;oe(...i))}}}else e[r]=i}),e),{})}}let H=function(e){void 0===e&&(e=[]);let t=e,r=i.useCallback(t=>B(t,e,"reference"),t),n=i.useCallback(t=>B(t,e,"floating"),t),o=i.useCallback(t=>B(t,e,"item"),e.map(e=>null==e?void 0:e.item));return i.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}},11363:function(e,t,r){"use strict";r.d(t,{l:function(){return J}});var n=r(64761),i=r(34736),o=r(64523),a=r(56057),s=r(9276),l=r(67294),c=r(61689);function u(e){return e.concat().sort(function(e,t){return e.name>t.name?1:-1}).map(function(e){return e.options})}function d(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var r=(0,l.useRef)(c.Z.optionsHandler()),n=(0,l.useRef)(e),i=(0,l.useRef)(t),o=(0,l.useState)(),a=o[0],s=o[1],f=(0,l.useState)(),p=f[0],h=f[1],m=(0,l.useCallback)(function(){a&&a.reInit(n.current,i.current)},[a]);return(0,l.useEffect)(function(){if("undefined"!=typeof window&&window.document&&window.document.createElement&&p){c.Z.globalOptions=d.globalOptions;var e=(0,c.Z)(p,n.current,i.current);return s(e),function(){return e.destroy()}}s(void 0)},[p,s]),(0,l.useEffect)(function(){r.current.areEqual(n.current,e)||(n.current=e,m())},[e,m]),(0,l.useEffect)(function(){!function(e,t){if(e.length!==t.length)return!1;var r=c.Z.optionsHandler().areEqual,n=u(e),i=u(t);return n.every(function(e,t){return r(e,i[t])})}(i.current,t)&&(i.current=t,m())},[t,m]),[h,a]}d.globalOptions=void 0;let[f,p]=(0,r(68216).R)("[@mantine/carousel] Carousel.Slide was rendered outside of Carousel context");var h=r(56817),m=r(83687),g=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>v(e,y(t)),E=(0,h.k)((e,{controlSize:t,controlsOffset:r,orientation:n,height:i,includeGapInSize:o,breakpoints:a=[],slideGap:s})=>{let l="horizontal"===n,c=t=>o?{["horizontal"===n?"marginRight":"marginBottom"]:-1*e.fn.size({size:t,sizes:e.spacing})}:{},u=a.some(e=>void 0!==e.slideGap||void 0!==e.slideSize)?(0,m.I)(e,a).reduce((t,r)=>{var n;let i="maxWidth"in r?"max-width":"min-width",o=e.fn.size({size:"max-width"===i?r.maxWidth:r.minWidth,sizes:e.breakpoints}),a=null!=(n=void 0===r.slideGap?s:r.slideGap)?n:0;return t[`@media (${i}: ${o-("max-width"===i?1:0)}px)`]=c(a),t},{}):null;return{root:{position:"relative"},viewport:{height:i,overflow:"hidden"},container:k(k({display:"flex",flexDirection:l?"row":"column",height:i},c(s)),u),controls:{position:"absolute",zIndex:1,left:l?0:`calc(50% - ${t/2}px)`,right:l?0:void 0,top:l?`calc(50% - ${t/2}px)`:0,bottom:l?void 0:0,display:"flex",flexDirection:l?"row":"column",alignItems:"center",justifyContent:"space-between",paddingLeft:l?e.fn.size({size:r,sizes:e.spacing}):void 0,paddingRight:l?e.fn.size({size:r,sizes:e.spacing}):void 0,paddingTop:l?void 0:e.fn.size({size:r,sizes:e.spacing}),paddingBottom:l?void 0:e.fn.size({size:r,sizes:e.spacing}),pointerEvents:"none"},control:j(k({display:"flex",justifyContent:"center",alignItems:"center",minWidth:t,minHeight:t,borderRadius:t,pointerEvents:"all",backgroundColor:e.white,color:e.black,boxShadow:e.shadows.md,opacity:"dark"===e.colorScheme?.65:.85,border:`1px solid ${e.colors.gray[3]}`,transition:`opacity 150ms ${e.transitionTimingFunction}`},e.fn.hover({opacity:1})),{"&:active":e.activeStyles}),indicators:{position:"absolute",bottom:l?e.spacing.md:0,top:l?void 0:0,left:l?0:void 0,right:l?0:e.spacing.md,display:"flex",flexDirection:l?"row":"column",justifyContent:"center",gap:8,pointerEvents:"none"},indicator:{pointerEvents:"all",width:l?25:5,height:l?5:25,borderRadius:1e4,backgroundColor:e.white,boxShadow:e.shadows.sm,opacity:.6,transition:`opacity 150ms ${e.transitionTimingFunction}`,"&[data-active]":{opacity:1}}}}),O=Object.defineProperty,C=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))I.call(t,r)&&A(e,r,t[r]);if(C)for(var r of C(t))P.call(t,r)&&A(e,r,t[r]);return e},z=(0,h.k)((e,{size:t,gap:r,orientation:n,includeGapInSize:i,breakpoints:o=[]})=>{let a=(t,r)=>{let o=e.fn.size({size:t,sizes:e.spacing}),a="number"==typeof r?`${r}px`:r;return T({flex:`0 0 ${a}`},i?{["horizontal"===n?"paddingRight":"paddinBottom"]:o}:{["horizontal"===n?"marginRight":"marginBottom"]:o})},s=o.some(e=>void 0!==e.slideGap||void 0!==e.slideSize)?(0,m.I)(e,o).reduce((t,n)=>{let i="maxWidth"in n?"max-width":"min-width",o=e.fn.size({size:"max-width"===i?n.maxWidth:n.minWidth,sizes:e.breakpoints}),s=void 0===n.slideGap?r:n.slideGap;return t[`@media (${i}: ${o-("max-width"===i?1:0)}px)`]=a(s,n.slideSize),t},{}):null;return{slide:T(T({position:"relative"},a(r,t)),s)}}),N=Object.defineProperty,R=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))_.call(t,r)&&D(e,r,t[r]);if(R)for(var r of R(t))M.call(t,r)&&D(e,r,t[r]);return e},F=(e,t)=>{var r={};for(var n in e)_.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&R)for(var n of R(e))0>t.indexOf(n)&&M.call(e,n)&&(r[n]=e[n]);return r};let U=(0,l.forwardRef)((e,t)=>{var{children:r,className:n,size:i,gap:a,onClick:s}=e,c=F(e,["children","className","size","gap","onClick"]);let u=p(),{classes:d,cx:f}=z({gap:void 0===a?u.slideGap:a,size:void 0===i?u.slideSize:i,orientation:u.orientation,includeGapInSize:u.includeGapInSize,breakpoints:u.breakpoints},{name:"Carousel",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled}),h=(0,l.useCallback)(e=>{var t;(null==(t=u.embla)?void 0:t.clickAllowed())&&(null==s||s(e))},[u.embla]);return l.createElement(o.x,L({className:f(d.slide,n),ref:t,onClick:h},c),r)});function B({dir:e,orientation:t,direction:r}){return"previous"===r?"horizontal"===t?90*("ltr"===e?1:-1):-180:"horizontal"===t?90*("ltr"===e?-1:1):0}U.displayName="@mantine/carousel/CarouselSlide";var H=Object.defineProperty,Z=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))W.call(t,r)&&$(e,r,t[r]);if(Z)for(var r of Z(t))V.call(t,r)&&$(e,r,t[r]);return e},G=(e,t)=>{var r={};for(var n in e)W.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Z)for(var n of Z(e))0>t.indexOf(n)&&V.call(e,n)&&(r[n]=e[n]);return r};let K={controlSize:26,controlsOffset:"sm",slideSize:"100%",slideGap:0,orientation:"horizontal",align:"center",slidesToScroll:1,includeGapInSize:!0,draggable:!0,dragFree:!1,loop:!1,speed:10,initialSlide:0,inViewThreshold:0,withControls:!0,withIndicators:!1,skipSnaps:!1,containScroll:"",withKeyboardEvents:!0},X=(0,l.forwardRef)((e,t)=>{let r=(0,n.N4)("Carousel",K,e),{children:c,className:u,getEmblaApi:p,onNextSlide:h,onPreviousSlide:m,onSlideChange:g,nextControlLabel:v,previousControlLabel:y,controlSize:b,controlsOffset:x,classNames:w,styles:S,unstyled:k,slideSize:j,slideGap:O,orientation:C,height:I,align:P,slidesToScroll:A,includeGapInSize:T,draggable:z,dragFree:N,loop:R,speed:_,initialSlide:M,inViewThreshold:D,withControls:L,withIndicators:F,plugins:U,nextControlIcon:H,previousControlIcon:Z,breakpoints:W,skipSnaps:V,containScroll:$,withKeyboardEvents:X}=r,J=G(r,["children","className","getEmblaApi","onNextSlide","onPreviousSlide","onSlideChange","nextControlLabel","previousControlLabel","controlSize","controlsOffset","classNames","styles","unstyled","slideSize","slideGap","orientation","height","align","slidesToScroll","includeGapInSize","draggable","dragFree","loop","speed","initialSlide","inViewThreshold","withControls","withIndicators","plugins","nextControlIcon","previousControlIcon","breakpoints","skipSnaps","containScroll","withKeyboardEvents"]),{classes:Y,cx:Q,theme:ee}=E({controlSize:b,controlsOffset:x,orientation:C,height:I,includeGapInSize:T,breakpoints:W,slideGap:O},{name:"Carousel",classNames:w,styles:S,unstyled:k}),[et,er]=d({axis:"horizontal"===C?"x":"y",direction:"horizontal"===C?ee.dir:void 0,startIndex:M,loop:R,align:P,slidesToScroll:A,draggable:z,dragFree:N,speed:_,inViewThreshold:D,skipSnaps:V,containScroll:$},U),[en,ei]=(0,l.useState)(0),[eo,ea]=(0,l.useState)(0),es=(0,l.useCallback)(e=>er&&er.scrollTo(e),[er]),el=(0,l.useCallback)(()=>{if(!er)return;let e=er.selectedScrollSnap();ei(e),null==g||g(e)},[er,ei]),ec=(0,l.useCallback)(()=>{null==er||er.scrollPrev(),null==m||m()},[er]),eu=(0,l.useCallback)(()=>{null==er||er.scrollNext(),null==h||h()},[er]),ed=(0,l.useCallback)(e=>{X&&("ArrowRight"===e.key&&(e.preventDefault(),eu()),"ArrowLeft"===e.key&&(e.preventDefault(),ec()))},[er]);(0,l.useEffect)(()=>{if(er)return null==p||p(er),el(),ea(er.scrollSnapList().length),er.on("select",el),()=>{er.off("select",el)}},[er,A]),(0,l.useEffect)(()=>{er&&(er.reInit(),ea(er.scrollSnapList().length),ei(e=>(0,s.u)(e,0,l.Children.toArray(c).length-1)))},[l.Children.toArray(c).length,A]);let ef=(null==er?void 0:er.canScrollPrev())||!1,ep=(null==er?void 0:er.canScrollNext())||!1,eh=Array(eo).fill(0).map((e,t)=>l.createElement(i.k,{key:t,"data-active":t===en||void 0,className:Y.indicator,"aria-hidden":!0,tabIndex:-1,onClick:()=>es(t)}));return l.createElement(f,{value:{slideGap:O,slideSize:j,embla:er,orientation:C,includeGapInSize:T,breakpoints:W,classNames:w,styles:S,unstyled:k}},l.createElement(o.x,q({className:Q(Y.root,u),ref:t,onKeyDownCapture:ed},J),l.createElement("div",{className:Y.viewport,ref:et},l.createElement("div",{className:Y.container},c)),F&&l.createElement("div",{className:Y.indicators},eh),L&&l.createElement("div",{className:Y.controls},l.createElement(i.k,{onClick:ec,className:Y.control,"aria-label":y,"data-inactive":!ef||void 0,tabIndex:ef?0:-1},void 0!==Z?Z:l.createElement(a.D,{style:{transform:`rotate(${B({dir:ee.dir,orientation:C,direction:"previous"})}deg)`}})),l.createElement(i.k,{onClick:eu,className:Y.control,"aria-label":v,"data-inactive":!ep||void 0,tabIndex:ep?0:-1},void 0!==H?H:l.createElement(a.D,{style:{transform:`rotate(${B({dir:ee.dir,orientation:C,direction:"next"})}deg)`}})))))});X.Slide=U,X.displayName="@mantine/carousel/Carousel";let J=X},15544:function(e,t,r){"use strict";r.d(t,{U:function(){return eN}});var n=r(67294),i=r(64761),o=r(31943),a=r(36289),s=r(15851),l=r(68216);let c="Accordion.Item component was rendered with invalid value or without value",[u,d]=(0,l.R)("Accordion component was not found in the tree");function f({children:e,multiple:t,value:r,defaultValue:i,onChange:l,id:d,loop:f,transitionDuration:p,disableChevronRotation:h,chevronPosition:m,chevronSize:g,order:v,chevron:y,variant:b,radius:x,classNames:w,styles:S,unstyled:k}){let j=(0,a.M)(d),[E,O]=(0,s.C)({value:r,defaultValue:i,finalValue:t?[]:null,onChange:l});return n.createElement(u,{value:{isItemActive:e=>Array.isArray(E)?E.includes(e):e===E,onChange:e=>{O(Array.isArray(E)?E.includes(e)?E.filter(t=>t!==e):[...E,e]:e===E?null:e)},getControlId:(0,o.A)(`${j}-control`,c),getRegionId:(0,o.A)(`${j}-panel`,c),transitionDuration:p,disableChevronRotation:h,chevronPosition:m,chevronSize:g,order:v,chevron:y,loop:f,variant:b,radius:x,classNames:w,styles:S,unstyled:k}},e)}let[p,h]=(0,l.R)("Accordion.Item component was not found in the tree");var m=r(56817),g=(0,m.k)((e,t)=>({item:function(e,{variant:t,radius:r}){let n="dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3],i="dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],o=e.fn.radius(r);return"default"===t?{color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,borderBottom:`1px solid ${n}`}:"contained"===t?{border:`1px solid ${n}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:i},"&:first-of-type":{borderTopRightRadius:o,borderTopLeftRadius:o,"& > [data-accordion-control]":{borderTopRightRadius:o,borderTopLeftRadius:o}},"&:last-of-type":{borderBottomRightRadius:o,borderBottomLeftRadius:o,"& > [data-accordion-control]":{borderBottomRightRadius:o,borderBottomLeftRadius:o}},"& + &":{borderTop:0}}:"filled"===t?{borderRadius:o,"&[data-active]":{backgroundColor:i}}:"separated"===t?{borderRadius:o,backgroundColor:i,border:"1px solid transparent",transition:"background-color 150ms ease","& + &":{marginTop:e.spacing.md},"&[data-active]":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,borderColor:n}}:{}}(e,t)})),v=r(64523),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E={},O=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("AccordionItem",E,e),{children:o,className:a,value:s}=r,l=j(r,["children","className","value"]),c=d(),{classes:u,cx:f}=g({variant:c.variant,radius:c.radius},{name:"Accordion",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled});return n.createElement(p,{value:{value:s}},n.createElement(v.x,k({ref:t,className:f(u.item,a),"data-active":c.isItemActive(s)||void 0},l),o))});O.displayName="@mantine/core/AccordionItem";var C=r(16650),I=Object.defineProperty,P=Object.defineProperties,A=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>P(e,A(t)),D=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r},L=(0,m.k)((e,t)=>{var{transitionDuration:r,chevronPosition:n,chevronSize:i}=t,o=D(t,["transitionDuration","chevronPosition","chevronSize"]);return{icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:"left"===n?0:e.spacing.sm,marginLeft:"left"===n?e.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${r}ms ease`,marginRight:"right"===n?0:e.spacing.sm,marginLeft:"right"===n?e.spacing.lg:0,width:i,minWidth:i,"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis"},itemTitle:{margin:0,padding:0},control:M(_(_(_({},e.fn.focusStyles()),e.fn.fontStyles()),function(e,{variant:t}){return"default"===t||"contained"===t?e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]}):{}}(e,o)),{width:"100%",display:"flex",alignItems:"center",flexDirection:"right"===n?"row-reverse":"row",padding:`${e.spacing.md}px ${e.spacing.md/2}px`,paddingLeft:"right"===n?`calc(${e.spacing.sm}px + 4px)`:null,textAlign:"left",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,"&:disabled":_({opacity:.4,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))})}}),F=r(34736),U=Object.defineProperty,B=Object.defineProperties,H=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))W.call(t,r)&&$(e,r,t[r]);if(Z)for(var r of Z(t))V.call(t,r)&&$(e,r,t[r]);return e},G=(e,t)=>B(e,H(t)),K=(e,t)=>{var r={};for(var n in e)W.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Z)for(var n of Z(e))0>t.indexOf(n)&&V.call(e,n)&&(r[n]=e[n]);return r};let X={},J=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("AccordionControl",X,e),{disabled:o,onKeyDown:a,onClick:s,chevron:l,children:c,className:u,icon:f}=r,p=K(r,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),m=d(),{value:g}=h(),{classes:v,cx:y}=L({transitionDuration:m.transitionDuration,chevronPosition:m.chevronPosition,chevronSize:m.chevronSize,variant:m.variant,radius:m.radius},{name:"Accordion",classNames:m.classNames,styles:m.styles,unstyled:m.unstyled}),b=m.isItemActive(g),x="number"==typeof m.order,w=`h${m.order}`,S=n.createElement(F.k,G(q({},p),{ref:t,"data-accordion-control":!0,disabled:o,className:y(v.control,u),onClick:e=>{null==s||s(e),m.onChange(g)},type:"button","data-active":b||void 0,"aria-expanded":b,"aria-controls":m.getRegionId(g),id:m.getControlId(g),unstyled:m.unstyled,onKeyDown:(0,C.R)({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:m.loop,orientation:"vertical",onKeyDown:a})}),n.createElement("div",{className:v.chevron,"data-rotate":!m.disableChevronRotation&&b||void 0},l||m.chevron),n.createElement("div",{className:v.label},c),f&&n.createElement("div",{className:v.icon},f));return x?n.createElement(w,{className:v.itemTitle},S):S});J.displayName="@mantine/core/AccordionControl";var Y=Object.defineProperty,Q=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,ei=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eo=(e,t)=>{for(var r in t||(t={}))er.call(t,r)&&ei(e,r,t[r]);if(et)for(var r of et(t))en.call(t,r)&&ei(e,r,t[r]);return e},ea=(e,t)=>Q(e,ee(t)),es=(0,m.k)((e,t)=>({panel:ea(eo({},e.fn.fontStyles()),{wordBreak:"break-word",lineHeight:e.lineHeight}),content:{padding:e.spacing.md,paddingTop:`calc(${e.spacing.xs}px / 2)`}})),el=r(31003),ec=Object.defineProperty,eu=Object.defineProperties,ed=Object.getOwnPropertyDescriptors,ef=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,em=(e,t,r)=>t in e?ec(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eg=(e,t)=>{for(var r in t||(t={}))ep.call(t,r)&&em(e,r,t[r]);if(ef)for(var r of ef(t))eh.call(t,r)&&em(e,r,t[r]);return e},ev=(e,t)=>eu(e,ed(t)),ey=(e,t)=>{var r={};for(var n in e)ep.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ef)for(var n of ef(e))0>t.indexOf(n)&&eh.call(e,n)&&(r[n]=e[n]);return r};let eb={};function ex(e){let t=(0,i.N4)("AccordionPanel",eb,e),{children:r,className:o}=t,a=ey(t,["children","className"]),s=d(),{value:l}=h(),{classNames:c,styles:u,unstyled:f}=d(),{classes:p,cx:m}=es({variant:s.variant,radius:s.radius},{name:"Accordion",classNames:c,styles:u,unstyled:f});return n.createElement(el.U,ev(eg({},a),{className:m(p.panel,o),in:s.isItemActive(l),transitionDuration:s.transitionDuration,role:"region",id:s.getRegionId(l),"aria-labelledby":s.getControlId(l)}),n.createElement("div",{className:p.content},r))}ex.displayName="@mantine/core/AccordionPanel";var ew=r(56057),eS=Object.defineProperty,ek=Object.defineProperties,ej=Object.getOwnPropertyDescriptors,eE=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,eC=Object.prototype.propertyIsEnumerable,eI=(e,t,r)=>t in e?eS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eP=(e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&eI(e,r,t[r]);if(eE)for(var r of eE(t))eC.call(t,r)&&eI(e,r,t[r]);return e},eA=(e,t)=>ek(e,ej(t)),eT=(e,t)=>{var r={};for(var n in e)eO.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eE)for(var n of eE(e))0>t.indexOf(n)&&eC.call(e,n)&&(r[n]=e[n]);return r};let ez={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:n.createElement(ew.D,null)};function eN(e){let t=(0,i.N4)("Accordion",ez,e),{id:r,loop:o,children:a,multiple:s,value:l,defaultValue:c,onChange:u,transitionDuration:d,disableChevronRotation:p,chevronPosition:h,chevronSize:m,order:g,chevron:y,classNames:b,styles:x,unstyled:w,variant:S,radius:k}=t,j=eT(t,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return n.createElement(f,{id:r,multiple:s,value:l,defaultValue:c,onChange:u,loop:o,transitionDuration:d,disableChevronRotation:p,chevronPosition:h,chevronSize:m,order:g,chevron:y,variant:S,radius:k,classNames:b,styles:x,unstyled:w},n.createElement(v.x,eA(eP({},j),{"data-accordion":!0}),a))}eN.Item=O,eN.Control=J,eN.Panel=ex,eN.displayName="@mantine/core/Accordion"},56057:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e};function u(e){return n.createElement("svg",c({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},e),n.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}},49834:function(e,t,r){"use strict";r.d(t,{A:function(){return P}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t));let g={xs:18,sm:22,md:28,lg:34,xl:44};var v=(0,a.k)((e,{color:t,size:r,radius:n,variant:i,gradient:o})=>({root:m(h({},function({variant:e,theme:t,color:r,gradient:n}){let i=t.fn.variant({color:r,variant:e,gradient:n});return"gradient"===e?{border:0,backgroundImage:i.background,color:i.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:h({border:`1px solid ${i.border}`,backgroundColor:i.background,color:i.color},t.fn.hover({backgroundColor:i.hover}))}({variant:i,theme:e,color:t,gradient:o})),{position:"relative",height:e.fn.size({size:r,sizes:g}),minHeight:e.fn.size({size:r,sizes:g}),width:e.fn.size({size:r,sizes:g}),minWidth:e.fn.size({size:r,sizes:g}),borderRadius:e.fn.radius(n),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center","&:active":e.activeStyles,"&:disabled, &[data-disabled]":{color:e.colors.gray["dark"===e.colorScheme?6:4],cursor:"not-allowed",backgroundColor:"transparent"===i?void 0:e.fn.themeColor("gray","dark"===e.colorScheme?8:1),borderColor:"transparent"===i?void 0:e.fn.themeColor("gray","dark"===e.colorScheme?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(n),cursor:"not-allowed"}}})})),y=r(20966),b=r(34736),x=Object.defineProperty,w=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&j(e,r,t[r]);if(w)for(var r of w(t))k.call(t,r)&&j(e,r,t[r]);return e},O=(e,t)=>{var r={};for(var n in e)S.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&w)for(var n of w(e))0>t.indexOf(n)&&k.call(e,n)&&(r[n]=e[n]);return r};let C={color:"gray",size:"md",variant:"subtle",loading:!1},I=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("ActionIcon",C,e),{className:o,color:a,children:s,radius:l,size:c,variant:u,gradient:d,disabled:f,loaderProps:p,loading:h,unstyled:m}=r,x=O(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled"]),{classes:w,cx:S,theme:k}=v({size:c,radius:l,color:a,variant:u,gradient:d},{name:"ActionIcon",unstyled:m}),j=k.fn.variant({color:a,variant:u}),I=n.createElement(y.a,E({color:j.color,size:k.fn.size({size:c,sizes:g})-12},p));return n.createElement(b.k,E({className:S(w.root,o),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":h||void 0,unstyled:m},x),h?I:s)});I.displayName="@mantine/core/ActionIcon";let P=(0,o.F)(I)},74403:function(e,t,r){"use strict";r.d(t,{b:function(){return C}});var n=r(67294),i=r(64761),o=r(36289),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t)),g=(0,a.k)((e,{color:t,radius:r,variant:n})=>({root:h(m(h({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",padding:`${e.spacing.sm}px ${e.spacing.md}px`,borderRadius:e.fn.radius(r),border:"1px solid transparent"}),function({variant:e,color:t,theme:r}){if("filled"===e)return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if("outline"===e){let e=r.fn.variant({variant:"outline",color:t});return{color:e.color,borderColor:e.border,backgroundColor:"dark"===r.colorScheme?r.colors.dark[6]:r.white}}let n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}({variant:n,color:t,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:7,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:20,height:20,display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:m(h({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:"filled"===n?e.white:"dark"===e.colorScheme?"light"===n?e.white:e.colors.dark[0]:e.black}),closeButton:{position:"absolute",top:e.spacing.sm,right:e.spacing.sm,color:"inherit"}})),v=r(64523),y=r(80971),b=Object.defineProperty,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&x)for(var n of x(e))0>t.indexOf(n)&&S.call(e,n)&&(r[n]=e[n]);return r};let O={variant:"light"},C=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Alert",O,e),{id:a,className:s,title:l,variant:c,children:u,color:d,classNames:f,icon:p,styles:h,onClose:m,radius:b,withCloseButton:x,closeButtonLabel:w,unstyled:S}=r,k=E(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:C,cx:I}=g({color:d,radius:b,variant:c},{classNames:f,styles:h,unstyled:S,name:"Alert"}),P=(0,o.M)(a),A=l&&`${P}-title`,T=`${P}-body`;return n.createElement(v.x,j({id:P,role:"alert","aria-labelledby":A,"aria-describedby":T,className:I(C.root,C[c],s),ref:t},k),n.createElement("div",{className:C.wrapper},p&&n.createElement("div",{className:C.icon},p),n.createElement("div",{className:C.body},l&&n.createElement("div",{className:C.title,"data-with-close-button":x||void 0},n.createElement("span",{id:A,className:C.label},l)),x&&n.createElement(y.P,{className:C.closeButton,onClick:m,variant:"transparent",size:16,iconSize:16,"aria-label":w}),n.createElement("div",{id:T,className:C.message},u))))});C.displayName="@mantine/core/Alert"},54685:function(e,t,r){"use strict";r.d(t,{e:function(){return v}});var n=r(67294),i=r(64761),o=r(48427),a=r(95117),s=(0,r(56817).k)(()=>({root:{backgroundColor:"transparent",cursor:"pointer",padding:0,border:0}})),l=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};let m={},g=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Anchor",m,e),{component:o,className:l,unstyled:c}=r,u=h(r,["component","className","unstyled"]),{classes:d,cx:f}=s(null,{name:"Anchor",unstyled:c});return n.createElement(a.x,p(p({component:o||"a",variant:"link",ref:t,className:f(d.root,l)},"button"===o?{type:"button"}:null),u))});g.displayName="@mantine/core/Anchor";let v=(0,o.F)(g)},64577:function(e,t,r){"use strict";r.d(t,{o:function(){return h}});var n=r(67294),i=r(64761),o=r(64523),a=(0,r(56817).k)((e,{ratio:t})=>({root:{position:"relative",maxWidth:"100%","&::before":{content:'""',height:0,display:"block",paddingBottom:`${1/t*100}%`},"&::after":{content:'""',display:"table",clear:"both"},"& > *:not(style)":{overflow:"hidden",position:"absolute",top:0,right:0,bottom:0,left:0,display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}}})),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};let h=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("AspectRatio",{},e),{className:s,ratio:l,children:c,unstyled:u}=r,d=p(r,["className","ratio","children","unstyled"]),{classes:h,cx:m}=a({ratio:l},{name:"AspectRatio",unstyled:u});return n.createElement(o.x,f({ref:t,className:m(h.root,s)},d),c)});h.displayName="@mantine/core/AspectRatio"},52785:function(e,t,r){"use strict";r.d(t,{F:function(){return C}});var n=r(67294),i=r(15851),o=r(37048),a=r(80665),s=r(3594),l=r(65053),c=r(97176),u=r(66879),d=r(1118),f=r(75851),p=(0,r(56817).k)(()=>({wrapper:{position:"relative"}})),h=r(66261),m=r(94151),g=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>v(e,y(t)),E=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let O={required:!1,size:"sm",shadow:"sm",limit:5,itemComponent:u.A,transition:"pop",transitionDuration:0,initiallyOpened:!1,filter:function(e,t){return t.value.toLowerCase().trim().includes(e.toLowerCase().trim())},switchDirectionOnFlip:!1,zIndex:(0,s.w)("popover"),dropdownPosition:"flip",maxDropdownHeight:"auto",positionDependencies:[]},C=(0,n.forwardRef)((e,t)=>{let r=(0,h.k)("Autocomplete",O,e),{inputProps:s,wrapperProps:u,shadow:g,data:v,limit:y,value:b,defaultValue:x,onChange:w,unstyled:S,itemComponent:C,onItemSubmit:I,onKeyDown:P,onFocus:A,onBlur:T,onClick:z,transition:N,transitionDuration:R,initiallyOpened:_,transitionTimingFunction:M,classNames:D,styles:L,filter:F,nothingFound:U,onDropdownClose:B,onDropdownOpen:H,withinPortal:Z,switchDirectionOnFlip:W,zIndex:V,dropdownPosition:$,maxDropdownHeight:q,dropdownComponent:G,positionDependencies:K,readOnly:X,hoverOnSearchChange:J}=r,Y=E(r,["inputProps","wrapperProps","shadow","data","limit","value","defaultValue","onChange","unstyled","itemComponent","onItemSubmit","onKeyDown","onFocus","onBlur","onClick","transition","transitionDuration","initiallyOpened","transitionTimingFunction","classNames","styles","filter","nothingFound","onDropdownClose","onDropdownOpen","withinPortal","switchDirectionOnFlip","zIndex","dropdownPosition","maxDropdownHeight","dropdownComponent","positionDependencies","readOnly","hoverOnSearchChange"]),{classes:Q}=p(null,{classNames:D,styles:L,name:"Autocomplete",unstyled:S}),[ee,et]=(0,n.useState)(_),[er,en]=(0,n.useState)(-1),[ei,eo]=(0,n.useState)("column"),ea=(0,n.useRef)(null),[es,el]=(0,n.useState)(!1),[ec,eu]=(0,i.C)({value:b,defaultValue:x,finalValue:"",onChange:w}),ed=e=>{et(e);let t=e?H:B;"function"==typeof t&&t()};(0,o.l)(()=>{J&&ec?en(0):en(-1)},[ec,J]);let ef=v.map(e=>"string"==typeof e?{value:e}:e),ep=(0,l.j)({data:function({data:e,limit:t,value:r,filter:n}){let i=[];for(let o=0;o=t));o+=1);return i}({data:ef,value:ec,limit:y,filter:F})}),eh=ee&&(ep.length>0||0===ep.length&&!!U);return n.createElement(m.I.Wrapper,j(k({},u),{__staticSelector:"Autocomplete"}),n.createElement(d.v,{opened:eh,transition:N,transitionDuration:R,shadow:"sm",withinPortal:Z,__staticSelector:"Autocomplete",onDirectionChange:eo,switchDirectionOnFlip:W,zIndex:V,dropdownPosition:$,positionDependencies:K,classNames:D,styles:L,unstyled:S,readOnly:X},n.createElement(d.v.Target,null,n.createElement("div",{className:Q.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":eh?`${s.id}-items`:null,"aria-controls":s.id,"aria-expanded":eh,onMouseLeave:()=>en(-1),tabIndex:-1},n.createElement(m.I,j(k(k({type:"search",autoComplete:"off"},s),Y),{readOnly:X,"data-mantine-stop-propagation":ee,ref:(0,a.Y)(t,ea),onKeyDown:e=>{if(es)return;"function"==typeof P&&P(e);let t="column"===ei,r=()=>{en(e=>e{en(e=>e>0?e-1:e)};switch(e.key){case"ArrowUp":e.preventDefault(),t?n():r();break;case"ArrowDown":e.preventDefault(),t?r():n();break;case"Enter":ep[er]&&ee&&(e.preventDefault(),eu(ep[er].value),"function"==typeof I&&I(ep[er]),ed(!1));break;case"Escape":ee&&(e.preventDefault(),ed(!1))}},classNames:D,styles:L,__staticSelector:"Autocomplete",value:ec,onChange:e=>{eu(e.currentTarget.value),ed(!0)},onFocus:e=>{"function"==typeof A&&A(e),ed(!0)},onBlur:e=>{"function"==typeof T&&T(e),ed(!1)},onClick:e=>{"function"==typeof z&&z(e),ed(!0)},onCompositionStart:()=>el(!0),onCompositionEnd:()=>el(!1),"aria-autocomplete":"list","aria-controls":eh?`${s.id}-items`:null,"aria-activedescendant":er>=0?`${s.id}-${er}`:null})))),n.createElement(d.v.Dropdown,{component:G||f.r,maxHeight:q,direction:ei,id:s.id,__staticSelector:"Autocomplete",classNames:D,styles:L},n.createElement(c.j,{data:ep,hovered:er,classNames:D,styles:L,uuid:s.id,__staticSelector:"Autocomplete",onItemHover:en,onItemSelect:e=>{eu(e.value),"function"==typeof I&&I(e),ed(!1)},itemComponent:C,size:s.size,nothingFound:U}))))});C.displayName="@mantine/core/Autocomplete"},99985:function(e,t,r){"use strict";r.d(t,{q:function(){return el}});var n=r(67294),i=r(64761),o=r(48427),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t));function m(e){return n.createElement("svg",h(p({},e),{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),n.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var g=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>v(e,y(t));let E=(0,n.createContext)(null);function O({spacing:e,children:t}){return n.createElement(E.Provider,{value:{spacing:e}},t)}var C=r(56817),I=(0,C.k)((e,{spacing:t})=>({root:{display:"flex",paddingLeft:e.fn.size({size:t,sizes:e.spacing})}})),P=r(64523),A=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r};let D={},L=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("AvatarGroup",D,e),{children:o,spacing:a="sm",unstyled:s,className:l}=r,c=M(r,["children","spacing","unstyled","className"]),{classes:u,cx:d}=I({spacing:a},{name:"AvatarGroup",unstyled:s});return n.createElement(O,{spacing:a},n.createElement(P.x,_({ref:t,className:d(u.root,l)},c),o))});L.displayName="@mantine/core/AvatarGroup";var F=Object.defineProperty,U=Object.defineProperties,B=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,V=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))Z.call(t,r)&&V(e,r,t[r]);if(H)for(var r of H(t))W.call(t,r)&&V(e,r,t[r]);return e},q=(e,t)=>U(e,B(t));let G={xs:16,sm:26,md:38,lg:56,xl:84};var K=(0,C.k)((e,{size:t,radius:r,color:n,withinGroup:i,spacing:o,variant:a,gradient:s})=>{let l=e.fn.variant({variant:a,color:n,gradient:s});return{root:$(q($({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",width:e.fn.size({size:t,sizes:G}),minWidth:e.fn.size({size:t,sizes:G}),height:e.fn.size({size:t,sizes:G}),borderRadius:e.fn.radius(r),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0}),function({withinGroup:e,spacing:t,theme:r}){return e?{marginLeft:-r.fn.size({size:t,sizes:r.spacing}),backgroundColor:`${"dark"===r.colorScheme?r.colors.dark[7]:r.white}`,border:`2px solid ${"dark"===r.colorScheme?r.colors.dark[7]:r.white}`}:null}({withinGroup:i,spacing:o,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:q($({},e.fn.fontStyles()),{fontSize:e.fn.size({size:t,sizes:G})/2.5,color:l.color,fontWeight:700,backgroundColor:l.background,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",backgroundImage:"gradient"===a?l.background:void 0,border:`${"gradient"===a?0:1}px solid ${l.border}`,borderRadius:e.fn.radius(r)}),placeholderIcon:{width:"70%",height:"70%",color:l.color}}}),X=Object.defineProperty,J=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,er=(e,t,r)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,en=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&er(e,r,t[r]);if(Q)for(var r of Q(t))et.call(t,r)&&er(e,r,t[r]);return e},ei=(e,t)=>J(e,Y(t)),eo=(e,t)=>{var r={};for(var n in e)ee.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Q)for(var n of Q(e))0>t.indexOf(n)&&et.call(e,n)&&(r[n]=e[n]);return r};let ea={size:"md",color:"gray",variant:"light"},es=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Avatar",ea,e),{className:o,size:a,src:s,alt:l,radius:c,children:u,color:d,variant:f,gradient:p,classNames:h,styles:g,imageProps:v,unstyled:y}=r,b=eo(r,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),x=function(){let e=(0,n.useContext)(E);return e?j(k({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}(),[w,S]=(0,n.useState)(!s),{classes:O,cx:C}=K({color:d,radius:c,size:a,withinGroup:x.withinGroup,spacing:x.spacing,variant:f,gradient:p},{classNames:h,styles:g,unstyled:y,name:"Avatar"});return(0,n.useEffect)(()=>{s?S(!1):S(!0)},[s]),n.createElement(P.x,en({component:"div",className:C(O.root,o),ref:t},b),w?n.createElement("div",{className:O.placeholder,title:l},u||n.createElement(m,{className:O.placeholderIcon})):n.createElement("img",ei(en({},v),{className:O.image,src:s,alt:l,onError:()=>S(!0)})))});es.displayName="@mantine/core/Avatar",es.Group=L;let el=(0,o.F)(es)},17789:function(e,t,r){"use strict";r.d(t,{C:function(){return P}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t));let g={xs:{fontSize:9,height:16},sm:{fontSize:10,height:18},md:{fontSize:11,height:20},lg:{fontSize:13,height:26},xl:{fontSize:16,height:32}},v={xs:4,sm:4,md:6,lg:8,xl:10};var y=(0,a.k)((e,{color:t,size:r,radius:n,gradient:i,fullWidth:o,variant:a})=>{let{fontSize:s,height:l}=r in g?g[r]:g.md;return{leftSection:{marginRight:`calc(${e.spacing.xs}px / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs}px / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:h(m(h(h({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:s,height:l,WebkitTapHighlightColor:"transparent",lineHeight:`${l-2}px`,textDecoration:"none",padding:`0 ${e.fn.size({size:r,sizes:e.spacing})/1.5}px`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(n),fontWeight:700,letterSpacing:.25,cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),function({theme:e,variant:t,color:r,size:n,gradient:i}){if("dot"===t){let t=e.fn.size({size:n,sizes:v});return{backgroundColor:"transparent",color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:e.fn.size({size:n,sizes:e.spacing})/1.5-t/2,"&::before":{content:'""',display:"block",width:t,height:t,borderRadius:t,backgroundColor:e.fn.themeColor(r,"dark"===e.colorScheme?4:e.fn.primaryShade("light"),!0),marginRight:t}}}let o=e.fn.variant({color:r,variant:t,gradient:i});return{background:o.background,color:o.color,border:`${"gradient"===t?0:1}px solid ${o.border}`}}({theme:e,variant:a,color:t,size:r,gradient:i}))}}),b=r(64523),x=Object.defineProperty,w=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&j(e,r,t[r]);if(w)for(var r of w(t))k.call(t,r)&&j(e,r,t[r]);return e},O=(e,t)=>{var r={};for(var n in e)S.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&w)for(var n of w(e))0>t.indexOf(n)&&k.call(e,n)&&(r[n]=e[n]);return r};let C={variant:"light",size:"md",radius:"xl"},I=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Badge",C,e),{className:o,color:a,variant:s,fullWidth:l,children:c,size:u,leftSection:d,rightSection:f,radius:p,gradient:h,classNames:m,styles:g,unstyled:v}=r,x=O(r,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:w,cx:S}=y({size:u,fullWidth:l,color:a,radius:p,variant:s,gradient:h},{classNames:m,styles:g,name:"Badge",unstyled:v});return n.createElement(b.x,E({className:S(w.root,o),ref:t},x),d&&n.createElement("span",{className:w.leftSection},d),n.createElement("span",{className:w.inner},c),f&&n.createElement("span",{className:w.rightSection},f))});I.displayName="@mantine/core/Badge";let P=(0,o.F)(I)},64523:function(e,t,r){"use strict";r.d(t,{x:function(){return y}});var n=r(67294),i=r(48427),o=r(12756),a=r(64761),s=r(55138),l=r(11686);function c(e,t){return"function"==typeof e?e(t):e}var u=Object.defineProperty,d=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(d)for(var r of d(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>{var r={};for(var n in e)f.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&d)for(var n of d(e))0>t.indexOf(n)&&p.call(e,n)&&(r[n]=e[n]);return r};let v=(0,n.forwardRef)((e,t)=>{var{className:r,component:i,style:u,sx:d}=e,f=g(e,["className","component","style","sx"]);let{systemStyles:p,rest:h}=(0,o.x)(f);return n.createElement(i||"div",m({ref:t,className:function(e,t,r){let n=(0,a.rZ)(),{css:i,cx:o}=(0,s.Z)();return Array.isArray(e)?o(r,i((0,l.M)(t,n)),e.map(e=>i(c(e,n)))):o(r,i(c(e,n)),i((0,l.M)(t,n)))}(d,p,r),style:u},h))});v.displayName="@mantine/core/Box";let y=(0,i.F)(v)},12756:function(e,t,r){"use strict";r.d(t,{x:function(){return l}});var n=r(66896),i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(e,t)=>{var r={};for(var n in e)o.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&i)for(var n of i(e))0>t.indexOf(n)&&a.call(e,n)&&(r[n]=e[n]);return r};function l(e){let{m:t,mx:r,my:i,mt:o,mb:a,ml:l,mr:c,p:u,px:d,py:f,pt:p,pb:h,pl:m,pr:g,bg:v,c:y,opacity:b,ff:x,fz:w,fw:S,lts:k,ta:j,lh:E,fs:O,tt:C,td:I,w:P,miw:A,maw:T,h:z,mih:N,mah:R,bgsz:_,bgp:M,bgr:D,bga:L,pos:F,top:U,left:B,bottom:H,right:Z,inset:W,display:V}=e,$=s(e,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:(0,n.L)({m:t,mx:r,my:i,mt:o,mb:a,ml:l,mr:c,p:u,px:d,py:f,pt:p,pb:h,pl:m,pr:g,bg:v,c:y,opacity:b,ff:x,fz:w,fw:S,lts:k,ta:j,lh:E,fs:O,tt:C,td:I,w:P,miw:A,maw:T,h:z,mih:N,mah:R,bgsz:_,bgp:M,bgr:D,bga:L,pos:F,top:U,left:B,bottom:H,right:Z,inset:W,display:V}),rest:$}}},11686:function(e,t,r){"use strict";r.d(t,{M:function(){return f}});let n=["-xs","-sm","-md","-lg","-xl"],i={color:function(e,t){return"dimmed"===e?"dark"===t.colorScheme?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background},default:function(e){return e},fontSize:function(e,t){return t.fn.size({size:e,sizes:t.fontSizes})},spacing:function(e,t){return n.includes(e)?-1*t.fn.size({size:e.replace("-",""),sizes:t.spacing}):t.fn.size({size:e,sizes:t.spacing})}},o={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var a=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&u(e,r,t[r]);return e};function f(e,t,r=o){return Object.keys(r).reduce((n,o)=>(o in e&&void 0!==e[o]&&n.push(function({value:e,theme:t,getValue:r,property:n}){if(null==e)return;if("object"==typeof e)return(function(e,t){let r=Object.keys(e).filter(e=>"base"!==e).sort((e,r)=>t.fn.size({size:e,sizes:t.breakpoints})-t.fn.size({size:r,sizes:t.breakpoints}));return"base"in e?["base",...r]:r})(e,t).reduce((i,o)=>{if("base"===o&&void 0!==e.base){let o=r(e.base,t);return Array.isArray(n)?n.forEach(e=>{i[e]=o}):i[n]=o,i}let a=r(e[o],t);return Array.isArray(n)?(i[t.fn.largerThan(o)]={},n.forEach(e=>{i[t.fn.largerThan(o)][e]=a})):i[t.fn.largerThan(o)]={[n]:a},i},{});let i=r(e,t);return Array.isArray(n)?n.reduce((e,t)=>(e[t]=i,e),{}):{[n]:i}}({value:e[o],getValue:i[r[o].type],property:r[o].property,theme:t})),n),[]).reduce((e,t)=>(Object.keys(t).forEach(r=>{"object"==typeof t[r]&&null!==t[r]&&r in e?e[r]=d(d({},e[r]),t[r]):e[r]=t[r]}),e),{})}},67841:function(e,t,r){"use strict";r.d(t,{z:function(){return H}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=(0,a.k)((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:"vertical"===t?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,["vertical"===t?"borderBottomLeftRadius":"borderTopRightRadius"]:0,["vertical"===t?"borderBottomWidth":"borderRightWidth"]:r/2},"&:last-of-type":{borderTopLeftRadius:0,["vertical"===t?"borderTopRightRadius":"borderBottomLeftRadius"]:0,["vertical"===t?"borderTopWidth":"borderLeftWidth"]:r/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,["vertical"===t?"borderTopWidth":"borderLeftWidth"]:r/2,["vertical"===t?"borderBottomWidth":"borderRightWidth"]:r/2},"& + [data-button]":{["vertical"===t?"marginTop":"marginLeft"]:-r,"@media (min-resolution: 192dpi)":{["vertical"===t?"marginTop":"marginLeft"]:0}}}}})),l=r(64523),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>{var r={};for(var n in e)d.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&f.call(e,n)&&(r[n]=e[n]);return r};let g={orientation:"horizontal",buttonBorderWidth:1},v=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("ButtonGroup",g,e),{className:o,orientation:a,buttonBorderWidth:c,unstyled:u}=r,d=m(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:f,cx:p}=s({orientation:a,buttonBorderWidth:c},{name:"ButtonGroup",unstyled:u});return n.createElement(l.x,h({className:p(f.root,o),ref:t},d))});v.displayName="@mantine/core/ButtonGroup";var y=r(35227),b=Object.defineProperty,x=Object.defineProperties,w=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,E=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t)=>{for(var r in t||(t={}))k.call(t,r)&&E(e,r,t[r]);if(S)for(var r of S(t))j.call(t,r)&&E(e,r,t[r]);return e},C=(e,t)=>x(e,w(t));let I={xs:{height:y.J.xs,paddingLeft:14,paddingRight:14},sm:{height:y.J.sm,paddingLeft:18,paddingRight:18},md:{height:y.J.md,paddingLeft:22,paddingRight:22},lg:{height:y.J.lg,paddingLeft:26,paddingRight:26},xl:{height:y.J.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}},P=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});var A=(0,a.k)((e,{color:t,size:r,radius:n,fullWidth:i,compact:o,gradient:a,variant:s,withLeftIcon:l,withRightIcon:c})=>({root:C(O(C(O(O(O(O({},function({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return I[`compact-${t}`];let i=I[t];return C(O({},i),{paddingLeft:r?i.paddingLeft/1.5:i.paddingLeft,paddingRight:n?i.paddingRight/1.5:i.paddingRight})}({compact:o,size:r,withLeftIcon:l,withRightIcon:c})),e.fn.fontStyles()),e.fn.focusStyles()),P(i)),{borderRadius:e.fn.radius(n),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:r,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),function({variant:e,theme:t,color:r,gradient:n}){let i=t.fn.variant({color:r,variant:e,gradient:n});return"gradient"===e?{border:0,backgroundImage:i.background,color:i.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:O({border:`1px solid ${i.border}`,backgroundColor:i.background,color:i.color},t.fn.hover({backgroundColor:i.hover}))}({variant:s,theme:e,color:t,gradient:a})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],color:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(n),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}})),T=r(20966),z=r(34736),N=Object.defineProperty,R=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))_.call(t,r)&&D(e,r,t[r]);if(R)for(var r of R(t))M.call(t,r)&&D(e,r,t[r]);return e},F=(e,t)=>{var r={};for(var n in e)_.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&R)for(var n of R(e))0>t.indexOf(n)&&M.call(e,n)&&(r[n]=e[n]);return r};let U={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},B=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Button",U,e),{className:o,size:a,color:s,type:l,disabled:c,children:u,leftIcon:d,rightIcon:f,fullWidth:p,variant:h,radius:m,uppercase:g,compact:v,loading:y,loaderPosition:b,loaderProps:x,gradient:w,classNames:S,styles:k,unstyled:j}=r,E=F(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:O,cx:C,theme:P}=A({radius:m,color:s,size:a,fullWidth:p,compact:v,gradient:w,variant:h,withLeftIcon:!!d,withRightIcon:!!f},{name:"Button",unstyled:j,classNames:S,styles:k}),N=P.fn.variant({color:s,variant:h}),R=n.createElement(T.a,L({color:N.color,size:P.fn.size({size:a,sizes:I}).height/2},x));return n.createElement(z.k,L({className:C(O.root,o),type:l,disabled:c,"data-button":!0,"data-disabled":c||void 0,"data-loading":y||void 0,ref:t,unstyled:j},E),n.createElement("div",{className:O.inner},(d||y&&"left"===b)&&n.createElement("span",{className:C(O.icon,O.leftIcon)},y&&"left"===b?R:d),y&&"center"===b&&n.createElement("span",{className:O.centerLoader},R),n.createElement("span",{className:O.label,style:{textTransform:g?"uppercase":void 0}},u),(f||y&&"right"===b)&&n.createElement("span",{className:C(O.icon,O.rightIcon)},y&&"right"===b?R:f)))});B.displayName="@mantine/core/Button",B.Group=v;let H=(0,o.F)(B)},21017:function(e,t,r){"use strict";r.d(t,{Z:function(){return N}});var n=r(67294),i=r(64761),o=r(48427),a=r(82623);let s=(0,n.createContext)({padding:0}),l=s.Provider,c=()=>(0,n.useContext)(s).padding;var u=r(56817),d=(0,u.k)((e,{padding:t,withBorder:r,inheritPadding:n})=>{let i=e.fn.size({size:t,sizes:e.spacing}),o=-1*i,a="dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3];return{cardSection:{display:"block",marginLeft:o,marginRight:o,paddingLeft:n?i:void 0,paddingRight:n?i:void 0,borderTop:r&&`1px solid ${a}`,borderBottom:r&&`1px solid ${a}`,"& + &":{borderTop:0},"&[data-first]":{marginTop:o,borderTop:0,borderBottom:r&&`1px solid ${a}`},"&[data-last]":{marginBottom:o,borderBottom:0}}}}),f=r(64523),p=Object.defineProperty,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>{var r={};for(var n in e)m.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&h)for(var n of h(e))0>t.indexOf(n)&&g.call(e,n)&&(r[n]=e[n]);return r};let x={withBorder:!1,inheritPadding:!1},w=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("CardSection",x,e),{className:o,withBorder:a,inheritPadding:s,unstyled:l}=r,u=b(r,["className","withBorder","inheritPadding","unstyled"]),{classes:p,cx:h}=d({padding:c(),withBorder:a,inheritPadding:s},{name:"Card",unstyled:l});return n.createElement(f.x,y({className:h(p.cardSection,o),ref:t},u))});w.displayName="@mantine/core/CardSection";let S=(0,o.F)(w);var k=(0,u.k)(e=>({root:{position:"relative",overflow:"hidden",backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white}})),j=Object.defineProperty,E=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,I=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&I(e,r,t[r]);if(E)for(var r of E(t))C.call(t,r)&&I(e,r,t[r]);return e},A=(e,t)=>{var r={};for(var n in e)O.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&E)for(var n of E(e))0>t.indexOf(n)&&C.call(e,n)&&(r[n]=e[n]);return r};let T={p:"md"},z=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Card",T,e),{className:o,p:s,radius:c,children:u,unstyled:d}=r,f=A(r,["className","p","radius","children","unstyled"]),{classes:p,cx:h}=k(null,{name:"Card",unstyled:d}),m=n.Children.toArray(u),g=m.map((e,t)=>"object"==typeof e&&e&&"type"in e&&e.type===S?(0,n.cloneElement)(e,{padding:s,"data-first":0===t||void 0,"data-last":t===m.length-1||void 0}):e);return n.createElement(l,{value:{padding:s}},n.createElement(a.X,P({className:h(p.root,o),radius:c,p:s,ref:t},f),g))});z.Section=S,z.displayName="@mantine/core/Card";let N=(0,o.F)(z)},9094:function(e,t,r){"use strict";r.d(t,{M:function(){return g}});var n=r(67294),i=r(64761),o=r(97818),a=r(48427),s=r(64523),l=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};let m=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Center",{},e),{inline:a,sx:l}=r,c=h(r,["inline","sx"]);return n.createElement(s.x,p({ref:t,sx:[{display:a?"inline-flex":"flex",alignItems:"center",justifyContent:"center"},...(0,o.R)(l)]},c))});m.displayName="@mantine/core/Center";let g=(0,a.F)(m)},87092:function(e,t,r){"use strict";r.d(t,{X:function(){return V}});var n=r(67294),i=r(64761),o=r(36289);let a=(0,n.createContext)(null),s=a.Provider,l=()=>(0,n.useContext)(a);var c=r(15851),u=r(1270),d=r(94151),f=Object.defineProperty,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r};let b={orientation:"horizontal",spacing:"lg",size:"sm",offset:"xs"},x=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("CheckboxGroup",b,e),{children:o,value:a,defaultValue:l,onChange:f,orientation:p,spacing:h,size:m,wrapperProps:g,offset:x}=r,w=y(r,["children","value","defaultValue","onChange","orientation","spacing","size","wrapperProps","offset"]),[S,k]=(0,c.C)({value:a,defaultValue:l,finalValue:[],onChange:f});return n.createElement(s,{value:{value:S,onChange:e=>{let t=e.currentTarget.value;k(S.includes(t)?S.filter(e=>e!==t):[...S,t])},size:m}},n.createElement(d.I.Wrapper,v(v({labelElement:"div",size:m,__staticSelector:"CheckboxGroup",ref:t},g),w),n.createElement(u.K,{spacing:h,orientation:p,offset:x},o)))});x.displayName="@mantine/core/CheckboxGroup";var w=r(56183),S=r(56817),k=Object.defineProperty,j=Object.defineProperties,E=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,P=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))C.call(t,r)&&P(e,r,t[r]);if(O)for(var r of O(t))I.call(t,r)&&P(e,r,t[r]);return e},T=(e,t)=>j(e,E(t));let z={xs:16,sm:20,md:24,lg:30,xl:36},N={xs:8,sm:10,md:14,lg:16,xl:20};var R=(0,S.k)((e,{size:t,radius:r,color:n,transitionDuration:i,labelPosition:o,error:a,indeterminate:s},l)=>{let c=e.fn.size({size:t,sizes:z}),u=e.fn.variant({variant:"filled",color:n}),d=e.fn.variant({variant:"filled",color:"red"}).background;return{icon:{ref:l("icon"),color:s?"inherit":e.white,transform:s?"none":"translateY(5px) scale(0.5)",opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${i}ms`,pointerEvents:"none",width:e.fn.size({size:t,sizes:N}),position:"absolute",zIndex:1,top:0,bottom:0,left:0,right:0,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},inner:{position:"relative",width:c,height:c,order:"left"===o?2:1},input:T(A({},e.fn.focusStyles()),{appearance:"none",backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,border:`1px solid ${a?d:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(r),padding:0,display:"block",margin:0,transition:`border-color ${i}ms ease, background-color ${i}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${l("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],borderColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",[`& + .${l("icon")}`]:{color:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[5]}}})}}),_=r(12756),M=r(4846),D=Object.defineProperty,L=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,B=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))F.call(t,r)&&B(e,r,t[r]);if(L)for(var r of L(t))U.call(t,r)&&B(e,r,t[r]);return e},Z=(e,t)=>{var r={};for(var n in e)F.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&L)for(var n of L(e))0>t.indexOf(n)&&U.call(e,n)&&(r[n]=e[n]);return r};let W={size:"sm",transitionDuration:100,icon:w.P,labelPosition:"right"},V=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Checkbox",W,e),{className:a,style:s,sx:c,checked:u,disabled:d,color:f,label:p,indeterminate:h,id:m,size:g,radius:v,wrapperProps:y,children:b,classNames:x,styles:w,transitionDuration:S,icon:k,unstyled:j,labelPosition:E,description:O,error:C}=r,I=Z(r,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error"]),P=l(),A=(0,o.M)(m),{systemStyles:T,rest:z}=(0,_.x)(I),{classes:N}=R({size:(null==P?void 0:P.size)||g,radius:v,color:f,transitionDuration:S,labelPosition:E,error:!!C,indeterminate:h},{name:"Checkbox",classNames:x,styles:w,unstyled:j}),D=P?{checked:P.value.includes(z.value),onChange:P.onChange}:{};return n.createElement(M.Z,H(H({className:a,sx:c,style:s,id:A,size:(null==P?void 0:P.size)||g,labelPosition:E,label:p,description:O,error:C,disabled:d,__staticSelector:"Checkbox",classNames:x,styles:w,unstyled:j,"data-checked":D.checked||void 0},T),y),n.createElement("div",{className:N.inner},n.createElement("input",H(H({id:A,ref:t,type:"checkbox",className:N.input,checked:u,disabled:d},z),D)),n.createElement(k,{indeterminate:h,className:N.icon})))});V.displayName="@mantine/core/Checkbox",V.Group=x},1270:function(e,t,r){"use strict";r.d(t,{K:function(){return a}});var n=r(67294),i=r(71232),o=r(97564);function a({spacing:e,offset:t,orientation:r,children:a,role:s,unstyled:l}){return"horizontal"===r?n.createElement(i.Z,{pt:t,spacing:e,role:s,unstyled:l},a):n.createElement(o.K,{pt:t,spacing:e,role:s,unstyled:l},a)}},56183:function(e,t,r){"use strict";r.d(t,{P:function(){return f},n:function(){return d}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e},u=(e,t)=>{var r={};for(var n in e)a.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&o)for(var n of o(e))0>t.indexOf(n)&&s.call(e,n)&&(r[n]=e[n]);return r};function d(e){return n.createElement("svg",c({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function f(e){var{indeterminate:t}=e,r=u(e,["indeterminate"]);return t?n.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),n.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):n.createElement(d,c({},r))}},64002:function(e,t,r){"use strict";r.d(t,{A:function(){return $}});var n=r(67294),i=r(36289),o=r(15851),a=r(64761);let s=(0,n.createContext)(null),l=s.Provider,c=()=>(0,n.useContext)(s);var u=r(71232),d=Object.defineProperty,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(f)for(var r of f(t))h.call(t,r)&&m(e,r,t[r]);return e},v=(e,t)=>{var r={};for(var n in e)p.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&f)for(var n of f(e))0>t.indexOf(n)&&h.call(e,n)&&(r[n]=e[n]);return r};let y={spacing:"xs"};function b(e){let t=(0,a.N4)("ChipGroup",y,e),{value:r,defaultValue:i,onChange:s,spacing:c,multiple:d,children:f,unstyled:p}=t,h=v(t,["value","defaultValue","onChange","spacing","multiple","children","unstyled"]),[m,b]=(0,o.C)({value:r,defaultValue:i,finalValue:d?[]:null,onChange:s});return n.createElement(l,{value:{isChipSelected:e=>Array.isArray(m)?m.includes(e):e===m,onChange:e=>{let t=e.currentTarget.value;Array.isArray(m)?b(m.includes(t)?m.filter(e=>e!==t):[...m,t]):b(t)},multiple:d}},n.createElement(u.Z,g({spacing:c,unstyled:p},h),f))}b.displayName="@mantine/core/ChipGroup";var x=r(56817),w=Object.defineProperty,S=Object.defineProperties,k=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(j)for(var r of j(t))O.call(t,r)&&C(e,r,t[r]);return e},P=(e,t)=>S(e,k(t));let A={xs:24,sm:28,md:32,lg:36,xl:40},T={xs:10,sm:12,md:14,lg:16,xl:18},z={xs:16,sm:20,md:24,lg:28,xl:32},N={xs:7.5,sm:10,md:11.5,lg:13,xl:15};var R=(0,x.k)((e,{radius:t,size:r,color:n},i)=>({root:{},label:P(I({ref:i("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,display:"inline-block",alignItems:"center",userSelect:"none",border:"1px solid transparent",borderRadius:e.fn.radius(t),height:e.fn.size({size:r,sizes:A}),fontSize:e.fn.size({size:r,sizes:e.fontSizes}),lineHeight:`${e.fn.size({size:r,sizes:A})-2}px`,paddingLeft:e.fn.size({size:r,sizes:z}),paddingRight:e.fn.size({size:r,sizes:z}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent",'&[data-variant="filled"]':I({backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[1]},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),'&[data-variant="outline"]':I({backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),"&[data-disabled]":P(I({backgroundColor:`${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]} !important`,borderColor:`${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]} !important`,color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed"},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${i("iconWrapper")}`]:{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:e.fn.size({size:r,sizes:N}),paddingRight:e.fn.size({size:r,sizes:N}),'&[data-variant="outline"]':{border:`1px solid ${e.fn.variant({variant:"filled",color:n}).background}`},'&[data-variant="filled"]':{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:n}).background}}}}),iconWrapper:{ref:i("iconWrapper"),color:e.fn.variant({variant:"filled",color:n}).background,width:e.fn.size({size:r,sizes:T})+e.fn.size({size:r,sizes:e.spacing})/1.5,maxWidth:e.fn.size({size:r,sizes:T})+e.fn.size({size:r,sizes:e.spacing})/1.5,height:e.fn.size({size:r,sizes:T}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:e.fn.size({size:r,sizes:T}),height:e.fn.size({size:r,sizes:T})/1.1,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:focus":{outline:"none",[`& + .${i("label")}`]:I({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${i("label")}`]:I({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)}}}})),_=r(12756),M=r(64523),D=r(56183),L=Object.defineProperty,F=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z=(e,t)=>{for(var r in t||(t={}))U.call(t,r)&&H(e,r,t[r]);if(F)for(var r of F(t))B.call(t,r)&&H(e,r,t[r]);return e},W=(e,t)=>{var r={};for(var n in e)U.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&F)for(var n of F(e))0>t.indexOf(n)&&B.call(e,n)&&(r[n]=e[n]);return r};let V={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},$=(0,n.forwardRef)((e,t)=>{let r=(0,a.N4)("Chip",V,e),{radius:s,type:l,size:u,variant:d,disabled:f,id:p,color:h,children:m,className:g,classNames:v,style:y,styles:b,checked:x,defaultChecked:w,onChange:S,sx:k,wrapperProps:j,value:E,unstyled:O}=r,C=W(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),I=c(),P=(0,i.M)(p),{systemStyles:A,rest:T}=(0,_.x)(C),{classes:z,cx:N}=R({radius:s,size:u,color:h},{classNames:v,styles:b,unstyled:O,name:"Chip"}),[L,F]=(0,o.C)({value:x,defaultValue:w,finalValue:!1,onChange:S}),U=I?{checked:I.isChipSelected(E),onChange:I.onChange,type:I.multiple?"checkbox":"radio"}:{},B=U.checked||L;return n.createElement(M.x,Z(Z({className:N(z.root,g),style:y,sx:k},A),j),n.createElement("input",Z(Z({type:l,className:z.input,checked:B,onChange:e=>F(e.currentTarget.checked),id:P,disabled:f,ref:t,value:E},U),T)),n.createElement("label",{htmlFor:P,"data-checked":B||void 0,"data-disabled":f||void 0,"data-variant":d,className:z.label},B&&n.createElement("span",{className:z.iconWrapper},n.createElement(D.n,{className:z.checkIcon})),m))});$.displayName="@mantine/core/Chip",$.Group=b},80971:function(e,t,r){"use strict";r.d(t,{P:function(){return j}});var n=r(67294),i=r(64761),o=r(48427),a=r(49834),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e};function p(e){return n.createElement("svg",f({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}p.displayName="@mantine/core/CloseIcon";var h=Object.defineProperty,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))g.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))v.call(t,r)&&y(e,r,t[r]);return e},x=(e,t)=>{var r={};for(var n in e)g.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&m)for(var n of m(e))0>t.indexOf(n)&&v.call(e,n)&&(r[n]=e[n]);return r};let w={xs:12,sm:14,md:16,lg:20,xl:24},S={size:"md"},k=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("CloseButton",S,e),{iconSize:o,size:s="md"}=r,l=x(r,["iconSize","size"]),c=(0,i.rZ)(),u=o||c.fn.size({size:s,sizes:w});return n.createElement(a.A,b({size:s,ref:t},l),n.createElement(p,{width:u,height:u}))});k.displayName="@mantine/core/CloseButton";let j=(0,o.F)(k)},67084:function(e,t,r){"use strict";r.d(t,{E:function(){return j}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(0,o.k)((e,{color:t})=>{let r=t||("dark"===e.colorScheme?"dark":"gray"),n=e.fn.variant({color:r,variant:"light"});return{root:h(p({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:"dark"===e.colorScheme?"dark"===r?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:"dark"===e.colorScheme&&"dark"===r?e.colors.dark[5]:n.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}}),g=r(64523),v=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))x.call(t,r)&&w(e,r,t[r]);return e},k=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&y)for(var n of y(e))0>t.indexOf(n)&&x.call(e,n)&&(r[n]=e[n]);return r};let j=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Code",{},e),{className:o,children:a,block:s,color:l,unstyled:c}=r,u=k(r,["className","children","block","color","unstyled"]),{classes:d,cx:f}=m({color:l},{name:"Code",unstyled:c});return s?n.createElement(g.x,S({component:"pre",dir:"ltr",className:f(d.root,d.block,o),ref:t},u),a):n.createElement(g.x,S({component:"code",className:f(d.root,o),ref:t,dir:"ltr"},u),a)});j.displayName="@mantine/core/Code"},31003:function(e,t,r){"use strict";r.d(t,{U:function(){return T}});var n=r(67294),i=r(73678),o=r(64761),a=r(73935),s=r(37048),l=r(80665),c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(f)for(var r of f(t))h.call(t,r)&&m(e,r,t[r]);return e},v=(e,t)=>u(e,d(t)),y=(e,t)=>{var r={};for(var n in e)p.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&f)for(var n of f(e))0>t.indexOf(n)&&h.call(e,n)&&(r[n]=e[n]);return r};function b(e){return(null==e?void 0:e.current)?e.current.scrollHeight:"auto"}let x="undefined"!=typeof window&&window.requestAnimationFrame;var w=r(12756),S=r(64523),k=Object.defineProperty,j=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(j)for(var r of j(t))O.call(t,r)&&C(e,r,t[r]);return e},P=(e,t)=>{var r={};for(var n in e)E.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&j)for(var n of j(e))0>t.indexOf(n)&&O.call(e,n)&&(r[n]=e[n]);return r};let A={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},T=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("Collapse",A,e),{children:c,in:u,transitionDuration:d,transitionTimingFunction:f,style:p,onTransitionEnd:h,animateOpacity:m}=r,k=P(r,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),j=(0,o.rZ)(),E=(0,i.J)(),O=j.respectReducedMotion&&E?0:d,{systemStyles:C,rest:T}=(0,w.x)(k),z=function({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:i}){let o=(0,n.useRef)(null),c={display:"none",height:"0px",overflow:"hidden"},[u,d]=(0,n.useState)(i?{}:c),f=e=>{(0,a.flushSync)(()=>d(e))},p=e=>{f(t=>g(g({},t),e))};function h(r){let n=e||function(e){if(!e||"string"==typeof e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}(r);return{transition:`height ${n}ms ${t}`}}(0,s.l)(()=>{i?x(()=>{p({willChange:"height",display:"block",overflow:"hidden"}),x(()=>{let e=b(o);p(v(g({},h(e)),{height:e}))})}):x(()=>{let e=b(o);p(v(g({},h(e)),{willChange:"height",height:e})),x(()=>p({height:"0px",overflow:"hidden"}))})},[i]);let m=e=>{if(e.target===o.current&&"height"===e.propertyName){if(i){let e=b(o);e===u.height?f({}):p({height:e}),r()}else"0px"===u.height&&(f(c),r())}};return function(e={}){var{style:t={},refKey:r="ref"}=e,n=y(e,["style","refKey"]);let a=n[r];return v(g({"aria-hidden":!i},n),{[r]:(0,l.l)(o,a),onTransitionEnd:m,style:g(g({boxSizing:"border-box"},t),u)})}}({opened:u,transitionDuration:O,transitionTimingFunction:f,onTransitionEnd:h});return 0===O?u?n.createElement(S.x,I({},T),c):null:n.createElement(S.x,I({},z(I(I({style:p,ref:t},T),C))),n.createElement("div",{style:{opacity:u||!m?1:0,transition:m?`opacity ${O}ms ${f}`:"none"}},c))});T.displayName="@mantine/core/Collapse"},16232:function(e,t,r){"use strict";r.d(t,{z:function(){return eB}});var n=r(67294),i=r(15851),o=r(37048),a=r(64761),s=r(21380),l=r(47776),c=r(80665),u=r(56817);let d={xs:8,sm:12,md:16,lg:20,xl:22};var f=(0,u.k)((e,{size:t})=>{let r=e.fn.size({size:t,sizes:d});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:"0 0 1px rgba(0, 0, 0, .6)",border:`2px solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}}),p=Object.defineProperty,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e};function b({position:e,className:t,styles:r,classNames:i,style:o,size:a,__staticSelector:s,unstyled:l}){let{classes:c,cx:u}=f({size:a},{classNames:i,styles:r,name:s,unstyled:l});return n.createElement("div",{className:u(c.thumb,t),style:y({left:`calc(${100*e.x}% - ${d[a]/2}px)`,top:`calc(${100*e.y}% - ${d[a]/2}px)`},o)})}b.displayName="@mantine/core/Thumb";var x=Object.defineProperty,w=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&j(e,r,t[r]);if(w)for(var r of w(t))k.call(t,r)&&j(e,r,t[r]);return e},O=(0,u.k)((e,{size:t},r)=>({sliderThumb:{ref:r("sliderThumb")},slider:{position:"relative",height:e.fn.size({size:t,sizes:d})+2,boxSizing:"border-box",marginLeft:e.fn.size({size:t,sizes:d})/2,marginRight:e.fn.size({size:t,sizes:d})/2,outline:0,[`&:focus .${r("sliderThumb")}`]:E({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${r("sliderThumb")}`]:E({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:-e.fn.size({size:t,sizes:d})/2-1,right:-e.fn.size({size:t,sizes:d})/2-1,borderRadius:1e3}})),C=r(64523),I=Object.defineProperty,P=Object.defineProperties,A=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>P(e,A(t)),D=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r};let L=(0,n.forwardRef)((e,t)=>{var{value:r,onChange:i,onChangeEnd:a,maxValue:s,round:u,size:d="md",thumbColor:f="transparent",__staticSelector:p="ColorSlider",focusable:h=!0,overlays:m,classNames:g,styles:v,className:y,unstyled:x}=e,w=D(e,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled"]);let{classes:S,cx:k}=O({size:d},{classNames:g,styles:v,name:p,unstyled:x}),[j,E]=(0,n.useState)({y:0,x:r/s}),I=(0,n.useRef)(j),P=e=>u?Math.round(e*s):e*s,{ref:A}=(0,l.r)(({x:e,y:t})=>{I.current={x:e,y:t},i(P(e))},{onScrubEnd:()=>{let{x:e}=I.current;a(P(e))}});(0,o.l)(()=>{E({y:0,x:r/s})},[r]);let T=(e,t)=>{e.preventDefault();let r=(0,l.E)(t);i(P(r.x)),a(P(r.x))},z=m.map((e,t)=>n.createElement("div",{className:S.sliderOverlay,style:e,key:t}));return n.createElement(C.x,M(_({},w),{ref:(0,c.Y)(A,t),className:k(S.slider,y),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:h?0:-1,onKeyDown:e=>{switch(e.key){case"ArrowRight":T(e,{x:j.x+.05,y:j.y});break;case"ArrowLeft":T(e,{x:j.x-.05,y:j.y})}}}),z,n.createElement(b,{__staticSelector:p,classNames:g,styles:v,position:j,style:{top:1,backgroundColor:f},className:S.sliderThumb,size:d}))});L.displayName="@mantine/core/ColorSlider";var F=Object.defineProperty,U=Object.defineProperties,B=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,V=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))Z.call(t,r)&&V(e,r,t[r]);if(H)for(var r of H(t))W.call(t,r)&&V(e,r,t[r]);return e},q=(e,t)=>U(e,B(t)),G=(e,t)=>{var r={};for(var n in e)Z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&H)for(var n of H(e))0>t.indexOf(n)&&W.call(e,n)&&(r[n]=e[n]);return r};let K=(0,n.forwardRef)((e,t)=>{var{value:r,onChange:i,onChangeEnd:o}=e,a=G(e,["value","onChange","onChangeEnd"]);return n.createElement(L,q($({},a),{ref:t,value:r,onChange:i,onChangeEnd:o,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset"}]}))});K.displayName="@mantine/core/HueSlider";var X=r(66033),J=Object.defineProperty,Y=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,en=(e,t,r)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ei=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&en(e,r,t[r]);if(ee)for(var r of ee(t))er.call(t,r)&&en(e,r,t[r]);return e},eo=(e,t)=>Y(e,Q(t)),ea=(e,t)=>{var r={};for(var n in e)et.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ee)for(var n of ee(e))0>t.indexOf(n)&&er.call(e,n)&&(r[n]=e[n]);return r};let es=(0,n.forwardRef)((e,t)=>{var{value:r,onChange:i,onChangeEnd:o,color:s}=e,l=ea(e,["value","onChange","onChangeEnd","color"]);let c=(0,a.rZ)(),u="dark"===c.colorScheme?c.colors.dark[4]:c.colors.gray[3];return n.createElement(L,eo(ei({},l),{ref:t,value:r,onChange:e=>i((0,X.NM)(e,2)),onChangeEnd:e=>o((0,X.NM)(e,2)),maxValue:1,round:!1,overlays:[{backgroundImage:`linear-gradient(45deg, ${u} 25%, transparent 25%), linear-gradient(-45deg, ${u} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${u} 75%), linear-gradient(-45deg, ${"dark"===c.colorScheme?c.colors.dark[7]:c.white} 75%, ${u} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset"}]}))});es.displayName="@mantine/core/AlphaSlider";var el=Object.defineProperty,ec=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,ed=Object.prototype.propertyIsEnumerable,ef=(e,t,r)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ep=(e,t)=>{for(var r in t||(t={}))eu.call(t,r)&&ef(e,r,t[r]);if(ec)for(var r of ec(t))ed.call(t,r)&&ef(e,r,t[r]);return e};let eh={xs:100,sm:110,md:120,lg:140,xl:160};var em=(0,u.k)((e,{size:t},r)=>({saturationThumb:{ref:r("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:e.fn.size({size:t,sizes:eh}),borderRadius:e.radius.sm,margin:e.fn.size({size:t,sizes:d})/2,WebkitTapHighlightColor:"transparent",[`&:focus .${r("saturationThumb")}`]:ep({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${r("saturationThumb")}`]:ep({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:ep({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(-e.fn.size({size:t,sizes:d})/2-1))})),eg=r(12549);function ev({value:e,onChange:t,onChangeEnd:r,focusable:i=!0,__staticSelector:o="saturation",size:a,color:s,saturationLabel:c,classNames:u,styles:d,unstyled:f}){let{classes:p}=em({size:a},{classNames:u,styles:d,name:o,unstyled:f}),[h,m]=(0,n.useState)({x:e.s/100,y:1-e.v/100}),g=(0,n.useRef)(h),{ref:v}=(0,l.r)(({x:e,y:r})=>{g.current={x:e,y:r},t({s:Math.round(100*e),v:Math.round((1-r)*100)})},{onScrubEnd:()=>{let{x:e,y:t}=g.current;r({s:Math.round(100*e),v:Math.round((1-t)*100)})}});(0,n.useEffect)(()=>{m({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);let y=(e,n)=>{e.preventDefault();let i=(0,l.E)(n);t({s:Math.round(100*i.x),v:Math.round((1-i.y)*100)}),r({s:Math.round(100*i.x),v:Math.round((1-i.y)*100)})};return n.createElement("div",{className:p.saturation,ref:v,role:"slider","aria-label":c,"aria-valuenow":h.x,"aria-valuetext":(0,eg.Rt)("rgba",e),tabIndex:i?0:-1,onKeyDown:e=>{switch(e.key){case"ArrowUp":y(e,{y:h.y-.05,x:h.x});break;case"ArrowDown":y(e,{y:h.y+.05,x:h.x});break;case"ArrowRight":y(e,{x:h.x+.05,y:h.y});break;case"ArrowLeft":y(e,{x:h.x-.05,y:h.y})}}},n.createElement("div",{className:p.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),n.createElement("div",{className:p.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),n.createElement("div",{className:p.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),n.createElement(b,{__staticSelector:o,classNames:u,styles:d,position:h,className:p.saturationThumb,style:{backgroundColor:s},size:a}))}ev.displayName="@mantine/core/Saturation";var ey=(0,u.k)((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - 4px)`,height:0,paddingBottom:`calc(${100/t}% - 4px)`,margin:2,boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:-2,marginRight:-2,display:"flex",flexWrap:"wrap"}})),eb=Object.defineProperty,ex=Object.getOwnPropertySymbols,ew=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,ek=(e,t,r)=>t in e?eb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ej=(e,t)=>{for(var r in t||(t={}))ew.call(t,r)&&ek(e,r,t[r]);if(ex)for(var r of ex(t))eS.call(t,r)&&ek(e,r,t[r]);return e},eE=(e,t)=>{var r={};for(var n in e)ew.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ex)for(var n of ex(e))0>t.indexOf(n)&&eS.call(e,n)&&(r[n]=e[n]);return r};function eO(e){var{data:t,swatchesPerRow:r=10,focusable:i=!0,classNames:o,styles:a,__staticSelector:l="color-picker",unstyled:c,setValue:u,onChangeEnd:d}=e,f=eE(e,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd"]);let{classes:p}=ey({swatchesPerRow:r},{classNames:o,styles:a,name:l,unstyled:c}),h=t.map((e,t)=>n.createElement(s.b,{className:p.swatch,component:"button",type:"button",color:e,key:t,radius:"sm",onClick:()=>{u(e),null==d||d(e)},style:{cursor:"pointer"},"aria-label":e,tabIndex:i?0:-1}));return n.createElement("div",ej({className:p.swatches},f),h)}eO.displayName="@mantine/core/Swatches";let eC={xs:180,sm:200,md:240,lg:280,xl:320};var eI=(0,u.k)((e,{size:t,fullWidth:r})=>({preview:{},wrapper:{boxSizing:"border-box",width:r?"100%":e.fn.size({size:t,sizes:eC}),padding:1},body:{display:"flex",boxSizing:"border-box",paddingTop:e.fn.size({size:t,sizes:e.spacing})/2},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:5}},swatch:{cursor:"pointer"}})),eP=Object.defineProperty,eA=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,ez=Object.getOwnPropertySymbols,eN=Object.prototype.hasOwnProperty,eR=Object.prototype.propertyIsEnumerable,e_=(e,t,r)=>t in e?eP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eM=(e,t)=>{for(var r in t||(t={}))eN.call(t,r)&&e_(e,r,t[r]);if(ez)for(var r of ez(t))eR.call(t,r)&&e_(e,r,t[r]);return e},eD=(e,t)=>eA(e,eT(t)),eL=(e,t)=>{var r={};for(var n in e)eN.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ez)for(var n of ez(e))0>t.indexOf(n)&&eR.call(e,n)&&(r[n]=e[n]);return r};let eF={xs:26,sm:34,md:42,lg:50,xl:54},eU={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},eB=(0,n.forwardRef)((e,t)=>{let r=(0,a.N4)("ColorPicker",eU,e),{value:l,defaultValue:c,onChange:u,onChangeEnd:d,format:f,swatches:p,swatchesPerRow:h,size:m,withPicker:g,fullWidth:v,focusable:y,__staticSelector:b,saturationLabel:x,hueLabel:w,alphaLabel:S,className:k,styles:j,classNames:E,unstyled:O,onColorSwatchClick:I}=r,P=eL(r,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick"]),{classes:A,cx:T,theme:z}=eI({size:m,fullWidth:v},{classNames:E,styles:j,name:b,unstyled:O}),N=(0,n.useRef)(f),R=(0,n.useRef)(null),_=(0,n.useRef)(!0),M="hexa"===f||"rgba"===f||"hsla"===f,[D,L]=(0,i.C)({value:l,defaultValue:c,finalValue:"#FFFFFF",onChange:u}),[F,U]=(0,n.useState)((0,X.lu)(D)),B=e=>{_.current=!1,U(t=>{let r=eM(eM({},t),e);return R.current=(0,eg.Rt)(N.current,r),r}),L(R.current),setTimeout(()=>{_.current=!0},0)};return(0,o.l)(()=>{(0,X.fi)(l)&&_.current&&(U((0,X.lu)(l)),_.current=!0)},[l]),(0,o.l)(()=>{N.current=f,L((0,eg.Rt)(f,F))},[f]),n.createElement(C.x,eM({className:T(A.wrapper,k),ref:t},P),g&&n.createElement(n.Fragment,null,n.createElement(ev,{value:F,onChange:B,onChangeEnd:({s:e,v:t})=>null==d?void 0:d((0,eg.Rt)(N.current,eD(eM({},F),{s:e,v:t}))),color:D,styles:j,classNames:E,size:m,focusable:y,saturationLabel:x,__staticSelector:b}),n.createElement("div",{className:A.body},n.createElement("div",{className:A.sliders},n.createElement(K,{value:F.h,onChange:e=>B({h:e}),onChangeEnd:e=>null==d?void 0:d((0,eg.Rt)(N.current,eD(eM({},F),{h:e}))),size:m,styles:j,classNames:E,focusable:y,"aria-label":w,__staticSelector:b}),M&&n.createElement(es,{value:F.a,onChange:e=>B({a:e}),onChangeEnd:e=>{null==d||d((0,eg.Rt)(N.current,eD(eM({},F),{a:e})))},size:m,color:(0,eg.Rt)("hex",F),style:{marginTop:6},styles:j,classNames:E,focusable:y,"aria-label":S,__staticSelector:b})),M&&n.createElement(s.b,{color:D,radius:"sm",size:z.fn.size({size:m,sizes:eF}),className:A.preview}))),Array.isArray(p)&&n.createElement(eO,{data:p,style:{marginTop:5},swatchesPerRow:h,focusable:y,classNames:E,styles:j,__staticSelector:b,setValue:L,onChangeEnd:e=>{let t=(0,eg.Rt)(f,(0,X.lu)(e));null==I||I(t),null==d||d(t)}}))});eB.displayName="@mantine/core/ColorPicker"},12549:function(e,t,r){"use strict";r.d(t,{Rt:function(){return u}});var n=r(66033);function i({h:e,s:t,v:r,a:i}){let o=e/360*6,a=t/100,s=r/100,l=Math.floor(o),c=s*(1-a),u=s*(1-(o-l)*a),d=s*(1-(1-o+l)*a),f=l%6;return{r:(0,n.NM)(255*[s,u,c,c,d,s][f]),g:(0,n.NM)(255*[d,s,s,u,c,c][f]),b:(0,n.NM)(255*[c,c,d,s,s,u][f]),a:(0,n.NM)(i,2)}}function o(e,t){let{r,g:o,b:a,a:s}=i(e);return t?`rgba(${r}, ${o}, ${a}, ${(0,n.NM)(s,2)})`:`rgb(${r}, ${o}, ${a})`}function a({h:e,s:t,v:r,a:i},o){let a=(200-t)*r/100,s={h:Math.round(e),s:Math.round(a>0&&a<200?t*r/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return o?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${(0,n.NM)(i,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function s(e){let t=e.toString(16);return t.length<2?`0${t}`:t}function l(e){let{r:t,g:r,b:n}=i(e);return`#${s(t)}${s(r)}${s(n)}`}let c={hex:l,hexa:e=>(function(e){let t=Math.round(255*e.a);return`${l(e)}${s(t)}`})(e),rgb:e=>o(e,!1),rgba:e=>o(e,!0),hsl:e=>a(e,!1),hsla:e=>a(e,!0)};function u(e,t){return t?e in c?c[e](t):c.hex(t):"#000000"}},66033:function(e,t,r){"use strict";r.d(t,{NM:function(){return f},fi:function(){return S},lu:function(){return k}});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>i(e,o(t));function f(e,t=0,r=10**t){return Math.round(r*e)/r}let p={grad:.9,turn:360,rad:360/(2*Math.PI)},h=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function m(e){let t=h.exec(e);return t?function({h:e,s:t,l:r,a:n}){let i=(r<50?r:100-r)/100*t;return{h:e,s:i>0?2*i/(r+i)*100:0,v:r+i,a:n}}({h:function(e,t="deg"){return Number(e)*(p[t]||1)}(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function g({r:e,g:t,b:r,a:n}){let i=Math.max(e,t,r),o=i-Math.min(e,t,r),a=o?i===e?(t-r)/o:i===t?2+(r-e)/o:4+(e-t)/o:0;return{h:f(60*(a<0?a+6:a)),s:f(i?o/i*100:0),v:f(i/255*100),a:n}}function v(e){let t="#"===e[0]?e.slice(1):e;return 3===t.length?g({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):g({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}let y=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function b(e){let t=y.exec(e);return t?g({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}let x={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},w={hex:v,hexa:function(e){let t="#"===e[0]?e.slice(1):e,r=e=>Math.round(parseInt(e,16)/255*100)/100;if(4===t.length){let e=t.slice(0,3),n=r(t[3]+t[3]);return d(u({},v(e)),{a:n})}let n=t.slice(0,6),i=r(t.slice(6,8));return d(u({},v(n)),{a:i})},rgb:b,rgba:b,hsl:m,hsla:m};function S(e){for(let[,t]of Object.entries(x))if(t.test(e))return!0;return!1}function k(e){if("string"!=typeof e)return{h:0,s:0,v:0,a:1};if("transparent"===e)return{h:0,s:0,v:0,a:0};let t=e.trim();for(let[e,r]of Object.entries(x))if(r.test(t))return w[e](t);return{h:0,s:0,v:0,a:1}}},21380:function(e,t,r){"use strict";r.d(t,{b:function(){return C}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t)),g=(0,a.k)((e,{size:t,radius:r})=>{let n="dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3];return{root:m(h({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:r,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:r,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${n} 25%, transparent 25%), linear-gradient(-45deg, ${n} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${n} 75%), linear-gradient(-45deg, ${"dark"===e.colorScheme?e.colors.dark[7]:e.white} 75%, ${n} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}}),v=r(64523),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E={size:25,radius:25,withShadow:!0},O=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("ColorSwatch",E,e),{color:o,size:a,radius:s,className:l,children:c,classNames:u,styles:d,unstyled:f,withShadow:p}=r,h=j(r,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:m,cx:y}=g({radius:s,size:a},{classNames:u,styles:d,unstyled:f,name:"ColorSwatch"});return n.createElement(v.x,k({className:y(m.root,l),ref:t},h),n.createElement("div",{className:y(m.alphaOverlay,m.overlay)}),p&&n.createElement("div",{className:y(m.shadowOverlay,m.overlay)}),n.createElement("div",{className:m.overlay,style:{backgroundColor:o}}),n.createElement("div",{className:y(m.children,m.overlay)},c))});O.displayName="@mantine/core/ColorSwatch";let C=(0,o.F)(O)},72445:function(e,t,r){"use strict";r.d(t,{W:function(){return m}});var n=r(67294),i=r(64761),o=(0,r(56817).k)((e,{fluid:t,size:r,sizes:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:r,sizes:n}),marginLeft:"auto",marginRight:"auto"}})),a=r(64523),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};let h={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},m=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Container",h,e),{className:s,fluid:l,size:c,unstyled:u,sizes:d}=r,m=p(r,["className","fluid","size","unstyled","sizes"]),{classes:g,cx:v}=o({fluid:l,size:c,sizes:d},{unstyled:u,name:"Container"});return n.createElement(a.x,f({className:v(g.root,s),ref:t},m))});m.displayName="@mantine/core/Container"},50331:function(e,t,r){"use strict";r.d(t,{q:function(){return h}});var n=r(67294),i=r(18060),o=r(64761),a=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&u(e,r,t[r]);return e},f=(e,t)=>{var r={};for(var n in e)l.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&s)for(var n of s(e))0>t.indexOf(n)&&c.call(e,n)&&(r[n]=e[n]);return r};let p={timeout:1e3};function h(e){let t=(0,o.N4)("CopyButton",p,e),{children:r,timeout:a,value:s}=t,l=f(t,["children","timeout","value"]),c=(0,i.V)({timeout:a});return n.createElement(n.Fragment,null,r(d({copy:()=>c.copy(s),copied:c.copied},l)))}h.displayName="@mantine/core/CopyButton"},54777:function(e,t,r){"use strict";r.d(t,{i:function(){return S}});var n=r(67294),i=r(64761),o=r(56817);let a={xs:1,sm:2,md:3,lg:4,xl:5};function s(e,t){let r=e.fn.variant({variant:"outline",color:t}).border;return"string"==typeof t&&(t in e.colors||t.split(".")[0]in e.colors)?r:void 0===t?"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]:t}var l=(0,o.k)((e,{size:t,variant:r,color:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:1,borderTop:`${e.fn.size({size:t,sizes:a})}px ${r} ${s(e,n)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${e.fn.size({size:t,sizes:a})}px ${r} ${s(e,n)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:"dark"===n?e.colors.dark[1]:e.fn.themeColor(n,"dark"===e.colorScheme?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:e.fn.size({size:t,sizes:a}),borderTopColor:s(e,n),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:e.fn.size({size:t,sizes:a}),borderLeftColor:s(e,n),borderLeftStyle:r}})),c=r(64523),u=r(95117),d=Object.defineProperty,f=Object.defineProperties,p=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>f(e,p(t)),x=(e,t)=>{var r={};for(var n in e)m.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&h)for(var n of h(e))0>t.indexOf(n)&&g.call(e,n)&&(r[n]=e[n]);return r};let w={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},S=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Divider",w,e),{className:o,color:a,orientation:s,size:d,label:f,labelPosition:p,labelProps:h,variant:m,styles:g,classNames:v,unstyled:S}=r,k=x(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:j,cx:E}=l({color:a,size:d,variant:m},{classNames:v,styles:g,unstyled:S,name:"Divider"}),O="horizontal"===s,C=!!f&&O,I=!(null==h?void 0:h.color);return n.createElement(c.x,y({ref:t,className:E(j.root,{[j.vertical]:"vertical"===s,[j.horizontal]:O,[j.withLabel]:C},o),role:"separator"},k),C&&n.createElement(u.x,b(y({},h),{size:(null==h?void 0:h.size)||"xs",sx:{marginTop:2},className:E(j.label,j[p],{[j.labelDefaultStyles]:I})}),f))});S.displayName="@mantine/core/Divider"},7001:function(e,t,r){"use strict";r.d(t,{d:function(){return F}});var n=r(67294),i=r(36289),o=r(67293),a=r(83317),s=r(96362),l=r(3594),c=r(64761),u=r(56817),d=Object.defineProperty,f=Object.defineProperties,p=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>f(e,p(t));let x={xs:180,sm:240,md:320,lg:360,xl:500,full:"100%"};var w=(0,u.k)((e,{position:t,size:r,zIndex:n,withOverlay:i})=>({closeButton:{},overlay:{},body:{},root:{position:"fixed",zIndex:n,top:0,left:0,right:0,bottom:0,pointerEvents:!1===i?"none":void 0},drawer:b(y({},function({position:e,size:t,theme:r}){switch(e){case"top":return{top:0,left:0,right:0,height:r.fn.size({size:t,sizes:x})};case"bottom":return{bottom:0,left:0,right:0,height:r.fn.size({size:t,sizes:x})};case"right":return{bottom:0,top:0,right:0,width:r.fn.size({size:t,sizes:x})};case"left":return{bottom:0,top:0,left:0,width:r.fn.size({size:t,sizes:x})};default:return null}}({position:t,size:r,theme:e})),{maxWidth:"100%",maxHeight:"100vh",position:"fixed",outline:0,zIndex:1,pointerEvents:!1===i?"auto":void 0}),title:{marginRight:e.spacing.md,textOverflow:"ellipsis",display:"block",wordBreak:"break-word"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.spacing.md}})),S=r(83143),k=r(75933),j=r(64523),E=r(82623),O=r(95117),C=r(80971),I=r(17577),P=Object.defineProperty,A=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,N=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))T.call(t,r)&&N(e,r,t[r]);if(A)for(var r of A(t))z.call(t,r)&&N(e,r,t[r]);return e},_=(e,t)=>{var r={};for(var n in e)T.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&A)for(var n of A(e))0>t.indexOf(n)&&z.call(e,n)&&(r[n]=e[n]);return r};let M={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},D={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},L={position:"left",size:"md",transitionDuration:250,transitionTimingFunction:"ease",zIndex:(0,l.w)("modal"),shadow:"md",padding:0,lockScroll:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!0,withOverlay:!0,withCloseButton:!0,withinPortal:!0,withFocusReturn:!0,overlayBlur:0};function F(e){let t=(0,c.N4)("Drawer",L,e),{className:r,opened:l,onClose:u,position:d,size:f,trapFocus:p,lockScroll:h,closeOnClickOutside:m,closeOnEscape:g,transition:v,transitionDuration:y,transitionTimingFunction:b,zIndex:x,overlayColor:P,overlayOpacity:A,children:T,withOverlay:z,shadow:N,id:F,padding:U,title:B,withCloseButton:H,closeButtonLabel:Z,classNames:W,styles:V,target:$,withinPortal:q,overlayBlur:G,unstyled:K,withFocusReturn:X}=t,J=_(t,["className","opened","onClose","position","size","trapFocus","lockScroll","closeOnClickOutside","closeOnEscape","transition","transitionDuration","transitionTimingFunction","zIndex","overlayColor","overlayOpacity","children","withOverlay","shadow","id","padding","title","withCloseButton","closeButtonLabel","classNames","styles","target","withinPortal","overlayBlur","unstyled","withFocusReturn"]),Y=(0,i.M)(F),Q=`${Y}-title`,ee=`${Y}-body`,{classes:et,cx:er,theme:en}=w({size:f,position:d,zIndex:x,withOverlay:z},{classNames:W,styles:V,unstyled:K,name:"Drawer"}),ei=(0,o.P)(p&&l),[,eo]=(0,a.P)(),ea=v||("rtl"===en.dir?D:M)[d],es="number"==typeof A?A:"dark"===en.colorScheme?.85:.75,el=e=>{"Escape"===e.key&&g&&u()};return(0,n.useEffect)(()=>{if(!p)return window.addEventListener("keydown",el),()=>window.removeEventListener("keydown",el)},[p]),(0,s.u)({opened:l,shouldReturnFocus:p&&X}),n.createElement(S.q,{withinPortal:q,target:$},n.createElement(k.p,{onExited:()=>eo(!1),onEntered:()=>eo(h&&!0),mounted:l,duration:y,timingFunction:b,transitions:{overlay:{duration:y/2,transition:"fade",timingFunction:"ease"},drawer:{duration:y,transition:ea,timingFunction:b}}},e=>n.createElement(j.x,R({className:er(et.root,r),role:"dialog","aria-modal":!0,"aria-labelledby":Q,"aria-describedby":ee},J),n.createElement(E.X,{className:er(et.drawer,r),ref:ei,style:e.drawer,radius:0,tabIndex:-1,onKeyDownCapture:e=>{var t;(null==(t=e.target)?void 0:t.getAttribute("data-mantine-stop-propagation"))!=="true"&&"Escape"===e.key&&g&&u()},shadow:N,p:U,unstyled:K},(B||H)&&n.createElement("div",{className:et.header},n.createElement(O.x,{id:Q,className:et.title,unstyled:K},B),H&&n.createElement(C.P,{iconSize:16,onClick:u,"aria-label":Z,className:et.closeButton,unstyled:K})),n.createElement("div",{id:ee,className:et.body},T)),z&&n.createElement("div",{style:e.overlay},n.createElement(I.a,{unstyled:K,blur:G,onMouseDown:()=>m&&u(),className:et.overlay,opacity:es,zIndex:0,color:P||("dark"===en.colorScheme?en.colors.dark[9]:en.black)})))))}F.displayName="@mantine/core/Drawer"},69876:function(e,t,r){"use strict";r.d(t,{k:function(){return x}});var n=r(67294),i=r(64761),o=r(97818);let a={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"default",property:"alignItems"},justify:{type:"default",property:"justifyContent"},wrap:{type:"default",property:"flexWrap"},direction:{type:"default",property:"flexDirection"}};var s=r(64523),l=r(11686),c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(f)for(var r of f(t))h.call(t,r)&&m(e,r,t[r]);return e},v=(e,t)=>u(e,d(t)),y=(e,t)=>{var r={};for(var n in e)p.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&f)for(var n of f(e))0>t.indexOf(n)&&h.call(e,n)&&(r[n]=e[n]);return r};let b={},x=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Flex",b,e),{gap:c,rowGap:u,columnGap:d,align:f,justify:p,wrap:h,direction:m,sx:x}=r,w=y(r,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return n.createElement(s.x,v(g({},w),{sx:[{display:"flex"},e=>(0,l.M)({gap:c,rowGap:u,columnGap:d,align:f,justify:p,wrap:h,direction:m},e,a),...(0,o.R)(x)],ref:t}))});x.displayName="@mantine/core/Flex"},63468:function(e,t,r){"use strict";r.d(t,{Y:function(){return C}});var n=r(67294),i=r(64761),o=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>a(e,s(t));function h(e,t,r,n){return"center"===e||"center"===n?{top:t}:"end"===e?{bottom:r}:"start"===e?{top:r}:{}}function m(e,t,r,n,i){return"center"===e||"center"===n?{left:t}:"end"===e?{["ltr"===i?"right":"left"]:r}:"start"===e?{["ltr"===i?"left":"right"]:r}:{}}let g={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};var v=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>y(e,b(t)),O=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&x)for(var n of x(e))0>t.indexOf(n)&&S.call(e,n)&&(r[n]=e[n]);return r};let C=(0,n.forwardRef)((e,t)=>{var{withBorder:r,position:o,arrowSize:a,arrowOffset:s,arrowRadius:l,arrowPosition:c,visible:u,arrowX:d,arrowY:v}=e,y=O(e,["withBorder","position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);let b=(0,i.rZ)();return u?n.createElement("div",E(j({},y),{ref:t,style:function({position:e,withBorder:t,arrowSize:r,arrowOffset:n,arrowRadius:i,arrowPosition:o,arrowX:a,arrowY:s,dir:l}){let[c,u="center"]=e.split("-"),d={width:r,height:r,transform:"rotate(45deg)",position:"absolute",[g[c]]:i},v=t?-r/2-1:-r/2;return"left"===c?p(f(f({},d),h(u,s,n,o)),{right:v,borderLeft:0,borderBottom:0}):"right"===c?p(f(f({},d),h(u,s,n,o)),{left:v,borderRight:0,borderTop:0}):"top"===c?p(f(f({},d),m(u,a,n,o,l)),{bottom:v,borderTop:0,borderLeft:0}):"bottom"===c?p(f(f({},d),m(u,a,n,o,l)),{top:v,borderBottom:0,borderRight:0}):{}}({withBorder:r,position:o,arrowSize:a,arrowOffset:s,arrowRadius:l,arrowPosition:c,dir:b.dir,arrowX:d,arrowY:v})})):null});C.displayName="@mantine/core/FloatingArrow"},14870:function(e,t,r){"use strict";function n(e,t){if("rtl"===e&&(t.includes("right")||t.includes("left"))){let[e,r]=t.split("-"),n="right"===e?"left":"right";return void 0===r?n:`${n}-${r}`}return t}r.d(t,{_:function(){return n}})},27347:function(e,t,r){"use strict";r.d(t,{U:function(){return i}});var n=r(67294);function i({open:e,close:t,openDelay:r,closeDelay:i}){let o=(0,n.useRef)(-1),a=(0,n.useRef)(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(a.current)};return(0,n.useEffect)(()=>s,[]),{openDropdown:()=>{s(),0===r?e():o.current=window.setTimeout(e,r)},closeDropdown:()=>{s(),0===i?t():a.current=window.setTimeout(t,i)}}}},30212:function(e,t,r){"use strict";r.d(t,{L:function(){return a}});var n=r(67294),i=r(55863),o=r(37048);function a({opened:e,floating:t,positionDependencies:r}){let[a,s]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current)return(0,i.Me)(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,a]),(0,o.l)(()=>{t.update()},r),(0,o.l)(()=>{s(e=>e+1)},[e])}},20050:function(e,t,r){"use strict";r.d(t,{r:function(){return $}});var n=r(67294),i=r(64761);let[o,a]=(0,r(68216).R)("Grid component was not found in tree");var s=r(37447),l=r(56817),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e};let m=(e,t)=>"content"===e?"auto":"auto"===e?"0px":e?`${100/(t/e)}%`:void 0,g=(e,t,r)=>r||"auto"===e||"content"===e?"unset":m(e,t),v=(e,t)=>{if(e)return"auto"===e||t?1:0},y=(e,t)=>0===e?0:e?`${100/(t/e)}%`:void 0,b=(e,t)=>void 0!==e?t.fn.size({size:e,sizes:t.spacing})/2:void 0;var x=(0,l.k)((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:i,gutterLg:o,gutterXl:a,grow:l,offset:c,offsetXs:u,offsetSm:d,offsetMd:f,offsetLg:p,offsetXl:x,columns:w,span:S,xs:k,sm:j,md:E,lg:O,xl:C,order:I,orderXs:P,orderSm:A,orderMd:T,orderLg:z,orderXl:N})=>({col:h({boxSizing:"border-box",flexGrow:v(S,l),order:I,padding:b(t,e),marginLeft:y(c,w),flexBasis:m(S,w),flexShrink:0,width:"content"===S?"auto":void 0,maxWidth:g(S,w,l)},function({sizes:e,offsets:t,orders:r,theme:n,columns:i,gutters:o,grow:a}){return s.j1.reduce((s,l)=>(s[`@media (min-width: ${n.breakpoints[l]}px)`]={order:r[l],flexBasis:m(e[l],i),padding:b(o[l],n),flexShrink:0,width:"content"===e[l]?"auto":void 0,maxWidth:g(e[l],i,a),marginLeft:y(t[l],i),flexGrow:v(e[l],a)},s),{})}({sizes:{xs:k,sm:j,md:E,lg:O,xl:C},offsets:{xs:u,sm:d,md:f,lg:p,xl:x},orders:{xs:P,sm:A,md:T,lg:z,xl:N},gutters:{xs:r,sm:n,md:i,lg:o,xl:a},theme:e,columns:w,grow:l}))})),w=r(64523),S=Object.defineProperty,k=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))j.call(t,r)&&O(e,r,t[r]);if(k)for(var r of k(t))E.call(t,r)&&O(e,r,t[r]);return e},I=(e,t)=>{var r={};for(var n in e)j.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&k)for(var n of k(e))0>t.indexOf(n)&&E.call(e,n)&&(r[n]=e[n]);return r};let P={},A=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("GridCol",P,e),{children:o,span:s,offset:l,offsetXs:c,offsetSm:u,offsetMd:d,offsetLg:f,offsetXl:p,xs:h,sm:m,md:g,lg:v,xl:y,order:b,orderXs:S,orderSm:k,orderMd:j,orderLg:E,orderXl:O,className:A,id:T,unstyled:z}=r,N=I(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),R=a(),_=s||R.columns,{classes:M,cx:D}=x({gutter:R.gutter,gutterXs:R.gutterXs,gutterSm:R.gutterSm,gutterMd:R.gutterMd,gutterLg:R.gutterLg,gutterXl:R.gutterXl,offset:l,offsetXs:c,offsetSm:u,offsetMd:d,offsetLg:f,offsetXl:p,xs:h,sm:m,md:g,lg:v,xl:y,order:b,orderXs:S,orderSm:k,orderMd:j,orderLg:E,orderXl:O,grow:R.grow,columns:R.columns,span:_},{unstyled:z,name:"Grid"});return!("auto"===_||"content"===_||"number"==typeof _&&_>0&&_%1==0)||_>R.columns?null:n.createElement(w.x,C({className:D(M.col,A),ref:t},N),o)});A.displayName="@mantine/core/Col";var T=Object.defineProperty,z=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))N.call(t,r)&&_(e,r,t[r]);if(z)for(var r of z(t))R.call(t,r)&&_(e,r,t[r]);return e},D=(0,l.k)((e,{justify:t,align:r,gutter:n,gutterXs:i,gutterSm:o,gutterMd:a,gutterLg:l,gutterXl:c})=>{var u;return{root:M({margin:-e.fn.size({size:n,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},(u={xs:i,sm:o,md:a,lg:l,xl:c},s.j1.reduce((t,r)=>(void 0!==u[r]&&(t[`@media (min-width: ${e.breakpoints[r]}px)`]={margin:-e.fn.size({size:u[r],sizes:e.spacing})/2}),t),{})))}}),L=Object.defineProperty,F=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z=(e,t)=>{for(var r in t||(t={}))U.call(t,r)&&H(e,r,t[r]);if(F)for(var r of F(t))B.call(t,r)&&H(e,r,t[r]);return e},W=(e,t)=>{var r={};for(var n in e)U.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&F)for(var n of F(e))0>t.indexOf(n)&&B.call(e,n)&&(r[n]=e[n]);return r};let V={gutter:"md",justify:"flex-start",align:"stretch",columns:12},$=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Grid",V,e),{gutter:a,gutterXs:s,gutterSm:l,gutterMd:c,gutterLg:u,gutterXl:d,children:f,grow:p,justify:h,align:m,columns:g,className:v,id:y,unstyled:b}=r,x=W(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:S,cx:k}=D({gutter:a,justify:h,align:m,gutterXs:s,gutterSm:l,gutterMd:c,gutterLg:u,gutterXl:d},{unstyled:b,name:"Grid"});return n.createElement(o,{value:{gutter:a,gutterXs:s,gutterSm:l,gutterMd:c,gutterLg:u,gutterXl:d,grow:p,columns:g}},n.createElement(w.x,Z({className:k(S.root,v),ref:t},x),f))});$.Col=A,$.displayName="@mantine/core/Grid"},71232:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(67294),i=r(64761),o=r(89893),a=r(64523),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};let h={position:"left",spacing:"md"},m=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Group",h,e),{className:s,position:l,align:c,children:u,noWrap:d,grow:m,spacing:g,unstyled:v}=r,y=p(r,["className","position","align","children","noWrap","grow","spacing","unstyled"]),b=n.Children.toArray(u).filter(Boolean),{classes:x,cx:w}=(0,o.Z)({align:c,grow:m,noWrap:d,spacing:g,position:l,count:b.length},{unstyled:v,name:"Group"});return n.createElement(a.x,f({className:w(x.root,s),ref:t},y),b)});m.displayName="@mantine/core/Group"},89893:function(e,t,r){"use strict";r.d(t,{H:function(){return i}});var n=r(56817);let i={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var o=(0,n.k)((e,{spacing:t,position:r,noWrap:n,grow:o,align:a,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:a||"center",flexWrap:n?"nowrap":"wrap",justifyContent:i[r],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/s}px)`:void 0,flexGrow:o?1:0}}}));t.Z=o},95033:function(e,t,r){"use strict";r.d(t,{y:function(){return I}});var n=r(67294),i=r(64761),o=r(48427),a=r(95117),s=(0,r(56817).k)((e,{color:t})=>({root:{backgroundColor:e.fn.themeColor(t,"dark"===e.colorScheme?5:2),color:"dark"===e.colorScheme?e.colors.dark[9]:"inherit"}})),l=r(64523),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>{var r={};for(var n in e)d.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&f.call(e,n)&&(r[n]=e[n]);return r};let g={color:"yellow"},v=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Mark",g,e),{color:o,className:a,unstyled:c}=r,u=m(r,["color","className","unstyled"]),{classes:d,cx:f}=s({color:o},{unstyled:c,name:"Mark"});return n.createElement(l.x,h({component:"mark",ref:t,className:f(d.root,a)},u))});function y(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}v.displayName="@mantine/core/Mark";var b=Object.defineProperty,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&x)for(var n of x(e))0>t.indexOf(n)&&S.call(e,n)&&(r[n]=e[n]);return r};let O={highlightColor:"yellow"},C=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Highlight",O,e),{children:o,highlight:s,highlightColor:l,highlightStyles:c,unstyled:u}=r,d=E(r,["children","highlight","highlightColor","highlightStyles","unstyled"]),f=function(e,t){if(null==t)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(y):y(t);if(!(Array.isArray(r)?r.filter(e=>e.trim().length>0).length>0:""!==r.trim()))return[{chunk:e,highlighted:!1}];let n="string"==typeof r?r.trim():r.filter(e=>0!==e.trim().length).map(e=>e.trim()).join("|"),i=RegExp(`(${n})`,"gi");return e.split(i).map(e=>({chunk:e,highlighted:i.test(e)})).filter(({chunk:e})=>e)}(o,s);return n.createElement(a.x,j({unstyled:u,ref:t},d),f.map(({chunk:e,highlighted:t},r)=>t?n.createElement(v,{unstyled:u,key:r,color:l,sx:c},e):n.createElement("span",{key:r},e)))});C.displayName="@mantine/core/Highlight";let I=(0,o.F)(C)},6564:function(e,t,r){"use strict";r.d(t,{z:function(){return U}});var n=r(67294),i=r(64761),o=r(91759),a=r(68216);let s={context:"HoverCard component was not found in the tree",children:"HoverCard.Target component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"},[l,c]=(0,a.R)(s.context);var u=r(69328),d=r(40633),f=Object.defineProperty,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r};let b={};function x(e){let t=(0,i.N4)("HoverCardDropdown",b,e),{children:r,onMouseEnter:o,onMouseLeave:a}=t,s=y(t,["children","onMouseEnter","onMouseLeave"]),l=c(),f=(0,u.x)(o,l.openDropdown),p=(0,u.x)(a,l.closeDropdown);return n.createElement(d.J.Dropdown,v({onMouseEnter:f,onMouseLeave:p},s),r)}x.displayName="@mantine/core/HoverCardDropdown";var w=r(24241),S=Object.defineProperty,k=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))j.call(t,r)&&O(e,r,t[r]);if(k)for(var r of k(t))E.call(t,r)&&O(e,r,t[r]);return e},I=(e,t)=>{var r={};for(var n in e)j.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&k)for(var n of k(e))0>t.indexOf(n)&&E.call(e,n)&&(r[n]=e[n]);return r};let P={refProp:"ref"},A=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("HoverCardTarget",P,e),{children:o,refProp:a}=r,l=I(r,["children","refProp"]);if(!(0,w.k)(o))throw Error(s.children);let f=c(),p=(0,u.x)(o.props.onMouseEnter,f.openDropdown),h=(0,u.x)(o.props.onMouseLeave,f.closeDropdown);return n.createElement(d.J.Target,C({refProp:a,ref:t},l),(0,n.cloneElement)(o,{onMouseEnter:p,onMouseLeave:h}))});A.displayName="@mantine/core/HoverCardTarget";var T=r(27347),z=Object.defineProperty,N=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,M=(e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))R.call(t,r)&&M(e,r,t[r]);if(N)for(var r of N(t))_.call(t,r)&&M(e,r,t[r]);return e},L=(e,t)=>{var r={};for(var n in e)R.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&N)for(var n of N(e))0>t.indexOf(n)&&_.call(e,n)&&(r[n]=e[n]);return r};let F={openDelay:0,closeDelay:150,initiallyOpened:!1};function U(e){let t=(0,i.N4)("HoverCard",F,e),{children:r,onOpen:a,onClose:s,openDelay:c,closeDelay:u,initiallyOpened:f}=t,p=L(t,["children","onOpen","onClose","openDelay","closeDelay","initiallyOpened"]),[h,{open:m,close:g}]=(0,o.q)(f,{onClose:s,onOpen:a}),{openDropdown:v,closeDropdown:y}=(0,T.U)({open:m,close:g,openDelay:c,closeDelay:u});return n.createElement(l,{value:{openDropdown:v,closeDropdown:y}},n.createElement(d.J,D({opened:h,__staticSelector:"HoverCard"},p),r))}U.displayName="@mantine/core/HoverCard",U.Target=A,U.Dropdown=x},22870:function(e,t,r){"use strict";r.d(t,{E:function(){return R}});var n=r(67294),i=r(64761),o=r(37048),a=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&u(e,r,t[r]);return e};function f(e){return n.createElement("svg",d({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var p=r(56817),h=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))y.call(t,r)&&x(e,r,t[r]);if(v)for(var r of v(t))b.call(t,r)&&x(e,r,t[r]);return e},S=(e,t)=>m(e,g(t)),k=(0,p.k)((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:S(w({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.size({size:t,sizes:e.radius})}),caption:{color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:S(w({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.size({size:t,sizes:e.radius})})})),j=r(64523),E=r(95117),O=Object.defineProperty,C=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))I.call(t,r)&&A(e,r,t[r]);if(C)for(var r of C(t))P.call(t,r)&&A(e,r,t[r]);return e},z=(e,t)=>{var r={};for(var n in e)I.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&C)for(var n of C(e))0>t.indexOf(n)&&P.call(e,n)&&(r[n]=e[n]);return r};let N={fit:"cover",width:"100%",height:"auto",radius:0},R=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Image",N,e),{className:a,alt:s,src:l,fit:c,width:u,height:d,radius:p,imageProps:h,withPlaceholder:m,placeholder:g,imageRef:v,classNames:y,styles:b,caption:x,unstyled:w,style:S}=r,O=z(r,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style"]),{classes:C,cx:I}=k({radius:p},{classNames:y,styles:b,unstyled:w,name:"Image"}),[P,A]=(0,n.useState)(!l);return(0,o.l)(()=>{A(!l)},[l]),n.createElement(j.x,T({className:I(C.root,a),ref:t,style:T({width:u},S)},O),n.createElement("figure",{className:C.figure},n.createElement("div",{className:C.imageWrapper},n.createElement("img",T({className:C.image,src:l,alt:s,style:{objectFit:c,width:u,height:d},ref:v,onError:e=>{A(!0),"function"==typeof(null==h?void 0:h.onError)&&h.onError(e)}},h)),m&&P&&n.createElement("div",{className:C.placeholder,title:s},g||n.createElement("div",null,n.createElement(f,{style:{width:40,height:40}})))),!!x&&n.createElement(E.x,{component:"figcaption",size:"sm",align:"center",className:C.caption},x)))});R.displayName="@mantine/core/Image"},14821:function(e,t,r){"use strict";r.d(t,{z:function(){return L}});var n=r(67294),i=r(3594),o=r(64761),a=r(70917),s=r(56817),l=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(d)for(var r of d(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>c(e,u(t));let v=e=>(0,a.F4)({from:{boxShadow:`0 0 0.5px 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 0.5px 4.4px ${e}`,opacity:0}});function y(e,t=0){let r={},[n,i]=e.split("-"),o="",a="";return"top"===n&&(r.top=t,a="-50%"),"middle"===n&&(r.top="50%",a="-50%"),"bottom"===n&&(r.bottom=t,a="50%"),"start"===i&&(r.left=t,o="-50%"),"center"===i&&(r.left="50%",o="-50%"),"end"===i&&(r.right=t,o="50%"),r.transform=`translate(${o}, ${a})`,r}var b=(0,s.k)((e,{radius:t,size:r,color:n,position:i,offset:o,inline:a,withBorder:s,withLabel:l,zIndex:c})=>{let{background:u}=e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor});return{root:{position:"relative",display:a?"inline-block":"block"},indicator:g(m({},y(i,o)),{zIndex:c,position:"absolute",[l?"minWidth":"width"]:r,height:r,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:l?`calc(${e.spacing.xs}px / 2)`:0,paddingRight:l?`calc(${e.spacing.xs}px / 2)`:0,borderRadius:e.fn.size({size:t,sizes:e.radius}),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}).background,border:s?`2px solid ${"dark"===e.colorScheme?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${v(u)} 1000ms linear infinite`},common:g(m({},y(i,o)),{position:"absolute",[l?"minWidth":"width"]:r,height:r,borderRadius:e.fn.size({size:t,sizes:e.radius})})}}),x=r(67272);let w=(0,a.F4)({from:{transform:"translateY(-60%)",opacity:0},to:{transform:"translateY(0%)",opacity:1}}),S=(0,a.F4)({from:{transform:"translateY(60%)",opacity:0},to:{transform:"translateY(0%)",opacity:1}}),k=(0,a.F4)({from:{transform:"translateY(0%)",opacity:1},to:{transform:"translateY(-60%)",opacity:0}}),j=(0,a.F4)({from:{transform:"translateY(0%)",opacity:1},to:{transform:"translateY(60%)",opacity:0}});var E=(0,s.k)(()=>({baseNumber:{height:18,width:"0.6em",maxWidth:"0.6em",position:"relative",display:"inline-block"},oldNumberTop:{transform:"translateY(-100%);"},oldNumberBottom:{transform:"translateY(100%);"},oldNumber:{display:"inline-block",opacity:0,position:"absolute",left:0,right:0},currentNumberTop:{transform:"translateY(0%);"},currentNumber:{display:"inline-block",opacity:1,position:"absolute",top:0,bottom:0,left:0,right:0},currentNumberScrollDown:{animation:`${w} .2s cubic-bezier(0,0,.2, 1)`,animationIterationCount:1},currentNumberScrollUp:{animation:`${S} .2s cubic-bezier(0,0,.2, 1)`,animationIterationCount:1},oldNumberScrollUp:{animation:`${k} .2s cubic-bezier(0,0,.2, 1)`,animationIterationCount:1},oldNumberScrollDown:{animation:`${j} .2s cubic-bezier(0,0,.2, 1)`,animationIterationCount:1}}));let O=(0,n.forwardRef)((e,t)=>{let[r,i]=(0,n.useState)(e.value),[o,a]=(0,n.useState)(e.value),[s,l]=(0,n.useState)("up"),[c,u]=(0,n.useState)(!1),d=(0,x.D)(e.value),f=e=>{u(!0),l(e),setTimeout(()=>{u(!1)},180)},p=()=>{let{newOriginalNumber:t,oldOriginalNumber:r}=e;null!=t&&null!=r&&(t>r?f("up"):t{i(d),a(e.value),p()},[e.value,d]);let{classes:h,cx:m}=E(null,{name:"MachineNumber"}),g=(0,n.useMemo)(()=>c?"up"===s?h.currentNumberScrollUp:h.currentNumberScrollDown:null,[c,s]),v=(0,n.useMemo)(()=>c?"up"===s?h.oldNumberScrollUp:h.oldNumberScrollDown:null,[c,s]);return n.createElement("span",{ref:t,className:h.baseNumber},r&&n.createElement("span",{className:m(h.oldNumber,h.currentNumberTop,v)},r)||null,n.createElement("span",null,n.createElement("span",{className:m(h.currentNumber,g)},o)),r&&n.createElement("span",{className:m(h.oldNumber,h.oldNumberBottom,v)},r)||null)});var C=(0,s.k)(()=>({base:{display:"flex",alignItems:"center",overflow:"hidden"}}));let I=(0,n.forwardRef)(({value:e=0,max:t},r)=>{let[i,o]=(0,n.useState)(),[a,s]=(0,n.useState)(),l=(0,x.D)(e);(0,n.useEffect)(()=>{"string"==typeof e?(o(void 0),s(void 0)):("string"==typeof l?o(void 0):o(l),s(e))},[e,l]);let c=(0,n.useMemo)(()=>{if("string"==typeof e)return[];if(e<1)return[0];let r=[],n=e;for("number"==typeof t&&(n=Math.min(t,n));n>=1;)r.push(n%10),n/=10,n=Math.floor(n);return r.reverse(),r},[e,t]),{classes:u}=C(null,{name:"machine"});return"string"==typeof e?n.createElement("span",{ref:r},e):n.createElement("span",{ref:r,className:u.base},c.map((e,t)=>n.createElement(O,{key:c.length-t-1,value:e,oldOriginalNumber:i,newOriginalNumber:a})),"number"==typeof t&&e>t&&n.createElement("span",null,"+"))});var P=r(64523),A=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r};let D={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,showZero:!0,processing:!1,dot:!0,size:10,overflowCount:99,radius:1e3,zIndex:(0,i.w)("app")},L=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("Indicator",D,e),{children:i,position:a,offset:s,size:l,radius:c,inline:u,withBorder:d,className:f,color:p,dot:h,styles:m,label:g,overflowCount:v,showZero:y,classNames:x,disabled:w,zIndex:S,unstyled:k,processing:j}=r,E=M(r,["children","position","offset","size","radius","inline","withBorder","className","color","dot","styles","label","overflowCount","showZero","classNames","disabled","zIndex","unstyled","processing"]),{classes:O,cx:C}=b({position:a,offset:s,size:l,radius:c,inline:u,color:p,withBorder:d,zIndex:S,withLabel:!!g},{name:"Indicator",classNames:x,styles:m,unstyled:k}),A=(0,n.useMemo)(()=>"number"==typeof g?n.createElement(I,{value:g,max:v}):g,[g,v]),T=(0,n.useMemo)(()=>!w&&(h||null!=g&&!(g<=0&&!y)),[w,g,y]);return n.createElement(P.x,_({ref:t,className:C(O.root,f)},E),T&&n.createElement(n.Fragment,null,n.createElement("div",{className:C(O.indicator,O.common)},A),j&&n.createElement("div",{className:C(O.processing,O.common)})),i)});L.displayName="@mantine/core/Indicator"},4846:function(e,t,r){"use strict";r.d(t,{Z:function(){return E}});var n=r(67294),i=r(56817),o=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>a(e,s(t));let h={xs:16,sm:20,md:24,lg:30,xl:36};var m=(0,i.k)((e,{labelPosition:t,size:r})=>({root:{},body:{display:"flex"},labelWrapper:p(f({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:e.fn.size({size:r,sizes:e.fontSizes}),lineHeight:`${e.fn.size({size:r,sizes:h})}px`,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,cursor:e.cursorType,order:"left"===t?1:2}),description:{marginTop:`calc(${e.spacing.xs}px / 2)`,["left"===t?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs}px / 2)`,["left"===t?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,["left"===t?"paddingRight":"paddingLeft"]:e.spacing.sm,"&[data-disabled]":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}}})),g=r(64523),v=r(94151),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};function E(e){var{__staticSelector:t,className:r,classNames:i,styles:o,unstyled:a,children:s,label:l,description:c,id:u,disabled:d,error:f,size:p,labelPosition:h}=e,y=j(e,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition"]);let{classes:b,cx:x}=m({size:p,labelPosition:h},{name:t,styles:o,classNames:i,unstyled:a});return n.createElement(g.x,k({className:x(b.root,r)},y),n.createElement("div",{className:x(b.body)},s,n.createElement("div",{className:b.labelWrapper},l&&n.createElement("label",{className:b.label,"data-disabled":d||void 0,htmlFor:u},l),c&&n.createElement(v.I.Description,{className:b.description},c),f&&"boolean"!==f&&n.createElement(v.I.Error,{className:b.error},f))))}E.displayName="@mantine/core/InlineInput"},94151:function(e,t,r){"use strict";r.d(t,{I:function(){return eR}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=(0,a.k)((e,{size:t})=>({label:{display:"inline-block",fontSize:e.fn.size({size:t,sizes:e.fontSizes}),fontWeight:500,color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}})),l=r(64523),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>{var r={};for(var n in e)d.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&f.call(e,n)&&(r[n]=e[n]);return r};let g={labelElement:"label",size:"sm"},v=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("InputLabel",g,e),{labelElement:o,children:a,required:c,size:u,classNames:d,styles:f,unstyled:p,className:v,htmlFor:y,__staticSelector:b}=r,x=m(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector"]),{classes:w,cx:S}=s({size:u},{name:["InputWrapper",b],classNames:d,styles:f,unstyled:p});return n.createElement(l.x,h({component:o,ref:t,className:S(w.label,v),htmlFor:"label"===o?y:void 0},x),a,c&&n.createElement("span",{className:w.required,"aria-hidden":!0}," *"))});v.displayName="@mantine/core/InputLabel";var y=(0,a.k)((e,{size:t})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:e.fn.size({size:t,sizes:e.fontSizes})-2,lineHeight:1.2,display:"block"}})),b=r(95117),x=Object.defineProperty,w=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&j(e,r,t[r]);if(w)for(var r of w(t))k.call(t,r)&&j(e,r,t[r]);return e},O=(e,t)=>{var r={};for(var n in e)S.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&w)for(var n of w(e))0>t.indexOf(n)&&k.call(e,n)&&(r[n]=e[n]);return r};let C={size:"sm"},I=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("InputError",C,e),{children:o,className:a,classNames:s,styles:l,unstyled:c,size:u,__staticSelector:d}=r,f=O(r,["children","className","classNames","styles","unstyled","size","__staticSelector"]),{classes:p,cx:h}=y({size:u},{name:["InputWrapper",d],classNames:s,styles:l,unstyled:c});return n.createElement(b.x,E({className:h(p.error,a),ref:t},f),o)});I.displayName="@mantine/core/InputError";var P=(0,a.k)((e,{size:t})=>({description:{wordBreak:"break-word",color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],fontSize:e.fn.size({size:t,sizes:e.fontSizes})-2,lineHeight:1.2,display:"block"}})),A=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r};let D={size:"sm"},L=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("InputDescription",D,e),{children:o,className:a,classNames:s,styles:l,unstyled:c,size:u,__staticSelector:d}=r,f=M(r,["children","className","classNames","styles","unstyled","size","__staticSelector"]),{classes:p,cx:h}=P({size:u},{name:["InputWrapper",d],classNames:s,styles:l,unstyled:c});return n.createElement(b.x,_({color:"dimmed",className:h(p.description,a),ref:t,unstyled:c},f),o)});L.displayName="@mantine/core/InputDescription";let F=(0,n.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),U=F.Provider,B=()=>(0,n.useContext)(F);var H=Object.defineProperty,Z=Object.defineProperties,W=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,G=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K=(e,t)=>{for(var r in t||(t={}))$.call(t,r)&&G(e,r,t[r]);if(V)for(var r of V(t))q.call(t,r)&&G(e,r,t[r]);return e},X=(e,t)=>Z(e,W(t)),J=(0,a.k)(e=>({root:X(K({},e.fn.fontStyles()),{lineHeight:e.lineHeight})})),Y=Object.defineProperty,Q=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,ei=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eo=(e,t)=>{for(var r in t||(t={}))er.call(t,r)&&ei(e,r,t[r]);if(et)for(var r of et(t))en.call(t,r)&&ei(e,r,t[r]);return e},ea=(e,t)=>Q(e,ee(t)),es=(e,t)=>{var r={};for(var n in e)er.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&et)for(var n of et(e))0>t.indexOf(n)&&en.call(e,n)&&(r[n]=e[n]);return r};let el={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},ec=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("InputWrapper",el,e),{className:o,label:a,children:s,required:c,id:u,error:d,description:f,labelElement:p,labelProps:h,descriptionProps:m,errorProps:g,classNames:y,styles:b,size:x,inputContainer:w,__staticSelector:S,unstyled:k,inputWrapperOrder:j,withAsterisk:E}=r,O=es(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk"]),{classes:C,cx:P}=J(null,{classNames:y,styles:b,name:["InputWrapper",S],unstyled:k}),A={classNames:y,styles:b,unstyled:k,size:x,__staticSelector:S},T=u?`${u}-error`:null==g?void 0:g.id,z=u?`${u}-description`:null==m?void 0:m.id,N=!!d&&"boolean"!=typeof d,R=`${N?T:""} ${f?z:""}`,_=R.trim().length>0?R.trim():void 0,M=a&&n.createElement(v,eo(eo({key:"label",labelElement:p,id:u?`${u}-label`:void 0,htmlFor:u,required:"boolean"==typeof E?E:c},A),h),a),D=f&&n.createElement(L,ea(eo(eo({key:"description"},m),A),{size:(null==m?void 0:m.size)||A.size,id:(null==m?void 0:m.id)||z}),f),F=n.createElement(n.Fragment,{key:"input"},w(s)),B="boolean"!=typeof d&&d&&n.createElement(I,ea(eo(eo({},g),A),{size:(null==g?void 0:g.size)||A.size,key:"error",id:(null==g?void 0:g.id)||T}),d),H=j.map(e=>{switch(e){case"label":return M;case"input":return F;case"description":return D;case"error":return B;default:return null}});return n.createElement(U,{value:eo({describedBy:_},function(e,{hasDescription:t,hasError:r}){let n=e.findIndex(e=>"input"===e),i=e[n-1],o=e[n+1];return{offsetBottom:t&&"description"===o||r&&"error"===o,offsetTop:t&&"description"===i||r&&"error"===i}}(j,{hasDescription:!!D,hasError:!!B}))},n.createElement(l.x,eo({className:P(C.root,o),ref:t},O),H))});ec.displayName="@mantine/core/InputWrapper";var eu=r(97818),ed=Object.defineProperty,ef=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,em=(e,t,r)=>t in e?ed(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eg=(e,t)=>{for(var r in t||(t={}))ep.call(t,r)&&em(e,r,t[r]);if(ef)for(var r of ef(t))eh.call(t,r)&&em(e,r,t[r]);return e},ev=(e,t)=>{var r={};for(var n in e)ep.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ef)for(var n of ef(e))0>t.indexOf(n)&&eh.call(e,n)&&(r[n]=e[n]);return r};let ey={},eb=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("InputPlaceholder",ey,e),{sx:o}=r,a=ev(r,["sx"]);return n.createElement(l.x,eg({component:"span",sx:[e=>e.fn.placeholderStyles(),...(0,eu.R)(o)],ref:t},a))});eb.displayName="@mantine/core/InputPlaceholder";var ex=r(35227),ew=r(12756),eS=Object.defineProperty,ek=Object.defineProperties,ej=Object.getOwnPropertyDescriptors,eE=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,eC=Object.prototype.propertyIsEnumerable,eI=(e,t,r)=>t in e?eS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eP=(e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&eI(e,r,t[r]);if(eE)for(var r of eE(t))eC.call(t,r)&&eI(e,r,t[r]);return e},eA=(e,t)=>ek(e,ej(t)),eT=(e,t)=>{var r={};for(var n in e)eO.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eE)for(var n of eE(e))0>t.indexOf(n)&&eC.call(e,n)&&(r[n]=e[n]);return r};let ez={rightSectionWidth:36,size:"sm",variant:"default"},eN=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Input",ez,e),{className:o,invalid:a,required:s,disabled:c,variant:u,icon:d,style:f,rightSectionWidth:p,iconWidth:h,rightSection:m,rightSectionProps:g,radius:v,size:y,wrapperProps:b,classNames:x,styles:w,__staticSelector:S,multiline:k,sx:j,unstyled:E,pointer:O}=r,C=eT(r,["className","invalid","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:I,offsetTop:P,describedBy:A}=B(),{classes:T,cx:z}=(0,ex.Z)({radius:v,size:y,multiline:k,variant:u,invalid:a,rightSectionWidth:p,iconWidth:h,withRightSection:!!m,offsetBottom:I,offsetTop:P,pointer:O},{classNames:x,styles:w,name:["Input",S],unstyled:E}),{systemStyles:N,rest:R}=(0,ew.x)(C);return n.createElement(l.x,eP(eP({className:z(T.wrapper,o),sx:j,style:f},N),b),d&&n.createElement("div",{className:T.icon},d),n.createElement(l.x,eA(eP({component:"input"},R),{ref:t,required:s,"aria-invalid":a,"aria-describedby":A,disabled:c,className:z(T[`${u}Variant`],T.input,{[T.withIcon]:d,[T.invalid]:a,[T.disabled]:c})})),m&&n.createElement("div",eA(eP({},g),{className:T.rightSection}),m))});eN.displayName="@mantine/core/Input",eN.Wrapper=ec,eN.Label=v,eN.Description=L,eN.Error=I,eN.Placeholder=eb;let eR=(0,o.F)(eN)},35227:function(e,t,r){"use strict";r.d(t,{J:function(){return p}});var n=r(56817),i=Object.defineProperty,o=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&u(e,r,t[r]);return e},f=(e,t)=>o(e,a(t));let p={xs:30,sm:36,md:42,lg:50,xl:60};var h=(0,n.k)((e,{size:t,multiline:r,radius:n,variant:i,invalid:o,rightSectionWidth:a,withRightSection:s,iconWidth:l,offsetBottom:c,offsetTop:u,pointer:h})=>{let m=e.fn.variant({variant:"filled",color:"red"}).background,g="default"===i||"filled"===i?{minHeight:e.fn.size({size:t,sizes:p}),paddingLeft:e.fn.size({size:t,sizes:p})/3,paddingRight:s?a:e.fn.size({size:t,sizes:p})/3,borderRadius:e.fn.radius(n)}:null;return{wrapper:{position:"relative",marginTop:u?`calc(${e.spacing.xs}px / 2)`:void 0,marginBottom:c?`calc(${e.spacing.xs}px / 2)`:void 0},input:d(f(d(f(d({},e.fn.fontStyles()),{height:r?"unstyled"===i?void 0:"auto":e.fn.size({size:t,sizes:p}),WebkitTapHighlightColor:"transparent",lineHeight:r?e.lineHeight:`${e.fn.size({size:t,sizes:p})-2}px`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:e.fn.size({size:t,sizes:e.fontSizes}),width:"100%",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:h?"pointer":void 0}),g),{"&:disabled":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed","&::placeholder":{color:e.colors.dark[2]}},"&::placeholder":f(d({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),function({theme:e,variant:t}){return"default"===t?{border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:"filled"===t?{border:"1px solid transparent",backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:28,outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}}({theme:e,variant:i})),withIcon:{paddingLeft:"number"==typeof l?l:e.fn.size({size:t,sizes:p})},invalid:{color:m,borderColor:m,"&::placeholder":{opacity:1,color:m}},disabled:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed","&::placeholder":{color:e.colors.dark[2]}},icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:"number"==typeof l?l:e.fn.size({size:t,sizes:p}),color:o?e.colors.red["dark"===e.colorScheme?6:7]:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:a}}});t.Z=h},66261:function(e,t,r){"use strict";r.d(t,{k:function(){return g}});var n=r(64761),i=r(36289),o=r(12756),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};function g(e,t,r){let a=(0,n.N4)(e,t,r),{label:s,description:l,error:c,required:u,classNames:d,styles:f,className:g,unstyled:v,__staticSelector:y,sx:b,errorProps:x,labelProps:w,descriptionProps:S,wrapperProps:k,id:j,size:E,style:O,inputContainer:C,inputWrapperOrder:I,withAsterisk:P}=a,A=m(a,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk"]),T=(0,i.M)(j),{systemStyles:z,rest:N}=(0,o.x)(A),R=p({label:s,description:l,error:c,required:u,classNames:d,className:g,__staticSelector:y,sx:b,errorProps:x,labelProps:w,descriptionProps:S,unstyled:v,styles:f,id:T,size:E,style:O,inputContainer:C,inputWrapperOrder:I,withAsterisk:P},k);return h(p({},N),{classNames:d,styles:f,unstyled:v,wrapperProps:p(p({},R),z),inputProps:{required:u,classNames:d,styles:f,unstyled:v,id:T,size:E,__staticSelector:y,invalid:!!c}})}},63456:function(e,t,r){"use strict";r.d(t,{q:function(){return x}});var n=r(67294),i=r(15851),o=r(64761);function a(e){if("string"==typeof e&&0===e.trim().length)return!0;try{return JSON.parse(e),!0}catch(e){return!1}}var s=(0,r(56817).k)((e,{size:t})=>({input:{fontFamily:e.fontFamilyMonospace,fontSize:e.fn.size({size:t,sizes:e.fontSizes})-2}})),l=r(52615),c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(f)for(var r of f(t))h.call(t,r)&&m(e,r,t[r]);return e},v=(e,t)=>u(e,d(t)),y=(e,t)=>{var r={};for(var n in e)p.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&f)for(var n of f(e))0>t.indexOf(n)&&h.call(e,n)&&(r[n]=e[n]);return r};let b={formatOnBlur:!1,size:"sm"},x=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("JsonInput",b,e),{value:c,defaultValue:u,onChange:d,onFocus:f,onBlur:p,error:h,formatOnBlur:m,size:x,validationError:w,classNames:S,unstyled:k,readOnly:j}=r,E=y(r,["value","defaultValue","onChange","onFocus","onBlur","error","formatOnBlur","size","validationError","classNames","unstyled","readOnly"]),{classes:O,cx:C}=s({size:x},{name:"JsonInput",unstyled:k}),[I,P]=(0,i.C)({value:c,defaultValue:u,finalValue:"",onChange:d}),[A,T]=(0,n.useState)(a(I));return n.createElement(l.g,g({value:I,onChange:e=>P(e.currentTarget.value),onFocus:e=>{"function"==typeof f&&f(e),T(!0)},onBlur:e=>{"function"==typeof p&&p(e);let t=a(e.currentTarget.value);t&&""!==e.currentTarget.value.trim()&&P(JSON.stringify(JSON.parse(e.currentTarget.value),null,2)),T(t)},error:A?h:w||!0,__staticSelector:"JsonInput",classNames:v(g({},S),{input:C(O.input,null==S?void 0:S.input)}),autoComplete:"nope",ref:t,unstyled:k,readOnly:j},E))});x.displayName="@mantine/core/JsonInput"},8949:function(e,t,r){"use strict";r.d(t,{a:function(){return D}});var n=r(67294),i=r(64761);let[o,a]=(0,r(68216).R)("List component was not found in tree");var s=r(56817),l=(0,s.k)((e,{spacing:t,center:r},n)=>({itemWrapper:{ref:n("itemWrapper"),display:"inline-flex",flexDirection:"column",whiteSpace:"normal"},item:{whiteSpace:"nowrap",lineHeight:r?1:e.lineHeight,"&:not(:first-of-type)":{marginTop:e.fn.size({size:t,sizes:e.spacing})}},withIcon:{listStyle:"none",[`& .${n("itemWrapper")}`]:{display:"inline-flex",alignItems:r?"center":"flex-start",flexDirection:"row"}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}})),c=r(64523),u=Object.defineProperty,d=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(d)for(var r of d(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>{var r={};for(var n in e)f.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&d)for(var n of d(e))0>t.indexOf(n)&&p.call(e,n)&&(r[n]=e[n]);return r};let v={},y=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("ListItem",v,e),{className:o,children:s,icon:u}=r,d=g(r,["className","children","icon"]),{icon:f,spacing:p,center:h,listStyleType:y,size:b,withPadding:x,classNames:w,styles:S,unstyled:k}=a(),j=u||f,{classes:E,cx:O}=l({withPadding:x,size:b,listStyleType:y,center:h,spacing:p},{classNames:w,styles:S,unstyled:k,name:"List"});return n.createElement(c.x,m({component:"li",className:O(E.item,{[E.withIcon]:j},o),ref:t},d),n.createElement("div",{className:E.itemWrapper},j&&n.createElement("span",{className:E.itemIcon},j),n.createElement("span",null,s)))});y.displayName="@mantine/core/ListItem";var b=Object.defineProperty,x=Object.defineProperties,w=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,E=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t)=>{for(var r in t||(t={}))k.call(t,r)&&E(e,r,t[r]);if(S)for(var r of S(t))j.call(t,r)&&E(e,r,t[r]);return e},C=(e,t)=>x(e,w(t)),I=(0,s.k)((e,{withPadding:t,size:r,listStyleType:n})=>({root:C(O({},e.fn.fontStyles()),{listStyleType:n,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,fontSize:e.fn.size({size:r,sizes:e.fontSizes}),lineHeight:e.lineHeight,margin:0,paddingLeft:t?e.spacing.xl:0,listStylePosition:"inside"})})),P=Object.defineProperty,A=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,N=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))T.call(t,r)&&N(e,r,t[r]);if(A)for(var r of A(t))z.call(t,r)&&N(e,r,t[r]);return e},_=(e,t)=>{var r={};for(var n in e)T.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&A)for(var n of A(e))0>t.indexOf(n)&&z.call(e,n)&&(r[n]=e[n]);return r};let M={type:"unordered",size:"md",spacing:0},D=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("List",M,e),{children:a,type:s,size:l,listStyleType:u,withPadding:d,center:f,spacing:p,icon:h,className:m,styles:g,classNames:v,unstyled:y}=r,b=_(r,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled"]),{classes:x,cx:w}=I({withPadding:d,size:l,listStyleType:u,center:f,spacing:p},{classNames:v,styles:g,name:"List",unstyled:y});return n.createElement(o,{value:{spacing:p,center:f,icon:h,listStyleType:u,size:l,withPadding:d,classNames:v,styles:g,unstyled:y}},n.createElement(c.x,R({component:"unordered"===s?"ul":"ol",className:w(x.root,m),ref:t},b),a))});D.Item=y,D.displayName="@mantine/core/List"},20966:function(e,t,r){"use strict";r.d(t,{a:function(){return D}});var n=r(67294),i=r(64761),o=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r},f=Object.defineProperty,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r},b=Object.defineProperty,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&x)for(var n of x(e))0>t.indexOf(n)&&S.call(e,n)&&(r[n]=e[n]);return r},O=r(64523),C=Object.defineProperty,I=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,T=(e,t,r)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&T(e,r,t[r]);if(I)for(var r of I(t))A.call(t,r)&&T(e,r,t[r]);return e},N=(e,t)=>{var r={};for(var n in e)P.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&I)for(var n of I(e))0>t.indexOf(n)&&A.call(e,n)&&(r[n]=e[n]);return r};let R={bars:function(e){var{size:t,color:r}=e,i=d(e,["size","color"]);return n.createElement("svg",u({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${t}px`},i),n.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},n.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},n.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},n.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},n.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},n.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))},oval:function(e){var{size:t,color:r}=e,i=y(e,["size","color"]);return n.createElement("svg",v({width:`${t}px`,height:`${t}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},i),n.createElement("g",{fill:"none",fillRule:"evenodd"},n.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},n.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),n.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},n.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))},dots:function(e){var{size:t,color:r}=e,i=E(e,["size","color"]);return n.createElement("svg",j({width:`${t}px`,height:`${t/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},i),n.createElement("circle",{cx:"15",cy:"15",r:"15"},n.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},n.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),n.createElement("circle",{cx:"105",cy:"15",r:"15"},n.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),n.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}},_={xs:18,sm:22,md:36,lg:44,xl:58},M={size:"md"};function D(e){let t=(0,i.N4)("Loader",M,e),{size:r,color:o,variant:a}=t,s=N(t,["size","color","variant"]),l=(0,i.rZ)(),c=a in R?a:l.loader;return n.createElement(O.x,z({role:"presentation",component:R[c]||R.bars,size:l.fn.size({size:r,sizes:_}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:o||l.primaryColor}).background},s))}D.displayName="@mantine/core/Loader"},49737:function(e,t,r){"use strict";r.d(t,{f:function(){return S}});var n=r(67294),i=r(3594),o=r(64761),a=(0,r(56817).k)({root:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}}),s=r(97688),l=r(64523),c=r(20966),u=r(17577),d=Object.defineProperty,f=Object.defineProperties,p=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>f(e,p(t)),x=(e,t)=>{var r={};for(var n in e)m.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&h)for(var n of h(e))0>t.indexOf(n)&&g.call(e,n)&&(r[n]=e[n]);return r};let w={overlayOpacity:.75,transitionDuration:0,zIndex:(0,i.w)("overlay")},S=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("LoadingOverlay",w,e),{className:i,visible:d,loaderProps:f,overlayOpacity:p,overlayColor:h,transitionDuration:m,exitTransitionDuration:g,zIndex:v,style:S,loader:k,radius:j,overlayBlur:E,unstyled:O}=r,C=x(r,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled"]),{classes:I,cx:P,theme:A}=a(null,{name:"LoadingOverlay",unstyled:O}),T=`calc(${v} + 1)`;return n.createElement(s.u,{duration:m,exitDuration:g,mounted:d,transition:"fade"},e=>n.createElement(l.x,y({className:P(I.root,i),style:b(y(y({},e),S),{zIndex:v}),ref:t},C),k?n.createElement("div",{style:{zIndex:T}},k):n.createElement(c.a,y({style:{zIndex:T}},f)),n.createElement(u.a,{opacity:p,zIndex:v,radius:j,blur:E,unstyled:O,color:h||("dark"===A.colorScheme?A.colors.dark[5]:A.white)})))});S.displayName="@mantine/core/LoadingOverlay"},88002:function(e,t,r){"use strict";r.d(t,{v:function(){return eB}});var n=r(67294),i=r(38523),o=r(15851),a=r(37048),s=r(64761),l=r(68216);let c={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"},[u,d]=(0,l.R)(c.context);var f=r(56817),p=(0,f.k)(e=>({divider:{margin:`calc(${e.spacing.xs}px / 2) -5px`,borderTop:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]}`}})),h=r(64523),m=Object.defineProperty,g=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(e,t,r)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&b(e,r,t[r]);if(g)for(var r of g(t))y.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>{var r={};for(var n in e)v.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&g)for(var n of g(e))0>t.indexOf(n)&&y.call(e,n)&&(r[n]=e[n]);return r};let S={},k=(0,n.forwardRef)((e,t)=>{let r=(0,s.N4)("MenuDivider",S,e),{children:i,className:o}=r,a=w(r,["children","className"]),{classNames:l,styles:c,unstyled:u}=d(),{classes:f,cx:m}=p(null,{name:"Menu",classNames:l,styles:c,unstyled:u});return n.createElement(h.x,x({className:m(f.divider,o),ref:t},a))});k.displayName="@mantine/core/MenuDivider";var j=r(69328),E=r(40633),O=Object.defineProperty,C=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))I.call(t,r)&&A(e,r,t[r]);if(C)for(var r of C(t))P.call(t,r)&&A(e,r,t[r]);return e},z=(e,t)=>{var r={};for(var n in e)I.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&C)for(var n of C(e))0>t.indexOf(n)&&P.call(e,n)&&(r[n]=e[n]);return r};let N={};function R(e){let t=(0,s.N4)("MenuDropdown",N,e),{children:r,onMouseEnter:i,onMouseLeave:o}=t,a=z(t,["children","onMouseEnter","onMouseLeave"]),l=(0,n.useRef)(),c=d(),u=(0,j.x)(i,()=>"hover"===c.trigger&&c.openDropdown()),f=(0,j.x)(o,()=>"hover"===c.trigger&&c.closeDropdown());return n.createElement(E.J.Dropdown,T({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},a),n.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:e=>{("ArrowUp"===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),l.current.querySelectorAll("[data-menu-item]")[0].focus())},ref:l,style:{outline:0}},r))}R.displayName="@mantine/core/MenuDropdown";var _=r(16650),M=r(48427),D=r(80665),L=Object.defineProperty,F=Object.defineProperties,U=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,W=(e,t,r)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&W(e,r,t[r]);if(B)for(var r of B(t))Z.call(t,r)&&W(e,r,t[r]);return e},$=(e,t)=>F(e,U(t)),q=(0,f.k)((e,{color:t,radius:r})=>({item:$(V({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs}px ${e.spacing.sm}px`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:"dark"===e.colorScheme?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:"dark"===e.colorScheme?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}})),G=Object.defineProperty,K=Object.defineProperties,X=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,ee=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,et=(e,t)=>{for(var r in t||(t={}))Y.call(t,r)&&ee(e,r,t[r]);if(J)for(var r of J(t))Q.call(t,r)&&ee(e,r,t[r]);return e},er=(e,t)=>K(e,X(t)),en=(e,t)=>{var r={};for(var n in e)Y.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&J)for(var n of J(e))0>t.indexOf(n)&&Q.call(e,n)&&(r[n]=e[n]);return r};let ei={},eo=(0,n.forwardRef)((e,t)=>{let r=(0,s.N4)("MenuItem",ei,e),{children:i,className:o,color:a,closeMenuOnClick:l,icon:c,rightSection:u}=r,f=en(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),p=d(),{classes:m,cx:g,theme:v}=q({radius:p.radius,color:a},{name:"Menu",classNames:p.classNames,styles:p.styles,unstyled:p.unstyled}),y=(0,n.useRef)(),b=p.getItemIndex(y.current),x=(0,j.x)(f.onMouseLeave,()=>p.setHovered(-1)),w=(0,j.x)(f.onMouseEnter,()=>p.setHovered(p.getItemIndex(y.current))),S=(0,j.x)(f.onClick,()=>{"boolean"==typeof l?l&&p.closeDropdownImmediately():p.closeOnItemClick&&p.closeDropdownImmediately()}),k=(0,j.x)(f.onFocus,()=>p.setHovered(p.getItemIndex(y.current)));return n.createElement(h.x,er(et({component:"button",type:"button"},f),{tabIndex:-1,onFocus:k,className:g(m.item,o),ref:(0,D.Y)(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":p.hovered===b||void 0,onMouseEnter:w,onMouseLeave:x,onClick:S,onKeyDown:(0,_.R)({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:p.loop,dir:v.dir,orientation:"vertical",onKeyDown:f.onKeydown})}),c&&n.createElement("div",{className:m.itemIcon},c),i&&n.createElement("div",{className:m.itemLabel},i),u&&n.createElement("div",{className:m.itemRightSection},u))});eo.displayName="@mantine/core/MenuItem";let ea=(0,M.F)(eo);var es=(0,f.k)(e=>({label:{color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs}px / 2) ${e.spacing.sm}px`,cursor:"default"}})),el=r(95117),ec=Object.defineProperty,eu=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,ef=Object.prototype.propertyIsEnumerable,ep=(e,t,r)=>t in e?ec(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eh=(e,t)=>{for(var r in t||(t={}))ed.call(t,r)&&ep(e,r,t[r]);if(eu)for(var r of eu(t))ef.call(t,r)&&ep(e,r,t[r]);return e},em=(e,t)=>{var r={};for(var n in e)ed.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eu)for(var n of eu(e))0>t.indexOf(n)&&ef.call(e,n)&&(r[n]=e[n]);return r};let eg={},ev=(0,n.forwardRef)((e,t)=>{let r=(0,s.N4)("MenuLabel",eg,e),{children:i,className:o}=r,a=em(r,["children","className"]),{classNames:l,styles:c,unstyled:u}=d(),{classes:f,cx:p}=es(null,{name:"Menu",classNames:l,styles:c,unstyled:u});return n.createElement(el.x,eh({className:p(f.label,o),ref:t},a),i)});ev.displayName="@mantine/core/MenuLabel";var ey=r(24241),eb=Object.defineProperty,ex=Object.getOwnPropertySymbols,ew=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,ek=(e,t,r)=>t in e?eb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ej=(e,t)=>{for(var r in t||(t={}))ew.call(t,r)&&ek(e,r,t[r]);if(ex)for(var r of ex(t))eS.call(t,r)&&ek(e,r,t[r]);return e},eE=(e,t)=>{var r={};for(var n in e)ew.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ex)for(var n of ex(e))0>t.indexOf(n)&&eS.call(e,n)&&(r[n]=e[n]);return r};let eO={refProp:"ref"},eC=(0,n.forwardRef)((e,t)=>{let r=(0,s.N4)("MenuTarget",eO,e),{children:i,refProp:o}=r,a=eE(r,["children","refProp"]);if(!(0,ey.k)(i))throw Error(c.children);let l=d(),u=(0,j.x)(i.props.onClick,()=>"click"===l.trigger&&l.toggleDropdown()),f=(0,j.x)(i.props.onMouseEnter,()=>"hover"===l.trigger&&l.openDropdown()),p=(0,j.x)(i.props.onMouseLeave,()=>"hover"===l.trigger&&l.closeDropdown());return n.createElement(E.J.Target,ej({refProp:o,popupType:"menu",ref:t},a),(0,n.cloneElement)(i,{onClick:u,onMouseEnter:f,onMouseLeave:p,"data-expanded":!!l.opened||void 0}))});eC.displayName="@mantine/core/MenuTarget";var eI=(0,f.k)({dropdown:{padding:4}}),eP=r(27347),eA=Object.defineProperty,eT=Object.defineProperties,ez=Object.getOwnPropertyDescriptors,eN=Object.getOwnPropertySymbols,eR=Object.prototype.hasOwnProperty,e_=Object.prototype.propertyIsEnumerable,eM=(e,t,r)=>t in e?eA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eD=(e,t)=>{for(var r in t||(t={}))eR.call(t,r)&&eM(e,r,t[r]);if(eN)for(var r of eN(t))e_.call(t,r)&&eM(e,r,t[r]);return e},eL=(e,t)=>eT(e,ez(t)),eF=(e,t)=>{var r={};for(var n in e)eR.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eN)for(var n of eN(e))0>t.indexOf(n)&&e_.call(e,n)&&(r[n]=e[n]);return r};let eU={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function eB(e){let t=(0,s.N4)("Menu",eU,e),{children:r,onOpen:l,onClose:c,opened:d,defaultOpened:f,onChange:p,closeOnItemClick:h,loop:m,closeOnEscape:g,trigger:v,openDelay:y,closeDelay:b,classNames:x,styles:w,unstyled:S,radius:k}=t,j=eF(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius"]),{classes:O,cx:C}=eI(),[I,{setHovered:P,resetHovered:A}]=function(){let[e,t]=(0,n.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}(),[T,z]=(0,o.C)({value:d,defaultValue:f,finalValue:!1,onChange:p}),N=()=>{z(!1),T&&(null==c||c())},R=()=>{z(!0),T||null==l||l()},{openDropdown:_,closeDropdown:M}=(0,eP.U)({open:R,close:N,closeDelay:b,openDelay:y});return(0,a.l)(()=>{A()},[T]),n.createElement(u,{value:{opened:T,toggleDropdown:()=>T?N():R(),getItemIndex:e=>{var t,r,n;return t="[data-menu-item]",r="[data-menu-dropdown]",e?Array.from((null==(n=(0,i.p)(e,r))?void 0:n.querySelectorAll(t))||[]).findIndex(t=>t===e):null},hovered:I,setHovered:P,closeOnItemClick:h,closeDropdown:"click"===v?N:M,openDropdown:"click"===v?R:_,closeDropdownImmediately:N,loop:m,trigger:v,radius:k,classNames:x,styles:w,unstyled:S}},n.createElement(E.J,eL(eD({},j),{radius:k,opened:T,onChange:z,defaultOpened:f,trapFocus:"click"===v,closeOnEscape:g&&"click"===v,__staticSelector:"Menu",classNames:eL(eD({},x),{dropdown:C(O.dropdown,null==x?void 0:x.dropdown)}),styles:w,unstyled:S,onClose:N,onOpen:R}),r))}eB.displayName="@mantine/core/Menu",eB.Item=ea,eB.Label=ev,eB.Dropdown=R,eB.Target=eC,eB.Divider=k},38090:function(e,t,r){"use strict";r.d(t,{u:function(){return M}});var n=r(67294),i=r(36289),o=r(67293),a=r(80665),s=r(83317),l=r(96362),c=r(84137),u=r(3594),d=r(64761),f=r(56817),p=Object.defineProperty,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e};let b={xs:320,sm:380,md:440,lg:620,xl:780};var x=(0,f.k)((e,{overflow:t,size:r,centered:n,zIndex:i,fullScreen:o})=>({close:{},overlay:{display:o?"none":void 0},root:{position:"fixed",zIndex:i,top:0,left:0,right:0,bottom:0},inner:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",padding:o?0:`${2*e.spacing.xl}px ${e.spacing.md}px`,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"},title:{marginRight:e.spacing.md,textOverflow:"ellipsis",display:"block",wordBreak:"break-word"},modal:y({position:"relative",width:o?"100vw":e.fn.size({sizes:b,size:r}),borderRadius:o?0:void 0,outline:0,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,marginTop:n?"auto":void 0,marginBottom:n?"auto":void 0,zIndex:1},o?{position:"absolute",top:0,left:0,right:0,bottom:0,maxHeight:"100vh",overflowY:"auto"}:{}),header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.spacing.md,marginRight:-9},body:{maxHeight:"inside"===t?"calc(100vh - 185px)":null,overflowY:"inside"===t?"auto":null,wordBreak:"break-word"}})),w=r(83143),S=r(75933),k=r(64523),j=r(17577),E=r(82623),O=r(95117),C=r(80971),I=Object.defineProperty,P=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&z(e,r,t[r]);if(P)for(var r of P(t))T.call(t,r)&&z(e,r,t[r]);return e},R=(e,t)=>{var r={};for(var n in e)A.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&P)for(var n of P(e))0>t.indexOf(n)&&T.call(e,n)&&(r[n]=e[n]);return r};let _={size:"md",transitionDuration:250,overflow:"outside",padding:"lg",shadow:"lg",closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!0,withCloseButton:!0,withinPortal:!0,lockScroll:!0,withFocusReturn:!0,overlayBlur:0,zIndex:(0,u.w)("modal"),exitTransitionDuration:0};function M(e){let t=(0,d.N4)("Modal",_,e),{className:r,opened:u,title:f,onClose:p,children:h,withCloseButton:m,overlayOpacity:g,size:v,transitionDuration:y,exitTransitionDuration:b,closeButtonLabel:I,overlayColor:P,overflow:A,transition:T,padding:z,shadow:M,radius:D,id:L,classNames:F,styles:U,closeOnClickOutside:B,trapFocus:H,closeOnEscape:Z,centered:W,target:V,withinPortal:$,zIndex:q,overlayBlur:G,transitionTimingFunction:K,fullScreen:X,unstyled:J,lockScroll:Y,withFocusReturn:Q}=t,ee=R(t,["className","opened","title","onClose","children","withCloseButton","overlayOpacity","size","transitionDuration","exitTransitionDuration","closeButtonLabel","overlayColor","overflow","transition","padding","shadow","radius","id","classNames","styles","closeOnClickOutside","trapFocus","closeOnEscape","centered","target","withinPortal","zIndex","overlayBlur","transitionTimingFunction","fullScreen","unstyled","lockScroll","withFocusReturn"]),et=(0,i.M)(L),er=`${et}-title`,en=`${et}-body`,{classes:ei,cx:eo,theme:ea}=x({size:v,overflow:A,centered:W,zIndex:q,fullScreen:X},{unstyled:J,classNames:F,styles:U,name:"Modal"}),es=(0,o.P)(H&&u),el=(0,n.useRef)(null),ec=(0,a.Y)(es,el),eu="number"==typeof g?g:"dark"===ea.colorScheme?.85:.75;(0,s.P)(Y&&u);let ed=e=>{!H&&"Escape"===e.key&&Z&&p()};(0,n.useEffect)(()=>{if(!H)return window.addEventListener("keydown",ed),()=>window.removeEventListener("keydown",ed)},[H]),(0,l.u)({opened:u,shouldReturnFocus:H&&Q});let ef=(0,n.useRef)(null);(0,c.s)("mousedown",e=>{ef.current=e.target});let ep=()=>{ef.current===el.current&&B&&p()};return n.createElement(w.q,{withinPortal:$,target:V},n.createElement(S.p,{mounted:u,duration:y,exitDuration:b,timingFunction:K,transitions:{modal:{duration:y,transition:T||(X?"fade":"pop")},overlay:{duration:y/2,transition:"fade",timingFunction:"ease"}}},e=>n.createElement(n.Fragment,null,n.createElement(k.x,N({id:et,className:eo(ei.root,r)},ee),n.createElement("div",{style:e.overlay},n.createElement(j.a,{className:ei.overlay,sx:{position:"fixed"},zIndex:0,blur:G,color:P||("dark"===ea.colorScheme?ea.colors.dark[9]:ea.black),opacity:eu,unstyled:J})),n.createElement("div",{role:"presentation",className:ei.inner,onClick:ep,onKeyDown:e=>{var t;(null==(t=e.target)?void 0:t.getAttribute("data-mantine-stop-propagation"))!=="true"&&"Escape"===e.key&&Z&&p()},ref:ec},n.createElement(E.X,{className:ei.modal,shadow:M,p:z,radius:D,role:"dialog","aria-labelledby":er,"aria-describedby":en,"aria-modal":!0,tabIndex:-1,style:e.modal,unstyled:J,onClick:e=>e.stopPropagation()},(f||m)&&n.createElement("div",{className:ei.header},n.createElement(O.x,{id:er,className:ei.title},f),m&&n.createElement(C.P,{iconSize:16,onClick:p,"aria-label":I,className:ei.close})),n.createElement("div",{id:en,className:ei.body},h)))))))}M.displayName="@mantine/core/Modal"},31194:function(e,t,r){"use strict";r.d(t,{NU:function(){return er}});var n=r(67294),i=r(36289),o=r(15851),a=r(32819),s=r(37048),l=r(80665),c=r(3594),u=r(64761),d=r(65053),f=r(56817);let p={xs:16,sm:22,md:26,lg:30,xl:36},h={xs:10,sm:12,md:14,lg:16,xl:18};var m=(0,f.k)((e,{size:t,disabled:r,radius:n,readOnly:i,variant:o})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:r?"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[3]:"dark"===e.colorScheme?e.colors.dark[7]:"filled"===o?e.white:e.colors.gray[1],color:r?"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[7]:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],height:e.fn.size({size:t,sizes:p}),paddingLeft:e.fn.size({size:t,sizes:e.spacing}),paddingRight:r||i?e.fn.size({size:t,sizes:e.spacing}):0,fontWeight:500,fontSize:e.fn.size({size:t,sizes:h}),borderRadius:e.fn.size({size:n,sizes:e.radius}),cursor:r?"not-allowed":"default",userSelect:"none",maxWidth:"calc(100% - 20px)"},defaultValueRemove:{color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],marginLeft:e.fn.size({size:t,sizes:e.spacing})/6},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),g=r(80971),v=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))x.call(t,r)&&w(e,r,t[r]);return e},k=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&y)for(var n of y(e))0>t.indexOf(n)&&x.call(e,n)&&(r[n]=e[n]);return r};let j={xs:16,sm:22,md:24,lg:26,xl:30};function E(e){var{label:t,classNames:r,styles:i,className:o,onRemove:a,disabled:s,readOnly:l,size:c,radius:u="sm",variant:d}=e,f=k(e,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant"]);let{classes:p,cx:h}=m({size:c,disabled:s,readOnly:l,radius:u,variant:d},{classNames:r,styles:i,name:"MultiSelect"});return n.createElement("div",S({className:h(p.defaultValue,o)},f),n.createElement("span",{className:p.defaultValueLabel},t),!s&&!l&&n.createElement(g.P,{"aria-hidden":!0,onMouseDown:a,size:j[c],radius:2,color:"blue",variant:"transparent",iconSize:j[c]/2,className:p.defaultValueRemove,tabIndex:-1}))}E.displayName="@mantine/core/MultiSelect/DefaultValue";var O=r(66879),C=r(72098),I=r(75851),P=r(1118),A=r(97176),T=r(35227),z=Object.defineProperty,N=Object.defineProperties,R=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,L=(e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t)=>{for(var r in t||(t={}))M.call(t,r)&&L(e,r,t[r]);if(_)for(var r of _(t))D.call(t,r)&&L(e,r,t[r]);return e},U=(e,t)=>N(e,R(t)),B=(0,f.k)((e,{size:t,invalid:r})=>({wrapper:{position:"relative"},values:{minHeight:e.fn.size({size:t,sizes:T.J})-2,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(${-e.spacing.xs}px / 2)`,boxSizing:"border-box"},value:{margin:`calc(${e.spacing.xs}px / 2 - 2px) calc(${e.spacing.xs}px / 2)`},searchInput:U(F({},e.fn.fontStyles()),{flex:1,minWidth:60,backgroundColor:"transparent",border:0,outline:0,fontSize:e.fn.size({size:t,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs}px / 2)`,appearance:"none",color:"inherit",lineHeight:`${e.fn.size({size:t,sizes:T.J})-2}px`,"&::placeholder":{opacity:1,color:r?e.colors.red["dark"===e.colorScheme?6:7]:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{width:0,height:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed"}}})),H=r(12756),Z=r(94151),W=Object.defineProperty,V=Object.defineProperties,$=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))G.call(t,r)&&X(e,r,t[r]);if(q)for(var r of q(t))K.call(t,r)&&X(e,r,t[r]);return e},Y=(e,t)=>V(e,$(t)),Q=(e,t)=>{var r={};for(var n in e)G.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&q)for(var n of q(e))0>t.indexOf(n)&&K.call(e,n)&&(r[n]=e[n]);return r};function ee(e,t){if(!Array.isArray(e))return;if(0===t.length)return[];let r=t.map(e=>"object"==typeof e?e.value:e);return e.filter(e=>r.includes(e))}let et={size:"sm",valueComponent:E,itemComponent:O.A,transition:"pop-top-left",transitionDuration:0,maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:function(e,t,r){return!t&&r.label.toLowerCase().trim().includes(e.toLowerCase().trim())},limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:function(e,t){return!!e&&!t.some(t=>t.value.toLowerCase()===e.toLowerCase())},switchDirectionOnFlip:!1,zIndex:(0,c.w)("popover"),selectOnBlur:!1,clearButtonTabIndex:0,positionDependencies:[],dropdownPosition:"flip"},er=(0,n.forwardRef)((e,t)=>{let r=(0,u.N4)("MultiSelect",et,e),{className:c,style:f,required:p,label:h,description:m,size:g,error:v,classNames:y,styles:b,wrapperProps:x,value:w,defaultValue:S,data:k,onChange:j,valueComponent:E,itemComponent:O,id:T,transition:z,transitionDuration:N,transitionTimingFunction:R,maxDropdownHeight:_,shadow:M,nothingFound:D,onFocus:L,onBlur:F,searchable:U,placeholder:W,filter:V,limit:$,clearSearchOnChange:q,clearable:G,clearSearchOnBlur:K,clearButtonLabel:X,variant:er,onSearchChange:en,searchValue:ei,disabled:eo,initiallyOpened:ea,radius:es,icon:el,rightSection:ec,rightSectionWidth:eu,creatable:ed,getCreateLabel:ef,shouldCreate:ep,onCreate:eh,sx:em,dropdownComponent:eg,onDropdownClose:ev,onDropdownOpen:ey,maxSelectedValues:eb,withinPortal:ex,switchDirectionOnFlip:ew,zIndex:eS,selectOnBlur:ek,name:ej,dropdownPosition:eE,errorProps:eO,labelProps:eC,descriptionProps:eI,clearButtonTabIndex:eP,form:eA,positionDependencies:eT,onKeyDown:ez,unstyled:eN,inputContainer:eR,inputWrapperOrder:e_,readOnly:eM,withAsterisk:eD,hoverOnSearchChange:eL,disableSelectedItemFiltering:eF}=r,eU=Q(r,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transition","transitionDuration","transitionTimingFunction","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","clearButtonLabel","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","clearButtonTabIndex","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:eB,cx:eH,theme:eZ}=B({size:g,invalid:!!v},{classNames:y,styles:b,unstyled:eN,name:"MultiSelect"}),{systemStyles:eW,rest:eV}=(0,H.x)(eU),e$=(0,n.useRef)(),eq=(0,n.useRef)({}),eG=(0,i.M)(T),[eK,eX]=(0,n.useState)(ea),[eJ,eY]=(0,n.useState)(-1),[eQ,e0]=(0,n.useState)("column"),[e1,e2]=(0,o.C)({value:ei,defaultValue:"",finalValue:void 0,onChange:en}),[e5,e4]=(0,n.useState)(!1),{scrollIntoView:e3,targetRef:e6,scrollableRef:e8}=(0,a.g)({duration:0,offset:5,cancelable:!1,isList:!0}),e7=ed&&"function"==typeof ef,e9=null,te=k.map(e=>"string"==typeof e?{label:e,value:e}:e),tt=(0,d.j)({data:te}),[tr,tn]=(0,o.C)({value:ee(w,k),defaultValue:ee(S,k),finalValue:[],onChange:j}),ti=(0,n.useRef)(!!eb&&eb{if(!eM){let t=tr.filter(t=>t!==e);tn(t),eb&&t.lengtht===e[r].value&&!e[r].disabled))&&t.push(e[r]);return t}let s=[];for(let t=0;tr===e[t].value&&!e[t].disabled),e[t])&&s.push(e[t]),!(s.length>=r));t+=1);return s}({data:tt,searchable:U,searchValue:e1,limit:$,filter:V,value:tr,disableSelectedItemFiltering:eF}),ts=(e,t,r)=>{let n=e;for(;r(n);)if(!ta[n=t(n)].disabled)return n;return e};(0,s.l)(()=>{eL&&e1?eY(0):eY(-1)},[e1,eL]),(0,s.l)(()=>{!eo&&tr.length>k.length&&eX(!1),eb&&tr.length=eb&&(ti.current=!0,eX(!1))},[tr]);let tl=e=>{if(!eM){if(q&&e2(""),tr.includes(e.value))to(e.value);else{if(e.creatable&&"function"==typeof eh){let t=eh(e.value);null!=t&&("string"==typeof t?tn([...tr,t]):tn([...tr,t.value]))}else tn([...tr,e.value]);tr.length===eb-1&&(ti.current=!0,eX(!1)),eJ===ta.length-1&&eY(ta.length-2),1===ta.length&&eX(!1)}}},tc=tr.map(e=>{let t=tt.find(t=>t.value===e&&!t.disabled);return!t&&e7&&(t={value:e,label:e}),t}).filter(e=>!!e).map(e=>n.createElement(E,Y(J({},e),{variant:er,disabled:eo,className:eB.value,readOnly:eM,onRemove:t=>{t.preventDefault(),t.stopPropagation(),to(e.value)},key:e.value,size:g,styles:b,classNames:y,radius:es})));e7&&ep(e1,tt)&&(e9=ef(e1),ta.push({label:e1,value:e1,creatable:!0}));let tu=!eM&&(ta.length>0?eK:eK&&!!D);return(0,s.l)(()=>{let e=tu?ey:ev;"function"==typeof e&&e()},[tu]),n.createElement(Z.I.Wrapper,J(J({required:p,id:eG,label:h,error:v,description:m,size:g,className:c,style:f,classNames:y,styles:b,__staticSelector:"MultiSelect",sx:em,errorProps:eO,descriptionProps:eI,labelProps:eC,inputContainer:eR,inputWrapperOrder:e_,unstyled:eN,withAsterisk:eD},eW),x),n.createElement(P.v,{opened:tu,transition:z,transitionDuration:N,shadow:"sm",withinPortal:ex,__staticSelector:"MultiSelect",onDirectionChange:e0,switchDirectionOnFlip:ew,zIndex:eS,dropdownPosition:eE,positionDependencies:[...eT,e1],classNames:y,styles:b,unstyled:eN},n.createElement(P.v.Target,null,n.createElement("div",{className:eB.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":eK&&tu?`${eG}-items`:null,"aria-controls":eG,"aria-expanded":eK,onMouseLeave:()=>eY(-1),tabIndex:-1},n.createElement("input",{type:"hidden",name:ej,value:tr.join(","),form:eA,disabled:eo}),n.createElement(Z.I,J({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:g,variant:er,disabled:eo,invalid:!!v,required:p,radius:es,icon:el,unstyled:eN,onMouseDown:e=>{var t;e.preventDefault(),eo||ti.current||eX(!eK),null==(t=e$.current)||t.focus()},classNames:Y(J({},y),{input:eH({[eB.input]:!U},null==y?void 0:y.input)})},(0,C.o)({theme:eZ,rightSection:ec,rightSectionWidth:eu,styles:b,size:g,shouldClear:G&&tr.length>0,clearButtonLabel:X,onClear:()=>{var e;e2(""),tn([]),null==(e=e$.current)||e.focus(),eb&&(ti.current=!1)},error:v,disabled:eo,clearButtonTabIndex:eP,readOnly:eM})),n.createElement("div",{className:eB.values},tc,n.createElement("input",J({ref:(0,l.Y)(t,e$),type:"search",id:eG,className:eH(eB.searchInput,{[eB.searchInputPointer]:!U,[eB.searchInputInputHidden]:!eK&&tr.length>0||!U&&tr.length>0,[eB.searchInputEmpty]:0===tr.length}),onKeyDown:e=>{if(e5||(null==ez||ez(e),eM||"Backspace"!==e.key&&eb&&ti.current))return;let t="column"===eQ,r=()=>{eY(e=>{var r;let n=ts(e,e=>e+1,e=>e{eY(e=>{var r;let n=ts(e,e=>e-1,e=>e>0);return eK&&(e6.current=eq.current[null==(r=ta[n])?void 0:r.value],e3({alignment:t?"start":"end"})),n})};switch(e.key){case"ArrowUp":e.preventDefault(),eX(!0),t?n():r();break;case"ArrowDown":e.preventDefault(),eX(!0),t?r():n();break;case"Enter":e.preventDefault(),ta[eJ]&&eK?tl(ta[eJ]):eX(!0);break;case" ":U||(e.preventDefault(),ta[eJ]&&eK?tl(ta[eJ]):eX(!0));break;case"Backspace":tr.length>0&&0===e1.length&&(tn(tr.slice(0,-1)),eX(!0),eb&&(ti.current=!1));break;case"Home":U||(e.preventDefault(),eK||eX(!0),eY(ta.findIndex(e=>!e.disabled)),e3({alignment:t?"end":"start"}));break;case"End":U||(e.preventDefault(),eK||eX(!0),eY(ta.map(e=>!!e.disabled).lastIndexOf(!1)),e3({alignment:t?"end":"start"}));break;case"Escape":eX(!1)}},value:e1,onChange:e=>{e2(e.currentTarget.value),eo||ti.current||!U||eX(!0)},onFocus:e=>{"function"==typeof L&&L(e),eo||ti.current||!U||eX(!0)},onBlur:e=>{"function"==typeof F&&F(e),ek&&ta[eJ]&&eK&&tl(ta[eJ]),K&&e2(""),eX(!1)},readOnly:!U||ti.current||eM,placeholder:0===tr.length?W:void 0,disabled:eo,"data-mantine-stop-propagation":eK,autoComplete:"off",onCompositionStart:()=>e4(!0),onCompositionEnd:()=>e4(!1)},eV)))))),n.createElement(P.v.Dropdown,{component:eg||I.r,maxHeight:_,direction:eQ,id:eG,innerRef:e8,__staticSelector:"MultiSelect",classNames:y,styles:b},n.createElement(A.j,{data:ta,hovered:eJ,classNames:y,styles:b,uuid:eG,__staticSelector:"MultiSelect",onItemHover:eY,onItemSelect:tl,itemsRefs:eq,itemComponent:O,size:g,nothingFound:D,isItemSelected:e=>tr.includes(e),creatable:ed&&!!e9,createLabel:e9,unstyled:eN}))))});er.displayName="@mantine/core/MultiSelect"},12593:function(e,t,r){"use strict";r.d(t,{P:function(){return x}});var n=r(67294),i=r(64761),o=(0,r(56817).k)((e,{color:t,radius:r,withTitle:n},i)=>{let o=e.fn.radius(r),a=Math.min(Math.max(o/1.2,4),30),s=e.fn.variant({variant:"filled",color:t});return{closeButton:e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0]}),icon:{ref:i("icon"),boxSizing:"border-box",marginRight:e.spacing.md,width:28,height:28,borderRadius:28,display:"flex",flex:"none",alignItems:"center",justifyContent:"center",color:e.white},withIcon:{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},root:{boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",overflow:"hidden",paddingLeft:22,paddingRight:5,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:o,backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[2]}`,"&::before":{content:'""',display:"block",position:"absolute",width:6,top:a,bottom:a,left:4,borderRadius:o,backgroundColor:s.background},[`& .${i("icon")}`]:{backgroundColor:s.background,color:e.white}},body:{flex:1,overflow:"hidden",marginRight:10},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:2,overflow:"hidden",textOverflow:"ellipsis",color:"dark"===e.colorScheme?e.white:e.colors.gray[9]},description:{color:n?"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6]:"dark"===e.colorScheme?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}}),a=r(64523),s=r(20966),l=r(95117),c=r(80971),u=Object.defineProperty,d=Object.defineProperties,f=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>d(e,f(t)),b=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r};let x=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Notification",{},e),{className:u,color:d,radius:f,loading:p,disallowClose:h,title:m,icon:g,children:x,onClose:w,closeButtonProps:S,classNames:k,styles:j,unstyled:E}=r,O=b(r,["className","color","radius","loading","disallowClose","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled"]),{classes:C,cx:I}=o({color:d,radius:f,withTitle:!!m},{classNames:k,styles:j,unstyled:E,name:"Notification"}),P=g||p;return n.createElement(a.x,v({className:I(C.root,{[C.withIcon]:P},u),role:"alert",ref:t},O),g&&!p&&n.createElement("div",{className:C.icon},g),p&&n.createElement(s.a,{size:28,color:d,className:C.loader}),n.createElement("div",{className:C.body},m&&n.createElement(l.x,{className:C.title,size:"sm",weight:500},m),n.createElement(l.x,{color:"dimmed",className:C.description,size:"sm"},x)),!h&&n.createElement(c.P,y(v({iconSize:16,color:"gray"},S),{onClick:w,className:C.closeButton})))});x.displayName="@mantine/core/Notification"},59947:function(e,t,r){"use strict";r.d(t,{Y:function(){return C}});var n=r(67294),i=r(9276),o=r(83979),a=r(80665),s=r(50064),l=r(64761);let c=(e,t,r)=>Number.isInteger(e)&&e>=0&&0===t?"numeric":!Number.isInteger(e)&&e>=0&&0!==t?"decimal":Number.isInteger(e)&&e<0&&0===t||!Number.isInteger(e)&&e<0&&0!==t?"ios"===r?"text":"decimal":"numeric";function u({direction:e,size:t}){return n.createElement("svg",{style:{transform:"up"===e?"rotate(180deg)":void 0},width:t,height:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var d=r(56817);let f={xs:20,sm:24,md:30,lg:34,xl:36};var p=(0,d.k)((e,{radius:t,size:r})=>({rightSection:{display:"flex",flexDirection:"column",height:"calc(100% - 2px)",margin:1,marginRight:1,overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:e.fn.size({size:r,sizes:f}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:1,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}})),h=r(80061),m=Object.defineProperty,g=Object.defineProperties,v=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))x.call(t,r)&&w(e,r,t[r]);return e},k=(e,t)=>g(e,v(t)),j=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&y)for(var n of y(e))0>t.indexOf(n)&&x.call(e,n)&&(r[n]=e[n]);return r};let E={xs:10,sm:14,md:16,lg:18,xl:20},O={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,formatter:e=>e||"",parser:e=>{if("-"===e)return e;let t=e;if("."===t[0]&&(t=`0${e}`),!Number.isNaN(parseFloat(t)))return e},type:"text"},C=(0,n.forwardRef)((e,t)=>{let r=(0,l.N4)("NumberInput",O,e),{readOnly:d,disabled:m,value:g,onChange:v,decimalSeparator:y,min:b,max:x,startValue:w,step:C,stepHoldInterval:I,stepHoldDelay:P,onBlur:A,onFocus:T,onKeyDown:z,onKeyUp:N,hideControls:R,radius:_,variant:M,precision:D,removeTrailingZeros:L,defaultValue:F,noClampOnBlur:U,handlersRef:B,classNames:H,styles:Z,size:W,rightSection:V,rightSectionWidth:$,formatter:q,parser:G,inputMode:K,unstyled:X,type:J}=r,Y=j(r,["readOnly","disabled","value","onChange","decimalSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onBlur","onFocus","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:Q,cx:ee,theme:et}=p({radius:_,size:W},{classNames:H,styles:Z,unstyled:X,name:"NumberInput"}),er=e=>{if(void 0===e)return;let t=e.toFixed(D);return L&&D>0&&((t=t.replace(RegExp(`[0]{0,${D}}$`),"")).endsWith(".")||t.endsWith(y))&&(t=t.slice(0,-1)),t},[en,ei]=(0,n.useState)(!1),[eo,ea]=(0,n.useState)("number"==typeof g?g:"number"==typeof F?F:void 0),es="number"==typeof g?g:eo,[el,ec]=(0,n.useState)("number"==typeof es?er(es):""),eu=(0,n.useRef)(),ed=e=>{e===eo||Number.isNaN(e)||("function"==typeof v&&v(e),ea(e))},ef=e=>{let t=e;return y&&(t=t.replace(RegExp(`\\${y}`,"g"),".")),G(t)},ep="number"==typeof b?b:-1/0,eh="number"==typeof x?x:1/0,em=(0,n.useRef)();em.current=()=>{var e,t,r;if(void 0===eo)ed(null!=(e=null!=w?w:b)?e:0),ec(null!=(r=null!=(t=er(w))?t:er(b))?r:"0");else{let e=er((0,i.u)(eo+C,ep,eh));ed(parseFloat(e)),ec(e)}};let eg=(0,n.useRef)();eg.current=()=>{var e,t,r;if(void 0===eo)ed(null!=(e=null!=w?w:b)?e:0),ec(null!=(r=null!=(t=er(w))?t:er(b))?r:"0");else{let e=er((0,i.u)(eo-C,ep,eh));ed(parseFloat(e)),ec(e)}},(0,o.k)(B,{increment:em.current,decrement:eg.current}),(0,n.useEffect)(()=>{"number"!=typeof g||en||(ea(g),ec(er(g))),void 0!==F||void 0!==g||en||(ea(g),ec(""))},[g,D]);let ev=void 0!==P&&void 0!==I,ey=(0,n.useRef)(null),eb=(0,n.useRef)(0),ex=()=>{ey.current&&window.clearTimeout(ey.current),ey.current=null,eb.current=0},ew=e=>{e?em.current():eg.current(),eb.current+=1},eS=e=>{if(ew(e),ev){let t="number"==typeof I?I:I(eb.current);ey.current=window.setTimeout(()=>eS(e),t)}},ek=(e,t)=>{e.preventDefault(),eu.current.focus(),ew(t),ev&&(ey.current=window.setTimeout(()=>eS(t),P))};(0,n.useEffect)(()=>(ex(),ex),[]);let ej=n.createElement("div",{className:Q.rightSection},n.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:es>=x,className:ee(Q.control,Q.controlUp),onPointerDown:e=>{ek(e,!0)},onPointerUp:ex,onPointerLeave:ex},n.createElement(u,{size:et.fn.size({size:W,sizes:E}),direction:"up"})),n.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:es<=b,className:ee(Q.control,Q.controlDown),onPointerDown:e=>{ek(e,!1)},onPointerUp:ex,onPointerLeave:ex},n.createElement(u,{size:et.fn.size({size:W,sizes:E}),direction:"down"})));return n.createElement(h.o,k(S({},Y),{type:J,variant:M,value:((e="")=>{let t="number"==typeof e?String(e):e;return y&&(t=t.replace(/\./g,y)),q(t)})(el),disabled:m,readOnly:d,ref:(0,a.Y)(eu,t),onChange:e=>{if(e.nativeEvent.isComposing)return;let t=e.target.value,r=ef(t);ec(r),""===t||"-"===t?ed(void 0):""===t.trim()||Number.isNaN(r)||ed(parseFloat(r))},onBlur:e=>{var t;if(""===e.target.value)ec(""),ed(void 0);else{let r=e.target.value;(r[0]===`${y}`||"."===r[0])&&(r=`0${r}`);let n=ef(r),o=(0,i.u)(parseFloat(n),ep,eh);Number.isNaN(o)?ec(null!=(t=er(es))?t:""):U||(ec(er(o)),ed(parseFloat(er(o))))}ei(!1),"function"==typeof A&&A(e)},onFocus:e=>{ei(!0),"function"==typeof T&&T(e)},onKeyDown:e=>{if("function"==typeof z&&z(e),e.repeat&&ev&&("ArrowUp"===e.key||"ArrowDown"===e.key)){e.preventDefault();return}d||("ArrowUp"===e.key?ek(e,!0):"ArrowDown"===e.key&&ek(e,!1))},onKeyUp:e=>{"function"==typeof N&&N(e),("ArrowUp"===e.key||"ArrowDown"===e.key)&&ex()},rightSection:V||(m||d||R||"unstyled"===M?null:ej),rightSectionWidth:$||et.fn.size({size:W,sizes:f})+1,radius:_,max:x,min:b,step:C,size:W,styles:Z,classNames:H,inputMode:K||c(C,D,(0,s.i)()),__staticSelector:"NumberInput",unstyled:X}))});C.displayName="@mantine/core/NumberInput"},17577:function(e,t,r){"use strict";r.d(t,{a:function(){return S}});var n=r(67294),i=r(3594),o=r(64761),a=r(97818),s=r(48427),l=(0,r(56817).k)((e,{zIndex:t})=>({root:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:t}})),c=r(64523),u=Object.defineProperty,d=Object.defineProperties,f=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>d(e,f(t)),b=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r};let x={opacity:.6,color:"#fff",zIndex:(0,i.w)("modal"),radius:0,blur:0},w=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("Overlay",x,e),{opacity:i,blur:s,color:u,gradient:d,zIndex:f,radius:p,sx:h,unstyled:m,className:g}=r,w=b(r,["opacity","blur","color","gradient","zIndex","radius","sx","unstyled","className"]),{classes:S,cx:k}=l({zIndex:f},{name:"Overlay",unstyled:m}),j=d?{backgroundImage:d}:{backgroundColor:u},E=e=>n.createElement(c.x,v({ref:t,className:k(S.root,g),sx:[e=>y(v({},j),{opacity:i,borderRadius:e.fn.size({size:p,sizes:e.radius})}),...(0,a.R)(h)]},e));return s?n.createElement(c.x,v({className:k(S.root,g),sx:[{backdropFilter:`blur(${s}px)`},...(0,a.R)(h)]},w),E()):E(w)});w.displayName="@mantine/core/Overlay";let S=(0,s.F)(w)},4144:function(e,t,r){"use strict";r.d(t,{O:function(){return u}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e};function u(e){return n.createElement("svg",c({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:"currentColor"}))}},78175:function(e,t,r){"use strict";r.d(t,{O:function(){return u}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e};function u(e){return n.createElement("svg",c({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:"currentColor"}))}},89144:function(e,t,r){"use strict";r.d(t,{N:function(){return u}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e};function u(e){return n.createElement("svg",c({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z",fill:"currentColor"}))}},9500:function(e,t,r){"use strict";r.d(t,{g:function(){return u}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e};function u(e){return n.createElement("svg",c({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z",fill:"currentColor"}))}},82623:function(e,t,r){"use strict";r.d(t,{X:function(){return v}});var n=r(67294),i=r(64761),o=r(48427),a=(0,r(56817).k)((e,{radius:t,shadow:r,withBorder:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none",border:n?`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`:void 0}})),s=r(64523),l=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};let m={},g=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Paper",m,e),{className:o,children:l,radius:c,withBorder:u,shadow:d,unstyled:f}=r,g=h(r,["className","children","radius","withBorder","shadow","unstyled"]),{classes:v,cx:y}=a({radius:c,shadow:d,withBorder:u},{name:"Paper",unstyled:f});return n.createElement(s.x,p({className:y(v.root,o),ref:t},g),l)});g.displayName="@mantine/core/Paper";let v=(0,o.F)(g)},40633:function(e,t,r){"use strict";r.d(t,{J:function(){return ea}});var n=r(67294),i=r(36289),o=r(10753),a=r(3594),s=r(64761),l=r(15851),c=r(37048),u=r(88301),d=r(58463),f=r(81461),p=r(30212),h=r(68216);let m={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"},[g,v]=(0,h.R)(m.context);var y=r(80665),b=r(24241),x=r(50889),w=Object.defineProperty,S=Object.defineProperties,k=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(j)for(var r of j(t))O.call(t,r)&&C(e,r,t[r]);return e},P=(e,t)=>S(e,k(t)),A=(e,t)=>{var r={};for(var n in e)E.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&j)for(var n of j(e))0>t.indexOf(n)&&O.call(e,n)&&(r[n]=e[n]);return r};let T={refProp:"ref",popupType:"dialog"},z=(0,n.forwardRef)((e,t)=>{let r=(0,s.N4)("PopoverTarget",T,e),{children:i,refProp:o,popupType:a}=r,l=A(r,["children","refProp","popupType"]);if(!(0,b.k)(i))throw Error(m.children);let c=v(),u=(0,y.Y)(c.reference,i.ref,t),d=c.withRoles?{"aria-haspopup":a,"aria-expanded":c.opened,"aria-controls":c.getDropdownId(),id:c.getTargetId()}:{};return(0,n.cloneElement)(i,I(P(I(I(I({},l),d),c.targetProps),{className:(0,x.Z)(c.targetProps.className,l.className,i.props.className),[o]:u}),c.controlled?null:{onClick:c.onToggle}))});z.displayName="@mantine/core/PopoverTarget";var N=r(91611),R=r(96362),_=(0,r(56817).k)((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:"dark"===e.colorScheme?e.colors.dark[6]:e.white,border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm}px ${e.spacing.md}px`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}})),M=r(83143),D=r(97688),L=r(67293);function F({children:e,active:t=!0,refProp:r="ref"}){let i=(0,L.P)(t),o=(0,y.Y)(i,null==e?void 0:e.ref);return(0,b.k)(e)?(0,n.cloneElement)(e,{[r]:o}):e}F.displayName="@mantine/core/FocusTrap";var U=r(64523),B=r(63468),H=Object.defineProperty,Z=Object.defineProperties,W=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,G=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K=(e,t)=>{for(var r in t||(t={}))$.call(t,r)&&G(e,r,t[r]);if(V)for(var r of V(t))q.call(t,r)&&G(e,r,t[r]);return e},X=(e,t)=>Z(e,W(t)),J=(e,t)=>{var r={};for(var n in e)$.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&V)for(var n of V(e))0>t.indexOf(n)&&q.call(e,n)&&(r[n]=e[n]);return r};let Y={};function Q(e){let t=(0,s.N4)("PopoverDropdown",Y,e),{style:r,className:i,children:o,onKeyDownCapture:a}=t,l=J(t,["style","className","children","onKeyDownCapture"]),c=v(),{classes:u,cx:d}=_({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled}),f=(0,R.u)({opened:c.opened,shouldReturnFocus:c.returnFocus}),p=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:n.createElement(M.q,{withinPortal:c.withinPortal},n.createElement(D.u,{mounted:c.opened,transition:c.transition,duration:c.transitionDuration,exitDuration:"number"==typeof c.exitTransitionDuration?c.exitTransitionDuration:c.transitionDuration},e=>{var t,s;return n.createElement(F,{active:c.trapFocus},n.createElement(U.x,K(X(K({},p),{tabIndex:-1,key:c.placement,ref:c.floating,style:X(K(K({},r),e),{zIndex:c.zIndex,top:null!=(t=c.y)?t:0,left:null!=(s=c.x)?s:0,width:"target"===c.width?void 0:c.width}),className:d(u.dropdown,i),onKeyDownCapture:function(e,t={active:!0}){return"function"==typeof e&&t.active?r=>{var n;"Escape"===r.key&&(e(r),null==(n=t.onTrigger)||n.call(t))}:t.onKeyDown||N.Z}(c.onClose,{active:c.closeOnEscape,onTrigger:f,onKeyDown:a}),"data-position":c.placement}),l),o,n.createElement(B.Y,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,withBorder:!0,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}Q.displayName="@mantine/core/PopoverDropdown";var ee=r(14870),et=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,ei=(e,t)=>{var r={};for(var n in e)er.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&et)for(var n of et(e))0>t.indexOf(n)&&en.call(e,n)&&(r[n]=e[n]);return r};let eo={position:"bottom",offset:8,positionDependencies:[],transition:"fade",transitionDuration:150,middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:(0,a.w)("popover"),__staticSelector:"Popover",width:"max-content"};function ea(e){var t,r,a,h,m,v;let y=(0,n.useRef)(null),b=(0,s.N4)("Popover",eo,e),{children:x,position:w,offset:S,onPositionChange:k,positionDependencies:j,opened:E,transition:O,transitionDuration:C,width:I,middlewares:P,withArrow:A,arrowSize:T,arrowOffset:z,arrowRadius:N,arrowPosition:R,unstyled:_,classNames:M,styles:D,closeOnClickOutside:L,withinPortal:F,closeOnEscape:U,clickOutsideEvents:B,trapFocus:H,onClose:Z,onOpen:W,onChange:V,zIndex:$,radius:q,shadow:G,id:K,defaultOpened:X,exitTransitionDuration:J,__staticSelector:Y,withRoles:Q,disabled:et,returnFocus:er}=b,en=ei(b,["children","position","offset","onPositionChange","positionDependencies","opened","transition","transitionDuration","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","exitTransitionDuration","__staticSelector","withRoles","disabled","returnFocus"]),[ea,es]=(0,n.useState)(null),[el,ec]=(0,n.useState)(null),eu=(0,i.M)(K),ed=(0,s.rZ)(),ef=function(e){let[t,r]=(0,l.C)({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=(0,f.YF)({placement:e.position,middleware:[...function(e){let t=[(0,u.cv)(e.offset)];return e.middlewares.shift&&t.push((0,u.uY)({limiter:(0,u.dr)()})),e.middlewares.flip&&t.push((0,u.RR)()),e.middlewares.inline&&t.push((0,u.Qo)()),t.push((0,d.x7)({element:e.arrowRef,padding:e.arrowOffset})),t}(e),..."target"===e.width?[(0,u.dp)({apply({rects:e}){var t,r;Object.assign(null!=(r=null==(t=n.refs.floating.current)?void 0:t.style)?r:{},{width:`${e.reference.width}px`})}})]:[]]});return(0,p.L)({opened:e.opened,positionDependencies:e.positionDependencies,floating:n}),(0,c.l)(()=>{var t;null==(t=e.onPositionChange)||t.call(e,n.placement)},[n.placement]),{floating:n,controlled:"boolean"==typeof e.opened,opened:t,onClose:()=>{var t;null==(t=e.onClose)||t.call(e),r(!1)},onToggle:()=>{var n,i;t?(null==(n=e.onClose)||n.call(e),r(!1)):(null==(i=e.onOpen)||i.call(e),r(!0))}}}({middlewares:P,width:I,position:(0,ee._)(ed.dir,w),offset:S+(A?T/2:0),arrowRef:y,arrowOffset:z,onPositionChange:k,positionDependencies:j,opened:E,defaultOpened:X,onChange:V,onOpen:W,onClose:Z});(0,o.O)(()=>L&&ef.onClose(),B,[ea,el]);let ep=(0,n.useCallback)(e=>{es(e),ef.floating.reference(e)},[ef.floating.reference]),eh=(0,n.useCallback)(e=>{ec(e),ef.floating.floating(e)},[ef.floating.floating]);return n.createElement(g,{value:{returnFocus:er,disabled:et,controlled:ef.controlled,reference:ep,floating:eh,x:ef.floating.x,y:ef.floating.y,arrowX:null==(a=null==(r=null==(t=ef.floating)?void 0:t.middlewareData)?void 0:r.arrow)?void 0:a.x,arrowY:null==(v=null==(m=null==(h=ef.floating)?void 0:h.middlewareData)?void 0:m.arrow)?void 0:v.y,opened:ef.opened,arrowRef:y,transition:O,transitionDuration:C,exitTransitionDuration:J,width:I,withArrow:A,arrowSize:T,arrowOffset:z,arrowRadius:N,arrowPosition:R,placement:ef.floating.placement,trapFocus:H,withinPortal:F,zIndex:$,radius:q,shadow:G,closeOnEscape:U,onClose:ef.onClose,onToggle:ef.onToggle,getTargetId:()=>`${eu}-target`,getDropdownId:()=>`${eu}-dropdown`,withRoles:Q,targetProps:en,__staticSelector:Y,classNames:M,styles:D,unstyled:_}},x)}ea.Target=z,ea.Dropdown=Q,ea.displayName="@mantine/core/Popover"},83143:function(e,t,r){"use strict";r.d(t,{q:function(){return f}});var n=r(67294),i=r(40254),o=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r};function f(e){var{withinPortal:t=!0,children:r}=e,o=d(e,["withinPortal","children"]);return t?n.createElement(i.h,u({},o),r):n.createElement(n.Fragment,null,r)}f.displayName="@mantine/core/OptionalPortal"},40254:function(e,t,r){"use strict";r.d(t,{h:function(){return s}});var n=r(67294),i=r(73935),o=r(10129),a=r(64761);function s(e){let{children:t,target:r,className:s}=(0,a.N4)("Portal",{},e),l=(0,a.rZ)(),[c,u]=(0,n.useState)(!1),d=(0,n.useRef)();return((0,o.Y)(()=>(u(!0),d.current=r?"string"==typeof r?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(d.current),()=>{r||document.body.removeChild(d.current)}),[r]),c)?(0,i.createPortal)(n.createElement("div",{className:s,dir:l.dir},t),d.current):null}s.displayName="@mantine/core/Portal"},3941:function(e,t,r){"use strict";r.d(t,{E:function(){return j}});var n=r(67294),i=r(64761),o=r(70917),a=r(56817);let s={xs:3,sm:5,md:8,lg:12,xl:16},l=(0,o.F4)({from:{backgroundPosition:"0 0"},to:{backgroundPosition:"40px 0"}});var c=(0,a.k)((e,{color:t,radius:r,size:n,striped:i,animate:o})=>({root:{position:"relative",height:e.fn.size({size:n,sizes:s}),backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],borderRadius:e.fn.size({size:r,sizes:e.radius}),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:t||e.primaryColor}).background,transition:"width 100ms linear",animation:o?`${l} 1000ms linear infinite`:"none",backgroundSize:"20px 20px",backgroundImage:i?"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)":"none","&:last-of-type":{borderTopRightRadius:e.fn.size({size:r,sizes:e.radius}),borderBottomRightRadius:e.fn.size({size:r,sizes:e.radius})},"&:first-of-type":{borderTopLeftRadius:e.fn.size({size:r,sizes:e.radius}),borderBottomLeftRadius:e.fn.size({size:r,sizes:e.radius})},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},label:{color:e.white,fontSize:.65*e.fn.size({size:n,sizes:s}),fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}})),u=r(88393),d=r(64523),f=r(95117),p=Object.defineProperty,h=Object.defineProperties,m=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&b(e,r,t[r]);if(g)for(var r of g(t))y.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>h(e,m(t)),S=(e,t)=>{var r={};for(var n in e)v.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&g)for(var n of g(e))0>t.indexOf(n)&&y.call(e,n)&&(r[n]=e[n]);return r};let k={size:"md",radius:"sm",striped:!1,animate:!1,label:""},j=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Progress",k,e),{className:o,value:a,color:s,size:l,radius:p,striped:h,animate:m,label:g,"aria-label":v,classNames:y,styles:b,sections:j,unstyled:E}=r,O=S(r,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled"]),{classes:C,cx:I,theme:P}=c({color:s,size:l,radius:p,striped:h||m,animate:m},{classNames:y,styles:b,unstyled:E,name:"Progress"}),A=Array.isArray(j)?j.reduce((e,t)=>(e.sections.push(w(x({},t),{accumulated:e.accumulated})),e.accumulated+=t.value,e),{accumulated:0,sections:[]}).sections.map((e,t)=>{var{tooltip:r,accumulated:i,value:o,label:a,color:s}=e,l=S(e,["tooltip","accumulated","value","label","color"]);return n.createElement(u.u.Floating,{label:r,disabled:!r,key:t},n.createElement(d.x,w(x({},l),{className:I(C.bar,l.className),sx:{width:`${o}%`,left:`${i}%`,backgroundColor:P.fn.variant({variant:"filled",primaryFallback:!1,color:s||P.primaryColor}).background}}),a&&n.createElement(f.x,{className:C.label},a)))}):null;return n.createElement(d.x,x({className:I(C.root,o),ref:t},O),A||n.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,"aria-label":v,className:C.bar,style:{width:`${a}%`}},g?n.createElement(f.x,{className:C.label},g):""))});j.displayName="@mantine/core/Progress"},58654:function(e,t,r){"use strict";r.d(t,{Y:function(){return X}});var n=r(67294),i=r(36289),o=r(64761),a=Object.defineProperty,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&u(e,r,t[r]);return e};let f=(0,n.createContext)(null),p=f.Provider,h=()=>(0,n.useContext)(f);var m=r(15851),g=r(1270),v=r(94151),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E={orientation:"horizontal",spacing:"lg",offset:"xs",size:"sm"},O=(0,n.forwardRef)((e,t)=>{let r=(0,o.N4)("RadioGroup",E,e),{children:a,value:s,defaultValue:l,onChange:c,orientation:u,spacing:d,size:f,wrapperProps:h,unstyled:y,offset:b,name:x}=r,w=j(r,["children","value","defaultValue","onChange","orientation","spacing","size","wrapperProps","unstyled","offset","name"]),S=(0,i.M)(x),[O,C]=(0,m.C)({value:s,defaultValue:l,finalValue:"",onChange:c});return n.createElement(p,{value:{value:O,onChange:e=>C(e.currentTarget.value),size:f,name:S}},n.createElement(v.I.Wrapper,k(k({labelElement:"div",size:f,__staticSelector:"RadioGroup",ref:t,unstyled:y},h),w),n.createElement(g.K,{spacing:d,orientation:u,unstyled:y,role:"radiogroup",offset:b},a)))});O.displayName="@mantine/core/RadioGroup";var C=r(56817),I=Object.defineProperty,P=Object.defineProperties,A=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>P(e,A(t));let D={xs:16,sm:20,md:24,lg:30,xl:36},L={xs:6,sm:8,md:10,lg:14,xl:16};var F=(0,C.k)((e,{size:t,color:r,transitionDuration:n,labelPosition:i,error:o},a)=>{let s=e.fn.variant({variant:"filled",color:r}),l=e.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:"left"===i?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:a("icon"),color:e.white,opacity:0,transform:"scale(0.75) translateY(2px)",transition:`opacity ${n}ms ${e.transitionTimingFunction}`,pointerEvents:"none",width:e.fn.size({sizes:L,size:t}),height:e.fn.size({sizes:L,size:t}),position:"absolute",top:`calc(50% - ${e.fn.size({sizes:L,size:t})/2}px)`,left:`calc(50% - ${e.fn.size({sizes:L,size:t})/2}px)`},radio:M(_({},e.fn.focusStyles()),{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,border:`1px solid ${o?l:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,position:"relative",appearance:"none",width:e.fn.size({sizes:D,size:t}),height:e.fn.size({sizes:D,size:t}),borderRadius:e.fn.size({sizes:D,size:t}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:`${n}ms`,cursor:e.cursorType,"&:checked":{background:s.background,borderColor:s.background,[`& + .${a("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[4],backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1],[`& + .${a("icon")}`]:{color:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[4]}}})}}),U=r(12756),B=r(4846),H=Object.defineProperty,Z=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))W.call(t,r)&&$(e,r,t[r]);if(Z)for(var r of Z(t))V.call(t,r)&&$(e,r,t[r]);return e},G=(e,t)=>{var r={};for(var n in e)W.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Z)for(var n of Z(e))0>t.indexOf(n)&&V.call(e,n)&&(r[n]=e[n]);return r};let K={icon:function(e){return n.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5"},e),n.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))},transitionDuration:100,size:"sm",labelPosition:"right"},X=(0,n.forwardRef)((e,t)=>{var r,a;let s=(0,o.N4)("Radio",K,e),{className:l,style:c,id:u,label:d,size:f,title:p,disabled:m,color:g,classNames:v,styles:y,sx:b,icon:x,transitionDuration:w,wrapperProps:S,unstyled:k,labelPosition:j,description:E,error:O}=s,C=G(s,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error"]),I=h(),P=null!=(r=null==I?void 0:I.size)?r:f,A=e.size?f:P,{classes:T}=F({color:g,size:A,transitionDuration:w,labelPosition:j,error:!!O},{classNames:v,styles:y,unstyled:k,name:"Radio"}),{systemStyles:z,rest:N}=(0,U.x)(C),R=(0,i.M)(u),_=I?{checked:I.value===N.value,name:null!=(a=N.name)?a:I.name,onChange:I.onChange}:{};return n.createElement(B.Z,q(q({className:l,sx:b,style:c,id:R,size:A,labelPosition:j,label:d,description:E,error:O,disabled:m,__staticSelector:"Radio",classNames:v,styles:y,unstyled:k,"data-checked":_.checked||void 0},z),S),n.createElement("div",{className:T.inner},n.createElement("input",q(q({ref:t,className:T.radio,type:"radio",id:R,disabled:m},N),_)),n.createElement(x,{className:T.icon,"aria-hidden":!0})))});X.displayName="@mantine/core/Radio",X.Group=O},45957:function(e,t,r){"use strict";r.d(t,{i:function(){return U}});var n=r(67294),i=r(64761),o=r(36289),a=r(15851),s=r(9276),l=r(80665),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e};function m(e){return n.createElement("svg",h({viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"}))}m.displayName="@mantine/core/StarIcon";var g=r(56817);let v={xs:14,sm:18,md:20,lg:28,xl:32};var y=(0,g.k)((e,{size:t,type:r,color:n})=>{let i="light"===e.colorScheme?e.colors.gray[3]:e.colors.gray[8],o=e.fn.variant({variant:"filled",color:n}).background;return{icon:{stroke:"empty"===r?i:o,fill:"empty"===r?i:o,width:e.fn.size({size:t,sizes:v}),height:e.fn.size({size:t,sizes:v})}}});function b({size:e,type:t,color:r}){let{classes:i}=y({size:e,type:t,color:r});return n.createElement(m,{className:i.icon})}b.displayName="@mantine/core/StarSymbol";var x=(0,g.k)((e,t,r)=>({input:{height:0,width:0,position:"absolute",overflow:"hidden",whiteSpace:"nowrap",opacity:0,"&:focus":{[`& + .${r("label")}`]:{outline:"always"===e.focusRing||"auto"===e.focusRing?`1px solid ${e.colors[e.primaryColor]["dark"===e.colorScheme?7:5]}`:void 0},"&:focus:not(:focus-visible)":{[`& + .${r("label")}`]:{outline:"auto"===e.focusRing||"never"===e.focusRing?"none":void 0}}}},label:{ref:r("label"),display:"block",boxSizing:"border-box",marginInline:1,top:0,left:0,cursor:"pointer",position:"absolute",zIndex:0,"&[data-read-only]":{cursor:"default"},"&:last-of-type":{position:"relative",zIndex:0}},symbolBody:{display:"grid",placeContent:"center",placeItems:"center"}})),w=r(64523),S=Object.defineProperty,k=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))j.call(t,r)&&O(e,r,t[r]);if(k)for(var r of k(t))E.call(t,r)&&O(e,r,t[r]);return e},I=(e,t)=>{var r={};for(var n in e)j.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&k)for(var n of k(e))0>t.indexOf(n)&&E.call(e,n)&&(r[n]=e[n]);return r};function P(e){var{size:t,getSymbolLabel:r,emptyIcon:i,fullIcon:o,full:a,active:s,value:l,readOnly:c,fractionValue:u,classNames:d,styles:f,unstyled:p,color:h,id:m}=e,g=I(e,["size","getSymbolLabel","emptyIcon","fullIcon","full","active","value","readOnly","fractionValue","classNames","styles","unstyled","color","id"]);let{classes:v}=x(null,{name:"Rating",classNames:d,styles:f,unstyled:p}),y="function"==typeof o?o(l):o,S="function"==typeof i?i(l):i;return n.createElement(n.Fragment,null,!c&&n.createElement("input",C({className:v.input,id:m,type:"radio","data-active":s,"aria-label":r(l),value:l},g)),n.createElement(w.x,{component:c?"div":"label",className:v.label,"data-read-only":c||void 0,htmlFor:m,sx:1===u?void 0:{zIndex:s?2:0}},n.createElement(w.x,{className:v.symbolBody,sx:1===u?void 0:{clipPath:`inset(0 ${s?100-100*u:100}% 0 0)`}},a?y||n.createElement(b,{color:h,size:t,type:"full"}):S||n.createElement(b,{color:h,size:t,type:"empty"}))))}P.displayName="@mantine/core/RatingItem";var A=(0,g.k)(()=>({root:{display:"flex",width:"max-content"},symbolGroup:{position:"relative",transition:"transform 100ms ease",'&[data-active="true"]':{zIndex:1,transform:"scale(1.2)"}}})),T=Object.defineProperty,z=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))N.call(t,r)&&_(e,r,t[r]);if(z)for(var r of z(t))R.call(t,r)&&_(e,r,t[r]);return e},D=(e,t)=>{var r={};for(var n in e)N.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&z)for(var n of z(e))0>t.indexOf(n)&&R.call(e,n)&&(r[n]=e[n]);return r};function L(e,t){var r;let n=Math.round(e/t)*t,i=(null==(r=`${t}`.split(".")[1])?void 0:r.length)||0;return Number(n.toFixed(i))}let F={size:"sm",getSymbolLabel:e=>`${e}`,count:5,fractions:1,color:"yellow"},U=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Rating",F,e),{defaultValue:c,value:u,emptySymbol:d,fullSymbol:f,size:p,count:h,fractions:m,onChange:g,onHover:v,getSymbolLabel:y,name:b,readOnly:x,className:S,classNames:k,styles:j,unstyled:E,onMouseEnter:O,onMouseMove:C,onMouseLeave:I,highlightSelectedOnly:T,color:z,id:N}=r,R=D(r,["defaultValue","value","emptySymbol","fullSymbol","size","count","fractions","onChange","onHover","getSymbolLabel","name","readOnly","className","classNames","styles","unstyled","onMouseEnter","onMouseMove","onMouseLeave","highlightSelectedOnly","color","id"]),{classes:_,cx:U,theme:B}=A(null,{name:"Rating",classNames:k,styles:j,unstyled:E}),H=(0,o.M)(b),Z=(0,o.M)(N),W=(0,n.useRef)(null),[V,$]=(0,a.C)({value:u,defaultValue:c,finalValue:0,onChange:g}),[q,G]=(0,n.useState)(-1),[K,X]=(0,n.useState)(!0),J=Math.floor(m),Y=Math.floor(h),Q=1/J,ee=L(V,Q),et=-1!==q?q:ee,er=()=>K&&G(-1),en=e=>{$(parseFloat(e.target.value))},ei=Array(Y).fill(0).map((e,t)=>{let r=t+1,i=Array.from(Array(0===t?J+1:J)),o=!x&&Math.ceil(q)===r;return n.createElement("div",{key:r,"data-active":o,className:_.symbolGroup},i.map((e,i)=>{let o=Q*(0===t?i:i+1),a=L(r-1+o,Q);return n.createElement(P,{key:`${r}-${a}`,size:p,getSymbolLabel:y,emptyIcon:d,fullIcon:f,full:T?a===et:a<=et,active:a===et,checked:a===ee,readOnly:x,fractionValue:o,value:a,name:H,onChange:en,onBlur:er,classNames:k,styles:j,unstyled:E,color:z,id:`${Z}-${t}-${i}`})}))});return n.createElement(w.x,M({ref:(0,l.Y)(W,t),className:U(_.root,S),onMouseMove:e=>{if(null==C||C(e),x)return;let{left:t,right:r,width:n}=W.current.getBoundingClientRect(),i=n/Y,o="rtl"===B.dir?r-e.clientX:e.clientX-t,a=(0,s.u)(L(o/i+Q/2,Q),Q,Y);G(a),a!==q&&(null==v||v(a))},onMouseEnter:e=>{null==O||O(e),x||X(!1)},onMouseLeave:e=>{null==I||I(e),x||(G(-1),X(!0),-1!==q&&(null==v||v(-1)))}},R),ei)});U.displayName="@mantine/core/Rating"},86787:function(e,t,r){"use strict";r.d(t,{T:function(){return F}});var n=r(67294),i=r(64761),o=r(88393),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};function g(e){var{size:t,value:r,offset:a,sum:s,thickness:l,root:c,color:u,lineRoundCaps:d,tooltip:f}=e,g=m(e,["size","value","offset","sum","thickness","root","color","lineRoundCaps","tooltip"]);let v=(0,i.rZ)(),y=v.fn.themeColor(u||("dark"===v.colorScheme?"dark":"gray"),u?v.fn.primaryShade():"dark"===v.colorScheme?4:1,!1);return n.createElement(o.u.Floating,{disabled:!f,label:f},n.createElement("circle",p(h(p({},g),{fill:"none",strokeLinecap:d?"round":"butt",stroke:y}),function({size:e,thickness:t,sum:r,value:n,root:i,offset:o}){let a=(.9*e-2*t)/2,s=Math.PI*a*2/100,l=i?`${(100-r)*s}, ${r*s}`:`${n*s}, ${(100-n)*s}`;return{strokeWidth:t,cx:e/2,cy:e/2,r:a,transform:i?`scale(1, -1) translate(0, -${e})`:null,strokeDasharray:l,strokeDashoffset:i?0:o}}({sum:s,size:t,thickness:l,value:r,offset:a,root:c}))))}g.displayName="@mantine/core/Curve";var v=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>y(e,b(t)),O=(0,r(56817).k)({root:{position:"relative"},label:{position:"absolute",top:"50%",transform:"translateY(-50%)"}}),C=r(64523),I=Object.defineProperty,P=Object.defineProperties,A=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))z.call(t,r)&&R(e,r,t[r]);if(T)for(var r of T(t))N.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>P(e,A(t)),D=(e,t)=>{var r={};for(var n in e)z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&T)for(var n of T(e))0>t.indexOf(n)&&N.call(e,n)&&(r[n]=e[n]);return r};let L={size:120,thickness:12},F=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("RingProgress",L,e),{className:o,style:a,label:s,sections:l,size:c,thickness:u,classNames:d,styles:f,roundCaps:p,rootColor:h,unstyled:m}=r,v=D(r,["className","style","label","sections","size","thickness","classNames","styles","roundCaps","rootColor","unstyled"]),{classes:y,cx:b}=O(null,{classNames:d,styles:f,unstyled:m,name:"RingProgress"}),x=(function({size:e,thickness:t,sections:r,renderRoundedLineCaps:n,rootColor:i}){let o=r.reduce((e,t)=>e+t.value,0),a=(.9*e-2*t)/2*Math.PI*2,s=a,l=[],c=[];for(let e=0;e2){c.push(E(j({},l[0]),{lineRoundCaps:n})),c.push(E(j({},l[l.length-2]),{lineRoundCaps:n}));for(let e=1;e<=l.length-3;e+=1)c.push(E(j({},l[e]),{lineRoundCaps:!1}))}else c.push(E(j({},l[0]),{lineRoundCaps:n}));return c})({size:c,thickness:u,sections:l,renderRoundedLineCaps:p,rootColor:h}).map(({data:e,sum:t,root:r,lineRoundCaps:i,offset:o},a)=>n.createElement(g,M(_({},e),{key:a,size:c,thickness:u,sum:t,offset:o,color:null==e?void 0:e.color,root:r,lineRoundCaps:i})));return n.createElement(C.x,_({style:_({width:c,height:c},a),className:b(y.root,o),ref:t},v),n.createElement("svg",{width:c,height:c,style:{transform:"rotate(-90deg)"}},x),s&&n.createElement("div",{className:y.label,style:{right:2*u,left:2*u}},s))});F.displayName="@mantine/core/RingProgress"},73723:function(e,t,r){"use strict";r.d(t,{x:function(){return eh}});var n=r(67294),i=r(87462),o=r(73935);function a(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function s(...e){return(0,n.useCallback)(a(...e),e)}let l=(0,n.forwardRef)((e,t)=>{let{children:r,...o}=e,a=n.Children.toArray(r),s=a.find(d);if(s){let e=s.props.children,r=a.map(t=>t!==s?t:n.Children.count(e)>1?n.Children.only(null):(0,n.isValidElement)(e)?e.props.children:null);return(0,n.createElement)(c,(0,i.Z)({},o,{ref:t}),(0,n.isValidElement)(e)?(0,n.cloneElement)(e,void 0,r):null)}return(0,n.createElement)(c,(0,i.Z)({},o,{ref:t}),r)});l.displayName="Slot";let c=(0,n.forwardRef)((e,t)=>{let{children:r,...i}=e;return(0,n.isValidElement)(r)?(0,n.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(i,r.props),ref:a(t,r.ref)}):n.Children.count(r)>1?n.Children.only(null):null});c.displayName="SlotClone";let u=({children:e})=>(0,n.createElement)(n.Fragment,null,e);function d(e){return(0,n.isValidElement)(e)&&e.type===u}let f=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=(0,n.forwardRef)((e,r)=>{let{asChild:o,...a}=e,s=o?l:t;return(0,n.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,n.createElement)(s,(0,i.Z)({},a,{ref:r}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),p=(null==globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{},h=e=>{let{present:t,children:r}=e,i=function(e){var t,r;let[i,a]=(0,n.useState)(),s=(0,n.useRef)({}),l=(0,n.useRef)(e),c=(0,n.useRef)("none"),[u,d]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,n.useReducer)((e,t)=>{let n=r[e][t];return null!=n?n:e},t));return(0,n.useEffect)(()=>{let e=m(s.current);c.current="mounted"===u?e:"none"},[u]),p(()=>{let t=s.current,r=l.current;if(r!==e){let n=c.current,i=m(t);e?d("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?d("UNMOUNT"):r&&n!==i?d("ANIMATION_OUT"):d("UNMOUNT"),l.current=e}},[e,d]),p(()=>{if(i){let e=e=>{let t=m(s.current).includes(e.animationName);e.target===i&&t&&(0,o.flushSync)(()=>d("ANIMATION_END"))},t=e=>{e.target===i&&(c.current=m(s.current))};return i.addEventListener("animationstart",t),i.addEventListener("animationcancel",e),i.addEventListener("animationend",e),()=>{i.removeEventListener("animationstart",t),i.removeEventListener("animationcancel",e),i.removeEventListener("animationend",e)}}d("ANIMATION_END")},[i,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:(0,n.useCallback)(e=>{e&&(s.current=getComputedStyle(e)),a(e)},[])}}(t),a="function"==typeof r?r({present:i.isPresent}):n.Children.only(r),l=s(i.ref,a.ref);return"function"==typeof r||i.isPresent?(0,n.cloneElement)(a,{ref:l}):null};function m(e){return(null==e?void 0:e.animationName)||"none"}function g(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e}),(0,n.useMemo)(()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)},[])}h.displayName="Presence";let v=(0,n.createContext)(void 0);function y(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}let b="ScrollArea",[x,w]=function(e,t=[]){let r=[],i=()=>{let t=r.map(e=>(0,n.createContext)(e));return function(r){let i=(null==r?void 0:r[e])||t;return(0,n.useMemo)(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return i.scopeName=e,[function(t,i){let o=(0,n.createContext)(i),a=r.length;function s(t){let{scope:r,children:i,...s}=t,l=(null==r?void 0:r[e][a])||o,c=(0,n.useMemo)(()=>s,Object.values(s));return(0,n.createElement)(l.Provider,{value:c},i)}return r=[...r,i],s.displayName=t+"Provider",[s,function(r,s){let l=(null==s?void 0:s[e][a])||o,c=(0,n.useContext)(l);if(c)return c;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return(0,n.useMemo)(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}(i,...t)]}(b),[S,k]=x(b),j=(0,n.forwardRef)((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:a,scrollHideDelay:l=600,...c}=e,[u,d]=(0,n.useState)(null),[p,h]=(0,n.useState)(null),[m,g]=(0,n.useState)(null),[y,b]=(0,n.useState)(null),[x,w]=(0,n.useState)(null),[k,j]=(0,n.useState)(0),[E,O]=(0,n.useState)(0),[C,I]=(0,n.useState)(!1),[P,A]=(0,n.useState)(!1),T=s(t,e=>d(e)),z=function(e){let t=(0,n.useContext)(v);return e||t||"ltr"}(a);return(0,n.createElement)(S,{scope:r,type:o,dir:z,scrollHideDelay:l,scrollArea:u,viewport:p,onViewportChange:h,content:m,onContentChange:g,scrollbarX:y,onScrollbarXChange:b,scrollbarXEnabled:C,onScrollbarXEnabledChange:I,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:P,onScrollbarYEnabledChange:A,onCornerWidthChange:j,onCornerHeightChange:O},(0,n.createElement)(f.div,(0,i.Z)({dir:z},c,{ref:T,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),E=(0,n.forwardRef)((e,t)=>{let{__scopeScrollArea:r,children:o,...a}=e,l=k("ScrollAreaViewport",r),c=s(t,(0,n.useRef)(null),l.onViewportChange);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),(0,n.createElement)(f.div,(0,i.Z)({"data-radix-scroll-area-viewport":""},a,{ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style}}),(0,n.createElement)("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"}},o)))}),O="ScrollAreaScrollbar",C=(0,n.forwardRef)((e,t)=>{let{forceMount:r,...o}=e,a=k(O,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===e.orientation;return(0,n.useEffect)(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?(0,n.createElement)(I,(0,i.Z)({},o,{ref:t,forceMount:r})):"scroll"===a.type?(0,n.createElement)(P,(0,i.Z)({},o,{ref:t,forceMount:r})):"auto"===a.type?(0,n.createElement)(A,(0,i.Z)({},o,{ref:t,forceMount:r})):"always"===a.type?(0,n.createElement)(T,(0,i.Z)({},o,{ref:t})):null}),I=(0,n.forwardRef)((e,t)=>{let{forceMount:r,...o}=e,a=k(O,e.__scopeScrollArea),[s,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=a.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),l(!0)},n=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),(0,n.createElement)(h,{present:r||s},(0,n.createElement)(A,(0,i.Z)({"data-state":s?"visible":"hidden"},o,{ref:t})))}),P=(0,n.forwardRef)((e,t)=>{var r,o;let{forceMount:a,...s}=e,l=k(O,e.__scopeScrollArea),c="horizontal"===e.orientation,u=K(()=>f("SCROLL_END"),100),[d,f]=(r="hidden",o={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},(0,n.useReducer)((e,t)=>{let r=o[e][t];return null!=r?r:e},r));return(0,n.useEffect)(()=>{if("idle"===d){let e=window.setTimeout(()=>f("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(e)}},[d,l.scrollHideDelay,f]),(0,n.useEffect)(()=>{let e=l.viewport,t=c?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(f("SCROLL"),u()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[l.viewport,c,f,u]),(0,n.createElement)(h,{present:a||"hidden"!==d},(0,n.createElement)(T,(0,i.Z)({"data-state":"hidden"===d?"hidden":"visible"},s,{ref:t,onPointerEnter:y(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:y(e.onPointerLeave,()=>f("POINTER_LEAVE"))})))}),A=(0,n.forwardRef)((e,t)=>{let r=k(O,e.__scopeScrollArea),{forceMount:o,...a}=e,[s,l]=(0,n.useState)(!1),c="horizontal"===e.orientation,u=K(()=>{if(r.viewport){let e=r.viewport.offsetWidth{let{orientation:r="vertical",...o}=e,a=k(O,e.__scopeScrollArea),s=(0,n.useRef)(null),l=(0,n.useRef)(0),[c,u]=(0,n.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=W(c.viewport,c.content),f={...o,sizes:c,onSizesChange:u,hasThumb:!!(d>0&&d<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function p(e,t){return function(e,t,r,n="ltr"){let i=V(r),o=t||i/2,a=r.scrollbar.paddingStart+o,s=r.scrollbar.size-r.scrollbar.paddingEnd-(i-o),l=r.content-r.viewport;return q([a,s],"ltr"===n?[0,l]:[-1*l,0])(e)}(e,l.current,c,t)}return"horizontal"===r?(0,n.createElement)(z,(0,i.Z)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){let e=$(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=p(e,a.dir))}})):"vertical"===r?(0,n.createElement)(N,(0,i.Z)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){let e=$(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=p(e))}})):null}),z=(0,n.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:o,...a}=e,l=k(O,e.__scopeScrollArea),[c,u]=(0,n.useState)(),d=(0,n.useRef)(null),f=s(t,d,l.onScrollbarXChange);return(0,n.useEffect)(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,n.createElement)(M,(0,i.Z)({"data-orientation":"horizontal"},a,{ref:f,sizes:r,style:{bottom:0,left:"rtl"===l.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===l.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":V(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(l.viewport){let n=l.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),n>0&&n{d.current&&l.viewport&&c&&o({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Z(c.paddingLeft),paddingEnd:Z(c.paddingRight)}})}}))}),N=(0,n.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:o,...a}=e,l=k(O,e.__scopeScrollArea),[c,u]=(0,n.useState)(),d=(0,n.useRef)(null),f=s(t,d,l.onScrollbarYChange);return(0,n.useEffect)(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,n.createElement)(M,(0,i.Z)({"data-orientation":"vertical"},a,{ref:f,sizes:r,style:{top:0,right:"ltr"===l.dir?0:void 0,left:"rtl"===l.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":V(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(l.viewport){let n=l.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),n>0&&n{d.current&&l.viewport&&c&&o({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Z(c.paddingTop),paddingEnd:Z(c.paddingBottom)}})}}))}),[R,_]=x(O),M=(0,n.forwardRef)((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:a,onThumbChange:l,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:h,onResize:m,...v}=e,b=k(O,r),[x,w]=(0,n.useState)(null),S=s(t,e=>w(e)),j=(0,n.useRef)(null),E=(0,n.useRef)(""),C=b.viewport,I=o.content-o.viewport,P=g(h),A=g(d),T=K(m,10);function z(e){j.current&&p({x:e.clientX-j.current.left,y:e.clientY-j.current.top})}return(0,n.useEffect)(()=>{let e=e=>{let t=e.target;(null==x?void 0:x.contains(t))&&P(e,I)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[C,x,I,P]),(0,n.useEffect)(A,[o,A]),X(x,T),X(b.content,T),(0,n.createElement)(R,{scope:r,scrollbar:x,hasThumb:a,onThumbChange:g(l),onThumbPointerUp:g(c),onThumbPositionChange:A,onThumbPointerDown:g(u)},(0,n.createElement)(f.div,(0,i.Z)({},v,{ref:S,style:{position:"absolute",...v.style},onPointerDown:y(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),j.current=x.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",z(e))}),onPointerMove:y(e.onPointerMove,z),onPointerUp:y(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=E.current,j.current=null})})))}),D="ScrollAreaThumb",L=(0,n.forwardRef)((e,t)=>{let{forceMount:r,...o}=e,a=_(D,e.__scopeScrollArea);return(0,n.createElement)(h,{present:r||a.hasThumb},(0,n.createElement)(F,(0,i.Z)({ref:t},o)))}),F=(0,n.forwardRef)((e,t)=>{let{__scopeScrollArea:r,style:o,...a}=e,l=k(D,r),c=_(D,r),{onThumbPositionChange:u}=c,d=s(t,e=>c.onThumbChange(e)),p=(0,n.useRef)(),h=K(()=>{p.current&&(p.current(),p.current=void 0)},100);return(0,n.useEffect)(()=>{let e=l.viewport;if(e){let t=()=>{if(h(),!p.current){let t=G(e,u);p.current=t,u()}};return u(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[l.viewport,h,u]),(0,n.createElement)(f.div,(0,i.Z)({"data-state":c.hasThumb?"visible":"hidden"},a,{ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:y(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;c.onThumbPointerDown({x:r,y:n})}),onPointerUp:y(e.onPointerUp,c.onThumbPointerUp)}))}),U="ScrollAreaCorner",B=(0,n.forwardRef)((e,t)=>{let r=k(U,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?(0,n.createElement)(H,(0,i.Z)({},e,{ref:t})):null}),H=(0,n.forwardRef)((e,t)=>{let{__scopeScrollArea:r,...o}=e,a=k(U,r),[s,l]=(0,n.useState)(0),[c,u]=(0,n.useState)(0),d=!!(s&&c);return X(a.scrollbarX,()=>{var e;let t=(null===(e=a.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),u(t)}),X(a.scrollbarY,()=>{var e;let t=(null===(e=a.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),l(t)}),d?(0,n.createElement)(f.div,(0,i.Z)({},o,{ref:t,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}})):null});function Z(e){return e?parseInt(e,10):0}function W(e,t){let r=e/t;return isNaN(r)?0:r}function V(e){let t=W(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function $(e,t,r="ltr"){let n=V(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=function(e,[t,r]){return Math.min(r,Math.max(t,e))}(e,"ltr"===r?[0,a]:[-1*a,0]);return q([0,a],[0,o-n])(s)}function q(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}let G=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return!function i(){let o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,s=r.top!==o.top;(a||s)&&t(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function K(e,t){let r=g(e),i=(0,n.useRef)(0);return(0,n.useEffect)(()=>()=>window.clearTimeout(i.current),[]),(0,n.useCallback)(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,t)},[r,t])}function X(e,t){let r=g(t);p(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var J=r(64761),Y=r(97818),Q=(0,r(56817).k)((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:i},o)=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?t:void 0,paddingBottom:r?t:void 0},scrollbar:{display:i?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:t/5,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0],[`& .${o("thumb")}`]:{backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:t},'&[data-orientation="horizontal"]':{flexDirection:"column",height:t},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:o("thumb"),flex:1,backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:t,position:"relative",transition:"background-color 150ms ease",display:i?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:44,minHeight:44}},corner:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:i?"none":void 0}})),ee=r(64523),et=Object.defineProperty,er=Object.defineProperties,en=Object.getOwnPropertyDescriptors,ei=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,ea=Object.prototype.propertyIsEnumerable,es=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,el=(e,t)=>{for(var r in t||(t={}))eo.call(t,r)&&es(e,r,t[r]);if(ei)for(var r of ei(t))ea.call(t,r)&&es(e,r,t[r]);return e},ec=(e,t)=>er(e,en(t)),eu=(e,t)=>{var r={};for(var n in e)eo.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ei)for(var n of ei(e))0>t.indexOf(n)&&ea.call(e,n)&&(r[n]=e[n]);return r};let ed={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},ef=(0,n.forwardRef)((e,t)=>{let r=(0,J.N4)("ScrollArea",ed,e),{children:i,className:o,classNames:a,styles:s,scrollbarSize:l,scrollHideDelay:c,type:u,dir:d,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:h,unstyled:m,viewportProps:g}=r,v=eu(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","viewportProps"]),[y,b]=(0,n.useState)(!1),x=(0,J.rZ)(),{classes:w,cx:S}=Q({scrollbarSize:l,offsetScrollbars:f,scrollbarHovered:y,hidden:"never"===u},{name:"ScrollArea",classNames:a,styles:s,unstyled:m});return n.createElement(j,{type:"never"===u?"always":u,scrollHideDelay:c,dir:d||x.dir,ref:t,asChild:!0},n.createElement(ee.x,el({className:S(w.root,o)},v),n.createElement(E,ec(el({},g),{className:w.viewport,ref:p,onScroll:"function"==typeof h?({currentTarget:e})=>h({x:e.scrollLeft,y:e.scrollTop}):void 0}),i),n.createElement(C,{orientation:"horizontal",className:w.scrollbar,forceMount:!0,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},n.createElement(L,{className:w.thumb})),n.createElement(C,{orientation:"vertical",className:w.scrollbar,forceMount:!0,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},n.createElement(L,{className:w.thumb})),n.createElement(B,{className:w.corner})))}),ep=(0,n.forwardRef)((e,t)=>{let r=(0,J.N4)("ScrollAreaAutosize",ed,e),{maxHeight:i,children:o,classNames:a,styles:s,scrollbarSize:l,scrollHideDelay:c,type:u,dir:d,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:h,unstyled:m,sx:g}=r,v=eu(r,["maxHeight","children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx"]);return n.createElement(ee.x,ec(el({},v),{ref:t,sx:[{display:"flex",maxHeight:i},...(0,Y.R)(g)]}),n.createElement(ee.x,{sx:{display:"flex",flexDirection:"column",flex:1}},n.createElement(ef,{classNames:a,styles:s,scrollHideDelay:c,scrollbarSize:l,type:u,dir:d,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:h,unstyled:m},o)))});ep.displayName="@mantine/core/ScrollAreaAutosize",ef.displayName="@mantine/core/ScrollArea",ef.Autosize=ep;let eh=ef},73819:function(e,t,r){"use strict";r.d(t,{s:function(){return z}});var n=r(67294),i=r(73678),o=r(15851),a=r(36289),s=r(12185),l=r(10129),c=r(80665),u=r(64761),d=r(56817),f=Object.defineProperty,p=Object.defineProperties,h=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))g.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))v.call(t,r)&&y(e,r,t[r]);return e},x=(e,t)=>p(e,h(t));let w={xs:"3px 6px",sm:"5px 10px",md:"7px 14px",lg:"9px 16px",xl:"12px 20px"};var S=(0,d.k)((e,{fullWidth:t,color:r,radius:n,shouldAnimate:i,transitionDuration:o,transitionTimingFunction:a,size:s,orientation:l},c)=>{let u="vertical"===l,d=e.fn.variant({variant:"filled",color:r});return{label:x(b(b({ref:c("label")},e.fn.focusStyles()),e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",borderRadius:e.fn.radius(n),fontWeight:500,fontSize:s in e.fontSizes?e.fontSizes[s]:e.fontSizes.sm,cursor:"pointer",display:"block",textAlign:"center",padding:w[s in w?s:"sm"],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",userSelect:"none",color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[7],transition:`color ${i?0:o}ms ${a||e.transitionTimingFunction}`,"&:hover":{color:"dark"===e.colorScheme?e.colors.dark[0]:e.black}}),control:{ref:c("control"),position:"relative",boxSizing:"border-box",flex:1,zIndex:2,transition:`border-left-color ${i?0:o}ms ${a||e.transitionTimingFunction}`,"&:not(:first-of-type)":{borderStyle:"solid",borderWidth:u?"1px 0 0 0":"0 0 0 1px",borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}},input:{height:0,width:0,position:"absolute",overflow:"hidden",whiteSpace:"nowrap",opacity:0,"&:focus":{outline:"none",[`& + .${c("label")}`]:b({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${c("label")}`]:b({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)}}},root:{position:"relative",display:t||u?"flex":"inline-flex",width:u&&!t?"max-content":"auto",flexDirection:u?"column":"row",backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[1],borderRadius:e.fn.radius(n),overflow:"hidden",padding:4},controlActive:{borderLeftColor:"transparent !important",borderTopColor:"transparent !important",[`& + .${c("control")}`]:{borderLeftColor:"transparent !important",borderTopColor:"transparent !important"},borderRadius:e.fn.radius(n),boxShadow:i?r||"dark"===e.colorScheme?"none":e.shadows.xs:void 0,backgroundColor:i?r?d.background:"dark"===e.colorScheme?e.colors.dark[5]:e.white:void 0},labelActive:{"&, &:hover":{color:r||"dark"===e.colorScheme?e.white:e.black}},disabled:{"&, &:hover":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed"}},active:{boxSizing:"border-box",borderRadius:e.fn.radius(n),position:"absolute",zIndex:1,boxShadow:r||"dark"===e.colorScheme?"none":e.shadows.xs,transition:`transform ${i?0:o}ms ${e.transitionTimingFunction}, width ${i?0:o/2}ms ${a||e.transitionTimingFunction}`,backgroundColor:r?d.background:"dark"===e.colorScheme?e.colors.dark[5]:e.white}}}),k=r(64523),j=Object.defineProperty,E=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,I=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&I(e,r,t[r]);if(E)for(var r of E(t))C.call(t,r)&&I(e,r,t[r]);return e},A=(e,t)=>{var r={};for(var n in e)O.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&E)for(var n of E(e))0>t.indexOf(n)&&C.call(e,n)&&(r[n]=e[n]);return r};let T={disabled:!1,size:"sm",transitionDuration:200},z=(0,n.forwardRef)((e,t)=>{var r,d,f,p;let h=(0,u.N4)("SegmentedControl",T,e),{className:m,disabled:g,data:v,name:y,value:b,onChange:x,color:w,fullWidth:j,radius:E,size:O,transitionDuration:C,transitionTimingFunction:I,classNames:z,styles:N,defaultValue:R,orientation:_,unstyled:M}=h,D=A(h,["className","disabled","data","name","value","onChange","color","fullWidth","radius","size","transitionDuration","transitionTimingFunction","classNames","styles","defaultValue","orientation","unstyled"]),L=(0,u.rZ)(),F=(0,i.J)(),U=!!L.respectReducedMotion&&F,B=v.map(e=>"string"==typeof e?{label:e,value:e}:e),H=(0,n.useRef)(),[Z,W]=(0,n.useState)(!1),[V,$]=(0,o.C)({value:b,defaultValue:R,finalValue:Array.isArray(B)&&null!=(p=null!=(f=null==(r=B.find(e=>!e.disabled))?void 0:r.value)?f:null==(d=B[0])?void 0:d.value)?p:null,onChange:x}),{classes:q,cx:G}=S({size:O,fullWidth:j,color:w,radius:E,shouldAnimate:U||!Z,transitionDuration:C,transitionTimingFunction:I,orientation:_},{classNames:z,styles:N,unstyled:M,name:"SegmentedControl"}),[K,X]=(0,n.useState)({width:0,height:0,translate:[0,0]}),J=(0,a.M)(y),Y=(0,n.useRef)({}),[Q,ee]=(0,s.y)();(0,l.Y)(()=>{H.current?W(!0):(H.current=!0,W(!1))}),(0,n.useEffect)(()=>{if(V in Y.current&&Q.current){let e=Y.current[V],t=e.getBoundingClientRect(),r=e.offsetWidth/t.width,n=t.width*r||0,i=t.height*r||0,o=ee.width-e.parentElement.offsetLeft+4-n,a=e.parentElement.offsetLeft-4;X({width:n,height:i,translate:["rtl"===L.dir?o:a,e.parentElement.offsetTop-4]})}},[V,ee]);let et=B.map(e=>n.createElement("div",{className:G(q.control,{[q.controlActive]:V===e.value}),key:e.value},n.createElement("input",{className:q.input,disabled:g||e.disabled,type:"radio",name:J,value:e.value,id:`${J}-${e.value}`,checked:V===e.value,onChange:()=>$(e.value)}),n.createElement("label",{className:G(q.label,{[q.labelActive]:V===e.value,[q.disabled]:g||e.disabled}),htmlFor:`${J}-${e.value}`,ref:t=>{Y.current[e.value]=t}},e.label))),er=(0,c.Y)(Q,t);return 0===B.length?null:n.createElement(k.x,P({className:G(q.root,m),ref:er},D),"string"==typeof V&&Z&&n.createElement(k.x,{component:"span",className:q.active,sx:{width:K.width,height:K.height,transform:`translate(${K.translate[0]}px, ${K.translate[1]}px )`}}),et)});z.displayName="@mantine/core/SegmentedControl"},66879:function(e,t,r){"use strict";r.d(t,{A:function(){return d}});var n=r(67294),i=Object.defineProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&l(e,r,t[r]);return e},u=(e,t)=>{var r={};for(var n in e)a.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&o)for(var n of o(e))0>t.indexOf(n)&&s.call(e,n)&&(r[n]=e[n]);return r};let d=(0,n.forwardRef)((e,t)=>{var{label:r,value:i}=e,o=u(e,["label","value"]);return n.createElement("div",c({ref:t},o),r||i)});d.displayName="@mantine/core/DefaultItem"},28855:function(e,t,r){"use strict";r.d(t,{Ph:function(){return P}});var n=r(67294),i=r(32819),o=r(15851),a=r(37048),s=r(80665),l=r(3594),c=r(65053),u=r(75851),d=r(66879),f=r(72098),p=r(97176),h=r(1118),m=(0,r(56817).k)(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}})),g=r(66261),v=r(94151),y=Object.defineProperty,b=Object.defineProperties,x=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&j(e,r,t[r]);if(w)for(var r of w(t))k.call(t,r)&&j(e,r,t[r]);return e},O=(e,t)=>b(e,x(t)),C=(e,t)=>{var r={};for(var n in e)S.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&w)for(var n of w(e))0>t.indexOf(n)&&k.call(e,n)&&(r[n]=e[n]);return r};let I={required:!1,size:"sm",shadow:"sm",itemComponent:d.A,transition:"fade",transitionDuration:0,initiallyOpened:!1,filter:function(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())},maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:function(e,t){return!!e&&!t.some(t=>t.label.toLowerCase()===e.toLowerCase())},selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:(0,l.w)("popover"),clearButtonTabIndex:0,positionDependencies:[],dropdownPosition:"flip"},P=(0,n.forwardRef)((e,t)=>{let r=(0,g.k)("Select",I,e),{inputProps:l,wrapperProps:d,shadow:y,data:b,value:x,defaultValue:w,onChange:S,itemComponent:k,onKeyDown:j,onBlur:P,onFocus:A,transition:T,transitionDuration:z,initiallyOpened:N,transitionTimingFunction:R,unstyled:_,classNames:M,styles:D,filter:L,maxDropdownHeight:F,searchable:U,clearable:B,nothingFound:H,clearButtonLabel:Z,limit:W,disabled:V,onSearchChange:$,searchValue:q,rightSection:G,rightSectionWidth:K,creatable:X,getCreateLabel:J,shouldCreate:Y,selectOnBlur:Q,onCreate:ee,dropdownComponent:et,onDropdownClose:er,onDropdownOpen:en,withinPortal:ei,switchDirectionOnFlip:eo,zIndex:ea,name:es,dropdownPosition:el,allowDeselect:ec,placeholder:eu,filterDataOnExactSearchMatch:ed,clearButtonTabIndex:ef,form:ep,positionDependencies:eh,readOnly:em,hoverOnSearchChange:eg}=r,ev=C(r,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transition","transitionDuration","initiallyOpened","transitionTimingFunction","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","clearButtonLabel","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","clearButtonTabIndex","form","positionDependencies","readOnly","hoverOnSearchChange"]),{classes:ey,cx:eb,theme:ex}=m(),[ew,eS]=(0,n.useState)(N),[ek,ej]=(0,n.useState)(-1),eE=(0,n.useRef)(),eO=(0,n.useRef)({}),[eC,eI]=(0,n.useState)("column"),eP="column"===eC,{scrollIntoView:eA,targetRef:eT,scrollableRef:ez}=(0,i.g)({duration:0,offset:5,cancelable:!1,isList:!0}),eN=void 0===ec?B:ec,eR=e=>{if(ew!==e){eS(e);let t=e?en:er;"function"==typeof t&&t()}},e_=X&&"function"==typeof J,eM=null,eD=b.map(e=>"string"==typeof e?{label:e,value:e}:e),eL=(0,c.j)({data:eD}),[eF,eU,eB]=(0,o.C)({value:x,defaultValue:w,finalValue:null,onChange:S}),eH=eL.find(e=>e.value===eF),[eZ,eW]=(0,o.C)({value:q,defaultValue:(null==eH?void 0:eH.label)||"",finalValue:void 0,onChange:$}),eV=e=>{eW(e),U&&"function"==typeof $&&$(e)};(0,n.useEffect)(()=>{let e=eL.find(e=>e.value===eF);e?eV(e.label):e_&&eF||eV("")},[eF]),(0,n.useEffect)(()=>{!eH||U&&ew||eV(eH.label)},[null==eH?void 0:eH.label]);let e$=e=>{if(!em){if(eN&&(null==eH?void 0:eH.value)===e.value)eU(null),eR(!1);else{if(e.creatable&&"function"==typeof ee){let t=ee(e.value);null!=t&&("string"==typeof t?eU(t):eU(t.value))}else eU(e.value);eB||eV(e.label),ej(-1),eR(!1),eE.current.focus()}}},eq=function({data:e,searchable:t,limit:r,searchValue:n,filter:i,value:o,filterDataOnExactSearchMatch:a}){if(!t)return e;let s=null!=o&&e.find(e=>e.value===o)||null;if(s&&!a&&(null==s?void 0:s.label)===n){if(r){if(r>=e.length)return e;let t=e.indexOf(s),n=t+r,i=n-e.length;return i>0?e.slice(t-i):e.slice(t,n)}return e}let l=[];for(let t=0;t=r));t+=1);return l}({data:eL,searchable:U,limit:W,searchValue:eZ,filter:L,filterDataOnExactSearchMatch:ed,value:eF});e_&&Y(eZ,eq)&&(eM=J(eZ),eq.push({label:eZ,value:eZ,creatable:!0}));let eG=(e,t,r)=>{let n=e;for(;r(n);)if(!eq[n=t(n)].disabled)return n;return e};(0,a.l)(()=>{eg&&eZ?ej(0):ej(-1)},[eZ,eg]);let eK=eF?eq.findIndex(e=>e.value===eF):0,eX=!em&&(eq.length>0?ew:ew&&!!H),eJ=()=>{ej(e=>{var t;let r=eG(e,e=>e-1,e=>e>0);return eT.current=eO.current[null==(t=eq[r])?void 0:t.value],eX&&eA({alignment:eP?"start":"end"}),r})},eY=()=>{ej(e=>{var t;let r=eG(e,e=>e+1,e=>ewindow.setTimeout(()=>{var e;eT.current=eO.current[null==(e=eq[eK])?void 0:e.value],eA({alignment:eP?"end":"start"})},0);return(0,a.l)(()=>{eX&&eQ()},[eX]),n.createElement(v.I.Wrapper,O(E({},d),{__staticSelector:"Select"}),n.createElement(h.v,{opened:eX,transition:T,transitionDuration:z,shadow:"sm",withinPortal:ei,__staticSelector:"Select",onDirectionChange:eI,switchDirectionOnFlip:eo,zIndex:ea,dropdownPosition:el,positionDependencies:[...eh,eZ],classNames:M,styles:D,unstyled:_},n.createElement(h.v.Target,null,n.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":eX?`${l.id}-items`:null,"aria-controls":l.id,"aria-expanded":eX,onMouseLeave:()=>ej(-1),tabIndex:-1},n.createElement("input",{type:"hidden",name:es,value:eF||"",form:ep,disabled:V}),n.createElement(v.I,E(O(E(E({autoComplete:"off",type:"search"},l),ev),{ref:(0,s.Y)(t,eE),onKeyDown:e=>{switch("function"==typeof j&&j(e),e.key){case"ArrowUp":e.preventDefault(),ew?eP?eJ():eY():(ej(eK),eR(!0),eQ());break;case"ArrowDown":e.preventDefault(),ew?eP?eY():eJ():(ej(eK),eR(!0),eQ());break;case"Home":!U&&(e.preventDefault(),ew||eR(!0),ej(eq.findIndex(e=>!e.disabled)),eX&&eA({alignment:eP?"end":"start"}));break;case"End":!U&&(e.preventDefault(),ew||eR(!0),ej(eq.map(e=>!!e.disabled).lastIndexOf(!1)),eX&&eA({alignment:eP?"end":"start"}));break;case"Escape":e.preventDefault(),eR(!1),ej(-1);break;case" ":U||(e.preventDefault(),eq[ek]&&ew?e$(eq[ek]):(eR(!0),ej(eK),eQ()));break;case"Enter":U||e.preventDefault(),eq[ek]&&ew&&(e.preventDefault(),e$(eq[ek]))}},__staticSelector:"Select",value:eZ,placeholder:eu,onChange:e=>{em||(eV(e.currentTarget.value),B&&""===e.currentTarget.value&&eU(null),ej(-1),eR(!0))},"aria-autocomplete":"list","aria-controls":eX?`${l.id}-items`:null,"aria-activedescendant":ek>=0?`${l.id}-${ek}`:null,onMouseDown:()=>{em||(eR(!ew),eF&&!ew&&ej(eK))},onBlur:e=>{"function"==typeof P&&P(e);let t=eL.find(e=>e.value===eF);Q&&eq[ek]&&ew&&e$(eq[ek]),eV((null==t?void 0:t.label)||""),eR(!1)},onFocus:e=>{"function"==typeof A&&A(e),U&&eR(!0)},readOnly:!U||em,disabled:V,"data-mantine-stop-propagation":eX,name:null,classNames:O(E({},M),{input:eb({[ey.input]:!U},null==M?void 0:M.input)})}),(0,f.o)({theme:ex,rightSection:G,rightSectionWidth:K,styles:D,size:l.size,shouldClear:B&&!!eH,clearButtonLabel:Z,onClear:()=>{var e;em||(eU(null),eB||eV(""),null==(e=eE.current)||e.focus())},error:d.error,clearButtonTabIndex:ef,disabled:V,readOnly:em}))))),n.createElement(h.v.Dropdown,{component:et||u.r,maxHeight:F,direction:eC,id:l.id,innerRef:ez,__staticSelector:"Select",classNames:M,styles:D},n.createElement(p.j,{data:eq,hovered:ek,classNames:M,styles:D,isItemSelected:e=>e===eF,uuid:l.id,__staticSelector:"Select",onItemHover:ej,onItemSelect:e$,itemsRefs:eO,itemComponent:k,size:l.size,nothingFound:H,creatable:e_&&!!eM,createLabel:eM,"aria-label":d.label,unstyled:_}))))});P.displayName="@mantine/core/Select"},97176:function(e,t,r){"use strict";r.d(t,{j:function(){return j}});var n=r(67294),i=r(89058),o=r(95117),a=r(54777),s=r(56817),l=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(d)for(var r of d(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>c(e,u(t)),v=(0,s.k)((e,{size:t})=>({item:g(m({},e.fn.fontStyles()),{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`${e.fn.size({size:t,sizes:e.spacing})/1.5}px ${e.fn.size({size:t,sizes:e.spacing})}px`,cursor:"pointer",fontSize:e.fn.size({size:t,sizes:e.fontSizes}),color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":m({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:e.fn.size({size:t,sizes:e.spacing})/2,paddingBottom:e.fn.size({size:t,sizes:e.spacing})/2,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`${e.fn.size({size:t,sizes:e.spacing})/1.5}px ${e.fn.size({size:t,sizes:e.spacing})}px`},separatorLabel:{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}})),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e};function j({data:e,hovered:t,classNames:r,styles:s,isItemSelected:l,uuid:c,__staticSelector:u,onItemHover:d,onItemSelect:f,itemsRefs:p,itemComponent:h,size:m,nothingFound:g,creatable:y,createLabel:b,unstyled:x}){let{classes:w}=v({size:m},{classNames:r,styles:s,unstyled:x,name:u}),S=[],j=[],E=null,O=(e,r)=>{let i="function"==typeof l&&l(e.value);return n.createElement(h,k({key:e.value,className:w.item,"data-disabled":e.disabled||void 0,"data-hovered":!e.disabled&&t===r||void 0,"data-selected":!e.disabled&&i||void 0,selected:i,onMouseEnter:()=>d(r),id:`${c}-${r}`,role:"option",tabIndex:-1,"aria-selected":t===r,ref:t=>{p&&p.current&&(p.current[e.value]=t)},onMouseDown:e.disabled?null:t=>{t.preventDefault(),f(e)},disabled:e.disabled},e))},C=null;if(e.forEach((e,t)=>{e.creatable?E=t:e.group?(C!==e.group&&(C=e.group,j.push(n.createElement("div",{className:w.separator,key:`__mantine-divider-${t}`},n.createElement(a.i,{classNames:{label:w.separatorLabel},label:e.group})))),j.push(O(e,t))):S.push(O(e,t))}),y){let r=e[E];S.push(n.createElement("div",{key:(0,i.k)(),className:w.item,"data-hovered":t===E||void 0,onMouseEnter:()=>d(E),onMouseDown:e=>{e.preventDefault(),f(r)},tabIndex:-1,ref:e=>{p&&p.current&&(p.current[r.value]=e)}},b))}return j.length>0&&S.length>0&&S.unshift(n.createElement("div",{className:w.separator,key:"empty-group-separator"},n.createElement(a.i,null))),j.length>0||S.length>0?n.createElement(n.Fragment,null,j,S):n.createElement(o.x,{size:m,unstyled:x,className:w.nothingFound},g)}j.displayName="@mantine/core/SelectItems"},1118:function(e,t,r){"use strict";r.d(t,{v:function(){return m}});var n=r(67294),i=r(75851),o=(0,r(56817).k)(()=>({dropdown:{},itemsWrapper:{padding:4,display:"flex",width:"100%",boxSizing:"border-box"}})),a=r(40633),s=r(64523),l=Object.defineProperty,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};function m({opened:e,transition:t="fade",transitionDuration:r=0,shadow:i,withinPortal:o,children:s,__staticSelector:l,onDirectionChange:c,switchDirectionOnFlip:u,zIndex:d,dropdownPosition:f,positionDependencies:p=[],classNames:h,styles:m,unstyled:g,readOnly:v}){return n.createElement(a.J,{unstyled:g,classNames:h,styles:m,width:"target",withRoles:!1,opened:e,middlewares:{flip:"flip"===f,shift:!1},position:"flip"===f?"bottom":f,positionDependencies:p,zIndex:d,__staticSelector:l,withinPortal:o,transition:t,transitionDuration:r,shadow:i,disabled:v,onPositionChange:e=>u&&(null==c?void 0:c("top"===e?"column-reverse":"column"))},s)}m.Target=a.J.Target,m.Dropdown=function(e){var{children:t,component:r="div",maxHeight:l=220,direction:c="column",id:u,innerRef:d,__staticSelector:f,styles:m,classNames:g,unstyled:v}=e,y=h(e,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);let{classes:b}=o(null,{name:f,styles:m,classNames:g,unstyled:v});return n.createElement(a.J.Dropdown,p({p:0,onMouseDown:e=>e.preventDefault()},y),n.createElement("div",{style:{maxHeight:l,display:"flex"}},n.createElement(s.x,{component:r||"div",id:`${u}-items`,"aria-labelledby":`${u}-label`,role:"listbox",onMouseDown:e=>e.preventDefault(),style:{flex:1,overflowY:r!==i.r?"auto":void 0},"data-combobox-popover":!0,ref:d},n.createElement("div",{className:b.itemsWrapper,style:{flexDirection:c}},t))))}},87208:function(e,t,r){"use strict";r.d(t,{D:function(){return p}});var n=r(67294),i=r(64761),o=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r};let f={xs:14,sm:18,md:20,lg:24,xl:28};function p(e){var{size:t,error:r,style:o}=e,a=d(e,["size","error","style"]);let s=(0,i.rZ)(),l=s.fn.size({size:t,sizes:f});return n.createElement("svg",u({width:l,height:l,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:u({color:r?s.colors.red[6]:s.colors.gray[6]},o),"data-chevron":!0},a),n.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}},72098:function(e,t,r){"use strict";r.d(t,{o:function(){return y}});var n=r(67294),i=r(87208),o=r(80971);function a({shouldClear:e,clearButtonLabel:t,onClear:r,size:a,error:s,clearButtonTabIndex:l}){return e?n.createElement(o.P,{variant:"transparent","aria-label":t,onClick:r,size:a,tabIndex:l,onMouseDown:e=>e.preventDefault()}):n.createElement(i.D,{error:s,size:a})}a.displayName="@mantine/core/SelectRightSection";var s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t)),g=(e,t)=>{var r={};for(var n in e)d.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&f.call(e,n)&&(r[n]=e[n]);return r};let v={xs:24,sm:30,md:34,lg:44,xl:54};function y(e){var{styles:t,rightSection:r,rightSectionWidth:i,theme:o}=e,s=g(e,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:i,styles:t};let l="function"==typeof t?t(o):t;return{rightSectionWidth:o.fn.size({size:s.size,sizes:v}),rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&n.createElement(a,h({},s)),styles:m(h({},l),{rightSection:m(h({},null==l?void 0:l.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}},75851:function(e,t,r){"use strict";r.d(t,{r:function(){return m}});var n=r(67294),i=r(73723),o=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>a(e,s(t)),h=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};let m=(0,n.forwardRef)((e,t)=>{var{style:r}=e,o=h(e,["style"]);return n.createElement(i.x,p(f({},o),{style:f({width:"100%"},r),viewportRef:t}),o.children)});m.displayName="@mantine/core/SelectScrollArea"},69469:function(e,t,r){"use strict";r.d(t,{M:function(){return k}});var n=r(67294),i=r(64761),o=r(56817),a=r(83687),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(0,o.k)((e,{spacing:t,breakpoints:r,cols:n,verticalSpacing:i})=>{let o=null!=i,s=(0,a.I)(e,r).reduce((r,n)=>{var a,s;let l="maxWidth"in n?"max-width":"min-width",c=e.fn.size({size:"max-width"===l?n.maxWidth:n.minWidth,sizes:e.breakpoints});return r[`@media (${l}: ${c-("max-width"===l?1:0)}px)`]={gridTemplateColumns:`repeat(${n.cols}, minmax(0, 1fr))`,gap:`${e.fn.size({size:null!=(a=n.verticalSpacing)?a:o?i:t,sizes:e.spacing})}px ${e.fn.size({size:null!=(s=n.spacing)?s:t,sizes:e.spacing})}px`},r},{});return{root:f({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`,gap:`${e.fn.size({size:o?i:t,sizes:e.spacing})}px ${e.fn.size({size:t,sizes:e.spacing})}px`},s)}}),h=r(64523),m=Object.defineProperty,g=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(e,t,r)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&b(e,r,t[r]);if(g)for(var r of g(t))y.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>{var r={};for(var n in e)v.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&g)for(var n of g(e))0>t.indexOf(n)&&y.call(e,n)&&(r[n]=e[n]);return r};let S={breakpoints:[],cols:1,spacing:"md"},k=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("SimpleGrid",S,e),{className:o,breakpoints:a,cols:s,spacing:l,verticalSpacing:c,children:u,unstyled:d}=r,f=w(r,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled"]),{classes:m,cx:g}=p({breakpoints:a,cols:s,spacing:l,verticalSpacing:c},{unstyled:d,name:"SimpleGrid"});return n.createElement(h.x,x({className:g(m.root,o),ref:t},f),u)});k.displayName="@mantine/core/SimpleGrid"},83687:function(e,t,r){"use strict";function n(e,t){if(0===t.length)return t;let r="maxWidth"in t[0]?"maxWidth":"minWidth",n=[...t].sort((t,n)=>e.fn.size({size:n[r],sizes:e.breakpoints})-e.fn.size({size:t[r],sizes:e.breakpoints}));return"minWidth"===r?n.reverse():n}r.d(t,{I:function(){return n}})},38623:function(e,t,r){"use strict";r.d(t,{O:function(){return y}});var n=r(67294),i=r(64761),o=r(70917),a=r(56817);let s=(0,o.F4)({"from, to":{opacity:.4},"50%":{opacity:1}});var l=(0,a.k)((e,{height:t,width:r,radius:n,circle:i,animate:o})=>({root:{height:t,width:i?t:r,borderRadius:i?t:e.fn.radius(n),position:"relative",WebkitTransform:"translateZ(0)"},visible:{overflow:"hidden","&::before":{content:'""',position:"absolute",background:"dark"===e.colorScheme?e.colors.dark[7]:e.white,top:0,bottom:0,left:0,right:0,zIndex:10},"&::after":{content:'""',position:"absolute",background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3],top:0,bottom:0,left:0,right:0,animation:o?`${s} 1500ms linear infinite`:"none",zIndex:11}}})),c=r(64523),u=Object.defineProperty,d=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&h(e,r,t[r]);if(d)for(var r of d(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>{var r={};for(var n in e)f.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&d)for(var n of d(e))0>t.indexOf(n)&&p.call(e,n)&&(r[n]=e[n]);return r};let v={height:"auto",width:"100%",visible:!0,animate:!0},y=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Skeleton",v,e),{height:o,width:a,visible:s,animate:u,className:d,circle:f,radius:p,unstyled:h}=r,y=g(r,["height","width","visible","animate","className","circle","radius","unstyled"]),{classes:b,cx:x}=l({height:o,width:a,circle:f,radius:p,animate:u},{unstyled:h,name:"Skeleton"});return n.createElement(c.x,m({className:x(b.root,{[b.visible]:s},d),ref:t},y))});y.displayName="@mantine/core/Skeleton"},45050:function(e,t,r){"use strict";r.d(t,{i:function(){return ev}});var n=r(67294),i=r(15851),o=r(9276),a=r(47776),s=r(80665),l=r(64761);function c({value:e,min:t,max:r}){return Math.min(Math.max((e-t)/(r-t)*100,0),100)}var u=r(56817),d=Object.defineProperty,f=Object.defineProperties,p=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(h)for(var r of h(t))g.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>f(e,p(t));let x={xs:4,sm:6,md:8,lg:10,xl:12};var w=(0,u.k)((e,{size:t,disabled:r})=>({root:b(y({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,height:2*e.fn.size({sizes:x,size:t}),display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",touchAction:"none"})})),S=Object.defineProperty,k=Object.defineProperties,j=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,I=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&I(e,r,t[r]);if(E)for(var r of E(t))C.call(t,r)&&I(e,r,t[r]);return e},A=(e,t)=>k(e,j(t)),T=(0,u.k)((e,{color:t,size:r,disabled:n,thumbSize:i})=>({label:{position:"absolute",top:-36,backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:A(P({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:n?"none":"flex",height:i||2*e.fn.size({sizes:x,size:r}),width:i||2*e.fn.size({sizes:x,size:r}),backgroundColor:"dark"===e.colorScheme?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`4px solid ${"dark"===e.colorScheme?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:"dark"===e.colorScheme?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}})),z=r(64523),N=r(97688);let R=(0,n.forwardRef)(({max:e,min:t,value:r,position:i,label:o,dragging:a,onMouseDown:s,color:l,classNames:c,styles:u,size:d,labelTransition:f,labelTransitionDuration:p,labelTransitionTimingFunction:h,labelAlwaysOn:m,thumbLabel:g,onFocus:v,onBlur:y,showLabelOnHover:b,children:x=null,disabled:w,unstyled:S,thumbSize:k},j)=>{let{classes:E,cx:O,theme:C}=T({color:l,size:d,disabled:w,thumbSize:k},{classNames:c,styles:u,unstyled:S,name:"Slider"}),[I,P]=(0,n.useState)(!1),A=m||a||I||b;return n.createElement(z.x,{tabIndex:0,role:"slider","aria-label":g,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:j,className:O(E.thumb,{[E.dragging]:a}),onFocus:()=>{P(!0),"function"==typeof v&&v()},onBlur:()=>{P(!1),"function"==typeof y&&y()},onTouchStart:s,onMouseDown:s,onClick:e=>e.stopPropagation(),style:{["rtl"===C.dir?"right":"left"]:`${i}%`}},x,n.createElement(N.u,{mounted:null!=o&&A,duration:p,transition:f,timingFunction:h||C.transitionTimingFunction},e=>n.createElement("div",{style:e,className:E.label},o)))});R.displayName="@mantine/core/SliderThumb";var _=(0,u.k)((e,{size:t,color:r,disabled:n})=>({markWrapper:{position:"absolute",top:0,zIndex:2},mark:{boxSizing:"border-box",border:`${e.fn.size({size:t,sizes:x})>=8?"2px":"1px"} solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]}`,height:e.fn.size({sizes:x,size:t}),width:e.fn.size({sizes:x,size:t}),borderRadius:1e3,transform:`translateX(-${e.fn.size({sizes:x,size:t})/2}px)`,backgroundColor:e.white},markFilled:{borderColor:n?"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background},markLabel:{transform:"translate(-50%, 0)",fontSize:e.fontSizes.sm,color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],marginTop:`calc(${e.spacing.xs}px / 2)`,whiteSpace:"nowrap"}}));function M({marks:e,color:t,size:r,min:i,max:o,value:a,classNames:s,styles:l,offset:u,onChange:d,disabled:f,unstyled:p,inverted:h}){let{classes:m,cx:g}=_({size:r,color:t,disabled:f},{classNames:s,styles:l,unstyled:p,name:"Slider"}),v=e.map((e,t)=>n.createElement(z.x,{className:m.markWrapper,sx:{left:`${c({value:e.value,min:i,max:o})}%`},key:t},n.createElement("div",{className:g(m.mark,{[m.markFilled]:function({mark:e,offset:t,value:r,inverted:n=!1}){return n?"number"==typeof t&&e.value<=t||e.value>=r:"number"==typeof t?e.value>=t&&e.value<=r:e.value<=r}({mark:e,value:a,offset:u,inverted:h})})}),e.label&&n.createElement("div",{className:m.markLabel,onMouseDown:t=>{t.stopPropagation(),d(e.value)},onTouchStart:t=>{t.stopPropagation(),d(e.value)}},e.label)));return n.createElement("div",null,v)}M.displayName="@mantine/core/SliderMarks";var D=(0,u.k)((e,{radius:t,size:r,color:n,disabled:i,inverted:o})=>({track:{position:"relative",height:e.fn.size({sizes:x,size:r}),width:"100%",marginRight:e.fn.size({size:r,sizes:x}),marginLeft:e.fn.size({size:r,sizes:x}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.size({size:t,sizes:e.radius}),right:-e.fn.size({size:r,sizes:x}),left:-e.fn.size({size:r,sizes:x}),backgroundColor:o?i?"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:n}).background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]:i?"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:n}).background,borderRadius:e.fn.size({size:t,sizes:e.radius})}})),L=Object.defineProperty,F=Object.defineProperties,U=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,W=(e,t,r)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&W(e,r,t[r]);if(B)for(var r of B(t))Z.call(t,r)&&W(e,r,t[r]);return e},$=(e,t)=>F(e,U(t)),q=(e,t)=>{var r={};for(var n in e)H.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&B)for(var n of B(e))0>t.indexOf(n)&&Z.call(e,n)&&(r[n]=e[n]);return r};function G(e){var{filled:t,size:r,color:i,classNames:o,styles:a,radius:s,children:l,offset:c,onMouseLeave:u,onMouseEnter:d,disabled:f,marksOffset:p,unstyled:h,inverted:m}=e,g=q(e,["filled","size","color","classNames","styles","radius","children","offset","onMouseLeave","onMouseEnter","disabled","marksOffset","unstyled","inverted"]);let{classes:v}=D({color:i,size:r,radius:s,disabled:f,inverted:m},{classNames:o,styles:a,unstyled:h,name:"Slider"});return n.createElement("div",{className:v.track,onMouseLeave:u,onMouseEnter:d},n.createElement(z.x,{className:v.bar,sx:e=>({left:`calc(${c}% - ${e.fn.size({size:r,sizes:x})}px)`,width:`calc(${t}% + ${e.fn.size({size:r,sizes:x})}px)`})}),l,n.createElement(M,$(V({},g),{size:r,color:i,offset:p,classNames:o,styles:a,disabled:f,unstyled:h,inverted:m})))}G.displayName="@mantine/core/SliderTrack";var K=Object.defineProperty,X=Object.defineProperties,J=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,et=(e,t,r)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,er=(e,t)=>{for(var r in t||(t={}))Q.call(t,r)&&et(e,r,t[r]);if(Y)for(var r of Y(t))ee.call(t,r)&&et(e,r,t[r]);return e},en=(e,t)=>X(e,J(t)),ei=(e,t)=>{var r={};for(var n in e)Q.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Y)for(var n of Y(e))0>t.indexOf(n)&&ee.call(e,n)&&(r[n]=e[n]);return r};let eo=(0,n.forwardRef)((e,t)=>{var{className:r,size:i,classNames:o,styles:a,disabled:s,unstyled:l}=e,c=ei(e,["className","size","classNames","styles","disabled","unstyled"]);let{classes:u,cx:d}=w({size:i,disabled:s},{classNames:o,styles:a,unstyled:l,name:"Slider"});return n.createElement(z.x,en(er({},c),{tabIndex:-1,className:d(u.root,r),ref:t}))});eo.displayName="@mantine/core/SliderRoot";var ea=Object.defineProperty,es=Object.defineProperties,el=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,ed=Object.prototype.propertyIsEnumerable,ef=(e,t,r)=>t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ep=(e,t)=>{for(var r in t||(t={}))eu.call(t,r)&&ef(e,r,t[r]);if(ec)for(var r of ec(t))ed.call(t,r)&&ef(e,r,t[r]);return e},eh=(e,t)=>es(e,el(t)),em=(e,t)=>{var r={};for(var n in e)eu.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ec)for(var n of ec(e))0>t.indexOf(n)&&ed.call(e,n)&&(r[n]=e[n]);return r};let eg={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},ev=(0,n.forwardRef)((e,t)=>{let r=(0,l.N4)("Slider",eg,e),{classNames:u,styles:d,color:f,value:p,onChange:h,onChangeEnd:m,size:g,radius:v,min:y,max:b,step:x,precision:w,defaultValue:S,name:k,marks:j,label:E,labelTransition:O,labelTransitionDuration:C,labelTransitionTimingFunction:I,labelAlwaysOn:P,thumbLabel:A,showLabelOnHover:T,thumbChildren:z,disabled:N,unstyled:_,thumbSize:M,scale:D,inverted:L}=r,F=em(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted"]),U=(0,l.rZ)(),[B,H]=(0,n.useState)(!1),[Z,W]=(0,i.C)({value:"number"==typeof p?(0,o.u)(p,y,b):p,defaultValue:"number"==typeof S?(0,o.u)(S,y,b):S,finalValue:(0,o.u)(0,y,b),onChange:h}),V=(0,n.useRef)(Z),$=(0,n.useRef)(),q=c({value:Z,min:y,max:b}),K=D(Z),X="function"==typeof E?E(K):E,J=(0,n.useCallback)(({x:e})=>{if(!N){let t=function({value:e,containerWidth:t,min:r,max:n,step:i,precision:o}){let a=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),s=Math.max((0!==a?Math.round(a/i)*i:0)+r,r);return void 0!==o?Number(s.toFixed(o)):s}({value:e,min:y,max:b,step:x,precision:w});W(t),V.current=t}},[N,y,b,x,w]),{ref:Y,active:Q}=(0,a.r)(J,{onScrubEnd:()=>null==m?void 0:m(V.current)},U.dir);return n.createElement(eo,eh(ep({},F),{size:g,ref:(0,s.Y)(Y,t),onKeyDownCapture:e=>{if(!N)switch(e.key){case"ArrowUp":{e.preventDefault(),$.current.focus();let t=Math.min(Math.max(Z+x,y),b);null==m||m(t),W(t);break}case"ArrowRight":{e.preventDefault(),$.current.focus();let t=Math.min(Math.max("rtl"===U.dir?Z-x:Z+x,y),b);null==m||m(t),W(t);break}case"ArrowDown":{e.preventDefault(),$.current.focus();let t=Math.min(Math.max(Z-x,y),b);null==m||m(t),W(t);break}case"ArrowLeft":{e.preventDefault(),$.current.focus();let t=Math.min(Math.max("rtl"===U.dir?Z+x:Z-x,y),b);null==m||m(t),W(t);break}case"Home":e.preventDefault(),$.current.focus(),null==m||m(y),W(y);break;case"End":e.preventDefault(),$.current.focus(),null==m||m(b),W(b)}},onMouseDownCapture:()=>{var e;return null==(e=Y.current)?void 0:e.focus()},classNames:u,styles:d,disabled:N,unstyled:_}),n.createElement(G,{inverted:L,offset:0,filled:q,marks:j,size:g,radius:v,color:f,min:y,max:b,value:K,onChange:W,onMouseEnter:T?()=>H(!0):void 0,onMouseLeave:T?()=>H(!1):void 0,classNames:u,styles:d,disabled:N,unstyled:_},n.createElement(R,{max:b,min:y,value:K,position:q,dragging:Q,color:f,size:g,label:X,ref:$,onMouseDown:e=>{e.stopPropagation()},labelTransition:O,labelTransitionDuration:C,labelTransitionTimingFunction:I,labelAlwaysOn:P,classNames:u,styles:d,thumbLabel:A,showLabelOnHover:T&&B,disabled:N,unstyled:_,thumbSize:M},z)),n.createElement("input",{type:"hidden",name:k,value:K}))});ev.displayName="@mantine/core/Slider"},47834:function(e,t,r){"use strict";r.d(t,{o:function(){return v}});var n=r(67294),i=r(64761),o=r(12185),a=(0,r(56817).k)((e,{transitionDuration:t})=>({control:{},root:{position:"relative"},content:{display:"flex",flexDirection:"column",overflow:"hidden",transitionProperty:"max-height",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}})),s=r(64523),l=r(54685),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>{var r={};for(var n in e)d.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&f.call(e,n)&&(r[n]=e[n]);return r};let g={maxHeight:100,transitionDuration:200,initialState:!1},v=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Spoiler",g,e),{className:c,children:u,maxHeight:d,hideLabel:f,showLabel:p,transitionDuration:v,controlRef:y,initialState:b,classNames:x,styles:w,unstyled:S}=r,k=m(r,["className","children","maxHeight","hideLabel","showLabel","transitionDuration","controlRef","initialState","classNames","styles","unstyled"]),{classes:j,cx:E}=a({transitionDuration:v},{classNames:x,styles:w,unstyled:S,name:"Spoiler"}),[O,C]=(0,n.useState)(b),[I,P]=(0,n.useState)(b),{ref:A,height:T}=(0,o.h)();return(0,n.useEffect)(()=>{P(dC(e=>!e),className:j.control},O?f:p))});v.displayName="@mantine/core/Spoiler"},97564:function(e,t,r){"use strict";r.d(t,{K:function(){return m}});var n=r(67294),i=r(64761),o=(0,r(56817).k)((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:e.fn.size({size:t,sizes:e.spacing})}})),a=r(64523),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(l)for(var r of l(t))u.call(t,r)&&d(e,r,t[r]);return e},p=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};let h={spacing:"md",align:"stretch",justify:"flex-start"},m=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Stack",h,e),{spacing:s,className:l,align:c,justify:u,unstyled:d}=r,m=p(r,["spacing","className","align","justify","unstyled"]),{classes:g,cx:v}=o({spacing:s,align:c,justify:u},{name:"Stack",unstyled:d});return n.createElement(a.x,f({className:v(g.root,l),ref:t},m))});m.displayName="@mantine/core/Stack"},26556:function(e,t,r){"use strict";r.d(t,{v:function(){return Q}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t));let m={xs:34,sm:36,md:42,lg:48,xl:52};var g=(0,o.k)((e,{color:t,iconSize:r,size:n,radius:i,allowStepClick:o,iconPosition:a,orientation:s},l)=>{let c=r||e.fn.size({size:n,sizes:m}),u="xl"===n||"lg"===n?e.spacing.md:e.spacing.sm,d=e.fn.size({size:i,sizes:e.radius}),f=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),g=e.spacing.xs/2,v={step:{justifyContent:"flex-start",minHeight:`calc(${c}px + ${e.spacing.xl}px + ${g}px)`,marginTop:`${g}px`,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${l("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:p({display:"flex",flexDirection:"left"===a?"row":"row-reverse",cursor:o?"pointer":"default"},"vertical"===s?v.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`${c+g}px`,left:`${c/2}px`,height:"100vh",position:"absolute",borderLeft:`2px solid ${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]}`,ref:l("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:c,width:c,minWidth:c,borderRadius:d,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1],border:`2px solid ${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[7],fontSize:e.fn.size({size:n,sizes:e.fontSizes}),"&[data-progress]":{borderColor:f.background},"&[data-completed]":{backgroundColor:f.background,borderColor:f.background,color:e.white}},stepCompletedIcon:h(p({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:p({display:"flex",flexDirection:"column",marginLeft:"left"===a?u:void 0,marginRight:"right"===a?u:void 0},"vertical"===s?{marginTop:c>4*e.fn.size({size:n,sizes:e.fontSizes})?c/4:c/12}:null),stepLabel:{textAlign:a,fontWeight:500,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:a,marginTop:e.fn.size({size:n,sizes:e.spacing})/3,marginBottom:e.fn.size({size:n,sizes:e.spacing})/3,fontSize:e.fn.size({size:n,sizes:e.fontSizes})-2,lineHeight:1}}}),v=r(34736),y=r(97688),b=r(20966),x=r(56183),w=r(95117),S=Object.defineProperty,k=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))j.call(t,r)&&O(e,r,t[r]);if(k)for(var r of k(t))E.call(t,r)&&O(e,r,t[r]);return e},I=(e,t)=>{var r={};for(var n in e)j.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&k)for(var n of k(e))0>t.indexOf(n)&&E.call(e,n)&&(r[n]=e[n]);return r};let P={xs:16,sm:18,md:20,lg:22,xl:24},A={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},T=(e,t)=>"function"==typeof e?n.createElement(e,{step:t}):e,z=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("StepperStep",A,e),{className:o,step:a,state:s,color:l,icon:c,completedIcon:u,progressIcon:d,label:f,description:p,withIcon:h,iconSize:m,size:S,radius:k,loading:j,allowStepClick:E,allowStepSelect:O,iconPosition:z,__staticSelector:N,classNames:R,styles:_,unstyled:M,orientation:D}=r,L=I(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation"]),{classes:F,cx:U,theme:B}=g({color:l,iconSize:m,size:S,radius:k,allowStepClick:E,iconPosition:z,orientation:D},{name:N,classNames:R,styles:_,unstyled:M}),H=B.fn.size({size:S,sizes:P}),Z="stepCompleted"===s?null:"stepProgress"===s?d:c,W={"data-progress":"stepProgress"===s||void 0,"data-completed":"stepCompleted"===s||void 0};return n.createElement(v.k,C(C({className:U(F.step,o),tabIndex:E?0:-1,ref:t},W),L),h&&n.createElement("div",{className:F.stepWrapper},n.createElement("div",C({className:F.stepIcon},W),n.createElement(y.u,{mounted:"stepCompleted"===s,transition:"pop",duration:200},e=>n.createElement("div",{className:F.stepCompletedIcon,style:e},j?n.createElement(b.a,{color:"#fff",size:H,className:F.stepLoader}):T(u,a)||n.createElement(x.P,{indeterminate:!1,width:H,height:H}))),"stepCompleted"!==s?j?n.createElement(b.a,{size:H,color:l}):T(Z||c,a):null),"vertical"===D&&n.createElement("div",{className:U(F.verticalSeparator,{[F.verticalSeparatorActive]:"stepCompleted"===s})})),(f||p)&&n.createElement("div",{className:F.stepBody},f&&n.createElement(w.x,{className:F.stepLabel},T(f,a)),p&&n.createElement(w.x,{className:F.stepDescription,color:"dimmed"},T(p,a))))});function N(e){return null}z.displayName="@mantine/core/Step",N.displayName="@mantine/core/StepCompleted";var R=Object.defineProperty,_=Object.defineProperties,M=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,U=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))L.call(t,r)&&U(e,r,t[r]);if(D)for(var r of D(t))F.call(t,r)&&U(e,r,t[r]);return e},H=(e,t)=>_(e,M(t)),Z=(0,o.k)((e,{contentPadding:t,color:r,orientation:n,iconPosition:i,iconSize:o,size:a,breakpoint:s})=>{let l=void 0!==s,c=e.fn.size({size:s,sizes:e.breakpoints}),u=void 0!==o?o/2-1:e.fn.size({size:a,sizes:m})/2-1,d={steps:{flexDirection:"column",alignItems:"left"===i?"flex-start":"flex-end"},separator:{width:2,minHeight:e.spacing.xl,marginLeft:"left"===i?u:0,marginRight:"right"===i?u:0,marginTop:`calc(${e.spacing.xs}px / 2)`,marginBottom:`calc(${e.spacing.xs}px - 2px)`}},f={steps:{[`@media (max-width: ${c-1}px)`]:d.steps},separator:{[`@media (max-width: ${c-1}px)`]:d.separator}};return{root:{},steps:B(B({display:"flex",boxSizing:"border-box",alignItems:"center"},"vertical"===n?d.steps:null),l?f.steps:null),separator:B(B({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:2,backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},"vertical"===n?d.separator:null),l?f.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:H(B({},e.fn.fontStyles()),{paddingTop:e.fn.size({size:t,sizes:e.spacing})})}}),W=r(64523),V=Object.defineProperty,$=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,K=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t)=>{for(var r in t||(t={}))q.call(t,r)&&K(e,r,t[r]);if($)for(var r of $(t))G.call(t,r)&&K(e,r,t[r]);return e},J=(e,t)=>{var r={};for(var n in e)q.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&$)for(var n of $(e))0>t.indexOf(n)&&G.call(e,n)&&(r[n]=e[n]);return r};let Y={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},Q=(0,n.forwardRef)((e,t)=>{var r,o,a;let s=(0,i.N4)("Stepper",Y,e),{className:l,children:c,onStepClick:u,active:d,icon:f,completedIcon:p,progressIcon:h,color:m,iconSize:g,contentPadding:v,size:y,radius:b,orientation:x,breakpoint:w,iconPosition:S,allowNextStepsSelect:k,classNames:j,styles:E,unstyled:O}=s,C=J(s,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled"]),{classes:I,cx:P}=Z({contentPadding:v,color:m,orientation:x,iconPosition:S,size:y,iconSize:g,breakpoint:w},{classNames:j,styles:E,unstyled:O,name:"Stepper"}),A=n.Children.toArray(c),T=A.filter(e=>e.type!==N),z=A.find(e=>e.type===N),R=T.reduce((e,t,r)=>{let i=d===r?"stepProgress":d>r?"stepCompleted":"stepInactive",o="function"==typeof u&&("boolean"==typeof t.props.allowStepSelect?t.props.allowStepSelect:"stepCompleted"===i||k);return e.push((0,n.cloneElement)(t,{__staticSelector:"Stepper",icon:t.props.icon||f||r+1,key:r,step:r,state:i,onClick:()=>o&&u(r),allowStepClick:o,completedIcon:t.props.completedIcon||p,progressIcon:t.props.progressIcon||h,color:t.props.color||m,iconSize:g,size:y,radius:b,classNames:j,styles:E,iconPosition:t.props.iconPosition||S,orientation:x,unstyled:O})),"horizontal"===x&&r!==T.length-1&&e.push(n.createElement("div",{className:P(I.separator,{[I.separatorActive]:rT.length-1?M:_;return n.createElement(W.x,X({className:P(I.root,l),ref:t},C),n.createElement("div",{className:I.steps},R),D&&n.createElement("div",{className:I.content},D))});Q.Step=z,Q.Completed=N,Q.displayName="@mantine/core/Stepper"},61885:function(e,t,r){"use strict";r.d(t,{r:function(){return X}});var n=r(67294),i=r(36289),o=r(15851),a=r(64761),s=r(1270);let l=(0,n.createContext)(null),c=l.Provider,u=()=>(0,n.useContext)(l);var d=r(94151),f=Object.defineProperty,p=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&g(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&g(e,r,t[r]);return e},y=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r};let b={orientation:"horizontal",spacing:"lg",size:"sm",offset:"xs"},x=(0,n.forwardRef)((e,t)=>{let r=(0,a.N4)("SwitchGroup",b,e),{children:i,value:l,defaultValue:u,onChange:f,orientation:p,spacing:h,size:m,wrapperProps:g,offset:x}=r,w=y(r,["children","value","defaultValue","onChange","orientation","spacing","size","wrapperProps","offset"]),[S,k]=(0,o.C)({value:l,defaultValue:u,finalValue:[],onChange:f});return n.createElement(c,{value:{value:S,onChange:e=>{let t=e.currentTarget.value;k(S.includes(t)?S.filter(e=>e!==t):[...S,t])},size:m}},n.createElement(d.I.Wrapper,v(v({labelElement:"div",size:m,__staticSelector:"SwitchGroup",ref:t},g),w),n.createElement(s.K,{spacing:h,orientation:p,offset:x},i)))});x.displayName="@mantine/core/SwitchGroup";var w=r(56817),S=Object.defineProperty,k=Object.defineProperties,j=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,I=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&I(e,r,t[r]);if(E)for(var r of E(t))C.call(t,r)&&I(e,r,t[r]);return e},A=(e,t)=>k(e,j(t));let T={xs:16,sm:20,md:24,lg:30,xl:36},z={xs:32,sm:38,md:46,lg:56,xl:72},N={xs:12,sm:14,md:18,lg:22,xl:28},R={xs:5,sm:6,md:7,lg:9,xl:11},_={xs:4,sm:5,md:6,lg:8,xl:10};var M=(0,w.k)((e,{size:t,radius:r,color:n,labelPosition:i,error:o})=>{let a=e.fn.size({size:t,sizes:N}),s=e.fn.size({size:r,sizes:e.radius}),l=e.fn.variant({variant:"filled",color:n}),c=e.fn.size({size:t,sizes:z}),u="xs"===t?1:2,d=e.fn.variant({variant:"filled",color:"red"}).background;return{input:{clip:"rect(1px, 1px, 1px, 1px)",height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:A(P({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:s,backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[2],border:`1px solid ${o?d:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`,height:e.fn.size({size:t,sizes:T}),minWidth:c,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:e.fn.size({size:t,sizes:R}),fontWeight:600,order:"left"===i?2:1,userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",MsUserSelect:"none",zIndex:0,lineHeight:0,color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:l.background,borderColor:l.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed"}}),thumb:{position:"absolute",zIndex:1,borderRadius:s,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:a,width:a,border:`1px solid ${"dark"===e.colorScheme?e.white:e.colors.gray[3]}`,left:`${u}px`,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${a}px - ${u}px)`,borderColor:e.white},"input:disabled + * > &":{borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],backgroundColor:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:c-a,paddingInline:e.fn.size({size:t,sizes:_}),margin:`0 0 0 ${a+u}px`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{margin:`0 ${a+u}px 0 0`}}}}),D=r(12756),L=r(4846),F=Object.defineProperty,U=Object.defineProperties,B=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,V=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))Z.call(t,r)&&V(e,r,t[r]);if(H)for(var r of H(t))W.call(t,r)&&V(e,r,t[r]);return e},q=(e,t)=>U(e,B(t)),G=(e,t)=>{var r={};for(var n in e)Z.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&H)for(var n of H(e))0>t.indexOf(n)&&W.call(e,n)&&(r[n]=e[n]);return r};let K={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},X=(0,n.forwardRef)((e,t)=>{var r;let s=(0,a.N4)("Switch",K,e),{className:l,color:c,label:d,offLabel:f,onLabel:p,id:h,style:m,size:g,radius:v,wrapperProps:y,children:b,unstyled:x,styles:w,classNames:S,thumbIcon:k,sx:j,checked:E,defaultChecked:O,onChange:C,labelPosition:I,description:P,error:A,disabled:T}=s,z=G(s,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled"]),N=u(),{classes:R}=M({size:(null==N?void 0:N.size)||g,color:c,radius:v,labelPosition:I,error:!!A},{unstyled:x,styles:w,classNames:S,name:"Switch"}),{systemStyles:_,rest:F}=(0,D.x)(z),U=(0,i.M)(h),B=N?{checked:N.value.includes(F.value),onChange:N.onChange}:{},[H,Z]=(0,o.C)({value:null!=(r=B.checked)?r:E,defaultValue:O,finalValue:!1});return n.createElement(L.Z,$($({className:l,sx:j,style:m,id:U,size:(null==N?void 0:N.size)||g,labelPosition:I,label:d,description:P,error:A,disabled:T,__staticSelector:"Switch",classNames:S,styles:w,unstyled:x,"data-checked":B.checked||void 0},_),y),n.createElement("input",q($({},F),{disabled:T,checked:H,onChange:e=>{N?B.onChange(e):null==C||C(e),Z(e.currentTarget.checked)},id:U,ref:t,type:"checkbox",className:R.input})),n.createElement("label",{htmlFor:U,className:R.track},n.createElement("div",{className:R.thumb},k),n.createElement("div",{className:R.trackLabel},H?p:f)))});X.displayName="@mantine/core/Switch",X.Group=x},95078:function(e,t,r){"use strict";r.d(t,{i:function(){return I}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(0,o.k)((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:i,withBorder:o,withColumnBorders:a})=>{let s=`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`;return{root:h(p({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:o?s:"","& caption":{marginTop:"top"===t?0:e.spacing.xs,marginBottom:"bottom"===t?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th, & tbody tr th":{textAlign:"left",fontWeight:"bold",color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:i,sizes:e.fontSizes}),padding:`${e.fn.size({size:n,sizes:e.spacing})}px ${e.fn.size({size:r,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:s},"& tfoot tr th, & tbody tr th":{borderTop:s},"& tbody tr td":{padding:`${e.fn.size({size:n,sizes:e.spacing})}px ${e.fn.size({size:r,sizes:e.spacing})}px`,borderTop:s,fontSize:e.fn.size({size:i,sizes:e.fontSizes})},"& tbody tr:first-of-type td, & tbody tr:first-of-type th":{borderTop:"none"},"& thead th, & tbody td":{borderRight:a?s:"none","&:last-of-type":{borderRight:"none",borderLeft:a?s:"none"}},"& tbody tr th":{borderRight:a?s:"none"},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[1]})})}}),g=r(64523),v=Object.defineProperty,y=Object.defineProperties,b=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,k=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&k(e,r,t[r]);if(x)for(var r of x(t))S.call(t,r)&&k(e,r,t[r]);return e},E=(e,t)=>y(e,b(t)),O=(e,t)=>{var r={};for(var n in e)w.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&x)for(var n of x(e))0>t.indexOf(n)&&S.call(e,n)&&(r[n]=e[n]);return r};let C={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},I=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Table",C,e),{className:o,children:a,striped:s,highlightOnHover:l,captionSide:c,horizontalSpacing:u,verticalSpacing:d,fontSize:f,unstyled:p,withBorder:h,withColumnBorders:v}=r,y=O(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:b,cx:x}=m({captionSide:c,verticalSpacing:d,horizontalSpacing:u,fontSize:f,withBorder:h,withColumnBorders:v},{unstyled:p,name:"Table"});return n.createElement(g.x,E(j({},y),{component:"table",ref:t,className:x(b.root,o),"data-striped":s||void 0,"data-hover":l||void 0}),a)});I.displayName="@mantine/core/Table"},95117:function(e,t,r){"use strict";r.d(t,{x:function(){return C}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t)),g=(0,a.k)((e,{color:t,variant:r,size:n,lineClamp:i,truncate:o,inline:a,inherit:s,underline:l,gradient:c,weight:u,transform:d,align:f,strikethrough:p,italic:g})=>{let v=e.fn.variant({variant:"gradient",gradient:c});return{root:h(m(h(h(h(h({},e.fn.fontStyles()),e.fn.focusStyles()),"number"==typeof i?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:i,WebkitBoxOrient:"vertical"}:null),function({theme:e,truncate:t}){return"start"===t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:"ltr"===e.dir?"rtl":"ltr",textAlign:"ltr"===e.dir?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}({theme:e,truncate:o})),{color:function({theme:e,color:t,variant:r}){return"dimmed"===t?"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6]:"string"==typeof t&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:"link"===r?e.colors[e.primaryColor]["dark"===e.colorScheme?4:7]:t||"inherit"}({color:t,theme:e,variant:r}),fontFamily:s?"inherit":e.fontFamily,fontSize:s||void 0===n?"inherit":e.fn.size({size:n,sizes:e.fontSizes}),lineHeight:s?"inherit":a?1:e.lineHeight,textDecoration:function({underline:e,strikethrough:t}){let r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}({underline:l,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:s?"inherit":u,textTransform:d,textAlign:f,fontStyle:g?"italic":void 0}),e.fn.hover("link"===r&&void 0===l?{textDecoration:"underline"}:void 0)),gradient:{backgroundImage:v.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}}),v=r(64523),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E={variant:"text"},O=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Text",E,e),{className:o,size:a,weight:s,transform:l,color:c,align:u,variant:d,lineClamp:f,truncate:p,gradient:h,inline:m,inherit:y,underline:b,strikethrough:x,italic:w,classNames:S,styles:O,unstyled:C,span:I}=r,P=j(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span"]),{classes:A,cx:T}=g({variant:d,color:c,size:a,lineClamp:f,truncate:p,inline:m,inherit:y,underline:b,strikethrough:x,italic:w,weight:s,transform:l,align:u,gradient:h},{unstyled:C,name:"Text"});return n.createElement(v.x,k({ref:t,className:T(A.root,{[A.gradient]:"gradient"===d},o),component:I?"span":"div"},P))});O.displayName="@mantine/core/Text";let C=(0,o.F)(O)},80061:function(e,t,r){"use strict";r.d(t,{o:function(){return v}});var n=r(67294),i=r(66261),o=r(94151),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(e,t)=>{var r={};for(var n in e)u.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&c)for(var n of c(e))0>t.indexOf(n)&&d.call(e,n)&&(r[n]=e[n]);return r};let g={type:"text",size:"sm",__staticSelector:"TextInput"},v=(0,n.forwardRef)((e,t)=>{let r=(0,i.k)("TextInput",g,e),{inputProps:a,wrapperProps:s}=r,l=m(r,["inputProps","wrapperProps"]);return n.createElement(o.I.Wrapper,p({},s),n.createElement(o.I,h(p(p({},a),l),{ref:t})))});v.displayName="@mantine/core/TextInput"},52615:function(e,t,r){"use strict";r.d(t,{g:function(){return M}});var n=r(67294),i=r(87462),o=r(63366),a=n.useLayoutEffect,s=function(e){var t=n.useRef(e);return a(function(){t.current=e}),t},l=function(e,t){if("function"==typeof e){e(t);return}e.current=t},c=function(e,t){var r=(0,n.useRef)();return(0,n.useCallback)(function(n){e.current=n,r.current&&l(r.current,null),r.current=t,t&&l(t,n)},[t])},u={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},d=function(e){Object.keys(u).forEach(function(t){e.style.setProperty(t,u[t],"important")})},f=null,p=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize},h=function(){},m=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],g=!!document.documentElement.currentStyle,v=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var r=m.reduce(function(e,r){return e[r]=t[r],e},{}),n=r.boxSizing;if(""===n)return null;g&&"border-box"===n&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:o}},y=function(e){var t=s(e);(0,n.useLayoutEffect)(function(){var e=function(e){t.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[])},b=(0,n.forwardRef)(function(e,t){var r=e.cacheMeasurements,a=e.maxRows,s=e.minRows,l=e.onChange,u=void 0===l?h:l,m=e.onHeightChange,g=void 0===m?h:m,b=(0,o.Z)(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),x=void 0!==b.value,w=(0,n.useRef)(null),S=c(w,t),k=(0,n.useRef)(0),j=(0,n.useRef)(),E=function(){var e,t,n,i,o,l,c,u,h,m,y,b=w.current,x=r&&j.current?j.current:v(b);if(x){j.current=x;var S=(e=b.value||b.placeholder||"x",void 0===(t=s)&&(t=1),void 0===(n=a)&&(n=1/0),f||((f=document.createElement("textarea")).setAttribute("tabindex","-1"),f.setAttribute("aria-hidden","true"),d(f)),null===f.parentNode&&document.body.appendChild(f),i=x.paddingSize,o=x.borderSize,c=(l=x.sizingStyle).boxSizing,Object.keys(l).forEach(function(e){f.style[e]=l[e]}),d(f),f.value=e,u=p(f,x),f.value="x",m=(h=f.scrollHeight-i)*t,"border-box"===c&&(m=m+i+o),u=Math.max(m,u),y=h*n,"border-box"===c&&(y=y+i+o),[u=Math.min(y,u),h]),E=S[0],O=S[1];k.current!==E&&(k.current=E,b.style.setProperty("height",E+"px","important"),g(E,{rowHeight:O}))}};return(0,n.useLayoutEffect)(E),y(E),(0,n.createElement)("textarea",(0,i.Z)({},b,{onChange:function(e){x||E(),u(e)},ref:S}))}),x=r(36289),w=r(64761),S=(0,r(56817).k)(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}})),k=r(12756),j=r(94151),E=Object.defineProperty,O=Object.defineProperties,C=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,T=(e,t,r)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&T(e,r,t[r]);if(I)for(var r of I(t))A.call(t,r)&&T(e,r,t[r]);return e},N=(e,t)=>O(e,C(t)),R=(e,t)=>{var r={};for(var n in e)P.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&I)for(var n of I(e))0>t.indexOf(n)&&A.call(e,n)&&(r[n]=e[n]);return r};let _={autosize:!1,size:"sm",__staticSelector:"Textarea"},M=(0,n.forwardRef)((e,t)=>{let r=(0,w.N4)("Textarea",_,e),{autosize:i,maxRows:o,minRows:a,label:s,error:l,description:c,id:u,className:d,required:f,style:p,wrapperProps:h,classNames:m,styles:g,size:v,__staticSelector:y,sx:E,errorProps:O,descriptionProps:C,labelProps:I,inputWrapperOrder:P,inputContainer:A,unstyled:T,withAsterisk:M}=r,D=R(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk"]),L=(0,x.M)(u),{classes:F,cx:U}=S(),{systemStyles:B,rest:H}=(0,k.x)(D),Z=z({required:f,ref:t,invalid:!!l,id:L,classNames:N(z({},m),{input:U(F.input,null==m?void 0:m.input)}),styles:g,__staticSelector:y,size:v,multiline:!0,unstyled:T},H);return n.createElement(j.I.Wrapper,z(z({label:s,error:l,id:L,description:c,required:f,style:p,className:d,classNames:m,styles:g,size:v,__staticSelector:y,sx:E,errorProps:O,labelProps:I,descriptionProps:C,inputContainer:A,inputWrapperOrder:P,unstyled:T,withAsterisk:M},B),h),i?n.createElement(j.I,N(z({},Z),{component:b,maxRows:o,minRows:a})):n.createElement(j.I,N(z({},Z),{component:"textarea",rows:a})))});M.displayName="@mantine/core/Textarea"},5044:function(e,t,r){"use strict";r.d(t,{k:function(){return O}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t));let m={xs:16,sm:20,md:26,lg:32,xl:40};var g=(0,o.k)((e,{color:t,size:r,radius:n,gradient:i,variant:o})=>{let a=e.fn.variant({variant:o,color:t||e.primaryColor,gradient:i,primaryFallback:!1}),s=e.fn.size({size:r,sizes:m});return{root:h(p({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:s,height:s,minWidth:s,minHeight:s,borderRadius:e.fn.radius(n),backgroundColor:a.background,color:a.color,backgroundImage:"gradient"===o?a.background:void 0,border:`${"gradient"===o?0:1}px solid ${a.border}`})}}),v=r(64523),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E={size:"md",variant:"filled"},O=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("ThemeIcon",E,e),{className:o,size:a,radius:s,variant:l,color:c,children:u,gradient:d,unstyled:f}=r,p=j(r,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:h,cx:m}=g({variant:l,radius:s,color:c,size:a,gradient:d},{name:"ThemeIcon",unstyled:f});return n.createElement(v.x,k({className:m(h.root,o),ref:t},p),u)});O.displayName="@mantine/core/ThemeIcon"},19236:function(e,t,r){"use strict";r.d(t,{D:function(){return E}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(0,o.k)((e,{element:t,weight:r,size:n,inline:i})=>({root:h(p({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:void 0!==n?n in e.headings.sizes?e.headings.sizes[n].fontSize:n:e.headings.sizes[t].fontSize,lineHeight:i?1:void 0!==n&&n in e.headings.sizes?e.headings.sizes[n].lineHeight:e.headings.sizes[t].lineHeight,margin:0})})),g=r(95117),v=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))x.call(t,r)&&w(e,r,t[r]);return e},k=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&y)for(var n of y(e))0>t.indexOf(n)&&x.call(e,n)&&(r[n]=e[n]);return r};let j={order:1},E=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("Title",j,e),{className:o,order:a,children:s,unstyled:l,size:c,weight:u,inline:d}=r,f=k(r,["className","order","children","unstyled","size","weight","inline"]),{classes:p,cx:h}=m({element:`h${a}`,weight:u,size:c,inline:d},{name:"Title",unstyled:l});return[1,2,3,4,5,6].includes(a)?n.createElement(g.x,S({component:`h${a}`,ref:t,className:h(p.root,o)},f),s):null});E.displayName="@mantine/core/Title"},88393:function(e,t,r){"use strict";r.d(t,{u:function(){return ea}});var n=r(67294),i=r(24241),o=r(80665),a=r(3594),s=r(64761),l=r(81461);let c=(0,n.createContext)(!1),u=c.Provider,d=()=>(0,n.useContext)(c);function f({children:e,openDelay:t=0,closeDelay:r=0}){return n.createElement(u,{value:!0},n.createElement(l.e0,{delay:{open:t,close:r}},e))}f.displayName="@mantine/core/TooltipGroup";var p=r(56817),h=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))y.call(t,r)&&x(e,r,t[r]);if(v)for(var r of v(t))b.call(t,r)&&x(e,r,t[r]);return e},S=(e,t)=>m(e,g(t)),k=(0,p.k)((e,{color:t,radius:r,width:n,multiline:i})=>({tooltip:S(w(w({},e.fn.fontStyles()),function(e,t){if(!t)return{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[9],color:e.white};let r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs}px / 2) ${e.spacing.xs}px`,position:"absolute",whiteSpace:i?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));let j={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};var E=r(88301),O=r(55863),C=r(83143),I=r(64523),P=Object.defineProperty,A=Object.defineProperties,T=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))N.call(t,r)&&_(e,r,t[r]);if(z)for(var r of z(t))R.call(t,r)&&_(e,r,t[r]);return e},D=(e,t)=>A(e,T(t)),L=(e,t)=>{var r={};for(var n in e)N.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&z)for(var n of z(e))0>t.indexOf(n)&&R.call(e,n)&&(r[n]=e[n]);return r};let F={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:(0,a.w)("popover")};function U(e){var t;let r=(0,s.N4)("TooltipFloating",F,e),{children:a,refProp:c,withinPortal:u,style:d,className:f,classNames:p,styles:h,unstyled:m,radius:g,color:v,label:y,offset:b,position:x,multiline:w,width:S,zIndex:P,disabled:A}=r,T=L(r,["children","refProp","withinPortal","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled"]),{handleMouseMove:z,x:N,y:R,opened:_,boundaryRef:U,floating:B,setOpened:H}=function({offset:e,position:t}){let[r,i]=(0,n.useState)(!1),o=(0,n.useRef)(),{x:a,y:s,reference:c,floating:u,refs:d,update:f,placement:p}=(0,l.YF)({placement:t,middleware:[(0,E.uY)({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=p.includes("right")?e:t.includes("left")?-1*e:0,m=p.includes("bottom")?e:t.includes("top")?-1*e:0,g=(0,n.useCallback)(({clientX:e,clientY:t})=>{c({getBoundingClientRect:()=>({width:0,height:0,x:e,y:t,left:e+h,top:t+m,right:e,bottom:t})})},[c]);return(0,n.useEffect)(()=>{if(d.floating.current){let e=o.current;e.addEventListener("mousemove",g);let t=(0,O.Kx)(d.floating.current);return t.forEach(e=>{e.addEventListener("scroll",f)}),()=>{e.removeEventListener("mousemove",g),t.forEach(e=>{e.removeEventListener("scroll",f)})}}},[c,d.floating.current,f,g,r]),{handleMouseMove:g,x:a,y:s,opened:r,setOpened:i,boundaryRef:o,floating:u}}({offset:b,position:x}),{classes:Z,cx:W}=k({radius:g,color:v,multiline:w,width:S},{name:"TooltipFloating",classNames:p,styles:h,unstyled:m});if(!(0,i.k)(a))throw Error(j.children);let V=(0,o.Y)(U,a.ref);return n.createElement(n.Fragment,null,n.createElement(C.q,{withinPortal:u},n.createElement(I.x,D(M({},T),{ref:B,className:W(Z.tooltip,f),style:D(M({},d),{zIndex:P,display:!A&&_?"block":"none",top:null!=R?R:"",left:null!=(t=Math.round(N))?t:""})}),y)),(0,n.cloneElement)(a,D(M({},a.props),{[c]:V,onMouseEnter:e=>{var t,r;null==(r=(t=a.props).onMouseEnter)||r.call(t,e),z(e),H(!0)},onMouseLeave:e=>{var t,r;null==(r=(t=a.props).onMouseLeave)||r.call(t,e),H(!1)}})))}U.displayName="@mantine/core/TooltipFloating";var B=r(58463),H=r(36289),Z=r(37048),W=r(30212),V=r(14870),$=r(97688),q=r(63468),G=Object.defineProperty,K=Object.defineProperties,X=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,ee=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,et=(e,t)=>{for(var r in t||(t={}))Y.call(t,r)&&ee(e,r,t[r]);if(J)for(var r of J(t))Q.call(t,r)&&ee(e,r,t[r]);return e},er=(e,t)=>K(e,X(t)),en=(e,t)=>{var r={};for(var n in e)Y.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&J)for(var n of J(e))0>t.indexOf(n)&&Q.call(e,n)&&(r[n]=e[n]);return r};let ei={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transition:"fade",transitionDuration:100,width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:(0,a.w)("popover"),positionDependencies:[]},eo=(0,n.forwardRef)((e,t)=>{let r=(0,n.useRef)(null),a=(0,s.N4)("Tooltip",ei,e),{children:c,position:u,refProp:f,label:p,openDelay:h,closeDelay:m,onPositionChange:g,opened:v,withinPortal:y,radius:b,color:x,classNames:w,styles:S,unstyled:O,style:P,className:A,withArrow:T,arrowSize:z,arrowOffset:N,arrowRadius:R,arrowPosition:_,offset:M,transition:D,transitionDuration:L,multiline:F,width:U,events:G,zIndex:K,disabled:X,positionDependencies:J,onClick:Y,onMouseEnter:Q,onMouseLeave:ee,inline:eo}=a,ea=en(a,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transition","transitionDuration","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline"]),{classes:es,cx:el,theme:ec}=k({radius:b,color:x,width:U,multiline:F},{name:"Tooltip",classNames:w,styles:S,unstyled:O}),eu=function(e){let[t,r]=(0,n.useState)(!1),i="boolean"==typeof e.opened?e.opened:t,o=d(),a=(0,H.M)(),{delay:s,currentId:c,setCurrentId:u}=(0,l.tj)(),f=(0,n.useCallback)(e=>{r(e),e&&u(a)},[u,a]),{x:p,y:h,reference:m,floating:g,context:v,refs:y,update:b,placement:x,middlewareData:{arrow:{x:w,y:S}={}}}=(0,l.YF)({placement:e.position,open:i,onOpenChange:f,middleware:[(0,E.cv)(e.offset),(0,E.uY)({padding:8}),(0,E.RR)(),(0,B.x7)({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[(0,E.Qo)()]:[]]}),{getReferenceProps:k,getFloatingProps:j}=(0,l.NI)([(0,l.XI)(v,{enabled:e.events.hover,delay:o?s:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),(0,l.KK)(v,{enabled:e.events.focus,keyboardOnly:!0}),(0,l.qs)(v,{role:"tooltip"}),(0,l.bQ)(v,{enabled:(e.opened,!1)}),(0,l.Qu)(v,{id:a})]);return(0,W.L)({opened:i,positionDependencies:e.positionDependencies,floating:{refs:y,update:b}}),(0,Z.l)(()=>{var t;null==(t=e.onPositionChange)||t.call(e,x)},[x]),{x:p,y:h,arrowX:w,arrowY:S,reference:m,floating:g,getFloatingProps:j,getReferenceProps:k,isGroupPhase:i&&c&&c!==a,opened:i,placement:x}}({position:(0,V._)(ec.dir,u),closeDelay:m,openDelay:h,onPositionChange:g,opened:v,events:G,arrowRef:r,arrowOffset:N,offset:M+(T?z/2:0),positionDependencies:[...J,c],inline:eo});if(!(0,i.k)(c))throw Error(j.children);let ed=(0,o.Y)(eu.reference,c.ref,t);return n.createElement(n.Fragment,null,n.createElement(C.q,{withinPortal:y},n.createElement($.u,{mounted:!X&&eu.opened,transition:D,duration:eu.isGroupPhase?10:L},e=>{var t,i;return n.createElement(I.x,et(et({},ea),eu.getFloatingProps({ref:eu.floating,className:es.tooltip,style:er(et(et({},P),e),{zIndex:K,top:null!=(t=eu.y)?t:0,left:null!=(i=eu.x)?i:0})})),p,n.createElement(q.Y,{ref:r,arrowX:eu.arrowX,arrowY:eu.arrowY,visible:T,withBorder:!1,position:eu.placement,arrowSize:z,arrowOffset:N,arrowRadius:R,arrowPosition:_,className:es.arrow}))})),(0,n.cloneElement)(c,eu.getReferenceProps(et({onClick:Y,onMouseEnter:Q,onMouseLeave:ee,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[f]:ed,className:el(A,c.props.className)},c.props))))});eo.Group=f,eo.Floating=U,eo.displayName="@mantine/core/Tooltip";let ea=eo},75933:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(67294),i=r(72974),o=r(59068);function a({transitions:e,duration:t=250,exitDuration:r=t,mounted:a,children:s,timingFunction:l,onExit:c,onEntered:u,onEnter:d,onExited:f}){let{transitionDuration:p,transitionStatus:h,transitionTimingFunction:m}=(0,o.Y)({mounted:a,duration:t,exitDuration:r,timingFunction:l,onExit:c,onEntered:u,onEnter:d,onExited:f});if(0===p)return a?n.createElement(n.Fragment,null,s({})):null;if("exited"===h)return null;let g=Object.keys(e).reduce((t,r)=>(t[r]=(0,i.B)({duration:e[r].duration,transition:e[r].transition,timingFunction:e[r].timingFunction||m,state:h}),t),{});return n.createElement(n.Fragment,null,s(g))}a.displayName="@mantine/core/GroupedTransition"},97688:function(e,t,r){"use strict";r.d(t,{u:function(){return a}});var n=r(67294),i=r(72974),o=r(59068);function a({transition:e,duration:t=250,exitDuration:r=t,mounted:a,children:s,timingFunction:l,onExit:c,onEntered:u,onEnter:d,onExited:f}){let{transitionDuration:p,transitionStatus:h,transitionTimingFunction:m}=(0,o.Y)({mounted:a,exitDuration:r,duration:t,timingFunction:l,onExit:c,onEntered:u,onEnter:d,onExited:f});return 0===p?a?n.createElement(n.Fragment,null,s({})):null:"exited"===h?null:n.createElement(n.Fragment,null,s((0,i.B)({transition:e,duration:p,state:h,timingFunction:m})))}a.displayName="@mantine/core/Transition"},72974:function(e,t,r){"use strict";r.d(t,{B:function(){return w}});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>i(e,o(t));let f={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(.9) translateY(10px)"},transitionProperty:"transform, opacity"},p={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:d(u({},f),{common:{transformOrigin:"center center"}}),"pop-bottom-left":d(u({},f),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":d(u({},f),{common:{transformOrigin:"bottom right"}}),"pop-top-left":d(u({},f),{common:{transformOrigin:"top left"}}),"pop-top-right":d(u({},f),{common:{transformOrigin:"top right"}})};var h=Object.defineProperty,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))g.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))v.call(t,r)&&y(e,r,t[r]);return e};let x={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function w({transition:e,state:t,duration:r,timingFunction:n}){let i={transitionDuration:`${r}ms`,transitionTimingFunction:n};return"string"==typeof e?e in p?b(b(b({transitionProperty:p[e].transitionProperty},i),p[e].common),p[e][x[t]]):null:b(b(b({transitionProperty:e.transitionProperty},i),e.common),e[x[t]])}},59068:function(e,t,r){"use strict";r.d(t,{Y:function(){return s}});var n=r(67294),i=r(73678),o=r(37048),a=r(64761);function s({duration:e,exitDuration:t,timingFunction:r,mounted:s,onEnter:l,onExit:c,onEntered:u,onExited:d}){let f=(0,a.rZ)(),p=(0,i.J)(),h=!!f.respectReducedMotion&&p,[m,g]=(0,n.useState)(s?"entered":"exited"),v=h?0:e,y=(0,n.useRef)(-1),b=r=>{let n=r?l:c,i=r?u:d;if(g(r?"pre-entering":"pre-exiting"),window.clearTimeout(y.current),0===(v=h?0:r?e:t))"function"==typeof n&&n(),"function"==typeof i&&i(),g(r?"entered":"exited");else{let e=window.setTimeout(()=>{"function"==typeof n&&n(),g(r?"entering":"exiting")},10);y.current=window.setTimeout(()=>{window.clearTimeout(e),"function"==typeof i&&i(),g(r?"entered":"exited")},v)}};return(0,o.l)(()=>{b(s)},[s]),(0,n.useEffect)(()=>()=>window.clearTimeout(y.current),[]),{transitionDuration:v,transitionStatus:m,transitionTimingFunction:r||f.transitionTimingFunction}}},4397:function(e,t,r){"use strict";r.d(t,{l:function(){return j}});var n=r(67294),i=r(64761),o=r(56817),a=Object.defineProperty,s=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&f(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&f(e,r,t[r]);return e},h=(e,t)=>s(e,l(t)),m=(0,o.k)(e=>{let t=Object.keys(e.headings.sizes).reduce((t,r)=>{let n=e.headings.sizes[r];return t[`& ${r}`]=h(p({fontFamily:e.headings.fontFamily,fontWeight:n.fontWeight||e.headings.fontWeight,marginTop:"number"==typeof n.lineHeight?`calc(${e.spacing.xl}px * ${n.lineHeight})`:e.spacing.xl,marginBottom:e.spacing.sm},n),{"@media (max-width: 755px)":{fontSize:"number"==typeof n.fontSize&&n.fontSize/1.3}}),t},{});return{root:h(p(h(p({},e.fn.fontStyles()),{color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,"@media (max-width: 755px)":{fontSize:e.fontSizes.sm}}),t),{"& .ql-align-center":{textAlign:"center"},"& .ql-align-right":{textAlign:"right"},"& .ql-align-left":{textAlign:"left"},"& img":{maxWidth:"100%",marginBottom:e.spacing.xs},"& p":{marginTop:0,marginBottom:e.spacing.lg},"& mark":{backgroundColor:e.fn.themeColor("yellow","dark"===e.colorScheme?5:2),color:"dark"===e.colorScheme?e.colors.dark[9]:"inherit"},"& hr":{marginTop:e.spacing.md,marginBottom:e.spacing.sm,borderBottom:0,borderLeft:0,borderRight:0,borderTop:`1px dashed ${e.colors.gray["dark"===e.colorScheme?4:6]}`},"& a":h(p({},e.fn.focusStyles()),{color:e.colors[e.primaryColor]["dark"===e.colorScheme?4:6],textDecoration:"none","&:hover":{textDecoration:"underline"}}),"& pre":{padding:e.spacing.xs,lineHeight:e.lineHeight,margin:0,marginTop:e.spacing.md,marginBottom:e.spacing.md,overflowX:"auto",fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,borderRadius:e.radius.sm,backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0],"& code":{backgroundColor:"transparent",padding:0,borderRadius:0,color:"inherit",border:0}},"& code":{lineHeight:e.lineHeight,padding:"1px 5px",borderRadius:e.radius.sm,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,backgroundColor:"dark"===e.colorScheme?e.colors.dark[9]:e.colors.gray[0],fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs,border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[9]:e.colors.gray[3]}`},"& ul, & ol":{marginBottom:e.spacing.md,paddingLeft:38,"& li":{marginTop:e.spacing.xs}},"& table":{width:"100%",borderCollapse:"collapse",captionSide:"bottom",marginBottom:e.spacing.md,"& caption":{marginTop:e.spacing.xs,fontSize:e.fontSizes.sm,color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6]},"& th":{textAlign:"left",fontWeight:"bold",color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],fontSize:14,padding:"7px 10px"},"& thead th":{borderBottom:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:"7px 10px",borderBottom:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`,fontSize:14},"& tr:last-of-type td":{borderBottom:"none"}},"& blockquote":{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,margin:`${e.spacing.md}px 0`,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md}px ${e.spacing.lg}px`,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,borderLeft:`6px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]}`,"& cite":{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}})}}),g=r(64523),v=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))x.call(t,r)&&w(e,r,t[r]);return e},k=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&y)for(var n of y(e))0>t.indexOf(n)&&x.call(e,n)&&(r[n]=e[n]);return r};let j=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("TypographyStylesProvider",{},e),{className:o,unstyled:a}=r,s=k(r,["className","unstyled"]),{classes:l,cx:c}=m(null,{name:"TypographyStylesProvider",unstyled:a});return n.createElement(g.x,S({className:c(l.root,o),ref:t},s))});j.displayName="@mantine/core/TypographyStylesProvider"},34736:function(e,t,r){"use strict";r.d(t,{k:function(){return O}});var n=r(67294),i=r(64761),o=r(48427),a=r(56817),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t)),g=(0,a.k)(e=>({root:m(h(h({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})})),v=r(64523),y=Object.defineProperty,b=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&S(e,r,t[r]);if(b)for(var r of b(t))w.call(t,r)&&S(e,r,t[r]);return e},j=(e,t)=>{var r={};for(var n in e)x.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&b)for(var n of b(e))0>t.indexOf(n)&&w.call(e,n)&&(r[n]=e[n]);return r};let E=(0,n.forwardRef)((e,t)=>{let r=(0,i.N4)("UnstyledButton",{},e),{className:o,component:a="button",unstyled:s}=r,l=j(r,["className","component","unstyled"]),{classes:c,cx:u}=g(null,{name:"UnstyledButton",unstyled:s});return n.createElement(v.x,k({component:a,ref:t,className:u(c.root,o),type:"button"===a?"button":void 0},l))});E.displayName="@mantine/core/UnstyledButton";let O=(0,o.F)(E)},99352:function(e,t,r){"use strict";r.d(t,{M:function(){return rh}});var n=r(27484),i=r.n(n),o=r(67294),a=r(15851),s=r(22146),l=r(80665),c=r(64761),u=r(64523),d=r(34736),f=r(49834),p=r(87208),h=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))y.call(t,r)&&x(e,r,t[r]);if(v)for(var r of v(t))b.call(t,r)&&x(e,r,t[r]);return e},S=(e,t)=>m(e,g(t)),k=(e,t)=>{var r={};for(var n in e)y.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&v)for(var n of v(e))0>t.indexOf(n)&&b.call(e,n)&&(r[n]=e[n]);return r};function j(e){var{direction:t,style:r}=e,n=k(e,["direction","style"]);let i=(0,c.rZ)();return o.createElement("svg",w({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:S(w({},r),{transform:"right"===t&&"ltr"===i.dir||"left"===t&&"rtl"===i.dir?"rotate(180deg)":"none"})},n),o.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}j.displayName="@mantine/dates/ArrowIcon";var E=r(56817),O=Object.defineProperty,C=Object.defineProperties,I=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&z(e,r,t[r]);if(P)for(var r of P(t))T.call(t,r)&&z(e,r,t[r]);return e},R=(e,t)=>C(e,I(t));let _={xs:32,sm:40,md:44,lg:50,xl:54};var M=(0,E.k)((e,{size:t})=>({calendarHeader:{display:"flex",justifyContent:"space-between",align:"center",marginBottom:e.fn.size({size:t,sizes:e.spacing})},calendarHeaderControl:{width:e.fn.size({size:t,sizes:_}),height:e.fn.size({size:t,sizes:_}),"&:disabled":{opacity:0,cursor:"default"}},calendarHeaderLevel:R(N({display:"flex",alignItems:"center",justifyContent:"center",height:e.fn.size({size:t,sizes:_}),fontSize:e.fn.size({size:t,sizes:e.fontSizes}),padding:`0 ${e.fn.size({size:t,sizes:e.spacing})}px`,borderRadius:e.radius.sm,fontWeight:500,flex:1,textAlign:"center",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0]})),{"&:disabled":e.fn.hover({backgroundColor:"transparent",cursor:"default"})}),calendarHeaderLevelIcon:{marginLeft:4}})),D=Object.defineProperty,L=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,B=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))F.call(t,r)&&B(e,r,t[r]);if(L)for(var r of L(t))U.call(t,r)&&B(e,r,t[r]);return e},Z=(e,t)=>{var r={};for(var n in e)F.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&L)for(var n of L(e))0>t.indexOf(n)&&U.call(e,n)&&(r[n]=e[n]);return r};let W={xs:12,sm:14,md:18,lg:22,xl:28};function V(e){var{hasNext:t,hasPrevious:r,onNext:n,onPrevious:i,onNextLevel:a,className:s,label:l,nextLevelDisabled:c,size:u,classNames:h,styles:m,__staticSelector:g="CalendarHeader",nextLabel:v,previousLabel:y,preventLevelFocus:b=!1,preventFocus:x,unstyled:w,__stopPropagation:S}=e,k=Z(e,["hasNext","hasPrevious","onNext","onPrevious","onNextLevel","className","label","nextLevelDisabled","size","classNames","styles","__staticSelector","nextLabel","previousLabel","preventLevelFocus","preventFocus","unstyled","__stopPropagation"]);let{classes:E,cx:O,theme:C}=M({size:u},{classNames:h,styles:m,unstyled:w,name:g}),I=C.fn.size({size:u,sizes:W});return o.createElement("div",H({className:O(E.calendarHeader,s)},k),o.createElement(f.A,{className:E.calendarHeaderControl,disabled:!r,onClick:i,"aria-label":y,onMouseDown:e=>x&&e.preventDefault(),unstyled:w,"data-mantine-stop-propagation":S||void 0},o.createElement(j,{direction:"left",width:I,height:I})),o.createElement(d.k,{unstyled:w,className:E.calendarHeaderLevel,disabled:c,onClick:a,tabIndex:b?-1:0,onMouseDown:e=>x&&e.preventDefault(),"data-mantine-stop-propagation":S||void 0},l,!c&&o.createElement(p.D,{error:!1,size:u,className:E.calendarHeaderLevelIcon})),o.createElement(f.A,{className:E.calendarHeaderControl,disabled:!t,onClick:n,"aria-label":v,unstyled:w,onMouseDown:e=>x&&e.preventDefault(),"data-mantine-stop-propagation":S||void 0},o.createElement(j,{direction:"right",width:I,height:I})))}function $(e,t){return i()(new Date(e,1,1)).format(t)}V.displayName="@mantine/dates/CalendarHeader";var q=Object.defineProperty,G=Object.defineProperties,K=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,Q=(e,t,r)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t)=>{for(var r in t||(t={}))J.call(t,r)&&Q(e,r,t[r]);if(X)for(var r of X(t))Y.call(t,r)&&Q(e,r,t[r]);return e},et=(e,t)=>G(e,K(t));let er={xs:32,sm:40,md:46,lg:52,xl:56};var en=(0,E.k)((e,{size:t})=>{let r=e.fn.variant({color:e.primaryColor,variant:"filled"});return{yearPicker:{width:"100%"},yearPickerControls:{display:"flex",flexWrap:"wrap",justifyContent:"center"},yearPickerControl:et(ee({flex:"0 0 25%",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,height:e.fn.size({size:t,sizes:er}),textAlign:"center",borderRadius:e.radius.sm,fontSize:e.fn.size({size:t,sizes:e.fontSizes})},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0]})),{"&:disabled":ee({color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))}),yearPickerControlActive:ee({backgroundColor:r.background,color:r.color},e.fn.hover({backgroundColor:r.hover}))}}),ei=Object.defineProperty,eo=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable,el=(e,t,r)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ec=(e,t)=>{for(var r in t||(t={}))ea.call(t,r)&&el(e,r,t[r]);if(eo)for(var r of eo(t))es.call(t,r)&&el(e,r,t[r]);return e},eu=(e,t)=>{var r={};for(var n in e)ea.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eo)for(var n of eo(e))0>t.indexOf(n)&&es.call(e,n)&&(r[n]=e[n]);return r};function ed(e){var{className:t,styles:r,classNames:n,value:i,onChange:a,size:s,minYear:l,maxYear:c,__staticSelector:u="YearPicker",nextDecadeLabel:f,previousDecadeLabel:p,preventFocus:h,unstyled:m,yearLabelFormat:g="YYYY",__stopPropagation:v}=e,y=eu(e,["className","styles","classNames","value","onChange","size","minYear","maxYear","__staticSelector","nextDecadeLabel","previousDecadeLabel","preventFocus","unstyled","yearLabelFormat","__stopPropagation"]);let{classes:b,cx:x}=en({size:s},{classNames:n,styles:r,unstyled:m,name:u}),[w,S]=(0,o.useState)(i),k=function(e){let t=e-e%10-1,r=[];for(let e=0;e<12;e+=1){let n=t+e;r.push(n)}return r}(w),j=k.map(e=>o.createElement(d.k,{key:e,unstyled:m,onClick:()=>a(e),disabled:ec,onMouseDown:e=>h&&e.preventDefault(),"data-mantine-stop-propagation":v||void 0,className:x(b.yearPickerControl,{[b.yearPickerControlActive]:e===i})},$(e,g)));return o.createElement("div",ec({className:x(b.yearPicker,t)},y),o.createElement(V,{unstyled:m,label:`${$(k[0],g)} \u2013 ${$(k[k.length-1],g)}`,hasPrevious:"number"!=typeof l||lk[k.length-1],onNext:()=>S(e=>e+10),onPrevious:()=>S(e=>e-10),nextLevelDisabled:!0,size:s,nextLabel:f,previousLabel:p,styles:r,classNames:n,__staticSelector:u,preventFocus:h,__stopPropagation:v}),o.createElement("div",{className:b.yearPickerControls},j))}function ef({date:e,minDate:t,maxDate:r}){let n=t instanceof Date,o=r instanceof Date;if(!o&&!n)return!0;let a=i()(e).endOf("month"),s=i()(e).startOf("month"),l=!o||s.isBefore(r),c=!n||a.isAfter(t);return l&&c}ed.displayName="@mantine/dates/YearPicker";var ep=Object.defineProperty,eh=Object.defineProperties,em=Object.getOwnPropertyDescriptors,eg=Object.getOwnPropertySymbols,ev=Object.prototype.hasOwnProperty,ey=Object.prototype.propertyIsEnumerable,eb=(e,t,r)=>t in e?ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ex=(e,t)=>{for(var r in t||(t={}))ev.call(t,r)&&eb(e,r,t[r]);if(eg)for(var r of eg(t))ey.call(t,r)&&eb(e,r,t[r]);return e},ew=(e,t)=>eh(e,em(t));let eS={xs:32,sm:40,md:46,lg:52,xl:56};var ek=(0,E.k)((e,{size:t})=>{let r=e.fn.variant({color:e.primaryColor,variant:"filled"});return{monthPicker:{width:"100%"},monthPickerControls:{display:"flex",flexWrap:"wrap",justifyContent:"center"},monthPickerControl:ew(ex({flex:"0 0 33.3333%",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,height:e.fn.size({size:t,sizes:eS}),textAlign:"center",borderRadius:e.radius.sm,fontSize:e.fn.size({size:t,sizes:e.fontSizes})},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0]})),{"&:disabled":ex({color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))}),monthPickerControlActive:ex({backgroundColor:r.background,color:r.color},e.fn.hover({backgroundColor:r.hover}))}}),ej=Object.defineProperty,eE=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,eC=Object.prototype.propertyIsEnumerable,eI=(e,t,r)=>t in e?ej(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eP=(e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&eI(e,r,t[r]);if(eE)for(var r of eE(t))eC.call(t,r)&&eI(e,r,t[r]);return e},eA=(e,t)=>{var r={};for(var n in e)eO.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eE)for(var n of eE(e))0>t.indexOf(n)&&eC.call(e,n)&&(r[n]=e[n]);return r};function eT(e){var{className:t,styles:r,classNames:n,value:a,onChange:s,locale:l,year:c,onYearChange:u,onNextLevel:f,size:p,minDate:h,maxDate:m,__staticSelector:g="MonthPicker",nextYearLabel:v,previousYearLabel:y,preventFocus:b,unstyled:x,yearLabelFormat:w="YYYY",__stopPropagation:S}=e,k=eA(e,["className","styles","classNames","value","onChange","locale","year","onYearChange","onNextLevel","size","minDate","maxDate","__staticSelector","nextYearLabel","previousYearLabel","preventFocus","unstyled","yearLabelFormat","__stopPropagation"]);let{classes:j,cx:E}=ek({size:p},{classNames:n,styles:r,unstyled:x,name:g}),O=function(e,t="MMM"){let r=[],n=new Date(2021,0,1);for(let o=0;o<12;o+=1)r.push(i()(n).locale(e).format(t)),n.setMonth(n.getMonth()+1);return r}(l),C=h instanceof Date?h.getFullYear():void 0,I=m instanceof Date?m.getFullYear():void 0,P=O.map((e,t)=>o.createElement(d.k,{key:e,unstyled:x,onClick:()=>s(t),className:E(j.monthPickerControl,{[j.monthPickerControlActive]:t===a.month&&c===a.year}),disabled:!ef({date:new Date(c,t),minDate:h,maxDate:m}),onMouseDown:e=>b&&e.preventDefault(),"data-mantine-stop-propagation":S||void 0},e));return o.createElement("div",eP({className:E(j.monthPicker,t)},k),o.createElement(V,{label:$(c,w),hasNext:"number"!=typeof I||cC,onNext:()=>u(c+1),onPrevious:()=>u(c-1),onNextLevel:f,size:p,classNames:n,styles:r,__staticSelector:g,nextLabel:v,previousLabel:y,preventFocus:b,unstyled:x,__stopPropagation:S}),o.createElement("div",{className:j.monthPickerControls},P))}eT.displayName="@mantine/dates/MonthPicker";var ez=r(95117),eN=Object.defineProperty,eR=Object.defineProperties,e_=Object.getOwnPropertyDescriptors,eM=Object.getOwnPropertySymbols,eD=Object.prototype.hasOwnProperty,eL=Object.prototype.propertyIsEnumerable,eF=(e,t,r)=>t in e?eN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eU=(e,t)=>{for(var r in t||(t={}))eD.call(t,r)&&eF(e,r,t[r]);if(eM)for(var r of eM(t))eL.call(t,r)&&eF(e,r,t[r]);return e},eB=(e,t)=>eR(e,e_(t));let eH={xs:34,sm:38,md:46,lg:58,xl:66};var eZ=(0,E.k)((e,{size:t,fullWidth:r,hideOutsideDates:n})=>({day:eB(eU(eB(eU(eU({},e.fn.fontStyles()),e.fn.focusStyles()),{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",width:r?"100%":e.fn.size({size:t,sizes:eH}),height:e.fn.size({size:t,sizes:eH}),lineHeight:`${e.fn.size({size:t,sizes:eH})}px`,fontSize:e.fn.size({size:t,sizes:e.fontSizes}),padding:0,borderRadius:e.radius.sm,border:"none",cursor:"pointer",userSelect:"none",color:"dark"===e.colorScheme?e.colors.dark[0]:e.colors.gray[7],"&:disabled":{pointerEvents:"none",color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]}}),e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),{"&[data-weekend]":{color:"dark"===e.colorScheme?e.colors.red[5]:e.colors.red[7]},"&[data-outside]":{display:n?"none":void 0,color:`${"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]}`},"&[data-in-range]":{backgroundColor:e.fn.variant({variant:"light"}).background,borderRadius:0},"&[data-selected]":{backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.white},"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm}})})),eW=Object.defineProperty,eV=Object.defineProperties,e$=Object.getOwnPropertyDescriptors,eq=Object.getOwnPropertySymbols,eG=Object.prototype.hasOwnProperty,eK=Object.prototype.propertyIsEnumerable,eX=(e,t,r)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eJ=(e,t)=>{for(var r in t||(t={}))eG.call(t,r)&&eX(e,r,t[r]);if(eq)for(var r of eq(t))eK.call(t,r)&&eX(e,r,t[r]);return e},eY=(e,t)=>eV(e,e$(t)),eQ=(e,t)=>{var r={};for(var n in e)eG.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eq)for(var n of eq(e))0>t.indexOf(n)&&eK.call(e,n)&&(r[n]=e[n]);return r};let e0=(0,o.forwardRef)((e,t)=>{var{className:r,value:n,selected:i,weekend:a,outside:s,onMouseEnter:l,classNames:c,styles:u,hasValue:d,firstInRange:f,lastInRange:p,__staticSelector:h="Month",inRange:m,size:g,fullWidth:v,firstInMonth:y,focusable:b,hideOutsideDates:x,renderDay:w,unstyled:S,disabled:k,stopPropagation:j}=e,E=eQ(e,["className","value","selected","weekend","outside","onMouseEnter","classNames","styles","hasValue","firstInRange","lastInRange","__staticSelector","inRange","size","fullWidth","firstInMonth","focusable","hideOutsideDates","renderDay","unstyled","disabled","stopPropagation"]);let{classes:O,cx:C}=eZ({size:g,fullWidth:v,hideOutsideDates:x},{classNames:c,styles:u,unstyled:S,name:h});return o.createElement("button",eY(eJ({},E),{type:"button",ref:t,disabled:k,onMouseEnter:e=>l(n,e),tabIndex:function({focusable:e,hasValue:t,selected:r,firstInMonth:n}){return e?t?r?0:-1:n?0:-1:-1}({focusable:b,hasValue:d,selected:i,firstInMonth:y}),"data-autofocus":function({hasValue:e,selected:t,firstInMonth:r}){return e?!!t||void 0:!!r||void 0}({hasValue:d,selected:i,firstInMonth:y}),"data-mantine-stop-propagation":j||void 0,"data-outside":s&&!k||void 0,"data-weekend":a&&!k||void 0,"data-selected":i&&!k||void 0,"data-in-range":m&&!k||void 0,"data-first-in-range":f&&!k||void 0,"data-last-in-range":p&&!k||void 0,className:C(O.day,r)}),"function"==typeof w?w(n):n.getDate())});function e1(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function e2(e,t){return e1(e,t)&&e.getDate()===t.getDate()}function e5({date:e,month:t,hasValue:r,minDate:n,maxDate:o,value:a,excludeDate:s,disableOutsideEvents:l,range:c,weekendDays:u}){let d=!e1(e,t),f=r&&(Array.isArray(a)?a.some(t=>e2(t,e)):e2(e,a)),{inRange:p,lastInRange:h,firstInRange:m,selectedInRange:g}=function(e,t){let r=Array.isArray(t)&&t.every(e=>e instanceof Date),n=r&&[i()(t[0]).subtract(1,"day"),i()(t[1]).add(1,"day")],o=r&&e2(e,t[0]),a=r&&e2(e,t[1]);return{firstInRange:o,lastInRange:a,inRange:r&&i()(e).isAfter(n[0],"day")&&i()(e).isBefore(n[1],"day"),selectedInRange:o||a}}(e,c);return{disabled:function({minDate:e,maxDate:t,excludeDate:r,disableOutsideEvents:n,date:o,outside:a}){let s=t instanceof Date&&i()(t).isBefore(o,"day"),l=e instanceof Date&&i()(e).isAfter(o,"day"),c="function"==typeof r&&r(o);return s||l||c||!!n&&!!a}({minDate:n,maxDate:o,excludeDate:s,disableOutsideEvents:l,date:e,outside:d}),weekend:function(e,t=[0,6]){return t.includes(e.getDay())}(e,u),selectedInRange:g,selected:f,inRange:p,firstInRange:m,lastInRange:h,outside:d}}e0.displayName="@mantine/core/Day";var e4=Object.defineProperty,e3=Object.defineProperties,e6=Object.getOwnPropertyDescriptors,e8=Object.getOwnPropertySymbols,e7=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,te=(e,t,r)=>t in e?e4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tt=(e,t)=>{for(var r in t||(t={}))e7.call(t,r)&&te(e,r,t[r]);if(e8)for(var r of e8(t))e9.call(t,r)&&te(e,r,t[r]);return e},tr=(e,t)=>e3(e,e6(t)),tn=(0,E.k)((e,{fullWidth:t})=>({weekday:{color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[5]},month:tr(tt({},e.fn.fontStyles()),{borderCollapse:"collapse",width:t?"100%":"auto",tableLayout:"fixed"}),cell:{boxSizing:"border-box",padding:0,borderTop:"1px solid transparent"},weekdayCell:{boxSizing:"border-box",padding:0,fontWeight:"normal",paddingBottom:`calc(${e.spacing.xs}px / 2)`,textAlign:"center",cursor:"default",userSelect:"none"}}));function ti(e,t="monday"){let r=new Date(e),n=r.getDay()||7,i="sunday"===t;return(i&&0!==n||1!==n)&&r.setHours(-24*(i?n:n-1)),r}var to=Object.defineProperty,ta=Object.getOwnPropertySymbols,ts=Object.prototype.hasOwnProperty,tl=Object.prototype.propertyIsEnumerable,tc=(e,t,r)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tu=(e,t)=>{for(var r in t||(t={}))ts.call(t,r)&&tc(e,r,t[r]);if(ta)for(var r of ta(t))tl.call(t,r)&&tc(e,r,t[r]);return e},td=(e,t)=>{var r={};for(var n in e)ts.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ta)for(var n of ta(e))0>t.indexOf(n)&&tl.call(e,n)&&(r[n]=e[n]);return r};let tf=()=>!1,tp={disableOutsideEvents:!1,hideWeekdays:!1,__staticSelector:"Month",size:"sm",fullWidth:!1,preventFocus:!1,focusable:!0,firstDayOfWeek:"monday",hideOutsideDates:!1,weekendDays:[0,6],__stopPropagation:!0},th=(0,o.forwardRef)((e,t)=>{let r=(0,c.N4)("Month",tp,e),{className:n,month:a,value:l,onChange:d,disableOutsideEvents:f,locale:p,dayClassName:h,dayStyle:m,classNames:g,styles:v,minDate:y,maxDate:b,excludeDate:x,onDayMouseEnter:w,range:S,hideWeekdays:k,__staticSelector:j,size:E,fullWidth:O,preventFocus:C,focusable:I,firstDayOfWeek:P,onDayKeyDown:A,daysRefs:T,hideOutsideDates:z,isDateInRange:N=tf,isDateFirstInRange:R=tf,isDateLastInRange:_=tf,renderDay:M,weekdayLabelFormat:D,unstyled:L,weekendDays:F,__stopPropagation:U}=r,B=td(r,["className","month","value","onChange","disableOutsideEvents","locale","dayClassName","dayStyle","classNames","styles","minDate","maxDate","excludeDate","onDayMouseEnter","range","hideWeekdays","__staticSelector","size","fullWidth","preventFocus","focusable","firstDayOfWeek","onDayKeyDown","daysRefs","hideOutsideDates","isDateInRange","isDateFirstInRange","isDateLastInRange","renderDay","weekdayLabelFormat","unstyled","weekendDays","__stopPropagation"]),{classes:H,cx:Z,theme:W}=tn({fullWidth:O},{classNames:g,styles:v,unstyled:L,name:j}),V=p||W.datesLocale,$=function(e,t="monday"){let r=e.getMonth(),n=new Date(e.getFullYear(),r,1),i=function(e,t="monday"){let r=new Date(e),n=r.getDay(),i="sunday"===t;return(i&&6!==n||0!==n)&&r.setDate(r.getDate()+(7-(i?n+1:n))),r}(new Date(e.getFullYear(),e.getMonth()+1,0),t),o=ti(n,t),a=[];for(;o<=i;){let e=[];for(let t=0;t<7;t+=1)e.push(new Date(o)),o.setDate(o.getDate()+1);a.push(e)}return a}(a,P),q=(function(e,t="monday",r="dd"){let n=[],o=ti(new Date,t);for(let t=0;t<7;t+=1)n.push(i()(o).locale(e).format(r)),o.setDate(o.getDate()+1);return n})(V,P,D).map(e=>o.createElement("th",{className:H.weekdayCell,key:e},o.createElement(ez.x,{size:E,className:H.weekday},e.length>=2?(0,s.j)(e):e))),G=Array.isArray(l)?l.every(e=>e instanceof Date):l instanceof Date,K=l instanceof Date&&i()(l).isAfter(i()(a).startOf("month"))&&i()(l).isBefore(i()(a).endOf("month")),X=(0,o.useMemo)(()=>$.flatMap(e=>e).find(e=>{let t=e5({date:e,month:a,hasValue:G,minDate:y,maxDate:b,value:l,excludeDate:x,disableOutsideEvents:f,range:S,weekendDays:F});return!t.disabled&&!t.outside})||i()(a).startOf("month").toDate(),[]),J=$.map((e,t)=>{let r=e.map((e,r)=>{let n=e5({date:e,month:a,hasValue:G,minDate:y,maxDate:b,value:l,excludeDate:x,disableOutsideEvents:f,range:S,weekendDays:F}),i={rowIndex:t,cellIndex:r,date:e};return o.createElement("td",{className:H.cell,key:r},o.createElement(e0,{unstyled:L,ref:e=>{T&&(Array.isArray(T[t])||(T[t]=[]),T[t][r]=e)},onClick:()=>"function"==typeof d&&d(e),onMouseDown:e=>C&&e.preventDefault(),value:e,outside:n.outside,weekend:n.weekend,inRange:n.inRange||N(e,n),firstInRange:n.firstInRange||R(e,n),lastInRange:n.lastInRange||_(e,n),firstInMonth:e2(e,X),selected:n.selected||n.selectedInRange,hasValue:K,onKeyDown:e=>"function"==typeof A&&A(i,e),className:"function"==typeof h?h(e,n):null,style:"function"==typeof m?m(e,n):null,disabled:n.disabled,onMouseEnter:"function"==typeof w?w:tf,size:E,fullWidth:O,focusable:I,hideOutsideDates:z,__staticSelector:j,styles:v,classNames:g,renderDay:M,stopPropagation:U}))});return o.createElement("tr",{key:t},r)});return o.createElement(u.x,tu({component:"table",className:Z(H.month,n),ref:t},B),!k&&o.createElement("thead",null,o.createElement("tr",null,q)),o.createElement("tbody",null,J))});th.displayName="@mantine/dates/Month";var tm=Object.defineProperty,tg=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,ty=Object.prototype.propertyIsEnumerable,tb=(e,t,r)=>t in e?tm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tx=(e,t)=>{for(var r in t||(t={}))tv.call(t,r)&&tb(e,r,t[r]);if(tg)for(var r of tg(t))ty.call(t,r)&&tb(e,r,t[r]);return e},tw=(e,t)=>{var r={};for(var n in e)tv.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tg)for(var n of tg(e))0>t.indexOf(n)&&ty.call(e,n)&&(r[n]=e[n]);return r};function tS(e){var{amountOfMonths:t,paginateBy:r,month:n,locale:a,minDate:l,maxDate:c,allowLevelChange:u,size:d,daysRefs:f,onMonthChange:p,onNextLevel:h,onDayKeyDown:m,classNames:g,styles:v,__staticSelector:y="MonthsList",nextMonthLabel:b,previousMonthLabel:x,labelFormat:w,weekdayLabelFormat:S,preventFocus:k,renderDay:j,unstyled:E,__stopPropagation:O}=e,C=tw(e,["amountOfMonths","paginateBy","month","locale","minDate","maxDate","allowLevelChange","size","daysRefs","onMonthChange","onNextLevel","onDayKeyDown","classNames","styles","__staticSelector","nextMonthLabel","previousMonthLabel","labelFormat","weekdayLabelFormat","preventFocus","renderDay","unstyled","__stopPropagation"]);let I=i()(n).add(t,"months").toDate(),P=i()(n).subtract(1,"months").toDate(),A=Array(t).fill(0).map((e,A)=>{let T=i()(n).add(A,"months").toDate();return o.createElement("div",{key:A},o.createElement(V,{hasNext:A+1===t&&ef({date:I,minDate:l,maxDate:c}),hasPrevious:0===A&&ef({date:P,minDate:l,maxDate:c}),label:function({month:e,locale:t,format:r}){return(0,s.j)(i()(e).locale(t).format(r))}({month:T,locale:a,format:w}),onNext:()=>p(i()(n).add(r,"months").toDate()),onPrevious:()=>p(i()(n).subtract(r,"months").toDate()),onNextLevel:h,nextLevelDisabled:!u,size:d,classNames:g,styles:v,__staticSelector:y,nextLabel:b,previousLabel:x,preventLevelFocus:A>0,preventFocus:k,unstyled:E,__stopPropagation:O}),o.createElement(th,tx({month:T,daysRefs:f.current[A],onDayKeyDown:(...e)=>m(A,...e),size:d,minDate:l,maxDate:c,classNames:g,styles:v,__staticSelector:y,locale:a,focusable:0===A,preventFocus:k,renderDay:j,weekdayLabelFormat:S,unstyled:E,__stopPropagation:O},C)))});return o.createElement(o.Fragment,null,A)}tS.displayName="@mantine/dates/MonthsList";var tk=(0,E.k)((e,{size:t,amountOfMonths:r,fullWidth:n})=>{let i=7*e.fn.size({size:t,sizes:eH}),o=r>1?i*r+(r-1)*e.spacing.md:i;return{calendarBase:{boxSizing:"border-box",display:"flex",gap:e.spacing.md,maxWidth:n?"100%":o}}}),tj=Object.defineProperty,tE=Object.getOwnPropertySymbols,tO=Object.prototype.hasOwnProperty,tC=Object.prototype.propertyIsEnumerable,tI=(e,t,r)=>t in e?tj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tP=(e,t)=>{for(var r in t||(t={}))tO.call(t,r)&&tI(e,r,t[r]);if(tE)for(var r of tE(t))tC.call(t,r)&&tI(e,r,t[r]);return e},tA=(e,t)=>{var r={};for(var n in e)tO.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tE)for(var n of tE(e))0>t.indexOf(n)&&tC.call(e,n)&&(r[n]=e[n]);return r};let tT=(0,o.forwardRef)((e,t)=>{var{className:r,classNames:n,styles:i,month:s,initialMonth:l,onMonthChange:c,locale:d,amountOfMonths:f=1,paginateBy:p=f,size:h="sm",allowLevelChange:m=!0,initialLevel:g="date",minDate:v,maxDate:y,__staticSelector:b="CalendarBase",dayClassName:x,dayStyle:w,disableOutsideEvents:S,excludeDate:k,hideWeekdays:j,fullWidth:E,preventFocus:O,firstDayOfWeek:C="monday",value:I,onChange:P,onDayMouseEnter:A,range:T,nextDecadeLabel:z,nextMonthLabel:N,nextYearLabel:R,previousDecadeLabel:_,previousMonthLabel:M,previousYearLabel:D,labelFormat:L="MMMM YYYY",weekdayLabelFormat:F,hideOutsideDates:U,isDateInRange:B,isDateFirstInRange:H,isDateLastInRange:Z,renderDay:W,unstyled:V,weekendDays:$,__stopPropagation:q,yearLabelFormat:G="YYYY"}=e,K=tA(e,["className","classNames","styles","month","initialMonth","onMonthChange","locale","amountOfMonths","paginateBy","size","allowLevelChange","initialLevel","minDate","maxDate","__staticSelector","dayClassName","dayStyle","disableOutsideEvents","excludeDate","hideWeekdays","fullWidth","preventFocus","firstDayOfWeek","value","onChange","onDayMouseEnter","range","nextDecadeLabel","nextMonthLabel","nextYearLabel","previousDecadeLabel","previousMonthLabel","previousYearLabel","labelFormat","weekdayLabelFormat","hideOutsideDates","isDateInRange","isDateFirstInRange","isDateLastInRange","renderDay","unstyled","weekendDays","__stopPropagation","yearLabelFormat"]);let[X,J]=(0,o.useState)(g),{classes:Y,cx:Q,theme:ee}=tk({size:h,fullWidth:E,amountOfMonths:"date"===X?f:1},{name:b,styles:i,classNames:n,unstyled:V}),et=d||ee.datesLocale,er=(0,o.useRef)(Array(f).fill(0).map(()=>[])),[en,ei]=(0,a.C)({value:s,defaultValue:l,finalValue:new Date,onChange:c}),[eo,ea]=(0,o.useState)(en.getFullYear()),es=v instanceof Date?v.getFullYear():100,el=y instanceof Date?y.getFullYear():1e4,ec=(e,t,r,n=1)=>{var i;let o=["down","up"].includes(e),a=o?r.rowIndex+("down"===e?n:-n):r.rowIndex,s=o?r.cellIndex:r.cellIndex+("right"===e?n:-n),l=null==(i=er.current[t][a])?void 0:i[s];l&&(l.disabled?ec(e,t,r,n+1):l.focus())};return o.createElement(u.x,tP({className:Q(Y.calendarBase,r),ref:t},K),"year"===X&&o.createElement(ed,{size:h,value:eo,minYear:es,maxYear:el,onChange:e=>{ea(e),J("month")},classNames:n,styles:i,__staticSelector:b,__stopPropagation:q,nextDecadeLabel:z,previousDecadeLabel:_,preventFocus:O,unstyled:V,yearLabelFormat:G}),"month"===X&&o.createElement(eT,{size:h,value:{month:en.getMonth(),year:en.getFullYear()},year:eo,onYearChange:ea,onNextLevel:()=>J("year"),locale:et,minDate:v,maxDate:y,onChange:e=>{ei(new Date(eo,e,1)),J("date")},classNames:n,styles:i,__staticSelector:b,__stopPropagation:q,nextYearLabel:R,previousYearLabel:D,preventFocus:O,unstyled:V,yearLabelFormat:G}),"date"===X&&o.createElement(tS,{amountOfMonths:f,paginateBy:p,month:en,locale:et,minDate:v,maxDate:y,allowLevelChange:m,size:h,daysRefs:er,onMonthChange:ei,onNextLevel:()=>J("month"),onDayKeyDown:(e,t,r)=>{var n;switch(r.key){case"ArrowDown":r.preventDefault(),t.rowIndex+10&&ec("up",e,t);break;case"ArrowRight":r.preventDefault(),6!==t.cellIndex?ec("right",e,t):e+10&&er.current[e-1][t.rowIndex]&&er.current[e-1][t.rowIndex][6].focus()}},classNames:n,styles:i,__staticSelector:b,dayClassName:x,dayStyle:w,disableOutsideEvents:S,excludeDate:k,hideWeekdays:j,fullWidth:E,preventFocus:O,firstDayOfWeek:C,value:I,range:T,onChange:P,nextMonthLabel:N,previousMonthLabel:M,labelFormat:L,weekdayLabelFormat:F,onDayMouseEnter:A,renderDay:W,hideOutsideDates:U,isDateInRange:B,isDateFirstInRange:H,isDateLastInRange:Z,unstyled:V,weekendDays:$,__stopPropagation:q}))});tT.displayName="@mantine/dates/CalendarBase";var tz=Object.defineProperty,tN=Object.getOwnPropertySymbols,tR=Object.prototype.hasOwnProperty,t_=Object.prototype.propertyIsEnumerable,tM=(e,t,r)=>t in e?tz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tD=(e,t)=>{for(var r in t||(t={}))tR.call(t,r)&&tM(e,r,t[r]);if(tN)for(var r of tN(t))t_.call(t,r)&&tM(e,r,t[r]);return e},tL=(e,t)=>{var r={};for(var n in e)tR.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tN)for(var n of tN(e))0>t.indexOf(n)&&t_.call(e,n)&&(r[n]=e[n]);return r};let tF={__staticSelector:"Calendar"};function tU(e){let t=(0,c.N4)("Calendar",tF,e),{__staticSelector:r="Calendar",multiple:n,value:i,onChange:a}=t,s=tL(t,["__staticSelector","multiple","value","onChange"]);return o.createElement(tT,tD({__staticSelector:r,onChange:e=>n?a(i.some(t=>e2(t,e))?i.filter(t=>!e2(t,e)):[...i,e]):a(e),value:i},s))}tU.displayName="@mantine/dates/Calendar";var tB=r(12756),tH=r(80971),tZ=r(94151),tW=r(40633),tV=r(38090),t$=r(36289),tq=Object.defineProperty,tG=Object.defineProperties,tK=Object.getOwnPropertyDescriptors,tX=Object.getOwnPropertySymbols,tJ=Object.prototype.hasOwnProperty,tY=Object.prototype.propertyIsEnumerable,tQ=(e,t,r)=>t in e?tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t0=(e,t)=>{for(var r in t||(t={}))tJ.call(t,r)&&tQ(e,r,t[r]);if(tX)for(var r of tX(t))tY.call(t,r)&&tQ(e,r,t[r]);return e},t1=(e,t)=>tG(e,tK(t)),t2=(0,E.k)(e=>({wrapper:t1(t0({},e.fn.fontStyles()),{position:"relative",cursor:"pointer"}),input:{cursor:"pointer",whiteSpace:"nowrap","&:not([data-free-input])::selection":{backgroundColor:"transparent"},"&[data-free-input]":{cursor:"text"}}})),t5=Object.defineProperty,t4=Object.defineProperties,t3=Object.getOwnPropertyDescriptors,t6=Object.getOwnPropertySymbols,t8=Object.prototype.hasOwnProperty,t7=Object.prototype.propertyIsEnumerable,t9=(e,t,r)=>t in e?t5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t)=>{for(var r in t||(t={}))t8.call(t,r)&&t9(e,r,t[r]);if(t6)for(var r of t6(t))t7.call(t,r)&&t9(e,r,t[r]);return e},rt=(e,t)=>t4(e,t3(t)),rr=(e,t)=>{var r={};for(var n in e)t8.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&t6)for(var n of t6(e))0>t.indexOf(n)&&t7.call(e,n)&&(r[n]=e[n]);return r};let rn={xs:24,sm:30,md:34,lg:40,xl:44},ri={in:{opacity:1,transform:"translateY(0) scale(1)"},out:{opacity:0,transform:"translateY(-25px) scale(0.93)"},common:{transformOrigin:"top left"},transitionProperty:"opacity, transform"},ro=(0,o.forwardRef)((e,t)=>{var{classNames:r,className:n,style:i,styles:a,wrapperProps:s,required:c,allowFreeInput:u=!1,label:d,error:f,id:p,description:h,placeholder:m,shadow:g,transition:v=ri,transitionDuration:y=100,transitionTimingFunction:b,size:x="sm",children:w,inputLabel:S,__staticSelector:k="DatePickerBase",dropdownOpened:j,setDropdownOpened:E,dropdownType:O="popover",dropdownPosition:C="flip",clearable:I=!0,clearButtonLabel:P,onClear:A,positionDependencies:T=[],zIndex:z,withinPortal:N=!1,onBlur:R,onFocus:_,onChange:M,onKeyDown:D,name:L="date",sx:F,amountOfMonths:U=1,onDropdownClose:B,onDropdownOpen:H,clickOutsideEvents:Z=["mousedown","touchstart"],modalZIndex:W,errorProps:V,labelProps:$,descriptionProps:q,clearButtonTabIndex:G=0,unstyled:K,inputContainer:X,inputWrapperOrder:J,modalProps:Y,withAsterisk:Q,readOnly:ee}=e,et=rr(e,["classNames","className","style","styles","wrapperProps","required","allowFreeInput","label","error","id","description","placeholder","shadow","transition","transitionDuration","transitionTimingFunction","size","children","inputLabel","__staticSelector","dropdownOpened","setDropdownOpened","dropdownType","dropdownPosition","clearable","clearButtonLabel","onClear","positionDependencies","zIndex","withinPortal","onBlur","onFocus","onChange","onKeyDown","name","sx","amountOfMonths","onDropdownClose","onDropdownOpen","clickOutsideEvents","modalZIndex","errorProps","labelProps","descriptionProps","clearButtonTabIndex","unstyled","inputContainer","inputWrapperOrder","modalProps","withAsterisk","readOnly"]);let{classes:er,cx:en,theme:ei}=t2(null,{classNames:r,styles:a,unstyled:K,name:k}),{systemStyles:eo,rest:ea}=(0,tB.x)(et),es=(0,t$.M)(p),el=(0,o.useRef)(),ec=()=>{E(!1),null==B||B()},eu=()=>{E(!0),null==H||H()},ed=()=>{E(!j),j?null==B||B():null==H||H()},ef=I&&!ee?o.createElement(tH.P,{variant:"transparent","aria-label":P,onClick:A,size:x,tabIndex:G,unstyled:K}):null;return o.createElement(tZ.I.Wrapper,re(re({required:c,id:es,label:d,error:f,description:h,className:n,style:i,classNames:r,styles:a,size:x,__staticSelector:k,sx:F,errorProps:V,descriptionProps:q,labelProps:$,inputContainer:X,inputWrapperOrder:J,unstyled:K,withAsterisk:Q},eo),s),o.createElement(tW.J,{__staticSelector:k,withinPortal:N,offset:10,opened:j,transitionDuration:y,transition:v,positionDependencies:T,middlewares:{flip:"flip"===C,shift:!1},position:"flip"===C?"bottom-start":C,shadow:g,onClose:ec,trapFocus:!u,withRoles:!1,clickOutsideEvents:Z,zIndex:z,classNames:r,styles:a,unstyled:K,disabled:ee},o.createElement(tW.J.Target,null,o.createElement("div",{className:er.wrapper},o.createElement(tZ.I,re({classNames:rt(re({},r),{input:en(er.input,null==r?void 0:r.input)}),"data-free-input":u||void 0,styles:a,onClick:()=>u?eu():ed(),onKeyDown:e=>{"function"==typeof D&&D(e),"Space"!==e.key&&"Enter"!==e.key||u||(e.preventDefault(),eu())},id:es,ref:(0,l.Y)(t,el),__staticSelector:k,size:x,name:L,placeholder:m,value:S,required:c,invalid:!!f,readOnly:!u,rightSection:ef,rightSectionWidth:ei.fn.size({size:x,sizes:rn}),onBlur:e=>{"function"==typeof R&&R(e),u&&ec()},onFocus:e=>{"function"==typeof _&&_(e),u&&eu()},onChange:M,autoComplete:"off",unstyled:K},ea)))),"popover"===O?o.createElement(tW.J.Dropdown,null,o.createElement("div",{"data-mantine-stop-propagation":j,onKeyDownCapture:e=>{"Escape"===e.key&&(ec(),window.setTimeout(()=>{var e;return null==(e=el.current)?void 0:e.focus()},0))},"aria-hidden":u||void 0},w)):o.createElement(tV.u,rt(re({},Y),{opened:j,onClose:ec,withCloseButton:!1,size:400*U,zIndex:W,unstyled:K}),w)))});ro.displayName="@mantine/dates/DatePickerBase";var ra=Object.defineProperty,rs=Object.getOwnPropertySymbols,rl=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable,ru=(e,t,r)=>t in e?ra(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rd=(e,t)=>{for(var r in t||(t={}))rl.call(t,r)&&ru(e,r,t[r]);if(rs)for(var r of rs(t))rc.call(t,r)&&ru(e,r,t[r]);return e},rf=(e,t)=>{var r={};for(var n in e)rl.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&rs)for(var n of rs(e))0>t.indexOf(n)&&rc.call(e,n)&&(r[n]=e[n]);return r};let rp={shadow:"sm",transitionDuration:200,closeCalendarOnChange:!0,labelFormat:"MMMM YYYY",initiallyOpened:!1,name:"date",size:"sm",dropdownType:"popover",dropdownPosition:"flip",clearable:!0,disabled:!1,fixOnBlur:!0,withinPortal:!1,firstDayOfWeek:"monday",openDropdownOnClear:!1},rh=(0,o.forwardRef)((e,t)=>{let r=(0,c.N4)("DatePicker",rp,e),{value:n,onChange:u,defaultValue:d,classNames:f,styles:p,shadow:h,locale:m,inputFormat:g,transitionDuration:v,transitionTimingFunction:y,nextMonthLabel:b,previousMonthLabel:x,closeCalendarOnChange:w,labelFormat:S,dayClassName:k,dayStyle:j,disableOutsideEvents:E,minDate:O,maxDate:C,excludeDate:I,initialMonth:P,initiallyOpened:A,name:T,size:z,dropdownType:N,dropdownPosition:R,clearable:_,disabled:M,clearButtonLabel:D,fixOnBlur:L,allowFreeInput:F,withinPortal:U,dateParser:B,firstDayOfWeek:H,onFocus:Z,onBlur:W,amountOfMonths:V,allowLevelChange:$,initialLevel:q,onDropdownClose:G,onDropdownOpen:K,hideOutsideDates:X,hideWeekdays:J,renderDay:Y,type:Q,openDropdownOnClear:ee,unstyled:et,weekendDays:er,yearLabelFormat:en,nextDecadeLabel:ei,nextYearLabel:eo,previousDecadeLabel:ea,previousYearLabel:es}=r,el=rf(r,["value","onChange","defaultValue","classNames","styles","shadow","locale","inputFormat","transitionDuration","transitionTimingFunction","nextMonthLabel","previousMonthLabel","closeCalendarOnChange","labelFormat","dayClassName","dayStyle","disableOutsideEvents","minDate","maxDate","excludeDate","initialMonth","initiallyOpened","name","size","dropdownType","dropdownPosition","clearable","disabled","clearButtonLabel","fixOnBlur","allowFreeInput","withinPortal","dateParser","firstDayOfWeek","onFocus","onBlur","amountOfMonths","allowLevelChange","initialLevel","onDropdownClose","onDropdownOpen","hideOutsideDates","hideWeekdays","renderDay","type","openDropdownOnClear","unstyled","weekendDays","yearLabelFormat","nextDecadeLabel","nextYearLabel","previousDecadeLabel","previousYearLabel"]),ec=(0,c.rZ)(),eu=m||ec.datesLocale,ed="date"===Q?"YYYY-MM-DD":g||ec.dateFormat,[ef,ep]=(0,o.useState)(A),eh=(0,o.useRef)(),[em,eg]=(0,o.useState)(null!=d?d:null),[ev,ey]=(0,a.C)({value:n,defaultValue:d,finalValue:null,onChange:u}),[eb,ex]=(0,o.useState)(ev||P||new Date),[ew,eS]=(0,o.useState)(!1),[ek,ej]=(0,o.useState)(ev instanceof Date?(0,s.j)(i()(ev).locale(eu).format(ed)):""),eE=()=>{ep(!1),null==G||G()},eO=()=>{ep(!0),null==K||K()};(0,o.useEffect)(()=>{null!==n||ew||ej(""),n instanceof Date&&!ew&&ej((0,s.j)(i()(n).locale(eu).format(ed)))},[n,ew]);let eC=e=>B?B(e):i()(e,ed,eu).toDate(),eI=()=>{let e="string"==typeof ev?eC(ev):ev;C&&i()(e).isAfter(C)&&(e=C),O&&i()(e).isBefore(O)&&(e=O),i()(e).isValid()?(ey(e),eg(e),ej((0,s.j)(i()(e).locale(eu).format(ed))),ex(e)):L&&ey(em)};return o.createElement(ro,rd({allowFreeInput:F,dropdownOpened:ef,setDropdownOpened:ep,shadow:h,transitionDuration:v,ref:(0,l.Y)(t,eh),size:z,styles:p,classNames:f,onChange:e=>{eO();let t=eC(e.target.value);i()(t).isValid()?(ey(t),eg(t),ej(e.target.value),ex(t)):ej(e.target.value)},onBlur:e=>{"function"==typeof W&&W(e),eS(!1),F&&eI()},onFocus:e=>{"function"==typeof Z&&Z(e),eS(!0)},onKeyDown:e=>{"Enter"===e.key&&F&&(eE(),eI())},name:T,inputLabel:ek,__staticSelector:"DatePicker",dropdownType:N,dropdownPosition:R,clearable:"date"!==Q&&_&&!!ev&&!M,clearButtonLabel:D,onClear:()=>{var e;ey(null),eg(null),ej(""),ee&&eO(),null==(e=eh.current)||e.focus()},disabled:M,withinPortal:U,amountOfMonths:V,onDropdownClose:G,onDropdownOpen:K,type:Q,unstyled:et},el),o.createElement(tU,{classNames:f,styles:p,locale:eu,nextMonthLabel:b,previousMonthLabel:x,month:F?eb:void 0,initialMonth:P||(ev instanceof Date?ev:new Date),onMonthChange:ex,value:ev instanceof Date?ev:i()(ev).toDate(),onChange:e=>{ey(e),ej((0,s.j)(i()(e).locale(eu).format(ed))),w&&eE(),window.setTimeout(()=>{var e;return null==(e=eh.current)?void 0:e.focus()},0)},labelFormat:S,dayClassName:k,dayStyle:j,disableOutsideEvents:E,minDate:O,maxDate:C,excludeDate:I,__staticSelector:"DatePicker",fullWidth:"modal"===N,__stopPropagation:"modal"!==N,size:"modal"===N?"lg":"lg"===z||"xl"===z?"md":"sm",firstDayOfWeek:H,preventFocus:F,amountOfMonths:V,allowLevelChange:$,initialLevel:q,hideOutsideDates:X,hideWeekdays:J,renderDay:Y,unstyled:et,weekendDays:er,yearLabelFormat:en,nextDecadeLabel:ei,nextYearLabel:eo,previousDecadeLabel:ea,previousYearLabel:es}))});rh.displayName="@mantine/dates/DatePicker"},94155:function(e,t,r){"use strict";r.d(t,{fh:function(){return e2}});var n=r(67294),i=r(3594),o=r(64761),a=r(83143),s=r(64523),l=r(91759),c=r(45697),u=r.n(c),d=r(97582),f=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function p(e,t){var r=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var r=t.split(".").pop().toLowerCase(),n=f.get(r);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof r.path){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}var h=[".DS_Store","Thumbs.db"];function m(e){return"object"==typeof e&&null!==e}function g(e){return e.filter(function(e){return -1===h.indexOf(e.name)})}function v(e){if(null===e)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);rr)return[!1,T(r)];if(e.sizer)return[!1,T(r)]}return[!0,null]}function M(e){return null!=e}function D(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function L(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function F(e){e.preventDefault()}function U(){for(var e=arguments.length,t=Array(e),r=0;r1?r-1:0),i=1;ie.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var ee=(0,n.forwardRef)(function(e,t){var r=e.children,i=en(Q(e,Z)),o=i.open,a=Q(i,W);return(0,n.useImperativeHandle)(t,function(){return{open:o}},[o]),n.createElement(n.Fragment,null,r(J(J({},a),{},{open:o})))});ee.displayName="Dropzone";var et={disabled:!1,getFilesFromEvent:function(e){return(0,d.mG)(this,void 0,void 0,function(){return(0,d.Jh)(this,function(t){return m(e)&&m(e.dataTransfer)?[2,function(e,t){return(0,d.mG)(this,void 0,void 0,function(){var r;return(0,d.Jh)(this,function(n){switch(n.label){case 0:if(!e.items)return[3,2];if(r=v(e.items).filter(function(e){return"file"===e.kind}),"drop"!==t)return[2,r];return[4,Promise.all(r.map(y))];case 1:return[2,g(function e(t){return t.reduce(function(t,r){return(0,d.ev)((0,d.ev)([],(0,d.CR)(t),!1),(0,d.CR)(Array.isArray(r)?e(r):[r]),!1)},[])}(n.sent()))];case 2:return[2,g(v(e.files).map(function(e){return p(e)}))]}})})}(e.dataTransfer,e.type)]:m(e)&&m(e.target)?[2,v(e.target.files).map(function(e){return p(e)})]:Array.isArray(e)&&e.every(function(e){return"getFile"in e&&"function"==typeof e.getFile})?[2,function(e){return(0,d.mG)(this,void 0,void 0,function(){return(0,d.Jh)(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(e){return e.getFile()}))];case 1:return[2,t.sent().map(function(e){return p(e)})]}})})}(e)]:[2,[]]})})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ee.defaultProps=et,ee.propTypes={children:u().func,accept:u().objectOf(u().arrayOf(u().string)),multiple:u().bool,preventDropOnDocument:u().bool,noClick:u().bool,noKeyboard:u().bool,noDrag:u().bool,noDragEventsBubbling:u().bool,minSize:u().number,maxSize:u().number,maxFiles:u().number,disabled:u().bool,getFilesFromEvent:u().func,onFileDialogCancel:u().func,onFileDialogOpen:u().func,useFsAccessApi:u().bool,autoFocus:u().bool,onDragEnter:u().func,onDragLeave:u().func,onDragOver:u().func,onDrop:u().func,onDropAccepted:u().func,onDropRejected:u().func,onError:u().func,validator:u().func};var er={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=J(J({},et),e),r=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,p=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,w=t.noClick,S=t.noKeyboard,j=t.noDrag,I=t.noDragEventsBubbling,P=t.onError,A=t.validator,T=(0,n.useMemo)(function(){return function(e){if(M(e))return Object.entries(e).reduce(function(e,t){var r=C(t,2),n=r[0],i=r[1];return[].concat(k(e),[n],k(i))},[]).filter(function(e){return B(e)||H(e)}).join(",")}(r)},[r]),z=(0,n.useMemo)(function(){return M(r)?[{description:"Files",accept:Object.entries(r).filter(function(e){var t=C(e,2),r=t[0],n=t[1],i=!0;return B(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),Array.isArray(n)&&n.every(H)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(e,t){var r=C(t,2),n=r[0],i=r[1];return E(E({},e),{},O({},n,i))},{})}]:r},[r]),Z=(0,n.useMemo)(function(){return"function"==typeof v?v:eo},[v]),W=(0,n.useMemo)(function(){return"function"==typeof g?g:eo},[g]),X=(0,n.useRef)(null),ee=(0,n.useRef)(null),en=q((0,n.useReducer)(ei,er),2),ea=en[0],es=en[1],el=ea.isFocused,ec=ea.isFileDialogActive,eu=(0,n.useRef)("undefined"!=typeof window&&window.isSecureContext&&y&&"showOpenFilePicker"in window),ed=function(){!eu.current&&ec&&setTimeout(function(){ee.current&&!ee.current.files.length&&(es({type:"closeDialog"}),W())},300)};(0,n.useEffect)(function(){return window.addEventListener("focus",ed,!1),function(){window.removeEventListener("focus",ed,!1)}},[ee,ec,W,eu]);var ef=(0,n.useRef)([]),ep=function(e){X.current&&X.current.contains(e.target)||(e.preventDefault(),ef.current=[])};(0,n.useEffect)(function(){return x&&(document.addEventListener("dragover",F,!1),document.addEventListener("drop",ep,!1)),function(){x&&(document.removeEventListener("dragover",F),document.removeEventListener("drop",ep))}},[X,x]),(0,n.useEffect)(function(){return!i&&b&&X.current&&X.current.focus(),function(){}},[X,b,i]);var eh=(0,n.useCallback)(function(e){P?P(e):console.error(e)},[P]),em=(0,n.useCallback)(function(e){var t;e.preventDefault(),e.persist(),eI(e),ef.current=[].concat(function(e){if(Array.isArray(e))return K(e)}(t=ef.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||G(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e.target]),L(e)&&Promise.resolve(o(e)).then(function(t){if(!D(e)||I){var r,n,i,o,d,f,p,h,m=t.length,g=m>0&&(n=(r={files:t,accept:T,minSize:s,maxSize:a,multiple:l,maxFiles:c,validator:A}).files,i=r.accept,o=r.minSize,d=r.maxSize,f=r.multiple,p=r.maxFiles,h=r.validator,(!!f||!(n.length>1))&&(!f||!(p>=1)||!(n.length>p))&&n.every(function(e){var t=C(R(e,i),1)[0],r=C(_(e,o,d),1)[0],n=h?h(e):null;return t&&r&&!n}));es({isDragAccept:g,isDragReject:m>0&&!g,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}}).catch(function(e){return eh(e)})},[o,u,eh,I,T,s,a,l,c,A]),eg=(0,n.useCallback)(function(e){e.preventDefault(),e.persist(),eI(e);var t=L(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&f&&f(e),!1},[f,I]),ev=(0,n.useCallback)(function(e){e.preventDefault(),e.persist(),eI(e);var t=ef.current.filter(function(e){return X.current&&X.current.contains(e)}),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),ef.current=t,!(t.length>0)&&(es({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),L(e)&&d&&d(e))},[X,d,I]),ey=(0,n.useCallback)(function(e,t){var r=[],n=[];e.forEach(function(e){var t=q(R(e,T),2),i=t[0],o=t[1],l=q(_(e,s,a),2),c=l[0],u=l[1],d=A?A(e):null;if(i&&c&&!d)r.push(e);else{var f=[o,u];d&&(f=f.concat(d)),n.push({file:e,errors:f.filter(function(e){return e})})}}),(!l&&r.length>1||l&&c>=1&&r.length>c)&&(r.forEach(function(e){n.push({file:e,errors:[N]})}),r.splice(0)),es({acceptedFiles:r,fileRejections:n,type:"setFiles"}),p&&p(r,n,t),n.length>0&&m&&m(n,t),r.length>0&&h&&h(r,t)},[es,l,T,s,a,c,p,h,m,A]),eb=(0,n.useCallback)(function(e){e.preventDefault(),e.persist(),eI(e),ef.current=[],L(e)&&Promise.resolve(o(e)).then(function(t){(!D(e)||I)&&ey(t,e)}).catch(function(e){return eh(e)}),es({type:"reset"})},[o,ey,eh,I]),ex=(0,n.useCallback)(function(){if(eu.current){es({type:"openDialog"}),Z(),window.showOpenFilePicker({multiple:l,types:z}).then(function(e){return o(e)}).then(function(e){ey(e,null),es({type:"closeDialog"})}).catch(function(e){e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)?(W(e),es({type:"closeDialog"})):e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)?(eu.current=!1,ee.current?(ee.current.value=null,ee.current.click()):eh(Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):eh(e)});return}ee.current&&(es({type:"openDialog"}),Z(),ee.current.value=null,ee.current.click())},[es,Z,W,y,ey,eh,z,l]),ew=(0,n.useCallback)(function(e){X.current&&X.current.isEqualNode(e.target)&&(" "===e.key||"Enter"===e.key||32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),ex())},[X,ex]),eS=(0,n.useCallback)(function(){es({type:"focus"})},[]),ek=(0,n.useCallback)(function(){es({type:"blur"})},[]),ej=(0,n.useCallback)(function(){w||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return -1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/")}()?setTimeout(ex,0):ex())},[w,ex]),eE=function(e){return i?null:e},eO=function(e){return S?null:eE(e)},eC=function(e){return j?null:eE(e)},eI=function(e){I&&e.stopPropagation()},eP=(0,n.useMemo)(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=e.role,n=e.onKeyDown,o=e.onFocus,a=e.onBlur,s=e.onClick,l=e.onDragEnter,c=e.onDragOver,u=e.onDragLeave,d=e.onDrop,f=Q(e,V);return J(J(Y({onKeyDown:eO(U(n,ew)),onFocus:eO(U(o,eS)),onBlur:eO(U(a,ek)),onClick:eE(U(s,ej)),onDragEnter:eC(U(l,em)),onDragOver:eC(U(c,eg)),onDragLeave:eC(U(u,ev)),onDrop:eC(U(d,eb)),role:"string"==typeof r&&""!==r?r:"presentation"},void 0===t?"ref":t,X),i||S?{}:{tabIndex:0}),f)}},[X,ew,eS,ek,ej,em,eg,ev,eb,S,j,i]),eA=(0,n.useCallback)(function(e){e.stopPropagation()},[]),eT=(0,n.useMemo)(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=e.onChange,n=e.onClick,i=Q(e,$);return J(J({},Y({accept:T,multiple:l,type:"file",style:{display:"none"},onChange:eE(U(r,eb)),onClick:eE(U(n,eA)),tabIndex:-1},void 0===t?"ref":t,ee)),i)}},[ee,r,l,eb,i]);return J(J({},ea),{},{isFocused:el&&!i,getRootProps:eP,getInputProps:eT,rootRef:X,inputRef:ee,open:eE(ex)})}function ei(e,t){switch(t.type){case"focus":return J(J({},e),{},{isFocused:!0});case"blur":return J(J({},e),{},{isFocused:!1});case"openDialog":return J(J({},er),{},{isFileDialogActive:!0});case"closeDialog":return J(J({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return J(J({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return J(J({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return J({},er);default:return e}}function eo(){}var ea=r(49737),es=r(83979);let[el,ec]=(0,r(68216).R)("Dropzone component was not found in tree");var eu=r(22146),ed=r(24241),ef=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,em=(e,t)=>{var r={};for(var n in e)ep.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&ef)for(var n of ef(e))0>t.indexOf(n)&&eh.call(e,n)&&(r[n]=e[n]);return r};function eg(e){let t=t=>{let r=(0,o.N4)(`Dropzone${(0,eu.j)(e)}`,{},t),{children:i}=r,a=em(r,["children"]),s=ec(),l=(0,ed.k)(i)?i:n.createElement("span",null,i);return s[e]?(0,n.cloneElement)(l,a):null};return t.displayName=`@mantine/dropzone/${(0,eu.j)(e)}`,t}let ev=eg("accept"),ey=eg("reject"),eb=eg("idle");var ex=r(56817),ew=Object.defineProperty,eS=Object.defineProperties,ek=Object.getOwnPropertyDescriptors,ej=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,eO=Object.prototype.propertyIsEnumerable,eC=(e,t,r)=>t in e?ew(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eI=(e,t)=>{for(var r in t||(t={}))eE.call(t,r)&&eC(e,r,t[r]);if(ej)for(var r of ej(t))eO.call(t,r)&&eC(e,r,t[r]);return e},eP=(e,t)=>eS(e,ek(t)),eA=(0,ex.k)((e,{padding:t,radius:r})=>{let n=e.fn.variant({color:"red",variant:"light"}),i=e.fn.variant({color:e.primaryColor,variant:"light"});return{root:eP(eI(eI({},e.fn.fontStyles()),e.fn.focusStyles()),{boxSizing:"border-box",backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white,border:`2px dashed ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`,padding:e.fn.size({size:t,sizes:e.spacing}),borderRadius:e.fn.radius(r),cursor:"pointer",userSelect:"none",transition:"background-color 150ms ease",position:"relative","&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]},"&[data-loading]":{cursor:"default","&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.white}},"&[data-accept]":{backgroundColor:"dark"===e.colorScheme?i.background:e.colors[e.primaryColor][0],borderColor:"dark"===e.colorScheme?i.border:e.colors[e.primaryColor][4],"&:hover":{backgroundColor:"dark"===e.colorScheme?i.background:e.colors[e.primaryColor][0]}},"&[data-reject]":{backgroundColor:"dark"===e.colorScheme?n.background:e.colors.red[0],borderColor:"dark"===e.colorScheme?n.border:e.colors.red[4],"&:hover":{backgroundColor:"dark"===e.colorScheme?n.background:e.colors.red[0]}}}),inner:{pointerEvents:"none",userSelect:"none"}}}),eT=Object.defineProperty,ez=Object.defineProperties,eN=Object.getOwnPropertyDescriptors,eR=Object.getOwnPropertySymbols,e_=Object.prototype.hasOwnProperty,eM=Object.prototype.propertyIsEnumerable,eD=(e,t,r)=>t in e?eT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eL=(e,t)=>{for(var r in t||(t={}))e_.call(t,r)&&eD(e,r,t[r]);if(eR)for(var r of eR(t))eM.call(t,r)&&eD(e,r,t[r]);return e},eF=(e,t)=>ez(e,eN(t)),eU=(e,t)=>{var r={};for(var n in e)e_.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eR)for(var n of eR(e))0>t.indexOf(n)&&eM.call(e,n)&&(r[n]=e[n]);return r};let eB={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function eH(e){let t=(0,o.N4)("Dropzone",eB,e),{className:r,padding:i,radius:a,disabled:l,classNames:c,styles:u,loading:d,multiple:f,maxSize:p,accept:h,children:m,onDropAny:g,onDrop:v,onReject:y,openRef:b,name:x,unstyled:w,maxFiles:S,autoFocus:k,activateOnClick:j,activateOnDrag:E,dragEventsBubbling:O,activateOnKeyboard:C,onDragEnter:I,onDragLeave:P,onDragOver:A,onFileDialogCancel:T,onFileDialogOpen:z,preventDropOnDocument:N,useFsAccessApi:R,getFilesFromEvent:_,validator:M}=t,D=eU(t,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","unstyled","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator"]),{classes:L,cx:F}=eA({radius:a,padding:i},{classNames:c,styles:u,unstyled:w,name:"Dropzone"}),{getRootProps:U,getInputProps:B,isDragAccept:H,isDragReject:Z,open:W}=en(eL({onDrop:g,onDropAccepted:v,onDropRejected:y,disabled:l||d,accept:Array.isArray(h)?h.reduce((e,t)=>eF(eL({},e),{[t]:[]}),{}):h,multiple:f,maxSize:p,maxFiles:S,autoFocus:k,noClick:!j,noDrag:!E,noDragEventsBubbling:!O,noKeyboard:!C,onDragEnter:I,onDragLeave:P,onDragOver:A,onFileDialogCancel:T,onFileDialogOpen:z,preventDropOnDocument:N,useFsAccessApi:R,validator:M},_?{getFilesFromEvent:_}:null));(0,es.k)(b,W);let V=!H&&!Z;return n.createElement(el,{value:{accept:H,reject:Z,idle:V}},n.createElement(s.x,eF(eL(eL({},D),U()),{"data-accept":H||void 0,"data-reject":Z||void 0,"data-idle":V||void 0,"data-loading":d||void 0,className:F(L.root,r)}),n.createElement(ea.f,{visible:d,radius:a,unstyled:w}),n.createElement("input",eF(eL({},B()),{name:x})),n.createElement("div",{className:L.inner},m)))}eH.displayName="@mantine/dropzone/Dropzone",eH.Accept=ev,eH.Reject=ey,eH.Idle=eb;var eZ=(0,ex.k)(e=>({wrapper:{position:"fixed",top:0,bottom:0,left:0,right:0,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,display:"flex",padding:e.spacing.xs,transition:"opacity 100ms ease"},dropzone:{flex:1}})),eW=Object.defineProperty,eV=Object.defineProperties,e$=Object.getOwnPropertyDescriptors,eq=Object.getOwnPropertySymbols,eG=Object.prototype.hasOwnProperty,eK=Object.prototype.propertyIsEnumerable,eX=(e,t,r)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eJ=(e,t)=>{for(var r in t||(t={}))eG.call(t,r)&&eX(e,r,t[r]);if(eq)for(var r of eq(t))eK.call(t,r)&&eX(e,r,t[r]);return e},eY=(e,t)=>eV(e,e$(t)),eQ=(e,t)=>{var r={};for(var n in e)eG.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eq)for(var n of eq(e))0>t.indexOf(n)&&eK.call(e,n)&&(r[n]=e[n]);return r};let e0={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:(0,i.w)("max"),withinPortal:!0};function e1(e){let t=(0,o.N4)("DropzoneFullScreen",e0,e),{classNames:r,styles:i,sx:c,className:u,style:d,unstyled:f,active:p,onDrop:h,onReject:m,zIndex:g,withinPortal:v}=t,y=eQ(t,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal"]),[b,x]=n.useState(0),[w,{open:S,close:k}]=(0,l.q)(!1),{classes:j,cx:E}=eZ(null,{name:"DropzoneFullScreen",classNames:r,styles:i,unstyled:f}),O=e=>{e.dataTransfer.types.includes("Files")&&(x(e=>e+1),S())},C=()=>{x(e=>e-1)};return(0,n.useEffect)(()=>{0===b&&k()},[b]),(0,n.useEffect)(()=>{if(p)return document.addEventListener("dragenter",O,!1),document.addEventListener("dragleave",C,!1),()=>{document.removeEventListener("dragenter",O,!1),document.removeEventListener("dragleave",C,!1)}},[p]),n.createElement(a.q,{withinPortal:v},n.createElement(s.x,{className:E(j.wrapper,u),sx:c,style:eY(eJ({},d),{opacity:w?1:0,pointerEvents:w?"all":"none",zIndex:g})},n.createElement(eH,eY(eJ({},y),{classNames:r,styles:i,unstyled:f,className:j.dropzone,onDrop:e=>{null==h||h(e),k()},onReject:e=>{null==m||m(e),k()}}))))}e1.displayName="@mantine/dropzone/DropzoneFullScreen",eH.FullScreen=e1;let e2=eH},10753:function(e,t,r){"use strict";r.d(t,{O:function(){return o}});var n=r(67294);let i=["mousedown","touchstart"];function o(e,t,r){let o=(0,n.useRef)();return(0,n.useEffect)(()=>{let n=t=>{let{target:n}=null!=t?t:{};if(Array.isArray(r)){let i=(null==n?void 0:n.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(n)&&"HTML"!==n.tagName;r.every(e=>!!e&&!t.composedPath().includes(e))&&!i&&e()}else o.current&&!o.current.contains(n)&&e()};return(t||i).forEach(e=>document.addEventListener(e,n)),()=>{(t||i).forEach(e=>document.removeEventListener(e,n))}},[o,e,r]),o}},18060:function(e,t,r){"use strict";r.d(t,{V:function(){return i}});var n=r(67294);function i({timeout:e=2e3}={}){let[t,r]=(0,n.useState)(null),[i,o]=(0,n.useState)(!1),[a,s]=(0,n.useState)(null),l=t=>{clearTimeout(a),s(setTimeout(()=>o(!1),e)),o(t)};return{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>l(!0)).catch(e=>r(e)):r(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(a)},error:t,copied:i}}},59417:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294);function i(e,t,r={leading:!1}){let[i,o]=(0,n.useState)(e),a=(0,n.useRef)(null),s=(0,n.useRef)(!0),l=()=>window.clearTimeout(a.current);return(0,n.useEffect)(()=>l,[]),[i,e=>{l(),s.current&&r.leading?o(e):a.current=window.setTimeout(()=>{s.current=!0,o(e)},t),s.current=!1}]}},39759:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=r(67294);function i(e,t,r={leading:!1}){let[i,o]=(0,n.useState)(e),a=(0,n.useRef)(!1),s=(0,n.useRef)(null),l=(0,n.useRef)(!1),c=()=>window.clearTimeout(s.current);return(0,n.useEffect)(()=>{a.current&&(!l.current&&r.leading?(l.current=!0,o(e)):(c(),s.current=window.setTimeout(()=>{l.current=!1,o(e)},t)))},[e,r.leading,t]),(0,n.useEffect)(()=>(a.current=!0,c),[]),[i,c]}},37048:function(e,t,r){"use strict";r.d(t,{l:function(){return i}});var n=r(67294);function i(e,t){let r=(0,n.useRef)(!1);(0,n.useEffect)(()=>()=>{r.current=!1},[]),(0,n.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}},91759:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});var n=r(67294);function i(e=!1,t){let{onOpen:r,onClose:i}=t||{},[o,a]=(0,n.useState)(e),s=(0,n.useCallback)(()=>{a(e=>e||(null==r||r(),!0))},[r]),l=(0,n.useCallback)(()=>{a(e=>e?(null==i||i(),!1):e)},[i]),c=(0,n.useCallback)(()=>{o?l():s()},[l,s,o]);return[o,{open:s,close:l,toggle:c}]}},96362:function(e,t,r){"use strict";r.d(t,{u:function(){return o}});var n=r(67294),i=r(37048);function o({opened:e,shouldReturnFocus:t=!0}){let r=(0,n.useRef)(),o=()=>{var e;r.current&&"focus"in r.current&&"function"==typeof r.current.focus&&(null==(e=r.current)||e.focus({preventScroll:!0}))};return(0,i.l)(()=>{let n=-1,i=e=>{"Tab"===e.key&&window.clearTimeout(n)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(n=window.setTimeout(o,10)),()=>{window.clearTimeout(n),document.removeEventListener("keydown",i)}},[e,t]),o}},67293:function(e,t,r){"use strict";r.d(t,{P:function(){return c}});var n=r(67294);let i=/input|select|textarea|button|object/,o="a, input, select, textarea, button, object, [tabindex]";function a(e){let t=e.getAttribute("tabindex");return null===t&&(t=void 0),parseInt(t,10)}function s(e){let t=e.nodeName.toLowerCase(),r=!Number.isNaN(a(e));return(i.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&function(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||"hidden"===e.getAttribute("type"))return!1;let t=e;for(;t&&t!==document.body&&11!==t.nodeType;){if("none"===t.style.display)return!1;t=t.parentNode}return!0}(e)}function l(e){let t=a(e);return(Number.isNaN(t)||t>=0)&&s(e)}function c(e=!0){let t=(0,n.useRef)(),r=(0,n.useRef)(null),i=(0,n.useCallback)(n=>{if(e){if(null===n){r.current&&(r.current(),r.current=null);return}if(r.current=function(e,t="body > :not(script)"){let r=Array.from(document.querySelectorAll(t)).map(t=>{var r;if((null==(r=null==t?void 0:t.shadowRoot)?void 0:r.contains(e))||t.contains(e))return;let n=t.getAttribute("aria-hidden");return(null===n||"false"===n)&&t.setAttribute("aria-hidden","true"),{node:t,ariaHidden:n}});return()=>{r.forEach(e=>{e&&(null===e.ariaHidden?e.node.removeAttribute("aria-hidden"):e.node.setAttribute("aria-hidden",e.ariaHidden))})}}(n),t.current!==n){if(n){let e=()=>{let e=n.querySelector("[data-autofocus]");if(!e){let t=Array.from(n.querySelectorAll(o));!(e=t.find(l)||t.find(s)||null)&&s(n)&&(e=n)}e&&e.focus({preventScroll:!0})};setTimeout(()=>{n.getRootNode()&&e()}),t.current=n}else t.current=null}}},[e]);return(0,n.useEffect)(()=>{if(!e)return;let n=e=>{"Tab"===e.key&&t.current&&function(e,t){let r=Array.from(e.querySelectorAll(o)).filter(l);if(!r.length){t.preventDefault();return}let n=r[t.shiftKey?0:r.length-1],i=e.getRootNode();if(!(n===i.activeElement||e===i.activeElement))return;t.preventDefault();let a=r[t.shiftKey?r.length-1:0];a&&a.focus()}(t.current,e)};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n),r.current&&r.current()}},[e]),i}},94707:function(e,t,r){"use strict";r.d(t,{k:function(){return f},yr:function(){return p}});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>i(e,o(t));function f(e){return t=>(function(e,t){let{alt:r,ctrl:n,meta:i,mod:o,shift:a,key:s}=e,{altKey:l,ctrlKey:c,metaKey:u,shiftKey:d,key:f}=t;if(r!==l)return!1;if(o){if(!c&&!u)return!1}else if(n!==c||i!==u)return!1;return a===d&&!!s&&(f.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase())})(function(e){let t=e.toLowerCase().split("+").map(e=>e.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},n=["alt","ctrl","meta","shift","mod"],i=t.find(e=>!n.includes(e));return d(u({},r),{key:i})}(e),t)}function p(e){return t=>{let r="nativeEvent"in t?t.nativeEvent:t;e.forEach(([e,n,i={preventDefault:!0}])=>{f(e)(r)&&(i.preventDefault&&t.preventDefault(),n(r))})}}},4736:function(e,t,r){"use strict";r.d(t,{A:function(){return o}});var n=r(67294),i=r(94707);function o(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){(0,n.useEffect)(()=>{let n=n=>{e.forEach(([e,o,a={preventDefault:!0}])=>{(0,i.k)(e)(n)&&function(e,t,r=!1){return!(e.target instanceof HTMLElement)||(r?!t.includes(e.target.tagName):!e.target.isContentEditable&&!t.includes(e.target.tagName))}(n,t,r)&&(a.preventDefault&&n.preventDefault(),o(n))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}},36289:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});var n=r(67294),i=r(10129);let o=()=>`mantine-${Math.random().toString(36).slice(2,11)}`,a=n["useId".toString()]||(()=>void 0);function s(e){return"string"==typeof e?e:function(){let e=a();return e?`mantine-${e.replace(/:/g,"")}`:""}()||function(){let[e,t]=(0,n.useState)("");return(0,i.Y)(()=>{t(o())},[]),e}()}},65217:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(67294);function i(e,t){let[r,i]=(0,n.useState)(!1),o=(0,n.useRef)(),a=(0,n.useRef)();(0,n.useEffect)(()=>{a.current=e},[e]);let s=()=>{i(e=>(e||o.current||(o.current=window.setInterval(a.current,t)),!0))},l=()=>{i(!1),window.clearInterval(o.current),o.current=void 0};return{start:s,stop:l,toggle:()=>{r?l():s()},active:r}}},10129:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(67294);let i="undefined"!=typeof document?n.useLayoutEffect:n.useEffect},28738:function(e,t,r){"use strict";r.d(t,{o:function(){return a}});var n=r(67294),i=r(84137);function o(e){try{return JSON.parse(e)}catch(t){return e}}function a(e,t){let r="localStorage"===e?"mantine-local-storage":"mantine-session-storage";return function({key:a,defaultValue:s,getInitialValueInEffect:l=!0,deserialize:c=o,serialize:u=e=>(function(e,t){try{return JSON.stringify(e)}catch(e){throw Error(`@mantine/hooks ${t}: Failed to serialize the value`)}})(e,t)}){let d=(0,n.useCallback)(t=>{if("undefined"==typeof window||!(e in window)||null===window[e]||t)return s;let r=window[e].getItem(a);return null!==r?c(r):s},[a,s]),[f,p]=(0,n.useState)(d(l)),h=(0,n.useCallback)(t=>{t instanceof Function?p(n=>{let i=t(n);return window[e].setItem(a,u(i)),window.dispatchEvent(new CustomEvent(r,{detail:{key:a,value:t(n)}})),i}):(window[e].setItem(a,u(t)),window.dispatchEvent(new CustomEvent(r,{detail:{key:a,value:t}})),p(t))},[a]),m=(0,n.useCallback)(()=>{window[e].removeItem(a),window.dispatchEvent(new CustomEvent(r,{detail:{key:a,value:s}}))},[]);return(0,i.s)("storage",t=>{var r;t.storageArea===window[e]&&t.key===a&&p(c(null!=(r=t.newValue)?r:void 0))}),(0,i.s)(r,e=>{e.detail.key===a&&p(e.detail.value)}),(0,n.useEffect)(()=>{void 0!==s&&void 0===f&&h(s)},[s,f,h]),(0,n.useEffect)(()=>{l&&p(d())},[]),[void 0===f?s:f,h,m]}}},21997:function(e,t,r){"use strict";r.d(t,{_:function(){return i}});var n=r(28738);function i(e){return(0,n.o)("localStorage","use-local-storage")(e)}},34065:function(e,t,r){"use strict";r.d(t,{a:function(){return i}});var n=r(67294);function i(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[i,o]=(0,n.useState)(r?t:"boolean"==typeof t?t:!!("undefined"!=typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches),a=(0,n.useRef)();return(0,n.useEffect)(()=>{if("matchMedia"in window)return a.current=window.matchMedia(e),o(a.current.matches),function(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch(r){return e.addListener(t),()=>e.removeListener(t)}}(a.current,e=>o(e.matches))},[e]),i}},80665:function(e,t,r){"use strict";r.d(t,{Y:function(){return a},l:function(){return o}});var n=r(67294),i=r(83979);function o(...e){return t=>{e.forEach(e=>(0,i.k)(e,t))}}function a(...e){return(0,n.useCallback)(o(...e),e)}},47776:function(e,t,r){"use strict";r.d(t,{E:function(){return o},r:function(){return a}});var n=r(67294),i=r(9276);let o=e=>({x:(0,i.u)(e.x,0,1),y:(0,i.u)(e.y,0,1)});function a(e,t,r="ltr"){let o=(0,n.useRef)(),a=(0,n.useRef)(!1),s=(0,n.useRef)(!1),l=(0,n.useRef)(0),[c,u]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{a.current=!0},[]),(0,n.useEffect)(()=>{let n=({x:t,y:n})=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{if(a.current&&o.current){o.current.style.userSelect="none";let a=o.current.getBoundingClientRect();if(a.width&&a.height){let o=(0,i.u)((t-a.left)/a.width,0,1);e({x:"ltr"===r?o:1-o,y:(0,i.u)((n-a.top)/a.height,0,1)})}}})},c=()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.addEventListener("touchmove",v),document.addEventListener("touchend",p)},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",p)},f=()=>{!s.current&&a.current&&(s.current=!0,"function"==typeof(null==t?void 0:t.onScrubStart)&&t.onScrubStart(),u(!0),c())},p=()=>{s.current&&a.current&&(s.current=!1,u(!1),d(),setTimeout(()=>{"function"==typeof(null==t?void 0:t.onScrubEnd)&&t.onScrubEnd()},0))},h=e=>{f(),e.preventDefault(),m(e)},m=e=>n({x:e.clientX,y:e.clientY}),g=e=>{e.cancelable&&e.preventDefault(),f(),v(e)},v=e=>{e.cancelable&&e.preventDefault(),n({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})};return o.current.addEventListener("mousedown",h),o.current.addEventListener("touchstart",g,{passive:!1}),()=>{o.current&&(o.current.removeEventListener("mousedown",h),o.current.removeEventListener("touchstart",g))}},[r,e]),{ref:o,active:c}}},50064:function(e,t,r){"use strict";function n(){return"undefined"!=typeof window?function(){let{userAgent:e}=window.navigator;return/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i.test(e)?"macos":/(iPhone)|(iPad)|(iPod)/i.test(e)?"ios":/(Win32)|(Win64)|(Windows)|(WinCE)/i.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}():"undetermined"}r.d(t,{i:function(){return n}})},67272:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}},73678:function(e,t,r){"use strict";r.d(t,{J:function(){return i}});var n=r(34065);function i(e,t){return(0,n.a)("(prefers-reduced-motion: reduce)",e,t)}},12185:function(e,t,r){"use strict";r.d(t,{h:function(){return a},y:function(){return o}});var n=r(67294);let i={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function o(){let e=(0,n.useRef)(0),t=(0,n.useRef)(null),[r,o]=(0,n.useState)(i),a=(0,n.useMemo)(()=>"undefined"!=typeof window?new ResizeObserver(r=>{let n=r[0];n&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{t.current&&o(n.contentRect)}))}):null,[]);return(0,n.useEffect)(()=>(t.current&&a.observe(t.current),()=>{a.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[t.current]),[t,r]}function a(){let[e,{width:t,height:r}]=o();return{ref:e,width:t,height:r}}},32819:function(e,t,r){"use strict";r.d(t,{g:function(){return u}});var n=r(67294),i=r(73678),o=r(84137);let a=e=>e<.5?2*e*e:-1+(4-2*e)*e,s=({axis:e,target:t,parent:r,alignment:n,offset:i,isList:o})=>{if(!t||!r&&"undefined"==typeof document)return 0;let a=!!r,s=(r||document.body).getBoundingClientRect(),l=t.getBoundingClientRect(),c=e=>l[e]-s[e];if("y"===e){let e=c("top");if(0===e)return 0;if("start"===n){let t=e-i;return t<=l.height*(o?0:1)||!o?t:0}let t=a?s.height:window.innerHeight;if("end"===n){let r=e+i-t+l.height;return r>=-l.height*(o?0:1)||!o?r:0}return"center"===n?e-t/2+l.height/2:0}if("x"===e){let e=c("left");if(0===e)return 0;if("start"===n){let t=e-i;return t<=l.width||!o?t:0}let t=a?s.width:window.innerWidth;if("end"===n){let r=e+i-t+l.width;return r>=-l.width||!o?r:0}if("center"===n)return e-t/2+l.width/2}return 0},l=({axis:e,parent:t})=>{if(!t&&"undefined"==typeof document)return 0;let r="y"===e?"scrollTop":"scrollLeft";if(t)return t[r];let{body:n,documentElement:i}=document;return n[r]+i[r]},c=({axis:e,parent:t,distance:r})=>{if(!t&&"undefined"==typeof document)return;let n="y"===e?"scrollTop":"scrollLeft";if(t)t[n]=r;else{let{body:e,documentElement:t}=document;e[n]=r,t[n]=r}};function u({duration:e=1250,axis:t="y",onScrollFinish:r,easing:u=a,offset:d=0,cancelable:f=!0,isList:p=!1}={}){let h=(0,n.useRef)(0),m=(0,n.useRef)(0),g=(0,n.useRef)(!1),v=(0,n.useRef)(null),y=(0,n.useRef)(null),b=(0,i.J)(),x=()=>{h.current&&cancelAnimationFrame(h.current)},w=(0,n.useCallback)(({alignment:n="start"}={})=>{var i;g.current=!1,h.current&&x();let o=null!=(i=l({parent:v.current,axis:t}))?i:0,a=s({parent:v.current,target:y.current,axis:t,alignment:n,offset:d,isList:p})-(v.current?0:o);!function n(){0===m.current&&(m.current=performance.now());let i=performance.now()-m.current,s=b||0===e?1:i/e,l=o+a*u(s);c({parent:v.current,axis:t,distance:l}),!g.current&&s<1?h.current=requestAnimationFrame(n):("function"==typeof r&&r(),m.current=0,h.current=0,x())}()},[t,e,u,p,d,r,b]),S=()=>{f&&(g.current=!0)};return(0,o.s)("wheel",S,{passive:!0}),(0,o.s)("touchmove",S,{passive:!0}),(0,n.useEffect)(()=>x,[]),{scrollableRef:v,targetRef:y,scrollIntoView:w,cancel:x}}},83317:function(e,t,r){"use strict";r.d(t,{P:function(){return o}});var n=r(67294);let i=({disableBodyPadding:e})=>{let t=e?null:"undefined"==typeof window||"undefined"==typeof document?0:parseInt(window.getComputedStyle(document.body).paddingRight,10)+(window.innerWidth-document.documentElement.clientWidth);return`body { + --removed-scroll-width: ${t}px; + touch-action: none; + overflow: hidden !important; + position: relative !important; + ${t?"padding-right: var(--removed-scroll-width) !important;":""} + `};function o(e,t={disableBodyPadding:!1}){let[r,o]=(0,n.useState)(e||!1),a=(0,n.useRef)(0),{disableBodyPadding:s}=t,l=(0,n.useRef)(null),c=()=>{a.current=window.scrollY;let e=i({disableBodyPadding:s}),t=function(){let e=document.createElement("style");return e.type="text/css",e.setAttribute("mantine-scroll-lock",""),e}();t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.head||document.getElementsByTagName("head")[0]).appendChild(t),l.current=t},u=()=>{(null==l?void 0:l.current)&&(l.current.parentNode.removeChild(l.current),l.current=null)};return(0,n.useEffect)(()=>(r?c():u(),u),[r]),(0,n.useEffect)(()=>{void 0!==e&&o(e)},[e]),(0,n.useEffect)(()=>{void 0===e&&"undefined"!=typeof window&&"hidden"===window.document.body.style.overflow&&o(!0)},[o]),[r,o]}},80777:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=r(28738);function i(e){return(0,n.o)("sessionStorage","use-session-storage")(e)}},98697:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(67294);function i(e,t,r={autoInvoke:!1}){let i=(0,n.useRef)(null),o=(...r)=>{i.current||(i.current=window.setTimeout(()=>{e(r),i.current=null},t))},a=()=>{i.current&&(window.clearTimeout(i.current),i.current=null)};return(0,n.useEffect)(()=>(r.autoInvoke&&o(),a),[t]),{start:o,clear:a}}},15851:function(e,t,r){"use strict";r.d(t,{C:function(){return i}});var n=r(67294);function i({value:e,defaultValue:t,finalValue:r,onChange:i=()=>{}}){let[o,a]=(0,n.useState)(void 0!==t?t:r);return void 0!==e?[e,i,!0]:[o,e=>{a(e),null==i||i(e)},!1]}},84137:function(e,t,r){"use strict";r.d(t,{s:function(){return i}});var n=r(67294);function i(e,t,r){(0,n.useEffect)(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}},83979:function(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):"object"==typeof e&&null!==e&&"current"in e&&(e.current=t)}r.d(t,{k:function(){return n}})},9276:function(e,t,r){"use strict";function n(e,t,r){return Math.min(Math.max(e,t),r)}r.d(t,{u:function(){return n}})},89058:function(e,t,r){"use strict";function n(){return`mantine-${Math.random().toString(36).slice(2,11)}`}r.d(t,{k:function(){return n}})},22146:function(e,t,r){"use strict";function n(e){return"string"!=typeof e?"":e.charAt(0).toUpperCase()+e.slice(1)}r.d(t,{j:function(){return n}})},25963:function(e,t,r){"use strict";r.d(t,{Mr:function(){return a},Ro:function(){return n},_5:function(){return l},h7:function(){return o},m6:function(){return c},pT:function(){return s}});let[n,i]=(0,r(94878).P)("mantine-modals"),o=i("openModal"),a=i("closeModal"),s=i("closeAllModals"),l=i("openConfirmModal"),c=i("openContextModal")},9585:function(e,t,r){"use strict";r.d(t,{Gy:function(){return n},c0:function(){return o},wD:function(){return s},yK:function(){return a}});let[n,i]=(0,r(94878).P)("mantine-notifications"),o=i("show"),a=i("hide");i("clean"),i("cleanQueue");let s=i("update")},36972:function(e,t,r){"use strict";r.d(t,{A:function(){return a},X:function(){return o}});var n=r(67294);let i=(0,n.createContext)(null);function o(){let e=(0,n.useContext)(i);if(!e)throw Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return e}function a({colorScheme:e,toggleColorScheme:t,children:r}){return n.createElement(i.Provider,{value:{colorScheme:e,toggleColorScheme:t}},r)}a.displayName="@mantine/core/ColorSchemeProvider"},64761:function(e,t,r){"use strict";r.d(t,{Me:function(){return Z},N4:function(){return H},T1:function(){return B},O2:function(){return U},rZ:function(){return F}});var n=r(67294),i=r(91683),o=r(70917),a=r(37447),s=Object.defineProperty,l=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e},m=(e,t)=>l(e,c(t));function g({theme:e}){return n.createElement(o.xB,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:"dark"===e.colorScheme?"dark":"light"},body:m(h({},e.fn.fontStyles()),{backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function v(e,t,r){Object.keys(t).forEach(n=>{e[`--mantine-${r}-${n}`]="number"==typeof t[n]?`${t[n]}px`:t[n]})}function y({theme:e}){let t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};v(t,e.shadows,"shadow"),v(t,e.fontSizes,"font-size"),v(t,e.radius,"radius"),v(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((e,n)=>{t[`--mantine-color-${r}-${n}`]=e})});let r=e.headings.sizes;return Object.keys(r).forEach(e=>{t[`--mantine-${e}-font-size`]=`${r[e].fontSize}px`,t[`--mantine-${e}-line-height`]=`${r[e].lineHeight}`}),n.createElement(o.xB,{styles:{":root":t}})}var b=r(3734),x=Object.defineProperty,w=Object.defineProperties,S=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))j.call(t,r)&&O(e,r,t[r]);if(k)for(var r of k(t))E.call(t,r)&&O(e,r,t[r]);return e},I=(e,t)=>w(e,S(t)),P=r(66896);let A={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function T(){return n.createElement(o.xB,{styles:A})}var z=Object.defineProperty,N=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,M=(e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))R.call(t,r)&&M(e,r,t[r]);if(N)for(var r of N(t))_.call(t,r)&&M(e,r,t[r]);return e};let L=(0,n.createContext)({theme:a.t0});function F(){var e;return(null==(e=(0,n.useContext)(L))?void 0:e.theme)||a.t0}function U(e){let t=F(),r=e=>{var r,n;return{styles:(null==(r=t.components[e])?void 0:r.styles)||{},classNames:(null==(n=t.components[e])?void 0:n.classNames)||{}}};return Array.isArray(e)?e.map(r):[r(e)]}function B(){var e;return null==(e=(0,n.useContext)(L))?void 0:e.emotionCache}function H(e,t,r){var n;let i=F(),o=null==(n=i.components[e])?void 0:n.defaultProps,a="function"==typeof o?o(i):o;return D(D(D({},t),a),(0,P.L)(r))}function Z({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:s=!1,withCSSVariables:l=!1,inherit:c=!1,children:u}){var d,f;let p=(0,n.useContext)(L),h=(d=a.t0,f=c?D(D({},p.theme),e):e,(0,b.P)(function(e,t){if(!t)return e;let r=Object.keys(e).reduce((r,n)=>{if("headings"===n&&t.headings){let n=t.headings.sizes?Object.keys(e.headings.sizes).reduce((r,n)=>(r[n]=C(C({},e.headings.sizes[n]),t.headings.sizes[n]),r),{}):e.headings.sizes;return I(C({},r),{headings:I(C(C({},e.headings),t.headings),{sizes:n})})}return r[n]="object"==typeof t[n]?C(C({},e[n]),t[n]):"number"==typeof t[n]||"boolean"==typeof t[n]||"function"==typeof t[n]?t[n]:t[n]||e[n],r},{});if(!(r.primaryColor in r.colors))throw Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return r}(d,f)));return n.createElement(i.a,{theme:h},n.createElement(L.Provider,{value:{theme:h,emotionCache:t}},r&&n.createElement(T,null),s&&n.createElement(g,{theme:h}),l&&n.createElement(y,{theme:h}),"function"==typeof h.globalStyles&&n.createElement(o.xB,{styles:h.globalStyles(h)}),u))}Z.displayName="@mantine/core/MantineProvider"},37447:function(e,t,r){"use strict";r.d(t,{t0:function(){return a},j1:function(){return o}});let n={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var i=r(3734);Object.keys(n);let o=["xs","sm","md","lg","xl"],a=(0,i.P)({dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",dateFormat:"MMMM D, YYYY",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:n,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1)",sm:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 10px 15px -5px, rgba(0, 0, 0, 0.04) 0px 7px 7px -5px",md:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px",lg:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 28px 23px -7px, rgba(0, 0, 0, 0.04) 0px 12px 12px -7px",xl:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 36px 28px -7px, rgba(0, 0, 0, 0.04) 0px 17px 17px -7px"},fontSizes:{xs:12,sm:14,md:16,lg:18,xl:20},radius:{xs:2,sm:4,md:8,lg:16,xl:32},spacing:{xs:10,sm:12,md:16,lg:20,xl:24},breakpoints:{xs:576,sm:768,md:992,lg:1200,xl:1400},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:34,lineHeight:1.3,fontWeight:void 0},h2:{fontSize:26,lineHeight:1.35,fontWeight:void 0},h3:{fontSize:22,lineHeight:1.4,fontWeight:void 0},h4:{fontSize:18,lineHeight:1.45,fontWeight:void 0},h5:{fontSize:16,lineHeight:1.5,fontWeight:void 0},h6:{fontSize:14,lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(1px)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:2,outline:`2px solid ${e.colors[e.primaryColor]["dark"===e.colorScheme?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor]["object"==typeof e.primaryShade?e.primaryShade[e.colorScheme]:e.primaryShade]})}})},3734:function(e,t,r){"use strict";r.d(t,{P:function(){return z}});var n=Object.defineProperty,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&s(e,r,t[r]);if(i)for(var r of i(t))a.call(t,r)&&s(e,r,t[r]);return e};function c(e){return t=>"number"==typeof e.primaryShade?e.primaryShade:e.primaryShade[t||e.colorScheme]}function u(e){let t=c(e);return(r,n,i=!0,o=!0)=>{if("string"==typeof r&&r.includes(".")){let[t,i]=r.split("."),a=parseInt(i,10);if(t in e.colors&&a>=0&&a<10)return e.colors[t]["number"!=typeof n||o?a:n]}let a="number"==typeof n?n:t();return r in e.colors?e.colors[r][a]:i?e.colors[e.primaryColor][a]:r}}function d(e){let t="";for(let r=1;r{let i={from:(null==n?void 0:n.from)||e.defaultGradient.from,to:(null==n?void 0:n.to)||e.defaultGradient.to,deg:(null==n?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${i.deg}deg, ${t(i.from,r(),!1)} 0%, ${t(i.to,r(),!1)} 100%)`}}function p(e){if("number"==typeof e.size)return e.size;let t=e.sizes[e.size];return void 0!==t?t:e.size||e.sizes.md}function h(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)?function(e){let t=e.replace("#","");if(3===t.length){let e=t.split("");t=[e[0],e[0],e[1],e[1],e[2],e[2]].join("")}let r=parseInt(t,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:1}}(e):e.startsWith("rgb")?function(e){let[t,r,n,i]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:i||1}}(e):{r:0,g:0,b:0,a:1}}function m(e,t){if("string"!=typeof e||t>1||t<0)return"rgba(0, 0, 0, 1)";let{r,g:n,b:i}=h(e);return`rgba(${r}, ${n}, ${i}, ${t})`}let g=function(e,...t){return`linear-gradient(${e}deg, ${d(t)})`},v=function(...e){return`radial-gradient(circle, ${d(e)})`},y=function(e=0){return{position:"absolute",top:e,right:e,left:e,bottom:e}},b=function(e,t){let{r,g:n,b:i,a:o}=h(e),a=1-t,s=e=>Math.round(e*a);return`rgba(${s(r)}, ${s(n)}, ${s(i)}, ${o})`},x=function(e,t){let{r,g:n,b:i,a:o}=h(e),a=e=>Math.round(e+(255-e)*t);return`rgba(${a(r)}, ${a(n)}, ${a(i)}, ${o})`},w=function(e){let t=u(e),r=c(e),n=f(e);return({variant:i,color:o,gradient:a,primaryFallback:s})=>{let l=function(e,t){if("string"==typeof e&&e.includes(".")){let[r,n]=e.split("."),i=parseInt(n,10);if(r in t.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:r,shade:i}}return{isSplittedColor:!1}}(o,e);switch(i){case"light":return{border:"transparent",background:m(t(o,"dark"===e.colorScheme?8:0,s,!1),"dark"===e.colorScheme?.2:1),color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:r("light")),hover:m(t(o,"dark"===e.colorScheme?7:1,s,!1),"dark"===e.colorScheme?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:r("light")),hover:m(t(o,"dark"===e.colorScheme?8:0,s,!1),"dark"===e.colorScheme?.2:1)};case"outline":return{border:t(o,"dark"===e.colorScheme?5:r("light")),background:"transparent",color:t(o,"dark"===e.colorScheme?5:r("light")),hover:"dark"===e.colorScheme?m(t(o,5,s,!1),.05):m(t(o,0,s,!1),.35)};case"default":return{border:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4],background:"dark"===e.colorScheme?e.colors.dark[6]:e.white,color:"dark"===e.colorScheme?e.white:e.black,hover:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(o,r()),hover:null};case"transparent":return{border:"transparent",color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:e.white,border:"transparent",hover:null};default:{let n=r(),i=l.isSplittedColor?l.shade:n,a=l.isSplittedColor?l.key:o;return{border:"transparent",background:t(a,i,s),color:e.white,hover:t(a,9===i?8:i+1)}}}}},S=function(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}};var k=Object.defineProperty,j=Object.defineProperties,E=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,P=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))C.call(t,r)&&P(e,r,t[r]);if(O)for(var r of O(t))I.call(t,r)&&P(e,r,t[r]);return e},T=(e,t)=>j(e,E(t));function z(e){return T(A({},e),{fn:{fontStyles:()=>({fontFamily:e.fontFamily||"sans-serif"}),themeColor:u(e),focusStyles:t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:l({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:l({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)}),largerThan:t=>`@media (min-width: ${p({size:t,sizes:e.breakpoints})}px)`,smallerThan:t=>`@media (max-width: ${p({size:t,sizes:e.breakpoints})-1}px)`,radialGradient:v,linearGradient:g,gradient:f(e),rgba:m,size:p,cover:y,lighten:x,darken:b,primaryShade:c(e),radius:t=>{if("number"==typeof t)return t;let r="number"==typeof e.defaultRadius?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r},variant:w(e),hover:S,primaryColor:t=>{let r=c(e)(t);return e.colors[e.primaryColor][r]},placeholderStyles:()=>({userSelect:"none",color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]})}})}},66896:function(e,t,r){"use strict";function n(e){return Object.keys(e).reduce((t,r)=>(void 0!==e[r]&&(t[r]=e[r]),t),{})}r.d(t,{L:function(){return n}})},3594:function(e,t,r){"use strict";r.d(t,{w:function(){return i}});let n={app:100,modal:200,popover:300,overlay:400,max:9999};function i(e){return n[e]}},56817:function(e,t,r){"use strict";r.d(t,{k:function(){return p}});var n=r(55138),i=r(64761),o=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&c(e,r,t[r]);return e};function d(e){return`__mantine-ref-${e||""}`}function f(e,t,r){let n=e=>"function"==typeof e?e(t,r||{}):e||{};return Array.isArray(e)?e.map(e=>n(e.styles)).reduce((e,t)=>(Object.keys(t).forEach(r=>{e[r]?e[r]=u(u({},e[r]),t[r]):e[r]=u({},t[r])}),e),{}):n(e)}function p(e){let t="function"==typeof e?e:()=>e;return function(e,r){let o=(0,i.rZ)(),a=(0,i.O2)(null==r?void 0:r.name),s=(0,i.T1)(),{css:l,cx:c}=(0,n.Z)(),u=t(o,e,d),p=f(null==r?void 0:r.styles,o,e),h=f(a,o,e),m=Object.fromEntries(Object.keys(u).map(e=>{let t=c({[l(u[e])]:!(null==r?void 0:r.unstyled)},l(h[e]),l(p[e]));return[e,t]}));return{classes:function({cx:e,classes:t,context:r,classNames:n,name:i,cache:o}){let a=r.reduce((e,t)=>(Object.keys(t.classNames).forEach(r=>{"string"!=typeof e[r]?e[r]=`${t.classNames[r]}`:e[r]=`${e[r]} ${t.classNames[r]}`}),e),{});return Object.keys(t).reduce((r,s)=>(r[s]=e(t[s],a[s],null!=n&&n[s],Array.isArray(i)?i.filter(Boolean).map(e=>`${(null==o?void 0:o.key)||"mantine"}-${e}-${s}`).join(" "):i?`${(null==o?void 0:o.key)||"mantine"}-${i}-${s}`:null),r),{})}({cx:c,classes:m,context:a,classNames:null==r?void 0:r.classNames,name:null==r?void 0:r.name,cache:s}),cx:c,theme:o}}}},55138:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(50889),i=r(7906),o=r(70444),a=r(67294);let s=(0,r(8417).Z)({key:"mantine",prepend:!0});var l=r(64761),c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&p(e,r,t[r]);if(u)for(var r of u(t))f.call(t,r)&&p(e,r,t[r]);return e};let{cssFactory:m}={cssFactory:function(e){let{cache:t}=e,r=(...e)=>{let{ref:r,args:n}=function(e){let t;if(1!==e.length)return{args:e,ref:t};let[r]=e;if(!(r instanceof Object)||!("ref"in r))return{args:e,ref:t};t=r.ref;let n=h({},r);return delete n.ref,{args:[n],ref:t}}(e),a=(0,i.O)(n,t.registered);return(0,o.My)(t,a,!1),`${t.key}-${a.name}${void 0===r?"":` ${r}`}`};return{css:r,cx:(...e)=>(function(e,t,r){let n=[],i=(0,o.fp)(e,n,r);return n.length<2?r:i+t(n)})(t.registered,r,(0,n.Z)(e))}}};function g(){let e=(0,l.T1)()||s;return function(e,t){let r=(0,a.useRef)();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((e,r)=>e===t[r]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}(()=>m({cache:e}),[e])}},50889:function(e,t,r){"use strict";function n(){for(var e,t,r=0,n="";r{null==e||e(r),null==t||t(r)}}r.d(t,{x:function(){return n}})},48427:function(e,t,r){"use strict";function n(e){return e}r.d(t,{F:function(){return n}})},68216:function(e,t,r){"use strict";r.d(t,{R:function(){return i}});var n=r(67294);function i(e){let t=(0,n.createContext)(null);return[({children:e,value:r})=>n.createElement(t.Provider,{value:r},e),()=>{let r=(0,n.useContext)(t);if(null===r)throw Error(e);return r}]}},16650:function(e,t,r){"use strict";r.d(t,{R:function(){return i}});var n=r(38523);function i({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:i=!0,activateOnFocus:o=!1,dir:a="rtl",orientation:s}){return l=>{var c;null==r||r(l);let u=Array.from((null==(c=(0,n.p)(l.currentTarget,e))?void 0:c.querySelectorAll(t))||[]).filter(t=>{var r;return r=l.currentTarget,(0,n.p)(r,e)===(0,n.p)(t,e)}),d=u.findIndex(e=>l.currentTarget===e),f=function(e,t,r){for(let r=e+1;r=0;r-=1)if(!t[r].disabled)return r;if(r){for(let e=t.length-1;e>-1;e-=1)if(!t[e].disabled)return e}return e}(d,u,i),h="rtl"===a?p:f,m="rtl"===a?f:p;switch(l.key){case"ArrowRight":"horizontal"===s&&(l.stopPropagation(),l.preventDefault(),u[h].focus(),o&&u[h].click());break;case"ArrowLeft":"horizontal"===s&&(l.stopPropagation(),l.preventDefault(),u[m].focus(),o&&u[m].click());break;case"ArrowUp":"vertical"===s&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),o&&u[p].click());break;case"ArrowDown":"vertical"===s&&(l.stopPropagation(),l.preventDefault(),u[f].focus(),o&&u[f].click());break;case"Home":l.stopPropagation(),l.preventDefault(),u[0].disabled||u[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();let e=u.length-1;u[e].disabled||u[e].focus()}}}}},94878:function(e,t,r){"use strict";r.d(t,{P:function(){return o}});var n=r(67294);let i="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function o(e){return[function(t){let r=Object.keys(t).reduce((r,n)=>(r[`${e}:${n}`]=e=>t[n](e.detail),r),{});i(()=>(Object.keys(r).forEach(e=>{window.removeEventListener(e,r[e]),window.addEventListener(e,r[e])}),()=>Object.keys(r).forEach(e=>{window.removeEventListener(e,r[e])})),[r])},function(t){return(...r)=>{var n,i;return n=`${e}:${String(t)}`,i=r[0],void window.dispatchEvent(new CustomEvent(n,{detail:i}))}}]}},38523:function(e,t,r){"use strict";function n(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}r.d(t,{p:function(){return n}})},31943:function(e,t,r){"use strict";function n(e,t){return r=>{if("string"!=typeof r||0===r.trim().length)throw Error(t);return`${e}-${r}`}}r.d(t,{A:function(){return n}})},65053:function(e,t,r){"use strict";function n({data:e}){let t=[],r=[],n=e.reduce((e,t,n)=>(t.group?e[t.group]?e[t.group].push(n):e[t.group]=[n]:r.push(n),e),{});return Object.keys(n).forEach(r=>{t.push(...n[r].map(t=>e[t]))}),t.push(...r.map(t=>e[t])),t}r.d(t,{j:function(){return n}})},24241:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(67294);function i(e){return!Array.isArray(e)&&null!==e&&"object"==typeof e&&e.type!==n.Fragment}},91611:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=()=>{}},97818:function(e,t,r){"use strict";function n(e){return Array.isArray(e)?e:[e]}r.d(t,{R:function(){return n}})},32608:function(e,t,r){!function(e){"use strict";var t,n,i,o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n,i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="tasks",t.next=3,this.httpRequest.get(n,O(e));case 3:return i=t.sent,t.abrupt("return",Object.assign(Object.assign({},i),{results:i.results.map(function(e){return new P(e)})}));case 5:case"end":return t.stop()}},r,this)}))}},{key:"waitForTask",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){var n,o;return t().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n=Date.now();case 1:if(!(Date.now()-n1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){var n,o,s,l,c;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=[],o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=m(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e),t.prev=2,o.s();case 4:if((s=o.n()).done){t.next=12;break}return l=s.value,t.next=8,this.waitForTask(l,{timeOutMs:i,intervalMs:a});case 8:c=t.sent,n.push(c);case 10:t.next=4;break;case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(2),o.e(t.t0);case 17:return t.prev=17,o.f(),t.finish(17);case 20:return t.abrupt("return",n);case 21:case"end":return t.stop()}},r,this,[[2,14,17,20]])}))}},{key:"cancelTasks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n,i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="tasks/cancel",t.next=3,this.httpRequest.post(n,{},O(e));case 3:return i=t.sent,t.abrupt("return",new I(i));case 5:case"end":return t.stop()}},r,this)}))}},{key:"deleteTasks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n,i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="tasks",t.next=3,this.httpRequest.delete(n,{},O(e));case 3:return i=t.sent,t.abrupt("return",new I(i));case 5:case"end":return t.stop()}},r,this)}))}}]),e}(),T=function(){function e(t,r,i){n(this,e),this.uid=r,this.primaryKey=i,this.httpRequest=new C(t),this.tasks=new A(t)}return o(e,[{key:"search",value:function(e,r,n){return v(this,void 0,void 0,t().mark(function i(){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o="indexes/".concat(this.uid,"/search"),t.next=3,this.httpRequest.post(o,E(Object.assign({q:e},r)),void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},i,this)}))}},{key:"searchGet",value:function(e,r,n){var i,o,a,s,l,c,u;return v(this,void 0,void 0,t().mark(function d(){var f,p,h;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return f="indexes/".concat(this.uid,"/search"),p=function(e){if("string"==typeof e)return e;if(Array.isArray(e))throw new S("The filter query parameter should be in string format when using searchGet")},h=Object.assign(Object.assign({q:e},r),{filter:p(null==r?void 0:r.filter),sort:null===(i=null==r?void 0:r.sort)||void 0===i?void 0:i.join(","),facets:null===(o=null==r?void 0:r.facets)||void 0===o?void 0:o.join(","),attributesToRetrieve:null===(a=null==r?void 0:r.attributesToRetrieve)||void 0===a?void 0:a.join(","),attributesToCrop:null===(s=null==r?void 0:r.attributesToCrop)||void 0===s?void 0:s.join(","),attributesToHighlight:null===(l=null==r?void 0:r.attributesToHighlight)||void 0===l?void 0:l.join(","),vector:null===(c=null==r?void 0:r.vector)||void 0===c?void 0:c.join(","),attributesToSearchOn:null===(u=null==r?void 0:r.attributesToSearchOn)||void 0===u?void 0:u.join(",")}),t.next=5,this.httpRequest.get(f,E(h),n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}},d,this)}))}},{key:"searchForFacetValues",value:function(e,r){return v(this,void 0,void 0,t().mark(function n(){var i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/facet-search"),t.next=3,this.httpRequest.post(i,E(e),void 0,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},n,this)}))}},{key:"getRawInfo",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r,n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid),e.next=3,this.httpRequest.get(r);case 3:return n=e.sent,this.primaryKey=n.primaryKey,this.updatedAt=new Date(n.updatedAt),this.createdAt=new Date(n.createdAt),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}))}},{key:"fetchInfo",value:function(){return v(this,void 0,void 0,t().mark(function e(){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRawInfo();case 2:return e.abrupt("return",this);case 3:case"end":return e.stop()}},e,this)}))}},{key:"fetchPrimaryKey",value:function(){return v(this,void 0,void 0,t().mark(function e(){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRawInfo();case 2:return this.primaryKey=e.sent.primaryKey,e.abrupt("return",this.primaryKey);case 4:case"end":return e.stop()}},e,this)}))}},{key:"update",value:function(e){return v(this,void 0,void 0,t().mark(function r(){var n,i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid),t.next=3,this.httpRequest.patch(n,e);case 3:return(i=t.sent).enqueuedAt=new Date(i.enqueuedAt),t.abrupt("return",i);case 6:case"end":return t.stop()}},r,this)}))}},{key:"delete",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r,n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid),e.next=3,this.httpRequest.delete(r);case 3:return n=e.sent,e.abrupt("return",new I(n));case 5:case"end":return e.stop()}},e,this)}))}},{key:"getTasks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTasks(Object.assign(Object.assign({},e),{indexUids:[this.uid]}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"getTask",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"waitForTasks",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.waitForTasks(e,{timeOutMs:i,intervalMs:a});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"waitForTask",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.waitForTask(e,{timeOutMs:i,intervalMs:a});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"getStats",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="indexes/".concat(this.uid,"/stats"),e.next=3,this.httpRequest.get(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}))}},{key:"getDocuments",value:function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function n(){var i,o,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(void 0!==(r=E(r)).filter)){t.next=15;break}return t.prev=2,i="indexes/".concat(this.uid,"/documents/fetch"),t.next=6,this.httpRequest.post(i,r);case 6:case 19:return t.abrupt("return",t.sent);case 9:throw t.prev=9,t.t0=t.catch(2),t.t0 instanceof y?t.t0.message=j(t.t0.message,"getDocuments"):t.t0 instanceof b&&(t.t0.message=j(t.t0.message,"getDocuments")),t.t0;case 13:t.next=20;break;case 15:return o="indexes/".concat(this.uid,"/documents"),a=Array.isArray(null==r?void 0:r.fields)?{fields:null===(e=null==r?void 0:r.fields)||void 0===e?void 0:e.join(",")}:{},t.next=19,this.httpRequest.get(o,Object.assign(Object.assign({},r),a));case 20:case"end":return t.stop()}},n,this,[[2,9]])}))}},{key:"getDocument",value:function(e,r){return v(this,void 0,void 0,t().mark(function n(){var i,o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/documents/").concat(e),o=function(){var e;if(Array.isArray(null==r?void 0:r.fields))return null===(e=null==r?void 0:r.fields)||void 0===e?void 0:e.join(",")}(),t.next=4,this.httpRequest.get(i,E(Object.assign(Object.assign({},r),{fields:o})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},n,this)}))}},{key:"addDocuments",value:function(e,r){return v(this,void 0,void 0,t().mark(function n(){var i,o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(i,e,r);case 3:return o=t.sent,t.abrupt("return",new I(o));case 5:case"end":return t.stop()}},n,this)}))}},{key:"addDocumentsFromString",value:function(e,r,n){return v(this,void 0,void 0,t().mark(function i(){var o,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(o,e,n,{headers:{"Content-Type":r}});case 3:return a=t.sent,t.abrupt("return",new I(a));case 5:case"end":return t.stop()}},i,this)}))}},{key:"addDocumentsInBatches",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>2?arguments[2]:void 0;return v(this,void 0,void 0,t().mark(function i(){var o,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o=[],a=0;case 2:if(!(a1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>2?arguments[2]:void 0;return v(this,void 0,void 0,t().mark(function i(){var o,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o=[],a=0;case 2:if(!(a1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return v(this,void 0,void 0,t().mark(function i(){var o,a,s;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o="indexes",a=new C(n),t.next=4,a.post(o,Object.assign(Object.assign({},r),{uid:e}));case 4:return s=t.sent,t.abrupt("return",new I(s));case 6:case"end":return t.stop()}},i)}))}}]),e}(),z=function(e){s(r,e);var t=h(r);function r(e){return n(this,r),t.call(this,e)}return o(r)}(function(){function e(t){n(this,e),this.config=t,this.httpRequest=new C(t),this.tasks=new A(t)}return o(e,[{key:"index",value:function(e){return new T(this.config,e)}},{key:"getIndex",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new T(this.config,e).fetchInfo());case 1:case"end":return t.stop()}},r,this)}))}},{key:"getRawIndex",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new T(this.config,e).getRawInfo());case 1:case"end":return t.stop()}},r,this)}))}},{key:"getIndexes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n,i,o=this;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawIndexes(e);case 2:return i=(n=t.sent).results.map(function(e){return new T(o.config,e.uid,e.primaryKey)}),t.abrupt("return",Object.assign(Object.assign({},n),{results:i}));case 5:case"end":return t.stop()}},r,this)}))}},{key:"getRawIndexes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes",t.next=3,this.httpRequest.get(n,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},r,this)}))}},{key:"createIndex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return v(this,void 0,void 0,t().mark(function n(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T.create(e,r,this.config);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},n,this)}))}},{key:"updateIndex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return v(this,void 0,void 0,t().mark(function n(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new T(this.config,e).update(r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},n,this)}))}},{key:"deleteIndex",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new T(this.config,e).delete();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"deleteIndexIfExists",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.deleteIndex(e);case 3:return t.abrupt("return",!0);case 6:if(t.prev=6,t.t0=t.catch(0),"index_not_found"!==t.t0.code){t.next=10;break}return t.abrupt("return",!1);case 10:throw t.t0;case 11:case"end":return t.stop()}},r,this,[[0,6]])}))}},{key:"swapIndexes",value:function(e){return v(this,void 0,void 0,t().mark(function r(){var n;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="/swap-indexes",t.next=3,this.httpRequest.post(n,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},r,this)}))}},{key:"multiSearch",value:function(e,r){return v(this,void 0,void 0,t().mark(function n(){var i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="multi-search",t.next=3,this.httpRequest.post(i,e,void 0,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},n,this)}))}},{key:"getTasks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTasks(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"getTask",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"waitForTasks",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.waitForTasks(e,{timeOutMs:i,intervalMs:a});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"waitForTask",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.timeOutMs,i=void 0===n?5e3:n,o=r.intervalMs,a=void 0===o?50:o;return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.waitForTask(e,{timeOutMs:i,intervalMs:a});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"cancelTasks",value:function(e){return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.cancelTasks(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"deleteTasks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.deleteTasks(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},r,this)}))}},{key:"getKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,void 0,void 0,t().mark(function r(){var n,i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys",t.next=3,this.httpRequest.get(n,e);case 3:return(i=t.sent).results=i.results.map(function(e){return Object.assign(Object.assign({},e),{createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})}),t.abrupt("return",i);case 6:case"end":return t.stop()}},r,this)}))}},{key:"getKey",value:function(e){return v(this,void 0,void 0,t().mark(function r(){var n;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.get(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},r,this)}))}},{key:"createKey",value:function(e){return v(this,void 0,void 0,t().mark(function r(){var n;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys",t.next=3,this.httpRequest.post(n,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},r,this)}))}},{key:"updateKey",value:function(e,r){return v(this,void 0,void 0,t().mark(function n(){var i;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="keys/".concat(e),t.next=3,this.httpRequest.patch(i,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},n,this)}))}},{key:"deleteKey",value:function(e){return v(this,void 0,void 0,t().mark(function r(){var n;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.delete(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},r,this)}))}},{key:"health",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="health",e.next=3,this.httpRequest.get(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}))}},{key:"isHealthy",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r="health",e.next=4,this.httpRequest.get(r);case 4:return e.abrupt("return",!0);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",!1);case 10:case"end":return e.stop()}},e,this,[[0,7]])}))}},{key:"getStats",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="stats",e.next=3,this.httpRequest.get(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}))}},{key:"getVersion",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="version",e.next=3,this.httpRequest.get(r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}))}},{key:"createDump",value:function(){return v(this,void 0,void 0,t().mark(function e(){var r,n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="dumps",e.next=3,this.httpRequest.post(r);case 3:return n=e.sent,e.abrupt("return",new I(n));case 5:case"end":return e.stop()}},e,this)}))}},{key:"generateTenantToken",value:function(e,t,r){var n=Error();throw Error("Meilisearch: failed to generate a tenant token. Generation of a token only works in a node environment \n ".concat(n.stack,"."))}}]),e}());e.ContentTypeEnum={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},e.Index=T,e.MatchingStrategies={ALL:"all",LAST:"last"},e.MeiliSearch=z,e.MeiliSearchApiError=b,e.MeiliSearchCommunicationError=y,e.MeiliSearchError=S,e.MeiliSearchTimeOutError=k,e.default=z,e.httpErrorHandler=w,e.httpResponseErrorHandler=x,e.versionErrorHintMessage=j,Object.defineProperty(e,"__esModule",{value:!0})}(n.exports),n.exports);function u(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function d(e){return e.replace(/(.*):(.*)/i,'"$1"="$2"')}function f(e){return"string"==typeof e?d(e):Array.isArray(e)?e.map(function(e){return Array.isArray(e)?e.map(function(e){return d(e)}).filter(function(e){return e}):d(e)}).filter(function(e){return e}):[]}function p(e){return""===e?[]:"string"==typeof e?[e]:e}function h(e){var t,r,n,i,o,a={},s=e.facets,c=e.attributesToSnippet,u=e.snippetEllipsisText,d=e.attributesToRetrieve,h=e.attributesToHighlight,m=e.highlightPreTag,g=e.highlightPostTag,v=e.placeholderSearch,y=e.query,b=e.sort,x=e.pagination,w=e.matchingStrategy,S=e.filters,k=e.numericFilters,j=e.facetFilters,E=e.indexUid,O=(t=f(j||[]),r=f(k||[]),n=(S||"").trim(),i=p(t),o=p(r),l(l(l([],i,!0),o,!0),[n],!1).filter(function(e){return Array.isArray(e)?e.length:e}));return{getParams:function(){return a},addQuery:function(){a.q=y},addIndexUid:function(){a.indexUid=E},addFacets:function(){Array.isArray(s)?a.facets=s:"string"==typeof s&&(a.facets=[s])},addAttributesToCrop:function(){c&&(a.attributesToCrop=c)},addCropMarker:function(){null!=u&&(a.cropMarker=u)},addAttributesToRetrieve:function(){d&&(a.attributesToRetrieve=d)},addFilters:function(){O.length&&(a.filter=O)},addAttributesToHighlight:function(){a.attributesToHighlight=h||["*"]},addPreTag:function(){m?a.highlightPreTag=m:a.highlightPreTag="__ais-highlight__"},addPostTag:function(){g?a.highlightPostTag=g:a.highlightPostTag="__/ais-highlight__"},addPagination:function(){var e=!!v||!!y||!!O&&0!==O.length;if(x.finite){var t,r,n=(t=x.page,r=x.hitsPerPage,e?{hitsPerPage:r,page:t+1}:{hitsPerPage:0,page:t+1}),i=n.hitsPerPage,o=n.page;a.hitsPerPage=i,a.page=o}else{var s,l,c=(s=x.page,l=x.hitsPerPage,e?{limit:l+1,offset:s*l}:{limit:0,offset:0}),u=c.limit,d=c.offset;a.limit=u,a.offset=d}},addSort:function(){(null==b?void 0:b.length)&&(a.sort=Array.isArray(b)?b:[b])},addGeoSearchFilter:function(){var t=function(e){var t,r,n,i=e.insideBoundingBox,o=e.aroundLatLng,a=e.aroundRadius,s=e.minimumAroundRadius;if(o){var l=o.split(",").map(function(e){return Number.parseFloat(e).toFixed(5)}),c=l[0],u=l[1];t=[c,u]}if((null!=a||null!=s)&&("all"===a?console.warn("instant-meilisearch is not compatible with the `all` value on the aroundRadius parameter"):r=null!=a?a:s),i&&"string"==typeof i){var d=i.split(",").map(function(e){return parseFloat(e)}),f=d[0],p=d[1],h=d[2],m=d[3];n="_geoBoundingBox([".concat(f,", ").concat(p,"], [").concat(h,", ").concat(m,"])")}else if(null!=t&&null!=r){var c=t[0],u=t[1];n="_geoRadius(".concat(c,", ").concat(u,", ").concat(r,")")}return n}({insideBoundingBox:e.insideBoundingBox,aroundLatLng:e.aroundLatLng,aroundRadius:e.aroundRadius,minimumAroundRadius:e.minimumAroundRadius});t&&(a.filter?a.filter.unshift(t):a.filter=[t])},addMatchingStrategy:function(){w&&(a.matchingStrategy=w)}}}function m(e){var t=h(e);return t.addQuery(),t.addIndexUid(),t.addFacets(),t.addAttributesToHighlight(),t.addPreTag(),t.addPostTag(),t.addAttributesToRetrieve(),t.addAttributesToCrop(),t.addCropMarker(),t.addPagination(),t.addFilters(),t.addSort(),t.addGeoSearchFilter(),t.addMatchingStrategy(),t.getParams()}function g(e){return e?e.split(/,(?=\w+:(?:asc|desc))/):[]}function v(e,t,r){return{hitsPerPage:void 0===t?20:t,page:r||0,finite:!!e}}function y(e){var t=e.indexOf(":");return -1===t?{indexUid:e,sortBy:""}:{indexUid:e.substring(0,t),sortBy:e.substring(t+1)}}e.MatchingStrategies=void 0,(i=e.MatchingStrategies||(e.MatchingStrategies={})).ALL="all",i.LAST="last",e.instantMeiliSearch=function(e,t,r){void 0===t&&(t=""),void 0===r&&(r={}),function(e,t,r){var n=r.requestConfig,i=r.httpClient;if("string"!=typeof e)throw TypeError("Provided hostUrl value (1st parameter) is not a string, expected string");if("string"!=typeof t&&"function"!=typeof t)throw TypeError("Provided apiKey value (2nd parameter) is not a string or a function, expected string or function");if(void 0!==n&&!u(n))throw TypeError("Provided requestConfig should be an object");if(i&&"function"!=typeof i)throw TypeError("Provided custom httpClient should be a function")}(e,t,r);var n,i,l,d,f={host:e,apiKey:t=function(e){if("function"==typeof e){var t=e();if("string"!=typeof t)throw TypeError("Provided apiKey function (2nd parameter) did not return a string, expected string");return t}return e}(t),clientAgents:(void 0===(n=r.clientAgents)&&(n=[]),n.concat("Meilisearch instant-meilisearch (v".concat("0.13.5",")")))};void 0!==r.httpClient&&(f.httpClient=r.httpClient),void 0!==r.requestConfig&&(f.requestConfig=r.requestConfig);var p=new c.MeiliSearch(f),b=(void 0===i&&(i={}),l=i,{getEntry:function(e){if(l[e])try{return JSON.parse(l[e])}catch(e){}},formatKey:function(e){return e.reduce(function(e,t){return e+JSON.stringify(t)},"")},setEntry:function(e,t){l[e]=JSON.stringify(t)},clearCache:function(){l={}}}),x={multiSearch:function(e,t){return a(this,void 0,void 0,function(){var r,n,i;return s(this,function(a){switch(a.label){case 0:if(r=b.formatKey([e]),n=b.getEntry(r))return[2,n];return[4,p.multiSearch({queries:e})];case 1:return i=a.sent().results.map(function(e,r){return o(o({},e),{pagination:t[r]||{}})}),b.setEntry(r,i),[2,i]}})})}},w={},S=(d=r,o(o({},{placeholderSearch:!0,keepZeroFacets:!1,clientAgents:[],finitePagination:!1}),d));return{clearCache:function(){return b.clearCache()},search:function(e){return a(this,void 0,void 0,function(){var t,n,i,l,c,d,f,p,b;return s(this,function(k){switch(k.label){case 0:for(k.trys.push([0,3,,4]),t=[],n=[],i=[],l=0,c=e;l=(void 0===r?20:r)?1:0)}(t,a),hitsPerPage:a})).hitsPerPage,A=I.page,T=I.nbPages,z=(s=t.hits,l=t.pagination.hitsPerPage,c=n.finitePagination,d=n.primaryKey,!c&&s.length>l&&s.splice(s.length-1,1),function(e){for(var t,r=0;r0){var t=e._formatted;e._matchesPosition;var r=Object.assign(function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}(e,["_formatted","_matchesPosition"]),function(e){if(!e)return{};var t=function e(t){return Array.isArray(t)?t.map(function(t){return e(t)}):u(t)?Object.keys(t).reduce(function(r,n){return r[n]=e(t[n]),r},{}):{value:"string"==typeof t?t:void 0===t?JSON.stringify(null):JSON.stringify(t)}}(e);return{_highlightResult:t,_snippetResult:t}}(t));return d&&(r.objectID=e[d]),r}return e}))),N=(f=t.hitsPerPage,p=t.totalPages,h=t.estimatedTotalHits,m=t.totalHits,null!=h?h:null!=m?m:(void 0===f?0:f)*(void 0===p?0:p)),{index:w,hitsPerPage:P,page:A,facets:(g=n.keepZeroFacets,v=j,g?function(e,t,r){for(var n=e?"string"==typeof e?[e]:e:[],i={},o=0;o{a&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${a}`}})},[a]),(0,n.jsxs)(n.Fragment,{children:[o,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":a,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=r(85893),i=r(67294)},7834:function(e,t,r){"use strict";let n;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:i="dataLayer",nonce:l}=e;return void 0===n&&(n=i),(0,a.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` + window['${i}'] = window['${i}'] || []; + function gtag(){window['${i}'].push(arguments);} + gtag('js', new Date()); + + gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:l}),(0,o.jsx)(s.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},t.sendGAEvent=function(...e){if(void 0===n){console.warn("@next/third-parties: GA has not been initialized");return}window[n]?window[n].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${n} does not exist`)};let o=r(85893),a=r(67294),s=i(r(4298))},51100:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{apiKey:t,...r}=e,n={...r,key:t},{html:s}=(0,o.GoogleMapsEmbed)(n);return(0,i.jsx)(a.default,{height:n.height||null,width:n.width||null,html:s,dataNtpc:"GoogleMapsEmbed"})};let i=r(85893),o=r(86257),a=n(r(19477))},30674:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r="https://www.googletagmanager.com/gtm.js",dataLayerName:n="dataLayer",auth:l,preview:c,dataLayer:u,nonce:d}=e;s=n;let f="dataLayer"!==n?`&l=${n}`:"",p=l?`>m_auth=${l}`:"",h=c?`>m_preview=${c}>m_cookies_win=x`:"";return(0,o.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` + (function(w,l){ + w[l]=w[l]||[]; + w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); + ${u?`w[l].push(${JSON.stringify(u)})`:""} + })(window,'${n}');`},nonce:d}),(0,i.jsx)(a.default,{id:"_next-gtm","data-ntpc":"GTM",src:`${r}?id=${t}${f}${p}${h}`})]})};let i=r(85893),o=r(67294),a=n(r(4298)),s="dataLayer";t.sendGTMEvent=(e,t)=>{let r=t||s;window[r]=window[r]||[],window[r].push(e)}},19692:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=r(51100);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return n(i).default}});var o=r(11494);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return n(o).default}});var a=r(30674);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return a.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return a.sendGTMEvent}});var s=r(7834);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return s.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return s.sendGAEvent}})},11494:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t,scripts:r,stylesheets:n}=(0,a.YouTubeEmbed)(e);return(0,i.jsx)(s.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==r?void 0:r.map(e=>(0,i.jsx)(o.default,{src:e.url,strategy:l[e.strategy],stylesheets:n},e.url))})};let i=r(85893),o=n(r(4298)),a=r(86257),s=n(r(19477)),l={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"}},32442:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cyrb53=t.javaHashCode=t.murmurhash3_32_gc=void 0,t.murmurhash3_32_gc=function(e,t){var r,n,i,o,a,s;for(r=3&e.length,n=e.length-r,i=t,s=0;s>>16)*3432918353&65535)<<16)&4294967295)<<15|a>>>17))*461845907+(((a>>>16)*461845907&65535)<<16)&4294967295,i=(65535&(o=(65535&(i=i<<13|i>>>19))*5+(((i>>>16)*5&65535)<<16)&4294967295))+27492+(((o>>>16)+58964&65535)<<16);switch(a=0,r){case 3:a^=(255&e.charCodeAt(s+2))<<16;break;case 2:a^=(255&e.charCodeAt(s+1))<<8;break;case 1:a^=255&e.charCodeAt(s),i^=a=(65535&(a=(a=(65535&a)*3432918353+(((a>>>16)*3432918353&65535)<<16)&4294967295)<<15|a>>>17))*461845907+(((a>>>16)*461845907&65535)<<16)&4294967295;break;default:return 0}return i^=e.length,i^=i>>>16,i=(65535&i)*2246822507+(((i>>>16)*2246822507&65535)<<16)&4294967295,i^=i>>>13,i=(65535&i)*3266489909+(((i>>>16)*3266489909&65535)<<16)&4294967295,(i^=i>>>16)>>>0},t.javaHashCode=(e,t)=>{var r=0;if(0===e.length)return r;for(var n=0;n>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909)))+(r>>>0)}},39881:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCanvasFingerprint=t.isCanvasSupported=void 0,t.isCanvasSupported=()=>{var e=document.createElement("canvas");return!!(e.getContext&&e.getContext("2d"))},t.getCanvasFingerprint=()=>{if(!(0,t.isCanvasSupported)())return"broprint.js";var e=document.createElement("canvas"),r=e.getContext("2d"),n="BroPrint.65@345876";return r.textBaseline="top",r.font="14px 'Arial'",r.textBaseline="alphabetic",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",r.fillText(n,2,15),r.fillStyle="rgba(102, 204, 0, 0.7)",r.fillText(n,4,17),e.toDataURL()}},25502:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateTheAudioFingerPrint=void 0,t.generateTheAudioFingerPrint=function(){var e=null,t=null,r=null,n=null,i=null,o=null;function a(t,r){void 0!==n[t]&&"function"==typeof n[t].setValueAtTime&&n[t].setValueAtTime(r,e.currentTime)}function s(e){(function(e){for(var t=null,r=4500;5e3>r;r++)t+=Math.abs(e.renderedBuffer.getChannelData(0)[r]);i=t.toString(),"function"==typeof o&&o(i)})(e),n.disconnect()}return{run:function(i,l=!1){o=i;try{t=(e=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,44100,44100)).currentTime,(r=e.createOscillator()).type="triangle",r.frequency.setValueAtTime(1e4,t),n=e.createDynamicsCompressor(),a("threshold",-50),a("knee",40),a("ratio",12),a("reduction",-20),a("attack",0),a("release",.25),r.connect(n),n.connect(e.destination),r.start(0),e.startRendering(),e.oncomplete=s}catch(e){if(l)throw e}}}}()},40393:function(e,t,r){"use strict";t.$=void 0;let n=r(32442),i=r(39881),o=r(25502);t.$=()=>{let e=new Promise((e,t)=>{o.generateTheAudioFingerPrint.run(function(t){e(t)})});return new Promise((t,r)=>{e.then(e=>{let r=window.btoa(e)+(0,i.getCanvasFingerprint)();t((0,n.cyrb53)(r,0))}).catch(()=>{try{t((0,n.cyrb53)((0,i.getCanvasFingerprint)()).toString())}catch(e){r("Failed to generate the finger print of this browser")}})})}},86664:function(e,t,r){!function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:y;if(null===e||h(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment)return e;throw Error(t)},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;if(h(e)&&"function"==typeof e.then)return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return b(e,t)})};var r=b(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}},w=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.4.0"}),e.registerAppInfo({name:"react-stripe-js",version:"2.4.0",url:"https://stripe.com/docs/stripe-js/react"}))},S=["on","session"],k=t.createContext(null);k.displayName="CustomCheckoutSdkContext";var j=function(e,t){if(!e)throw Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an provider."));return e},E=t.createContext(null);E.displayName="CustomCheckoutContext";var O=function(e,t){if(!e)return null;e.on,e.session;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,S);return t?n(n({},r),t):n(n({},r),e.session())},C=function(e){var r=e.stripe,n=e.options,i=e.children,o=t.useMemo(function(){return x(r,"Invalid prop `stripe` supplied to `CustomCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[r]),s=a(t.useState(null),2),l=s[0],c=s[1],u=a(t.useState(function(){return{stripe:"sync"===o.tag?o.stripe:null,customCheckoutSdk:null}}),2),d=u[0],f=u[1],m=function(e,t){f(function(r){return r.stripe&&r.customCheckoutSdk?r:{stripe:e,customCheckoutSdk:t}})},v=t.useRef(!1);t.useEffect(function(){var e=!0;return"async"!==o.tag||d.stripe?"sync"===o.tag&&o.stripe&&!v.current&&(v.current=!0,o.stripe.initCustomCheckout(n).then(function(e){e&&(m(o.stripe,e),e.on("change",c))})):o.stripePromise.then(function(t){t&&e&&!v.current&&(v.current=!0,t.initCustomCheckout(n).then(function(e){e&&(m(t,e),e.on("change",c))}))}),function(){e=!1}},[o,d,n,c]);var y=p(r);t.useEffect(function(){null!==y&&y!==r&&console.warn("Unsupported prop change on CustomCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[y,r]);var b=p(n);t.useEffect(function(){if(d.customCheckoutSdk){!n.clientSecret||h(b)||g(n.clientSecret,b.clientSecret)||console.warn("Unsupported prop change: options.client_secret is not a mutable property.");var e,t,r=null==b?void 0:null===(e=b.elementsOptions)||void 0===e?void 0:e.appearance,i=null==n?void 0:null===(t=n.elementsOptions)||void 0===t?void 0:t.appearance;i&&!g(i,r)&&d.customCheckoutSdk.changeAppearance(i)}},[n,b,d.customCheckoutSdk]),t.useEffect(function(){w(d.stripe)},[d.stripe]);var S=t.useMemo(function(){return O(d.customCheckoutSdk,l)},[d.customCheckoutSdk,l]);return d.customCheckoutSdk?t.createElement(k.Provider,{value:d},t.createElement(E.Provider,{value:S},i)):null};C.propTypes={stripe:f.any,options:f.shape({clientSecret:f.string.isRequired,elementsOptions:f.object}).isRequired};var I=function(e){var r=t.useContext(k),n=t.useContext(P);if(r&&n)throw Error("You cannot wrap the part of your app that ".concat(e," in both and providers."));return r?j(r,e):A(n,e)},P=t.createContext(null);P.displayName="ElementsContext";var A=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an provider."));return e},T=t.createContext(null);T.displayName="CartElementContext";var z=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an provider."));return e},N=function(e){var r=e.stripe,n=e.options,i=e.children,o=t.useMemo(function(){return x(r)},[r]),s=a(t.useState(null),2),l=s[0],c=s[1],u=a(t.useState(null),2),d=u[0],f=u[1],h=a(t.useState(function(){return{stripe:"sync"===o.tag?o.stripe:null,elements:"sync"===o.tag?o.stripe.elements(n):null}}),2),m=h[0],g=h[1];t.useEffect(function(){var e=!0,t=function(e){g(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return"async"!==o.tag||m.stripe?"sync"!==o.tag||m.stripe||t(o.stripe):o.stripePromise.then(function(r){r&&e&&t(r)}),function(){e=!1}},[o,m,n]);var y=p(r);t.useEffect(function(){null!==y&&y!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[y,r]);var b=p(n);return t.useEffect(function(){if(m.elements){var e=v(n,b,["clientSecret","fonts"]);e&&m.elements.update(e)}},[n,b,m.elements]),t.useEffect(function(){w(m.stripe)},[m.stripe]),t.createElement(P.Provider,{value:m},t.createElement(T.Provider,{value:{cart:l,setCart:c,cartState:d,setCartState:f}},i))};N.propTypes={stripe:f.any,options:f.object};var R=function(e){return A(t.useContext(P),e)},_={cart:null,cartState:null,setCart:function(){},setCartState:function(){}},M=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.useContext(T);return r?_:z(n,e)},D=function(e){return(0,e.children)(R("mounts "))};D.propTypes={children:f.func.isRequired};var L=function(e,r,n){var i=!!n,o=t.useRef(n);t.useEffect(function(){o.current=n},[n]),t.useEffect(function(){if(!i||!e)return function(){};var t=function(){o.current&&o.current.apply(o,arguments)};return e.on(r,t),function(){e.off(r,t)}},[i,r,e,o])},F=function(e,r){var n="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Element"),i=r?function(e){var r=I("mounts <".concat(n,">"));M("mounts <".concat(n,">"),"customCheckoutSdk"in r);var i=e.id,o=e.className;return t.createElement("div",{id:i,className:o})}:function(r){var i,o=r.id,s=r.className,l=r.options,c=void 0===l?{}:l,u=r.onBlur,d=r.onFocus,f=r.onReady,h=r.onChange,m=r.onEscape,g=r.onClick,y=r.onLoadError,b=r.onLoaderStart,x=r.onNetworksChange,w=r.onCheckout,S=r.onLineItemClick,k=r.onConfirm,j=r.onCancel,E=r.onShippingAddressChange,O=r.onShippingRateChange,C=I("mounts <".concat(n,">")),P="elements"in C?C.elements:null,A="customCheckoutSdk"in C?C.customCheckoutSdk:null,T=a(t.useState(null),2),z=T[0],N=T[1],R=t.useRef(null),_=t.useRef(null),D=M("mounts <".concat(n,">"),"customCheckoutSdk"in C),F=D.setCart,U=D.setCartState;L(z,"blur",u),L(z,"focus",d),L(z,"escape",m),L(z,"click",g),L(z,"loaderror",y),L(z,"loaderstart",b),L(z,"networkschange",x),L(z,"lineitemclick",S),L(z,"confirm",k),L(z,"cancel",j),L(z,"shippingaddresschange",E),L(z,"shippingratechange",O),"cart"===e?i=function(e){U(e),f&&f(e)}:f&&(i="expressCheckout"===e?f:function(){f(z)}),L(z,"ready",i),L(z,"change","cart"===e?function(e){U(e),h&&h(e)}:h),L(z,"checkout","cart"===e?function(e){U(e),w&&w(e)}:w),t.useLayoutEffect(function(){if(null===R.current&&null!==_.current&&(P||A)){var t=null;A?t=A.createElement(e,c):P&&(t=P.create(e,c)),"cart"===e&&F&&F(t),R.current=t,N(t),t&&t.mount(_.current)}},[P,A,c,F]);var B=p(c);return t.useEffect(function(){if(R.current){var e=v(c,B,["paymentRequest"]);e&&R.current.update(e)}},[c,B]),t.useLayoutEffect(function(){return function(){if(R.current&&"function"==typeof R.current.destroy)try{R.current.destroy(),R.current=null}catch(e){}}},[]),t.createElement("div",{id:o,className:s,ref:_})};return i.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},i.displayName=n,i.__elementType=e,i},U="undefined"==typeof window,B=t.createContext(null);B.displayName="EmbeddedCheckoutProviderContext";var H=function(){var e=t.useContext(B);if(!e)throw Error(" must be used within ");return e},Z=U?function(e){var r=e.id,n=e.className;return H(),t.createElement("div",{id:r,className:n})}:function(e){var r=e.id,n=e.className,i=H().embeddedCheckout,o=t.useRef(!1),a=t.useRef(null);return t.useLayoutEffect(function(){return!o.current&&i&&null!==a.current&&(i.mount(a.current),o.current=!0),function(){if(o.current&&i)try{i.unmount(),o.current=!1}catch(e){}}},[i]),t.createElement("div",{ref:a,id:r,className:n})},W=F("auBankAccount",U),V=F("card",U),$=F("cardNumber",U),q=F("cardExpiry",U),G=F("cardCvc",U),K=F("fpxBank",U),X=F("iban",U),J=F("idealBank",U),Y=F("p24Bank",U),Q=F("epsBank",U),ee=F("payment",U),et=F("expressCheckout",U),er=F("paymentRequestButton",U),en=F("linkAuthentication",U),ei=F("address",U),eo=F("shippingAddress",U),ea=F("cart",U),es=F("paymentMethodMessaging",U),el=F("affirmMessage",U),ec=F("afterpayClearpayMessage",U);e.AddressElement=ei,e.AffirmMessageElement=el,e.AfterpayClearpayMessageElement=ec,e.AuBankAccountElement=W,e.CardCvcElement=G,e.CardElement=V,e.CardExpiryElement=q,e.CardNumberElement=$,e.CartElement=ea,e.CustomCheckoutProvider=C,e.Elements=N,e.ElementsConsumer=D,e.EmbeddedCheckout=Z,e.EmbeddedCheckoutProvider=function(e){var r=e.stripe,n=e.options,i=e.children,o=t.useMemo(function(){return x(r,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[r]),s=t.useRef(null),l=t.useRef(null),c=a(t.useState({embeddedCheckout:null}),2),u=c[0],d=c[1];t.useEffect(function(){if(!l.current&&!s.current){var e=function(e){l.current||s.current||(l.current=e,s.current=l.current.initEmbeddedCheckout(n).then(function(e){d({embeddedCheckout:e})}))};"async"===o.tag&&!l.current&&n.clientSecret?o.stripePromise.then(function(t){t&&e(t)}):"sync"===o.tag&&!l.current&&n.clientSecret&&e(o.stripe)}},[o,n,u,l]),t.useEffect(function(){return function(){u.embeddedCheckout?(s.current=null,u.embeddedCheckout.destroy()):s.current&&s.current.then(function(){s.current=null,u.embeddedCheckout&&u.embeddedCheckout.destroy()})}},[u.embeddedCheckout]),t.useEffect(function(){w(l)},[l]);var f=p(r);t.useEffect(function(){null!==f&&f!==r&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[f,r]);var h=p(n);return t.useEffect(function(){if(null!=h){if(null==n){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}null!=h.clientSecret&&n.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=h.onComplete&&n.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it.")}},[h,n]),t.createElement(B.Provider,{value:u},i)},e.EpsBankElement=Q,e.ExpressCheckoutElement=et,e.FpxBankElement=K,e.IbanElement=X,e.IdealBankElement=J,e.LinkAuthenticationElement=en,e.P24BankElement=Y,e.PaymentElement=ee,e.PaymentMethodMessagingElement=es,e.PaymentRequestButtonElement=er,e.ShippingAddressElement=eo,e.useCartElement=function(){return M("calls useCartElement()").cart},e.useCartElementState=function(){return M("calls useCartElementState()").cartState},e.useCustomCheckout=function(){e="calls useCustomCheckout()",j(t.useContext(k),e);var e,r=t.useContext(E);if(!r)throw Error("Could not find CustomCheckout Context; You need to wrap the part of your app that calls useCustomCheckout() in an provider.");return r},e.useElements=function(){return R("calls useElements()").elements},e.useStripe=function(){return I("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,r(67294))},8131:function(e,t,r){"use strict";var n=r(49374),i=r(67450),o=r(43650),a=r(17775),s=r(23076);function l(e,t,r,i){return new n(e,t,r,i)}l.version=r(24336),l.AlgoliaSearchHelper=n,l.SearchParameters=a,l.RecommendParameters=i,l.SearchResults=s,l.RecommendResults=o,e.exports=l},68078:function(e,t,r){"use strict";var n=r(17331);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(14853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},67450:function(e){"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter(function(e){return void 0===t[e.$$id]}).map(function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r})}},e.exports=t},43650:function(e){"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]})}t.prototype={constructor:t},e.exports=t},82437:function(e,t,r){"use strict";var n=r(52344),i=r(90116),o=r(49803),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,o=e[t]?e[t].concat(i):[i],s={};return s[t]=o,n({},s,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,function(e,r){return t===r});var n=""+r;return a.clearRefinement(e,function(e,r){return t===r&&n===e})},toggleRefinement:function(e,t,r){if(void 0===r)throw Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return o(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce(function(i,o){var a=e[o]||[],s=a.filter(function(e){return!t(e,o,r)});return s.length!==a.length&&(n=!0),i[o]=s,i},{});return n?a:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;return void 0!==r&&n?-1!==e[t].indexOf(""+r):n}};e.exports=a},17775:function(e,t,r){"use strict";var n=r(52344),i=r(7888),o=r(22686),a=r(60185),s=r(90116),l=r(49803),c=r(28023),u=r(46801),d=r(82437);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(e,r){return f(t[r],e)}):e===t}function p(e){var t=e?p._parseNumbers(e):{};void 0===t.userToken||u(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach(function(e){var n=-1!==p.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])})}p.PARAMETERS=Object.keys(new p),p._parseNumbers=function(e){if(e instanceof p)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach(function(e){var i=n[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});r[t][e]=i})}),t.numericRefinements=r}return a(e,t)},p.make=function(e){var t=new p(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},p.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&s(r.numericRefinements)?Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):s(e.numericRefinements)&&r.numericFilters?Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},p.prototype={constructor:p,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:d.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:d.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:d.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:d.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=c(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&f(n.val,c(r))})}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return l(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce(function(n,i){var o=r[i],a={};return Object.keys(o=o||{}).forEach(function(r){var n=o[r]||[],s=[];n.forEach(function(t){e({val:t,op:r},i,"numeric")||s.push(t)}),s.length!==n.length&&(t=!0),a[r]=s}),n[i]=a,n},{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:d.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:d.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:d.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:d.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:d.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:d.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:d.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:d.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:d.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&d.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&d.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&d.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var o=c(r),a=void 0!==i(this.numericRefinements[e][t],function(e){return f(e,o)});return n&&a},isTagRefined:function(e){return -1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=o(Object.keys(this.numericRefinements).filter(function(t){return Object.keys(e.numericRefinements[t]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(t){return e.disjunctiveFacetsRefinements[t].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return o(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return -1===e.indexOf(t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach(function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=p.validate(this,e);if(t)throw t;var r=this,n=p._parseNumbers(e),i=Object.keys(this).reduce(function(e,t){return e[t]=r[t],e},{}),o=Object.keys(n).reduce(function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?l(e,[t]):(i&&(e[t]=n[t]),e)},i);return new this.constructor(o)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}},e.exports=p},10210:function(e,t,r){"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],c=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",u=e._getHierarchicalFacetSeparator(n),d=e._getHierarchicalRootPath(n),f=e._getHierarchicalShowParentLevel(n),p=o(e._getHierarchicalFacetSortBy(n)),h=t.every(function(e){return e.exhaustive}),m=t;return d&&(m=t.slice(d.split(u).length)),m.reduce(function(e,t,r){var n=e;if(r>0){var o=0;for(n=e;o-1});if(n){var i=n.attributes.indexOf(t),c=s(e.hierarchicalFacets,function(e){return e.name===n.name});l.hierarchicalFacets[c][i]={attribute:t,data:r,exhaustive:o.exhaustiveFacetsCount}}else{var u,d=-1!==e.disjunctiveFacets.indexOf(t),f=-1!==e.facets.indexOf(t);d&&(u=v[t],l.disjunctiveFacets[u]={name:t,data:r,exhaustive:o.exhaustiveFacetsCount},m(l.disjunctiveFacets[u],o.facets_stats,t)),f&&(u=g[t],l.facets[u]={name:t,data:r,exhaustive:o.exhaustiveFacetsCount},m(l.facets[u],o.facets_stats,t))}}),this.hierarchicalFacets=n(this.hierarchicalFacets),d.forEach(function(r){var n=t[y],a=n&&n.facets?n.facets:{},u=e.getHierarchicalFacetByName(r);Object.keys(a).forEach(function(t){var r,d=a[t];if(u){r=s(e.hierarchicalFacets,function(e){return e.name===u.name});var p=s(l.hierarchicalFacets[r],function(e){return e.attribute===t});if(-1===p)return;l.hierarchicalFacets[r][p].data=c({},l.hierarchicalFacets[r][p].data,d)}else{r=v[t];var h=o.facets&&o.facets[t]||{};l.disjunctiveFacets[r]={name:t,data:i({},d,h),exhaustive:n.exhaustiveFacetsCount},m(l.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach(function(n){!l.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(f(n))>-1&&(l.disjunctiveFacets[r].data[n]=0)})}}),y++}),e.getRefinedHierarchicalFacets().forEach(function(r){var n=e.getHierarchicalFacetByName(r),o=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(o).length<2||t.slice(y).forEach(function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach(function(t){var c=r[t],u=s(e.hierarchicalFacets,function(e){return e.name===n.name}),d=s(l.hierarchicalFacets[u],function(e){return e.attribute===t});if(-1!==d){var f={};if(a.length>0&&!l.persistHierarchicalRootCount){var p=a[0].split(o)[0];f[p]=l.hierarchicalFacets[u][d].data[p]}l.hierarchicalFacets[u][d].data=i(f,c,l.hierarchicalFacets[u][d].data)}}),y++})}),Object.keys(e.facetsExcludes).forEach(function(t){var r=e.facetsExcludes[t],n=g[t];l.facets[n]={name:t,data:b[t],exhaustive:o.exhaustiveFacetsCount},r.forEach(function(e){l.facets[n]=l.facets[n]||{name:t},l.facets[n].data=l.facets[n].data||{},l.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(p(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){var r=a(e,function(e){return e.name===t});return r&&r.stats}function y(e,t,r,n,i){var o=a(i,function(e){return e.name===r}),s=o&&o.data&&o.data[n]?o.data[n]:0;return{type:t,attributeName:r,name:n,count:s,exhaustive:o&&o.exhaustive||!1}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r,n=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map(function(r){var i=d(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(r){var n=d(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}}):[]}if(e._state.isHierarchicalFacet(t)){var o=a(e.hierarchicalFacets,r);if(!o)return o;var s=e._state.getHierarchicalFacetByName(t),l=e._state._getHierarchicalFacetSeparator(s),c=f(e._state.getHierarchicalRefinement(t)[0]||"");0===c.indexOf(s.rootPath)&&(c=c.replace(s.rootPath+l,""));var u=c.split(l);return u.unshift(t),function e(t,r,n){t.isRefined=t.name===(r[n]&&r[n].trim()),t.data&&t.data.forEach(function(t){e(t,r,n+1)})}(o,u,0),o}}(this,e);if(n){var o=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;return r=Array.isArray(n)?[e]:s._state.getHierarchicalFacetByName(n.name).attributes,function e(t,r,n,o){if(o=o||0,Array.isArray(r))return t(r,n[o]);if(!r.data||0===r.data.length)return r;var a=r.data.map(function(r){return e(t,r,n,o+1)});return i({data:t(a,n[o])},r)}(function(e,t){if(o.facetOrdering){var r,n,i,a,c,d,f,p=s.renderingContent&&s.renderingContent.facetOrdering&&s.renderingContent.facetOrdering.values&&s.renderingContent.facetOrdering.values[t];if(p)return i=[],a=[],c=p.hide||[],d=(p.order||[]).reduce(function(e,t,r){return e[t]=r,e},{}),e.forEach(function(e){var t=e.path||e.name,r=c.indexOf(t)>-1;r||void 0===d[t]?r||a.push(e):i[d[t]]=e}),i=i.filter(function(e){return e}),"hidden"===(f=p.sortRemainingBy)?i:(n="alpha"===f?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(u(a,n[0],n[1])))}if(Array.isArray(o.sortBy)){var h=l(o.sortBy,g.DEFAULT_SORT);return u(e,h[0],h[1])}if("function"==typeof o.sortBy)return r=o.sortBy,e.sort(r);throw Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,r)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?v(this.facets,e):this._state.isDisjunctiveFacet(e)?v(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(n){e.facetsRefinements[n].forEach(function(i){r.push(y(e,"facet",n,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(n){e.facetsExcludes[n].forEach(function(i){r.push(y(e,"exclude",n,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(n){e.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(y(e,"disjunctive",n,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(n){e.hierarchicalFacetsRefinements[n].forEach(function(i){var o,s,l,c,u,d,f,p;r.push((o=t.hierarchicalFacets,s=e.getHierarchicalFacetByName(n),l=e._getHierarchicalFacetSeparator(s),c=i.split(l),u=a(o,function(e){return e.name===n}),f=(d=c.reduce(function(e,t){var r=e&&a(e.data,function(e){return e.name===t});return void 0!==r?r:e},u))&&d.count||0,p=d&&d.exhaustive||!1,{type:"hierarchical",attributeName:n,name:d&&d.path||"",count:f,exhaustive:p}))})}),Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t];Object.keys(n).forEach(function(e){n[e].forEach(function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})})})}),e.tagRefinements.forEach(function(e){r.push({type:"tag",attributeName:"_tags",name:e})}),r},e.exports=g},49374:function(e,t,r){"use strict";var n=r(17331),i=r(68078),o=r(94039).escapeFacetValue,a=r(14853),s=r(60185),l=r(90116),c=r(49803),u=r(67450),d=r(43650),f=r(96394),p=r(17775),h=r(23076),m=r(97878),g=r(24336);function v(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=p.make(i),this.recommendState=new u({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function b(){return this.state.page}a(v,n),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=f._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),t){this.client.search(n).then(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new h(r,e.results),r)}).catch(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)});return}return this.client.search(n).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new h(r,e.results),state:r,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e})},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:c(f._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),o="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw Error(o);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw Error(o);return a.findAnswers(n.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,r,n){var i,a="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!a&&!s&&"function"!=typeof this.client.search)throw Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var l=this.state.setQueryParameters(n||{}),c=l.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,l);this._currentNbQueries++;var d=this;return a?i=this.client.searchForFacetValues([{indexName:l.index,params:u}]):s?i=this.client.initIndex(l.index).searchForFacetValues(u):(delete u.facetName,i=this.client.search([{type:"facet",facet:e,indexName:l.index,params:u}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:l,facet:e,query:t}),i.then(function(t){return d._currentNbQueries--,0===d._currentNbQueries&&d.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach(function(t){t.escapedValue=o(t.value),t.isRefined=c?l.isDisjunctiveFacetRefined(e,t.escapedValue):l.isFacetRefined(e,t.escapedValue)}),t},function(e){throw d._currentNbQueries--,0===d._currentNbQueries&&d.emit("searchQueueEmpty"),e})},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:p.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new p(e),this},v.prototype.hasRefinements=function(e){return!!l(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=b,v.prototype.getPage=b,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){t.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"disjunctive"})});var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach(function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})}),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=f._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(e){var n=e.getModifiedState(t),i=n.index?f._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i}),o=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!o.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",{error:e})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map(function(e){return e.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var o=this._recommendCache,a=this.derivedHelpers.map(function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new u);return n.push({state:a,index:r,helper:t}),i=Array.prototype.concat.apply(i,a.params.map(function(e){return e.$$id})),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,o)}),s=Array.prototype.concat.apply(this.recommendState._buildQueries(r,o),a);if(0!==s.length){if(s.length>0&&void 0===this.client.getRecommendations){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var l=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(s).then(this._dispatchRecommendResponse.bind(this,l,n,i)).catch(this._dispatchRecommendError.bind(this,l))}catch(e){this.emit("error",{error:e})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},74587:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:function(e){"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])}),e},{})}},94039:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e)){for(var r=0;r1||!o?(e[0].push(i[0]),e[1].push(i[1])):(e[0].push(o[0]),e[1].push(o[1])),e},[[],[]])}},14853:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:function(e){"use strict";e.exports=function(e,t){return e.filter(function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n})}},60185:function(e){"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){t(e)||(e={});for(var r=1,n=arguments.length;r0}},49803:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},42148:function(e){"use strict";e.exports=function(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map(function(e,r){return{criteria:t.map(function(t){return e[t]}),index:r,value:e}});return n.sort(function(e,t){for(var n=-1;++nt||n&&i||!r)return 1;if(!n&&e=r.length)return i;if("desc"===r[n])return-i;return i}}return e.index-t.index}),n.map(function(e){return e.value})}},28023:function(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw Error("The value should be a number, a parsable string or an array of those.")}},96394:function(e,t,r){"use strict";var n=r(60185);function i(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})}),t.getRefinedHierarchicalFacets().forEach(function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(s).length>1){var l=a[0].split(s).slice(0,-1).reduce(function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(s)})},[]);l.forEach(function(n,a){var s=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function c(e){return i.attributes.some(function(t){return t===e.split(":")[0]})}var u=(s.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var r=t.filter(function(e){return!c(e)});r.length>0&&e.push(r)}return"string"!=typeof t||c(t)||e.push(t),e},[]),d=l[a-1];a>0?s.facetFilters=u.concat(d.attribute+":"+d.value):s.facetFilters=u.length>0?u:void 0,r.push({indexName:e,params:s})})}}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)).sort(),r=o._getFacetFilters(e),a=o._getNumericFilters(e),s=o._getTagFilters(e),l={};return t.length>0&&(l.facets=t.indexOf("*")>-1?["*"]:t),s.length>0&&(l.tagFilters=s),r.length>0&&(l.facetFilters=r),a.length>0&&(l.numericFilters=a),i(n({},e.getQueryParams(),l))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=o._getFacetFilters(e,t,r),s=o._getNumericFilters(e,t),l=o._getTagFilters(e),c={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};l.length>0&&(c.tagFilters=l);var u=e.getHierarchicalFacetByName(t);return u?c.facets=o._getDisjunctiveHierarchicalFacetAttribute(e,u,r):c.facets=t,s.length>0&&(c.numericFilters=s),a.length>0&&(c.facetFilters=a),i(n({},e.getQueryParams(),c))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach(function(e){var o=i[e]||[];t!==n&&o.forEach(function(t){if(Array.isArray(t)){var i=t.map(function(t){return n+e+t});r.push(i)}else r.push(n+e+t)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(e){(i[e]||[]).slice().sort().forEach(function(t){n.push(e+":"+t)})});var o=e.facetsExcludes||{};Object.keys(o).sort().forEach(function(e){(o[e]||[]).sort().forEach(function(t){n.push(e+":-"+t)})});var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach(function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach(function(t){i.push(e+":"+t)}),n.push(i)}});var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach(function(i){var o,a,l=(s[i]||[])[0];if(void 0!==l){var c=e.getHierarchicalFacetByName(i),u=e._getHierarchicalFacetSeparator(c),d=e._getHierarchicalRootPath(c);if(t===i){if(-1===l.indexOf(u)||!d&&!0===r||d&&d.split(u).length===l.split(u).length)return;d?(a=d.split(u).length-1,l=d):(a=l.split(u).length-2,l=l.slice(0,l.lastIndexOf(u))),o=c.attributes[a]}else a=l.split(u).length-1,o=c.attributes[a];o&&n.push([o+":"+l])}}),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce(function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),o=n.split(i).length,a=r.attributes.slice(0,o+1);return t.concat(a)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(n).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,l={facetQuery:t,facetName:e};return"number"==typeof r&&(l.maxFacetHits=r),i(n({},o._getHitsSearchParams(s),l))}};e.exports=o},46801:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},97878:function(e,t,r){"use strict";var n=r(7888),i=r(7948);e.exports=function(e){var t,r,o={};return e.forEach(function(e){e.forEach(function(e,t){o[e.objectID]?o[e.objectID]={indexSum:o[e.objectID].indexSum+t,count:o[e.objectID].count+1}:o[e.objectID]={indexSum:t,count:1}})}),(t=e.length,r=[],Object.keys(o).forEach(function(e){o[e].count<2&&(o[e].indexSum+=100),r.push({objectID:e,avgOfIndices:o[e].indexSum/t})}),r.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1})).reduce(function(t,r){var o=n(i(e),function(e){return e.objectID===r.objectID});return o?t.concat(o):t},[])}},24336:function(e){"use strict";e.exports="3.22.2"},58363:function(e,t){"use strict";t.Z=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return r.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):i===t})}return!0}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],c=new i((a+s)*3/4-s),u=0,d=s>0?a-4:a;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},43985:function(e,t,r){"use strict";r.d(t,{Jx:function(){return h},cv:function(){return y}});var n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],i=e=>{let t=0;for(let r=0;r{var r="";for(let i=1;i<=t;i++)r+=n[Math.floor(Math.floor(e)/Math.pow(83,t-i)%83)];return r},a=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},s=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(3294.6*t+.5):Math.trunc((1.055*Math.pow(t,.4166666666666667)-.055)*255+.5)},l=e=>e<0?-1:1,c=(e,t)=>l(e)*Math.pow(Math.abs(e),t),u=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},d=e=>{if(!e||e.length<6)throw new u("The blurhash string must be at least 6 characters");let t=i(e[0]),r=Math.floor(t/9)+1,n=t%9+1;if(e.length!==4+2*n*r)throw new u(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*n*r}`)},f=e=>[a(e>>16),a(e>>8&255),a(255&e)],p=(e,t)=>{let r=Math.floor(e/361),n=Math.floor(e/19)%19;return[c((r-9)/9,2)*t,c((n-9)/9,2)*t,c((e%19-9)/9,2)*t]},h=(e,t,r,n)=>{d(e),n|=1;let o=i(e[0]),a=Math.floor(o/9)+1,l=o%9+1,c=(i(e[1])+1)/166,u=Array(l*a);for(let t=0;t{let i=0,o=0,s=0,l=4*t;for(let c=0;c(s(e[0])<<16)+(s(e[1])<<8)+s(e[2]),v=(e,t)=>361*Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[0]/t,.5)+9.5))))+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[1]/t,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[2]/t,.5)+9.5)))),y=(e,t,r,n,i)=>{let a;if(n<1||n>9||i<1||i>9)throw new u("BlurHash must have between 1 and 9 components");if(t*r*4!==e.length)throw new u("Width and height must match the pixels array");let s=[];for(let o=0;on*Math.cos(Math.PI*i*e/t)*Math.cos(Math.PI*o*a/r));s.push(a)}let l=s[0],c=s.slice(1),d="";if(d+=o(n-1+(i-1)*9,1),c.length>0){let e=Math.floor(Math.max(0,Math.min(82,Math.floor(166*Math.max(...c.map(e=>Math.max(...e)))-.5))));a=(e+1)/166,d+=o(e,1)}else a=1,d+=o(0,1);return d+=o(g(l),4),c.forEach(e=>{d+=o(v(e,a),2)}),d}},48764:function(e,t,r){"use strict";var n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(P(e,ArrayBuffer)||e&&P(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(P(e,SharedArrayBuffer)||e&&P(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||P(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return C(e).length;default:if(i)return n?-1:E(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,r){var i,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;f239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function w(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,o){return t=+t,r>>>=0,o||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,o){return t=+t,r>>>=0,o||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=s,t.h2=50,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),P(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);ir&&(e+=" ... "),""},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,l,c,u,d,f,p,h,m,g=this.length-t;if((void 0===r||r>g)&&(r=g),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var v=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i.push(r%256),i.push(n);return i}(e,this.length-h),this,h,m);default:if(v)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),v=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function O(e){for(var t=[],r=0;r=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function P(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var A=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},76489:function(e,t){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},i=e.split(";"),o=(t||{}).decode||r,a=0;at.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCookies=t.hasCookie=t.removeCookies=t.deleteCookie=t.setCookies=t.setCookie=t.getCookie=t.getCookies=void 0;var o=r(76489),a=function(){return"undefined"!=typeof window},s=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(e&&(t=e.req),!a())return t&&t.cookies?t.cookies:t&&t.headers&&t.headers.cookie?(0,o.parse)(t.headers.cookie):{};for(var t,r={},n=document.cookie?document.cookie.split("; "):[],i=0,s=n.length;i-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=u(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=u(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},p.call(m.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];v.redirect=function(e,t){if(-1===y.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function b(e,n){return new Promise(function(i,o){var a=new m(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL"),i(new v("response"in s?s.response:s.responseText,r))},s.onerror=function(){o(TypeError("Network request failed"))},s.ontimeout=function(){o(TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})}b.polyfill=!0,e.fetch||(e.fetch=b,e.Headers=l,e.Request=m,e.Response=v),t.Headers=l,t.Request=m,t.Response=v,t.fetch=b,Object.defineProperty(t,"__esModule",{value:!0})}({})},27484:function(e){var t;t=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",i="week",o="month",a="quarter",s="year",l="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",h={};h[p]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||"th")+"]"}};var m="$isDayjsObject",g=function(e){return e instanceof x||!(!e||!e[m])},v=function e(t,r,n){var i;if(!t)return p;if("string"==typeof t){var o=t.toLowerCase();h[o]&&(i=o),r&&(h[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;h[s]=t,i=s}return!n&&i&&(p=i),i||!n&&p},y=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new x(r)},b={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(r/60),2,"0")+":"+f(r%60,2,"0")},m:function e(t,r){if(t.date()68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],c=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var r,n=o.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[r,s("day")],Do:[i,function(e){var t=o.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[n,s("month")],MM:[r,s("month")],MMM:[i,function(e){var t=c("months"),r=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw Error();this.month=r%12||r}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,s("year")],Z:l,ZZ:l};return function(r,n,i){i.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(a=r.parseTwoDigitYear);var s=n.prototype,l=s.parse;s.parse=function(r){var n=r.date,a=r.utc,s=r.args;this.$u=a;var c=s[1];if("string"==typeof c){var u=!0===s[2],f=!0===s[3],p=s[2];f&&(p=s[2]),o=this.$locale(),!u&&p&&(o=i.Ls[p]),this.$d=function(r,n,i){try{if(["x","X"].indexOf(n)>-1)return new Date(("X"===n?1e3:1)*r);var a=(function(r){var n,i;n=r,i=o&&o.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var o=n&&n.toUpperCase();return r||i[n]||e[n]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),s=a.length,l=0;l0?l-1:g.getMonth());var x=u||0,w=f||0,S=p||0,k=h||0;return m?new Date(Date.UTC(y,b,v,x,w,S,k+60*m.offset*1e3)):i?new Date(Date.UTC(y,b,v,x,w,S,k)):new Date(y,b,v,x,w,S,k)}catch(e){return new Date("")}}(n,c,a),this.init(),p&&!0!==p&&(this.$L=this.locale(p).$L),(u||f)&&n!=this.format(c)&&(this.$d=new Date("")),o={}}else if(c instanceof Array)for(var h=c.length,m=1;m<=h;m+=1){s[1]=c[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else l.call(this,r)}}},e.exports=t()},1646:function(e){var t;t=function(){"use strict";var e,t,r=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,i={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},o=function(e){return e instanceof d},a=function(e,t,r){return new d(e,r,t.$l)},s=function(e){return t.p(e)+"s"},l=function(e){return e<0},c=function(e){return l(e)?Math.ceil(e):Math.floor(e)},u=function(e,t){return e?l(e)?{negative:!0,format:""+Math.abs(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},d=function(){function l(e,t,r){var o=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return a(e*i[s(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){o.$d[s(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var l=e.match(n);if(l){var c=l.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var d=l.prototype;return d.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,r){return t+(e.$d[r]||0)*i[r]},0)},d.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=c(e/31536e6),e%=31536e6,this.$d.months=c(e/2628e6),e%=2628e6,this.$d.days=c(e/864e5),e%=864e5,this.$d.hours=c(e/36e5),e%=36e5,this.$d.minutes=c(e/6e4),e%=6e4,this.$d.seconds=c(e/1e3),e%=1e3,this.$d.milliseconds=e},d.toISOString=function(){var e=u(this.$d.years,"Y"),t=u(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=u(r,"D"),i=u(this.$d.hours,"H"),o=u(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var s=u(a,"S"),l=e.negative||t.negative||n.negative||i.negative||o.negative||s.negative,c=i.format||o.format||s.format?"T":"",d=(l?"-":"")+"P"+e.format+t.format+n.format+c+i.format+o.format+s.format;return"P"===d||"-P"===d?"P0D":d},d.toJSON=function(){return this.toISOString()},d.format=function(e){var n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return(e||"YYYY-MM-DDTHH:mm:ss").replace(r,function(e,t){return t||String(n[e])})},d.as=function(e){return this.$ms/i[s(e)]},d.get=function(e){var t=this.$ms,r=s(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?c(t/i[r]):this.$d[r],t||0},d.add=function(e,t,r){var n;return n=t?e*i[s(t)]:o(e)?e.$ms:a(e,this).$ms,a(this.$ms+n*(r?-1:1),this)},d.subtract=function(e,t){return this.add(e,t,!0)},d.locale=function(e){var t=this.clone();return t.$l=e,t},d.clone=function(){return a(this.$ms,this)},d.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},d.valueOf=function(){return this.asMilliseconds()},d.milliseconds=function(){return this.get("milliseconds")},d.asMilliseconds=function(){return this.as("milliseconds")},d.seconds=function(){return this.get("seconds")},d.asSeconds=function(){return this.as("seconds")},d.minutes=function(){return this.get("minutes")},d.asMinutes=function(){return this.as("minutes")},d.hours=function(){return this.get("hours")},d.asHours=function(){return this.as("hours")},d.days=function(){return this.get("days")},d.asDays=function(){return this.as("days")},d.weeks=function(){return this.get("weeks")},d.asWeeks=function(){return this.as("weeks")},d.months=function(){return this.get("months")},d.asMonths=function(){return this.as("months")},d.years=function(){return this.get("years")},d.asYears=function(){return this.as("years")},l}(),f=function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")};return function(r,n,i){e=i,t=i().$utils(),i.duration=function(e,t){return a(e,{$l:i.locale()},t)},i.isDuration=o;var s=n.prototype.add,l=n.prototype.subtract;n.prototype.add=function(e,t){return o(e)?f(this,e,1):s.bind(this)(e,t)},n.prototype.subtract=function(e,t){return o(e)?f(this,e,-1):l.bind(this)(e,t)}}},e.exports=t()},66607:function(e){var t;t=function(){return function(e,t,r){t.prototype.isBetween=function(e,t,n,i){var o=r(e),a=r(t),s="("===(i=i||"()")[0],l=")"===i[1];return(s?this.isAfter(o,n):!this.isBefore(o,n))&&(l?this.isBefore(a,n):!this.isAfter(a,n))||(s?this.isBefore(o,n):!this.isAfter(o,n))&&(l?this.isAfter(a,n):!this.isBefore(a,n))}}},e.exports=t()},37181:function(e){var t;t=function(){return function(e,t,r){var n=function(e,t){if(!t||!t.length||1===t.length&&!t[0]||1===t.length&&Array.isArray(t[0])&&!t[0].length)return null;1===t.length&&t[0].length>0&&(t=t[0]),r=(t=t.filter(function(e){return e}))[0];for(var r,n=1;n0,g<=m.r||!m.r){g<=1&&h>0&&(m=f[h-1]);var v=d[m.l];s&&(g=s(""+g)),c="string"==typeof v?v.replace("%d",g):v(g,n,m.l,u);break}}if(n)return c;var y=u?d.future:d.past;return"function"==typeof y?y(c):y.replace("%s",c)},n.to=function(e,t){return o(e,t,this,!0)},n.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(a(this),e)},n.fromNow=function(e){return this.from(a(this),e)}}},e.exports=t()},70178:function(e){var t;t=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,o){var a=i.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},a.utc=function(t){var r=o(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(n,i){var o=this.$utils().u;if(o(n))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],o=i[0],a=60*+i[1]+ +i[2];return 0===a?0:"+"===o?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(i)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),i=o(e).local();return f.call(n,i,t,r)}}},e.exports=t()},44020:function(e){"use strict";var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),n=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},i=n.exec(e);i;){try{t[i[0]]=decodeURIComponent(i[0])}catch(e){var o=function(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n");case s.Comment:return"");case s.CDATA:return"");case s.Script:case s.Style:case s.Tag:return function(e,t){"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&h.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&m.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var r,i="<".concat(e.name),o=function(e,t){if(e){var r,n=(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)===!1?d:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map(function(r){var i,o,a=null!==(i=e[r])&&void 0!==i?i:"";return("foreign"===t.xmlMode&&(r=null!==(o=c.attributeNames.get(r))&&void 0!==o?o:r),t.emptyAttrs||t.xmlMode||""!==a)?"".concat(r,'="').concat(n(a),'"'):r}).join(" ")}}(e.attribs,t);return o&&(i+=" ".concat(o)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&f.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),(t.xmlMode||!f.has(e.name))&&(i+=""))),i}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)===!1||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(n):(0,l.escapeText)(n)),n}(e,t)}}(r[o],t);return i}t.render=p,t.default=p;var h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},99960:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,(n=r=t.ElementType||(t.ElementType={})).Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype",t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},16996:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(43346),i=r(23905);t.getFeed=function(e){var t,r,n,o,a,f,p,h,m,g,v=l(d,e);return v?"feed"===v.name?(r=v.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map(function(e){var t,r=e.children,n={media:s(r)};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var o=c("summary",r)||c("content",r);o&&(n.description=o);var a=c("updated",r);return a&&(n.pubDate=new Date(a)),n})},u(n,"id","id",r),u(n,"title","title",r),(o=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href)&&(n.link=o),u(n,"description","subtitle",r),(a=c("updated",r))&&(n.updated=new Date(a)),u(n,"author","email",r,!0),n):(h=null!==(p=null===(f=l("channel",v.children))||void 0===f?void 0:f.children)&&void 0!==p?p:[],m={type:v.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",v.children).map(function(e){var t=e.children,r={media:s(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t);return n&&(r.pubDate=new Date(n)),r})},u(m,"title","title",h),u(m,"link","link",h),u(m,"description","description",h),(g=c("lastBuildDate",h))&&(m.updated=new Date(g)),u(m,"author","managingEditor",h,!0),m):null};var o=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map(function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0;nu.indexOf(f)?c===t?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:c===e?i.PRECEDING|i.CONTAINS:i.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},(n=i=t.DocumentPosition||(t.DocumentPosition={}))[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY",t.compareDocumentPosition=a,t.uniqueSort=function(e){return(e=e.filter(function(e,t,r){return!r.includes(e,t+1)})).sort(function(e,t){var r=a(e,t);return r&i.PRECEDING?-1:r&i.FOLLOWING?1:0}),e}},89432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(43346),t),i(r(85010),t),i(r(26765),t),i(r(98043),t),i(r(23905),t),i(r(74975),t),i(r(16996),t);var o=r(63317);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return o.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return o.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return o.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return o.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return o.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return o.hasChildren}})},23905:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(63317),i=r(98043),o={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function a(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map(function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(o,t)?o[t](r):a(t,r)});return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var o=l(e);return o?(0,i.filter)(o,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(a("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o.tag_type(e),t,r,n)}},26765:function(e,t){"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var o=n.children;o.splice(o.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},98043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(63317);function i(e,t,r,o){for(var a=[],s=0;s0){var c=i(e,l.children,r,o);if(a.push.apply(a,c),(o-=c.length)<=0)break}}return a}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),Array.isArray(t)||(t=[t]),i(e,t,r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var o=null,a=0;a0&&(o=e(t,s.children,!0)))}return o},t.existsOne=function e(t,r){return r.some(function(r){return(0,n.isTag)(r)&&(t(r)||r.children.length>0&&e(t,r.children))})},t.findAll=function(e,t){for(var r,i,o=[],a=t.filter(n.isTag);i=a.shift();){var s=null===(r=i.children)||void 0===r?void 0:r.filter(n.isTag);s&&s.length>0&&a.unshift.apply(a,s),e(i)&&o.push(i)}return o}},43346:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(63317),o=n(r(97220)),a=r(99960);function s(e,t){return(0,o.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map(function(e){return s(e,t)}).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===a.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},85010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(63317);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function o(e){return e.parent||null}t.getChildren=i,t.getParent=o,t.getSiblings=function(e){var t=o(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,a=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=a;)r.push(a),a=a.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},63317:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=r(99960),a=r(50943);i(r(50943),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,r){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?o.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment){this.lastNode.data+=e;return}var t=new a.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new a.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},50943:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,n)||this;return o.name=t,o.attribs=r,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}})},enumerable:!1,configurable:!0}),t}(f);function g(e){return(0,a.isTag)(e)}function v(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function x(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function S(e,t){if(void 0===t&&(t=!1),y(e))r=new c(e.data);else if(b(e))r=new u(e.data);else if(g(e)){var r,n=t?k(e.children):[],i=new m(e.name,o({},e.attribs),n);n.forEach(function(e){return e.parent=i}),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),r=i}else if(v(e)){var n=t?k(e.children):[],a=new p(n);n.forEach(function(e){return e.parent=a}),r=a}else if(w(e)){var n=t?k(e.children):[],s=new h(n);n.forEach(function(e){return e.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else if(x(e)){var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}else throw Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function k(e){for(var t=e.map(function(e){return S(e,!0)}),r=1;rt}return{length:r,max:t,min:e,constrain:function(r){return n(r)?rt},reachedMin:function(t){return teu?e.concat(t):e},[]).map(function(t,r,n){return e.slice(t,n[r+1])})}}),eb=(z=ec.startEdge,N=ec.endEdge,_=(R=ey.groupSlides)(es).map(function(e){return u(e)[N]-e[0][z]}).map(s).map(ef.measure),f=u(M=es.map(function(e){return ea[z]-e[z]}).map(function(e){return-s(e)}))-u(ev),D=R(M).map(function(e){return e[0]}).map(function(e,t,r){var n=t===d(r);return ep&&!t?0:ep&&n?f:e+_[t]}),{snaps:M,snapsAligned:D}),ex=eb.snaps,ew=eb.snapsAligned,eS=-u(ex)+u(ev),ek=(L=p(-eS+eu,ew[0]),F=ew.map(L.constrain),{snapsContained:function(){if(eS<=eu)return[L.max];if("keepSnaps"===eo)return F;var e,t,r=(e=F[0],t=u(F),p(F.lastIndexOf(e),F.indexOf(t)+1)),n=r.min,i=r.max;return F.slice(n,i)}()}).snapsContained,ej=ep?ek:ew,eE={limit:(v=ej[0],y=u(ej),p(ee?v-eS:y,v))}.limit,eO=function e(t,r,n){var i=p(0,t),o=i.min,a=i.constrain,l=t+1,c=u(r);function u(e){return n?s((l+e)%l):a(e)}function d(e){return c=u(e),f}var f={add:function(e){return d(c+e)},clone:function(){return e(t,c,n)},get:function(){return c},set:d,min:o,max:t};return f}(d(ej),Y,ee),eC=eO.clone(),eI=c(r),eP=function(e){var t=0;function r(e,r){return function(){!!t===e&&r()}}function n(){t=window.requestAnimationFrame(e)}return{proceed:r(!0,n),start:r(!1,n),stop:r(!0,function(){window.cancelAnimationFrame(t),t=0})}}(function(){ee||eL.scrollBounds.constrain(eL.dragHandler.pointerDown()),eL.scrollBody.seek(ez).update();var e=eL.scrollBody.settle(ez);e&&!eL.dragHandler.pointerDown()&&(eL.animation.stop(),o.emit("settle")),e||o.emit("scroll"),ee&&(eL.scrollLooper.loop(eL.scrollBody.direction()),eL.slideLooper.loop()),eL.translate.to(eT),eL.animation.proceed()}),eA=ej[eO.get()],eT=m(eA),ez=m(eA),eN=function(e,t,r){var n=m(0),i=m(0),o=m(0),a=0,s=t,c=1;function u(e){return s=e,f}function d(e){return c=e,f}var f={direction:function(){return a},seek:function(t){o.set(t).subtract(e);var r=0+(o.get()-0)/100*(s-0);return a=l(o.get()),o.normalize().multiply(r).subtract(n),o.divide(c),i.add(o),f},settle:function(t){var r=!(Math.round((t.get()-e.get())*100)/100);return r&&e.set(t),r},update:function(){n.add(i),e.add(n),i.multiply(0)},useBaseMass:function(){return d(1)},useBaseSpeed:function(){return u(t)},useMass:d,useSpeed:u};return f}(eT,et,0),eR=function(e,t,r,n,i){var o=n.reachedAny,a=n.removeOffset,c=n.constrain;function u(e){return e.concat().sort(function(e,t){return s(e)-s(t)})[0]}function d(t,n){var i=[t,t+r,t-r];return e?n?u(i.filter(function(e){return l(e)===n})):u(i):i[0]}return{byDistance:function(r,n){var l,u=i.get()+r,f=(l=e?a(u):c(u),{index:t.map(function(e){return e-l}).map(function(e){return d(e,0)}).map(function(e,t){return{diff:e,index:t}}).sort(function(e,t){return s(e.diff)-s(t.diff)})[0].index,distance:l}),p=f.index,h=f.distance,m=!e&&o(u);if(!n||m)return{index:p,distance:r};var g=r+d(t[p]-h,0);return{index:p,distance:g}},byIndex:function(e,r){var n=d(t[e]-i.get(),r);return{index:e,distance:n}},shortcut:d}}(ee,ej,eS,eE,ez),e_=function(e,t,r,n,i,o){function a(n){var a=n.distance,s=n.index!==t.get();a&&(e.start(),i.add(a)),s&&(r.set(t.get()),t.set(n.index),o.emit("select"))}return{distance:function(e,t){a(n.byDistance(e,t))},index:function(e,r){var i=t.clone().set(e);a(n.byIndex(i.get(),r))}}}(eP,eO,eC,eR,ez,o),eM=function(e,t,r,n,i,o,a){var s=i.removeOffset,l=i.constrain,c=o?[0,t,-t]:[0],u=d(c,a);function d(t,i){var o,a=t||c,s=(o=i||0,r.map(function(e){return p(.5,e-.5).constrain(e*o)}));return a.reduce(function(t,i){var o=n.map(function(t,n){return{start:t-r[n]+s[n]+i,end:t+e-s[n]+i,index:n}});return t.concat(o)},[])}return{check:function(e,t){var r=o?s(e):l(e);return(t||u).reduce(function(e,t){var n=t.index,i=t.start,o=t.end;return!(-1!==e.indexOf(n))&&ir?e.concat([n]):e},[])},findSlideBounds:d}}(eu,eS,eg,ex,eE,ee,Q),eD=function(e,t,r,n,i,o,a,c,u,d,f,p,g,v,y,b){var x=e.cross,w=["INPUT","SELECT","TEXTAREA"],S={passive:!1},k=m(0),j=h(),E=h(),O=g.measure(20),C={mouse:300,touch:400},I={mouse:500,touch:600},P=y?5:16,A=0,T=0,z=!1,N=!1,R=!1,_=!1;function M(e){if((!(_=!i.isTouchEvent(e))||0===e.button)&&(t=e.target.nodeName||"",!(w.indexOf(t)>-1))){var t,a,l=s(n.get()-o.get())>=2,c=_||!l;z=!0,i.pointerDown(e),k.set(n),n.set(o),u.useBaseMass().useSpeed(80),a=_?document:r,E.add(a,"touchmove",D,S).add(a,"touchend",L).add(a,"mousemove",D,S).add(a,"mouseup",L),A=i.readPoint(e),T=i.readPoint(e,x),p.emit("pointerDown"),c&&(R=!1)}}function D(e){if(!N&&!_){if(!e.cancelable)return L(e);var r=i.readPoint(e),o=i.readPoint(e,x);if(!(N=s(r-A)>s(o-T))&&!R)return L(e)}var l=i.pointerMove(e);!R&&l&&(R=!0),a.start(),n.add(t.apply(l)),e.preventDefault()}function L(e){var r,o,a,h,m=d.byDistance(0,!1).index!==f.get(),g=i.pointerUp(e)*(y?I:C)[_?"mouse":"touch"],x=(r=t.apply(g),a=(o=f.clone().add(-1*l(r))).get()===f.min||o.get()===f.max,h=d.byDistance(r,!y).distance,y||s(r)=.5,j=m&&w>.75,A=s(g)170;return r=e,a&&(t=e),n},pointerUp:function(e){if(!t||!r)return 0;var n=o(r)-o(t),a=i(e)-i(t),l=i(e)-i(r)>170,c=n/a;return a&&!l&&s(c)>.1?c:0},readPoint:o}}(ec),eT,eP,e_,eN,eR,eO,o,ed,ee,er,ei),eL={containerRect:ea,slideRects:es,animation:eP,axis:ec,direction:el,dragHandler:eD,eventStore:h(),percentOfView:ed,index:eO,indexPrevious:eC,limit:eE,location:eT,options:i,scrollBody:eN,scrollBounds:(U=ed.measure(10),B=ed.measure(50),H=!1,{constrain:function(e){if(!H&&eE.reachedAny(ez.get())&&eE.reachedAny(eT.get())){var t=eE.reachedMin(eT.get())?"min":"max",r=s(eE[t]-eT.get()),n=ez.get()-eT.get(),i=Math.min(r/B,.85);ez.subtract(n*i),!e&&s(n)0?e.concat([r]):e},[])}function h(r,i){var o="start"===i,c=a.findSlideBounds([o?-n:n]);return r.map(function(r){var i=o?0:-n,a=o?n:0,u=c.filter(function(e){return e.index===r})[0][o?"end":"start"],d=m(-1),f=m(-1),p=g(e,t,l[r]);return{index:r,location:f,translate:p,target:function(){return d.set(s.get()>u?i:a)}}})}return{canLoop:function(){return d.every(function(e){var t=e.index;return .1>=f(u.filter(function(e){return e!==t}),r)})},clear:function(){d.forEach(function(e){return e.translate.clear()})},loop:function(){d.forEach(function(e){var t=e.target,r=e.translate,n=e.location,i=t();i.get()!==n.get()&&(0===i.get()?r.clear():r.to(i),n.set(i))})},loopPoints:d}}(ec,el,eu,eS,ev,ej,eM,eT,r),slidesToScroll:ey,slidesInView:eM,slideIndexes:eI,target:ez,translate:g(ec,el,t)};return eL}(e,w,S,T,O)).axis.measureSize(e.getBoundingClientRect()),!T.active)return M();if(f.translate.to(f.location),z=r||z,x=E.init(z,U),T.loop){if(!f.slideLooper.canLoop()){M(),R({loop:!1},r),A=j.merge(A,{loop:!0});return}f.slideLooper.loop()}T.draggable&&w.offsetParent&&S.length&&f.dragHandler.addActivationEvents()}}function _(e,t){var r=F();M(),R(j.merge({startIndex:r},e),t),O.emit("reInit")}function M(){f.dragHandler.removeAllEvents(),f.animation.stop(),f.eventStore.removeAll(),f.translate.clear(),f.slideLooper.clear(),E.destroy()}function D(e){var t=f[e?"target":"location"].get(),r=T.loop?"removeOffset":"constrain";return f.slidesInView.check(f.limit[r](t))}function L(e,t,r){T.active&&!P&&(f.scrollBody.useBaseMass().useSpeed(t?100:T.speed),f.scrollTo.index(e,r||0))}function F(){return f.index.get()}var U={canScrollNext:function(){return f.index.clone().add(1).get()!==F()},canScrollPrev:function(){return f.index.clone().add(-1).get()!==F()},clickAllowed:function(){return f.dragHandler.clickAllowed()},containerNode:function(){return w},internalEngine:function(){return f},destroy:function(){P||(P=!0,k.removeAll(),M(),O.emit("destroy"))},off:I,on:C,plugins:function(){return x},previousScrollSnap:function(){return f.indexPrevious.get()},reInit:_,rootNode:function(){return e},scrollNext:function(e){L(f.index.clone().add(1).get(),!0===e,-1)},scrollPrev:function(e){L(f.index.clone().add(-1).get(),!0===e,1)},scrollProgress:function(){return f.scrollProgress.get(f.location.get())},scrollSnapList:function(){return f.scrollSnaps.map(f.scrollProgress.get)},scrollTo:L,selectedScrollSnap:F,slideNodes:function(){return S},slidesInView:D,slidesNotInView:function(e){var t=D(e);return f.slideIndexes.filter(function(e){return -1===t.indexOf(e)})}};return R(t,r),k.add(window,"resize",function(){var t=j.atMedia(A),r=!j.areEqual(t,T),n=f.axis.measureSize(e.getBoundingClientRect()),i=N!==n,o=E.haveChanged();(i||r||o)&&_(),O.emit("resize")}),setTimeout(function(){return O.emit("init")},0),U}b.globalOptions=void 0,b.optionsHandler=y},44076:function(e,t,r){"use strict";var n,i,o,a,s,l,c,u,d=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),f=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return f(t,e),t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var m=h(r(63704));t.htmlDecodeTree=m.default;var g=h(r(22060));t.xmlDecodeTree=g.default;var v=p(r(26));t.decodeCodePoint=v.default;var y=r(26);function b(e){return e>=s.ZERO&&e<=s.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return y.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return y.fromCodePoint}}),(n=s||(s={}))[n.NUM=35]="NUM",n[n.SEMI=59]="SEMI",n[n.EQUALS=61]="EQUALS",n[n.ZERO=48]="ZERO",n[n.NINE=57]="NINE",n[n.LOWER_A=97]="LOWER_A",n[n.LOWER_F=102]="LOWER_F",n[n.LOWER_X=120]="LOWER_X",n[n.LOWER_Z=122]="LOWER_Z",n[n.UPPER_A=65]="UPPER_A",n[n.UPPER_F=70]="UPPER_F",n[n.UPPER_Z=90]="UPPER_Z",(i=l=t.BinTrieFlags||(t.BinTrieFlags={}))[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE",(o=c||(c={}))[o.EntityStart=0]="EntityStart",o[o.NumericStart=1]="NumericStart",o[o.NumericDecimal=2]="NumericDecimal",o[o.NumericHex=3]="NumericHex",o[o.NamedEntity=4]="NamedEntity",(a=u=t.DecodingMode||(t.DecodingMode={}))[a.Legacy=0]="Legacy",a[a.Strict=1]="Strict",a[a.Attribute=2]="Attribute";var x=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=c.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=u.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=c.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case c.EntityStart:if(e.charCodeAt(t)===s.NUM)return this.state=c.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=c.NamedEntity,this.stateNamedEntity(e,t);case c.NumericStart:return this.stateNumericStart(e,t);case c.NumericDecimal:return this.stateNumericDecimal(e,t);case c.NumericHex:return this.stateNumericHex(e,t);case c.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===s.LOWER_X?(this.state=c.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=c.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r=t;t=s.UPPER_A)||!(n<=s.UPPER_F))&&(!(n>=s.LOWER_A)||!(n<=s.LOWER_F)))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,r,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=s.UPPER_A&&t<=s.UPPER_Z||t>=s.LOWER_A&&t<=s.LOWER_Z||b(t)}(o))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&l.VALUE_LENGTH)>>14)){if(o===s.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==u.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&l.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~l.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case c.NamedEntity:return 0!==this.result&&(this.decodeMode!==u.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case c.NumericDecimal:return this.emitNumericEntity(0,2);case c.NumericHex:return this.emitNumericEntity(0,3);case c.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case c.EntityStart:return 0}},e}();function w(e){var t="",r=new x(e,function(e){return t+=(0,v.fromCodePoint)(e)});return function(e,n){for(var i=0,o=0;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),r.startEntity(n);var a=r.write(e,o+1);if(a<0){i=o+r.end();break}i=o+a,o=0===a?i+1:i}var s=t+e.slice(i);return t="",s}}function S(e,t,r,n){var i=(t&l.BRANCH_LENGTH)>>7,o=t&l.JUMP_TABLE;if(0===i)return 0!==o&&n===o?r:-1;if(o){var a=n-o;return a<0||a>=i?-1:e[r+a]-1}for(var s=r,c=s+i-1;s<=c;){var u=s+c>>>1,d=e[u];if(dn))return e[u+i];c=u-1}}return -1}t.EntityDecoder=x,t.determineBranch=S;var k=w(m.default),j=w(g.default);t.decodeHTML=function(e,t){return void 0===t&&(t=u.Legacy),k(e,t)},t.decodeHTMLAttribute=function(e){return k(e,u.Attribute)},t.decodeHTMLStrict=function(e){return k(e,u.Strict)},t.decodeXML=function(e){return j(e,u.Strict)}},26:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var r,n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},87322:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(94021)),o=r(24625),a=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",a=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(a,s);var l=t.charCodeAt(s),c=i.default.get(l);if("object"==typeof c){if(s+1$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",o=0;null!==(n=t.xmlReplacer.exec(e));){var a=n.index,s=e.charCodeAt(a),l=r.get(s);void 0!==l?(i+=e.substring(o,a)+l,o=a+1):(i+="".concat(e.substring(o,a),"&#x").concat((0,t.getCodePoint)(e,a).toString(16),";"),o=t.xmlReplacer.lastIndex+=Number((64512&s)==55296))}return i+e.substr(o)}function i(e,t){return function(r){for(var n,i=0,o="";n=e.exec(r);)i!==n.index&&(o+=r.substring(i,n.index)),o+=t.get(n[0].charCodeAt(0)),i=n.index+1;return o+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return(64512&e.charCodeAt(t))==55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},63704:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<\xd5ıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig耻\xc6䃆P耻&䀦cute耻\xc1䃁reve;䄂Āiyx}rc耻\xc2䃂;䐐r;쀀\ud835\udd04rave耻\xc0䃀pha;䎑acr;䄀d;橓Āgp\x9d\xa1on;䄄f;쀀\ud835\udd38plyFunction;恡ing耻\xc5䃅Ācs\xbe\xc3r;쀀\ud835\udc9cign;扔ilde耻\xc3䃃ml耻\xc4䃄Ѐaceforsu\xe5\xfb\xfeėĜĢħĪĀcr\xea\xf2kslash;或Ŷ\xf6\xf8;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\ud835\udd05pf;쀀\ud835\udd39eve;䋘c\xf2ēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻\xa9䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻\xc7䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷\xf2ſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀\ud835\udc9epĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\ud835\udd07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀\ud835\udd3bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegra\xecȹoɴ͹\0\0ͻ\xbb͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔e\xe5ˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀\ud835\udc9frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻\xd0䃐cute耻\xc9䃉ƀaiyӒӗӜron;䄚rc耻\xca䃊;䐭ot;䄖r;쀀\ud835\udd08rave耻\xc8䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\ud835\udd3csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻\xcb䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀\ud835\udd09lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀\ud835\udd3dAll;戀riertrf;愱c\xf2׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\ud835\udd0a;拙pf;쀀\ud835\udd3eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\ud835\udca2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅ\xf2کrok;䄦mpńېۘownHum\xf0įqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻\xcd䃍Āiyܓܘrc耻\xce䃎;䐘ot;䄰r;愑rave耻\xcc䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lie\xf3ϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\ud835\udd40a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻\xcf䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀\ud835\udd0dpf;쀀\ud835\udd41ǣ߇\0ߌr;쀀\ud835\udca5rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀\ud835\udd0epf;쀀\ud835\udd42cr;쀀\ud835\udca6րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ight\xe1Μs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\ud835\udd0fĀ;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊight\xe1οight\xe1ϊf;쀀\ud835\udd43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂ\xf2ࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀\ud835\udd10nusPlus;戓pf;쀀\ud835\udd44c\xf2੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘\xeb૙eryThi\xee૙tedĀGL૸ଆreaterGreate\xf2ٳessLes\xf3ੈLine;䀊r;쀀\ud835\udd11ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\ud835\udca9ilde耻\xd1䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻\xd3䃓Āiy෎ීrc耻\xd4䃔;䐞blac;䅐r;쀀\ud835\udd12rave耻\xd2䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀\ud835\udd46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\ud835\udcaaash耻\xd8䃘iŬื฼de耻\xd5䃕es;樷ml耻\xd6䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀\ud835\udd13i;䎦;䎠usMinus;䂱Āipຢອncareplan\xe5ڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀\ud835\udcab;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀\ud835\udd14pf;愚cr;쀀\ud835\udcac؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻\xae䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r\xbbཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀\ud835\udd16ortȀDLRUᄪᄴᄾᅉownArrow\xbbОeftArrow\xbb࢚ightArrow\xbb࿝pArrow;憑gma;䎣allCircle;战pf;쀀\ud835\udd4aɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\ud835\udcaear;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Th\xe1ྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et\xbbሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻\xde䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\ud835\udd17Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\ud835\udd4bipleDot;惛Āctዖዛr;쀀\ud835\udcafrok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻\xda䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻\xdb䃛;䐣blac;䅰r;쀀\ud835\udd18rave耻\xd9䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀\ud835\udd4cЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥own\xe1ϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\ud835\udcb0ilde;䅨ml耻\xdc䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\ud835\udd19pf;쀀\ud835\udd4dcr;쀀\ud835\udcb1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\ud835\udd1apf;쀀\ud835\udd4ecr;쀀\ud835\udcb2Ȁfiosᓋᓐᓒᓘr;쀀\ud835\udd1b;䎞pf;쀀\ud835\udd4fcr;쀀\ud835\udcb3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻\xdd䃝Āiyᔉᔍrc;䅶;䐫r;쀀\ud835\udd1cpf;쀀\ud835\udd50cr;쀀\ud835\udcb4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidt\xe8૙a;䎖r;愨pf;愤cr;쀀\ud835\udcb5௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻\xe1䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻\xe2䃢te肻\xb4̆;䐰lig耻\xe6䃦Ā;r\xb2ᖺ;쀀\ud835\udd1erave耻\xe0䃠ĀepᗊᗖĀfpᗏᗔsym;愵\xe8ᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e\xbbᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢\xbb\xb9arr;捼Āgpᙣᙧon;䄅f;쀀\ud835\udd52΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒ\xf1ᚃing耻\xe5䃥ƀctyᚡᚦᚨr;쀀\ud835\udcb6;䀪mpĀ;e዁ᚯ\xf1ʈilde耻\xe3䃣ml耻\xe4䃤Āciᛂᛈonin\xf4ɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e\xbbᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰s\xe9ᜌno\xf5ēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀\ud835\udd1fg΀costuvwឍឝឳេ៕៛៞ƀaiuបពរ\xf0ݠrc;旯p\xbb፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄e\xe5ᑄ\xe5ᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\ud835\udd53Ā;tᏋᡣom\xbbᏌtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻\xa6䂦Ȁceioᥑᥖᥚᥠr;쀀\ud835\udcb7mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t\xbb᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁\xeeړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻\xe7䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻\xb8ƭptyv;榲t脀\xa2;eᨭᨮ䂢r\xe4Ʋr;쀀\ud835\udd20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark\xbbᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟\xbbཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it\xbb᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;q\xc7\xc6ɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁\xeeᅠeĀmx᫱᫶ent\xbb᫩e\xf3ɍǧ᫾\0ᬇĀ;dኻᬂot;橭n\xf4Ɇƀfryᬐᬔᬗ;쀀\ud835\udd54o\xe4ɔ脀\xa9;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\ud835\udcb8Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒre\xe3᭳u\xe3᭵ee;拎edge;拏en耻\xa4䂤earrowĀlrᯮ᯳eft\xbbᮀight\xbbᮽe\xe4ᯝĀciᰁᰇonin\xf4Ƿnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍r\xf2΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸\xf2ᄳhĀ;vᱚᱛ怐\xbbऊūᱡᱧarow;椏a\xe3̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻\xb0䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\ud835\udd21arĀlrᲳᲵ\xbbࣜ\xbbသʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀\xf7;o᳧ᳰntimes;拇n\xf8᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\ud835\udd55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedg\xe5\xfanƀadhᄮᵝᵧownarrow\xf3ᲃarpoonĀlrᵲᵶef\xf4Ჴigh\xf4ᲶŢᵿᶅkaro\xf7གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\ud835\udcb9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃r\xf2Щa\xf2ྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴo\xf4ᲉĀcsḎḔute耻\xe9䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻\xea䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\ud835\udd22ƀ;rsṐṑṗ檚ave耻\xe8䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et\xbbẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\ud835\udd56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on\xbbớ;䏵ȀcsuvỪỳἋἣĀioữḱrc\xbbḮɩỹ\0\0ỻ\xedՈantĀglἂἆtr\xbbṝess\xbbṺƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯o\xf4͒ĀahὉὋ;䎷耻\xf0䃰Āmrὓὗl耻\xeb䃫o;悬ƀcipὡὤὧl;䀡s\xf4ծĀeoὬὴctatio\xeeՙnential\xe5չৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotse\xf1Ṅy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀\ud835\udd23lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀\ud835\udd57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻\xbd䂽;慓耻\xbc䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻\xbe䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\ud835\udcbbࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lan\xf4٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\ud835\udd24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox\xbbℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\ud835\udd58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎pro\xf8₞r;楸qĀlqؿ↖les\xf3₈i\xed٫Āen↣↭rtneqq;쀀≩︀\xc5↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽r\xf2ΠȀilmr⇐⇔⇗⇛rs\xf0ᒄf\xbb․il\xf4کĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it\xbb∊lip;怦con;抹r;쀀\ud835\udd25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\ud835\udd59bar;怕ƀclt≯≴≸r;쀀\ud835\udcbdas\xe8⇴rok;䄧Ābp⊂⊇ull;恃hen\xbbᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻\xed䃭ƀ;iyݱ⊰⊵rc耻\xee䃮;䐸Ācx⊼⊿y;䐵cl耻\xa1䂡ĀfrΟ⋉;쀀\ud835\udd26rave耻\xec䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓in\xe5ގar\xf4ܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝do\xf4⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙er\xf3ᕣ\xe3⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\ud835\udd5aa;䎹uest耻\xbf䂿Āci⎊⎏r;쀀\ud835\udcbenʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻\xef䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\ud835\udd27ath;䈷pf;쀀\ud835\udd5bǣ⏬\0⏱r;쀀\ud835\udcbfrcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\ud835\udd28reen;䄸cy;䑅cy;䑜pf;쀀\ud835\udd5ccr;쀀\ud835\udcc0஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼r\xf2৆\xf2Εail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴ra\xeeࡌbda;䎻gƀ;dlࢎⓁⓃ;榑\xe5ࢎ;檅uo耻\xab䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝\xeb≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼\xecࢰ\xe2┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□a\xe9⓶arpoonĀdu▯▴own\xbbњp\xbb०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoon\xf3྘quigarro\xf7⇰hreetimes;拋ƀ;qs▋ও◺lan\xf4বʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋ppro\xf8Ⓠot;拖qĀgq♃♅\xf4উgt\xf2⒌\xf4ছi\xedলƀilr♕࣡♚sht;楼;쀀\ud835\udd29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖r\xf2◁orne\xf2ᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che\xbb⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox\xbb⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽r\xebࣁgƀlmr⛿✍✔eftĀar০✇ight\xe1৲apsto;柼ight\xe1৽parrowĀlr✥✩ef\xf4⓭ight;憬ƀafl✶✹✽r;榅;쀀\ud835\udd5dus;樭imes;樴š❋❏st;戗\xe1ፎƀ;ef❗❘᠀旊nge\xbb❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇r\xf2ࢨorne\xf2ᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\ud835\udcc1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹re\xe5◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀\xc5⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻\xaf䂯Āet⡗⡙;時Ā;e⡞⡟朠se\xbb⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻ow\xeeҌef\xf4ए\xf0Ꮡker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle\xbbᘦr;쀀\ud835\udd2ao;愧ƀcdn⢯⢴⣉ro耻\xb5䂵Ȁ;acdᑤ⢽⣀⣄s\xf4ᚧir;櫰ot肻\xb7Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛\xf2−\xf0ઁĀdp⣩⣮els;抧f;쀀\ud835\udd5eĀct⣸⣽r;쀀\ud835\udcc2pos\xbbᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la\xbb˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉ro\xf8඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xa0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸ui\xf6ୣĀei⩊⩎ar;椨\xed஘istĀ;s஠டr;쀀\ud835\udd2bȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lan\xf4௢i\xed௪Ā;rஶ⪁\xbbஷƀAap⪊⪍⪑r\xf2⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹r\xf2⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro\xf7⫁ightarro\xf7⪐ƀ;qs఻⪺⫪lan\xf4ౕĀ;sౕ⫴\xbbశi\xedౝĀ;rవ⫾iĀ;eచథi\xe4ඐĀpt⬌⬑f;쀀\ud835\udd5f膀\xac;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lle\xec୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳u\xe5ಥĀ;cಘ⭸Ā;eಒ⭽\xf1ಘȀAait⮈⮋⮝⮧r\xf2⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow\xbb⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉u\xe5൅;쀀\ud835\udcc3ortɭ⬅\0\0⯖ar\xe1⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭\xe5೸\xe5ഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗ\xf1സȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇ\xecௗlde耻\xf1䃱\xe7ృiangleĀlrⱒⱜeftĀ;eచⱚ\xf1దightĀ;eೋⱥ\xf1೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻\xf3䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻\xf4䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀\ud835\udd2cͯ⵹\0\0⵼\0ⶂn;䋛ave耻\xf2䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨr\xf2᪀Āir⶝ⶠr;榾oss;榻n\xe5๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\ud835\udd60ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨r\xf2᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f\xbbⷿ耻\xaa䂪耻\xba䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧\xf2⸁ash耻\xf8䃸l;折iŬⸯ⸴de耻\xf5䃵esĀ;aǛ⸺s;樶ml耻\xf6䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀\xb6;l⹭⹮䂶le\xecЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\ud835\udd2dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕ma\xf4੶ne;明ƀ;tv⺿⻀⻈䏀chfork\xbb´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎\xf6⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻\xb1ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\ud835\udd61nd耻\xa3䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷u\xe5໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾ppro\xf8⽃urlye\xf1໙\xf1໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨i\xedໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺\xf0⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴\xef໻rel;抰Āci⿀⿅r;쀀\ud835\udcc5;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀\ud835\udd2epf;쀀\ud835\udd62rime;恗cr;쀀\ud835\udcc6ƀaeo⿸〉〓tĀei⿾々rnion\xf3ڰnt;樖stĀ;e【】䀿\xf1Ἑ\xf4༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがr\xf2Ⴓ\xf2ϝail;検ar\xf2ᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕i\xe3ᅮmptyv;榳gȀ;del࿑らるろ;榒;榥\xe5࿑uo耻\xbb䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞\xeb≝\xf0✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶al\xf3༞ƀabrョリヮr\xf2៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗\xec࿲\xe2ヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜn\xe5Ⴛar\xf4ྩt;断ƀilrㅩဣㅮsht;楽;쀀\ud835\udd2fĀaoㅷㆆrĀduㅽㅿ\xbbѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭa\xe9トarpoonĀduㆻㆿow\xeeㅾp\xbb႒eftĀah㇊㇐rrow\xf3࿪arpoon\xf3Ցightarrows;應quigarro\xf7ニhreetimes;拌g;䋚ingdotse\xf1ἲƀahm㈍㈐㈓r\xf2࿪a\xf2Ց;怏oustĀ;a㈞㈟掱che\xbb㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾r\xebဃƀafl㉇㉊㉎r;榆;쀀\ud835\udd63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒ar\xf2㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\ud835\udcc7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠re\xe5ㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛qu\xef➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡u\xe5ᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓i\xedሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒\xeb∨Ā;oਸ਼਴t耻\xa7䂧i;䀻war;椩mĀin㍩\xf0nu\xf3\xf1t;朶rĀ;o㍶⁕쀀\ud835\udd30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜i\xe4ᑤara\xec⹯耻\xad䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲ar\xf2ᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetm\xe9㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\ud835\udd64aĀdr㑍ЂesĀ;u㑔㑕晠it\xbb㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍\xf1ᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝\xf1ᆮƀ;afᅻ㒦ְrť㒫ֱ\xbbᅼar\xf2ᅈȀcemt㒹㒾㓂㓅r;쀀\ud835\udcc8tm\xee\xf1i\xec㐕ar\xe6ᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psilo\xeeỠh\xe9⺯s\xbb⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦ppro\xf8㋺urlye\xf1ᇾ\xf1ᇳƀaes㖂㖈㌛ppro\xf8㌚q\xf1㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻\xb9䂹耻\xb2䂲耻\xb3䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨\xeb∮Ā;oਫ਩war;椪lig耻\xdf䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄r\xeb๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\ud835\udd31Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮ppro\xf8዁im\xbbኬs\xf0ኞĀas㚺㚮\xf0዁rn耻\xfe䃾Ǭ̟㛆⋧es膀\xd7;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀\xe1⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\ud835\udd65rk;櫚\xe1㍢rime;怴ƀaip㜏㜒㝤d\xe5ቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own\xbbᶻeftĀ;e⠀㜾\xf1म;扜ightĀ;e㊪㝋\xf1ၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\ud835\udcc9;䑆cy;䑛rok;䅧Āio㞋㞎x\xf4᝷headĀlr㞗㞠eftarro\xf7ࡏightarrow\xbbཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶r\xf2ϭar;楣Ācr㟜㟢ute耻\xfa䃺\xf2ᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻\xfb䃻;䑃ƀabh㠃㠆㠋r\xf2Ꭽlac;䅱a\xf2ᏃĀir㠓㠘sht;楾;쀀\ud835\udd32rave耻\xf9䃹š㠧㠱rĀlr㠬㠮\xbbॗ\xbbႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r\xbb㡆op;挏ri;旸Āal㡖㡚cr;䅫肻\xa8͉Āgp㡢㡦on;䅳f;쀀\ud835\udd66̀adhlsuᅋ㡸㡽፲㢑㢠own\xe1ᎳarpoonĀlr㢈㢌ef\xf4㠭igh\xf4㠯iƀ;hl㢙㢚㢜䏅\xbbᏺon\xbb㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r\xbb㢽op;挎ng;䅯ri;旹cr;쀀\ud835\udccaƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨\xbb᠓Āam㣯㣲r\xf2㢨l耻\xfc䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠r\xf2ϷarĀ;v㤦㤧櫨;櫩as\xe8ϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖app\xe1␕othin\xe7ẖƀhir㓫⻈㥙op\xf4⾵Ā;hᎷ㥢\xefㆍĀiu㥩㥭gm\xe1㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟et\xe1㚜iangleĀlr㦪㦯eft\xbbथight\xbbၑy;䐲ash\xbbံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨa\xf2ᑩr;쀀\ud835\udd33tr\xe9㦮suĀbp㧯㧱\xbbജ\xbb൙pf;쀀\ud835\udd67ro\xf0໻tr\xe9㦴Ācu㨆㨋r;쀀\ud835\udccbĀbp㨐㨘nĀEe㦀㨖\xbb㥾nĀEe㦒㨞\xbb㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\ud835\udd34pf;쀀\ud835\udd68Ā;eᑹ㩦at\xe8ᑹcr;쀀\ud835\udcccૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tr\xe9៑r;쀀\ud835\udd35ĀAa㪔㪗r\xf2σr\xf2৶;䎾ĀAa㪡㪤r\xf2θr\xf2৫a\xf0✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\ud835\udd69im\xe5ឲĀAa㫇㫊r\xf2ώr\xf2ਁĀcq㫒ីr;쀀\ud835\udccdĀpt៖㫜r\xe9។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻\xfd䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻\xa5䂥r;쀀\ud835\udd36cy;䑗pf;쀀\ud835\udd6acr;쀀\ud835\udcceĀcm㬦㬩y;䑎l耻\xff䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡tr\xe6ᕟa;䎶r;쀀\ud835\udd37cy;䐶grarr;懝pf;쀀\ud835\udd6bcr;쀀\ud835\udccfĀjn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}))},22060:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq \x15\x18\x1bɭ\x0f\0\0\x12p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))},94021:function(e,t){"use strict";function r(e){for(var t=1;t{if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},94470:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f0&&o.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,a,!0)}!this.isVoidElement(e)&&(this.stack.push(e),m.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){this.endIndex=t;var r,n,i,o,a,s,l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(m.has(l)||g.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(o=(i=this.cbs).onopentag)||void 0===o||o.call(i,"br",{},!0),null===(s=(a=this.cbs).onclosetag)||void 0===s||s.call(a,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c){if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c}else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===a.QuoteType.Double?'"':e===a.QuoteType.Single?"'":e===a.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(v),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,o,a;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(a=(o=this.cbs).oncommentend)||void 0===a||a.call(o),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){this.endIndex=t;var n,i,o,a,s,l,c,u,d,f,p=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(a=(o=this.cbs).ontext)||void 0===a||a.call(o,p),null===(l=(s=this.cbs).oncdataend)||void 0===l||l.call(s)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(p,"]]")),null===(f=(d=this.cbs).oncommentend)||void 0===f||f.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;if(this.ended){null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},e.prototype.end=function(e){var t,r;if(this.ended){null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex=a.Zero&&e<=a.Nine}(n=a||(a={}))[n.Tab=9]="Tab",n[n.NewLine=10]="NewLine",n[n.FormFeed=12]="FormFeed",n[n.CarriageReturn=13]="CarriageReturn",n[n.Space=32]="Space",n[n.ExclamationMark=33]="ExclamationMark",n[n.Number=35]="Number",n[n.Amp=38]="Amp",n[n.SingleQuote=39]="SingleQuote",n[n.DoubleQuote=34]="DoubleQuote",n[n.Dash=45]="Dash",n[n.Slash=47]="Slash",n[n.Zero=48]="Zero",n[n.Nine=57]="Nine",n[n.Semi=59]="Semi",n[n.Lt=60]="Lt",n[n.Eq=61]="Eq",n[n.Gt=62]="Gt",n[n.Questionmark=63]="Questionmark",n[n.UpperA=65]="UpperA",n[n.LowerA=97]="LowerA",n[n.UpperF=70]="UpperF",n[n.LowerF=102]="LowerF",n[n.UpperZ=90]="UpperZ",n[n.LowerZ=122]="LowerZ",n[n.LowerX=120]="LowerX",n[n.OpeningSquareBracket=91]="OpeningSquareBracket",(i=s||(s={}))[i.Text=1]="Text",i[i.BeforeTagName=2]="BeforeTagName",i[i.InTagName=3]="InTagName",i[i.InSelfClosingTag=4]="InSelfClosingTag",i[i.BeforeClosingTagName=5]="BeforeClosingTagName",i[i.InClosingTagName=6]="InClosingTagName",i[i.AfterClosingTagName=7]="AfterClosingTagName",i[i.BeforeAttributeName=8]="BeforeAttributeName",i[i.InAttributeName=9]="InAttributeName",i[i.AfterAttributeName=10]="AfterAttributeName",i[i.BeforeAttributeValue=11]="BeforeAttributeValue",i[i.InAttributeValueDq=12]="InAttributeValueDq",i[i.InAttributeValueSq=13]="InAttributeValueSq",i[i.InAttributeValueNq=14]="InAttributeValueNq",i[i.BeforeDeclaration=15]="BeforeDeclaration",i[i.InDeclaration=16]="InDeclaration",i[i.InProcessingInstruction=17]="InProcessingInstruction",i[i.BeforeComment=18]="BeforeComment",i[i.CDATASequence=19]="CDATASequence",i[i.InSpecialComment=20]="InSpecialComment",i[i.InCommentLike=21]="InCommentLike",i[i.BeforeSpecialS=22]="BeforeSpecialS",i[i.SpecialStartSequence=23]="SpecialStartSequence",i[i.InSpecialTag=24]="InSpecialTag",i[i.BeforeEntity=25]="BeforeEntity",i[i.BeforeNumericEntity=26]="BeforeNumericEntity",i[i.InNamedEntity=27]="InNamedEntity",i[i.InNumericEntity=28]="InNumericEntity",i[i.InHexEntity=29]="InHexEntity",(o=l=t.QuoteType||(t.QuoteType={}))[o.NoValue=0]="NoValue",o[o.Unquoted=1]="Unquoted",o[o.Single=2]="Single",o[o.Double=3]="Double";var p={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,i=e.decodeEntities;this.cbs=t,this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=void 0===i||i,this.entityTrie=n?c.xmlDecodeTree:c.htmlDecodeTree}return e.prototype.reset=function(){this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=s.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===a.Amp&&(this.state=s.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?d(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.isSpecial=!1;this.sequenceIndex=0,this.state=s.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===a.Gt||u(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=a.LowerA&&e<=a.LowerZ||e>=a.UpperA&&e<=a.UpperZ},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=s.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===a.ExclamationMark)this.state=s.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===a.Questionmark)this.state=s.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==p.TitleEnd[2]?this.state=this.xmlMode||t!==p.ScriptEnd[2]?s.InTagName:s.BeforeSpecialS:this.startSpecial(p.TitleEnd,3)}else e===a.Slash?this.state=s.BeforeClosingTagName:(this.state=s.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){d(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){u(e)||(e===a.Gt?this.state=s.Text:(this.state=this.isTagStartChar(e)?s.InClosingTagName:s.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===a.Gt||u(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===a.Gt||this.fastForwardTo(a.Gt))&&(this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===a.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=s.InSpecialTag,this.sequenceIndex=0):this.state=s.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===a.Slash?this.state=s.InSelfClosingTag:u(e)||(this.state=s.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===a.Gt?(this.cbs.onselfclosingtag(this.index),this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1,this.isSpecial=!1):u(e)||(this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===a.Eq||d(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===a.Eq?this.state=s.BeforeAttributeValue:e===a.Slash||e===a.Gt?(this.cbs.onattribend(l.NoValue,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(e)):u(e)||(this.cbs.onattribend(l.NoValue,this.index),this.state=s.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===a.DoubleQuote?(this.state=s.InAttributeValueDq,this.sectionStart=this.index+1):e===a.SingleQuote?(this.state=s.InAttributeValueSq,this.sectionStart=this.index+1):u(e)||(this.sectionStart=this.index,this.state=s.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===a.DoubleQuote?l.Double:l.Single,this.index),this.state=s.BeforeAttributeName):this.decodeEntities&&e===a.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,a.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,a.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){u(e)||e===a.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(l.Unquoted,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===a.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===a.OpeningSquareBracket?(this.state=s.CDATASequence,this.sequenceIndex=0):this.state=e===a.Dash?s.BeforeComment:s.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===a.Dash?(this.state=s.InCommentLike,this.currentSequence=p.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=s.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===a.Gt||this.fastForwardTo(a.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=s.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===p.ScriptEnd[3]?this.startSpecial(p.ScriptEnd,4):t===p.StyleEnd[3]?this.startSpecial(p.StyleEnd,4):(this.state=s.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===a.Number?this.state=s.BeforeNumericEntity:e===a.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=s.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,c.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&c.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===a.Semi){var n=this.index-this.entityExcess+1;n>this.sectionStart&&this.emitPartial(this.sectionStart,n),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&c.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~c.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===a.LowerX?(this.entityExcess++,this.state=s.InHexEntity):(this.state=s.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===s.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,c.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===a.Semi?this.emitNumericEntity(!0):f(e)?(this.entityResult=10*this.entityResult+(e-a.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===a.Semi?this.emitNumericEntity(!0):f(e)?(this.entityResult=16*this.entityResult+(e-a.Zero),this.entityExcess++):e>=a.UpperA&&e<=a.UpperF||e>=a.LowerA&&e<=a.LowerF?(this.entityResult=16*this.entityResult+((32|e)-a.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===s.Text||this.baseState===s.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===s.Text||this.state===s.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===s.InAttributeValueDq||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,n)||this;return o.name=t,o.attribs=r,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}})},enumerable:!1,configurable:!0}),t}(f);function g(e){return(0,a.isTag)(e)}function v(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function x(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function S(e,t){if(void 0===t&&(t=!1),y(e))r=new c(e.data);else if(b(e))r=new u(e.data);else if(g(e)){var r,n=t?k(e.children):[],i=new m(e.name,o({},e.attribs),n);n.forEach(function(e){return e.parent=i}),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),r=i}else if(v(e)){var n=t?k(e.children):[],a=new p(n);n.forEach(function(e){return e.parent=a}),r=a}else if(w(e)){var n=t?k(e.children):[],s=new h(n);n.forEach(function(e){return e.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else if(x(e)){var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}else throw Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function k(e){for(var t=e.map(function(e){return S(e,!0)}),r=1;r>1,u=-7,d=r?i-1:0,f=r?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?5960464477539062e-23:0,p=n?0:o-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=h,s/=256,i-=8);for(a=a<0;e[r+p]=255&a,p+=h,a/=256,c-=8);e[r+p-h]|=128*m}},26057:function(e,t){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},65155:function(e,t,r){"use strict";r.d(t,{Bu:function(){return eD},Ei:function(){return ex},YM:function(){return eS},mc:function(){return eN},sE:function(){return eM},wS:function(){return e_},zR:function(){return eR}});let n=(e,t)=>{for(let r in t)e[r]=t[r];return e},i="numeric",o="ascii",a="alpha",s="asciinumeric",l="alphanumeric",c="domain",u="emoji",d="whitespace";function f(e,t,r){for(let n in t[i]&&(t[s]=!0,t[l]=!0),t[o]&&(t[s]=!0,t[a]=!0),t[s]&&(t[l]=!0),t[a]&&(t[l]=!0),t[l]&&(t[c]=!0),t[u]&&(t[c]=!0),t){let t=(n in r||(r[n]=[]),r[n]);0>t.indexOf(e)&&t.push(e)}}function p(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}p.groups={},p.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t=0&&(r[n]=!0);return r}(o.t,i),r),i):r&&f(t,r,i)),o.t=t),this.j[e]=o,o}};let h=(e,t,r,n,i)=>e.ta(t,r,n,i),m=(e,t,r,n,i)=>e.tr(t,r,n,i),g=(e,t,r,n,i)=>e.ts(t,r,n,i),v=(e,t,r,n,i)=>e.tt(t,r,n,i),y="WORD",b="UWORD",x="LOCALHOST",w="UTLD",S="SCHEME",k="SLASH_SCHEME",j="OPENBRACE",E="CLOSEBRACE",O="OPENBRACKET",C="CLOSEBRACKET",I="OPENPAREN",P="CLOSEPAREN",A="OPENANGLEBRACKET",T="CLOSEANGLEBRACKET",z="FULLWIDTHLEFTPAREN",N="FULLWIDTHRIGHTPAREN",R="LEFTCORNERBRACKET",_="RIGHTCORNERBRACKET",M="LEFTWHITECORNERBRACKET",D="RIGHTWHITECORNERBRACKET",L="FULLWIDTHLESSTHAN",F="FULLWIDTHGREATERTHAN",U="AMPERSAND",B="APOSTROPHE",H="ASTERISK",Z="BACKSLASH",W="BACKTICK",V="CARET",$="COLON",q="COMMA",G="DOLLAR",K="EQUALS",X="EXCLAMATION",J="HYPHEN",Y="PERCENT",Q="PIPE",ee="PLUS",et="POUND",er="QUERY",en="QUOTE",ei="SEMI",eo="SLASH",ea="TILDE",es="UNDERSCORE",el="EMOJI";var ec=Object.freeze({__proto__:null,WORD:y,UWORD:b,LOCALHOST:x,TLD:"TLD",UTLD:w,SCHEME:S,SLASH_SCHEME:k,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:j,CLOSEBRACE:E,OPENBRACKET:O,CLOSEBRACKET:C,OPENPAREN:I,CLOSEPAREN:P,OPENANGLEBRACKET:A,CLOSEANGLEBRACKET:T,FULLWIDTHLEFTPAREN:z,FULLWIDTHRIGHTPAREN:N,LEFTCORNERBRACKET:R,RIGHTCORNERBRACKET:_,LEFTWHITECORNERBRACKET:M,RIGHTWHITECORNERBRACKET:D,FULLWIDTHLESSTHAN:L,FULLWIDTHGREATERTHAN:F,AMPERSAND:U,APOSTROPHE:B,ASTERISK:H,AT:"AT",BACKSLASH:Z,BACKTICK:W,CARET:V,COLON:$,COMMA:q,DOLLAR:G,DOT:"DOT",EQUALS:K,EXCLAMATION:X,HYPHEN:J,PERCENT:Y,PIPE:Q,PLUS:ee,POUND:et,QUERY:er,QUOTE:en,SEMI:ei,SLASH:eo,TILDE:ea,UNDERSCORE:es,EMOJI:el,SYM:"SYM"});let eu=/[a-z]/,ed=/\p{L}/u,ef=/\p{Emoji}/u,ep=/\d/,eh=/\s/,em=null,eg=null;function ev(e,t,r,n,i){let o;let a=t.length;for(let r=0;r=0;)i++;if(i>0){t.push(r.join(""));for(let t=parseInt(e.substring(n,n+i),10);t>0;t--)r.pop();n+=i}else r.push(e[n]),n++}return t}let eb={defaultProtocol:"http",events:null,format:ew,formatHref:ew,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ex(e,t){void 0===t&&(t=null);let r=n({},eb);e&&(r=n(r,e instanceof ex?e.o:e));let i=r.ignoreTags,o=[];for(let e=0;ee,check(e){return this.get("validate",e.toString(),e)},get(e,t,r){let n=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=r.t in i?i[r.t]:eb[e])&&n&&(i=i(t,r)):"function"==typeof i&&n&&(i=i(t,r.t,r))),i},getObj(e,t,r){let n=this.o[e];return"function"==typeof n&&null!=t&&(n=n(t,r.t,r)),n},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};var eS=Object.freeze({__proto__:null,defaults:eb,Options:ex,assign:n});function ek(e,t){this.t="token",this.v=e,this.tk=t}function ej(e,t){class r extends ek{constructor(t,r){super(t,r),this.t=e}}for(let e in t)r.prototype[e]=t[e];return r.t=e,r}ek.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e=eb.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",t,this),i=e.get("tagName",t,this),o=this.toFormattedString(e),a={},s=e.get("className",t,this),l=e.get("target",t,this),c=e.get("rel",t,this),u=e.getObj("attributes",t,this),d=e.getObj("events",t,this);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&n(a,u),{tagName:i,attributes:a,content:o,eventListeners:d}}};let eE=ej("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eO=ej("text"),eC=ej("nl"),eI=ej("url",{isLink:!0,toHref(e){return void 0===e&&(e=eb.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==x&&e[1].t===$}}),eP=e=>new p(e);function eA(e,t,r){let n=r[0].s,i=r[r.length-1].e;return new e(t.slice(n,i),r)}let eT="undefined"!=typeof console&&console&&console.warn||(()=>{}),ez={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eN(){p.groups={},ez.scanner=null,ez.parser=null,ez.tokenQueue=[],ez.pluginQueue=[],ez.customSchemes=[],ez.initialized=!1}function eR(e,t){if(void 0===t&&(t=!1),ez.initialized&&eT(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format. +1. Must only contain digits, lowercase ASCII letters or "-" +2. Cannot start or end with "-" +3. "-" cannot repeat`);ez.customSchemes.push([e,t])}function e_(e){return ez.initialized||function(){ez.scanner=function(e){void 0===e&&(e=[]);let t={};p.groups=t;let r=new p;null==em&&(em=ey("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==eg&&(eg=ey("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2")),v(r,"'",B),v(r,"{",j),v(r,"}",E),v(r,"[",O),v(r,"]",C),v(r,"(",I),v(r,")",P),v(r,"<",A),v(r,">",T),v(r,"(",z),v(r,")",N),v(r,"「",R),v(r,"」",_),v(r,"『",M),v(r,"』",D),v(r,"<",L),v(r,">",F),v(r,"&",U),v(r,"*",H),v(r,"@","AT"),v(r,"`",W),v(r,"^",V),v(r,":",$),v(r,",",q),v(r,"$",G),v(r,".","DOT"),v(r,"=",K),v(r,"!",X),v(r,"-",J),v(r,"%",Y),v(r,"|",Q),v(r,"+",ee),v(r,"#",et),v(r,"?",er),v(r,'"',en),v(r,"/",eo),v(r,";",ei),v(r,"~",ea),v(r,"_",es),v(r,"\\",Z);let l=m(r,ep,"NUM",{[i]:!0});m(l,ep,l);let h=m(r,eu,y,{[o]:!0});m(h,eu,h);let eb=m(r,ed,b,{[a]:!0});m(eb,eu),m(eb,ed,eb);let ex=m(r,eh,"WS",{[d]:!0});v(r,"\n","NL",{[d]:!0}),v(ex,"\n"),m(ex,eh,ex);let ew=m(r,ef,el,{[u]:!0});m(ew,ef,ew),v(ew,"️",ew),m(v(ew,"‍"),ef,ew);let eS=[[eu,h]],ek=[[eu,null],[ed,eb]];for(let e=0;ee[0]>t[0]?1:-1);for(let t=0;t=0?a[c]=!0:eu.test(n)?ep.test(n)?a[s]=!0:a[o]=!0:a[i]=!0,g(r,n,n,a)}return g(r,"localhost",x,{ascii:!0}),r.jd=new p("SYM"),{start:r,tokens:n({groups:t},ec)}}(ez.customSchemes);for(let e=0;e=0&&f++,i++,u++;if(f<0)(i-=u)0&&(o.push(eA(eO,t,a)),a=[]),i-=f,u-=f;let e=d.t,n=r.slice(i-u,i);o.push(eA(e,t,n))}}return a.length>0&&o.push(eA(eO,t,a)),o}(ez.parser.start,e,function(e,t){let r=function(e){let t=[],r=e.length,n=0;for(;n56319||n+1===r||(i=e.charCodeAt(n+1))<56320||i>57343?e[n]:e.slice(n,n+2);t.push(a),n+=a.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),n=r.length,i=[],o=0,a=0;for(;a=0&&(d+=r[a].length,f++),c+=r[a].length,o+=r[a].length,a++;o-=d,a-=f,c-=d,i.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}(ez.scanner.start,e))}function eM(e,t,r){if(void 0===t&&(t=null),void 0===r&&(r=null),t&&"object"==typeof t){if(r)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);r=t,t=null}let n=new ex(r),i=e_(e),o=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var r=function(r){if(r.key===e){var n,i=JSON.parse(null!==(n=r.newValue)&&void 0!==n?n:"{}");(null==i?void 0:i.event)==="session"&&null!=i&&i.data&&t(i)}};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}},post:function(t){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(l(l({},t),{},{timestamp:d()})))}catch(e){}}}},t.apiBaseUrl=u,t.fetchData=function(e,t,r){return c.apply(this,arguments)},t.now=d;var i=n(r(64687)),o=n(r(38416)),a=n(r(17156));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t3&&void 0!==g[3]?g[3]:{}).ctx,c=void 0===(s=o.req)?null==a?void 0:a.req:s,d="".concat(u(r),"/").concat(t),e.prev=2,p={headers:l({"Content-Type":"application/json"},null!=c&&null!==(f=c.headers)&&void 0!==f&&f.cookie?{cookie:c.headers.cookie}:{})},null!=c&&c.body&&(p.body=JSON.stringify(c.body),p.method="POST"),e.next=7,fetch(d,p);case 7:return h=e.sent,e.next=10,h.json();case 10:if(m=e.sent,h.ok){e.next=13;break}throw m;case 13:return e.abrupt("return",Object.keys(m).length>0?m:null);case 16:return e.prev=16,e.t0=e.catch(2),n.error("CLIENT_FETCH_ERROR",{error:e.t0,url:d}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function u(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function d(){return Math.floor(Date.now()/1e3)}},36925:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedStrategy=t.UnknownError=t.OAuthCallbackError=t.MissingSecret=t.MissingAuthorize=t.MissingAdapterMethods=t.MissingAdapter=t.MissingAPIRoute=t.InvalidCallbackUrl=t.AccountNotLinkedError=void 0,t.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(r,n){return r[n]=(0,o.default)(i.default.mark(function r(){var o,a,s,l,c,u=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(r.prev=0,a=Array(o=u.length),s=0;s{var r,n;return parseInt(null!==(r=e.split(".").pop())&&void 0!==r?r:"0")-parseInt(null!==(n=t.split(".").pop())&&void 0!==n?n:"0")}).map(e=>(0,i.default)(this,u)[e]).join("")}chunk(e,t){let r=c(this,h,v).call(this);for(let n of c(this,p,g).call(this,{name:(0,i.default)(this,d).name,value:e,options:{...(0,i.default)(this,d).options,...t}}))r[n.name]=n;return Object.values(r)}clean(){return Object.values(c(this,h,v).call(this))}}function g(e){let t=Math.ceil(e.value.length/3933);if(1===t)return(0,i.default)(this,u)[e.name]=e.value,[e];let r=[];for(let n=0;ne.value.length+163)}),r}function v(){let e={};for(let r in(0,i.default)(this,u)){var t;null===(t=(0,i.default)(this,u))||void 0===t||delete t[r],e[r]={name:r,value:"",options:{...(0,i.default)(this,d).options,maxAge:0}}}return e}t.SessionStore=m},82260:function(e,t,r){"use strict";var n=r(83454),i=r(64836);Object.defineProperty(t,"__esModule",{value:!0});var o={encode:!0,decode:!0,getToken:!0};t.decode=p,t.encode=f,t.getToken=h;var a=r(62136),s=i(r(99718)),l=r(29264),c=r(46140),u=r(76444);Object.keys(u).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(o,e))&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});let d=()=>Date.now()/1e3|0;async function f(e){let{token:t={},secret:r,maxAge:n=2592e3,salt:i=""}=e,o=await m(r,i);return await new a.EncryptJWT(t).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime(d()+n).setJti((0,l.v4)()).encrypt(o)}async function p(e){let{token:t,secret:r,salt:n=""}=e;if(!t)return null;let i=await m(r,n),{payload:o}=await (0,a.jwtDecrypt)(t,i,{clockTolerance:15});return o}async function h(e){var t,r,i;let{req:o,secureCookie:a=null!==(t=null===(r=n.env.NEXTAUTH_URL)||void 0===r?void 0:r.startsWith("https://"))&&void 0!==t?t:!!n.env.VERCEL,cookieName:s=a?"__Secure-next-auth.session-token":"next-auth.session-token",raw:l,decode:u=p,logger:d=console,secret:f=n.env.NEXTAUTH_SECRET}=e;if(!o)throw Error("Must pass `req` to JWT getToken()");let h=new c.SessionStore({name:s,options:{secure:a}},{cookies:o.cookies,headers:o.headers},d).value,m=o.headers instanceof Headers?o.headers.get("authorization"):null===(i=o.headers)||void 0===i?void 0:i.authorization;if(h||(null==m?void 0:m.split(" ")[0])!=="Bearer"||(h=decodeURIComponent(m.split(" ")[1])),!h)return null;if(l)return h;try{return await u({token:h,secret:f})}catch(e){return null}}async function m(e,t){return await (0,s.default)("sha256",e,t,`NextAuth.js Generated Encryption Key${t?` (${t})`:""}`,32)}},76444:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29264:function(e,t,r){"use strict";r.r(t),r.d(t,{NIL:function(){return P},parse:function(){return g},stringify:function(){return f},v1:function(){return m},v3:function(){return E},v4:function(){return O},v5:function(){return I},validate:function(){return c},version:function(){return A}});var n,i,o,a=new Uint8Array(16);function s(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}for(var l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,c=function(e){return"string"==typeof e&&l.test(e)},u=[],d=0;d<256;++d)u.push((d+256).toString(16).substr(1));var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!c(r))throw TypeError("Stringified UUID is invalid");return r},p=0,h=0,m=function(e,t,r){var n=t&&r||0,a=t||Array(16),l=(e=e||{}).node||i,c=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==c){var u=e.random||(e.rng||s)();null==l&&(l=i=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==c&&(c=o=(u[6]<<8|u[7])&16383)}var d=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:h+1,g=d-p+(m-h)/1e4;if(g<0&&void 0===e.clockseq&&(c=c+1&16383),(g<0||d>p)&&void 0===e.nsecs&&(m=0),m>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");p=d,h=m,o=c;var v=((268435455&(d+=122192928e5))*1e4+m)%4294967296;a[n++]=v>>>24&255,a[n++]=v>>>16&255,a[n++]=v>>>8&255,a[n++]=255&v;var y=d/4294967296*1e4&268435455;a[n++]=y>>>8&255,a[n++]=255&y,a[n++]=y>>>24&15|16,a[n++]=y>>>16&255,a[n++]=c>>>8|128,a[n++]=255&c;for(var b=0;b<6;++b)a[n+b]=l[b];return t||f(a)},g=function(e){if(!c(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function v(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>9<<4)+14+1}function b(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function x(e,t,r,n,i,o){var a;return b((a=b(b(t,e),b(n,o)))<>>32-i,r)}function w(e,t,r,n,i,o,a){return x(t&r|~t&n,e,t,i,o,a)}function S(e,t,r,n,i,o,a){return x(t&n|r&~n,e,t,i,o,a)}function k(e,t,r,n,i,o,a){return x(t^r^n,e,t,i,o,a)}function j(e,t,r,n,i,o,a){return x(r^(t|~n),e,t,i,o,a)}var E=v("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>32-t}var I=v("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;y=v,v=g,g=C(m,30)>>>0,m=h,h=w}r[0]=r[0]+h>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),P="00000000-0000-0000-0000-000000000000",A=function(e){if(!c(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},33299:function(e,t,r){"use strict";var n,i,o,a,s,l=r(83454),c=r(64836),u=r(18698);Object.defineProperty(t,"__esModule",{value:!0});var d={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};t.SessionContext=void 0,t.SessionProvider=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t,r,n,i,o,a,s=e.children,l=e.basePath,c=e.refetchInterval,u=e.refetchWhenOffline;l&&(O.basePath=l);var d=void 0!==e.session;O._lastSync=d?(0,b.now)():0;var p=g.useState(function(){return d&&(O._session=e.session),e.session}),v=(0,m.default)(p,2),y=v[0],w=v[1],S=g.useState(!d),k=(0,m.default)(S,2),j=k[0],E=k[1];g.useEffect(function(){return O._getSession=(0,h.default)(f.default.mark(function e(){var t,r,n=arguments;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(n.length>0&&void 0!==n[0]?n[0]:{}).event,e.prev=1,!((r="storage"===t)||void 0===O._session)){e.next=10;break}return O._lastSync=(0,b.now)(),e.next=7,A({broadcast:!r});case 7:return O._session=e.sent,w(O._session),e.abrupt("return");case 10:if(!(!t||null===O._session||(0,b.now)()0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;try{if("undefined"==typeof window)return e;var r={},n=function(e){r[e]=function(r,n){l[e](r,n),"error"===e&&(n=s(n)),n.client=!0;var o="".concat(t,"/_log"),c=new URLSearchParams(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(l.debug=function(){}),e.error&&(l.error=e.error),e.warn&&(l.warn=e.warn),e.debug&&(l.debug=e.debug)};var i=n(r(38416)),o=r(36925);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){var t;return e instanceof Error&&!(e instanceof o.UnknownError)?{message:e.message,stack:e.stack,name:e.name}:(null!=e&&e.error&&(e.error=s(e.error),e.message=null!==(t=e.message)&&void 0!==t?t:e.error.message),e)}var l={error:function(e,t){t=s(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};t.default=l},30762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;let r=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let n=new URL(null!==(t=e)&&void 0!==t?t:r),i=("/"===n.pathname?r.pathname:n.pathname).replace(/\/$/,""),o=`${n.origin}${i}`;return{origin:n.origin,host:n.host,path:i,base:o,toString:()=>o}}},7544:function(e,t,r){e.exports=r(52239)},83454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(77663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(98678)}])},66781:function(e,t,r){"use strict";r.d(t,{Kn:function(){return o},Mf:function(){return s},RA:function(){return i},UL:function(){return l},V9:function(){return a},iU:function(){return c},lG:function(){return n}});let n={USER:"user",GENERATION:"generation"},i={V1_5:"v1_5",V2:"v2"},o={STANDARD:"standard",PROFESSIONAL:"professional"},a={V1:"v1",V1_5:"v1_5",V1_6:"v1_6"},s={HAILOU:"hailou"},l={HIGH:"high",NORMAL:"normal",LOW:"low"},c={DEBIT:"debit",CREDIT:"credit"}},56101:function(e,t){"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return d},ACTION_NAVIGATE:function(){return s},ACTION_PREFETCH:function(){return u},ACTION_REFRESH:function(){return a},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return f},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return p}});let a="refresh",s="navigate",l="restore",c="server-patch",u="prefetch",d="fast-refresh",f="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=r||(r={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(o=n||(n={})).fresh="fresh",o.reusable="reusable",o.expired="expired",o.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27670:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return i}});let n=r(51297);function i(e,t,i,o){{let a=r(47969).normalizeLocalePath,s=r(27448).detectDomainLocale,l=t||a(e,i).detectedLocale,c=s(o,void 0,l);if(c){let t="http"+(c.http?"":"s")+"://",r=l===c.defaultLocale?"":"/"+l;return""+t+c.domain+(0,n.normalizePathTrailingSlash)(""+r+e)}return!1}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},26821:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let n=r(10260),i=r(77697),o=r(85893),a=i._(r(67294)),s=n._(r(73935)),l=n._(r(37219)),c=r(21128),u=r(76252),d=r(29146);r(42723);let f=r(54494),p=n._(r(95176)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,r,n,i,o,a){let s=null==e?void 0:e.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==n?void 0:n.current)&&n.current(e)}}))}function g(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}let v=(0,a.forwardRef)((e,t)=>{let{src:r,srcSet:n,sizes:i,height:s,width:l,decoding:c,className:u,style:d,fetchPriority:f,placeholder:p,loading:h,unoptimized:v,fill:y,onLoadRef:b,onLoadingCompleteRef:x,setBlurComplete:w,setShowAltText:S,sizesInput:k,onLoad:j,onError:E,...O}=e;return(0,o.jsx)("img",{...O,...g(f),loading:h,width:l,height:s,decoding:c,"data-nimg":y?"fill":"1",className:u,style:d,sizes:i,srcSet:n,src:r,ref:(0,a.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&m(e,p,b,x,w,v,k))},[r,p,b,x,w,E,v,k,t]),onLoad:e=>{m(e.currentTarget,p,b,x,w,v,k)},onError:e=>{S(!0),"empty"!==p&&w(!0),E&&E(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,n={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...g(r.fetchPriority)};return t&&s.default.preload?(s.default.preload(r.src,n),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...n},"__nimg-"+r.src+r.srcSet+r.sizes)})}let b=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(f.RouterContext),n=(0,a.useContext)(d.ImageConfigContext),i=(0,a.useMemo)(()=>{let e=h||n||u.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r}},[n]),{onLoad:s,onLoadingComplete:l}=e,m=(0,a.useRef)(s);(0,a.useEffect)(()=>{m.current=s},[s]);let g=(0,a.useRef)(l);(0,a.useEffect)(()=>{g.current=l},[l]);let[b,x]=(0,a.useState)(!1),[w,S]=(0,a.useState)(!1),{props:k,meta:j}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:b,showAltText:w});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v,{...k,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:x,setShowAltText:S,sizesInput:e.sizes,ref:t}),j.priority?(0,o.jsx)(y,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24116:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let n=r(10260),i=r(85893),o=n._(r(67294)),a=r(69975),s=r(92712),l=r(28547),c=r(84350),u=r(38109),d=r(54494),f=r(55716),p=r(388),h=r(27670),m=r(6220),g=r(56101),v=new Set;function y(e,t,r,n,i,o){if(o||(0,s.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(v.has(i))return;v.add(i)}(async()=>o?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let x=o.default.forwardRef(function(e,t){let r,n;let{href:l,as:v,children:x,prefetch:w=null,passHref:S,replace:k,shallow:j,scroll:E,locale:O,onClick:C,onMouseEnter:I,onTouchStart:P,legacyBehavior:A=!1,...T}=e;r=x,A&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let z=o.default.useContext(d.RouterContext),N=o.default.useContext(f.AppRouterContext),R=null!=z?z:N,_=!z,M=!1!==w,D=null===w?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:L,as:F}=o.default.useMemo(()=>{if(!z){let e=b(l);return{href:e,as:v?b(v):e}}let[e,t]=(0,a.resolveHref)(z,l,!0);return{href:e,as:v?(0,a.resolveHref)(z,v):t||e}},[z,l,v]),U=o.default.useRef(L),B=o.default.useRef(F);A&&(n=o.default.Children.only(r));let H=A?n&&"object"==typeof n&&n.ref:t,[Z,W,V]=(0,p.useIntersection)({rootMargin:"200px"}),$=o.default.useCallback(e=>{(B.current!==F||U.current!==L)&&(V(),B.current=F,U.current=L),Z(e),H&&("function"==typeof H?H(e):"object"==typeof H&&(H.current=e))},[F,H,L,V,Z]);o.default.useEffect(()=>{R&&W&&M&&y(R,L,F,{locale:O},{kind:D},_)},[F,L,W,O,M,null==z?void 0:z.locale,R,_,D]);let q={ref:$,onClick(e){A||"function"!=typeof C||C(e),A&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),R&&!e.defaultPrevented&&function(e,t,r,n,i,a,l,c,u){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,s.isLocalURL)(r)))return;e.preventDefault();let f=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:c,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};u?o.default.startTransition(f):f()}(e,R,L,F,k,j,E,O,_)},onMouseEnter(e){A||"function"!=typeof I||I(e),A&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),R&&(M||!_)&&y(R,L,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:D},_)},onTouchStart:function(e){A||"function"!=typeof P||P(e),A&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),R&&(M||!_)&&y(R,L,F,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:D},_)}};if((0,c.isAbsoluteUrl)(F))q.href=F;else if(!A||S||"a"===n.type&&!("href"in n.props)){let e=void 0!==O?O:null==z?void 0:z.locale,t=(null==z?void 0:z.isLocaleDomain)&&(0,h.getDomainLocale)(F,e,null==z?void 0:z.locales,null==z?void 0:z.domainLocales);q.href=t||(0,m.addBasePath)((0,u.addLocale)(F,e,null==z?void 0:z.defaultLocale))}return A?o.default.cloneElement(n,q):(0,i.jsx)("a",{...T,...q,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47969:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let n=(e,t)=>r(75934).normalizeLocalePath(e,t);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},388:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(67294),i=r(40460),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,c=l||!o,[u,d]=(0,n.useState)(!1),f=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(c||u)return;let e=f.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:o}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!u){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[c,r,t,u,f.current]),[p,u,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return a}});let n=r(10260);r(85893),r(67294);let i=n._(r(6119));function o(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=i.default,n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let s=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete n.webpack,delete n.modules,a(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},21128:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),r(42723);let n=r(32685),i=r(76252);function o(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var r;let s,l,c,{src:u,sizes:d,unoptimized:f=!1,priority:p=!1,loading:h,className:m,quality:g,width:v,height:y,fill:b=!1,style:x,overrideSrc:w,onLoad:S,onLoadingComplete:k,placeholder:j="empty",blurDataURL:E,fetchPriority:O,layout:C,objectFit:I,objectPosition:P,lazyBoundary:A,lazyRoot:T,...z}=e,{imgConf:N,showAltText:R,blurComplete:_,defaultLoader:M}=t,D=N||i.imageConfigDefault;if("allSizes"in D)s=D;else{let e=[...D.deviceSizes,...D.imageSizes].sort((e,t)=>e-t),t=D.deviceSizes.sort((e,t)=>e-t);s={...D,allSizes:e,deviceSizes:t}}if(void 0===M)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let L=z.loader||M;delete z.loader,delete z.srcSet;let F="__next_img_default"in L;if(F){if("custom"===s.loader)throw Error('Image with src "'+u+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=L;L=t=>{let{config:r,...n}=t;return e(n)}}if(C){"fill"===C&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(x={...x,...e});let t={responsive:"100vw",fill:"100vw"}[C];t&&!d&&(d=t)}let U="",B=a(v),H=a(y);if("object"==typeof(r=u)&&(o(r)||void 0!==r.src)){let e=o(u)?u.default:u;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,c=e.blurHeight,E=E||e.blurDataURL,U=e.src,!b){if(B||H){if(B&&!H){let t=B/e.width;H=Math.round(e.height*t)}else if(!B&&H){let t=H/e.height;B=Math.round(e.width*t)}}else B=e.width,H=e.height}}let Z=!p&&("lazy"===h||void 0===h);(!(u="string"==typeof u?u:U)||u.startsWith("data:")||u.startsWith("blob:"))&&(f=!0,Z=!1),s.unoptimized&&(f=!0),F&&u.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(f=!0),p&&(O="high");let W=a(g),V=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:I,objectPosition:P}:{},R?{}:{color:"transparent"},x),$=_||"empty"===j?null:"blur"===j?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:B,heightInt:H,blurWidth:l,blurHeight:c,blurDataURL:E||"",objectFit:V.objectFit})+'")':'url("'+j+'")',q=$?{backgroundSize:V.objectFit||"cover",backgroundPosition:V.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:$}:{},G=function(e){let{config:t,src:r,unoptimized:n,width:i,quality:o,sizes:a,loader:s}=e;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:l,kind:c}=function(e,t,r){let{deviceSizes:n,allSizes:i}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);n)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=n[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:n,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,a),u=l.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:l.map((e,n)=>s({config:t,src:r,quality:o,width:e})+" "+("w"===c?e:n+1)+c).join(", "),src:s({config:t,src:r,quality:o,width:l[u]})}}({config:s,src:u,unoptimized:f,width:B,quality:W,sizes:d,loader:L});return{props:{...z,loading:Z?"lazy":h,fetchPriority:O,width:B,height:H,decoding:"async",className:m,style:{...V,...q},sizes:G.sizes,srcSet:G.srcSet,src:w||G.src},meta:{unoptimized:f,priority:p,placeholder:j,fill:b}}}},32685:function(e,t){"use strict";function r(e){let{widthInt:t,heightInt:r,blurWidth:n,blurHeight:i,blurDataURL:o,objectFit:a}=e,s=n?40*n:t,l=i?40*i:r,c=s&&l?"viewBox='0 0 "+s+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+c+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(c?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},7e4:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return s}});let n=r(10260),i=r(21128),o=r(26821),a=n._(r(95176));function s(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=o.Image},95176:function(e,t){"use strict";function r(e){let{config:t,src:r,width:n,quality:i}=e;return t.path+"?url="+encodeURIComponent(r)+"&w="+n+"&q="+(i||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),r.__next_img_default=!0;let n=r},16725:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(10260)._(r(67294)).default.createContext(null)},6119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=r(10260)._(r(67294)),i=r(16725),o=[],a=[],s=!1;function l(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function l(){if(!o){let t=new c(e,r);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&a.push(t=>{for(let r of e)if(t.includes(r))return l()})}function u(e,t){!function(){l();let e=n.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let a=n.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:o.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(r.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:o.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return u.preload=()=>l(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(l,e)}function d(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{d(o).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());d(a,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},70652:function(e,t,r){"use strict";r.d(t,{Qy:function(){return c},hs:function(){return p},pq:function(){return f},rk:function(){return d}});var n=r(35818),i=r(67294),o=r(524),a=r(17578),s=r(15131);let l={image:".jpeg",video:".mp4",audio:".mp3"};function c(e){var t;let{name:r,type:i,anim:a,transcode:s,width:c,height:u,original:d,fit:f,blur:p,quality:h,gravity:m,metadata:g,background:v,gamma:y,optimized:b,skip:x}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e.startsWith("http")||e.startsWith("blob"))return e;c||u||void 0!==d||(d=!0),d&&(c=void 0,u=void 0),c&&c>1800&&(c=1800),u&&u>1e3&&(u=1e3);let w=Object.entries({anim:a?void 0:a,transcode:!!s||void 0,width:null!=c?c:void 0,height:null!=u?u:void 0,original:d,fit:f,blur:p,quality:h,gravity:m,metadata:g,background:v,gamma:y,optimized:b,skip:x}).filter(e=>{let[,t]=e;return void 0!==t}).map(e=>{let[t,r]=e;return"".concat(t,"=").concat(r)}).join(","),S=l[null!=i?i:n.DD.image];return(r=(null!==(t=null!=r?r:e)&&void 0!==t?t:"").replaceAll("%","")).includes(".")?r=r.split(".").slice(0,-1).join(".")+S:r+=S,[o.O.NEXT_PUBLIC_IMAGE_LOCATION,e,w.toString(),r].filter(Boolean).join("/")}let u=[".gif",".mp4",".webm"];function d(e,t){var r;return null!==(r=null==t?void 0:t.type)&&void 0!==r?r:u.some(r=>{var n;return null===(n=(null==t?void 0:t.name)||e)||void 0===n?void 0:n.endsWith(r)})?"video":"image"}function f(e,t){var r,n;let i=(0,a.xJ)(),o=d(e,t),s=null!==(n=null==t?void 0:t.type)&&void 0!==n?n:o;if(!e||e.startsWith("http")||e.startsWith("blob"))return{url:e,type:o};let{anim:l,transcode:u}=null!=t?t:{};"video"===o&&"image"===s?(u=!0,l=!1):"video"===s&&(u=!0,l=null==l||l),l||(s="image");let f=(null==i?void 0:null===(r=i.filePreferences)||void 0===r?void 0:r.imageFormat)==="optimized";return{url:c(e,{...t,anim:l,transcode:u,type:s,optimized:!!f||void 0}),type:s}}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,s.s7)(e=>e.autoplayGifs);return t.anim||r||(t.anim=!1),(0,i.useMemo)(()=>e?c(e,t):void 0,[r,e])}},34324:function(e,t,r){"use strict";r.d(t,{y:function(){return S},C:function(){return j}});var n=r(85893),i=r(71232),o=r(97564),a=r(95117),s=r(21017),l=r(19236),c=r(54777),u=r(9094),d=r(20966),f=r(67841);r(67294);var p=r(36777);r(40382),r(39755),r(72456),r(86664),r(524);var h=r(25291);r(11163);var m=r(1604),g=r(91587),v=r(80687),y=r(2815),b=r(35818),x=r(72746),w=r(17578);let S=e=>{var t,r,s,l;let{paymentMethod:c,children:u}=e,{type:d}=c,f={position:"apart"};switch(d){case"card":return(0,n.jsxs)(i.Z,{...f,children:[(0,n.jsxs)(o.K,{spacing:0,children:[(0,n.jsx)(a.x,{size:"xs",color:"dimmed",children:"Card"}),(0,n.jsxs)(a.x,{size:"sm",children:[(0,n.jsx)(a.x,{component:"span",weight:"bold",transform:"capitalize",children:null===(t=c.card)||void 0===t?void 0:t.brand})," ","ending in"," ",(0,n.jsx)(a.x,{component:"span",weight:"bold",children:null===(r=c.card)||void 0===r?void 0:r.last4})]})]}),u]});case"sepa_debit":return(0,n.jsxs)(i.Z,{...f,children:[(0,n.jsxs)(o.K,{spacing:0,children:[(0,n.jsx)(a.x,{size:"xs",color:"dimmed",children:"SEPA Debit"}),(0,n.jsxs)(a.x,{size:"sm",children:["Ending in"," ",(0,n.jsx)(a.x,{component:"span",weight:"bold",children:null===(s=c.sepa_debit)||void 0===s?void 0:s.last4})]})]}),u]});case"link":return(0,n.jsxs)(i.Z,{...f,children:[(0,n.jsxs)(o.K,{spacing:0,children:[(0,n.jsx)(a.x,{size:"xs",color:"dimmed",children:"Link"}),(0,n.jsxs)(a.x,{size:"sm",children:["Email:"," ",(0,n.jsx)(a.x,{component:"span",weight:"bold",children:null===(l=c.link)||void 0===l?void 0:l.email})]})]}),u]});default:return(0,n.jsxs)(i.Z,{...f,children:[(0,n.jsxs)(o.K,{spacing:0,children:[(0,n.jsx)(a.x,{size:"xs",transform:"capitalize",color:"dimmed",children:d.replace(/_/gi," ")}),(0,n.jsxs)(a.x,{size:"sm",children:["Created on: ",(0,p.p6)(new Date(1e3*c.created))]})]}),u]})}};m.z.object({missingPaymentMethod:(0,h.rK)().optional()});let k=()=>{let{managementUrls:e,isLoading:t}=(0,y.cA)(),{paddle:r}=(0,x.N)(),i=(0,w.xJ)(),{subscription:p}=(0,v.FG)(),{getOrCreateCustomer:h}=(0,y.ts)();if(!(null==i?void 0:i.email))return null;let m=async()=>{let t=null==i?void 0:i.paddleCustomerId;t||(t=await h()),(null==e?void 0:e.freeSubscriptionPriceId)&&r.Checkout.open({customer:{id:t},customData:{userId:null==i?void 0:i.id},items:[{priceId:e.freeSubscriptionPriceId,quantity:1}]})};return(null==e?void 0:e.updatePaymentMethod)||(null==e?void 0:e.freeSubscriptionPriceId)?(0,n.jsx)(s.Z,{withBorder:!0,children:(0,n.jsxs)(o.K,{children:[(0,n.jsx)(l.D,{order:2,id:"payment-methods",children:"Payment methods"}),(0,n.jsx)(c.i,{label:"Your payment methods"}),t&&(0,n.jsx)(u.M,{children:(0,n.jsx)(d.a,{variant:"bars"})}),(null==e?void 0:e.updatePaymentMethod)&&(0,n.jsx)(f.z,{component:"a",href:null==e?void 0:e.updatePaymentMethod,children:"Update your default payment method"}),!(null==e?void 0:e.updatePaymentMethod)&&(null==e?void 0:e.freeSubscriptionPriceId)&&(0,n.jsxs)(o.K,{children:[(0,n.jsx)(a.x,{align:"center",size:"sm",color:"dimmed",children:"We found no default payment method."}),(0,n.jsx)(f.z,{onClick:m,children:"Setup default payment method"})]})]})}):null};function j(){let e=(0,g.w)(),{subscriptionLoading:t,subscriptionPaymentProvider:r}=(0,v.FG)();if(t)return null;let i=null!=r?r:e;return i===b.OH.Stripe?null:i===b.OH.Paddle?(0,n.jsx)(k,{}):null}},28475:function(e,t,r){"use strict";r.d(t,{EN:function(){return s},KI:function(){return a},Or:function(){return l},Pu:function(){return o},ij:function(){return i}});var n=r(23184);let i=(0,n.H)({adUnit:"incontent_1",sizes:[[320,100],[320,50],[300,250],[300,100],[300,50]]}),o=(0,n.H)({adUnit:"side_1",lutSizes:[[[1200],[[120,600],[160,600],[300,600],[300,250],[336,280]]]]}),a=(0,n.H)({adUnit:"side_2",lutSizes:[[[1200],[[200,200],[250,250],[300,250],[336,280]]]]});(0,n.H)({adUnit:"side_3",sizes:[[200,200],[250,250],[300,250],[336,280]]});let s=(0,n.H)({adUnit:"top",lutSizes:[[[0,759],[[320,100],[320,50],[300,250],[300,100],[300,50],[336,280]]],[[760,1023],[[468,60],[728,90]]],[[1024],[[728,90],[970,90],[970,250],[980,90]]]]}),l=(0,n.H)({adUnit:"adhesive",lutSizes:[[[0,759],[[320,50],[300,50]]],[[760,1023],[[728,90]]],[[1024],[[728,90],[970,90],[980,90],[970,250]]]]})},23184:function(e,t,r){"use strict";r.d(t,{H:function(){return w}});var n=r(85893),i=r(41746),o=r(95117),a=r(56817),s=r(67294),l=r(40828),c=r(25675),u=r.n(c),d=r(27943),f=r(90512),p=r(90101),h=r(87864),m=r(56311),g=r(79543);let v={};function y(e){let{adUnit:t,sizes:r,id:i,onDismount:o}=e,[a,l]=(0,s.useState)(null!=i?i:null);return(0,s.useEffect)(()=>{let e=null!=i?i:(0,d.wm)();return l(e),v[t]||(v[t]=e),window.adngin&&window.adngin.adnginLoaderReady&&window.adngin.queue.push(()=>{let n={adUnit:t,placement:e,gpIdUniquifier:v[t],sizes:r};window.adngin.cmd.startAuction([n])}),()=>{window.googletag.cmd.push(function(){let t=window.googletag.pubads().getSlots().find(t=>t.getSlotElementId()===e);t&&window.googletag.destroySlots([t])}),null==o||o(e)}},[]),a?(0,n.jsx)("div",{className:"flex items-center justify-center",id:a}):null}function b(e){let{sizes:t}=e,r=t?S(t):0,o=i.wi.filter(e=>{let[,t]=e;return t<=r}).sort((e,t)=>{let[,r]=e,[,n]=t;return n-r})[0];if(!o)return null;let[a,s]=o;return(0,n.jsx)(g.p,{href:"/pricing",className:"flex",children:(0,n.jsx)(u(),{src:"/images/support-us/".concat(a,"x").concat(s,".jpg"),alt:"Please support civitai and creators by disabling adblock",width:a,height:s})})}function x(e){let{adUnit:t,sizes:r,lutSizes:i,withFeedback:a,className:c,id:u,maxHeight:d,maxWidth:h,preserveLayout:v,onDismount:x}=e,{adsBlocked:w,ready:S,isMember:j}=(0,l.R)(),{classes:E}=k({sizes:r,lutSizes:i,maxHeight:d,maxWidth:h}),O=function(e){let{sizes:t,lutSizes:r,maxHeight:n,maxWidth:i}=e,o=(0,p.T)(),[a,l]=(0,s.useState)(void 0);return(0,s.useEffect)(()=>{function e(e){e&&(n||i)?l(e.filter(e=>{let[t,r]=e;return(!n||!(r>n))&&(!i||!(t>i))})):l(e)}if(t||null===t)e(t);else if(r){var a,s;let t=null!==(s=null==o?void 0:null===(a=o.current)||void 0===a?void 0:a.clientWidth)&&void 0!==s?s:window.innerWidth;e(null==r?void 0:r.filter(e=>{let[[r,n]]=e;return(!r||!(tn))}).flatMap(e=>{let[t,r]=e;return r}))}},[]),a}({sizes:r,lutSizes:i,maxHeight:d,maxWidth:h}),[C,I]=(0,m.YD)();return O&&!O.length?null:(0,n.jsx)("div",{ref:C,className:(0,f.Z)({[E.root]:!1!==v},"relative box-content flex flex-col items-center justify-center gap-2",c),children:I&&(0,n.jsxs)(n.Fragment,{children:[w?(0,n.jsx)(b,{sizes:null!=O?O:void 0}):S&&void 0!==O?(0,n.jsx)(y,{adUnit:t,sizes:null!=O?O:void 0,id:u,onDismount:x}):null,a&&!j&&(0,n.jsx)("div",{className:"flex w-full justify-end",children:(0,n.jsx)(o.x,{component:g.p,td:"underline",href:"/pricing",color:"dimmed",size:"xs",align:"center",children:"Remove ads"})})]})})}function w(e){function t(t){let{withFeedback:r,browsingLevel:i,className:o,maxHeight:a,maxWidth:s,preserveLayout:l}=t;return(0,n.jsx)(h.F,{browsingLevel:i,children:(0,n.jsx)(x,{...e,withFeedback:r,className:o,maxHeight:a,maxWidth:s,preserveLayout:l})})}return t.useImpressionTracked=function(){return function(e){let[t,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let t=t=>{t.detail===e&&setTimeout(()=>r(!0),1e3)};return window.addEventListener("civitai-ad-impression",t),()=>{window.removeEventListener("civitai-ad-impression",t)}},[e]),t}(e.adUnit)},t}function S(e,t){let{maxHeight:r,maxWidth:n}=null!=t?t:{},i=Math.max(...(n?e.filter(e=>{let[t]=e;return t<=n}):e).map(e=>{let[t,r]=e;return Math.max(r)}));return r?Math.min(r,i):i}let k=(0,a.k)((e,t)=>{let{sizes:r,lutSizes:n,maxHeight:i,maxWidth:o}=t;return{root:{minHeight:r?S(r,{maxHeight:i,maxWidth:o}):void 0,...null==n?void 0:n.reduce((e,t)=>{let[[r,n],a]=t,s=[];return r&&s.push("(min-width: ".concat(r,"px)")),n&&s.push("(max-width: ".concat(n,"px)")),{...e,["@container ".concat(s.join(" and "))]:{minHeight:S(a,{maxHeight:i,maxWidth:o})}}},{})}}})},42161:function(e,t,r){"use strict";r.d(t,{$:function(){return m},X:function(){return g}});var n=r(85893),i=r(23184),o=r(67294),a=r(73445),s=r(18753);let l=(0,a.Ue)()((0,s.n)(e=>({adUnits:{},enableAdUnit:t=>e(e=>{e.adUnits[t]=!0}),disableAdUnit:t=>e(e=>{e.adUnits[t]=!1})})));var c=r(15067);let u=(e,t)=>(0,c.D)({type:"min-width",width:e,containerName:t});var d=r(80971);let f=(0,i.H)({adUnit:"outstream",sizes:[[1,1]],id:"adngin-outstream-0",onDismount:()=>{document.querySelectorAll("script").forEach(e=>{e.src.includes("anyclip")&&e.remove()});let e=document.body.getElementsByTagName("*");for(let t=e.length-1;t>=0;t--){let r=e[t];(r.innerHTML.includes("anyclip")||Array.from(r.attributes).some(e=>e.value.includes("anyclip")))&&r.remove()}}});function p(){return(0,o.useEffect)(()=>(l.getState().enableAdUnit("outstream"),()=>{l.getState().disableAdUnit("outstream")}),[]),null}function h(){let e=f.useImpressionTracked();return(0,n.jsxs)("div",{className:"flex flex-col items-end [&_iframe]:hidden",children:[e&&(0,n.jsx)(d.P,{}),(0,n.jsx)(f,{})]})}function m(){return l(e=>e.adUnits.outstream)?(0,n.jsx)(h,{}):null}function g(e){let{minContainerWidth:t}=e;return u(t)?(0,n.jsx)(p,{}):null}},87864:function(e,t,r){"use strict";r.d(t,{F:function(){return l}});var n=r(85893);r(67294);var i=r(40828),o=r(58456),a=r(47405),s=r(54671);function l(e){let{browsingLevel:t,children:r,hideOnBlocked:l}=e,{adsEnabled:c,adsBlocked:u}=(0,i.R)(),d=(0,o.bT)(),f=!(0,s.A_)(null!=t?t:d);return!c||f||l&&u?null:(0,n.jsx)(a.Z,{children:r})}},46264:function(e,t,r){"use strict";r.d(t,{L:function(){return c}});var n=r(85893),i=r(28475),o=r(67294),a=r(87864),s=r(10558);function l(e){let{onClose:t,preserveLayout:r=!1}=e,o=(0,s.s)(),l=i.Or.useImpressionTracked();return(0,n.jsx)(a.F,{hideOnBlocked:!0,children:(0,n.jsxs)("div",{className:"relative border-t border-gray-3 bg-gray-2 dark:border-dark-4 dark:bg-dark-9",children:[(0,n.jsx)(i.Or,{maxHeight:90,preserveLayout:r}),l&&!o&&t&&(0,n.jsx)("button",{className:"absolute inset-y-0 right-0 flex w-9 items-center justify-center bg-gray-0/50 dark:bg-dark-6/50",onClick:t,children:(0,n.jsx)("div",{className:"inline-block -rotate-90 text-nowrap",children:"Close Ad"})})]})})}function c(e){let{closeable:t,preserveLayout:r}=e,[i,a]=(0,o.useState)(!1);return i?null:(0,n.jsx)(l,{onClose:!1!==t?()=>a(!0):void 0,preserveLayout:r})}},40828:function(e,t,r){"use strict";r.d(t,{R:function(){return v},i:function(){return x}});var n=r(85893),i=r(67294),o=r(17578),a=r(4298),s=r.n(a),l=r(5779),c=r(15131),u=r(40893),d=r(32759),f=r(41746),p=r(73445),h=r(8346),m=r(11163);let g=(0,i.createContext)(null);function v(){let e=(0,i.useContext)(g);if(!e)throw Error("missing AdsProvider");return e}let y=(0,p.Ue)(()=>({ready:!1,adsBlocked:!0})),b=["/collections/6503138","/collections/7514194","/collections/7514211","/moderator"];function x(e){var t;let{children:r}=e,a=(0,m.useRouter)(),u=y(e=>e.ready),d=y(e=>e.adsBlocked),f=(0,o.xJ)(),p=(0,l.g)(),v=null!==(t=null==f?void 0:f.isMember)&&void 0!==t&&t,x=(0,c.s7)(e=>e.allowAds),S=!h.r8&&p.adsEnabled&&(x||!v)&&!b.some(e=>a.asPath.includes(e));return(0,i.useEffect)(()=>{function e(){window.__tcfapi("addEventListener",2,function(e,t){["tcloaded","useractioncomplete"].includes(e.eventStatus)&&(window.__tcfapi("removeEventListener",2,null,e.listenerId),t?y.setState({ready:!0}):y.setState({adsBlocked:!0}))}),window.googletag.cmd.push(function(){window.googletag.pubads().addEventListener("impressionViewable",function(e){var t,r,n;let i=null===(n=e.slot.getAdUnitPath())||void 0===n?void 0:null===(r=n.split("/"))||void 0===r?void 0:null===(t=r.reverse())||void 0===t?void 0:t[0];i&&dispatchEvent(new CustomEvent("civitai-ad-impression",{detail:i}))})})}return window.addEventListener("adnginLoaderReady",e),()=>{window.removeEventListener("adnginLoaderReady",e)}},[]),(0,n.jsxs)(g.Provider,{value:{ready:u,adsBlocked:d,adsEnabled:S,username:null==f?void 0:f.username,isMember:v},children:[r,S&&h.r8&&(0,n.jsx)(s(),{id:"snigel-ads-domain-spoof","data-cfasync":"false",type:"text/javascript",dangerouslySetInnerHTML:{__html:'\n // Spoofing domain to \'civitai.com\' --> ONLY FOR TESTING PURPOSES.\n // This is required when the test environment domain differs from the production domain.\n window.addEventListener("adnginLoaderReady", function () {\n adngin.queue.push(function () {\n googletag.cmd.push(function () {\n googletag.pubads().set("page_url", "civitai.com");\n });\n });\n });\n '}}),S&&(0,n.jsx)(s(),{id:"snigel-config","data-cfasync":"false",type:"text/javascript",dangerouslySetInnerHTML:{__html:'\n\n window.snigelPubConf = {\n "adengine": {\n "activeAdUnits": ["incontent_1", "outstream", "side_1", "side_2", "side_3", "top", "adhesive"]\n }\n }\n '}}),S&&(0,n.jsx)(s(),{async:!0,src:"https://cdn.snigelweb.com/adengine/civitai.com/loader.js",onError:function(){y.setState({adsBlocked:!0})},onLoad:function(){y.setState({adsBlocked:!1})}}),S&&(0,n.jsx)(s(),{id:"ad-cleanup",type:"text/javascript",dangerouslySetInnerHTML:{__html:"\n // GPT\n window.googletag = window.googletag || {cmd: []};\n googletag.cmd.push(function() {\n googletag.pubads().disableInitialLoad();\n googletag.pubads().enableSingleRequest();\n googletag.enableServices();\n });\n\n // adsense\n (window.adsbygoogle = window.adsbygoogle || []).pauseAdRequests = 1\n "}}),S&&(0,n.jsx)(w,{})]})}function w(){let e=(0,o.xJ)(),{worker:t}=(0,u.t9)(),{fingerprint:r}=(0,d.r)();return(0,i.useEffect)(()=>{let n=n=>{let i=n.detail;f.P2[i]=!0,t&&e&&t.send("recordAdImpression",{userId:e.id,fingerprint:r,adId:i})};return window.addEventListener("civitai-ad-impression",n),()=>{window.removeEventListener("civitai-ad-impression",n)}},[r,t,e]),null}},41746:function(e,t,r){"use strict";r.d(t,{P2:function(){return c},_0:function(){return a},wi:function(){return l}});var n=r(67294),i=r(9242),o=r(88182);function a(){let e=(0,n.useRef)({});return function(t){var r,n,a;let{data:l,columnCount:c,options:u}=t,d=null!==(n=null===(r=s.find(e=>{let[t]=e;return t===c}))||void 0===r?void 0:r[1])&&void 0!==n?n:s[s.length-1][1];if(!u||!d)return l.map(e=>({type:"data",data:e}));let f=d.join("_");e.current[f]=null!==(a=e.current[f])&&void 0!==a?a:{indices:[],lastIndex:0};let p=e.current[f],[h,m]=d;for(;p.lastIndexe.index);return l.reduce((e,t,r)=>{let n=g.indexOf(r);return n>-1&&e.push({type:"ad",data:p.indices[n]}),e.push({type:"data",data:t}),e},[])}}let s=[[1,[5,7]],[2,[5,7]],[3,[5,8]],[4,[5,9]],[5,[6,11]],[6,[7,12]],[7,[8,12]]],l=[[120,600],[300,100],[300,250],[300,600],[320,50],[320,100],[728,90],[970,90],[970,250]],c={}},1566:function(e,t,r){"use strict";r.d(t,{L:function(){return c}});var n=r(85893),i=r(74403),o=r(71232),a=r(5044),s=r(97564),l=r(95117);let c=e=>{var t;let{icon:r,iconColor:c,children:d,title:f,size:p="xs",iconSize:h,...m}=e;return(0,n.jsx)(i.b,{radius:"sm",pl:10,...m,children:(0,n.jsxs)(o.Z,{spacing:"xs",noWrap:!0,children:[(0,n.jsx)(a.k,{color:c,size:h,children:r}),(0,n.jsxs)(s.K,{spacing:0,children:[f&&(0,n.jsx)(l.x,{size:u[p],weight:500,color:null!==(t=m.color)&&void 0!==t?t:"blue",sx:{lineHeight:1.1},children:f}),(0,n.jsx)(l.x,{size:p,sx:{lineHeight:1.15},children:d})]})]})})},u={xs:"sm",sm:"md",md:"lg",lg:"xl"}},81770:function(e,t,r){"use strict";r.d(t,{I:function(){return m}});var n=r(85893),i=r(64761),o=r(49834),a=r(19236),s=r(67841),l=r(38710),c=r(79543),u=r(28075),d=r(36128),f=r(47721),p=r(90512),h=r(58192);function m(e){var t;let{announcement:r,dismissible:m,moderatorActions:g,className:v,style:y,...b}=e,x=(0,f.aK)(e=>e.dismissed),{actions:w,image:S}=r.metadata||{},k=(0,i.rZ)(),j=!x.includes(r.id)&&(null===(t=null!=m?m:r.metadata.dismissible)||void 0===t||t);return(0,n.jsxs)(h.I,{className:(0,p.Z)("items-stretch border",v),direction:"row",style:{borderColor:k.colors[r.color][4],...y},...b,children:[j&&(0,n.jsx)(o.A,{variant:"subtle",radius:"xl",color:"red",onClick:function(){(0,f.Ix)(r.id)},className:"absolute right-2 top-2",children:(0,n.jsx)(l.Z,{size:20})}),S&&(0,n.jsx)("div",{className:"relative min-h-40 w-40 @max-md:hidden",children:(0,n.jsx)(u.i,{src:S,width:200,alt:"Announcement banner image",className:"absolute inset-0 size-full object-cover"})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-2 p-3",children:[(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)(a.D,{order:4,children:r.title}),g]}),(0,n.jsx)(d.t,{allowedElements:["a"],unwrapDisallowed:!0,children:r.content}),w&&(0,n.jsx)("div",{className:"flex gap-2",children:w.map((e,t)=>{var i;return(0,n.jsx)(s.z,{component:c.p,href:e.link,variant:e.variant?e.variant:"outline",color:null!==(i=e.color)&&void 0!==i?i:r.color,children:e.linkText},t)})})]})]})}},47721:function(e,t,r){"use strict";r.d(t,{A2:function(){return c},Ix:function(){return l},aK:function(){return s}});var n=r(67294),i=r(73445),o=r(782),a=r(72456);let s=(0,i.Ue)()((0,o.tJ)(e=>({dismissed:[]}),{name:"announcements",version:1}));function l(e){s.setState(t=>({dismissed:[...new Set(t.dismissed.concat(e))]}))}function c(){let e=s(e=>e.dismissed),{data:t,...r}=a.SX.announcement.getAnnouncements.useQuery(void 0,{onSettled:t=>{if(!(null==t?void 0:t.length))return;let r=t.map(e=>e.id),n=e.filter(e=>r.includes(e));s.setState({dismissed:n})}});return{data:(0,n.useMemo)(()=>{var r;return null!==(r=null==t?void 0:t.map(t=>({...t,dismissed:e.includes(t.id)})))&&void 0!==r?r:[]},[t,e]),...r}}},28345:function(e,t,r){"use strict";r.d(t,{LN:function(){return iu}});var n=r(85893),i=r(90512),o=r(67294),a=r(67841),s=r(95117),l=r(79543),c=r(40572),u=r(61714),d=r(5779),f=r(90101),p=r(21955),h=(0,p.Z)("outline","arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]),m=r(38710),g=(0,p.Z)("outline","message-chatbot","IconMessageChatbot",[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]]),v=r(36934),y=r(524),b=r(8346);function x(e){let{...t}=e,[r,i]=(0,o.useState)(!1);return!y.O.NEXT_PUBLIC_GPTT_UUID&&b.BB?null:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)("div",{className:"absolute bottom-full right-0 mb-1",children:(0,n.jsx)(v.R,{width:320,height:500})}),(0,n.jsx)(a.z,{component:"span",px:"xs",...t,color:r?"gray":"blue",onClick:()=>i(e=>!e),children:r?(0,n.jsx)(m.Z,{size:20,stroke:2.5}):(0,n.jsx)(g,{size:20,stroke:2.5})})]})}var w=r(50899);let S=[{href:"/creators-program",color:"blue",children:"Creators"},{href:"/content/tos",children:"Terms of Service"},{href:"/content/privacy",children:"Privacy"},{href:"/safety",children:"Safety",features:e=>e.safety},{href:"/newsroom",children:"Newsroom",features:e=>e.newsroom},{href:"/github/wiki/REST-API-Reference",target:"_blank",rel:"nofollow noreferrer",children:"API"},{href:"https://status.civitai.com",target:"_blank",rel:"nofollow noreferrer",children:"Status"},{href:"/wiki",target:"_blank",rel:"nofollow noreferrer",children:"Wiki"},{href:"/education",target:"_blank",rel:"nofollow noreferrer",children:"Education"}];function k(){let e=(0,d.g)(),t=(0,o.useRef)(null),[r,p]=(0,o.useState)(!0),m=(0,f.T)({onScroll:e=>{p(e.scrollTop<=100)}});return(0,n.jsxs)("footer",{ref:t,className:"sticky inset-x-0 bottom-0 z-50 mt-3 transition-transform",style:r?void 0:{transform:"translateY(var(--footer-height))"},children:[(0,n.jsx)(w.P$,{showFooter:r}),(0,n.jsx)("div",{className:"absolute bottom-[var(--footer-height)] right-2 group-[.no-scroll]:right-4",children:(0,n.jsxs)("div",{className:"relative mb-2 flex gap-2 group-[.no-scroll]:mb-3",children:[(0,n.jsx)(a.z,{px:"xs",onClick:()=>{var e;return null==m?void 0:null===(e=m.current)||void 0===e?void 0:e.scrollTo({top:0,behavior:"smooth"})},className:"transition-transform",style:r?{transform:"translateY(140%)"}:void 0,children:(0,n.jsx)(h,{size:20,stroke:2.5})}),(0,n.jsx)(x,{})]})}),(0,n.jsxs)("div",{className:(0,i.Z)(" relative flex h-[var(--footer-height)] w-full items-center gap-2 overflow-x-auto bg-gray-0 p-1 px-2 @sm:gap-3 dark:bg-dark-7",{"border-t border-gray-3 dark:border-dark-4":!e.isGreen,"border-green-8 border-t-[3px]":e.isGreen}),style:{scrollbarWidth:"thin"},children:[(0,n.jsxs)(s.x,{className:"select-none text-nowrap font-bold",children:["\xa9 Civitai ",new Date().getFullYear()]}),(0,n.jsxs)("div",{className:"flex items-center",children:[S.filter(t=>{var r;return!t.features||(null===(r=t.features)||void 0===r?void 0:r.call(t,e))}).map((e,t)=>{let{features:r,...i}=e;return(0,n.jsx)(a.z,{component:l.p,...i,className:"px-2.5 @max-sm:px-1",size:"xs",variant:"subtle",color:"gray"},t)}),(0,n.jsx)(u.W,{})]}),(0,n.jsx)("div",{className:"ml-auto flex items-center gap-1",children:(0,n.jsx)(c.v4,{name:"support",state:{},passHref:!0,children:(0,n.jsx)(a.z,{component:"a",pl:4,pr:"xs",color:"yellow",variant:"light",size:"xs",children:"\uD83D\uDEDF Support"})})})]})]})}var j=r(64761),E=r(3594),O=r(70917);function C({styles:e}){let t=(0,j.rZ)();return o.createElement(O.xB,{styles:(0,O.iv)("function"==typeof e?e(t):e)})}let I=(0,o.createContext)({zIndex:1e3,fixed:!1,layout:"default"});I.Provider;var P=r(56817);function A(e,t){if(!e)return[];let r=Object.keys(e).filter(e=>"base"!==e).map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return r.sort((e,t)=>e[0]-t[0]),r}var T=Object.defineProperty,z=Object.defineProperties,N=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))_.call(t,r)&&D(e,r,t[r]);if(R)for(var r of R(t))M.call(t,r)&&D(e,r,t[r]);return e},F=(e,t)=>z(e,N(t)),U=(0,P.k)((e,{height:t,fixed:r,position:n,zIndex:i,borderPosition:o,layout:a})=>{let s="object"==typeof t&&null!==t?A(t,e).reduce((e,[t,r])=>(e[`@media (min-width: ${t}px)`]={height:r,minHeight:r},e),{}):null;return{root:F(L(F(L(L({},e.fn.fontStyles()),n),{zIndex:i,left:"alt"===a?"var(--mantine-navbar-width, 0)":0,right:"alt"===a?"var(--mantine-aside-width, 0)":0,height:"object"==typeof t?(null==t?void 0:t.base)||"100%":t,maxHeight:"object"==typeof t?(null==t?void 0:t.base)||"100%":t,position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white}),s),{borderBottom:"bottom"===o?`1px solid ${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:"top"===o?`1px solid ${"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}}),B=r(64523),H=Object.defineProperty,Z=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))W.call(t,r)&&$(e,r,t[r]);if(Z)for(var r of Z(t))V.call(t,r)&&$(e,r,t[r]);return e},G=(e,t)=>{var r={};for(var n in e)W.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Z)for(var n of Z(e))0>t.indexOf(n)&&V.call(e,n)&&(r[n]=e[n]);return r};let K=(0,o.forwardRef)((e,t)=>{var{children:r,className:n,classNames:i,styles:a,height:s,fixed:l=!1,withBorder:c=!0,position:u,zIndex:d,section:f,unstyled:p,__staticSelector:h}=e,m=G(e,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);let g=(0,o.useContext)(I),v=d||g.zIndex||(0,E.w)("app"),{classes:y,cx:b,theme:x}=U({height:s,fixed:g.fixed||l,position:u,zIndex:"number"==typeof v&&"default"===g.layout?v+1:v,layout:g.layout,borderPosition:c?"header"===f?"bottom":"top":"none"},{name:h,classNames:i,styles:a,unstyled:p}),w="object"==typeof s&&null!==s?A(s,x).reduce((e,[t,r])=>(e[`@media (min-width: ${t}px)`]={[`--mantine-${f}-height`]:`${r}px`},e),{}):null;return o.createElement(B.x,q({component:"header"===f?"header":"footer",className:b(y.root,n),ref:t},m),r,o.createElement(C,{styles:()=>({":root":q({[`--mantine-${f}-height`]:"object"==typeof s?`${null==s?void 0:s.base}px`||"100%":`${s}px`},w)})}))});K.displayName="@mantine/core/VerticalSection";var X=Object.defineProperty,J=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,er=(e,t,r)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,en=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&er(e,r,t[r]);if(Q)for(var r of Q(t))et.call(t,r)&&er(e,r,t[r]);return e},ei=(e,t)=>J(e,Y(t));let eo={fixed:!1,position:{top:0,left:0,right:0}},ea=(0,o.forwardRef)((e,t)=>{let r=(0,j.N4)("Header",eo,e);return o.createElement(K,ei(en({section:"header",__staticSelector:"Header"},r),{ref:t}))});ea.displayName="@mantine/core/Header";var es=r(20050),el=r(54777),ec=r(49834),eu=r(5140),ed=r(11163),ef=r(40633),ep=r(97564),eh=r(71232),em=r(88393),eg=r(87092),ev=r(81754),ey=r(87529),eb=r(64002),ex=r(17578),ew=r(15131),eS=r(32957),ek=r(54671),ej=r(7379);function eE(e){let t=(0,ex.xJ)(),r=(null==t?void 0:t.isModerator)?[...ek.Us,eS.Sh.Blocked]:ek.Us;return(0,n.jsx)(eh.Z,{spacing:"xs",noWrap:!0,...e,children:r.map(e=>(0,n.jsx)(eO,{level:e},e))})}function eO(e){let{level:t}=e,r=(0,ew.s7)(e=>e.browsingLevel),i=ej.v.hasFlag(r,t),o=(0,ew.WX)(),{classes:a}=eC(),s=0===r&&t===eS.Sh.PG;return(0,n.jsx)(eb.A,{classNames:a,checked:i||s,onChange:()=>o(t),variant:s?"filled":"outline",children:(0,n.jsx)("span",{children:ek.vU[t]})})}let eC=(0,P.k)((e,t,r)=>({root:{flex:1},label:{width:"100%",display:"inline-flex",justifyContent:"center","&[data-checked]":{"&, &:hover":{backgroundColor:e.colors.blue[e.fn.primaryShade()],color:e.white},["& .".concat(r("iconWrapper"))]:{color:e.white,display:"none",["@media (min-width: ".concat(e.breakpoints.xs,"px)")]:{display:"inline-block"}}},paddingLeft:10,paddingRight:10,["@media (min-width: ".concat(e.breakpoints.xs,"px)")]:{"&":{paddingLeft:20,paddingRight:20}}},iconWrapper:{ref:r("iconWrapper")}}));var eI=r(76326),eP=r(38498);function eA(e){let{iconProps:t={}}=e;return(0,n.jsxs)(ef.J,{zIndex:eP._G.imageGeneration.drawerZIndex+1,withArrow:!0,withinPortal:!0,children:[(0,n.jsx)(ef.J.Target,{children:(0,n.jsx)(ec.A,{children:(0,n.jsx)(ev.Z,{...t})})}),(0,n.jsx)(ef.J.Dropdown,{p:"md",children:(0,n.jsx)(eT,{})})]})}function eT(e){let{closeMenu:t}=e,r=(0,ew.s7)(e=>e.showNsfw),i=(0,ew.s7)(e=>e.blurNsfw),o=(0,ew.s7)(e=>e.disableHidden),c=(0,ew.s7)(e=>e.setState);return(0,n.jsx)("div",{id:"browsing-mode",children:(0,n.jsxs)(ep.K,{spacing:"md",className:"sm:min-w-96",children:[r&&(0,n.jsxs)(ep.K,{spacing:"lg",children:[(0,n.jsxs)(ep.K,{spacing:4,children:[(0,n.jsxs)(ep.K,{spacing:0,children:[(0,n.jsxs)(eh.Z,{align:"flex-start",children:[(0,n.jsx)(s.x,{sx:{lineHeight:1},children:"Browsing Level"}),r&&(0,n.jsx)(em.u,{label:"Help us improve by playing!",withArrow:!0,color:"dark",children:(0,n.jsx)(a.z,{onClick:t,component:l.p,href:"/research/rater",compact:!0,size:"xs",ml:"auto",variant:"outline",children:(0,n.jsxs)(eh.Z,{spacing:4,children:["Rating Game",(0,n.jsx)(ey.Z,{size:14})]})})})]}),(0,n.jsx)(s.x,{color:"dimmed",children:"Select the levels of content you want to see"})]}),(0,n.jsx)(eE,{})]}),(0,n.jsx)(eg.X,{checked:i,onChange:()=>c(e=>({blurNsfw:!e.blurNsfw})),label:"Blur mature content (R+)",size:"md"})]}),(0,n.jsx)(eh.Z,{position:"apart",children:(0,n.jsx)(eg.X,{checked:!o,onChange:()=>c(e=>({disableHidden:!e.disableHidden})),label:(0,n.jsxs)(s.x,{children:["Apply"," ",(0,n.jsx)(s.x,{component:"span",variant:"link",underline:!0,onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,eI.Fw)()},children:"my filters"})]}),size:"md"})})]})})}var ez=r(14821),eN=r(97852),eR=r(72456);function e_(){let{state:e,setState:t}=(0,w.mx)(),r=(0,ex.xJ)(),i=(0,d.g)(),{data:o,isLoading:a}=eR.SX.chat.getUnreadCount.useQuery(void 0,{enabled:!!r});if(eR.SX.chat.getUserSettings.useQuery(void 0,{enabled:!!r}),!r||!i.chat)return(0,n.jsx)(n.Fragment,{});let s=null==o?void 0:o.reduce((e,t)=>{let{cnt:r}=t;return e+r},0);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ez.z,{color:"red",disabled:a||!s,label:s,inline:!0,size:16,offset:4,withBorder:!0,styles:{indicator:{height:"20px !important","> span":{marginBottom:"2px"}}},children:(0,n.jsx)(ec.A,{variant:e.open?"filled":void 0,onClick:()=>t(t=>({...t,open:!e.open})),children:(0,n.jsx)(eN.Z,{})})})})}var eM=r(9094),eD=r(82623),eL=r(19236),eF=r(73723),eU=r(21380),eB=r(50331),eH=r(8949),eZ=r(3941),eW=r(9585),eV=r(35744),e$=r(76145),eq=r(33416),eG=r(84667),eK=(0,p.Z)("outline","network-off","IconNetworkOff",[["path",{d:"M6.528 6.536a6 6 0 0 0 7.942 7.933m2.247 -1.76a6 6 0 0 0 -8.427 -8.425",key:"svg-0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6c0 .337 -.006 .66 -.017 .968m-.55 3.473c-.333 .884 -.81 1.403 -1.433 1.559",key:"svg-1"}],["path",{d:"M12 3c-.936 .234 -1.544 1.29 -1.822 3.167m-.16 3.838c.116 3.029 .776 4.695 1.982 4.995",key:"svg-2"}],["path",{d:"M6 9h3m4 0h5",key:"svg-3"}],["path",{d:"M3 20h7",key:"svg-4"}],["path",{d:"M14 20h7",key:"svg-5"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M12 15v3",key:"svg-7"}],["path",{d:"M3 3l18 18",key:"svg-8"}]]),eX=r(98729),eJ=(0,p.Z)("outline","link-off","IconLinkOff",[["path",{d:"M9 15l3 -3m2 -2l1 -1",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-3"}]]),eY=(0,p.Z)("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]),eQ=r(94351),e0=r(63208),e1=r(38615),e2=r(3518),e5=r(14102),e4=r(1566),e3=r(38577);function e6(){let e=(0,j.rZ)();return(0,n.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 578 176",xmlSpace:"preserve",children:[(0,n.jsxs)("linearGradient",{id:"darkGradient",gradientUnits:"userSpaceOnUse",x1:"76",y1:"1026",x2:"76",y2:"850.5",gradientTransform:"matrix(1 0 0 -1 0 1026)",children:[(0,n.jsx)("stop",{offset:"0",style:{stopColor:"#081692"}}),(0,n.jsx)("stop",{offset:"1",style:{stopColor:"#1e043c"}})]}),(0,n.jsxs)("linearGradient",{id:"lightGradient",gradientUnits:"userSpaceOnUse",x1:"76",y1:"1026",x2:"76",y2:"850.4",gradientTransform:"matrix(1 0 0 -1 0 1026)",children:[(0,n.jsx)("stop",{offset:"0",style:{stopColor:"#1284f7"}}),(0,n.jsx)("stop",{offset:"1",style:{stopColor:"#0a20c9"}})]}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M0 43.9v87.7l76 43.9 76-43.9V43.9L76 0 0 43.9z",style:{fill:"url(#darkGradient)"}}),(0,n.jsx)("path",{style:{fill:"url(#lightGradient)"},d:"m76 27.7 52 30v60l-52 30-52-30v-60l52-30M76 0 0 43.9v87.8l76 43.9 76-43.9V43.9L76 0z"}),(0,n.jsx)("path",{d:"m90.8 95.9-14.9 8.5L61 95.9v-17l14.9-8.5 14.9 8.5H109V68.4l-33-19-33 19v38.1l33 19 33-19V95.9H90.8z",style:{fill:"#fff"}})]}),(0,n.jsx)("path",{id:"pc",d:"M538 161.5h-76.2c-5.2 0-9.5-4.3-9.5-9.5s4.3-9.5 9.5-9.5h5.8V131H439c-9.4 0-17.1-7.7-17.1-17.1V37.6c0-9.4 7.7-17.1 17.1-17.1h122c9.4 0 17.1 7.7 17.1 17.1v76.2c0 9.4-7.7 17.1-17.1 17.1h-28.6v11.5h5.8c5.2 0 9.5 4.3 9.5 9.5s-4.5 9.6-9.7 9.6zm-51.5-19h26.8V131h-26.8v11.5zm36.3-30.5H559V39.5H440.8V112h82zm38.1-72.5z",style:{fill:"dark"===e.colorScheme?"#fff":"#333"}}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{id:"line",style:{fill:"none",stroke:"#ccc",strokeWidth:6,strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"5.8732,11.7464"},d:"M206.8 87.5h170.3"}),(0,n.jsx)("path",{id:"arrows",d:"m196.4 102.5-25.9-15 25.9-15zm185.2 0 25.9-15-25.9-15z",style:{fill:"#ccc"}})]})]})}var e8=r(76083),e7=r(88182),e9=r(27943);function te(){return(0,n.jsxs)(ef.J,{position:"bottom-end",width:400,zIndex:eP._G.imageGeneration.drawerZIndex+1,withinPortal:!0,children:[(0,n.jsx)(ef.J.Target,{children:(0,n.jsx)("span",{children:(0,n.jsx)(tf,{})})}),(0,n.jsx)(ef.J.Dropdown,{p:0,children:(0,n.jsx)(tn,{})})]})}function tt(){let[e,t]=(0,o.useState)("pending"),r=(0,ex.xJ)();if(!r)return null;let i=()=>{t("processing"),(0,eW.c0)({id:"refresh-session",title:"Refreshing account data...",message:"Fetching fresh data for your account",loading:!0}),r.refresh(),setTimeout(()=>{(0,eW.c0)({id:"refresh-session",title:"Account data refreshed!",message:"The data for your account has been updated",loading:!1}),t("complete")},5e3)};return"processing"===e?(0,n.jsx)(s.x,{size:"xs",ta:"center",children:"Refreshing your account data..."}):"complete"===e?(0,n.jsxs)(s.x,{size:"xs",ta:"center",px:"xs",children:["Oh, no! You are still seeing this...",(0,n.jsx)("br",{})," Please check your subscription status and try again."]}):(0,n.jsxs)(s.x,{size:"xs",ta:"center",children:["Are you a supporter and seeing this message?"," ",(0,n.jsx)(s.x,{component:"span",variant:"link",td:"underline",onClick:()=>i(),sx:{cursor:"pointer"},children:"Click here"})]})}function tr(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e4.L,{icon:(0,n.jsx)(eV.Z,{size:16}),iconColor:"yellow",radius:0,size:"md",color:"yellow",children:"This feature is currently in early access and only available to Supporters."}),(0,n.jsx)(tt,{}),(0,n.jsxs)(ep.K,{py:"sm",px:"lg",spacing:4,children:[(0,n.jsx)(eM.M,{p:"md",pb:0,children:(0,n.jsx)(e6,{})}),(0,n.jsx)(s.x,{my:"xs",children:"Interact with any Stable Diffusion instance in realtime from Civitai"})]}),(0,n.jsx)(el.i,{}),(0,n.jsxs)(eh.Z,{spacing:0,grow:!0,children:[(0,n.jsx)(a.z,{leftIcon:(0,n.jsx)(e$.Z,{size:18}),radius:0,component:"a",href:"/v/civitai-link-intro",variant:"light",children:"Video Demo"}),(0,n.jsx)(a.z,{rightIcon:(0,n.jsx)(eq.Z,{size:18}),radius:0,component:l.p,href:"/pricing",children:"Become a Supporter"})]})]})}function tn(){var e;let[t,r]=(0,o.useState)(!1),{instance:i,instances:a,status:l,error:c}=(0,e3.ex)(),u=!(0,d.g)().civitaiLink,f=!!(null==a?void 0:a.length)&&"no-selected-instance"!==l;return(0,n.jsxs)(eD.X,{style:{overflow:"hidden"},children:[(0,n.jsxs)(ep.K,{spacing:0,p:"xs",children:[(0,n.jsxs)(eh.Z,{position:"apart",noWrap:!0,children:[(0,n.jsx)(eh.Z,{spacing:"xs",children:(0,n.jsx)(eL.D,{order:4,size:"sm",children:"Civitai Link"})}),f&&(0,n.jsx)(em.u,{label:"Manage instances",children:(0,n.jsx)(ec.A,{onClick:()=>{r(e=>!e)},children:(0,n.jsx)(eG.Z,{size:20})})})]}),!!(null==a?void 0:a.length)&&(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"no instance selected"})]}),(0,n.jsx)(el.i,{}),t?(0,n.jsx)(ta,{}):u?(0,n.jsx)(tr,{}):({"not-connected":(0,n.jsx)(ti,{error:c}),"no-socket-connection":(0,n.jsx)(to,{error:c}),"no-instances":(0,n.jsx)(tl,{}),"no-selected-instance":(0,n.jsx)(ta,{}),"link-pending":(0,n.jsx)(tc,{}),"link-ready":(0,n.jsx)(tu,{})})[l]]})}function ti(e){let{error:t}=e;return(0,n.jsxs)(ep.K,{p:"xl",align:"center",spacing:0,children:[(0,n.jsx)(eK,{size:60,strokeWidth:1}),(0,n.jsx)(s.x,{children:"Cannot Connect"}),(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:"We're unable to connect to the Civitai Link Coordination Server."}),t&&(0,n.jsx)(s.x,{color:"red",size:"xs",children:t})]})}function to(e){let{error:t}=e;return(0,n.jsxs)(ep.K,{p:"xl",align:"center",spacing:0,children:[(0,n.jsx)(eK,{size:60,strokeWidth:1}),(0,n.jsx)(s.x,{children:"Connection Lost"}),(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:"We've lost connect to the Civitai Link Coordination Server."}),t&&(0,n.jsx)(s.x,{color:"red",size:"xs",children:t})]})}function ta(){let{classes:e}=td(),{instances:t,instance:r,deselectInstance:i,deleteInstance:o,selectInstance:l,status:c}=(0,e3.ex)(),u="no-socket-connection"!==c;return(0,n.jsxs)(ep.K,{spacing:0,children:[(0,n.jsxs)(eh.Z,{position:"apart",p:"xs",children:[(0,n.jsx)(s.x,{weight:500,children:"Stable Diffusion Instances"}),u&&(0,n.jsx)(a.z,{compact:!0,size:"xs",variant:"outline",leftIcon:(0,n.jsx)(eX.Z,{size:18}),onClick:()=>{i(),(0,e8.C)("civitai-link-wizard",{})},children:"Add Instance"})]}),(0,n.jsx)(eF.x.Autosize,{maxHeight:410,children:null==t?void 0:t.map(t=>{let a=t.id===(null==r?void 0:r.id);return(0,n.jsxs)(eh.Z,{className:e.listItem,position:"apart",p:"xs",children:[(0,n.jsx)(s.x,{children:t.name}),(0,n.jsxs)(eh.Z,{spacing:"xs",children:[a&&(0,n.jsx)(ts,{}),u&&(0,n.jsxs)(n.Fragment,{children:[a?(0,n.jsx)(em.u,{label:"disconnect",withinPortal:!0,children:(0,n.jsx)(ec.A,{onClick:i,children:(0,n.jsx)(eJ,{size:20})})}):(0,n.jsx)(em.u,{label:"connect",withinPortal:!0,children:(0,n.jsx)(ec.A,{onClick:()=>l(t.id),children:(0,n.jsx)(eY,{size:20})})}),(0,n.jsx)(em.u,{label:"delete",withinPortal:!0,children:(0,n.jsx)(ec.A,{color:"red",onClick:()=>o(t.id),children:(0,n.jsx)(eQ.Z,{size:20})})})]})]})]},t.id)})})]})}function ts(){let e=(0,j.rZ)(),{status:t}=(0,e3.ex)(),r=e.fn.variant({variant:"filled",primaryFallback:!1,color:e3.Fi[t]});return r.background?(0,n.jsx)(eU.b,{color:r.background,size:20}):null}function tl(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ep.K,{py:"sm",px:"lg",spacing:4,children:[(0,n.jsx)(eM.M,{p:"md",pb:0,children:(0,n.jsx)(e6,{})}),(0,n.jsx)(s.x,{my:"xs",children:"Interact with any Stable Diffusion instance in realtime from Civitai"})]}),(0,n.jsx)(el.i,{}),(0,n.jsx)(ep.K,{children:(0,n.jsx)(a.z,{leftIcon:(0,n.jsx)(eX.Z,{size:18}),radius:0,onClick:()=>(0,e8.C)("civitai-link-wizard",{}),children:"Get Started"})})]})}function tc(){let{instance:e,createInstance:t}=(0,e3.ex)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e4.L,{iconColor:"yellow",icon:(0,n.jsx)(eV.Z,{}),radius:0,size:"md",color:"yellow",children:"Couldn't connect to SD instance!"}),(0,n.jsxs)(ep.K,{p:"sm",spacing:4,children:[(null==e?void 0:e.key)&&(0,n.jsxs)(ep.K,{spacing:0,align:"center",mb:"md",children:[(0,n.jsx)(s.x,{size:"md",weight:700,children:"Link Key"}),(0,n.jsx)(eB.q,{value:e.key,children:t=>{let{copied:r,copy:i}=t;return(0,n.jsx)(em.u,{label:"Copy",withinPortal:!0,children:(0,n.jsx)(a.z,{onClick:i,variant:"default",size:"lg",px:"sm",rightIcon:r?(0,n.jsx)(e0.Z,{size:16}):(0,n.jsx)(e1.Z,{size:16}),children:r?"Copied":e.key})})}})]}),(0,n.jsx)(s.x,{size:"md",weight:500,children:"Troubleshooting"}),(0,n.jsxs)(eH.a,{type:"unordered",children:[(0,n.jsx)(eH.a.Item,{children:"Make sure your SD instance is up and running."}),(0,n.jsxs)(eH.a.Item,{children:["If your instance is running and you are still unable to connect,"," ",(0,n.jsx)(s.x,{variant:"link",display:"inline",style:{cursor:"pointer"},onClick:()=>{var r;return t(null!==(r=null==e?void 0:e.id)&&void 0!==r?r:void 0)},children:"generate a new connection key"})," ","and add it to your SD instance."]})]})]})]})}function tu(){let e=(0,e3.VB)(e=>e.ids),{classes:t}=td();return e.length>0?(0,n.jsx)(eF.x.Autosize,{maxHeight:410,children:e.map(e=>(0,n.jsx)(tp,{id:e,p:"xs",pr:"sm",className:t.listItem},e))}):(0,n.jsx)(eM.M,{p:"lg",children:(0,n.jsx)(s.x,{color:"dimmed",children:"No activity for this instance"})})}let td=(0,P.k)(e=>({listItem:{"&:nth-of-type(2n + 1)":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]}}}));function tf(){let{status:e}=(0,e3.ex)(),t=(0,e3.VB)(e=>e.activityProgress),r=e3.Fi[e];return(0,n.jsxs)(B.x,{sx:{position:"relative"},children:[(0,n.jsx)(ec.A,{children:(0,n.jsx)(ez.z,{color:r,showZero:!!r,dot:!!r,children:(0,n.jsx)(e2.Z,{})})}),t&&t>0&&t<100&&(0,n.jsx)(eZ.E,{value:t,striped:!0,animate:!0,size:"sm",sx:{position:"absolute",bottom:-3,width:"100%"}})]})}function tp(e){let{id:t,...r}=e,i=(0,e3.VB)((0,o.useCallback)(e=>e.activities[t],[t])),{runCommand:a}=(0,e3.ex)(),l="resources:add"===i.type,c="resources:remove"===i.type;return l||c?(0,n.jsxs)(eh.Z,{align:"center",noWrap:!0,spacing:"xs",...r,children:[l?(0,n.jsx)(e5.Z,{}):(0,n.jsx)(eQ.Z,{}),(0,n.jsxs)(ep.K,{style:{flex:1},spacing:0,children:[(0,n.jsx)(s.x,{lineClamp:1,size:"md",weight:500,style:{lineHeight:1},children:i.resource.modelName||(l?i.resource.name:void 0)}),l&&"processing"===i.status?(0,n.jsx)(th,{progress:i.progress,remainingTime:i.remainingTime,speed:i.speed,style:{flex:1},onCancel:()=>{a({type:"activities:cancel",activityId:i.id})}}):"error"===i.status?(0,n.jsxs)(s.x,{color:"red",size:"xs",children:[i.status,": ",i.error]}):(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:"success"===i.status?l?"Downloaded":"Removed":(0,e9.Qs)(i.status)})]})]}):null}function th(e){let{progress:t,remainingTime:r,speed:i,onCancel:o,...a}=e;return t||r||i?(0,n.jsxs)(ep.K,{spacing:2,...a,children:[t&&(0,n.jsxs)(eh.Z,{spacing:4,children:[(0,n.jsx)(eZ.E,{sx:{width:"100%",flex:1},size:"xl",value:t,label:"".concat(Math.floor(t),"%"),color:t<100?"blue":"green",striped:!0,animate:!0}),(0,n.jsx)(ec.A,{onClick:o,children:(0,n.jsx)(m.Z,{})})]}),(i||r)&&(0,n.jsxs)(eh.Z,{position:"apart",children:[i?(0,n.jsx)(s.x,{size:"xs",color:"dimmed",children:"".concat((0,e7.td)(i),"/s")}):(0,n.jsx)("span",{}),r?(0,n.jsx)(s.x,{size:"xs",color:"dimmed",children:"".concat((0,e7.ZC)(r)," remaining")}):(0,n.jsx)("span",{})]})]}):null}var tm=r(21997),tg=r(17789),tv=r(10169);function ty(e){return(0,tv.d)()?(0,n.jsxs)(tg.C,{component:"a",style:{cursor:"pointer"},styles:{root:{"&:before":{animation:"".concat(tb," 2s linear infinite")}}},...e,href:"/twitch",target:"_blank",variant:"dot",color:"red",size:"sm",onClick:e=>{e.stopPropagation()},children:["Live",(0,n.jsx)("span",{className:"hide-mobile",children:" On Twitch"})]}):null}let tb=(0,O.F4)({"0%":{opacity:.25},"50%":{opacity:1},"100%":{opacity:.25}});var tx=r(36777),tw=r(1396),tS=r.n(tw);let tk={blue:{inner:["#081692","#1E043C"],outer:["#1284F7","#0A20C9"]},green:{inner:["#081692","#1E043C"],outer:["#1284F7","#0A20C9"]},halloween:{inner:["#926711","#3C1F0E"],outer:["#F78C22","#C98C17"]},christmas:{inner:["#126515","#070F0C"],outer:["#45A72A","#377B39"]},newyear:{inner:["#081692","#1E043C"],outer:["#1284F7","#0A20C9"]},stpatty:{inner:["#135F20","#020709"],outer:["#53C42B","#1D962F"]},pride:{inner:["#746A11","#2A7911","#117642","#106A71","#0E145E","#200D57"],outer:["#E04A4A","#E04A4A","#E0B54A","#4AE0D4","#4A6AE0","#D44AE0"]}},tj=new Date,tE=tj.getFullYear(),tO=tj.getMonth(),tC=tj.getDate(),tI=(0,tx.AS)(tE).getDate();function tP(){let[e]=(0,tm._)({key:"showDecorations",defaultValue:!0}),t=(0,o.useMemo)(()=>e?9===tO?"halloween":10===tO&&tC>=tI||11===tO&&tC<=25?"christmas":11===tO&&tC>=26?"newyear":2===tO&&tC>=14&&tC<=17?"stpatty":5===tO?"pride":null:null,[e]),r=t?tS()[t]:null,a=t?tk[t].inner:tk.blue.inner,s=t?tk[t].outer:tk.blue.outer;return(0,n.jsxs)("div",{className:(0,i.Z)(tS().logo,r),children:[(0,n.jsxs)(l.p,{href:"/",children:["halloween"===t&&(0,n.jsx)("img",{src:"/images/holiday/ghost.png",alt:"ghost",className:tS().flyOver}),"christmas"===t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:"/images/holiday/santa-hat.png",alt:"santa hat",className:tS().hat}),(0,n.jsxs)("div",{className:tS().deer,children:[(0,n.jsx)("img",{src:"/images/holiday/deer.png",alt:"deer",id:"deer"}),(0,n.jsx)("img",{src:"/images/holiday/deer-nose.png",alt:"deer nose",id:"nose",className:tS().nose}),(0,n.jsx)("img",{src:"/images/holiday/deer-glow.png",alt:"deer glow",id:"glow",className:tS().glow})]})]}),(0,n.jsx)("svg",{className:(0,i.Z)(tS().svg,"@sm:hidden"),xmlns:"http://www.w3.org/2000/svg",viewBox:"-1 0 22.7 22.7",children:(0,n.jsxs)("g",{children:["pride"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("linearGradient",{id:"innerGradient",gradientTransform:"rotate(45)",children:tA(tk.pride.inner)}),(0,n.jsx)("linearGradient",{id:"outerGradient",gradientTransform:"rotate(45)",children:tA(tk.pride.outer)})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("linearGradient",{id:"innerGradient",gradientUnits:"userSpaceOnUse",x1:"10.156",y1:"22.45",x2:"10.156",y2:"2.4614",gradientTransform:"matrix(1 0 0 -1 0 24)",children:[(0,n.jsx)("stop",{offset:"0",style:{stopColor:a[0]}}),(0,n.jsx)("stop",{offset:"1",style:{stopColor:a[1]}})]}),(0,n.jsxs)("linearGradient",{id:"outerGradient",gradientUnits:"userSpaceOnUse",x1:"10.156",y1:"22.45",x2:"10.156",y2:"2.45",gradientTransform:"matrix(1 0 0 -1 0 24)",children:[(0,n.jsx)("stop",{offset:"0",style:{stopColor:s[0]}}),(0,n.jsx)("stop",{offset:"1",style:{stopColor:s[1]}})]})]}),(0,n.jsx)("path",{style:{fill:"url(#innerGradient)"},d:"M1.5,6.6v10l8.7,5l8.7-5v-10l-8.7-5L1.5,6.6z"}),(0,n.jsx)("path",{style:{fill:"url(#outerGradient)"},d:"M10.2,4.7l5.9,3.4V15l-5.9,3.4L4.2,15V8.1 L10.2,4.7 M10.2,1.6l-8.7,5v10l8.7,5l8.7-5v-10C18.8,6.6,10.2,1.6,10.2,1.6z"}),(0,n.jsx)("path",{style:{fill:"#fff"},d:"M11.8,12.4l-1.7,1l-1.7-1v-1.9l1.7-1l1.7,1h2.1V9.3l-3.8-2.2L6.4,9.3v4.3l3.8,2.2l3.8-2.2v-1.2H11.8z"})]})}),(0,n.jsxs)("svg",{className:(0,i.Z)(tS().svg,"@max-sm:hidden"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 107 22.7",children:[(0,n.jsx)("defs",{children:(0,n.jsx)("linearGradient",{id:"prideGradient",gradientTransform:"rotate(45)",children:tA(tk.pride.outer)})}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{className:tS().c,d:"M20.8,1.7H3.7L1.5,4.1v15l2.3,2.3h17.1v-5.2H6.7V7h14.1V1.7z"}),(0,n.jsx)("path",{className:tS().ivit,d:"M76.1,1.7H56.6V7h7.2v14.3H69V7h7C76,7,76.1,1.7,76.1,1.7z M23.2,1.8v19.5h5.2V1.8C28.4,1.8,23.2,1.8,23.2,1.8z M30.8,1.8 v19.5h7.6l8.3-8.3V1.8h-5.2v8.3l-5.4,6V1.8C36.1,1.8,30.8,1.8,30.8,1.8z M49.1,1.8v19.5h5.2V1.8C54.3,1.8,49.1,1.8,49.1,1.8z"}),(0,n.jsx)("path",{className:tS().ai,d:"M100.3,1.8v19.5h5.2V1.8H100.3z M95.6,1.8H80.8l-2.3,2.3v17.2h5.2v-7.1h8.9v7.1h5.2V4.1C97.8,4.1,95.6,1.8,95.6,1.8z M92.7,8.9h-8.9V7h8.9V8.9z"}),(0,n.jsx)("path",{className:tS().accent,d:"M46.7,16.2v5.1h-5.1"})]})]})]}),(0,n.jsx)(ty,{className:tS().liveNow})]})}let tA=e=>e.map((t,r)=>{let i=r/(e.length-1)*100;return(0,n.jsx)("stop",{offset:"".concat(i,"%"),stopColor:t},r)});var tT=r(59226),tz=r(50970);function tN(){let e=(0,ex.xJ)(),{accounts:t,removeAccount:r,swapAccount:i,ogAccount:a,removeOgAccount:l}=(0,tz.e)(),[c,u]=(0,o.useState)(!1),d=async()=>{if(!e||!a)return;u(!0);let o="impersonate-back";(0,eW.c0)({id:o,loading:!0,autoClose:!1,title:"Switching back...",message:"-> ".concat(e.username," (").concat(e.id,")")});let s=Object.entries(t).find(e=>e[0]===a.id.toString());if(!s){u(!1),(0,eW.wD)({id:o,icon:(0,n.jsx)(m.Z,{size:18}),color:"red",title:"Failed to switch back",message:"Could not find original account"});return}r(e.id),l(),await i(s[1].token)};return a&&e&&a.id!==(null==e?void 0:e.id)?(0,n.jsx)(em.u,{label:(0,n.jsxs)(ep.K,{spacing:0,children:[(0,n.jsxs)(s.x,{children:["You are currently acting as ",e.username," (",e.id,")."]}),(0,n.jsxs)(s.x,{children:["Switch back to ",a.username,"."]})]}),position:"bottom",children:(0,n.jsx)(ec.A,{disabled:c,color:"red",variant:"transparent",onClick:d,sx:{boxShadow:"0 0 16px 2px red",borderRadius:"50%"},children:(0,n.jsx)(tT.Z,{})})}):(0,n.jsx)(n.Fragment,{})}var tR=r(88002),t_=(0,p.Z)("outline","badge","IconBadge",[["path",{d:"M17 17v-13l-5 3l-5 -3v13l5 3z",key:"svg-0"}]]);function tM(){let e=(0,d.g)(),t=(0,o.useMemo)(()=>[{label:"Reports",href:"/moderator/reports"},{label:"Images",href:"/moderator/images"},{label:"Image Tags",href:"/moderator/image-tags"},{label:"Models",href:"/moderator/models"},{label:"Tags",href:"/moderator/tags"},{label:"Generation",href:"/moderator/generation"},{label:"Withdrawal Requests",href:"/moderator/buzz-withdrawal-requests"},{label:"Rewards",href:"/moderator/rewards"},{label:"Auditor",href:"/moderator/auditor"},{label:"Rater",href:"/research/rater"},{label:"Sanity Images",href:"/moderator/research/rater-sanity"},{label:"Metadata Tester",href:"/testing/metadata-test"},{label:"Ratings Review",href:"/moderator/image-rating-review"},{label:"Cosmetic Shop",href:"/moderator/cosmetic-store"},{label:"Paddle Adjustments",href:"/moderator/paddle/adjustments",hidden:!e.paddleAdjustments},{label:"Announcements",href:"/moderator/announcements",hidden:!e.announcements},{label:"Blocklists",href:"/moderator/blocklists",hidden:!e.blocklists},{label:"Contests",href:"/moderator/contests"}].filter(e=>!e.hidden).map(e=>(0,n.jsx)(tR.v.Item,{component:l.p,href:e.href,children:e.label},e.href)),[e]);return(0,n.jsxs)(tR.v,{zIndex:eP._G.imageGeneration.drawerZIndex+1,withinPortal:!0,children:[(0,n.jsx)(tR.v.Target,{children:(0,n.jsx)(ec.A,{color:"yellow",variant:"transparent",children:(0,n.jsx)(t_,{})})}),(0,n.jsx)(tR.v.Dropdown,{children:t})]})}var tD=r(24020),tL=r(5152),tF=r.n(tL),tU=r(61119),tB=r(67993);let tH=tF()(()=>Promise.all([r.e(579),r.e(8789),r.e(6459)]).then(r.bind(r,26459)),{loadableGenerated:{webpack:()=>[26459]}});function tZ(){let e=(0,ed.useRouter)().asPath.startsWith("/user/notifications"),[t,r]=(0,o.useState)(null),i=(0,tB.EW)();return e?null:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{onClick:function(){tU.Pq.toggle({component:tH,props:{toggleNode:t},id:"notifications-drawer"})},ref:r,style:{height:"28px"},children:(0,n.jsx)(ez.z,{color:"red",overflowCount:99,label:i.all,size:16,offset:4,showZero:!1,dot:!1,withBorder:!0,inline:!0,styles:{indicator:{height:"20px !important",cursor:"pointer","> span":{marginBottom:"2px"}},common:{fontWeight:500,fontSize:12}},children:(0,n.jsx)(ec.A,{children:(0,n.jsx)(tD.Z,{})})})})})}var tW=r(66114),tV=r(3338),t$=r(62201);function tq(){let e=(0,j.rZ)(),{items:t,abort:r}=(0,t$.J)(),i=t.filter(e=>"uploading"===e.status);return i.length?(0,n.jsxs)(ef.J,{width:400,position:"bottom-end",children:[(0,n.jsx)(ef.J.Target,{children:(0,n.jsx)(ez.z,{color:"blue",label:i.length,showZero:!1,dot:!1,size:16,children:(0,n.jsx)(ec.A,{children:(0,n.jsx)(tW.Z,{})})})}),(0,n.jsxs)(ef.J.Dropdown,{p:0,children:[(0,n.jsxs)(eh.Z,{position:"apart",p:"sm",children:[(0,n.jsx)(s.x,{weight:"bold",size:"sm",children:"Files"}),(0,n.jsx)(em.u,{label:"Cancel all",position:"left",children:(0,n.jsx)(ec.A,{size:"sm",onClick:()=>{i.forEach(e=>r(e.uuid))},children:(0,n.jsx)(tV.Z,{})})})]}),(0,n.jsx)(el.i,{}),(0,n.jsx)(ep.K,{spacing:8,p:"sm",sx:{overflow:"auto",maxWidth:"100%",maxHeight:250},children:i.map(t=>{let{uuid:i,name:o,progress:a,speed:l,timeRemaining:c,status:u}=t;return(0,n.jsxs)(ep.K,{spacing:"xs",children:[(0,n.jsxs)(eh.Z,{spacing:"xs",noWrap:!0,children:[(0,n.jsx)(eh.Z,{noWrap:!0,children:(0,n.jsx)(tW.Z,{color:"uploading"===u?e.colors.blue[e.fn.primaryShade()]:void 0,size:20})}),(0,n.jsx)(s.x,{size:"sm",weight:500,lineClamp:1,sx:{flex:1,display:"inline-block"},children:o}),(0,n.jsx)(em.u,{label:"Cancel upload",position:"left",children:(0,n.jsx)(ec.A,{color:"red",onClick:()=>r(i),children:(0,n.jsx)(m.Z,{size:20})})})]}),(0,n.jsxs)(ep.K,{spacing:4,sx:{flex:1},children:[(0,n.jsx)(eZ.E,{size:"xl",radius:"xs",value:a,label:"".concat(Math.floor(a),"%"),color:a<100?"blue":"green",striped:!0,animate:!0}),(0,n.jsxs)(eh.Z,{position:"apart",noWrap:!0,children:[(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:"".concat((0,e7.td)(l),"/s")}),(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:"".concat((0,e7.ZC)(c)," remaining")})]})]})]},i)})})]})]}):null}var tG=r(6564),tK=(0,p.Z)("outline","christmas-ball","IconChristmasBall",[["path",{d:"M12 13m-8 0a8 8 0 1 0 16 0a8 8 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M11 5l1 -2l1 2",key:"svg-1"}],["path",{d:"M4.512 10.161c2.496 -1.105 4.992 -.825 7.488 .839c2.627 1.752 5.255 1.97 7.882 .653",key:"svg-2"}],["path",{d:"M4.315 15.252c2.561 -1.21 5.123 -.96 7.685 .748c2.293 1.528 4.585 1.889 6.878 1.081",key:"svg-3"}]]),tX=r(77488),tJ=r(28075),tY=r(66035);class tQ{nextInt(){return this.seed=(this.a*this.seed+this.c)%this.m,this.seed}number(){return Math.floor(this.nextInt()/this.m*1e18)/1e18}fromArray(e){return e[Math.floor(this.number()*e.length)]}constructor(e=Date.now()){this.m=2147483648,this.a=1103515245,this.c=12345,this.seed=e}}let t0=[{variant:"outline",color:"green",href:"/pricing?utm_campaign=doit",children:(0,n.jsx)(tJ.i,{src:eP._G.supporterBadge,width:24})},{variant:"outline",color:"green",href:"/pricing?utm_campaign=doit",children:(0,n.jsx)(s.x,{weight:500,children:"Do It"})},{variant:"light",color:"green",href:"/pricing?utm_campaign=emoji_money",children:(0,n.jsx)(s.x,{size:24,children:"\uD83D\uDCB8"})},{variant:"light",color:"green",href:"/pricing?utm_campaign=emoji_kiss",children:(0,n.jsx)(s.x,{size:24,children:"\uD83D\uDE18"})},{variant:"light",color:"red",href:"/pricing?utm_campaign=icon_heart",children:(0,n.jsx)(eq.Z,{color:"red",strokeWidth:2.5})}],t1={variant:"light",color:"green",href:"/pricing?utm_campaign=holiday_promo",children:(0,n.jsx)(tK,{color:"red"})},t2=()=>{let{seed:e}=(0,tY.b)(),{children:t,...r}=(0,tx.fq)()?t1:new tQ(e).fromArray(t0);return(0,n.jsxs)(tG.z,{withArrow:!0,openDelay:500,children:[(0,n.jsx)(tG.z.Target,{children:(0,n.jsxs)(a.z,{component:l.p,className:"relative z-10 cursor-pointer px-2",...r,children:[t,(0,n.jsx)(tX.Z,{size:18,strokeWidth:2.5})]})}),(0,n.jsxs)(tG.z.Dropdown,{children:[(0,n.jsx)(s.x,{children:"You should really press this button."}),(0,n.jsx)(s.x,{children:"There's stuff here you wanna see..."}),(0,n.jsx)(s.x,{children:"Do it! Click it! Really!"})]})]})};var t5=r(28855),t4=r(67084),t3=r(39759),t6=r(4736),t8=r(94707),t7=r(81811),t9=r(49255),re=r(54942),rt=r(74163),rr=r(2518),rn=r(86393),ri=r(32608),ro=r(3272),ra=r(93625),rs=r(74558),rl=r(40595),rc=r(56707),ru=r(10558),rd=r(99518),rf=r(18257),rp=r(86164),rh=r(36061),rm=r(18014),rg=r(92677),rv=r(48600),ry=r(27192),rb=r(99490),rx=r(38658);let rw=(0,ri.instantMeiliSearch)(y.O.NEXT_PUBLIC_SEARCH_HOST,y.O.NEXT_PUBLIC_SEARCH_CLIENT_KEY,{primaryKey:"id"}),rS={...rw,search:e=>e.every(e=>{let{params:t}=e;return!(null==t?void 0:t.query)})?Promise.resolve({results:e.map(()=>({hits:[],nbHits:0,nbPages:0,page:0,processingTimeMS:0,hitsPerPage:0,exhaustiveNbHits:!1,query:"",params:""}))}):rw.search(e)},rk=(0,P.k)(e=>({root:{flexGrow:1,[e.fn.smallerThan("md")]:{height:"100%",flexGrow:1}},wrapper:{[e.fn.smallerThan("md")]:{height:"100%"}},input:{borderRadius:0,[e.fn.smallerThan("md")]:{height:"100%"}},dropdown:{[e.fn.smallerThan("sm")]:{marginTop:"-7px"}},targetSelectorRoot:{width:"110px",[e.fn.smallerThan("md")]:{display:"none",height:"100%",'&, & > [role="combobox"], & > [role="combobox"] *':{height:"100%"}},[e.fn.smallerThan("sm")]:{width:"25%"}},targetSelectorInput:{borderTopRightRadius:0,borderBottomRightRadius:0,backgroundColor:"dark"===e.colorScheme?e.colors.gray[8]:e.colors.gray[3],paddingRight:"18px","&:not(:focus)":{borderRightStyle:"none"},[e.fn.smallerThan("md")]:{height:"100%"}},targetSelectorRightSection:{pointerEvents:"none"},searchButton:{borderTopLeftRadius:0,borderBottomLeftRadius:0,backgroundColor:"dark"===e.colorScheme?e.colors.gray[8]:e.colors.gray[3],color:"dark"===e.colorScheme?e.white:e.black,"&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.gray[7]:e.colors.gray[4]},[e.fn.smallerThan("md")]:{display:"none"}}})),rj=[{value:"models",label:"Models"},{value:"images",label:"Images"},{value:"articles",label:"Articles"},{value:"users",label:"Users"},{value:"collections",label:"Collections"},{value:"bounties",label:"Bounties"},{value:"tools",label:"Tools"}],rE=(0,o.forwardRef)((e,t)=>{let{...r}=e,[i,a]=(0,o.useState)("models"),s=(0,o.useMemo)(()=>[rg.PR.articles,rg.PR.bounties,rg.PR.models,rg.PR.images,rg.PR.collections,rg.PR.tools].some(e=>e===rg.PR[i]),[i]);return(0,n.jsxs)(t9.p,{searchClient:rS,indexName:rg.PR[i],future:{preserveSharedStateOnUnmount:!1},children:[s&&(0,n.jsx)(ry.Pj,{attributeName:s?"nsfwLevel":""}),(0,n.jsx)(rO,{...r,indexName:i,ref:t,onTargetChange:e=>{a(e)}})]})});rE.displayName="AutocompleteSearch";let rO=o.forwardRef(function(e,t){var r;let{onClear:i,onSubmit:a,className:l,searchBoxProps:c,indexName:u,onTargetChange:f,...p}=e,{classes:h}=rk(),m=(0,ed.useRouter)(),g=(0,ru.d)(),v=(0,d.g)(),y=(0,o.useRef)(null),{status:b}=(0,re.b)({catchError:!0}),{query:x,refine:w}=(0,rt.l)(c),{hits:S,results:k}=(0,rm.F)(),j=(null==k?void 0:k.index)?rg.j_[k.index]:u,[E,O]=(0,o.useState)(null),[C,I]=(0,o.useState)(x),[P,A]=(0,o.useState)(""),[T,z]=(0,o.useState)(""),[N]=(0,t3.c)(C,300),{trackSearch:R}=(0,rp.K)(),_="error"===b,{key:M,value:D}=(0,rv._x)(j,S),{items:L}=(0,rh.f)({type:M,data:D}),F=(0,o.useMemo)(()=>{if("stalled"===b)return[];let e=L.map(e=>({key:String(e.id),hit:e,value:""}));return(null==k?void 0:k.nbHits)&&k.nbHits>6&&e.push({key:"view-more",value:x,hit:null}),e},[b,L,null==k?void 0:k.nbHits,x]),U=()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.focus()},B=()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.blur()};(0,o.useImperativeHandle)(t,()=>({focus:U}));let H=()=>{if(C){let{query:e,searchPageQuery:t}=rP(j,C),r=rb.QS.stringify({query:e.trim(),...rb.QS.parse(t)});m.push("/search/".concat(j,"?").concat(r),void 0,{shallow:!1}),B()}null==a||a()},Z=()=>{I(""),null==i||i()};(0,t6.A)([["/",U],["mod+k",U]]),(0,o.useEffect)(()=>{if(N===x||E||_)return;let e=function(e,t){var r,n,i;let o=null!==(r=rI[e])&&void 0!==r?r:{};if(!(null==o?void 0:o.AIR))return null;let{AIR:a}=o,[s]=t.matchAll(a);if(!s)return null;if("models"===e){let e=null==s?void 0:null===(n=s.groups)||void 0===n?void 0:n.modelId,t=null==s?void 0:null===(i=s.groups)||void 0===i?void 0:i.modelVersionId;return e&&t?"/models/".concat(e,"?modelVersionId=").concat(t):null}return null}(j,N);if(e){m.push(e);return}let{query:t,filters:r,searchPageQuery:n}=rP(j,N);w(t),A(r),z(n)},[N,x]),(0,o.useEffect)(()=>{O(null)},[N]);let W=e=>{switch(j){case"articles":return"/".concat(j,"/").concat(e.id,"/").concat((0,e9.vY)(e.title));case"images":case"collections":return"/".concat(j,"/").concat(e.id);case"users":return"/user/".concat(e.username);case"tools":return"/".concat(j,"/").concat((0,e9.vY)(e.name));default:return"/".concat(j,"/").concat(e.id,"/").concat((0,e9.vY)(e.name))}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(rr.T,{hitsPerPage:6,filters:P}),(0,n.jsxs)(eh.Z,{className:h.wrapper,spacing:0,noWrap:!0,children:[(0,n.jsx)(t5.Ph,{classNames:{root:h.targetSelectorRoot,input:h.targetSelectorInput,rightSection:h.targetSelectorRightSection},maxDropdownHeight:280,defaultValue:rj[0].value,data:rj.filter(e=>{let{value:t}=e;return(!!v.imageSearch||"images"!==t)&&(!!v.bounties||"bounties"!==t)&&(!!v.articles||"articles"!==t)&&(!!v.toolSearch||"tools"!==t)}),rightSection:(0,n.jsx)(t7.Z,{size:16,color:"currentColor"}),sx:{flexShrink:1},onChange:f,autoComplete:"off",withinPortal:!0}),(0,n.jsx)(rn.q,{ref:y,className:l,classNames:h,placeholder:"Search Civitai",type:"search",nothingFound:_?(0,n.jsxs)(ep.K,{spacing:0,align:"center",children:[(0,n.jsx)(s.x,{children:"There was an error while performing your request…"}),(0,n.jsx)(s.x,{size:"xs",children:"Please try again later"})]}):x&&!S.length?(0,n.jsx)(ep.K,{spacing:0,align:"center",children:(0,n.jsx)(rc.S,{delay:1500,renderTimeout:()=>(0,n.jsx)(s.x,{children:"No results found"})})}):void 0,limit:k&&k.nbHits>6?7:6,defaultValue:x,value:C,data:F,onChange:I,onBlur:Z,onClear:Z,onKeyDown:(0,t8.yr)([["Escape",B],["Enter",H]]),onItemSubmit:e=>{e.hit?(m.push(W(e.hit)),R({query:C,index:rg.PR[j]}).catch(()=>null)):m.push("/search/".concat(j,"?query=").concat(encodeURIComponent(e.value)),void 0,{shallow:!1}),O(e),null==a||a()},itemComponent:null!==(r=rC[j])&&void 0!==r?r:ro.C,rightSection:(0,n.jsxs)(tG.z,{withArrow:!0,width:300,shadow:"sm",openDelay:500,children:[(0,n.jsx)(tG.z.Target,{children:(0,n.jsx)(s.x,{weight:"bold",sx:e=>({border:"1px solid ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]),borderRadius:e.radius.sm,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0],color:"dark"===e.colorScheme?e.colors.gray[5]:e.colors.gray[6],textAlign:"center",width:24,userSelect:"none"}),children:"/"})}),(0,n.jsxs)(tG.z.Dropdown,{children:[(0,n.jsx)(s.x,{size:"sm",color:"yellow",weight:500,children:"Pro-tip: Quick search faster!"}),(0,n.jsxs)(s.x,{size:"xs",lh:1.2,children:["Open the quick search without leaving your keyboard by tapping the ",(0,n.jsx)(t4.E,{children:"/"})," ","key from anywhere and just start typing."]})]})]}),filter:()=>!0,clearable:x.length>0,maxDropdownHeight:g?"calc(90vh - var(--header-height))":void 0,...p},j),(0,n.jsx)(ec.A,{className:h.searchButton,variant:"filled",size:36,onMouseDown:H,children:(0,n.jsx)(eu.Z,{size:18})})]})]})}),rC={models:ro.C,articles:ra.J,users:rs.N,images:rl.H,collections:rd.k,bounties:rf.U,tools:rx.k},rI={models:{AIR:RegExp("^civitai:(?\\d+)@(?\\d+)","g"),filters:{"tags.name":RegExp("(^|\\s+)(?!|-)?#(?\\w+)","g"),"user.username":RegExp("(^|\\s+)(?!|-)?@(?\\w+)","g"),"versions.hashes":RegExp("(^|\\s+)(?!|-)?hash:(?[A-Za-z0-9_.-]+)","g")},searchPageMap:{"user.username":"users","tags.name":"tags"}}};function rP(e,t){let r=rI[e],n=[],i=[];if(r)for(let[e,c]of Object.entries(r.filters)){for(let u of t.matchAll(c)){var o,a,s,l;let t=null==u?void 0:null===(a=u.groups)||void 0===a?void 0:null===(o=a.value)||void 0===o?void 0:o.trim(),c=(null==u?void 0:null===(s=u.groups)||void 0===s?void 0:s.not)!==void 0;n.push("".concat(c?"NOT ":"").concat(e," = ").concat(t)),i.push("".concat(null!==(l=r.searchPageMap[e])&&void 0!==l?l:e,"=").concat(encodeURIComponent(null!=t?t:"")))}0===(t=t.replace(c,"")).length&&0!==n.length&&(t=" ")}return{query:t,filters:n.join(" AND "),searchPageQuery:i.join("&")}}var rA=r(34736),rT=r(36972),rz=r(99985),rN=r(236),rR=r(17806),r_=r(65695),rM=r(92918),rD=(0,p.Z)("outline","bookmark-edit","IconBookmarkEdit",[["path",{d:"M12 17l-6 4v-14a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v4",key:"svg-0"}],["path",{d:"M18.42 15.61a2.1 2.1 0 1 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z",key:"svg-1"}]]),rL=r(81439),rF=r(56125),rU=r(38420),rB=r(71674),rH=r(59862),rZ=r(58937),rW=(0,p.Z)("outline","history","IconHistory",[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]]),rV=r(58823),r$=(0,p.Z)("outline","user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),rq=r(90693),rG=(0,p.Z)("outline","photo-up","IconPhotoUp",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l3.5 3.5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.679 -.653 1.473 -.829 2.214 -.526",key:"svg-3"}],["path",{d:"M19 22v-6",key:"svg-4"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-5"}]]),rK=(0,p.Z)("outline","video-plus","IconVideoPlus",[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z",key:"svg-0"}],["path",{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M7 12l4 0",key:"svg-2"}],["path",{d:"M9 10l0 4",key:"svg-3"}]]),rX=r(42362),rJ=(0,p.Z)("outline","writing","IconWriting",[["path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z",key:"svg-0"}],["path",{d:"M16 7h4",key:"svg-1"}],["path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3",key:"svg-2"}]]),rY=r(9939);let rQ=tF()(()=>Promise.all([r.e(4713),r.e(8740)]).then(r.bind(r,98740)),{loadableGenerated:{webpack:()=>[98740]}});function r0(){var e;let t=(0,d.g)(),r=(0,ex.xJ)(),n=(0,j.rZ)(),i=null!==(e=null==r?void 0:r.muted)&&void 0!==e&&e;return[{href:"/generate",visible:!i,rel:"nofollow",icon:rq.Z,color:n.colors.blue[n.fn.primaryShade()],label:"Generate"},{href:"/posts/create",visible:!i,redirectReason:"post-images",rel:"nofollow",icon:rG,color:n.colors.blue[n.fn.primaryShade()],label:"Post images"},{href:"/posts/create?video=true",visible:!i,redirectReason:"post-images",rel:"nofollow",icon:rK,color:n.colors.blue[n.fn.primaryShade()],label:"Post videos"},{href:"/models/create",visible:!i,redirectReason:"upload-model",rel:"nofollow",icon:rX.Z,color:n.colors.blue[n.fn.primaryShade()],label:" Upload a model"},{href:"/models/train",visible:!i&&t.imageTraining,redirectReason:"train-model",rel:"nofollow",icon:rR.Z,color:n.colors.blue[n.fn.primaryShade()],label:"Train a LoRA",currency:!0},{href:"/articles/create",visible:!i&&t.articles,redirectReason:"create-article",rel:"nofollow",icon:rJ,color:n.colors.blue[n.fn.primaryShade()],label:"Write an article"},{href:"/bounties/create",visible:!i&&t.bounties,redirectReason:"create-bounty",rel:"nofollow",icon:rL.Z,color:n.colors.blue[n.fn.primaryShade()],label:"Create a bounty",currency:!0},{href:"/clubs/create",visible:!i&&t.clubs,redirectReason:"create-club",rel:"nofollow",icon:rF.Z,color:n.colors.blue[n.fn.primaryShade()],label:"Create a club"}]}function r1(){let e=(0,ex.xJ)(),{data:t}=eR.SX.user.getCreator.useQuery({id:null==e?void 0:e.id},{enabled:!!e});return t}var r2=r(65297),r5=r(54870),r4=(0,p.Z)("outline","sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),r3=(0,p.Z)("outline","moon-stars","IconMoonStars",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]]),r6=r(3288),r8=r(11621),r7=r(46812),r9=(0,p.Z)("outline","logout-2","IconLogout2",[["path",{d:"M10 8v-2a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-2",key:"svg-0"}],["path",{d:"M15 12h-12l3 -3",key:"svg-1"}],["path",{d:"M6 15l-3 -3",key:"svg-2"}]]),ne=r(9749),nt=r(70652),nr=r(2807),nn=r(94626),ni=r(13520),no=r(35818),na=r(70096),ns=r(46673),nl=r.n(ns);function nc(e){let{opened:t,className:r}=e;return(0,n.jsx)("div",{className:(0,i.Z)(nl().root,r),children:(0,n.jsx)("div",{"data-opened":t||void 0,className:nl().burger})})}var nu=r(38574);let nd=(0,o.createContext)({handleClose:()=>void 0});function nf(){return(0,o.useContext)(nd)}function np(){let e=(0,ex.xJ)(),t=(0,d.g)(),r=r1(),a=(0,ru.d)({breakpoint:"md"}),[s,l]=(0,o.useState)(!1);return(0,n.jsxs)(ef.J,{width:a?"100%":260,position:"bottom-end",opened:s,onChange:l,children:[(0,n.jsx)(ef.J.Target,{children:(0,n.jsxs)(rA.k,{className:"flex items-center @md:rounded-[32px]",type:"button",onClick:()=>l(e=>!e),children:[(0,n.jsxs)("div",{className:(0,i.Z)("flex items-center gap-2 @max-md:hidden",{hidden:!e}),children:[(0,n.jsx)(r2.Y,{user:null!=r?r:e,size:"md"}),t.buzz&&e&&(0,n.jsx)(r5.a,{pr:"sm"})]}),(0,n.jsx)(nc,{opened:s,className:(0,i.Z)({"@md:hidden":!!e})})]})}),(0,n.jsx)(ef.J.Dropdown,{className:"flex flex-col p-0 @max-md:mt-2 @max-md:h-[calc(100%-var(--header-height))]",children:(0,n.jsx)(nd.Provider,{value:{handleClose:()=>l(!1)},children:(0,n.jsx)(nh,{})})})]})}function nh(){let{handleClose:e}=nf(),[t,r]=(0,o.useState)(!1);function i(){r(e=>!e)}return(0,t6.A)([["Escape",e]]),(0,n.jsx)("div",{className:"flex h-full flex-1 flex-col @md:max-h-[calc(90vh-var(--header-height))]",children:t?(0,n.jsx)(nv,{onAccountClick:i}):(0,n.jsx)(nm,{onAccountClick:i})})}function nm(e){let{onAccountClick:t}=e,r=(0,j.rZ)(),i=(0,ex.xJ)(),a=r1(),{colorScheme:s,toggleColorScheme:c}=(0,rT.X)(),{logout:u}=(0,tz.e)(),{handleClose:f}=nf(),p=function(){let e=(0,ed.useRouter)(),t=(0,d.g)(),r=(0,ex.xJ)(),n=(0,j.rZ)(),{groupedCollections:{Article:i,Model:o}}=(0,rY.oS)();return[{visible:!!r,items:[{href:"/user/".concat(null==r?void 0:r.username),icon:rN.Z,color:n.colors.blue[n.fn.primaryShade()],label:"Your Profile"},{href:"/user/".concat(null==r?void 0:r.username,"/models?section=training"),visible:!!r&&t.imageTrainingResults,icon:rR.Z,color:n.colors.green[n.fn.primaryShade()],label:"Training"},{href:"/collections",icon:r_.Z,color:n.colors.green[n.fn.primaryShade()],label:"My Collections"},{href:"/collections/".concat(null==o?void 0:o.id),icon:rM.Z,color:n.colors.green[n.fn.primaryShade()],label:"Liked models"},{href:"/collections/".concat(null==i?void 0:i.id),visible:!!i,icon:rD,color:n.colors.pink[n.fn.primaryShade()],label:"Bookmarked articles"},{href:"/bounties?engagement=favorite",as:"/bounties",visible:t.bounties,icon:rL.Z,color:n.colors.pink[n.fn.primaryShade()],label:"My bounties"},{href:"/clubs?engagement=engaged",as:"/clubs",visible:t.clubs,icon:rF.Z,color:n.colors.pink[n.fn.primaryShade()],label:"My clubs"},{href:"/user/buzz-dashboard",visible:t.buzz,icon:rU.Z,color:n.colors.yellow[n.fn.primaryShade()],label:"Buzz dashboard"},{href:"/user/vault",visible:t.vault,icon:rB.Z,color:n.colors.yellow[n.fn.primaryShade()],label:"My vault"}]},{visible:!!r,items:[{href:"/leaderboard/overall",icon:rH.Z,color:n.colors.yellow[n.fn.primaryShade()],label:"Leaderboard"},{href:"/product/link",icon:eY,label:"Download Link App"},{href:"/user/".concat(null==r?void 0:r.username,"/following"),icon:rZ.Z,label:"Creators you follow"},{href:"/user/downloads",icon:rW,label:"Download history"},{icon:rV.Z,label:"Getting Started",onClick:()=>{tU.Pq.trigger({component:rQ,props:{feature:"getting-started",contentSlug:["feature-introduction","welcome"]}})}}]},{visible:!r,items:[{href:"/leaderboard/overall",icon:rH.Z,color:n.colors.yellow[n.fn.primaryShade()],label:"Leaderboard"},{href:"/product/link",icon:eY,label:"Download Link App"},{href:"/login?returnUrl=".concat(e.asPath),rel:"nofollow",icon:r$,label:"Sign In/Sign up"}]}]}(),h=r0(),m=p.filter(e=>e.visible);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-1 flex-col overflow-y-auto overflow-x-hidden p-1 scrollbar-thin",children:[i&&(0,n.jsxs)(nx,{className:"flex items-center justify-between",onClick:t,children:[(0,n.jsx)(r2.Y,{user:null!=a?a:i,withUsername:!0}),(0,n.jsx)(tX.Z,{})]}),i&&(0,n.jsx)(nS,{}),(0,n.jsxs)("div",{className:"@md:hidden",children:[(0,n.jsx)(ng,{items:h}),(0,n.jsx)(el.i,{})]}),m.map((e,t)=>(0,n.jsxs)(o.Fragment,{children:[0!==t&&tc(),size:"lg",className:"flex-1",sx:e=>({color:"dark"===e.colorScheme?e.colors.yellow[e.fn.primaryShade()]:e.colors.blue[e.fn.primaryShade()]}),children:"dark"===s?(0,n.jsx)(r4,{size:18}):(0,n.jsx)(r3,{size:18})})}),i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(em.u,{label:"Account settings",children:(0,n.jsx)(ec.A,{variant:"default",size:"lg",onClick:f,component:l.p,href:"/user/account",className:"flex-1",children:(0,n.jsx)(eG.Z,{stroke:1.5})})}),(0,n.jsx)(em.u,{label:"Logout",children:(0,n.jsx)(ec.A,{variant:"default",onClick:()=>u(),size:"lg",className:"flex-1",children:(0,n.jsx)(r6.Z,{stroke:1.5,color:r.colors.red[r.fn.primaryShade()]})})})]})]})]})}function ng(e){let{items:t}=e;return(0,n.jsx)(n.Fragment,{children:t.filter(e=>!1!==e.visible).map((e,t)=>{let r=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.icon,{stroke:1.5,color:e.color}),(0,n.jsx)("span",{className:"text-sm leading-none",children:e.label}),e.currency&&(0,n.jsx)(ni.r,{currency:no.F.BUZZ,size:16})]}),i=e.href?(0,n.jsx)(nw,{href:e.href,rel:e.rel,as:e.as,children:r}):(0,n.jsx)(nx,{onClick:e.onClick,children:r});return e.redirectReason?(0,n.jsx)(na.b,{reason:e.redirectReason,returnUrl:e.href,children:i},t):(0,n.jsx)(o.Fragment,{children:i},t)})})}function nv(e){let{onAccountClick:t}=e,{accounts:r,swapAccount:o}=(0,tz.e)(),{handleClose:a}=nf();return(0,n.jsxs)("div",{className:"flex flex-1 flex-col overflow-y-auto overflow-x-hidden p-1 scrollbar-thin",children:[(0,n.jsxs)(nx,{onClick:t,children:[(0,n.jsx)(r8.Z,{}),(0,n.jsx)("span",{className:"text-sm leading-none",children:"Back"})]}),(0,n.jsx)(el.i,{}),Object.entries(r).map(e=>{let[t,r]=e;return(0,n.jsxs)(nx,{onClick:r.active?void 0:()=>o(r.token),className:(0,i.Z)("flex items-center justify-between gap-2.5",{"cursor-auto":r.active}),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(nb,{data:r}),(0,n.jsx)(ne.R,{username:r.username})]}),r.active&&(0,n.jsx)(r7.Z,{size:20,color:"green"})]},t)}),(0,n.jsx)(el.i,{}),(0,n.jsx)("div",{className:"p-4 @md:p-1 @md:pt-2",children:(0,n.jsx)(ny,{close:a})})]})}function ny(e){let{close:t}=e,r=(0,ed.useRouter)(),{logout:i,logoutAll:s}=(0,tz.e)(),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!1),[f,p]=(0,o.useState)(!1);return(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsx)(a.z,{variant:"light",loading:l,onClick:()=>{c(!0),r.push((0,nn.UD)({returnUrl:r.asPath,reason:"switch-accounts"})).then(()=>{t(),c(!1)})},children:l?"Redirecting...":"Add Account"}),(0,n.jsx)(a.z,{variant:"default",leftIcon:(0,n.jsx)(r6.Z,{stroke:1.5,size:18}),loading:u,disabled:f,onClick:()=>{d(!0),i().catch(e=>{d(!1),(0,nr.s9)({title:"Error logging out",error:Error(e.message)})})},children:u?"Logging out...":"Logout"}),(0,n.jsx)(a.z,{variant:"default",leftIcon:(0,n.jsx)(r9,{stroke:1.5,size:18}),loading:f,disabled:u,onClick:()=>{p(!0),s().catch(e=>{p(!1),(0,nr.s9)({title:"Error logging out",error:Error(e.message)})})},children:f?"Logging out...":"Logout All"})]})}function nb(e){let{data:t}=e,r=(0,j.rZ)(),{avatarUrl:i,email:o,username:a}=t,s=(0,nt.hs)(i,{width:96}),l="dark"===r.colorScheme?"rgba(255,255,255,0.31)":"rgba(0,0,0,0.31)";return(0,n.jsx)(em.u,{label:o,children:(0,n.jsx)(rz.q,{src:s,alt:o,radius:"xl",size:"sm",imageProps:{loading:"lazy",referrerPolicy:"no-referrer"},sx:{backgroundColor:l},children:(0,e9.Qm)(a)})})}function nx(e){let{children:t,className:r,...o}=e,{handleClose:a}=nf();return(0,n.jsx)("button",{className:(0,i.Z)("flex items-center gap-2.5 px-4 py-3 hover:bg-gray-1 @md:px-3 @md:py-2.5 hover:dark:bg-dark-4",r),onClick:a,...o,children:t})}function nw(e){let{children:t,className:r,...o}=e,{handleClose:a}=nf();return(0,n.jsx)(l.p,{className:(0,i.Z)("flex items-center gap-2.5 px-4 py-3 hover:bg-gray-1 @md:px-3 @md:py-2.5 hover:dark:bg-dark-4",r),onClick:a,...o,children:t})}function nS(){let e=(0,d.g)(),t=(0,ex.xJ)(),r=(0,ru.d)({breakpoint:"md"}),i=(0,nu.x)(),{handleClose:o}=nf();return e.buzz&&t?(0,n.jsxs)(nw,{href:"/user/buzz-dashboard",className:"-mx-1 my-1 flex items-center justify-between bg-gray-2 dark:bg-dark-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",onClick:o,children:[(0,n.jsx)(r5.a,{iconSize:16,textSize:r?"sm":"md",withAbbreviation:!r,withTooltip:!r,accountType:"user"}),(0,n.jsx)(r5.a,{iconSize:16,textSize:r?"sm":"md",withAbbreviation:!r,withTooltip:!r,accountType:"generation"})]}),(0,n.jsx)(a.z,{component:"div",variant:"white",radius:"xl",size:"xs",px:12,compact:!0,onClick:e=>{e.preventDefault(),e.stopPropagation(),i({})},children:"Buy Buzz"})]}):null}var nk=r(41169);function nj(){let e=(0,d.g)(),t=(0,ru.d)({breakpoint:"md"});return(0,n.jsxs)(tR.v,{position:"bottom",offset:5,withArrow:!0,trigger:"hover",openDelay:400,zIndex:eP._G.imageGeneration.drawerZIndex+2,withinPortal:!0,disabled:t,children:[(0,n.jsx)(tR.v.Target,{children:e.imageGeneration?(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(nk.F,{variant:"light",py:8,pl:12,pr:4,h:"auto",radius:"sm",mode:"toggle",sx:()=>({borderTopRightRadius:0,borderBottomRightRadius:0}),compact:!0,"data-activity":"create:navbar",className:"h-auto px-3 py-2 @md:pr-1"}),(0,n.jsx)(a.z,{variant:"light",py:8,px:4,h:"auto",radius:"sm",sx:()=>({borderTopLeftRadius:0,borderBottomLeftRadius:0}),className:"@max-md:hidden",children:(0,n.jsx)(t7.Z,{stroke:2,size:20})})]}):(0,n.jsxs)(a.z,{className:"flex @max-md:hidden",variant:"filled",color:"green",size:"xs",pl:5,children:[(0,n.jsx)(eX.Z,{size:16})," New"]})}),(0,n.jsx)(tR.v.Dropdown,{children:(0,n.jsx)(nE,{})})]})}function nE(){let e=r0();return(0,n.jsx)(n.Fragment,{children:e.filter(e=>{let{visible:t}=e;return!1!==t}).map((e,t)=>{let r=(0,n.jsx)(tR.v.Item,{component:l.p,href:e.href,as:e.as,rel:e.rel,children:(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)(e.icon,{stroke:1.5,color:e.color}),e.label,e.currency&&(0,n.jsx)(ni.r,{currency:no.F.BUZZ,size:16})]})},e.redirectReason?void 0:t);return e.redirectReason?(0,n.jsx)(na.b,{reason:e.redirectReason,returnUrl:e.href,children:r},t):r})})}function nO(e){let{onSearchDone:t,isMobile:r,ref:i}=e;return r?(0,n.jsx)(rE,{variant:"filled",onClear:t,onSubmit:t,rightSection:null,ref:i}):(0,n.jsx)(rE,{})}function nC(e){var t;let{renderSearchComponent:r=nO,fixed:s=!0}=e,c=(0,ex.xJ)(),u=(0,ed.useRouter)(),f=(0,d.g)(),p=(0,o.useRef)(null),h=null!==(t=null==c?void 0:c.muted)&&void 0!==t&&t,[m,g]=(0,o.useState)(!1),v=()=>g(!1);return(0,n.jsxs)(ea,{height:60,fixed:s,zIndex:199,className:(0,i.Z)({"border-green-8 border-b-[3px]":f.isGreen}),children:[(0,n.jsx)("div",{className:(0,i.Z)("h-full",{hidden:!m}),children:r({onSearchDone:v,isMobile:!0,ref:p})}),(0,n.jsxs)(es.r,{className:(0,i.Z)("flex h-full flex-nowrap items-center justify-between px-2 @md:px-4",{hidden:m}),m:0,gutter:"xs",align:"center",children:[(0,n.jsx)(es.r.Col,{span:"auto",pl:0,children:(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)(tP,{}),(0,n.jsx)(t2,{})]})}),(0,n.jsx)(es.r.Col,{span:6,md:4,className:"@max-md:hidden",children:r({onSearchDone:v,isMobile:!1})}),(0,n.jsxs)(es.r.Col,{span:"auto",className:"flex items-center justify-end gap-3 @max-md:hidden",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[!h&&(0,n.jsx)(nj,{}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tq,{}),(0,n.jsx)(te,{})]}),c&&f.canViewNsfw&&(0,n.jsx)(eA,{}),c&&(0,n.jsx)(tZ,{}),c&&f.chat&&(0,n.jsx)(e_,{}),(null==c?void 0:c.isModerator)&&(0,n.jsx)(tM,{}),c&&(0,n.jsx)(tN,{})]}),c?(0,n.jsx)(el.i,{orientation:"vertical"}):(0,n.jsx)(a.z,{component:l.p,href:"/login?returnUrl=".concat(u.asPath),rel:"nofollow",variant:"default",children:"Sign In"}),(0,n.jsx)(np,{})]}),(0,n.jsx)(es.r.Col,{span:"auto",className:"flex items-center justify-end @md:hidden",children:(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[!h&&(0,n.jsx)(nj,{}),(0,n.jsx)(ec.A,{onClick:()=>g(!0),children:(0,n.jsx)(eu.Z,{})}),c&&(0,n.jsx)(te,{}),c&&(0,n.jsx)(tZ,{}),c&&f.chat&&(0,n.jsx)(e_,{}),c&&(0,n.jsx)(tN,{}),(0,n.jsx)(np,{})]})})]})]})}var nI=r(62827),nP=r(24621),nA=r(30914),nT=r(81447);let nz=(0,P.k)(e=>({filtersWrapper:{[nT.D.smallerThan("sm")]:{width:"100%","> *":{flexGrow:1}}},subnavDropdown:{background:"transparent",color:"dark"===e.colorScheme?e.white:e.colors.gray[8],height:32,"&:hover":{background:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[3]},'&[data-expanded="true"]':{background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4],"&:hover":{background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}}}}));var nN=(0,p.Z)("outline","users-group","IconUsersGroup",[["path",{d:"M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1",key:"svg-1"}],["path",{d:"M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-2"}],["path",{d:"M17 10h2a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-4"}],["path",{d:"M3 13v-1a2 2 0 0 1 2 -2h2",key:"svg-5"}]]),nR=r(80223),n_=r(38266),nM=r(38394),nD=r(14619);function nL(e){return"string"==typeof e.value?(0,n.jsx)(nF,{...e}):(0,n.jsx)(nU,{...e,type:e.type})}function nF(e){var t;let{type:r,value:i,onChange:o,...a}=e,s={label:"true"===i?"Followed":"Everyone",options:[{label:"Followed",value:"true"},{label:"Everyone",value:"false"}],onClick:o,value:i};null!==(t=a.variant)&&void 0!==t||(a.variant="menu");let l="true"===i;return(0,n.jsxs)(n.Fragment,{children:["menu"===a.variant&&(0,n.jsx)(n_.S,{...s}),"button"===a.variant&&(0,n.jsx)(n_._,{...s,buttonProps:a.buttonProps,icon:l?(0,n.jsx)(nN,{size:16}):(0,n.jsx)(nR.Z,{size:16})})]})}function nU(e){var t;let{type:r,variant:i,...o}=e,{query:a,pathname:s,replace:l}=(0,ed.useRouter)(),c=(0,nM.PH)(e=>e[r].followed),u=a.followed,d=(0,nM.Bx)(r),f=u||(null!==(t=null==c?void 0:c.toString())&&void 0!==t?t:"false");return(0,n.jsx)(nF,{type:r,value:f,onChange:e=>{u&&u!==e&&l({pathname:s,query:(0,nD.HO)({...a,followed:void 0})},void 0,{shallow:!0}),d({followed:"true"===e})},variant:i,...o})}var nB=r(7001),nH=r(60136),nZ=r(43597);let nW=[no.YV.ModelCreation,no.YV.LoraCreation,no.YV.EmbedCreation],nV=e=>e.some(e=>nW.includes(e));function n$(e){var t,r,i,s,l,c,u;let{...d}=e,{classes:f,theme:p,cx:h}=nq(),m=(0,ru.d)(),[g,v]=(0,o.useState)(!1),{filters:y,setFilters:b}=(0,nM.PH)(e=>({filters:e.bounties,setFilters:e.setBountyFilters})),x=(null!==(i=null===(t=y.types)||void 0===t?void 0:t.length)&&void 0!==i?i:0)+(null!==(s=null===(r=y.baseModels)||void 0===r?void 0:r.length)&&void 0!==s?s:0)+(y.status?1:0)+(y.period!==no.Tz.AllTime?1:0),w=(0,o.useCallback)(()=>b({types:void 0,status:void 0,baseModels:void 0,period:no.Tz.AllTime}),[b]),S={size:"sm",radius:"xl",variant:"filled",classNames:f},k=nV(null!==(l=y.types)&&void 0!==l?l:[]),j=(0,n.jsx)(ez.z,{offset:4,label:x||void 0,size:16,zIndex:10,showZero:!1,dot:!1,classNames:{root:f.indicatorRoot,indicator:f.indicatorIndicator},inline:!0,children:(0,n.jsx)(a.z,{className:f.actionButton,color:"gray",radius:"xl",variant:"dark"===p.colorScheme?"filled":"light",...d,rightIcon:(0,n.jsx)(t7.Z,{className:h({[f.opened]:g}),size:16}),onClick:()=>v(e=>!e),"data-expanded":g,children:(0,n.jsxs)(eh.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(nH.Z,{size:16}),"Filters"]})})}),E=(0,n.jsxs)(ep.K,{spacing:"lg",children:[(0,n.jsxs)(ep.K,{spacing:"md",children:[(0,n.jsx)(el.i,{label:"Time period",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(nZ.q,{type:"bounties",variant:"chips"})]}),(0,n.jsxs)(ep.K,{spacing:"md",children:[(0,n.jsx)(el.i,{label:"Bounty type",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(eb.A.Group,{spacing:8,value:null!==(c=y.types)&&void 0!==c?c:[],onChange:e=>{let t=!nV(e);b({types:e,baseModels:t?void 0:y.baseModels})},multiple:!0,children:Object.values(no.YV).map((e,t)=>(0,n.jsx)(eb.A,{value:e,...S,children:(0,n.jsx)("span",{children:(0,e9.Gf)(e)})},t))})]}),k&&(0,n.jsxs)(ep.K,{spacing:"md",children:[(0,n.jsx)(el.i,{label:"Base model",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(eb.A.Group,{spacing:8,value:null!==(u=y.baseModels)&&void 0!==u?u:[],onChange:e=>b({baseModels:e}),multiple:!0,children:eP.Bj.map((e,t)=>(0,n.jsx)(eb.A,{value:e,...S,children:(0,n.jsx)("span",{children:e})},t))})]}),(0,n.jsxs)(ep.K,{spacing:"md",children:[(0,n.jsx)(el.i,{label:"Bounty status",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(eh.Z,{spacing:8,children:Object.values(eS.lQ).map((e,t)=>(0,o.createElement)(eb.A,{...S,key:t,checked:y.status===e,onChange:t=>b({status:t?e:void 0})},(0,n.jsx)("span",{children:(0,e9.Gf)(e)})))})]}),x>0&&(0,n.jsx)(a.z,{color:"gray",variant:"dark"===p.colorScheme?"filled":"light",onClick:w,fullWidth:!0,children:"Clear all filters"})]});return m?(0,n.jsxs)(n.Fragment,{children:[j,(0,n.jsx)(nB.d,{opened:g,onClose:()=>v(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--header-height))",overflowY:"auto"},body:{padding:16,paddingTop:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:E})]}):(0,n.jsxs)(ef.J,{zIndex:200,position:"bottom-end",shadow:"md",radius:12,onClose:()=>v(!1),middlewares:{flip:!0,shift:!0},children:[(0,n.jsx)(ef.J.Target,{children:j}),(0,n.jsx)(ef.J.Dropdown,{maw:468,p:"md",w:"100%",children:E})]})}let nq=(0,P.k)(e=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}},opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"},actionButton:{[nT.D.smallerThan("sm")]:{width:"100%"}},indicatorRoot:{lineHeight:1},indicatorIndicator:{lineHeight:1.6}}));var nG=r(49926),nK=r(29488),nX=r(73620),nJ=r(67731),nY=r(89220),nQ=r(72535),n0=r.n(nQ),n1=r(76705);let n2=Object.keys(no.FG);function n5(e){let{query:t,onChange:r,...s}=e,l=(0,j.rZ)(),c=(0,ru.d)(),u=(0,n1.O)(),[d,f]=(0,o.useState)(!1),{filters:p,setFilters:h}=(0,nM.PH)(e=>({filters:e.tools,setFilters:e.setToolFilters})),m=t||p,g=m.type?1:0,v=(0,o.useCallback)(()=>{let e={type:void 0};r?r(e):h(e)},[r,h]),y={size:"sm",radius:"xl",variant:"filled",classNames:n0(),tt:"capitalize"},b=e=>{r?r(e):h(e)},x=(0,n.jsx)(ez.z,{offset:4,label:u&&g?g:void 0,size:16,zIndex:10,showZero:!1,dot:!1,classNames:{root:"leading-none",indicator:"leading-relaxed "},inline:!0,children:(0,n.jsx)(a.z,{className:"@max-sm:w-full",color:"gray",radius:"xl",variant:"dark"===l.colorScheme?"filled":"light",...s,rightIcon:(0,n.jsx)(t7.Z,{className:(0,i.Z)({"rotate-180 transition-transform":d}),size:16}),onClick:()=>f(e=>!e),"data-expanded":d,children:(0,n.jsxs)(eh.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(nH.Z,{size:16}),"Filters"]})})});if(!u)return x;let w=(0,n.jsxs)(ep.K,{spacing:"lg",children:[(0,n.jsxs)(ep.K,{spacing:"md",children:[(0,n.jsx)(el.i,{label:"Type",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(eb.A.Group,{spacing:8,value:m.type,onChange:e=>b({type:e}),my:4,children:n2.map((e,t)=>(0,n.jsx)(eb.A,{value:e,...y,children:(0,n.jsx)("span",{children:e})},t))})]}),g>0&&(0,n.jsx)(a.z,{color:"gray",variant:"dark"===l.colorScheme?"filled":"light",onClick:v,fullWidth:!0,children:"Clear all filters"})]});return c?(0,n.jsxs)(n.Fragment,{children:[x,(0,n.jsx)(nB.d,{opened:d,onClose:()=>f(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--mantine-header-height))",overflowY:"auto"},body:{padding:16,paddingTop:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:w})]}):(0,n.jsxs)(ef.J,{zIndex:200,position:"bottom-end",shadow:"md",radius:12,onClose:()=>f(!1),middlewares:{flip:!0,shift:!0},children:[(0,n.jsx)(ef.J.Target,{children:x}),(0,n.jsx)(ef.J.Dropdown,{maw:468,p:"md",w:"100%",children:w})]})}var n4=r(48350),n3=r(81644);let n6=[{pathname:"/",component:(0,n.jsx)(function(e){let{iconProps:t,...r}=e;return(0,ex.xJ)()?(0,n.jsx)(ec.A,{size:"md",variant:"subtle",color:"dark",...r,onClick:()=>(0,e8.C)("manageHomeBlocks",{}),children:(0,n.jsx)(eG.Z,{...t})}):null},{ml:"auto"})},{pathname:"/models",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz(),i=(0,ex.xJ)(),{set:o,...s}=(0,nJ.Pb)(),{favorites:l,query:c}=s,u=c||l?"stats":void 0;return u&&(s.periodMode=u),(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:4,noWrap:!0,...t,children:[u&&(0,n.jsxs)(ef.J,{children:[(0,n.jsx)(ef.J.Target,{children:(0,n.jsx)(ec.A,{variant:"filled",color:"blue",radius:"xl",size:36,mr:4,children:(0,n.jsx)(nK.Z,{size:20,strokeWidth:3})})}),(0,n.jsxs)(ef.J.Dropdown,{maw:300,children:["To ensure that you see all possible results, we've disabled the period filter.",(0,n.jsx)(a.z,{mt:"xs",size:"xs",fullWidth:!0,onClick:()=>o({query:void 0}),children:"Clear Search"})]})]}),i&&(0,n.jsx)(nL,{type:"models",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nZ.z,{type:"models",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nX.L,{size:"sm",w:"100%",compact:!0,className:r.subnavDropdown,isFeed:!0})]})},{ml:"auto"})},{pathname:"/images",component:(0,n.jsx)(function(e){let{hideMediaTypes:t,hideTools:r,...i}=e,{classes:o}=nz(),a=(0,ex.xJ)();return(0,n.jsxs)(eh.Z,{className:o.filtersWrapper,spacing:8,noWrap:!0,...i,children:[a&&(0,n.jsx)(nL,{type:"images",variant:"button",buttonProps:{className:o.subnavDropdown}}),(0,n.jsx)(nA.z,{type:"images",variant:"button",buttonProps:{className:o.subnavDropdown}}),(0,n.jsx)(nG.R,{size:"sm",w:"100%",className:o.subnavDropdown,filterType:"images",hideMediaTypes:t,hideTools:r,isFeed:!0,compact:!0})]})},{ml:"auto"})},{pathname:"/videos",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz(),i=(0,ex.xJ)();return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[i&&(0,n.jsx)(nL,{type:"videos",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nA.z,{type:"videos",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nG.R,{size:"sm",w:"100%",className:r.subnavDropdown,filterType:"videos",hideMediaTypes:!0,compact:!0,isFeed:!0})]})},{ml:"auto"})},{pathname:"/posts",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz(),i=(0,ex.xJ)();return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[i&&(0,n.jsx)(nL,{type:"posts",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nA.z,{type:"posts",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nY.p,{size:"sm",w:"100%",compact:!0,className:r.subnavDropdown})]})},{ml:"auto"})},{pathname:"/articles",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz(),i=(0,ex.xJ)();return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[i&&(0,n.jsx)(nL,{type:"articles",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nA.z,{type:"articles",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(nP.J,{size:"sm",w:"100%",compact:!0,className:r.subnavDropdown})]})},{ml:"auto"})},{pathname:"/bounties",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz();return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[(0,n.jsx)(nA.z,{type:"bounties",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(n$,{size:"sm",w:"100%",compact:!0,className:r.subnavDropdown})]})},{ml:"auto"})},{pathname:"/tools",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz();return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[(0,n.jsx)(nA.z,{type:"tools",variant:"button",buttonProps:{className:r.subnavDropdown}}),(0,n.jsx)(n5,{size:"sm",w:"100%",compact:!0,className:r.subnavDropdown})]})},{ml:"auto"})},{pathname:"/tools/[slug]",component:(0,n.jsx)(function(e){let{...t}=e,{classes:r}=nz(),i=(0,ex.xJ)(),{replace:o,query:a}=(0,n3.LD)(),{sort:s=eS.FA.MostReactions,period:l=no.Tz.AllTime,baseModels:c,techniques:u,fromPlatform:d,hidden:f,followed:p,notPublished:h,scheduled:m,withMeta:g}=a;return(0,n.jsxs)(eh.Z,{className:r.filtersWrapper,spacing:8,noWrap:!0,...t,children:[i&&(0,n.jsx)(nL,{type:"images",variant:"button",buttonProps:{className:r.subnavDropdown},value:"".concat(p),onChange:e=>o({followed:"true"===e})}),(0,n.jsx)(nA.z,{type:"images",variant:"button",value:s,buttonProps:{className:r.subnavDropdown},onChange:e=>o({sort:e})}),(0,n.jsx)(nG.R,{className:r.subnavDropdown,size:"sm",w:"100%",filterType:"images",query:{period:l,baseModels:c,techniques:u,fromPlatform:d,hidden:f,followed:p,notPublished:h,scheduled:m,withMeta:g},onChange:e=>o(e),hideMediaTypes:!0,hideTools:!0,isFeed:!0,compact:!0})]})},{ml:"auto"})}];function n8(){let e=(0,ed.useRouter)(),t=n6.find(t=>t.pathname===e.pathname);return(0,n.jsxs)("div",{className:(0,i.Z)("flex justify-between gap-2 px-2 py-1",{"flex-wrap":"/"!==e.pathname}),children:[(0,n.jsx)(n4.ep,{}),null==t?void 0:t.component]})}var n7=r(52119),n9=r(53459),ie=r(47721),it=r(81770),ir=r(11363),ii=r(61689),io={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function ia(e){var t,r,n,i=ii.Z.optionsHandler(),o=i.merge(io,ia.globalOptions),a=0,s=!1;function l(){r.off("pointerDown",n),t.stopOnInteraction||r.off("pointerUp",d),u(),a=0}function c(e){u(),void 0!==e&&(s=e),a=window.setTimeout(f,t.delay)}function u(){a&&window.clearTimeout(a)}function d(){a&&(u(),c())}function f(){var e=r.internalEngine().index;if(t.stopOnLastSnap&&e.get()===e.max)return l();r.canScrollNext()?r.scrollNext(s):r.scrollTo(0,s),c()}var p={name:"autoplay",options:i.merge(o,e),init:function(e){r=e,s=(t=i.atMedia(p.options)).jump,n=t.stopOnInteraction?l:u;var o=r.internalEngine().eventStore,a=r.rootNode(),f=t.rootNode&&t.rootNode(a)||a;r.on("pointerDown",n),t.stopOnInteraction||r.on("pointerUp",d),t.stopOnMouseEnter&&(o.add(f,"mouseenter",n),t.stopOnInteraction||o.add(f,"mouseleave",d)),o.add(document,"visibilitychange",function(){if("hidden"===document.visibilityState)return u();d()}),o.add(window,"pagehide",function(e){e.persisted&&u()}),t.playOnInit&&c()},destroy:l,play:c,stop:u,reset:d};return p}ia.globalOptions=void 0;var is=r(12603);function il(){let e=(0,o.useRef)(ia({delay:1e4})),{data:t}=(0,ie.A2)(),r=(0,is.e4)(),i=(0,t3.c)(r,50),a=t.filter(e=>!e.dismissed);return a.length?(0,n.jsx)("div",{className:"announcements peer container mb-3",children:(0,n.jsx)(ir.l,{withIndicators:a.length>1,withControls:!1,slideGap:"md",plugins:[e.current],loop:!0,children:a.map(e=>(0,n.jsx)(ir.l.Slide,{children:(0,n.jsx)(it.I,{announcement:e,className:"h-full"})},e.id))},"".concat(i))}):null}var ic=r(46264);function iu(e){let{children:t,renderSearchComponent:r,subNav:i=(0,n.jsx)(n8,{}),left:o,right:a,scrollable:s=!0,footer:l=(0,n.jsx)(k,{}),loading:c,notFound:u,announcements:d}=e;return(0,n.jsxs)("div",{className:"flex h-full flex-1 flex-col",children:[(0,n.jsx)(nC,{fixed:!1,renderSearchComponent:r}),c?(0,n.jsx)(n7.w,{}):u?(0,n.jsx)(nI.T,{}):(0,n.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[o,(0,n.jsx)(ip,{subNav:i,scrollable:s,footer:l,announcements:d,children:t}),a&&(0,n.jsx)("aside",{className:"scroll-area relative border-l border-gray-3 dark:border-dark-4",children:a})]}),(0,n.jsx)(id,{})]})}function id(){let e=(0,ex.xJ)(),t=(0,ed.useRouter)();return(null==e?void 0:e.isPaidMember)||t.asPath.includes("/moderator")?null:(0,n.jsx)(ic.L,{})}function ip(e){let{children:t,subNav:r=(0,n.jsx)(n8,{}),footer:i=(0,n.jsx)(k,{}),scrollable:o=!0,announcements:a,...s}=e;return o?(0,n.jsxs)(n9.x,{...s,children:[(0,n.jsxs)("main",{className:"flex-1",children:[r&&(0,n.jsx)(ih,{children:r}),a&&(0,n.jsx)(il,{}),t]}),i]}):(0,n.jsxs)("div",{className:"no-scroll group flex flex-1 flex-col overflow-hidden",children:[(0,n.jsxs)("main",{className:"flex flex-1 flex-col overflow-hidden",children:[r&&(0,n.jsx)(ih,{children:r}),t]}),i]})}function ih(e){let{children:t,className:r,visible:a,...s}=e,l=(0,o.useRef)(0),c=(0,o.useRef)(0),u=(0,o.useRef)("up"),[d,p]=(0,o.useState)(!0);return(0,f.T)({onScroll:e=>{let t=e.scrollTop-l.current>0?"down":"up";t!==u.current&&(u.current=t,c.current=e.scrollTop);let r=e.scrollTop-c.current;e.scrollTop<100?p(!0):r>100?p(!1):r<-100&&p(!0),l.current=e.scrollTop}}),(0,o.useEffect)(()=>{a&&p(!0)},[a]),(0,n.jsx)("div",{...s,className:(0,i.Z)("sticky inset-x-0 top-0 z-50 mb-3 bg-gray-1 shadow transition-transform dark:bg-dark-6",r),style:d?void 0:{transform:"translateY(-200%)"},children:t})}},62827:function(e,t,r){"use strict";r.d(t,{T:function(){return v}});var n=r(85893),i=r(72445),o=r(97564),a=r(19236),s=r(95117),l=r(64523),c=r(38623),u=r(67841),d=r(79543),f=r(67294),p=r(28075),h=r(37398),m=r(76705),g=r(72456);function v(){let e=(0,m.O)(),{data:t}=g.SX.image.get404Images.useQuery(void 0,{enabled:e,trpc:{context:{skipBatch:!0}}}),r=(0,f.useMemo)(()=>{if(!t||!t.length)return;let[e,r,n]=t[Math.floor(Math.random()*t.length)];return{username:e,url:r,alt:n}},[t]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.h,{title:"Page Not Found",deIndex:!0}),(0,n.jsx)(i.W,{size:"md",children:(0,n.jsxs)(o.K,{align:"center",spacing:0,children:[(0,n.jsx)(a.D,{order:1,lh:1,children:"404"}),(0,n.jsx)(s.x,{size:"lg",children:"The page you are looking for doesn't exist"}),(0,n.jsxs)(o.K,{spacing:4,my:"xl",children:[(0,n.jsx)(l.x,{sx:e=>({height:400,display:"flex",img:{margin:"0 auto",height:"100%",width:"auto",borderRadius:e.radius.sm,boxShadow:e.shadows.md}}),children:r?(0,n.jsx)(p.i,{src:r.url,width:700,alt:r.alt}):(0,n.jsx)(c.O,{height:400,width:400})}),r?(0,n.jsxs)(s.x,{size:"xs",ta:"center",children:["Generated by"," ",(0,n.jsx)(s.x,{component:d.p,href:"/user/".concat(r.username),td:"underline",children:r.username})," ","as part of the"," ",(0,n.jsx)(s.x,{component:d.p,href:"/collections/104601",td:"underline",children:"404 Contest"})," ","November 2023."]}):(0,n.jsxs)(s.x,{size:"xs",ta:"center",children:["Loading a special 404 image from our"," ",(0,n.jsx)(s.x,{component:d.p,href:"/collections/104601",td:"underline",children:"404 Contest"}),"..."]})]}),(0,n.jsx)(u.z,{component:d.p,href:"/",size:"md",children:"Go back home"})]})})]})}},24003:function(e,t,r){"use strict";r.d(t,{o:function(){return P}});var n=r(85893),i=r(88002),o=r(49834),a=r(20966),s=r(25963),l=r(79543),c=r(94454),u=r(94351),d=r(38047),f=r(13309),p=r(7893),h=r(11163),m=r(70096),g=r(17578),v=r(76083),y=r(9957),b=r(2807),x=r(72456),w=r(94652),S=r(35818);r(67294);var k=r(5779),j=r(80501),E=r(78308),O=r(10523),C=r(74818),I=r(76326);function P(e){var t,r;let{article:P,...A}=e,T=x.SX.useUtils(),z=(0,h.useRouter)(),N=(0,g.xJ)(),R=null!==(r=null==N?void 0:N.isModerator)&&void 0!==r&&r,_=(null==N?void 0:N.id)===(null===(t=P.user)||void 0===t?void 0:t.id),M="/articles/[id]/[[...slug]]"===z.pathname,D=M&&P.status===S.af.Published,L=(0,k.g)(),F=x.SX.article.delete.useMutation(),U=()=>{(0,s._5)({title:"Delete article",children:"Are you sure you want to delete this article? This action is destructive and cannot be reverted.",labels:{cancel:"No, don't delete it",confirm:"Delete article"},confirmProps:{color:"red"},onConfirm:()=>F.mutate({id:P.id},{async onSuccess(){(0,b.LX)({title:"Article deleted",message:"Successfully deleted article"}),M&&await z.push("/articles"),await T.article.getInfinite.invalidate()},onError(e){(0,b.s9)({title:"Failed to delete article",error:Error(e.message)})}})})},B=x.SX.article.unpublish.useMutation(),H=()=>{B.mutate({id:P.id},{async onSuccess(e){(0,b.LX)({title:"Article unpublished",message:"Successfully unpublished article"}),T.article.getById.setData({id:P.id},t=>({...t,...e})),await T.article.getInfinite.invalidate(),await T.article.getMyDraftArticles.invalidate()},onError(e){(0,b.s9)({title:"Failed to unpublish article",error:Error(e.message)})}})};return(0,n.jsxs)(i.v,{position:"left-start",withArrow:!0,offset:-5,withinPortal:!0,children:[(0,n.jsx)(i.v.Target,{children:(0,n.jsx)(o.A,{...A,variant:"transparent",p:0,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsx)(c.Z,{size:24})})}),(0,n.jsxs)(i.v.Dropdown,{children:[L.collections&&(0,n.jsx)(w.a,{onClick:()=>(0,v.C)("addToCollection",{articleId:P.id,type:S.yl.Article})},"add-to-collection"),(0,n.jsx)(O.b,{entityType:"Article",entityId:P.id},"toggle-searchable-menu-item"),N&&(_||R)&&(0,n.jsxs)(n.Fragment,{children:[_&&P.coverImage&&!M&&(0,n.jsx)(C.f,{entityType:S.iA.Article,entityId:P.id,image:P.coverImage,currentCosmetic:P.cosmetic}),(0,n.jsx)(i.v.Item,{color:"red",icon:(0,n.jsx)(u.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),U()},disabled:F.isLoading,children:"Delete"}),D&&(0,n.jsx)(i.v.Item,{color:"yellow",icon:B.isLoading?(0,n.jsx)(a.a,{size:14}):(0,n.jsx)(d.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),H()},disabled:B.isLoading,closeMenuOnClick:!1,children:"Unpublish"}),(0,n.jsx)(i.v.Item,{component:l.p,href:"/articles/".concat(P.id,"/edit"),icon:(0,n.jsx)(f.Z,{size:14,stroke:1.5}),children:"Edit"}),R&&(0,n.jsx)(j.lB,{entityId:P.id,entityType:"article",children:e=>{let{toggle:t,locked:r,isLoading:o}=e;return(0,n.jsxs)(i.v.Item,{icon:o?(0,n.jsx)(a.a,{size:14}):(0,n.jsx)(E.Z,{size:14,stroke:1.5}),onClick:t,disabled:o,closeMenuOnClick:!1,children:[r?"Unlock":"Lock"," Comments"]})}})]}),(!_||R)&&(0,n.jsx)(m.b,{reason:"report-article",children:(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(p.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,I.$B)({entityType:y.Bj.Article,entityId:P.id})},children:"Report article"})})]})]})}},24621:function(e,t,r){"use strict";r.d(t,{J:function(){return w}});var n=r(85893),i=r(56817),o=r(14821),a=r(67841),s=r(71232),l=r(97564),c=r(54777),u=r(7001),d=r(40633),f=r(35818),p=r(81811),h=r(60136),m=r(67294),g=r(43597),v=r(10558),y=r(38394),b=r(81447);let x=(0,i.k)(e=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}},opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"},actionButton:{[b.D.smallerThan("sm")]:{width:"100%"}},indicatorRoot:{lineHeight:1},indicatorIndicator:{lineHeight:1.6}}));function w(e){let{query:t,onChange:r,...i}=e,{classes:b,theme:w,cx:S}=x(),k=(0,v.d)(),[j,E]=(0,m.useState)(!1),{filters:O,setFilters:C}=(0,y.PH)(e=>({filters:e.articles,setFilters:e.setArticleFilters})),I=t||O,P=I.period&&I.period!==f.Tz.AllTime?1:0,A=(0,m.useCallback)(()=>{let e={followed:!1,period:f.Tz.AllTime};r?r(e):C(e)},[r,C]),T=(0,n.jsx)(o.z,{offset:4,label:P||void 0,size:16,zIndex:10,showZero:!1,dot:!1,classNames:{root:b.indicatorRoot,indicator:b.indicatorIndicator},inline:!0,children:(0,n.jsx)(a.z,{className:b.actionButton,color:"gray",radius:"xl",variant:"dark"===w.colorScheme?"filled":"light",...i,rightIcon:(0,n.jsx)(p.Z,{className:S({[b.opened]:j}),size:16}),onClick:()=>E(e=>!e),"data-expanded":j,children:(0,n.jsxs)(s.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(h.Z,{size:16}),"Filters"]})})}),z=(0,n.jsxs)(l.K,{spacing:"lg",children:[(0,n.jsxs)(l.K,{spacing:"md",children:[(0,n.jsx)(c.i,{label:"Time period",labelProps:{weight:"bold",size:"sm"}}),(null==t?void 0:t.period)&&r?(0,n.jsx)(g.q,{type:"articles",variant:"chips",value:t.period,onChange:e=>r({period:e})}):(0,n.jsx)(g.q,{type:"articles",variant:"chips"})]}),P>0&&(0,n.jsx)(a.z,{color:"gray",variant:"dark"===w.colorScheme?"filled":"light",onClick:A,fullWidth:!0,children:"Clear all filters"})]});return k?(0,n.jsxs)(n.Fragment,{children:[T,(0,n.jsx)(u.d,{opened:j,onClose:()=>E(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--header-height))",overflowY:"auto"},body:{padding:16,paddingTop:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:z})]}):(0,n.jsxs)(d.J,{zIndex:200,position:"bottom-end",shadow:"md",radius:12,onClose:()=>E(!1),middlewares:{flip:!0,shift:!0},children:[(0,n.jsx)(d.J.Target,{children:T}),(0,n.jsx)(d.J.Dropdown,{maw:468,p:"md",w:"100%",children:z})]})}},65542:function(e,t,r){"use strict";r.d(t,{UZ:function(){return g},Zw:function(){return v},zv:function(){return h}});var n=r(35818),i=r(67294),o=r(1604),a=r(58456),s=r(36061),l=r(80937),c=r(38394),u=r(32957),d=r(14619),f=r(72456),p=r(25291);let h=()=>{let e=(0,c.PH)(e=>e.articles);return(0,d.HO)(e)},m=o.z.object({tags:(0,p.RV)(),view:o.z.enum(["categories","feed"]),period:o.z.nativeEnum(n.Tz),sort:o.z.nativeEnum(u.Qo),section:o.z.enum(["published","draft"]),favorites:(0,p.rK)(),hidden:(0,p.rK)(),username:o.z.string(),collectionId:(0,p.Cz)(),followed:o.z.coerce.boolean()}).partial(),g=()=>(0,l.s)(m),v=(e,t)=>{null!=e||(e={});let{applyHiddenPreferences:r=!0,...n}=null!=t?t:{},o=(0,a.bT)(),{data:l,isLoading:c,...u}=f.SX.article.getInfinite.useInfiniteQuery({...e,browsingLevel:o},{getNextPageParam:e=>e.nextCursor,trpc:{context:{skipBatch:!0}},...n}),d=(0,i.useMemo)(()=>{var e;return null!==(e=null==l?void 0:l.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[l]),{items:p,loadingPreferences:h,hiddenCount:m}=(0,s.f)({type:"articles",data:d,showHidden:!!e.hidden,disabled:!r,isRefetching:u.isRefetching});return{data:l,articles:p,removedArticles:m,fetchedArticles:null==d?void 0:d.length,isLoading:c||h,...u}}},36934:function(e,t,r){"use strict";r.d(t,{R:function(){return d}});var n=r(85893),i=r(21017),o=r(9094),a=r(20966),s=r(95117),l=r(524),c=r(72456),u=r(8346);function d(e){let{width:t,height:r,...d}=e,{data:{token:f=null}={}}=c.SX.user.getToken.useQuery(void 0,{enabled:u.BB});return(0,n.jsx)(i.Z,{shadow:"md",withBorder:!0,radius:16,sx:{width:t,zIndex:200,overflow:"hidden",height:r},p:0,...d,children:f?l.O.NEXT_PUBLIC_GPTT_UUID?(0,n.jsx)("iframe",{src:"https://app.gpt-trainer.com/widget/".concat(l.O.NEXT_PUBLIC_GPTT_UUID,"?token=").concat(f),width:"number"==typeof t?t+1:t,height:r,style:{margin:-1,background:"transparent"}}):(0,n.jsx)(s.x,{children:"Unable to load assistant"}):(0,n.jsx)(o.M,{h:r,children:(0,n.jsx)(a.a,{})})})}},21782:function(e,t,r){"use strict";r.d(t,{D:function(){return s},f:function(){return a}});var n=r(12902),i=r(2807),o=r(72456);function a(e,t){let{data:r=[],...n}=o.SX.recommenders.getResourceRecommendations.useQuery({...e},t);return{data:r,...n}}function s(){let e=o.SX.useUtils(),t=o.SX.recommenders.toggleResourceRecommendations.useMutation({onSuccess:async t=>{e.model.getById.setData({id:t.modelId},(0,n.ZP)(e=>{if(!e)return e;let r=e.modelVersions.find(e=>e.id===t.id);if(!r)return e;r.meta.allowAIRecommendations=t.meta.allowAIRecommendations})),await e.recommenders.getResourceRecommendations.invalidate({modelVersionId:t.id})},onError:e=>{(0,i.s9)({title:"Failed to save",error:Error(e.message)})}});return{toggleResourceRecommendation:e=>{let{resourceId:r}=e;return t.mutateAsync({id:r})},isLoading:t.isLoading}}},93625:function(e,t,r){"use strict";r.d(t,{J:function(){return S}});var n=r(85893),i=r(67294),o=r(71232),a=r(9094),s=r(5044),l=r(97564),c=r(17789),u=r(28075),d=r(99759),f=r(65695),p=r(14408),h=r(72623),m=r(71033),g=r(99859),v=r(65297),y=r(88182),b=r(31663),x=r(65521),w=r(54671);let S=(0,i.forwardRef)((e,t)=>{var r;let{value:S,hit:k,...j}=e,{classes:E}=(0,b.my)();if(!k)return(0,n.jsx)(b.$z,{ref:t,value:S,...j});let{coverImage:O,user:C,tags:I,stats:P,title:A}=k,{commentCount:T,viewCount:z,favoriteCount:N,...R}=P||{commentCount:0,viewCount:0,favoriteCount:0,likeCount:0},_=Object.values(R).reduce((e,t)=>e+t,0),M=!(0,w.A_)(O.nsfwLevel);return(0,i.createElement)(o.Z,{ref:t,...j,key:k.id,spacing:"md",align:"flex-start",noWrap:!0,children:[(0,n.jsx)(a.M,{sx:{width:64,height:64,position:"relative",overflow:"hidden",borderRadius:"10px"},children:O?M?(0,n.jsx)(x.R,{...O,cropFocus:"top"}):(0,n.jsx)(u.i,{src:O.url,name:null!==(r=O.name)&&void 0!==r?r:O.id.toString(),type:O.type,alt:A,anim:!1,width:450,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",position:"absolute",top:0,left:0}}):(0,n.jsx)(s.k,{variant:"light",size:64,radius:0,children:(0,n.jsx)(d.Z,{size:32})})}),(0,n.jsxs)(l.K,{spacing:4,sx:{flex:"1 !important"},children:[(0,n.jsx)(g.y,{attribute:"title",hit:k,classNames:E}),(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(v.Y,{size:"xs",user:C,withUsername:!0}),M&&(0,n.jsx)(c.C,{size:"xs",color:"red",children:"NSFW"}),null==I?void 0:I.map(e=>(0,n.jsx)(c.C,{size:"xs",children:e.name},e.id))]}),P&&(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(b.Ml,{icon:(0,n.jsx)(f.Z,{size:12,stroke:2.5}),children:(0,y.dm)(N)}),(0,n.jsx)(b.Ml,{icon:(0,n.jsx)(p.Z,{size:12,stroke:2.5}),children:(0,y.dm)(_)}),(0,n.jsx)(b.Ml,{icon:(0,n.jsx)(h.Z,{size:12,stroke:2.5}),children:(0,y.dm)(T)}),(0,n.jsx)(b.Ml,{icon:(0,n.jsx)(m.Z,{size:12,stroke:2.5}),children:(0,y.dm)(z)})]})]})]})});S.displayName="ArticlesSearchItem"},18257:function(e,t,r){"use strict";r.d(t,{U:function(){return k}});var n=r(85893),i=r(67294),o=r(71232),a=r(9094),s=r(38623),l=r(97564),c=r(95117),u=r(35818),d=r(14408),f=r(72623),p=r(84993),h=r(99859),m=r(31663),g=r(61328),v=r(28075),y=r(65521),b=r(65297),x=r(38498),w=r(54671),S=r(88182);let k=(0,i.forwardRef)((e,t)=>{var r,k;let{value:j,hit:E,...O}=e,{classes:C}=(0,m.my)();if(!E)return(0,n.jsx)(m.$z,{ref:t,value:j,...O});let{user:I,images:P,nsfwLevel:A,stats:T}=E,[z]=P,N=(0,p.Z)(null===(r=z.meta)||void 0===r?void 0:r.prompt,{length:x._G.altTruncateLength}),R=!(0,w.A_)(z.nsfwLevel);return(0,i.createElement)(o.Z,{ref:t,...O,key:E.id,spacing:"md",align:"flex-start",noWrap:!0,children:[(0,n.jsx)(a.M,{sx:{width:64,height:64,position:"relative",overflow:"hidden",borderRadius:"10px"},children:z?R?(0,n.jsx)(y.R,{...z,cropFocus:"top"}):(0,n.jsx)(v.i,{src:z.url,name:null!==(k=z.name)&&void 0!==k?k:z.id.toString(),type:z.type,alt:N,anim:!1,width:450,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",position:"absolute",top:0,left:0}}):(0,n.jsx)(s.O,{width:"100px",height:"100px"})}),(0,n.jsxs)(l.K,{spacing:8,sx:{flex:"1 !important"},children:[(0,n.jsx)(c.x,{children:(0,n.jsx)(h.y,{attribute:"name",hit:E,classNames:C})}),(0,n.jsx)(b.Y,{size:"xs",user:I,withUsername:!0}),T&&(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(g.N,{currency:u.F.BUZZ,unitAmount:T.unitAmountCountAllTime||0}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(d.Z,{size:12,stroke:2.5}),children:(0,S.dm)(T.favoriteCountAllTime||0)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(f.Z,{size:12,stroke:2.5}),children:(0,S.dm)(T.commentCountAllTime||0)})]})]})]})});k.displayName="BountiesSearchItem"},99518:function(e,t,r){"use strict";r.d(t,{k:function(){return x}});var n=r(85893),i=r(67294),o=r(71232),a=r(9094),s=r(97564),l=r(95117),c=r(28075),u=r(14408),d=r(72623),f=r(99859),p=r(65297),h=r(88182),m=r(31663),g=r(65521),v=r(84993),y=r(38498),b=r(54671);let x=(0,i.forwardRef)((e,t)=>{var r,x;let{value:w,hit:S,...k}=e,{classes:j}=(0,m.my)();if(!S)return(0,n.jsx)(m.$z,{ref:t,value:w,...k});let{user:E,images:O,metrics:C}=S,[I]=O,P=(0,v.Z)(null===(r=I.meta)||void 0===r?void 0:r.prompt,{length:y._G.altTruncateLength}),A=!(0,b.A_)(I.nsfwLevel);return(0,i.createElement)(o.Z,{ref:t,...k,key:S.id,spacing:"md",align:"flex-start",noWrap:!0,children:[(0,n.jsx)(a.M,{sx:{width:64,height:64,position:"relative",overflow:"hidden",borderRadius:"10px"},children:A?(0,n.jsx)(g.R,{...I,cropFocus:"top"}):(0,n.jsx)(c.i,{src:I.url,name:null!==(x=I.name)&&void 0!==x?x:I.id.toString(),type:I.type,alt:P,anim:!1,width:450,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",position:"absolute",top:0,left:0}})}),(0,n.jsxs)(s.K,{spacing:8,sx:{flex:"1 !important"},children:[(0,n.jsx)(l.x,{children:(0,n.jsx)(f.y,{attribute:"name",hit:S,classNames:j})}),(0,n.jsx)(p.Y,{size:"xs",user:E,withUsername:!0}),C&&(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(u.Z,{size:12,stroke:2.5}),children:(0,h.dm)(C.followerCount||0)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(d.Z,{size:12,stroke:2.5}),children:(0,h.dm)(C.itemCount||0)})]})]})]})});x.displayName="CollectionsSearchItem"},31663:function(e,t,r){"use strict";r.d(t,{$z:function(){return u},Ml:function(){return f},my:function(){return d}});var n=r(85893),i=r(67294),o=r(9094),a=r(54685),s=r(56817),l=r(64761),c=r(67614);let u=(0,i.forwardRef)((e,t)=>{let{value:r,...s}=e;return(0,i.createElement)(o.M,{ref:t,...s,key:"view-more"},(0,n.jsx)(a.e,{weight:"bold",td:"none !important",children:"View more results"}))});u.displayName="SearchItem";let d=(0,s.k)(e=>({highlighted:{backgroundColor:"dark"===e.colorScheme?e.colors.yellow[5]:e.colors.yellow[2]}}));function f(e){let t=(0,l.rZ)();return(0,n.jsx)(c.G,{color:"dark"===t.colorScheme?"dark":"gray",size:"xs",...e})}},40595:function(e,t,r){"use strict";r.d(t,{H:function(){return x}});var n=r(85893),i=r(67294),o=r(71232),a=r(9094),s=r(97564),l=r(95117),c=r(17789),u=r(28075),d=r(14408),f=r(72623),p=r(65297),h=r(88182),m=r(31663),g=r(65521),v=r(84993),y=r(38498),b=r(54671);let x=(0,i.forwardRef)((e,t)=>{var r,x;let{value:w,hit:S,...k}=e,{theme:j}=(0,m.my)();if(!S)return(0,n.jsx)(m.$z,{ref:t,value:w,...k});let{user:E,tagNames:O,stats:C}=S,I=(0,v.Z)(S.prompt,{length:y._G.altTruncateLength}),{commentCountAllTime:P,reactionCountAllTime:A}=C||{commentCountAllTime:0,reactionCountAllTime:0},T=null==O?void 0:O.slice(0,3),z=null==O?void 0:O.slice(3).length,N={radius:"xl",size:"xs",color:"gray",variant:"dark"===j.colorScheme?"filled":"light"},R=!(0,b.A_)(S.nsfwLevel);return(0,i.createElement)(o.Z,{ref:t,...k,key:S.id,spacing:"md",align:"flex-start",noWrap:!0,children:[(0,n.jsx)(a.M,{sx:{width:64,height:64,position:"relative",overflow:"hidden",borderRadius:"10px"},children:R?(0,n.jsx)(g.R,{...S,cropFocus:"top"}):(0,n.jsx)(u.i,{src:S.url,name:null!==(r=S.name)&&void 0!==r?r:S.id.toString(),type:S.type,alt:I,anim:!1,width:450,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",position:"absolute",top:0,left:0}})}),(0,n.jsxs)(s.K,{spacing:8,sx:{flex:"1 !important"},children:[!S.hideMeta&&S.prompt&&(0,n.jsxs)(l.x,{lineClamp:2,size:"sm",inline:!0,children:[(0,n.jsxs)(l.x,{weight:600,ml:1,span:!0,children:["Positive prompt:"," "]}),null!==(x=S.prompt)&&void 0!==x?x:""]}),(0,n.jsx)(p.Y,{size:"xs",user:E,withUsername:!0}),(0,n.jsxs)(o.Z,{spacing:8,children:[null==T?void 0:T.map((e,t)=>(0,n.jsx)(c.C,{...N,children:e},t)),z>0&&(0,n.jsxs)(c.C,{...N,children:["+",z]})]}),C&&(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(d.Z,{size:12,stroke:2.5}),children:(0,h.dm)(A)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(f.Z,{size:12,stroke:2.5}),children:(0,h.dm)(P)})]})]})]})});x.displayName="ImagesSearchItem"},3272:function(e,t,r){"use strict";r.d(t,{C:function(){return O}});var n=r(85893),i=r(67294),o=r(5779),a=r(71232),s=r(9094),l=r(5044),c=r(97564),u=r(95117),d=r(17789),f=r(65521),p=r(28075),h=r(99759),m=r(90693),g=r(72623),v=r(14102),y=r(99859),b=r(65297),x=r(67614),w=r(88182),S=r(31663),k=r(54671),j=r(27943),E=r(40099);let O=(0,i.forwardRef)((e,t)=>{var r,O;let{value:C,hit:I,...P}=e,A=(0,o.g)(),{classes:T,theme:z}=(0,S.my)();if(!I)return(0,n.jsx)(S.$z,{ref:t,value:C,...P});let{images:N,user:R,type:_,category:M,metrics:D,version:L,nsfw:F}=I,U=N[0],B=U.name;return(0,i.createElement)(a.Z,{ref:t,...P,key:I.id,spacing:"md",align:"flex-start",noWrap:!0,children:[(0,n.jsx)(s.M,{sx:{width:64,height:64,position:"relative",overflow:"hidden",borderRadius:z.radius.sm},children:U?(0,k.A_)(U.nsfwLevel)?(0,n.jsx)(p.i,{src:U.url,name:null!==(O=U.name)&&void 0!==O?O:U.id.toString(),type:U.type,alt:B,anim:!1,width:450,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",position:"absolute",top:0,left:0}}):(0,n.jsx)(f.R,{...U,cropFocus:"top"}):(0,n.jsx)(l.k,{variant:"light",size:64,radius:0,children:(0,n.jsx)(h.Z,{size:32})})}),(0,n.jsxs)(c.K,{spacing:4,sx:{flex:"1 !important"},children:[(0,n.jsxs)(a.Z,{spacing:8,children:[(0,n.jsx)(u.x,{children:(0,n.jsx)(y.y,{attribute:"name",hit:I,classNames:T})}),A.imageGeneration&&!!(null==L?void 0:null===(r=L.generationCoverage)||void 0===r?void 0:r.covered)&&(0,n.jsx)(l.k,{color:"white",variant:"filled",radius:"xl",size:"sm",children:(0,n.jsx)(m.Z,{size:12,stroke:2.5,color:z.colors.dark[6]})})]}),(0,n.jsxs)(a.Z,{spacing:8,children:[(0,n.jsx)(b.Y,{size:"xs",user:R,withUsername:!0}),F&&(0,n.jsx)(d.C,{size:"xs",color:"red",children:"NSFW"}),(0,n.jsx)(d.C,{size:"xs",children:(0,j.Gf)(_)}),M&&(0,n.jsx)(d.C,{size:"xs",children:(0,j.Gf)(M.name)})]}),(0,n.jsxs)(a.Z,{spacing:4,children:[(0,n.jsx)(x.G,{icon:(0,n.jsx)(E.l,{size:12}),children:(0,w.dm)(D.thumbsUpCount)}),(0,n.jsx)(x.G,{icon:(0,n.jsx)(g.Z,{size:12,stroke:2.5}),children:(0,w.dm)(D.commentCount)}),(0,n.jsx)(x.G,{icon:(0,n.jsx)(v.Z,{size:12,stroke:2.5}),children:(0,w.dm)(D.downloadCount)})]})]})]})});O.displayName="ModelSearchItem"},38658:function(e,t,r){"use strict";r.d(t,{k:function(){return f}});var n=r(85893),i=r(67294),o=r(71232),a=r(22870),s=r(5044),l=r(95117),c=r(236),u=r(31663),d=r(70652);let f=(0,i.forwardRef)((e,t)=>{let{value:r,hit:f,...p}=e;if(!f)return(0,n.jsx)(u.$z,{ref:t,value:r,...p});let{name:h,icon:m}=f;return(0,i.createElement)(o.Z,{ref:t,...p,key:f.id,spacing:"md",noWrap:!0,children:[m?(0,n.jsx)(a.E,{src:(0,d.Qy)(m,{width:96}),alt:null!=h?h:"",width:32,height:32,radius:"xl"}):(0,n.jsx)(s.k,{variant:"light",size:32,radius:"xl",children:(0,n.jsx)(c.Z,{size:18,stroke:2.5})}),(0,n.jsx)(l.x,{size:"md",lineClamp:1,children:h})]})});f.displayName="ToolSearchItem"},74558:function(e,t,r){"use strict";r.d(t,{N:function(){return b}});var n=r(85893),i=r(67294),o=r(71232),a=r(22870),s=r(5044),l=r(97564),c=r(95117),u=r(236),d=r(42362),f=r(58937),p=r(14102),h=r(88182),m=r(31663),g=r(70652),v=r(9749),y=r(40099);let b=(0,i.forwardRef)((e,t)=>{var r,b;let{value:x,hit:w,...S}=e;if(!w)return(0,n.jsx)(m.$z,{ref:t,value:x,...S});let{image:k,username:j,metrics:E}=w;return(0,i.createElement)(o.Z,{ref:t,...S,key:w.id,spacing:"md",align:"flex-start",noWrap:!0,children:[k?(0,n.jsx)(a.E,{src:(0,g.Qy)(k,{width:96}),alt:null!=j?j:"",width:32,height:32,radius:"xl"}):(0,n.jsx)(s.k,{variant:"light",size:32,radius:"xl",children:(0,n.jsx)(u.Z,{size:18,stroke:2.5})}),(0,n.jsxs)(l.K,{spacing:4,children:[(0,n.jsx)(c.x,{size:"md",lineClamp:1,children:(0,n.jsx)(v.R,{...w,inherit:!0})}),E&&(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(d.Z,{size:12,stroke:2.5}),children:(0,h.dm)(E.uploadCount)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(f.Z,{size:12,stroke:2.5}),children:(0,h.dm)(E.followerCount)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(y.l,{size:12}),children:(0,h.dm)(null!==(r=E.thumbsUpCount)&&void 0!==r?r:0)}),(0,n.jsx)(m.Ml,{icon:(0,n.jsx)(p.Z,{size:16}),children:(0,h.dm)(null!==(b=E.downloadCount)&&void 0!==b?b:0)})]})]})]})});b.displayName="UserSearchItem"},73729:function(e,t,r){"use strict";r.r(t),r.d(t,{openBountyEntryFilesModal:function(){return S}});var n=r(85893),i=r(9094),o=r(20966),a=r(97564),s=r(95117),l=r(73723),c=r(82623),u=r(71232),d=r(88393),f=r(54685),p=r(5044),h=r(35818),m=r(78308),g=r(49659),v=r(16045),y=r(35362),b=r(72456),x=r(88182),w=r(61328);let{openModal:S,Modal:k}=(0,y.W)({name:"bountyEntryFiles",title:"Files",size:"md",Element:e=>{let{props:t}=e;return(0,n.jsx)(j,{...t})}});function j(e){let{bountyEntry:t}=e,{data:r,isLoading:y}=b.SX.bountyEntry.getFiles.useQuery({id:t.id});if(y)return(0,n.jsx)(i.M,{children:(0,n.jsx)(o.a,{})});if(!(null==r?void 0:r.length))return(0,n.jsx)(a.K,{children:(0,n.jsx)(s.x,{children:"Looks like this entry contains no files."})});let S=r.find(e=>{var r;return(null!==(r=e.metadata.unlockAmount)&&void 0!==r?r:0)>t.awardedUnitAmountTotal&&!e.url});return(0,n.jsxs)(a.K,{children:[S&&(0,n.jsx)(s.x,{children:"Some of the files in this entry are still not available because they have not reached the unlock amount."}),(0,n.jsx)(l.x.Autosize,{maxHeight:400,children:(0,n.jsx)(a.K,{spacing:"md",children:r.map(e=>{var t,r,i;let o=!e.url;return(0,n.jsx)(c.X,{p:16,radius:"md",w:"100%",bg:"dark.4",children:(0,n.jsx)(a.K,{children:(0,n.jsxs)(u.Z,{position:"apart",children:[(0,n.jsxs)(u.Z,{children:[o?(0,n.jsx)(d.u,{label:"This file has not been unlocked yet",maw:200,multiline:!0,withArrow:!0,withinPortal:!0,children:(0,n.jsx)(m.Z,{})}):(0,n.jsx)(g.Z,{}),(0,n.jsxs)(a.K,{spacing:0,children:[e.url&&!o?(0,n.jsx)(f.e,{href:"/api/download/attachments/".concat(e.id),lineClamp:1,download:!0,size:"sm",children:e.name}):(0,n.jsx)(s.x,{size:"sm",weight:500,lineClamp:1,children:e.name}),(0,n.jsx)(s.x,{color:"dimmed",size:"xs",children:(0,x.f4)(e.sizeKB)})]})]}),(0,n.jsxs)(u.Z,{spacing:0,children:[e.metadata.benefactorsOnly&&(0,n.jsx)(d.u,{label:"Only users who award this entry will have access to this file",maw:200,multiline:!0,withArrow:!0,withinPortal:!0,children:(0,n.jsx)(p.k,{color:"yellow.6",radius:"xl",size:"sm",variant:"light",children:(0,n.jsx)(v.Z,{size:12})})}),(null!==(t=e.metadata.unlockAmount)&&void 0!==t?t:0)>0&&(0,n.jsx)(w.N,{currency:null!==(r=e.metadata.currency)&&void 0!==r?r:h.F.BUZZ,unitAmount:null!==(i=e.metadata.unlockAmount)&&void 0!==i?i:0})]})]})})},e.id)})})})]})}t.default=k},36429:function(e,t,r){"use strict";r.d(t,{an:function(){return v},dW:function(){return p},eQ:function(){return b},mq:function(){return f}});var n=r(85893),i=r(11163),o=r.n(i),a=r(67294),s=r(69975),l=r(99490),c=r(73445),u=r(37048);let d=(0,a.createContext)(null),f=()=>{let e=(0,a.useContext)(d);if(!e)throw Error("missing context");return e};function p(e){let{children:t}=e,r=(0,i.useRouter)(),o=(0,a.useRef)(),s=e=>{var t;let[r,n]=(null!==(t=null==e?void 0:e.url)&&void 0!==t?t:history.state.url).split("?");return l.QS.parse(n)},{asPath:c=r.asPath,query:f=l.QS.parse(l.QS.stringify(r.query)),state:p={}}=g();return(0,u.l)(()=>{g.setState({asPath:r.asPath,query:l.QS.parse(l.QS.stringify(r.query))})},[r]),(0,a.useEffect)(()=>{let e=e=>dispatchEvent(new CustomEvent("locationchange",{detail:[e.state]})),t=e=>{if(e.detail){let t=e.detail[0];o.current={asPath:t.as,query:s(t),state:history.state.state},y||g.setState(o.current)}};return addEventListener("popstate",e),addEventListener("locationchange",t),()=>{removeEventListener("popstate",e),removeEventListener("locationchange",t)}},[]),(0,a.useEffect)(()=>{let e=()=>{var e;o.current&&(null===(e=o.current)||void 0===e?void 0:e.asPath)===history.state.as&&g.setState(o.current),b(!1)};return r.events.on("routeChangeComplete",e),()=>{r.events.off("routeChangeComplete",e)}},[]),(0,n.jsx)(d.Provider,{value:{asPath:c,query:f,state:p,...m},children:t})}function h(e,t,r,n){let[i,a]=(0,s.resolveHref)(o(),t,!0),[,l]=r?(0,s.resolveHref)(o(),r,!0):[i,a],c={...history.state,state:{...history.state.state,...n},url:i,as:l};if("replace"===e)history.replaceState(c,"",l);else{let{as:e}=history.state;c.state.prev={asPath:e},history.pushState(c,"",l)}window.dispatchEvent(new CustomEvent("locationchange",{detail:[c]}))}let m={push:(e,t,r)=>h("push",e,t,r),replace:(e,t,r)=>h("replace",e,t,r),back:()=>history.go(-1)},g=(0,c.Ue)(()=>({})),v=()=>{let{query:e=o().query,asPath:t=o().asPath}=g.getState();return{query:e,asPath:t,...m}},y=!1,b=e=>{y=e}},58456:function(e,t,r){"use strict";r.d(t,{M9:function(){return f},NV:function(){return d},VK:function(){return h},bT:function(){return p}});var n=r(85893),i=r(67294),o=r(54671),a=r(39759),s=r(5779),l=r(15131),c=r(7379);let u=(0,i.createContext)({userBrowsingLevel:o.YL,blurLevels:o.V}),d=()=>(0,i.useContext)(u);function f(e){var t;let{children:r,browsingLevel:a,forcedBrowsingLevel:f}=e,p=d(),{canViewNsfw:h}=(0,s.g)(),m=(0,l.s7)(e=>e.showNsfw?e.browsingLevel:o.YL),g=(0,l.s7)(e=>e.blurNsfw),[v,y]=(0,i.useState)(),[b,x]=(0,i.useState)(f);return(0,n.jsx)(u.Provider,{value:{forcedBrowsingLevel:h?null!=b?b:p.forcedBrowsingLevel:o.YL,userBrowsingLevel:m,browsingLevelOverride:null!==(t=null!=v?v:a)&&void 0!==t?t:p.browsingLevelOverride,childBrowsingLevelOverride:null!=v?v:p.childBrowsingLevelOverride,blurLevels:g?o.V:c.v.diff(o.V,m),setBrowsingLevelOverride:y,setForcedBrowsingLevel:x},children:r})}function p(){var e;let{forcedBrowsingLevel:t,browsingLevelOverride:r,userBrowsingLevel:n}=d(),i=null!==(e=null!=t?t:r)&&void 0!==e?e:n,[o]=(0,a.c)(i,500);return o}function h(e){let{children:t,browsingLevel:r}=e;return r?(0,n.jsx)(f,{browsingLevel:r,children:t}):t}},67882:function(e,t,r){"use strict";r.d(t,{n:function(){return m}});var n=r(85893),i=r(64761),o=r(67841),a=r(95117),s=r(88393),l=r(17789),c=r(34476),u=r(90512);r(67294);var d=r(61328),f=r(5779),p=r(35818),h=r(38574);function m(e){var t,r;let{buzzAmount:m,onPerformTransaction:g,purchaseSuccessMessage:v,message:y="You don't have enough funds. Buy or earn more buzz to perform this action",performTransactionOnPurchase:b=!0,label:x,size:w,loading:S,showPurchaseModal:k=!0,error:j,transactionType:E,showTypePct:O=!1,...C}=e,I=(0,f.g)(),P=(0,i.rZ)(),{conditionalPerformTransaction:A,hasRequiredAmount:T,hasTypeRequiredAmount:z,getTypeDistribution:N,isLoadingBalance:R}=(0,h.VN)({message:y,purchaseSuccessMessage:v,performTransactionOnPurchase:b,type:E});if(!I.buzz)return null;let _=m>0,M=z(m),D="Generation"===E,L=M&&D?"blue":"yellow.7",F=N(m);return(0,n.jsxs)(o.z,{color:j?"red.9":_||S?L:"blue",...C,onClick:S?void 0:g?e=>{if(k&&(null==e||e.preventDefault(),null==e||e.stopPropagation(),g)){if(!I.buzz){g();return}A(m,g)}}:void 0,pr:_?8:void 0,size:w,disabled:C.disabled||!!j||R||S,className:(0,u.Z)("blue"!==L?"text-dark-8":"text-white",null==C?void 0:C.className),classNames:{inner:"flex gap-8 justify-between items-center",label:"w-full gap-2"},children:[(0,n.jsx)(a.x,{size:null!=w?w:14,ta:_?void 0:"center",sx:{flex:1},children:x}),(_||S)&&(0,n.jsx)(d.N,{currency:p.F.BUZZ,unitAmount:m,displayCurrency:!1,radius:null!==(t=null==C?void 0:C.radius)&&void 0!==t?t:"sm",py:12,pl:4,pr:8,loading:S,textColor:M&&D?P.colors.blue[4]:P.colors.yellow[7],color:"dark"===P.colorScheme?"dark.8":"gray.9",typeDistrib:O?F:void 0,children:!T(m)&&(0,n.jsx)(s.u,{label:"Insufficient buzz. Click to buy more",style:{textTransform:"capitalize"},maw:250,multiline:!0,withArrow:!0,withinPortal:!0,children:(0,n.jsx)(c.Z,{color:"red",size:12,fill:"currentColor",style:{marginRight:4}})})}),j&&!_&&(0,n.jsx)(s.u,{label:null!=j?j:"There was an error",maw:200,multiline:!0,withArrow:!0,withinPortal:!0,opened:!0,children:(0,n.jsx)(l.C,{color:"dark.8",variant:"filled",radius:null!==(r=null==C?void 0:C.radius)&&void 0!==r?r:"sm",py:10,px:8,children:(0,n.jsx)(c.Z,{color:"red",size:12,fill:"currentColor"})})})]})}},27338:function(e,t,r){"use strict";r.d(t,{k:function(){return F},A:function(){return D}});var n=r(85893),i=r(97564),o=r(95117),a=r(40633),s=r(34736),l=r(71232),c=r(49834),u=r(56817),d=r(70917),f=r(19612),p=r(17578),h=r(5779),m=r(67294),g=r(38710),v=r(83425),y=r(63208),b=r(7479),x=r(65217),w=r(21997),S=r(9585),k=r(782),j=r(73445),E=r(18753),O=r(61328),C=r(35818),I=r(38574),P=r(86164);let A=()=>"undefined"!=typeof document&&"ontouchstart"in document.documentElement;var T=r(91429),z=r(97012),N=r(38498),R=r(88182);let _=e=>{let{entityType:t,entityId:r}=e;return"".concat(t,"_").concat(r)},M=(0,j.Ue)()((0,k.mW)((0,E.n)(e=>({tips:{},onTip:t=>{let{entityType:r,entityId:n,amount:i}=t,o=_({entityType:r,entityId:n});e(e=>{e.tips[o]?e.tips[o]+=i:e.tips[o]=i})}})))),D=e=>{let{entityType:t,entityId:r}=e,n=_({entityType:t,entityId:r});return M((0,m.useCallback)(e=>{var t;return null!==(t=e.tips[n])&&void 0!==t?t:0},[n]))},L=[[0,1]];function F(e){let{toUserId:t,entityId:r,entityType:u,children:d,hideLoginPopover:k=!1,...j}=e,{theme:E,classes:_,cx:D}=U(),F=(0,z.y)("sm"),B=(0,p.xJ)(),{balance:H}=(0,T.dw)(void 0,"user"),Z=(0,h.g)(),[W,V]=(0,m.useState)(0),$=(0,m.useRef)(null),q=(0,m.useRef)(null),[G,K]=(0,m.useState)("pending"),[X,J]=(0,m.useState)(!1),Y=(0,x.Y)(()=>{V(e=>{var t;let[,r]=null!==(t=L.find(t=>{let[r]=t;return e>=r}))&&void 0!==t?t:[0,10];return Math.min(N._G.buzz.maxEntityTip,Math.min(null!=H?H:0,e+r))})},100),Q=M(e=>e.onTip),[ee,et]=(0,w._)({key:"interactive-tip-buzz-tutorial",defaultValue:!1}),{tipUserMutation:er,conditionalPerformTransaction:en}=(0,I.VN)({message:e=>"You don't have enough funds to send a tip. Required Buzz: ".concat((0,R.x6)(e),". Buy or earn more buzz to perform this action."),performTransactionOnPurchase:!1,purchaseSuccessMessage:e=>(0,n.jsxs)(i.K,{children:[(0,n.jsx)(o.x,{children:"Thank you for your purchase!"}),(0,n.jsxs)(o.x,{children:["We have added ",(0,n.jsx)(O.N,{currency:C.F.BUZZ,unitAmount:e})," to your account. You can now start tipping."]})]})}),{trackAction:ei}=(0,P.K)(),eo=t===(null==B?void 0:B.id),ea=e=>{"confirming"===G&&(J(!1),q.current&&(clearTimeout(q.current),q.current=null),null!=e||(e=W>0?W:10),en(e,()=>(ei({type:"Tip_Confirm",details:{toUserId:t,entityType:u,entityId:r,amount:e}}).catch(()=>void 0),er.mutate({toAccountId:t,amount:e,entityId:r,entityType:u,details:{entityId:r,entityType:u}},{onSuccess:(e,t)=>{let{amount:n}=t;K("confirmed"),u&&r&&Q({entityType:u,entityId:r,amount:n})},onSettled:()=>{setTimeout(()=>{K("pending"),setTimeout(()=>el(),100)},1500)}}))))},es=e=>{let t=Number(e);return isNaN(t)||t<1?t=1:t>N._G.buzz.maxEntityTip?t=N._G.buzz.maxEntityTip:H&&t>H&&(t=null!=H?H:0),V(t),t},el=()=>{V(0),J(!1),q.current&&(clearTimeout(q.current),q.current=null)},ec=()=>{q.current&&(clearTimeout(q.current),q.current=null),K("confirming"),J(!0),q.current=setTimeout(()=>{setTimeout(()=>el(),100),K("pending")},5e3)},eu=e=>{A()&&(e.preventDefault(),e.stopPropagation(),"mousedown"==e.type)||"confirming"!=G&&(Y.active||$.current||q.current||!B)||(q.current&&(J(!1),clearTimeout(q.current),q.current=null),$.current=setTimeout(()=>{Y.start(),$.current=null},150))},ed=e=>{if(!A()||"mouseup"!=e.type){if(null!==$.current)V(e=>Math.min(N._G.buzz.maxEntityTip,e+10)),clearTimeout($.current),$.current=null,ee||((0,S.c0)({title:"Looks like you're onto your first tip!",message:(0,n.jsxs)(o.x,{children:["To send more than ",(0,n.jsx)(O.N,{currency:C.F.BUZZ,unitAmount:10}),", hold the button for as long as you like"]})}),et(!0));else{if(!Y.active)return;Y.stop(),ei({type:"TipInteractive_Click",details:{toUserId:t,entityId:r,entityType:u,amount:W>0?W:10}}).catch(()=>void 0)}ec()}};if((0,m.useEffect)(()=>()=>Y.stop(),[]),!Z.buzz)return null;let ef=(0,n.jsxs)(a.J,{withArrow:!0,withinPortal:!0,radius:"md",opened:Y.active||"pending"!==G,zIndex:999,position:"top",offset:F?20:0,children:[(0,n.jsx)(a.J.Target,{children:(0,n.jsx)(s.k,{...j,...eo?{}:{onMouseDown:eu,onTouchStart:eu,onMouseUp:ed,onMouseLeave:ed,onTouchEnd:ed},onContextMenu:e=>(e.preventDefault(),e.stopPropagation(),!1),sx:{position:"relative",touchAction:"none",userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",color:"inherit",fontWeight:"inherit"},style:{cursor:eo?"default":"pointer"},onClick:void 0,children:d})}),(0,n.jsx)(a.J.Dropdown,{py:4,className:D({[_.confirming]:X}),children:(0,n.jsxs)(l.Z,{className:_.popoverContent,children:["pending"!==G&&(0,n.jsx)(c.A,{color:"red.5",onClick:()=>{"confirming"===G&&(K("pending"),ei({type:"TipInteractive_Cancel",details:{toUserId:t,entityId:r,entityType:u,amount:W>0?W:10}}).catch(()=>void 0),setTimeout(()=>el(),100))},children:(0,n.jsx)(g.Z,{size:20})}),(0,n.jsxs)(i.K,{spacing:2,align:"center",children:[(0,n.jsx)(o.x,{color:"yellow.7",weight:500,size:"xs",opacity:.8,children:"Tipping"}),(0,n.jsxs)(l.Z,{spacing:0,ml:-8,children:[(0,n.jsx)(v.Z,{style:{fill:E.colors.yellow[7]},color:"yellow.7",size:20}),(0,n.jsx)("div",{contentEditable:"confirming"===G,onBlur:e=>{var t;es(null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"1")},onKeyDown:e=>{if(e.ctrlKey&&"Enter"===e.key){var t;ea(es(null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"1"))}},onFocus:()=>{q.current&&(clearTimeout(q.current),q.current=null),J(!1)},className:_.tipAmount,dangerouslySetInnerHTML:{__html:W.toString()}})]})]}),"pending"!==G&&(0,n.jsx)(c.A,{variant:"transparent",color:"confirmed"===G?"green":"yellow.5",onClick:"confirming"===G?()=>ea():void 0,loading:er.isLoading,children:"confirmed"===G?(0,n.jsx)(y.Z,{size:20}):(0,n.jsx)(b.Z,{size:20})})]})})]});return k?ef:(0,n.jsx)(f.L,{children:(0,n.jsx)("div",{style:{display:"flex"},children:ef})})}let U=(0,u.k)(e=>({popoverContent:{position:"relative",zIndex:3},confirming:{"&:before":{content:'""',position:"absolute",zIndex:2,top:0,left:0,height:"100%",width:0,backgroundColor:e.colors.red[6],opacity:0,animation:"".concat(B," ").concat(5e3,"ms linear forwards")}},tipAmount:{fontVariantNumeric:"tabular-nums",fontWeight:500,color:e.colors.yellow[7],fontSize:16,padding:0,lineHeight:1,outline:0,display:"inline-block"}})),B=(0,d.F4)({to:{width:"100%",opacity:.3}})},83523:function(e,t,r){"use strict";r.d(t,{x:function(){return h}});var n=r(85893),i=r(64761),o=r(67841),a=r(71232),s=r(83425),l=r(19612),c=r(17578),u=r(10558),d=r(5779),f=r(10479),p=r(86164);function h(e){let{toUserId:t,entityId:r,entityType:h,label:m,...g}=e,v=(0,c.xJ)(),y=(0,u.d)(),b=(0,d.g)(),x=(0,i.rZ)(),{trackAction:w}=(0,p.K)();return b.buzz&&t!==(null==v?void 0:v.id)?(0,n.jsx)(l.L,{children:(0,n.jsx)(o.z,{variant:"dark"===x.colorScheme?"filled":"light",color:"gray",radius:"xl",pl:8,pr:m?12:8,onClick:()=>{(0,f.openSendTipModal)({toUserId:t,entityId:r,entityType:h},{fullScreen:y}),w({type:"Tip_Click",details:{toUserId:t,entityId:r,entityType:h}}).catch(()=>void 0)},sx:{fontSize:12,fontWeight:600,lineHeight:1.5,color:x.colors.accent[5]},...g,children:(0,n.jsxs)(a.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(s.Z,{size:14,fill:"currentColor"}),null!=m?m:"Tip"]})})}):null}},38574:function(e,t,r){"use strict";r.d(t,{VN:function(){return w},lk:function(){return v},x:function(){return x}});var n=r(5152),i=r.n(n),o=r(11163),a=r(67294),s=r(91429),l=r(61119),c=r(524),u=r(10558),d=r(5779),f=r(79116),p=r(2807),h=r(99490),m=r(72456),g=r(86164);let v=e=>{let{onPurchaseSuccess:t}=e,r=(0,o.useRouter)(),[n,i]=(0,a.useState)(!1),s=m.SX.useUtils(),{data:l=[],isLoading:c}=m.SX.stripe.getBuzzPackages.useQuery(),u=m.SX.stripe.createBuzzSession.useMutation({onSuccess:async e=>{let{url:t,sessionId:n}=e;if(t)await r.push(t);else{let e=await (0,f.B)();if(!e)return;await e.redirectToCheckout({sessionId:n})}},onError:e=>{(0,p.s9)({title:"Could not process purchase",error:Error(e.message)})}}),{mutateAsync:d}=m.SX.buzz.completeStripeBuzzPurchase.useMutation({async onSuccess(){await s.buzz.getBuzzAccount.invalidate(),i(!1),(0,p.LX)({title:"Transaction completed successfully!",message:"Your Buzz has been added to your account."}),null==t||t()},onError(e){(0,p.s9)({title:"There was an error while attempting to purchase buzz. Please contact support.",error:Error(e.message)}),i(!1)}});return{packages:l,isLoading:c,createCheckoutSession:e=>u.mutateAsync(e),completeStripeBuzzPurchaseMutation:d,processing:n,setProcessing:i}},y=i()(()=>Promise.all([r.e(1777),r.e(765),r.e(7186)]).then(r.bind(r,17186)),{loadableGenerated:{webpack:()=>[17186]}});function b(e){l.Pq.trigger({id:"buy-buzz-modal",component:y,props:e})}let x=()=>(0,d.g)().canBuyBuzz?b:e=>{let t={minBuzzAmount:e.minBuzzAmount,"sync-account":"blue"};window.open("//".concat(c.O.NEXT_PUBLIC_SERVER_DOMAIN_GREEN,"/purchase/buzz?").concat(h.QS.stringify(t)),"_blank","noreferrer")},w=e=>{let{message:t,purchaseSuccessMessage:r,performTransactionOnPurchase:n,type:i}=null!=e?e:{},o=(0,d.g)(),a=m.SX.useUtils(),{balance:l,balanceLoading:c}=(0,s.dw)(void 0,"user"),{balance:f,balanceLoading:h}=(0,s.dw)(void 0,"generation");(0,u.d)();let v=x(),{trackAction:y}=(0,g.K)(),b=m.SX.buzz.tipUser.useMutation({async onSuccess(){await a.buzz.getBuzzAccount.invalidate()},onError(e){(0,p.s9)({title:"Looks like there was an error sending your tip.",error:Error(e.message)})}}),w=()=>"Generation"===i?l+f:l,S=e=>w()>=e;return{hasRequiredAmount:S,hasTypeRequiredAmount:e=>"Generation"===i?f>=e:l>=e,getTypeDistribution:e=>{if("Generation"===i){if(f>=e)return{amt:{blue:e,yellow:0},pct:{blue:1,yellow:0}};let t=Math.max(0,f),r=e-t;return{amt:{blue:t,yellow:r},pct:{blue:t/e,yellow:r/e}}}return{amt:{blue:0,yellow:e},pct:{blue:0,yellow:1}}},conditionalPerformTransaction:(e,i)=>{if(!o.buzz)return i();if(c||h)return;let a=w();if(!S(e)){y({type:"NotEnoughFunds",details:{amount:e}}).catch(()=>void 0),v({message:"function"==typeof t?t(e-a):t,minBuzzAmount:e-a,onPurchaseSuccess:n?i:void 0,purchaseSuccessMessage:r});return}i()},tipUserMutation:b,isLoadingBalance:c||h}}},91429:function(e,t,r){"use strict";r.d(t,{G:function(){return u},G3:function(){return d},dw:function(){return c},oF:function(){return f},xu:function(){return p}});var n=r(67294),i=r(40893),o=r(17578),a=r(5779),s=r(32957),l=r(72456);let c=(e,t)=>{var r,n;let i=(0,o.xJ)(),s=(0,a.g)(),{data:c,isLoading:u}=l.SX.buzz.getBuzzAccount.useQuery({accountId:null!=e?e:null==i?void 0:i.id,accountType:t},{enabled:!!i&&s.buzz});return{balanceLoading:u,balance:null!==(r=null==c?void 0:c.balance)&&void 0!==r?r:0,lifetimeBalance:null!==(n=null==c?void 0:c.lifetimeBalance)&&void 0!==n?n:0}},u=()=>{let e=l.SX.useUtils(),t=(0,o.xJ)(),r=(0,n.useCallback)(r=>{t&&(e.buzz.getBuzzAccount.setData({accountId:t.id,accountType:r.accountType},e=>e?{...e,balance:r.balance}:e),e.buzz.getBuzzAccount.setData({accountId:t.id,accountType:null},e=>{var t;return e&&e.balance?{...e,balance:(null!==(t=e.balance)&&void 0!==t?t:0)+r.delta}:e}))},[e,t]);(0,i.Df)(s.m.BuzzUpdate,r)},d=()=>{let e=(0,o.xJ)(),t=(0,a.g)(),{data:r={purchasesMultiplier:1,rewardsMultiplier:1},isLoading:n}=l.SX.buzz.getUserMultipliers.useQuery(void 0,{enabled:!!e&&t.buzz});return{multipliersLoading:n,multipliers:r}},f=(e,t,r)=>{var n;let i=(0,a.g)(),{data:{transactions:o=[]}={},isLoading:s}=l.SX.buzz.getAccountTransactions.useQuery({limit:null!==(n=null==r?void 0:r.limit)&&void 0!==n?n:200,accountId:e,accountType:t},{enabled:!!e&&i.buzz});return{transactions:null!=o?o:[],isLoading:!!e&&s}},p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{window:"hour",accountType:["User","Generation"]},t=arguments.length>1?arguments[1]:void 0,{data:r=[],isLoading:n,...i}=l.SX.buzz.getTransactionsReport.useQuery({...null!=e?e:{}},{enabled:t.enabled});return{report:null!=r?r:[],isLoading:!!t.enabled&&n,...i}}},20890:function(e,t,r){"use strict";r.d(t,{o:function(){return y}});var n=r(85893),i=r(95117),o=r(90512);r(67294);var a=r(23961),s=r(40572),l=r(28075),c=r(79323),u=r(39164),d=r(49987),f=r(65521),p=r(79543),h=r(31483),m=r(22103),g=r.n(m);let v={portrait:"7/9",landscape:"9/7",square:"1"};function y(e){let{href:t,aspectRatio:r="portrait",onClick:s,cosmetic:p,className:m,contentType:y,contentId:x,image:w,header:S,footer:k,footerGradient:j,onSite:E,routedDialog:O,target:C,isRemix:I,explain:P}=e,{ref:A,inView:T}=(0,h.Y)({key:p?1:0}),z=w&&w.width&&w.height?w.width/w.height:1,N={aspectRatio:v[r]};return(0,n.jsx)(a.c,{cosmetic:p,cosmeticStyle:p?N:void 0,ref:A,style:p?void 0:N,className:(0,o.Z)(m),children:(0,n.jsx)("div",{className:(0,o.Z)(g().content,{[g().inView]:T}),children:T&&(0,n.jsxs)(n.Fragment,{children:[w?(0,n.jsx)(d.kL,{connectId:x,connectType:y,image:w,explain:P,children:e=>{var r,i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{href:t,onClick:s,routedDialog:O,className:g().linkOrClick,target:C,children:e?(0,n.jsx)(l.P,{metadata:w.metadata,src:w.url,name:null!==(r=w.name)&&void 0!==r?r:w.id.toString(),alt:null!==(i=w.name)&&void 0!==i?i:void 0,type:w.type,thumbnailUrl:w.thumbnailUrl,placeholder:"empty",className:(0,o.Z)(g().image,{[g().top]:z<1}),wrapperProps:{className:"flex-1 h-full"},width:z>1?450*z:450,skip:"video"===w.type?(0,c.Bn)({type:w.type,metadata:w.metadata}):void 0,contain:!0}):(0,n.jsx)(f.R,{...w})}),(0,n.jsxs)("div",{className:g().header,children:[(0,n.jsx)(d.kL.BlurToggle,{className:g().chip}),S]})]})}}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{href:t,onClick:s,routedDialog:O,className:g().linkOrClick,children:(0,n.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,n.jsx)(i.x,{color:"dimmed",children:"No Image"})})}),S&&(0,n.jsx)("div",{className:g().header,children:S})]}),k&&(0,n.jsx)("div",{className:(0,o.Z)(g().footer,{[g().gradient]:j}),children:k}),E&&(0,n.jsx)(u.K,{isRemix:I})]})})})}function b(e){let{href:t,onClick:r,children:i,routedDialog:o,className:a,target:l}=e;return t?(0,n.jsx)(p.p,{href:t,className:a,target:l,children:i}):o?(0,n.jsx)(s.v4,{...o,className:a,children:i}):r?(0,n.jsx)("button",{onClick:r,className:a,children:i}):i}},23961:function(e,t,r){"use strict";r.d(t,{c:function(){return s}});var n=r(85893),i=r(67294),o=r(58192),a=r(97693);let s=(0,i.forwardRef)((e,t)=>{let{href:r,children:i,className:s,onClick:l,cosmetic:c,cosmeticStyle:u,...d}=e;return(0,n.jsx)(a.A,{cosmetic:c,style:u,children:(0,n.jsx)(o.I,{ref:t,onClick:l,href:r,className:s,...d,children:i})})});s.displayName="CosmeticCard"},9354:function(e,t,r){"use strict";r.d(t,{T:function(){return y}});var n=r(85893),i=r(17789),o=r(95117);r(67294);var a=r(10194),s=r(65695),l=r(72623),c=r(83425),u=r(71033),d=r(88182),f=r(27943),p=r(36777),h=r(24003),m=r(27338),g=r(20890),v=r(87699);function y(e){var t;let{data:r,aspectRatio:y}=e,{classes:b,cx:x}=(0,a.v)({aspectRatio:1}),{id:w,title:S,coverImage:k,publishedAt:j,user:E,tags:O,stats:C}=r,I=null==O?void 0:O.find(e=>e.isCategory),{commentCount:P,viewCount:A,collectedCount:T,tippedAmountCount:z}=C||{commentCount:0,viewCount:0,favoriteCount:0,collectedCount:0,likeCount:0,tippedAmountCount:0},N=(0,m.A)({entityType:"Article",entityId:r.id});return(0,n.jsx)(g.o,{href:"/articles/".concat(w,"/").concat((0,f.vY)(S)),aspectRatio:y,contentType:"article",contentId:w,image:k,cosmetic:null===(t=r.cosmetic)||void 0===t?void 0:t.data,header:(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[I&&(0,n.jsx)(i.C,{size:"sm",variant:"gradient",gradient:{from:"cyan",to:"blue"},className:b.chip,children:I.name}),(0,n.jsx)(h.o,{article:r})]}),footer:(0,n.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,n.jsx)(v.B,{...E}),(0,n.jsxs)("div",{children:[j&&(0,n.jsx)(o.x,{className:b.dropShadow,size:"xs",weight:500,color:"white",inline:!0,children:(0,p.p6)(j)}),S&&(0,n.jsx)(o.x,{className:b.dropShadow,size:"xl",weight:700,lineClamp:2,lh:1.2,children:S})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,n.jsxs)(i.C,{className:x(b.statChip,b.chip),variant:"light",radius:"xl",children:[(0,n.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(s.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,d.dm)(T)})]}),(0,n.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(l.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,d.dm)(P)})]}),(0,n.jsx)(m.k,{toUserId:E.id,entityType:"Article",entityId:w,children:(0,n.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(c.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",tt:"uppercase",children:(0,d.dm)(z+N)})]})})]}),(0,n.jsx)(i.C,{className:x(b.statChip,b.chip),variant:"light",radius:"xl",children:(0,n.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,n.jsx)(u.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,d.dm)(A)})]})})]})]})})}},10194:function(e,t,r){"use strict";r.d(t,{v:function(){return o}});var n=r(56817),i=r(38498);let o=(0,n.k)((e,t,r)=>{let n=r("image"),i=r("header"),o=r("top"),a=r("bottom"),{aspectRatio:s}=t;return{root:{height:"100%",color:"white","&:hover":{["& .".concat(n)]:{transform:"scale(1.05)"},"& :after":{transform:"scale(1.05)",opacity:0}}},image:{ref:n,height:"100% !important",objectFit:"cover",objectPosition:s<1?"top center":"center",transition:"transform 400ms ease",minWidth:"100%"},header:{ref:i,padding:"12px",background:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[2],width:"100%"},content:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:2,opacity:0,transition:e.other.fadeIn},noImage:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[3],position:"relative","&::before":{content:'""',position:"absolute",top:0,left:0,height:"100%",width:"100%",background:"linear-gradient(transparent, rgba(0,0,0,.6))"}},gradientOverlay:{background:"linear-gradient(transparent, rgba(0,0,0,.6))"},fullOverlay:{display:"flex",justifyContent:"end",background:"linear-gradient(transparent, rgba(0,0,0,.6))"},contentOverlay:{position:"absolute",width:"100%",left:0,zIndex:10,padding:e.spacing.sm},top:{top:0,ref:o},bottom:{bottom:0,ref:a},iconBadge:{color:"white",backgroundColor:e.fn.rgba("#000",.31)},infoChip:{borderRadius:e.radius.sm,backgroundColor:e.fn.rgba("#000",.31),color:e.white,".mantine-Badge-inner":{display:"flex",overflow:"visible"},".mantine-Divider-root":{margin:"-4px 8px",borderLeftColor:e.fn.rgba("#fff",.31),borderRightColor:e.fn.rgba("#000",.2),borderRightWidth:1,borderRightStyle:"solid"}},forMod:{backgroundColor:e.fn.rgba("#E0BBE4",.8),color:e.white},reactions:{borderRadius:e.radius.sm,backgroundColor:e.fn.rgba("#000",.31),boxShadow:"0 -2px 6px 1px rgba(0,0,0,0.16)",height:28,paddingRight:3},statChip:{borderRadius:e.radius.sm,backgroundColor:e.fn.rgba("#000",.31),alignSelf:"flex-start",".mantine-Badge-inner":{display:"flex",overflow:"visible",gap:e.spacing.xs},color:e.white,"&[data-reviewed=true]":{backgroundColor:e.fn.rgba(e.colors.success[5],.2)}},chip:{borderRadius:e.radius.xl,height:"26px"},noHover:{"&:hover":{["& .".concat(n)]:{transform:"initial"}}},imageGroupContainer:{display:"flex",flexWrap:"wrap",boxSizing:"border-box",width:"100%",height:"100%","& > img, & > canvas":{width:"50%",height:"auto",flexGrow:1,minWidth:"50%",minHeight:"50%"}},imageGroupContainer4x4:{"& > img, & > canvas":{height:"50%"}},link:{["&:has(~ .frame-decor) .".concat(a)]:{paddingBottom:"36px !important"}},dropShadow:{filter:"drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.8))"}}});(0,n.k)((e,t)=>{let{frame:r,texture:n}=t,o=[null==n?void 0:n.url,r].filter(Boolean).join(", "),a=i._G.cosmetics.frame.padding;return{root:{padding:"0 !important",color:"white",borderRadius:e.radius.md,cursor:"pointer",position:"relative",overflow:"hidden",backgroundColor:t.frame?"transparent":void 0,margin:t.frame?-a:void 0},frame:{position:"relative",backgroundImage:o,backgroundSize:(null==n?void 0:n.size)?"".concat(n.size.width,"px ").concat(n.size.height,"px, cover"):void 0,borderRadius:e.radius.md,zIndex:2,padding:a,boxShadow:"inset 0 0 1px 1px rgba(255,255,255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.8)"},glow:{position:"relative","&:before":{backgroundImage:t.frame,content:'""',width:"100%",height:"100%",filter:"blur(5px)",position:"absolute",top:0,left:0}}}})},83917:function(e,t,r){"use strict";r.d(t,{B:function(){return s}});var n=r(85893),i=r(67294),o=r(23961);let a={portrait:{ratio:7/9,height:430,cssRatio:9/7,stringRatio:"7/9"},landscape:{ratio:9/7,height:300,cssRatio:7/9,stringRatio:"9/7"},flat:{ratio:15/7,height:300,cssRatio:7/15,stringRatio:"15/7"},square:{ratio:1,height:332,cssRatio:1,stringRatio:"1"}},s=(0,i.forwardRef)((e,t)=>{let{href:r,children:i,aspectRatio:s="portrait",className:l,frameDecoration:c,onClick:u}=e,{stringRatio:d}=a[s];return(0,n.jsx)(o.c,{cosmetic:null==c?void 0:c.data,cosmeticStyle:(null==c?void 0:c.data)?{aspectRatio:d}:void 0,ref:t,style:(null==c?void 0:c.data)?void 0:{aspectRatio:d},onClick:u,href:r,className:l,children:i})});s.displayName="FeedCard"},52215:function(e,t,r){"use strict";r.d(t,{t:function(){return m}});var n=r(85893),i=r(10194),o=r(83917),a=r(28075),s=r(65521),l=r(38498),c=r(86866),u=r(23693),d=r(49987),f=r(85120),p=r(79323),h=r(40572);function m(e){let{image:t,entityType:r,entityId:m,disabled:g}=e,{classes:v}=(0,i.v)({aspectRatio:t.width&&t.height?t.width/t.height:1}),y=(()=>{if(r&&m)switch(r){case"Model":return"/models/".concat(m);case"Collection":return"/collections/".concat(m);case"Bounty":return"/bounties/".concat(m);case"Image":return"/images/".concat(m);default:return"/"}})(),b=(()=>{switch(r){case"Model":return c.Z;case"Image":return u.Z;default:return null}})(),x=(0,n.jsx)(o.B,{href:g?void 0:y,style:g?{cursor:"initial"}:void 0,frameDecoration:t.cosmetic,aspectRatio:"portrait",useCSSAspectRatio:!0,children:(0,n.jsx)("div",{className:v.root,children:t&&(0,n.jsx)(d.kL,{image:t,children:e=>{var r,i;let o=t.width&&t.height?t.width/t.height:1;return(0,n.jsxs)(n.Fragment,{children:[!g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.kL.BlurToggle,{className:"absolute left-2 top-2 z-10"}),(0,n.jsx)(f.t,{image:t,className:"absolute right-2 top-2 z-10"})]}),e?(0,n.jsx)("div",{style:{height:"100%"},children:(0,n.jsx)(a.P,{metadata:t.metadata,src:t.url,name:null!==(r=t.name)&&void 0!==r?r:t.id.toString(),alt:null!==(i=t.name)&&void 0!==i?i:void 0,type:t.type,width:o>1?l.N5*o:l.N5,skip:(0,p.Bn)(t),placeholder:"empty",className:v.image,wrapperProps:{style:{height:"100%",width:"100%"}},loading:"lazy",contain:!0})}):(0,n.jsx)(s.R,{...t}),b&&(0,n.jsx)(b,{size:20,style:{position:"absolute",bottom:"10px",left:"10px",zIndex:1,borderRadius:"50%",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"}})]})}})})});return"Image"!==r||g?x:(0,n.jsx)(h.v4,{name:"imageDetail",state:{imageId:m,filters:{postId:t.postId}},children:x})}},68888:function(e,t,r){"use strict";r.d(t,{f:function(){return m}});var n=r(85893),i=r(49834),o=r(74943),a=r(10194),s=r(80354),l=r(24480),c=r(85120),u=r(24121),d=r(41584),f=r(20890),p=r(75110),h=r(87699);function m(e){var t,r,m,g,v,y,b,x;let{data:w}=e,{classes:S}=(0,a.v)({aspectRatio:w.width&&w.height?w.width/w.height:1}),k=(0,l.Z)();return(0,n.jsx)(f.o,{image:w,cosmetic:null===(t=w.cosmetic)||void 0===t?void 0:t.data,routedDialog:{name:"imageDetail",state:{imageId:w.id,...k}},header:(0,n.jsxs)("div",{className:"flex w-full items-start justify-between",children:["video"===w.type&&w.metadata&&"duration"in w.metadata&&(0,n.jsx)(d.x,{duration:null!==(x=w.metadata.duration)&&void 0!==x?x:0,className:S.chip}),(0,n.jsxs)("div",{className:"ml-auto flex flex-col gap-2",children:[(0,n.jsx)(c.t,{image:w}),(0,n.jsx)(p.Y,{type:w.type,id:w.id,canGenerate:w.hasMeta})]})]}),footer:(0,n.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,n.jsx)(h.B,{...w.user}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-1",children:[(0,n.jsx)(s.J,{className:S.reactions,entityId:w.id,entityType:"image",reactions:w.reactions,metrics:{likeCount:null===(r=w.stats)||void 0===r?void 0:r.likeCountAllTime,dislikeCount:null===(m=w.stats)||void 0===m?void 0:m.dislikeCountAllTime,heartCount:null===(g=w.stats)||void 0===g?void 0:g.heartCountAllTime,laughCount:null===(v=w.stats)||void 0===v?void 0:v.laughCountAllTime,cryCount:null===(y=w.stats)||void 0===y?void 0:y.cryCountAllTime,tippedAmountCount:null===(b=w.stats)||void 0===b?void 0:b.tippedAmountCountAllTime},targetUserId:w.user.id}),w.hasMeta&&(0,n.jsx)(u.C,{imageId:w.id,type:w.type,children:(0,n.jsx)(i.A,{className:S.infoChip,variant:"light",children:(0,n.jsx)(o.Z,{color:"white",strokeWidth:2.5,size:18})})})]})]})})}},75085:function(e,t,r){"use strict";r.d(t,{L:function(){return G}});var n=r(85893),i=r(17789),o=r(95117),a=r(71232),s=(0,r(21955).Z)("filled","archive-filled","IconArchiveFilled",[["path",{d:"M2 3m0 2a2 2 0 0 1 2 -2h16a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M19 9c.513 0 .936 .463 .993 1.06l.007 .14v7.2c0 1.917 -1.249 3.484 -2.824 3.594l-.176 .006h-10c-1.598 0 -2.904 -1.499 -2.995 -3.388l-.005 -.212v-7.2c0 -.663 .448 -1.2 1 -1.2h14zm-5 2h-4l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h4l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z",key:"svg-1"}]]),l=r(14102),c=r(65695),u=r(72623),d=r(83425),f=r(27338),p=r(10194),h=r(68566),m=r(75110),g=r(96203),v=r(88002),y=r(19337),b=r(74943),x=r(41605),w=r(74818),S=r(76326),k=r(75566),j=r(61271),E=r(94652),O=r(38903),C=r(10523),I=r(12646),P=r(62777),A=r(524),T=r(17578),z=r(76083),N=r(5779),R=r(9957),_=r(35818),M=r(48600);function D(e){let{data:t}=e,r=(0,T.xJ)(),i=(0,N.g)(),{setMenuItems:o}=(0,I.o)(),a=t.images[0],s={key:"report-model",component:(0,n.jsx)(O.S,{loginReason:"report-model",onReport:()=>(0,S.$B)({entityType:R.Bj.Model,entityId:t.id})},"report-model")},l=a?{key:"report-image",component:(0,n.jsx)(O.S,{label:"Report image",onReport:()=>(0,S.$B)({entityType:R.Bj.Image,entityId:a.id})},"report-image")}:null,c={key:"block-tags",component:(0,n.jsx)(v.v.Item,{icon:(0,n.jsx)(y.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,z.C)("blockModelTags",{modelId:t.id})},children:"Hide content with these tags"},"block-tags")},u=[];return i.collections&&u.push({key:"add-to-collection",component:(0,n.jsx)(E.a,{onClick:()=>(0,z.C)("addToCollection",{modelId:t.id,type:_.yl.Model})},"add-to-collection")}),(null==r?void 0:r.id)===t.user.id&&u.push({key:"add-to-showcase",component:(0,n.jsx)(P.M,{entityType:"Model",entityId:t.id},"add-to-showcase")},{key:"add-art-frame",component:(0,n.jsx)(w.f,{entityType:_.iA.Model,entityId:t.id,image:t.images[0],currentCosmetic:t.cosmetic},"add-art-frame")}),u.push({key:"toggle-searchable-menu-item",component:(0,n.jsx)(C.b,{entityType:"Model",entityId:t.id},"toggle-searchable-menu-item")}),(null==r?void 0:r.id)!==t.user.id&&u.push(...[{key:"hide-model",component:(0,n.jsx)(k.r,{as:"menu-item",modelId:t.id},"hide-model")},{key:"hide-button",component:(0,n.jsx)(j.A,{as:"menu-item",userId:t.user.id},"hide-button")},s,l].filter(M.$K)),r&&u.splice(2,0,c),(null==r?void 0:r.isModerator)&&A.O.NEXT_PUBLIC_MODEL_LOOKUP_URL&&u.unshift({key:"lookup-model",component:(0,n.jsx)(v.v.Item,{component:"a",target:"_blank",icon:(0,n.jsx)(b.Z,{size:14,stroke:1.5}),href:"".concat(A.O.NEXT_PUBLIC_MODEL_LOOKUP_URL).concat(t.id),onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open("".concat(A.O.NEXT_PUBLIC_MODEL_LOOKUP_URL).concat(t.id),"_blank")},children:"Lookup Model"},"lookup-model")}),o&&(u=o(t,u)),u.length?(0,n.jsxs)(v.v,{position:"left-start",withArrow:!0,offset:-5,withinPortal:!0,children:[(0,n.jsx)(v.v.Target,{children:(0,n.jsx)(x.z,{})}),(0,n.jsx)(v.v.Dropdown,{children:u.map(e=>e.component)})]}):null}var L=r(20890),F=r(58055),U=r(77996),B=r(40099),H=r(87699),Z=r(38498),W=r(36777),V=r(88182),$=r(27943),q=r(72456);function G(e){var t,r,v,y,b,x;let{data:w}=e,S=w.images[0],k=S&&S.width&&S.height?S.width/S.height:1,{classes:j,cx:E}=(0,p.v)({aspectRatio:k}),O=(0,T.xJ)(),C=(0,f.A)({entityType:"Model",entityId:w.id}),{data:{Recommended:I=[]}={Recommended:[]}}=q.SX.user.getEngagedModels.useQuery(void 0,{enabled:!!O,cacheTime:1/0,staleTime:1/0}),P=I.includes(w.id),A=w.publishedAt&&w.publishedAt>W.i4,z=w.lastVersionAt&&w.publishedAt&&w.lastVersionAt>W.i4&&w.lastVersionAt.getTime()-w.publishedAt.getTime()>Z._G.timeCutOffs.updatedModel,N=w.earlyAccessDeadline&&w.earlyAccessDeadline>new Date,R=w.mode===_.Ce.Archived,M=w.poi,G=w.minor,K=w.nsfw,X=null!==(b=null===(t=w.rank)||void 0===t?void 0:t.thumbsUpCount)&&void 0!==b?b:0,J=X+(null!==(x=null===(r=w.rank)||void 0===r?void 0:r.thumbsDownCount)&&void 0!==x?x:0),{useModelVersionRedirect:Y}=(0,g.X)(),Q="/models/".concat(w.id,"/").concat((0,$.vY)(w.name));return Y&&(Q+="?modelVersionId=".concat(w.version.id)),(0,n.jsx)(L.o,{href:Q,cosmetic:null===(v=w.cosmetic)||void 0===v?void 0:v.data,contentType:"model",contentId:w.id,image:w.images[0],onSite:!!w.version.trainingStatus,isRemix:!!(null===(y=w.images[0])||void 0===y?void 0:y.remixOfId),header:(0,n.jsxs)("div",{className:"flex w-full items-start justify-between",children:[(0,n.jsxs)("div",{className:"flex gap-1",children:[(null==O?void 0:O.isModerator)&&M&&(0,n.jsx)(i.C,{className:E(j.infoChip,j.chip,j.forMod),variant:"light",radius:"xl",children:(0,n.jsx)(o.x,{color:"white",size:"xs",transform:"capitalize",children:"POI"})}),(null==O?void 0:O.isModerator)&&G&&(0,n.jsx)(i.C,{className:E(j.infoChip,j.chip,j.forMod),variant:"light",radius:"xl",children:(0,n.jsx)(o.x,{color:"white",size:"xs",transform:"capitalize",children:"SFW"})}),(null==O?void 0:O.isModerator)&&K&&(0,n.jsx)(i.C,{className:E(j.infoChip,j.chip,j.forMod),variant:"light",radius:"xl",children:(0,n.jsx)(o.x,{color:"white",size:"xs",transform:"capitalize",children:"NSFW"})}),(0,n.jsx)(U.i,{className:E(j.infoChip,j.chip),type:w.type,baseModel:w.version.baseModel}),(A||z||N)&&(0,n.jsx)(i.C,{className:j.chip,variant:"filled",radius:"xl",sx:e=>({backgroundColor:N?e.colors.success[5]:z?e.colors.teal[5]:e.colors.blue[e.fn.primaryShade()]}),children:(0,n.jsx)(o.x,{color:"white",size:"xs",transform:"capitalize",children:N?"Early Access":z?"Updated":"New"})}),R&&(0,n.jsx)(i.C,{className:E(j.infoChip,j.chip),variant:"light",radius:"xl",children:(0,n.jsx)(s,{size:16})})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(D,{data:w}),(0,n.jsx)(m.Y,{type:"modelVersion",id:w.version.id,canGenerate:w.canGenerate}),(0,n.jsx)(F.h,{modelId:w.id,modelName:w.name,modelType:w.type,hashes:w.hashes,noTooltip:!0,iconSize:16,children:e=>{let{color:t,onClick:r,icon:i,label:o}=e;return(0,n.jsx)(h.Z,{onClick:r,label:o,size:30,color:t,variant:"filled",keepIconOnHover:!0,children:i})}})]})]}),footer:(0,n.jsxs)("div",{className:"flex w-full flex-col items-start gap-1",children:[(0,n.jsx)(H.B,{...w.user}),(0,n.jsx)(o.x,{className:j.dropShadow,size:"xl",weight:700,lineClamp:3,lh:1.2,children:w.name}),w.rank&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-1",children:[(!!w.rank.downloadCount||!!w.rank.collectedCount||!!w.rank.tippedAmountCount)&&(0,n.jsxs)(i.C,{className:E(j.statChip,j.chip),variant:"light",radius:"xl",children:[(0,n.jsxs)(a.Z,{spacing:2,children:[(0,n.jsx)(l.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,V.dm)(w.rank.downloadCount)})]}),(0,n.jsxs)(a.Z,{spacing:2,children:[(0,n.jsx)(c.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,V.dm)(w.rank.collectedCount)})]}),(0,n.jsxs)(a.Z,{spacing:2,children:[(0,n.jsx)(u.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",children:(0,V.dm)(w.rank.commentCount)})]}),(0,n.jsx)(f.k,{toUserId:w.user.id,entityType:"Model",entityId:w.id,children:(0,n.jsxs)(a.Z,{spacing:2,children:[(0,n.jsx)(d.Z,{size:14,strokeWidth:2.5}),(0,n.jsx)(o.x,{size:"xs",tt:"uppercase",children:(0,V.dm)(w.rank.tippedAmountCount+C)})]})})]}),!w.locked&&!!w.rank.thumbsUpCount&&(0,n.jsxs)(i.C,{className:E(j.statChip,j.chip),pl:6,pr:8,"data-reviewed":P,radius:"xl",title:"".concat(Math.round(100*(J>0?X/J:0)),"% of reviews are positive"),classNames:{inner:"gap-1"},children:[(0,n.jsx)(o.x,{color:P?"success.5":"yellow",component:"span",mt:2,children:(0,n.jsx)(B.l,{size:20,filled:P,strokeWidth:2.5})}),(0,n.jsx)(o.x,{size:16,weight:500,children:(0,V.dm)(w.rank.thumbsUpCount)})]})]})]})})}},96203:function(e,t,r){"use strict";r.d(t,{I:function(){return s},X:function(){return a}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null),a=()=>{let e=(0,i.useContext)(o);return null!=e?e:{}},s=e=>{let{children:t,...r}=e;return(0,n.jsx)(o.Provider,{value:r,children:t})}},41605:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var n=r(85893),i=r(49834),o=r(94454);let a=(0,r(67294).forwardRef)((e,t)=>(0,n.jsx)(i.A,{ref:t,variant:"transparent",...e,children:(0,n.jsx)(o.Z,{size:26,color:"#fff",filter:"drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))"})}));a.displayName="ActionIconDotsVertical"},68566:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(56817),o=r(17789),a=r(5044),s=r(79735);let l=["white"],c=(0,i.k)((e,t,r)=>{let{size:n}=t,i=r("label"),o=r("hover"),a=l.reduce((e,t)=>({...e,[t]:r(t)}),{});return{...l.reduce((e,t)=>({...e,[t]:{ref:a[t]}}),{}),wrapper:{position:"relative",height:n,width:n,zIndex:0,"&:hover":{["& .".concat(i)]:{transform:"scaleX(1)",opacity:1},["& .".concat(o)]:{opacity:1}}},icon:{position:"relative",zIndex:1,[".".concat(a.white," &")]:{backgroundColor:e.colors.gray[3],color:e.colors.dark[6]}},hover:{ref:o,opacity:0,position:"absolute",top:0,left:0,transition:"opacity 200ms ease",zIndex:2,[".".concat(a.white," &")]:{backgroundColor:e.colors.gray[3],color:e.colors.dark[6]}},label:{ref:i,top:0,right:0,width:"auto",paddingRight:n,minWidth:3*n,transform:"scaleX(0)",height:"100%",overflow:"hidden",position:"absolute",transformOrigin:"90%",transition:"transform 200ms ease, opacity 200ms ease",borderRadius:e.radius.xl,display:"flex",alignItems:"center",flexWrap:"nowrap",whiteSpace:"nowrap",justifyContent:"flex-start",paddingLeft:e.spacing.md,opacity:0,[".".concat(a.white," &")]:{backgroundColor:e.colors.gray[3],color:e.colors.dark[6]}}}});t.Z=e=>{let{label:t,children:r,size:i,themeIconProps:u={},color:d="green",variant:f="filled",onClick:p,keepIconOnHover:h=!1,...m}=e,{classes:g,cx:v}=c({size:i}),y=l.includes(d);return(0,n.jsxs)("button",{onClick:p,className:v(g.wrapper,y?g[d]:void 0),...m,children:[(0,n.jsx)(o.C,{className:g.label,size:"xs",variant:f,color:d,children:t}),(0,n.jsx)(a.k,{...u,className:g.icon,color:d,radius:"xl",size:i,variant:f,children:r}),!h&&(0,n.jsx)(a.k,{...u,className:g.hover,color:d,radius:"xl",size:i,variant:f,children:(0,n.jsx)(s.Z,{size:16,stroke:2.5})})]})}},75110:function(e,t,r){"use strict";r.d(t,{Y:function(){return l}});var n=r(85893),i=r(90693),o=r(68566),a=r(5779),s=r(3153);function l(e){let{canGenerate:t,...r}=e;return(0,a.g)().imageGeneration&&t?(0,n.jsx)(o.Z,{label:"Create",size:30,color:"white",variant:"filled","data-activity":"create:model-card",onClick:e=>{s.Ft.open(r)},children:(0,n.jsx)(i.Z,{stroke:2.5,size:16})}):null}},80522:function(e,t,r){"use strict";r.d(t,{j:function(){return J},f:function(){return K}});var n=r(85893),i=r(48427),o=r(71232),a=r(56817),s=r(97564),l=r(95117),c=r(88002),u=r(49834),d=r(88393),f=r(67841),p=r(64523),h=r(80061),m=r(54777),g=r(73819),v=r(9094),y=r(17789),b=r(20966),x=r(14821),w=r(95033),S=r(22870),k=r(21955),j=(0,k.Z)("outline","tool","IconTool",[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]]),E=(0,k.Z)("outline","ear","IconEar",[["path",{d:"M6 10a7 7 0 1 1 13 3.6a10 10 0 0 1 -2 2a8 8 0 0 0 -2 3a4.5 4.5 0 0 1 -6.8 1.4",key:"svg-0"}],["path",{d:"M10 10a3 3 0 1 1 5 2.2",key:"svg-1"}]]),O=(0,k.Z)("outline","ear-off","IconEarOff",[["path",{d:"M6 10c0 -1.146 .277 -2.245 .78 -3.219m1.792 -2.208a7 7 0 0 1 10.428 9.027a10 10 0 0 1 -.633 .762m-2.045 1.96a8 8 0 0 0 -1.322 2.278a4.5 4.5 0 0 1 -6.8 1.4",key:"svg-0"}],["path",{d:"M11.42 7.414a3 3 0 0 1 4.131 4.13",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),C=r(71033),I=(0,k.Z)("outline","plug-connected","IconPlugConnected",[["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z",key:"svg-0"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z",key:"svg-1"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-2"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-3"}],["path",{d:"M10 11l-2 2",key:"svg-4"}],["path",{d:"M13 14l-2 2",key:"svg-5"}]]),P=r(1895),A=r(38710),T=r(5140),z=r(41071),N=r(58937),R=r(99198),_=r(12902),M=r(43320),D=r(4214),L=r(67294),F=r(50899),U=r(36506),B=r(97012),H=r(40893),Z=r(65297),W=r(17578),V=r(35818),$=r(2807),q=r(72456);let G=(0,i.F)(o.Z),K=(0,a.k)(e=>({selectChat:{cursor:"pointer",borderRadius:e.spacing.xs,padding:e.spacing.xs,paddingTop:"6px",paddingBottom:"6px","&:hover":{backgroundColor:e.fn.rgba(e.colors.blue[e.fn.primaryShade()],.2)}},selectedChat:{backgroundColor:"".concat(e.fn.rgba(e.colors.blue[e.fn.primaryShade()],.5)," !important")}})),X={[V.sm.Invited]:"Pending",[V.sm.Ignored]:"Archived",[V.sm.Left]:"Archived",[V.sm.Kicked]:"Archived",[V.sm.Joined]:"Active"};function J(){var e;let{state:t,setState:r}=(0,F.mx)(),i=(0,W.xJ)(),{classes:a,cx:k}=K(),J=q.SX.useUtils(),[Y,Q]=(0,L.useState)(""),[ee,et]=(0,L.useState)("Active"),[er,en]=(0,L.useState)([]),{connected:ei}=(0,H.t9)(),eo=(0,B.y)(700),ea=J.chat.getUserSettings.getData(),es=null!==(e=null==ea?void 0:ea.muteSounds)&&void 0!==e&&e,{data:el,isLoading:ec}=q.SX.chat.getAllByUser.useQuery(),eu=J.chat.getUnreadCount.getData(),ed=el?el.filter(e=>{var t;return(null===(t=e.chatMembers.find(e=>e.userId===(null==i?void 0:i.id)))||void 0===t?void 0:t.status)===V.sm.Invited}).length:0,ef=el?el.filter(e=>{var t;return(null===(t=e.chatMembers.find(e=>e.userId===(null==i?void 0:i.id)))||void 0===t?void 0:t.status)===V.sm.Joined}).map(e=>e.id):[],ep=eu?eu.reduce((e,t)=>ef.includes(t.chatId)?e+t.cnt:e,0):0,{mutate:eh}=q.SX.chat.setUserSettings.useMutation({onSuccess(e){J.chat.getUserSettings.setData(void 0,t=>t?e:t)},onError(e){(0,$.s9)({title:"Failed to update settings.",error:Error(e.message),autoClose:!1})}}),{mutate:em}=q.SX.chat.markAllAsRead.useMutation({onSuccess(e){J.chat.getAllByUser.setData(void 0,(0,_.ZP)(t=>{if(!t)return t;for(let n of e){var r;let e=t.find(e=>e.id===n.chatId),o=null==e?void 0:null===(r=e.chatMembers)||void 0===r?void 0:r.find(e=>e.userId===(null==i?void 0:i.id));o&&(o.lastViewedMessageId=n.lastViewedMessageId)}})),J.chat.getUnreadCount.setData(void 0,(0,_.ZP)(t=>{if(!t)return t;for(let r of e){let e=t.find(e=>e.chatId===r.chatId);e&&(e.cnt=0)}}))},onError(e){(0,$.s9)({title:"Failed to mark as read.",error:Error(e.message),autoClose:!1})}});return(0,L.useEffect)(()=>{var e,r,n;if(!el)return;let o=null===(n=el.find(e=>e.id===t.existingChatId))||void 0===n?void 0:null===(r=n.chatMembers)||void 0===r?void 0:null===(e=r.find(e=>e.userId===(null==i?void 0:i.id)))||void 0===e?void 0:e.status;o&&et(X[o])},[null==i?void 0:i.id,el,t.existingChatId]),(0,L.useEffect)(()=>{if(!el)return;let e=el.filter(e=>{var t;let r=null===(t=e.chatMembers.find(e=>e.userId===(null==i?void 0:i.id)))||void 0===t?void 0:t.status;if(r&&X[r]===ee)return e}),t=Y.length>0?e.filter(e=>{if(e.chatMembers.filter(e=>e.userId!==(null==i?void 0:i.id)).some(e=>{var t;return null===(t=e.user.username)||void 0===t?void 0:t.toLowerCase().includes(Y)}))return e}):e;t.sort((e,t)=>{var r,n,i,o;return(null!==(i=null===(r=e.messages[0])||void 0===r?void 0:r.createdAt)&&void 0!==i?i:e.createdAt)<(null!==(o=null===(n=t.messages[0])||void 0===n?void 0:n.createdAt)&&void 0!==o?o:t.createdAt)?1:-1}),en(t)},[null==i?void 0:i.id,el,Y,ee]),(0,n.jsxs)(s.K,{spacing:0,h:"100%",children:[(0,n.jsxs)(o.Z,{p:"sm",position:"apart",align:"center",children:[(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(l.x,{children:"Chats"}),(0,n.jsxs)(c.v,{withArrow:!0,position:"bottom",children:[(0,n.jsx)(c.v.Target,{children:(0,n.jsx)(u.A,{variant:"light",children:(0,n.jsx)(j,{size:18,strokeWidth:1.5})})}),(0,n.jsxs)(c.v.Dropdown,{children:[(0,n.jsx)(c.v.Item,{icon:es?(0,n.jsx)(E,{size:18}):(0,n.jsx)(O,{size:18}),onClick:()=>{eh({muteSounds:!es})},children:"".concat(es?"Play":"Mute"," sounds")}),(0,n.jsx)(c.v.Item,{disabled:0===ep,icon:(0,n.jsx)(C.Z,{size:18}),onClick:()=>em(),children:"Mark all as read".concat(ep>0?" (".concat(ep,")"):"")})]})]}),!ei&&(0,n.jsx)(d.u,{label:"Not connected. May not receive live messages or alerts.",children:(0,n.jsx)(I,{color:"orangered"})})]}),(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(f.z,{size:"xs",variant:"light",styles:{leftIcon:{marginRight:6}},leftIcon:(0,n.jsx)(P.Z,{size:18}),onClick:()=>{r(e=>({...e,isCreating:!0,existingChatId:void 0}))},children:"New"}),eo&&(0,n.jsx)(u.A,{onClick:()=>r(e=>({...e,open:!1})),children:(0,n.jsx)(A.Z,{})})]})]}),(0,n.jsx)(p.x,{p:"sm",pt:0,children:(0,n.jsx)(h.o,{icon:(0,n.jsx)(T.Z,{size:16}),placeholder:"Filter by user",value:Y,onChange:e=>Q(e.currentTarget.value.toLowerCase()),rightSection:(0,n.jsx)(u.A,{onClick:()=>{Q("")},disabled:!Y.length,children:(0,n.jsx)(A.Z,{size:16})})})}),(0,n.jsx)(m.i,{}),(0,n.jsx)(p.x,{children:(0,n.jsx)(g.s,{value:ee,onChange:et,fullWidth:!0,data:[{value:"Active",label:"Active"},{value:"Pending",label:(0,n.jsxs)(v.M,{children:[ed>0&&(0,n.jsx)(y.C,{p:5,color:"red",variant:"filled",children:ed>9?"9+":ed}),(0,n.jsx)(p.x,{ml:6,children:"Pending"})]})},{value:"Archived",label:"Archived"}]})}),(0,n.jsx)(p.x,{h:"100%",sx:{overflowY:"auto"},children:ec?(0,n.jsx)(v.M,{h:"100%",children:(0,n.jsx)(b.a,{})}):er&&0!==er.length?(0,n.jsx)(s.K,{p:"xs",spacing:4,children:(0,n.jsx)(D.X,{features:U.UI,children:er.map(e=>{var c,u;let f=e.chatMembers.find(e=>e.userId===(null==i?void 0:i.id)),h=e.chatMembers.filter(e=>e.userId!==(null==i?void 0:i.id)),m=(null==f?void 0:f.status)===V.sm.Invited?0:null==eu?void 0:null===(c=eu.find(t=>t.chatId===e.id))||void 0===c?void 0:c.cnt,g=!!h.find(e=>!0===e.isOwner&&!0===e.user.isModerator),v=h.some(e=>!0===e.user.isModerator);return(0,n.jsxs)(G,{component:M.yK,noWrap:!0,className:k(a.selectChat,{[a.selectedChat]:e.id===t.existingChatId}),initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{type:"spring",duration:.4},onClick:()=>{r(t=>({...t,existingChatId:e.id}))},children:[(0,n.jsx)(x.z,{color:"red",position:"top-start",disabled:!m||0===m,label:m,inline:!0,size:16,children:(0,n.jsx)(p.x,{children:h.length>1?(0,n.jsx)(N.Z,{width:26}):0===h.length?(0,n.jsx)(R.Z,{width:26}):(0,n.jsx)(Z.Y,{user:h[0].user})})}),(0,n.jsxs)(s.K,{sx:{overflow:"hidden"},spacing:0,children:[(0,n.jsx)(w.y,{size:"sm",fw:500,sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},color:v?"red":void 0,highlight:Y,children:h.map(e=>e.user.username).join(", ")}),!!(null===(u=e.messages[0])||void 0===u?void 0:u.content)&&(null==f?void 0:f.status)===V.sm.Joined&&(0,n.jsx)(l.x,{size:"xs",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:e.messages[0].content})]}),(0,n.jsx)(o.Z,{sx:{marginLeft:"auto"},noWrap:!0,spacing:6,children:g&&(0,n.jsx)(d.u,{withArrow:!1,label:"Moderator chat",sx:{border:"1px solid gray"},children:(0,n.jsx)(S.E,{src:"/images/civ-c.png",alt:"Moderator",width:16,height:16})})})]},e.id)})})}):(0,n.jsxs)(s.K,{p:"sm",align:"center",children:[(0,n.jsx)(l.x,{children:"No chats."}),(0,n.jsx)(z.Z,{size:36})]})})]})}},50899:function(e,t,r){"use strict";r.d(t,{P$:function(){return h},Rv:function(){return p},mx:function(){return f}});var n=r(85893),i=r(5152),o=r.n(i),a=r(67294),s=r(42161),l=r(10558),c=r(76705);let u=o()(()=>r.e(3638).then(r.bind(r,13638)).then(e=>e.ChatWindow),{loadableGenerated:{webpack:()=>[13638]}}),d=(0,a.createContext)({state:{},setState:{}}),f=()=>{let e=(0,a.useContext)(d);if(!e)throw Error("ChatContext not in tree");return e},p=e=>{let{children:t,value:r={open:!1,isCreating:!1,existingChatId:void 0,selectedUsers:[]}}=e,[i,o]=(0,a.useState)(r);return(0,n.jsx)(d.Provider,{value:{state:i,setState:o},children:t})};function h(e){let{showFooter:t}=e,{state:r}=f(),i=(0,l.d)(),o=(0,c.O)();return r.open?(0,n.jsx)("div",{className:"absolute bottom-[var(--footer-height)] left-0 z-10 mb-2 ml-2 h-dvh w-[calc(100%-1rem)] @sm:h-[800px] @sm:w-[70%] @sm:max-w-[700px]",style:{maxHeight:"calc(100dvh - var(--header-height)".concat(t?" - var(--footer-height)":""," - 1rem)")},children:(0,n.jsx)(u,{})}):o&&!i?(0,n.jsx)("div",{className:"absolute bottom-[var(--footer-height)] left-2 mb-2",children:(0,n.jsx)(s.$,{})}):null}},70600:function(e,t,r){"use strict";r.r(t),r.d(t,{openChatShareModal:function(){return R}});var n=r(85893),i=r(97564),o=r(64523),a=r(80061),s=r(49834),l=r(54777),c=r(9094),u=r(20966),d=r(95117),f=r(71232),p=r(95033),h=r(88393),m=r(22870),g=r(17789),v=r(67841),y=r(35818),b=r(5140),x=r(38710),w=r(41071),S=r(58937),k=r(99198),j=r(7479),E=r(12902),O=r(67294),C=r(80522),I=r(50899),P=r(35362),A=r(65297),T=r(17578),z=r(2807),N=r(72456);let{openModal:R,Modal:_}=(0,P.W)({name:"chatShareModal",title:"Send Chat",size:"sm",Element:e=>{let{context:t,props:r}=e,P=(0,T.xJ)(),{setState:R}=(0,I.mx)(),_=N.SX.useUtils(),{classes:M,cx:D}=(0,C.f)(),[L,F]=(0,O.useState)([]),[U,B]=(0,O.useState)(""),[H,Z]=(0,O.useState)(void 0),[W,V]=(0,O.useState)(!1),{data:$,isLoading:q}=N.SX.chat.getAllByUser.useQuery();(0,O.useEffect)(()=>{if(!$)return;let e=$.filter(e=>{var t;if((null===(t=e.chatMembers.find(e=>e.userId===(null==P?void 0:P.id)))||void 0===t?void 0:t.status)===y.sm.Joined)return e}),t=U.length>0?e.filter(e=>{if(e.chatMembers.filter(e=>e.userId!==(null==P?void 0:P.id)).some(e=>{var t;return null===(t=e.user.username)||void 0===t?void 0:t.toLowerCase().includes(U)}))return e}):e;t.sort((e,t)=>{var r,n,i,o;return(null!==(i=null===(r=e.messages[0])||void 0===r?void 0:r.createdAt)&&void 0!==i?i:e.createdAt)<(null!==(o=null===(n=t.messages[0])||void 0===n?void 0:n.createdAt)&&void 0!==o?o:t.createdAt)?1:-1}),F(t)},[null==P?void 0:P.id,$,U]);let{mutate:G}=N.SX.chat.createMessage.useMutation({onSuccess(e){_.chat.getInfiniteMessages.setInfiniteData({chatId:e.chatId},(0,E.ZP)(t=>{if(!t)return t;t.pages[t.pages.length-1].items.push(e)})),_.chat.getAllByUser.setData(void 0,(0,E.ZP)(t=>{if(!t)return t;let r=t.find(t=>t.id===e.chatId);if(!r)return t;r.messages=[{content:e.content,contentType:e.contentType,createdAt:new Date(e.createdAt)}]})),R(e=>({...e,existingChatId:H,open:!0})),t.close(),V(!1)},onError(e){V(!1),(0,z.s9)({title:"Failed to send message.",error:Error(e.message),autoClose:!1})}});return(0,n.jsxs)(i.K,{spacing:0,h:"100%",children:[(0,n.jsx)(o.x,{p:"sm",pt:0,children:(0,n.jsx)(a.o,{icon:(0,n.jsx)(b.Z,{size:16}),placeholder:"Filter by user",value:U,onChange:e=>B(e.currentTarget.value.toLowerCase()),rightSection:(0,n.jsx)(s.A,{onClick:()=>{B("")},disabled:!U.length,children:(0,n.jsx)(x.Z,{size:16})})})}),(0,n.jsx)(l.i,{}),(0,n.jsx)(o.x,{h:"100%",mah:500,sx:{overflowY:"auto"},children:q?(0,n.jsx)(c.M,{h:"100%",children:(0,n.jsx)(u.a,{})}):L&&0!==L.length?(0,n.jsx)(i.K,{p:"xs",spacing:4,children:L.map(e=>{var t;let r=e.chatMembers.find(e=>e.userId===(null==P?void 0:P.id)),a=e.chatMembers.filter(e=>e.userId!==(null==P?void 0:P.id)),s=!!a.find(e=>!0===e.isOwner&&!0===e.user.isModerator),l=a.some(e=>!0===e.user.isModerator);return(0,n.jsxs)(f.Z,{noWrap:!0,className:D(M.selectChat,{[M.selectedChat]:e.id===H}),onClick:()=>{Z(e.id)},children:[(0,n.jsx)(o.x,{children:a.length>1?(0,n.jsx)(S.Z,{width:26}):0===a.length?(0,n.jsx)(k.Z,{width:26}):(0,n.jsx)(A.Y,{user:a[0].user})}),(0,n.jsxs)(i.K,{sx:{overflow:"hidden"},spacing:0,children:[(0,n.jsx)(p.y,{size:"sm",fw:500,sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},color:l?"red":void 0,highlight:U,children:a.map(e=>e.user.username).join(", ")}),!!(null===(t=e.messages[0])||void 0===t?void 0:t.content)&&(null==r?void 0:r.status)===y.sm.Joined&&(0,n.jsx)(d.x,{size:"xs",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:e.messages[0].content})]}),(0,n.jsx)(f.Z,{sx:{marginLeft:"auto"},noWrap:!0,spacing:6,children:s&&(0,n.jsx)(h.u,{withArrow:!1,label:"Moderator chat",sx:{border:"1px solid gray"},children:(0,n.jsx)(m.E,{src:"/images/civ-c.png",alt:"Moderator",width:16,height:16})})})]},e.id)})}):(0,n.jsxs)(i.K,{p:"sm",align:"center",children:[(0,n.jsx)(d.x,{children:"No chats."}),(0,n.jsx)(w.Z,{size:36})]})}),(0,n.jsx)(l.i,{}),(0,n.jsxs)(f.Z,{py:"sm",children:[(0,n.jsx)(g.C,{children:"Message:"}),(0,n.jsx)(d.x,{size:"sm",fs:"italic",children:r.message})]}),(0,n.jsx)(l.i,{}),(0,n.jsx)(v.z,{loading:W,disabled:!H,leftIcon:(0,n.jsx)(j.Z,{}),onClick:()=>{H&&(V(!0),G({chatId:H,content:r.message}))},children:"Send"})]})}});t.default=_},82863:function(e,t,r){"use strict";r.d(t,{$:function(){return f}});var n=r(85893),i=r(64761),o=r(67841),a=r(71232),s=r(97852),l=r(50899),c=r(19612),u=r(17578),d=r(5779);function f(e){let{user:t,label:r,...f}=e,{setState:p}=(0,l.mx)(),h=(0,i.rZ)(),m=(0,d.g)(),g=(0,u.xJ)();return m.chat&&t.id!==(null==g?void 0:g.id)?(0,n.jsx)(c.L,{children:(0,n.jsx)(o.z,{variant:"dark"===h.colorScheme?"filled":"light",color:"gray",radius:"xl",pl:8,pr:r?12:8,onClick:()=>{p(e=>({...e,open:!e.open,isCreating:!0,existingChatId:void 0,selectedUsers:[t]}))},sx:{fontSize:12,fontWeight:600,lineHeight:1.5,color:h.colors.success[2]},...f,children:(0,n.jsxs)(a.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(s.Z,{size:14}),null!=r?r:"Chat"]})})}):(0,n.jsx)(n.Fragment,{})}},36506:function(e,t,r){"use strict";r.d(t,{Hw:function(){return l},Sn:function(){return c},UI:function(){return u}});var n=r(85893),i=r(54685),o=r(95117);r(67294);var a=r(38498),s=r(79543);let l=e=>{let t;if(!e)return;if(a._G.chat.externalRegex.test(e))return e;let r=e.match(a._G.chat.airRegex);if(r&&r.groups){let{mId:e,mvId:n}=r.groups;t="/models/".concat(e,"?modelVersionId=").concat(n)}else t=e.replace(a._G.chat.civRegex,"")||"/";return t},c={render:e=>{let{attributes:t,content:r}=e,{href:c,...u}=t,d=l(c);if(d)return a._G.chat.externalRegex.test(d)?(0,n.jsx)(i.e,{href:d,target:"_blank",rel:"noopener noreferrer",variant:"link",sx:{textDecoration:"underline",color:"unset"},...u,children:r}):(0,n.jsx)(s.p,{legacyBehavior:!0,href:d,passHref:!0,...u,children:(0,n.jsx)(o.x,{variant:"link",component:"a",sx:{textDecoration:"underline",color:"unset"},children:r})})},validate:{url:e=>a._G.chat.civRegex.test(e)||a._G.chat.airRegex.test(e)||a._G.chat.externalRegex.test(e)}},u=()=>Promise.all([r.e(6787),r.e(6632)]).then(r.bind(r,66632)).then(e=>e.default)},57068:function(e,t,r){"use strict";r.d(t,{x:function(){return u}});var n=r(85893),i=r(69876),o=r(67841),a=r(95117),s=r(54685),l=r(56817),c=r(79543);function u(e){let{text:t,secondaryText:r,href:l,isMember:u}=e,{classes:f}=d();return(0,n.jsxs)(i.k,{direction:"column",justify:"space-between",align:"center",children:[(0,n.jsx)(o.z,{variant:"filled",color:"blue",size:"lg",radius:"xl",component:c.p,href:l,rel:"nofollow noreferrer",children:(0,n.jsxs)(i.k,{direction:"column",justify:"space-between",align:"center",children:[t,u?(0,n.jsx)(a.x,{className:f.buttonSecondary,children:r}):null]})}),u?(0,n.jsxs)(a.x,{className:f.buttonSecondary,mt:10,children:["Not your OS? Check out all"," ",(0,n.jsx)(s.e,{href:"https://github.com/civitai/civitai-link-desktop/releases/latest",target:"_blank",children:"releases"}),"."]}):null]})}let d=(0,l.k)(()=>({buttonSecondary:{fontSize:10}}))},58055:function(e,t,r){"use strict";r.d(t,{h:function(){return w}});var n=r(85893),i=r(86787),o=r(20966),a=r(64523),s=r(67294),l=r(38710),c=r(94351),u=r(63208),d=r(3518),f=r(9585),p=r(38577),h=r(72456),m=r(2807);let g=["Checkpoint","Hypernetwork","TextualInversion","LORA","LoCon","Controlnet","Upscaler","DoRA"];function v(e){var t;let{modelId:r,modelName:n,modelType:i,modelVersionId:o,hashes:a,children:l,fallback:c}=e,{connected:u,resources:d,runCommand:v}=(0,p.ex)(),y=d.find(e=>{let{hash:t}=e;return a.some(e=>e===t)}),b=(0,p.VB)((0,s.useCallback)(e=>Object.values(e.activities).filter(e=>"processing"==e.status&&"resources:add"==e.type&&a.includes(e.resource.hash)),[a])),{data:x,refetch:w,isFetched:S,isFetching:k,error:j}=h.SX.model.getDownloadCommand.useQuery({modelId:r,modelVersionId:o},{enabled:!1,onSuccess(e){E(null==e?void 0:e.commands)}});if((0,s.useEffect)(()=>{j&&(0,m.s9)({error:j})},[j]),!u||!g.includes(i)||!a||!a.length)return null!=c?c:null;let E=async e=>{if(e)for(let t of e)await v(t)},O=async()=>{y&&await v({type:"resources:remove",resource:{...y,modelName:n}})},C=null!==(t=k||(null==y?void 0:y.downloading))&&void 0!==t&&t,I=C&&b.length?Math.min(...b.map(e=>{var t;return null!==(t=e.progress)&&void 0!==t?t:0})):0;return l({addResource:()=>{y||(S?x?E(x.commands):(0,f.c0)({message:"Could not get commands"}):w())},removeResource:O,cancelDownload:()=>{if(y&&b.length)for(let{id:e}of b)v({type:"activities:cancel",activityId:e})},resource:y,hasResource:!!y,downloading:C,progress:I})}var y=r(19797),b=r(97012);let x={downloading:e=>{let{hovered:t,progress:r,iconSize:a}=e;return{icon:t?(0,n.jsx)(l.Z,{strokeWidth:2.5,size:a}):r?(0,n.jsx)(i.T,{size:null!=a?a:30,thickness:4,rootColor:"rgba(255, 255, 255, 0.4)",sections:[{value:null!=r?r:0,color:"rgba(255, 255, 255, 0.8)"}]}):(0,n.jsx)(o.a,{color:"#fff",size:null!=a?a:24}),color:t?"red":"blue",label:t?"Cancel download":"Downloading"}},installed:e=>{let{hovered:t,iconSize:r}=e;return{icon:t?(0,n.jsx)(c.Z,{size:r}):(0,n.jsx)(u.Z,{size:r,strokeWidth:2.5}),color:t?"red":"green",label:t?"Remove from Link":"Installed"}},notInstalled:e=>{let{iconSize:t}=e;return{icon:(0,n.jsx)(d.Z,{strokeWidth:2.5,size:t}),color:"blue",label:"Send via Link"}}},w=e=>{let{children:t,noTooltip:r,tooltipProps:i={},iconSize:o,...l}=e,{hovered:c,ref:u}=function(){let[e,t]=(0,s.useState)(!1),r=(0,s.useRef)(null),n=(0,s.useCallback)(()=>t(!0),[]),i=(0,s.useCallback)(()=>t(!1),[]);return(0,s.useEffect)(()=>{if(r.current)return r.current.addEventListener("mouseenter",n),r.current.addEventListener("mouseleave",i),()=>{var e,t;null==(e=r.current)||e.removeEventListener("mouseenter",n),null==(t=r.current)||t.removeEventListener("mouseleave",i)}},[]),{ref:r,hovered:e}}(),d=(0,b.y)("sm");return(0,n.jsx)(v,{...l,children:e=>{let{addResource:s,removeResource:l,cancelDownload:f,downloading:p,hasResource:h,progress:m}=e,g=x[p?"downloading":h?"installed":"notInstalled"]({hovered:!d&&c,progress:m,iconSize:o}),v=e=>{e.preventDefault(),e.stopPropagation(),p?f():h?l():s()};return r?t({ref:u,onClick:v,...g}):(0,n.jsx)(y.G,{label:g.label,...i,children:(0,n.jsx)(a.x,{w:"100%",children:t({ref:u,onClick:v,...g})})})}})}},38577:function(e,t,r){"use strict";r.d(t,{Fi:function(){return f},TO:function(){return x},VB:function(){return g},ex:function(){return y}});var n=r(85893),i=r(67294),o=r(40597),a=r(9585),s=r(57632),l=r(18753),c=r(73445),u=r(77446),d=r(5779);let f={"not-connected":void 0,"no-instances":void 0,"no-selected-instance":"yellow","no-socket-connection":"red","link-pending":"yellow","link-ready":"green"},p=(0,i.createContext)({}),h=["canceled","success","error"],m=["success","error"],g=(0,c.Ue)()((0,l.n)(e=>({ids:[],activities:{},activityProgress:null,setActivities:t=>e(e=>{let r;let n=t.map(e=>e.id);(0,u.Z)(e.ids,n)||(e.ids=n);let i=n.reduce((e,r)=>{let n=t.find(e=>e.id===r);return n?{...e,[r]:n}:e},{});for(let t in i){let n=e.activities[t],o=i[t];if((!h.includes(o.status)||o.status!==(null==n?void 0:n.status))&&(e.activities[t]=o,"processing"===o.status&&o.progress&&(void 0===r||o.progress(0,i.useContext)(p),b=e=>{let{children:t}=e,l=(0,i.useRef)(),c=(0,i.useRef)(),[u,d]=(0,i.useState)(!1),[f,h]=(0,i.useState)(),[m,y]=(0,i.useState)(),[b,x]=(0,i.useState)([]),[w,S]=(0,i.useState)(!1),[k,j]=(0,i.useState)(),E=g(e=>e.setActivities),O=()=>{if(c.current)return c.current;if(l.current)return Promise.resolve(l.current);let e=new o.ZP(r.tu(new URL(r.p+r.u(8070),r.b)),{name:"civitai-link"}),t=e=>{console.error(e),j(e)},n=e=>{(0,a.c0)({id:e,message:e,title:"Civitai Link",color:"blue"})},i=e=>{var t;y(e),S(null!==(t=null==e?void 0:e.connected)&&void 0!==t&&t)},s=e=>{E(e.sort((e,t)=>{var r,n;if("processing"===t.status&&"processing"!==e.status)return 1;if("processing"===e.status&&"processing"!==t.status)return -1;let i=new Date(null!==(r=e.createdAt)&&void 0!==r?r:new Date);return new Date(null!==(n=t.createdAt)&&void 0!==n?n:new Date).getTime()-i.getTime()}))},u=e=>{v[e.id]&&("error"===e.status?v[e.id].reject(e):v[e.id].resolve(e),delete v[e.id])};return c.current=new Promise(r=>{let o=()=>{l.current=e,r(e)};e.port.onmessage=async function(e){let{data:r}=e;"ready"===r.type?o():"error"===r.type?t(r.msg):"message"===r.type?n(r.msg):"instance"===r.type?i(r.payload):"instancesUpdate"===r.type?h(r.payload):"resourcesUpdate"===r.type?x(r.payload):"activitiesUpdate"===r.type?s(r.payload):"commandComplete"===r.type?u(r.payload):"socketConnection"===r.type&&d(r.payload)}}),c.current},C=async()=>await O(),I=async e=>{(await O()).port.postMessage(e)},P=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.id=(0,s.Z)();let r=new Promise((r,n)=>{v[e.id]={resolve:r,reject:n},t<=0||setTimeout(()=>{v[e.id]&&(delete v[e.id],n(Error("Request timed out")))},t)});return await I({type:"command",payload:e}),{promise:r,id:e.id,cancel:()=>{v[e.id]&&P({type:"activities:cancel",activityId:e.id})}}},A=(0,i.useMemo)(()=>f?f.length?(null==m?void 0:m.id)?u?m.connected?"link-ready":"link-pending":"no-socket-connection":"no-selected-instance":"no-instances":"not-connected",[f,m,u]);return(0,i.useEffect)(()=>{C()},[]),(0,n.jsx)(p.Provider,{value:{instances:f,instance:m,connected:w,socketConnected:u,resources:b,error:k,status:A,createInstance:e=>I({type:"create",id:e}),deleteInstance:e=>I({type:"delete",id:e}),renameInstance:(e,t)=>I({type:"rename",id:e,name:t}),selectInstance:e=>I({type:"join",id:e}),deselectInstance:()=>I({type:"leave"}),runCommand:P},children:t})};function x(e){let{children:t}=e;return(0,d.g)().civitaiLink?(0,n.jsx)(b,{children:t}):(0,n.jsx)(p.Provider,{value:{instances:[],instance:void 0,connected:!1,socketConnected:!1,resources:[],error:"Civitai Link is not enabled",status:"not-connected",createInstance:()=>Promise.resolve(),deleteInstance:()=>Promise.resolve(),renameInstance:()=>Promise.resolve(),selectInstance:()=>Promise.resolve(),deselectInstance:()=>Promise.resolve(),runCommand:()=>Promise.resolve({promise:Promise.resolve(),id:"",cancel:()=>{}})},children:t})}},27977:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return z},openCivitaiLinkModal:function(){return T}});var n=r(85893),i=r(95117),o=r(26556),a=r(97564),s=r(19236),l=r(64577),c=r(54777),u=r(71232),d=r(67841),f=r(69876),p=r(50331),h=r(88393),m=r(20966),g=r(25963),v=r(46812),y=r(1895),b=r(77488),x=r(63208),w=r(38615),S=r(67294),k=r(38577),j=r(35362),E=r(62093),O=r(70663),C=r(57068);async function I(e){let t=await fetch("https://api.github.com/repos/civitai/civitai-link-desktop/releases/latest"),r=await t.json(),n=(null==e?void 0:e.includes("Win"))?"Windows":(null==e?void 0:e.includes("Mac"))?"Mac":(null==e?void 0:e.includes("Linux"))?"Linux":"Unknown",i={Windows:"exe",Mac:"dmg",Linux:"deb",Unknown:""},o=r.assets.find(e=>e.browser_download_url.includes(i[n]));return{os:n,tag_name:r.tag_name,href:(null==o?void 0:o.browser_download_url)||"https://github.com/civitai/civitai-link-desktop/releases/latest"}}let{openModal:P,Modal:A}=(0,j.W)({name:"civitai-link-wizard",title:"Civitai Link Setup",size:800,Element:e=>{let{context:t}=e,[r,j]=(0,S.useState)(0),[P,A]=(0,S.useState)({text:"Download the Link App",secondaryText:"",href:"https://github.com/civitai/civitai-link-desktop/releases/latest"}),T=()=>j(e=>e<2?e+1:e),z=()=>j(e=>e>0?e-1:e),{connected:N,instance:R,createInstance:_}=(0,k.ex)();(0,S.useEffect)(()=>{N&&(0,g.m6)({modal:"civitai-link-success",withCloseButton:!1,closeOnClickOutside:!1,closeOnEscape:!1,innerProps:{}})},[N]),(0,S.useEffect)(()=>{(async()=>{let e=navigator.userAgent,t=await I(e);A({text:"Download the Link App",secondaryText:"".concat(t.os," ").concat(t.tag_name),href:t.href})})()},[]);let M=(0,n.jsx)(i.x,{component:"a",variant:"link",target:"_blank",href:"/user/vault",td:"underline",children:"your Vault"});return(0,n.jsxs)(o.v,{active:r,onStepClick:j,breakpoint:"sm",allowNextStepsSelect:!1,children:[(0,n.jsx)(o.v.Step,{label:"About Civitai Link",description:"Learn what it does",children:(0,n.jsxs)(a.K,{mt:"sm",children:[(0,n.jsxs)(a.K,{spacing:4,children:[(0,n.jsx)(s.D,{order:3,sx:{lineHeight:1.1},children:"About Civitai Link"}),(0,n.jsx)(i.x,{children:"Civitai Link allows you to interact with your Stable Diffusion instance in realtime wherever it is from any device."}),(0,n.jsx)(l.o,{ratio:16/9,children:(0,n.jsx)(O.H,{videoId:"EHUjiDgh-MI"})}),(0,n.jsx)(c.i,{mt:"lg",mb:5,label:(0,n.jsx)(i.x,{weight:500,size:"sm",children:"Supported Activities:"})}),(0,n.jsx)(E.h,{useDefaultBenefits:!1,benefits:[{content:"Add & remove resources",icon:(0,n.jsx)(v.Z,{size:18}),iconColor:"green"},{content:(0,n.jsxs)(n.Fragment,{children:["Offload resources to ",M]}),icon:(0,n.jsx)(v.Z,{size:18}),iconColor:"green"},{content:(0,n.jsxs)(n.Fragment,{children:["Download resources from ",M]}),icon:(0,n.jsx)(v.Z,{size:18}),iconColor:"green"}]}),(0,n.jsx)(c.i,{mt:"lg",mb:5,label:(0,n.jsx)(i.x,{weight:500,size:"sm",children:"Supported Stable Diffusion UIs:"})}),(0,n.jsx)(E.h,{useDefaultBenefits:!1,benefits:[{content:(0,n.jsx)(i.x,{component:"a",variant:"link",td:"underline",href:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",target:"_blank",rel:"nofollow noreferrer",children:"Automatic 1111 SD Web UI"}),icon:(0,n.jsx)(v.Z,{size:18}),iconColor:"green"},{content:(0,n.jsx)(i.x,{component:"a",variant:"link",td:"underline",href:"https://github.com/comfyanonymous/ComfyUI",target:"_blank",rel:"nofollow noreferrer",children:"ComfyUI"}),icon:(0,n.jsx)(v.Z,{size:18}),iconColor:"green"},{content:(0,n.jsx)(i.x,{children:"Connect any models folder"}),icon:(0,n.jsx)(y.Z,{size:18})}]})]}),(0,n.jsxs)(u.Z,{position:"apart",mt:"xl",children:[(0,n.jsx)(d.z,{variant:"default",onClick:t.close,children:"Eh, nevermind..."}),(0,n.jsx)(d.z,{onClick:T,rightIcon:(0,n.jsx)(b.Z,{}),children:"Let's do it!"})]})]})}),(0,n.jsx)(o.v.Step,{label:"Install Link App",description:"Install the Link application",children:(0,n.jsxs)(a.K,{mt:"sm",children:[(0,n.jsxs)(a.K,{spacing:4,children:[(0,n.jsx)(s.D,{order:3,mb:0,sx:{lineHeight:1},children:"Download the Link desktop application"}),(0,n.jsx)(i.x,{mb:"md",color:"dimmed",children:"Run the installer and head to the next step to get a Link key."}),(0,n.jsx)(f.k,{justify:"center",w:"100%",children:(0,n.jsx)(C.x,{...P,isMember:!0})})]}),(0,n.jsxs)(u.Z,{position:"apart",mt:"xl",children:[(0,n.jsx)(d.z,{variant:"default",onClick:z,children:"Go Back"}),(0,n.jsx)(d.z,{onClick:()=>{T(),_()},rightIcon:(0,n.jsx)(b.Z,{}),children:"Ok, it's installed"})]})]})}),(0,n.jsx)(o.v.Step,{label:"Connect Link App",description:"Link your account",children:(0,n.jsxs)(a.K,{mt:"sm",children:[(0,n.jsxs)(a.K,{spacing:4,children:[(0,n.jsx)(s.D,{order:3,mb:0,sx:{lineHeight:1},children:"Link your account"}),(0,n.jsx)(i.x,{mb:"md",color:"dimmed",children:"In your Link application, paste the code below to link your account and finish the setup."}),(0,n.jsxs)(a.K,{align:"center",spacing:5,my:"lg",children:[(0,n.jsx)(s.D,{order:4,children:"Link Key"}),(null==R?void 0:R.key)?(0,n.jsx)(p.q,{value:R.key,children:e=>{let{copied:t,copy:r}=e;return(0,n.jsx)(h.u,{label:"copy",children:(0,n.jsx)(d.z,{variant:"default",onClick:r,size:"lg",px:"sm",rightIcon:t?(0,n.jsx)(x.Z,{size:16}):(0,n.jsx)(w.Z,{size:16}),children:t?"Copied":R.key})})}}):(0,n.jsx)(d.z,{variant:"default",size:"lg",px:"sm",children:(0,n.jsxs)(u.Z,{spacing:"xs",align:"center",children:[(0,n.jsx)(m.a,{size:"sm"}),(0,n.jsx)("span",{children:"Generating key"})]})})]})]}),(0,n.jsx)(u.Z,{position:"apart",mt:"xl",children:(0,n.jsx)(d.z,{variant:"default",onClick:z,children:"Go Back"})})]})})]})}}),T=P;var z=A},50970:function(e,t,r){"use strict";r.d(t,{e:function(){return p},u:function(){return h}});var n=r(85893),i=r(67272),o=r(21997),a=r(33299),s=r(11163),l=r(67294),c=r(82459),u=r(64980);let d=["ref_code","ref_source"],f=(0,l.createContext)(null),p=()=>{let e=(0,l.useContext)(f);if(!e)throw Error("AccountContext not in tree");return e},h=e=>{var t,r,p,h,m;let{children:g}=e,{data:v}=(0,a.useSession)(),y=(0,i.D)(v),b=(0,s.useRouter)(),[x,w,S]=(0,o._)({key:"civitai-accounts",defaultValue:{},getInitialValueInEffect:!1}),[k,j,E]=(0,o._)({key:"civitai-og-account",defaultValue:null}),O=async()=>{var e;(0,u.F)(d),E();let t=null==v?void 0:null===(e=v.user)||void 0===e?void 0:e.id,r=t?t.toString():void 0;if(r&&r in x){let e=Object.entries(x).filter(e=>{let[t]=e;return t!==r})[0];if(delete x[r],w(x),e){await I(e[1].token);return}}await (0,a.signOut)()},C=async()=>{(0,u.F)(d),E(),S(),await (0,a.signOut)()},I=async e=>{await (0,a.signIn)("account-switch",{callbackUrl:window.location.href,...e})};return(0,l.useEffect)(()=>{var e,t,r;let n=null==v?void 0:null===(e=v.user)||void 0===e?void 0:e.id,i=null==v?void 0:null===(t=v.user)||void 0===t?void 0:t.email,o=null==v?void 0:null===(r=v.user)||void 0===r?void 0:r.username;if(!n||!i||!o)return;let a=n.toString();(async()=>{if(a in x)return x[a].token;{let e=await fetch(c.Ll);return(await e.json()).token}})().then(e=>{w(t=>{var r;let n={...t};return Object.keys(n).forEach(e=>{n[e].active=!1}),{...n,[a]:{token:e,active:!0,email:i,username:o,avatarUrl:null==v?void 0:null===(r=v.user)||void 0===r?void 0:r.image}}})})},[null==v?void 0:null===(t=v.user)||void 0===t?void 0:t.email,null==v?void 0:null===(r=v.user)||void 0===r?void 0:r.id,null==v?void 0:null===(p=v.user)||void 0===p?void 0:p.image,null==v?void 0:null===(h=v.user)||void 0===h?void 0:h.username]),(0,l.useEffect)(()=>{let e=()=>{if("visible"===document.visibilityState){var e,t;(null==v?void 0:null===(e=v.user)||void 0===e?void 0:e.id)!==(null==y?void 0:null===(t=y.user)||void 0===t?void 0:t.id)&&void 0!==y&&b.isReady&&b.reload()}};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[null==v?void 0:null===(m=v.user)||void 0===m?void 0:m.id,b]),(0,n.jsx)(f.Provider,{value:{accounts:x,setAccounts:w,logout:O,logoutAll:C,swapAccount:I,removeAccount:e=>{delete x[e.toString()],w(x)},ogAccount:k,setOgAccount:j,removeOgAccount:E},children:g})}},85891:function(e,t,r){"use strict";r.d(t,{c:function(){return p},I:function(){return m}});var n=r(85893),i=r(33299),o=r(67294),a=r(9585),s=r(50970),l=r(38498);async function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blue",t=l.zR[e],r=await fetch("//".concat(t,"/api/auth/sync"),{credentials:"include"});return r.ok?await r.json():null}let u=!1;var d=r(5779),f=r(54671);function p(e){let{children:t,disableHidden:r}=e,{data:p,update:m,status:v}=(0,i.useSession)(),y=null==p?void 0:p.user,{canViewNsfw:b}=(0,d.g)();!function(e,t){let{swapAccount:r}=(0,s.e)();(0,o.useEffect)(()=>{if(u)return;u=!0;let{searchParams:n,host:i}=new URL(window.location.href),o=n.get("sync-account");if(!o)return;let s=l.zR[o];s&&i!==s&&"loading"!==t&&c(o).then(t=>{if(!t)return;let{token:n,userId:i,username:o}=t;(null==e?void 0:e.id)!==i&&((0,a.c0)({id:"domain-sync",loading:!0,autoClose:!1,title:"Syncing account...",message:"Switching to ".concat(o," account")}),setTimeout(()=>{r(n).catch(()=>{})},1e3))})},[t])}(null==p?void 0:p.user,v);let x=(0,o.useMemo)(()=>{var e,t;if(!y)return{type:"unauthed",settings:g};let n=null!=y.tier,i=null!=y.tier&&"free"!==y.tier,o={type:"authed",...y,isMember:n,isPaidMember:i,memberInBadState:y.memberInBadState,refresh:m,settings:{showNsfw:y.showNsfw,browsingLevel:y.browsingLevel,disableHidden:null==r||r,allowAds:null!==(e=y.allowAds)&&void 0!==e?!!e:!n,autoplayGifs:null===(t=y.autoplayGifs)||void 0===t||t,blurNsfw:y.blurNsfw}};return b||(o.settings={...o.settings,...f.cR}),o},[null==p?void 0:p.expires,r,b]);return(0,o.useEffect)(()=>{(null==p?void 0:p.error)==="RefreshAccessTokenError"&&(0,i.signIn)()},[null==p?void 0:p.error]),window.isAuthed="authed"===x.type,(0,n.jsx)(h.Provider,{value:x,children:t})}let h=(0,o.createContext)(null),m=()=>{let e=(0,o.useContext)(h);if(!e)throw Error("missing CivitaiSessionContext");return e},g={...f.cR,disableHidden:!0,allowAds:!0,autoplayGifs:!0}},19797:function(e,t,r){"use strict";r.d(t,{G:function(){return s}});var n=r(85893),i=r(95117),o=r(88393);let a={smallRounded:{offset:5,radius:"lg",transitionDuration:500,openDelay:100,closeDelay:250,styles:{tooltip:{maxWidth:200,backgroundColor:"rgba(0,0,0,.5)",padding:"1px 10px 2px",zIndex:9}},multiline:!0},roundedOpaque:{radius:"lg",transitionDuration:200,styles:{tooltip:{maxWidth:500,backgroundColor:"rgba(0,0,0,1)",zIndex:9}},multiline:!0}};function s(e){let{variant:t,...r}=e,s=t?a[t]:{};return"smallRounded"===t&&(r.label=(0,n.jsx)(i.x,{size:"xs",weight:500,children:r.label})),(0,n.jsx)(o.u,{...s,...r,children:r.children})}},86393:function(e,t,r){"use strict";r.d(t,{q:function(){return l}});var n=r(85893),i=r(80971),o=r(52785),a=r(80665),s=r(67294);let l=(0,s.forwardRef)((e,t)=>{let{clearable:r=!1,onClear:l,rightSection:c,...u}=e,d=(0,s.useRef)(null),f=(0,a.Y)(d,t),p=l&&(0,n.jsx)(i.P,{variant:"transparent",title:"clear search",onClick:()=>{var e,t;let r=null===(e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))||void 0===e?void 0:e.set;null==r||r.call(d.current,"");let n=new Event("input",{bubbles:!1});null===(t=d.current)||void 0===t||t.dispatchEvent(n),l()}});return(0,n.jsx)(o.F,{ref:f,...u,rightSection:r?p:c})});l.displayName="ClearableAutoComplete"},93747:function(e,t,r){"use strict";r.d(t,{v$:function(){return g},MB:function(){return b},eD:function(){return p},N4:function(){return S},Tb:function(){return f},Be:function(){return w},mz:function(){return k},hF:function(){return v},fd:function(){return h},hg:function(){return y},Sg:function(){return x},a8:function(){return m}});var n=r(72456),i=r(2807),o=r(17578),a=r(89521),s=r(67294),l=r(48600);let c=e=>{let{items:t,currentUserId:r,hiddenImages:n,hiddenUsers:i,hiddenTags:o}=e;return t.filter(e=>{var t,a;let s=(null===(t=e.createdBy)||void 0===t?void 0:t.id)||e.createdById;if(s===r)return!0;if(s&&i.get(s))return!1;let{coverImage:l}=e;if(!l)return!0;if(n.get(l.id))return!1;for(let e of null!==(a=l.tags)&&void 0!==a?a:[])if("number"==typeof e){if(o.get(e))return!1}else if(o.get(e.id))return!1;return!0}).filter(l.$K)};var u=r(38394),d=r(14619);let f=e=>{let{id:t}=e,{data:r,isLoading:i}=n.SX.club.getById.useQuery({id:t});return{club:r,loading:i}},p=()=>{let e=n.SX.useContext(),t=n.SX.club.upsert.useMutation({async onSuccess(t,r){r.id&&await e.club.getById.invalidate({id:r.id})},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save club",error:t})}catch(t){(0,i.s9)({title:"Failed to save club",error:Error(e.message)})}}}),r=n.SX.club.upsertTier.useMutation({async onSuccess(){await e.club.getTiers.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save club tier",error:t})}catch(t){(0,i.s9)({title:"Failed to save club tier",error:Error(e.message)})}}}),o=n.SX.club.deleteTier.useMutation({async onSuccess(){await e.club.getTiers.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save club tier",error:t})}catch(t){(0,i.s9)({title:"Failed to save club tier",error:Error(e.message)})}}}),a=n.SX.club.upsertResource.useMutation({async onSuccess(){await e.club.resourceDetails.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save resource changes",error:t})}catch(t){(0,i.s9)({title:"Failed to save resource changes",error:Error(e.message)})}}}),s=n.SX.clubPost.upsertClubPost.useMutation({async onSuccess(t,r){r.id&&await e.clubPost.getById.invalidate({id:r.id}),await e.clubPost.getInfiniteClubPosts.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save post changes",error:t})}catch(t){(0,i.s9)({title:"Failed to save post changes",error:Error(e.message)})}}}),l=n.SX.clubMembership.createClubMembership.useMutation({async onSuccess(t){t&&e.clubMembership.getClubMembershipOnClub.setData({clubId:t.club.id},t),await e.common.getEntityAccess.invalidate(),await e.common.getEntityClubRequirement.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to join club",error:t})}catch(t){(0,i.s9)({title:"Failed to join club",error:Error(e.message)})}}}),c=n.SX.clubMembership.updateClubMembership.useMutation({async onSuccess(t){t&&e.clubMembership.getClubMembershipOnClub.setData({clubId:t.club.id},e=>({...e,...t})),await e.common.getEntityAccess.invalidate(),await e.common.getEntityClubRequirement.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to update membership",error:t})}catch(t){(0,i.s9)({title:"Failed to update membership",error:Error(e.message)})}}}),u=n.SX.clubMembership.removeAndRefundMember.useMutation({async onSuccess(){await e.clubMembership.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to remove and refund user",error:t})}catch(t){(0,i.s9)({title:"Failed to remove and refund user",error:Error(e.message)})}}}),d=n.SX.club.updateResource.useMutation({async onSuccess(){await e.clubMembership.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to update resource",error:t})}catch(t){(0,i.s9)({title:"Failed to update resource",error:Error(e.message)})}}}),f=n.SX.club.removeResource.useMutation({async onSuccess(){await e.clubMembership.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to remove resource",error:t})}catch(t){(0,i.s9)({title:"Failed to remove resource",error:Error(e.message)})}}}),p=n.SX.clubMembership.cancelClubMembership.useMutation({async onSuccess(t,r){((null==t?void 0:t.clubId)||(null==r?void 0:r.clubId))&&e.clubMembership.getClubMembershipOnClub.setData({clubId:(null==t?void 0:t.clubId)||(null==r?void 0:r.clubId)},e=>t&&e?{...e,...t}:null),await e.common.getEntityAccess.invalidate(),await e.common.getEntityClubRequirement.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to cancel membership",error:t})}catch(t){(0,i.s9)({title:"Failed to cancel membership",error:Error(e.message)})}}}),h=n.SX.clubMembership.restoreClubMembership.useMutation({async onSuccess(t){t&&e.clubMembership.getClubMembershipOnClub.setData({clubId:t.clubId},e=>e?{...e,...t}:null)},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to restore membership",error:t})}catch(t){(0,i.s9)({title:"Failed to restore membership",error:Error(e.message)})}}}),m=n.SX.club.delete.useMutation({async onSuccess(){await e.club.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to delete club",error:t})}catch(t){(0,i.s9)({title:"Failed to delete club",error:Error(e.message)})}}}),g=n.SX.clubPost.delete.useMutation({async onSuccess(){await e.club.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to delete club post",error:t})}catch(t){(0,i.s9)({title:"Failed to delete club post",error:Error(e.message)})}}}),v=n.SX.buzz.withdrawClubFunds.useMutation({async onSuccess(t,r){let{clubId:n}=r;await e.buzz.getBuzzAccount.invalidate({accountId:n,accountType:"club"}),await e.buzz.getAccountTransactions.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to withdraw funds from club",error:t})}catch(t){(0,i.s9)({title:"Failed to withdraw funds from club",error:Error(e.message)})}}}),y=n.SX.buzz.depositClubFunds.useMutation({async onSuccess(t,r){let{clubId:n}=r;await e.buzz.getBuzzAccount.invalidate({accountId:n,accountType:"club"}),await e.buzz.getAccountTransactions.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to deposit funds from club",error:t})}catch(t){(0,i.s9)({title:"Failed to deposit funds from club",error:Error(e.message)})}}}),b=n.SX.clubMembership.togglePauseBilling.useMutation({async onSuccess(){await e.clubMembership.getInfinite.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to pause billing for user",error:t})}catch(t){(0,i.s9)({title:"Failed to pause billing for user",error:Error(e.message)})}}});return{upsertClub:e=>t.mutateAsync(e),upserting:t.isLoading,upsertClubTier:e=>r.mutateAsync(e),upsertingTier:r.isLoading,deleteClubTier:e=>o.mutateAsync(e),deletingTier:o.isLoading,upsertClubResource:e=>a.mutateAsync(e),upsertingResource:a.isLoading,upsertClubPost:e=>s.mutateAsync(e),upsertingClubPost:s.isLoading,createClubMembership:e=>l.mutateAsync(e),creatingClubMembership:l.isLoading,updateClubMembership:e=>c.mutateAsync(e),updatingClubMembership:c.isLoading,removeAndRefundMember:e=>u.mutateAsync(e),removingAndRefundingMember:u.isLoading,updateResource:e=>d.mutateAsync(e),updatingResource:d.isLoading,removeResource:e=>f.mutateAsync(e),removingResource:f.isLoading,cancelClubMembership:e=>p.mutateAsync(e),cancelingClubMembership:p.isLoading,restoreClubMembership:e=>h.mutateAsync(e),restoringClubMembership:h.isLoading,deleteClub:e=>m.mutateAsync(e),deletingClub:m.isLoading,deleteClubPost:e=>g.mutateAsync(e),deletingClubPost:g.isLoading,withdrawClubFunds:e=>v.mutateAsync(e),withdrawingClubFunds:v.isLoading,togglePauseBilling:e=>b.mutateAsync(e),togglingPauseBilling:b.isLoading,depositClubFunds:e=>y.mutateAsync(e),depositingClubFunds:y.isLoading}},h=(e,t,r)=>{let{data:i,...l}=n.SX.clubPost.getInfiniteClubPosts.useInfiniteQuery({clubId:e,...t},{getNextPageParam:e=>e.nextCursor,...r}),u=(0,o.xJ)(),{hiddenUsers:d,hiddenImages:f,hiddenTags:p,hiddenLoading:h}=(0,a.u)(),m=(0,s.useMemo)(()=>{var e;return h?[]:c({items:null!==(e=null==i?void 0:i.pages.flatMap(e=>e.items))&&void 0!==e?e:[],currentUserId:null==u?void 0:u.id,hiddenImages:f,hiddenTags:p,hiddenUsers:d})},[null==i?void 0:i.pages,f,p,d,u,h]);return{data:i,clubPosts:m,...l}},m=()=>{let{data:e=[],...t}=n.SX.club.userContributingClubs.useQuery();return{userClubs:e,hasClubs:e.length>0,...t}},g=e=>{var t,r;let{clubId:i}=e,{data:a=[],...l}=n.SX.club.userContributingClubs.useQuery(void 0,{enabled:!!i}),c=(0,o.xJ)(),u=(0,s.useMemo)(()=>{if(!a||!c)return null;let e=a.find(e=>e.id===i);return null!=e?e:null},[a,c,i]);return{isClubAdmin:!!(null==u?void 0:u.admin),isOwner:c&&(null==u?void 0:u.userId)===(null==c?void 0:c.id),isModerator:null==c?void 0:c.isModerator,permissions:null!==(r=null==u?void 0:null===(t=u.admin)||void 0===t?void 0:t.permissions)&&void 0!==r?r:[],...l}},v=(e,t,r)=>{let i=(0,o.xJ)(),{data:a,...l}=n.SX.clubMembership.getInfinite.useInfiniteQuery({...t,clubId:e},{enabled:!!i,getNextPageParam:e=>e.nextCursor,...r});return{memberships:(0,s.useMemo)(()=>{var e;return null!==(e=null==a?void 0:a.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[null==a?void 0:a.pages]),...l}},y=(e,t,r)=>{let i=(0,o.xJ)(),{data:a,...s}=n.SX.club.getPaginatedClubResources.useQuery({...t,clubId:e},{enabled:!!i,...r});if(a){let{items:e=[],...t}=a;return{resources:e,pagination:t,...s}}return{resources:[],pagination:null,...s}},b=()=>{let e=(0,u.PH)(e=>e.clubs);return(0,d.HO)(e)},x=(e,t)=>{let{data:r,...i}=n.SX.club.getInfinite.useInfiniteQuery(e,{getNextPageParam:e=>e.nextCursor,...t}),l=(0,o.xJ)(),{hiddenImages:c,hiddenTags:u,hiddenUsers:d,hiddenLoading:f}=(0,a.u)(),p=(0,s.useMemo)(()=>(f||null==r||r.pages.flatMap(e=>e.items),[]),[null==r?void 0:r.pages,c,u,d,l,f]);return{data:r,clubs:p,...i}},w=(e,t,r)=>{let i=(0,o.xJ)(),{data:a,...s}=n.SX.clubAdmin.getInvitesPaged.useQuery({...t,clubId:e},{enabled:!!i,...r});if(a){let{items:e=[],...t}=a;return{invites:e,pagination:t,...s}}return{invites:[],pagination:null,...s}},S=()=>{let e=n.SX.useContext(),t=n.SX.clubAdmin.upsertInvite.useMutation({async onSuccess(){await e.clubAdmin.getInvitesPaged.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to save invite",error:t})}catch(t){(0,i.s9)({title:"Failed to save invite",error:Error(e.message)})}}}),r=n.SX.clubAdmin.deleteInvite.useMutation({async onSuccess(){await e.clubAdmin.getInvitesPaged.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to delete invite",error:t})}catch(t){(0,i.s9)({title:"Failed to delete invite",error:Error(e.message)})}}}),o=n.SX.clubAdmin.acceptInvite.useMutation({async onSuccess(){await e.clubAdmin.getInvitesPaged.invalidate(),await e.clubAdmin.getAdminsPaged.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to accept invite",error:t})}catch(t){(0,i.s9)({title:"Failed to accept invite",error:Error(e.message)})}}}),a=n.SX.clubAdmin.update.useMutation({async onSuccess(){await e.clubAdmin.getAdminsPaged.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to update admin",error:t})}catch(t){(0,i.s9)({title:"Failed to update admin",error:Error(e.message)})}}}),s=n.SX.clubAdmin.delete.useMutation({async onSuccess(){await e.clubAdmin.getAdminsPaged.invalidate()},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to delete admin",error:t})}catch(t){(0,i.s9)({title:"Failed to delete admin",error:Error(e.message)})}}});return{upsertInvite:e=>t.mutateAsync(e),upsertingInvite:t.isLoading,deleteInvite:e=>r.mutateAsync(e),deletingInvite:r.isLoading,acceptInvite:e=>o.mutateAsync(e),acceptingInvite:o.isLoading,update:e=>a.mutateAsync(e),updating:a.isLoading,deleteAdmin:e=>s.mutateAsync(e),deletingAdmin:r.isLoading}},k=(e,t,r)=>{let i=(0,o.xJ)(),{data:a,...s}=n.SX.clubAdmin.getAdminsPaged.useQuery({...t,clubId:e},{enabled:!!i,...r});if(a){let{items:e=[],...t}=a;return{admins:e,pagination:t,...s}}return{admins:[],pagination:null,...s}}},90717:function(e,t,r){"use strict";r.r(t),r.d(t,{openAddToCollectionModal:function(){return A}});var n=r(85893),i=r(56817),o=r(97564),a=r(71232),s=r(95117),l=r(67841),c=r(9094),u=r(20966),d=r(73723),f=r(87092),p=r(28855),h=r(9585),m=r(35818),g=r(98729),v=r(67214),y=r(61298),b=r(67294),x=r(35362),w=r(66214),S=r(77178),k=r(2807),j=r(72456),E=r(9939),O=r(27943),C=r(17578),I=r(48600),P=r(25963);let{openModal:A,Modal:T}=(0,x.W)({name:"addToCollection",title:"Add to Collection",size:"sm",Element:e=>{var t;let{context:r,props:i}=e,[o,a]=(0,b.useState)(null!==(t=i.createNew)&&void 0!==t&&t);return o?(0,n.jsx)(_,{...i,onBack:()=>a(!1),onSubmit:()=>r.close()}):(0,n.jsx)(N,{...i,onNewClick:()=>a(!0),onSubmit:()=>r.close()})}});t.default=T;let z=(0,i.k)(e=>({body:{alignItems:"center"},labelWrapper:{flex:1},contentWrap:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));function N(e){var t;let{onNewClick:r,onSubmit:i,...v}=e,{note:y,...x}=v,{classes:w}=z(),S=j.SX.useUtils(),[O,C]=(0,b.useState)([]),{data:I=[],isLoading:A}=j.SX.collection.getAllUser.useQuery({permissions:[m.Wx.ADD,m.Wx.ADD_REVIEW,m.Wx.MANAGE],type:v.type}),{data:T=[],isLoading:N}=j.SX.collection.getUserCollectionItemsByItem.useQuery({...x}),R=I.filter(e=>e.isOwner),_=I.filter(e=>!e.isOwner),M=j.SX.collection.saveItem.useMutation();return(0,b.useEffect)(()=>{0!==T.length&&C(T.map(e=>({collectionId:e.collectionId,tagId:e.tagId,userId:e.collection.userId,read:e.collection.read})))},[T,v.articleId,v.imageId,v.modelId,v.postId]),(0,n.jsx)(o.K,{children:(0,n.jsxs)(o.K,{spacing:"xl",children:[(0,n.jsxs)(o.K,{spacing:4,children:[(0,n.jsxs)(a.Z,{spacing:"xs",position:"apart",noWrap:!0,children:[(0,n.jsx)(s.x,{size:"sm",weight:"bold",children:"Your collections"}),(0,n.jsx)(l.z,{variant:"subtle",size:"xs",leftIcon:(0,n.jsx)(g.Z,{size:16}),onClick:r,compact:!0,children:"New collection"})]}),N||A?(0,n.jsx)(c.M,{py:"xl",children:(0,n.jsx)(u.a,{variant:"bars"})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.x.Autosize,{maxHeight:200,children:R.length>0?(0,n.jsx)(o.K,{spacing:4,children:R.map(e=>{var t,r,i;let l=E.Oj[e.read].icon,c=O.find(t=>t.collectionId===e.id),u=(null!==(r=null==e?void 0:e.tags)&&void 0!==r?r:[]).filter(e=>!e.filterableOnly||e.id===(null==c?void 0:c.tagId));return(0,n.jsxs)(o.K,{className:w.contentWrap,spacing:0,children:[(0,n.jsx)(f.X,{classNames:w,checked:!!c,onChange:t=>{t.preventDefault(),c?C(t=>t.filter(t=>t.collectionId!==e.id)):C(t=>[...t,{collectionId:e.id,userId:e.userId,read:e.read}])},label:(0,n.jsxs)(a.Z,{spacing:"xs",position:"apart",w:"100%",noWrap:!0,children:[(0,n.jsx)(s.x,{lineClamp:1,inherit:!0,children:e.name}),(0,n.jsx)(l,{size:18})]})},null==c?void 0:c.collectionId),c&&(null==u?void 0:u.length)>0&&(0,n.jsx)(p.Ph,{withinPortal:!0,withAsterisk:!0,placeholder:"Select a tag for your entry in the contest",size:"xs",label:"Tag your entry",value:null!==(i=null===(t=c.tagId)||void 0===t?void 0:t.toString())&&void 0!==i?i:null,onChange:t=>{C(r=>r.map(r=>r.collectionId===e.id?{...r,tagId:t?parseInt(t,10):null}:r))},clearable:!0,autoFocus:!0,data:u.map(e=>({value:e.id.toString(),label:e.name})),zIndex:400})]},e.id)})}):(0,n.jsx)(c.M,{py:"xl",children:(0,n.jsx)(s.x,{color:"dimmed",children:"You don't have any ".concat((null===(t=v.type)||void 0===t?void 0:t.toLowerCase())||""," collections yet.")})})}),_.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.x,{size:"sm",weight:"bold",mt:"md",children:"Collections you contribute to"}),(0,n.jsx)(d.x.Autosize,{maxHeight:200,children:(0,n.jsx)(o.K,{spacing:4,children:_.map(e=>{var t,r,i;let l=E.Oj[e.read].icon,c=O.find(t=>t.collectionId===e.id),u=(null!==(r=null==e?void 0:e.tags)&&void 0!==r?r:[]).filter(e=>!e.filterableOnly||e.id===(null==c?void 0:c.tagId));return(0,n.jsxs)(o.K,{className:w.contentWrap,spacing:0,children:[(0,n.jsx)(f.X,{classNames:w,checked:!!c,onChange:t=>{t.preventDefault(),c?C(t=>t.filter(t=>t.collectionId!==e.id)):C(t=>{var r;return[...t,{collectionId:e.id,tagId:(null===(r=e.tags)||void 0===r?void 0:r.length)>0?e.tags[0].id:null,userId:e.userId,read:e.read}]})},label:(0,n.jsxs)(a.Z,{spacing:"xs",position:"apart",w:"100%",noWrap:!0,children:[(0,n.jsx)(s.x,{lineClamp:1,inherit:!0,children:e.name}),(0,n.jsx)(l,{className:"shrink-0 grow-0",size:18})]})},null==c?void 0:c.collectionId),c&&(null==u?void 0:u.length)>0&&(0,n.jsx)(p.Ph,{withinPortal:!0,withAsterisk:!0,placeholder:"Select a tag for your entry in the contest",size:"xs",label:"Tag your entry",value:null!==(i=null===(t=c.tagId)||void 0===t?void 0:t.toString())&&void 0!==i?i:null,zIndex:400,onChange:t=>{C(r=>r.map(r=>r.collectionId===e.id?{...r,tagId:t?parseInt(t,10):null}:r))},clearable:!0,autoFocus:!0,data:u.map(e=>({value:e.id.toString(),label:e.name}))})]},e.id)})})})]})]})]}),(0,n.jsx)(a.Z,{position:"right",children:(0,n.jsx)(l.z,{loading:M.isLoading,onClick:()=>{let e=T.map(e=>e.collectionId),t=O.filter(t=>!e.includes(t.collectionId)&&t.collectionId),r=e.filter(e=>!O.some(t=>t.collectionId===e));if(!t.length&&!r.length)return i();M.mutate({...v,collections:O,removeFromCollectionIds:r},{async onSuccess(e,t){let{type:r,modelId:o,collections:a}=t,s="added"===e.status;if((0,h.c0)({title:s?"Item added":"Item removed",message:s?"Your item has been added to the selected collections.":"Your item has been removed from the selected collections."}),i(),s&&e.isOwner&&r===m.yl.Model&&o&&1===a.length){let[e]=a;e.read===m.zq.Public&&(0,P.h7)({title:"Set Showcase Collection",centered:!0,children:(0,n.jsx)(D,{modelId:o,collectionId:e.collectionId})})}await S.collection.getUserCollectionItemsByItem.invalidate()},onError(e){(0,k.s9)({title:"Unable to update item",error:Error(e.message)})}})},children:"Save"})})]})})}let R="create-collection";function _(e){let{onSubmit:t,onBack:r,...i}=e,c=(0,C.xJ)(),u=(0,w.cI)({schema:S.kO,defaultValues:{type:m.yl.Model,...i,name:"",description:"",read:m.zq.Private,write:m.gY.Private},shouldUnregister:!1}),d=j.SX.useUtils(),f=j.SX.collection.upsert.useMutation(),p=u.watch("mode");return(0,n.jsx)(w.l0,{form:u,onSubmit:e=>{(0,h.c0)({id:R,loading:!0,disallowClose:!0,autoClose:!1,message:"Creating collection..."}),f.mutate(e,{async onSuccess(e,r){let{type:i,modelId:o}=r;await d.collection.getAllUser.invalidate(),await d.collection.getUserCollectionItemsByItem.invalidate(),t(),i===m.yl.Model&&o&&e.read===m.zq.Public&&e.isOwner&&(0,P.h7)({title:"Set Showcase Collection",centered:!0,children:(0,n.jsx)(D,{modelId:o,collectionId:e.id})}),(0,k.LX)({title:"Collection created",message:"Your collection has been created."})},onError(e){(0,k.s9)({title:"Unable to create collection",error:Error(e.message)})},onSettled(){(0,h.yK)(R)}})},children:(0,n.jsxs)(o.K,{spacing:"xl",children:[(0,n.jsxs)(o.K,{spacing:4,children:[(0,n.jsxs)(a.Z,{position:"apart",children:[(0,n.jsx)(s.x,{size:"sm",weight:"bold",children:"New Collection"}),(0,n.jsx)(l.z,{variant:"subtle",size:"xs",leftIcon:(0,n.jsx)(v.Z,{size:16}),onClick:r,compact:!0,children:"Back to selection"})]}),(0,n.jsx)(w.oH,{name:"name",label:"Name",placeholder:"e.g.: Video Game Characters",withAsterisk:!0}),(0,n.jsx)(w.zg,{name:"description",label:"Description",placeholder:"e.g.: My favorite video game characters",rows:3,autosize:!0}),(0,n.jsx)(w.JD,{name:"read",label:"Privacy",data:Object.values(E.Oj),itemComponent:M}),(null==c?void 0:c.isModerator)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.JD,{name:"write",label:"Add permissions",data:Object.values(E.Mb)}),(0,n.jsx)(w.JD,{name:"mode",label:"Mode",data:[...Object.values(m.KF).map(e=>[m.KF.Bookmark].some(t=>t===e)?void 0:{value:e,label:(0,O.Gf)(e)}).filter(I.$K)],clearable:!0}),p===m.KF.Contest&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.$x,{name:"metadata.endsAt",label:"End Date",placeholder:"Select an end date",icon:(0,n.jsx)(y.Z,{size:16}),clearable:!0}),(0,n.jsx)(s.x,{size:"xs",color:"dimmed",children:"This is only used to stop recurring job updating the random indexes. We suggest you add this in to save some resources, but this value will not be shown to end-users."})]})]}),(0,n.jsx)(w.o2,{name:"nsfw",label:"This collection contains mature content",mt:"xs"})]}),(0,n.jsx)(a.Z,{position:"right",children:(0,n.jsx)(l.z,{type:"submit",loading:f.isLoading,children:"Create"})})]})})}let M=(0,b.forwardRef)((e,t)=>{let{label:r,description:i,icon:o,...l}=e;return(0,n.jsx)("div",{ref:t,...l,children:(0,n.jsxs)(a.Z,{align:"center",noWrap:!0,children:[(0,n.jsx)(o,{size:18}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{size:"sm",children:r}),(0,n.jsx)(s.x,{size:"xs",sx:{opacity:.7},children:i})]})]})})});function D(e){let{modelId:t,collectionId:r}=e,i=j.SX.model.setCollectionShowcase.useMutation({onSuccess:()=>(0,P.pT)()});return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(s.x,{children:"Would you like to set this collection as this model's showcase collection?"}),(0,n.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,n.jsx)(l.z,{variant:"default",children:"No"}),(0,n.jsx)(l.z,{onClick:()=>{i.mutate({id:t,collectionId:r})},loading:i.isLoading,children:"Yes"})]})]})}M.displayName="SelectItem"},9939:function(e,t,r){"use strict";r.d(t,{Ae:function(){return E},H5:function(){return P},JB:function(){return z},Kx:function(){return I},L_:function(){return w},Mb:function(){return j},Oj:function(){return k},PY:function(){return b},TC:function(){return S},aZ:function(){return A},ep:function(){return T},oS:function(){return O},xG:function(){return x},yx:function(){return C}});var n=r(78308),i=r(80223),o=r(97118),a=r(11163),s=r(67294),l=r(1604),c=r(36061),u=r(17578),d=r(38394),f=r(32957),p=r(35818),h=r(36777),m=r(2807),g=r(14619),v=r(72456);let y=l.z.object({collectionId:l.z.union([l.z.array(l.z.coerce.number()),l.z.coerce.number()]).transform(e=>Array.isArray(e)?e[0]:e),sort:l.z.nativeEnum(f.CI),userId:l.z.coerce.number().optional()}).partial(),b=()=>{let e=(0,d.PH)(e=>e.collections);return(0,g.HO)(e)},x=()=>{let{query:e,pathname:t,push:r}=(0,a.useRouter)();return(0,s.useMemo)(()=>{let n=y.safeParse(e);return{...n.success?n.data:{},set:(n,i)=>{r({pathname:null!=i?i:t,query:(0,g.HO)({...e,...n})},void 0,{shallow:!i||t===i})}}},[e,t,r])},w=e=>{switch(e.type){case"image":return{type:e.type,image:e.data,user:e.data.user,url:"/images/".concat(e.data.id),baseModel:e.data.baseModel,itemAddedAt:e.createdAt,dataCreatedAt:e.data.createdAt};case"model":var t;return{type:e.type,image:null===(t=e.data.images)||void 0===t?void 0:t[0],user:e.data.user,url:"/models/".concat(e.data.id),itemAddedAt:e.createdAt,dataCreatedAt:e.data.createdAt};case"post":return{type:e.type,image:e.data.images[0],user:e.data.user,url:"/posts/".concat(e.data.id),itemAddedAt:e.createdAt};case"article":return{type:e.type,image:e.data.coverImage?{...e.data.coverImage,hasMeta:!e.data.coverImage.hideMeta&&!!e.data.coverImage.meta,onSite:!1}:void 0,user:e.data.user,title:e.data.title,url:"/articles/".concat(e.data.id),itemAddedAt:e.createdAt};default:throw Error("unsupported collection type")}},S=(e,t)=>{null!=e||(e={});let{data:r,isLoading:n,...i}=v.SX.collection.getInfinite.useInfiniteQuery({...e},{getNextPageParam:e=>e.nextCursor,trpc:{context:{skipBatch:!0}},...t}),o=(0,s.useMemo)(()=>null==r?void 0:r.pages.flatMap(e=>e?e.items:[]),[r]),{items:a,loadingPreferences:l}=(0,c.f)({type:"collections",data:o,isRefetching:i.isRefetching});return{data:r,collections:a,isLoading:n||l,...i}},k={[p.zq.Private]:{icon:n.Z,label:"Private",value:p.zq.Private,description:"Only you and contributors for this collection can see this"},[p.zq.Public]:{icon:i.Z,label:"Public",value:p.zq.Public,description:"Anyone can see this collection"},[p.zq.Unlisted]:{icon:o.Z,label:"Unlisted",value:p.zq.Unlisted,description:"Only people with the link can see this collection"}},j={[p.gY.Private]:{icon:n.Z,label:"Private - only the owner can add content",value:p.gY.Private,description:"No one will be able to add content to this collection"},[p.gY.Public]:{icon:i.Z,label:"Public - No review required",value:p.gY.Public,description:"Anyone can add content to this collection. No review required."},[p.gY.Review]:{icon:o.Z,label:"Public - Review required",value:p.gY.Review,description:"Anyone can add content to this collection, but content needs to be reviewed before it is visible."}},E=e=>{var t;if(!e)return!1;let r=null!==(t=null==e?void 0:e.metadata)&&void 0!==t?t:{};return!!r.submissionStartDate&&!!r.submissionEndDate&&r.submissionStartDate&&r.submissionEndDate&&new Date(r.submissionStartDate)new Date},O=()=>{let e=(0,u.xJ)(),{data:t=[],...r}=v.SX.user.getBookmarkCollections.useQuery(void 0,{enabled:!!e}),n=(0,s.useMemo)(()=>t.reduce((e,t)=>(t.type&&(e[t.type]=t),e),{}),[t]);return{...r,systemCollections:t,groupedCollections:n}},C=e=>{let{collectionIds:t=[]}=e,{data:r=[],...n}=v.SX.collection.getPermissionDetails.useQuery({ids:t},{enabled:(null==t?void 0:t.length)>0});return{collections:r,...n}},I=(e,t)=>{let{data:{collection:r,permissions:n}={},...i}=v.SX.collection.getById.useQuery({id:e},{enabled:!0,...t});return{collection:r,permissions:n,...i}},P=e=>{var t,r,n;return e.mode===p.KF.Contest&&!!(null===(t=e.metadata)||void 0===t?void 0:t.votingPeriodStart)&&(0,h.YI)(null!==(n=null===(r=e.metadata)||void 0===r?void 0:r.votingPeriodStart)&&void 0!==n?n:new Date)},A=()=>{let e=v.SX.useUtils(),t=v.SX.collection.removeFromCollection.useMutation({onSuccess:async(t,r)=>{(0,m.LX)({autoClose:5e3,title:"Item has been removed.",message:"Item has been removed from collection and is no longer visible."}),t.type===p.yl.Model&&await e.model.getAll.invalidate(),t.type===p.yl.Image&&await e.image.getInfinite.invalidate(),await e.collection.getById.invalidate({id:r.collectionId})},onError(e){(0,m.s9)({title:"Unable to remove item from collection",error:Error(e.message)})}}),r=v.SX.collection.updateCollectionItemNSFWLevel.useMutation({onSuccess:async(e,t)=>{(0,m.LX)({autoClose:5e3,title:"NSFW level has been updated.",message:"NSFW level has been updated for the item."})},onError(e){(0,m.s9)({title:"Unable to update NSFW level",error:Error(e.message)})}}),n=v.SX.collection.joinCollectionAsManager.useMutation(),i=v.SX.collection.getYoutubeAuthUrl.useMutation(),o=v.SX.collection.enableYoutubeSupport.useMutation(),a=async(e,t)=>{await r.mutateAsync(e,t)},s=async e=>i.mutateAsync(e),l=async e=>o.mutateAsync(e),c=async e=>n.mutateAsync(e);return{removeCollectionItem:async e=>{await t.mutateAsync(e)},removingCollectionItem:t.isLoading,updateCollectionItemNsfwLevel:a,updatingCollectionItemNsfwLevel:r.isLoading,updateCollectionItemNsfwLevelPayload:r.variables,getYoutubeAuthUrl:s,getYoutubeAuthUrlLoading:i.isLoading,enableYoutubeSupport:l,enableYoutubeSupportLoading:o.isLoading,joinCollectionAsManager:c,joinCollectionAsManagerLoading:n.isLoading}},T=()=>{v.SX.useUtils();let e=v.SX.collection.setItemScore.useMutation({onError:e=>{(0,m.s9)({title:"Failed to set item score",error:Error(e.message)})}});return{setItemScore:(t,r)=>e.mutateAsync(t,r),loading:e.isLoading}},z=(e,t)=>{let{data:r,...n}=v.SX.collection.getEntryCount.useQuery({id:e},{enabled:!0,...t});return{data:r,...n}}},80501:function(e,t,r){"use strict";r.d(t,{sv:function(){return eO},Cr:function(){return T},tL:function(){return X},Co:function(){return I},lB:function(){return eP},IM:function(){return eI},WY:function(){return A},Dv:function(){return C}});var n=r(85893),i=r(71232),o=r(97564),a=r(95117),s=r(5044),l=r(88002),c=r(49834),u=r(64523),d=r(67841),f=r(54777),p=r(34736),h=r(56817),m=r(67294),g=r(17578),v=r(72456),y=r(73445),b=r(18753),x=r(11163),w=r.n(x),S=r(73679),k=r(32957),j=r(48600),E=r(38498);let O=(0,m.createContext)({}),C=()=>{let e=(0,m.useContext)(O);if(!e)throw Error("useRootThreadContext can only be used inside RootThreadProvider");return e};function I(e){let{entityType:t,entityId:r,hidden:i,...o}=e,a=(0,x.useRouter)(),[s,l]=(0,m.useState)({entityType:t,entityId:r}),[c,u]=(0,m.useState)(k.AX.Oldest),d=N(e=>e.expandedComments),f=N(e=>e.toggleExpanded),p=N(e=>e.setExpanded),h=v.SX.useContext(),g=s.entityId===r&&s.entityType===t,y=a.query.commentParentType,b=(0,S.D)(a.query.commentParentId),{data:w,isLoading:C}=v.SX.commentv2.getSingle.useQuery({id:s.entityId},{enabled:!g}),I=(0,m.useCallback)((e,t)=>{l({entityType:e,entityId:t})},[]),P=(0,m.useCallback)(()=>{l({entityType:t,entityId:r})},[]),{data:A}=v.SX.commentv2.getThreadDetails.useQuery({entityId:s.entityId,entityType:s.entityType,hidden:i},{onSuccess:e=>{var t,r,n,o,a,l,c;if(!e)return;let u=[e,...null!==(r=e.children)&&void 0!==r?r:[]],d=E._G.comments.getMaxDepth({entityType:s.entityType});for(let e of u)for(let t of null!==(n=e.comments)&&void 0!==n?n:[]){let e=null!==(o=u.find(e=>e.commentId===t.id))&&void 0!==o?o:null;(null!==(a=null==e?void 0:e.depth)&&void 0!==a?a:0)e.depthe.commentId).filter(j.$K))&&void 0!==c?c:[])}});return(0,m.useEffect)(()=>{y&&b&&I(y,b)},[y,b]),(0,n.jsx)(O.Provider,{value:{sort:c,setSort:u,expanded:d,setRootThread:I,setInitialThread:P,isInitialThread:g,toggleExpanded:f,activeComment:w},children:(0,n.jsx)(T,{entityType:s.entityType,entityId:s.entityId,hidden:i,level:1,...o})})}let P=(0,m.createContext)({}),A=()=>{let e=(0,m.useContext)(P);if(!e)throw Error("useCommentsContext can only be used inside CommentsProvider");return e};function T(e){var t,r,i;let{entityType:o,entityId:a,children:s,initialCount:l,limit:c=5,badges:u,hidden:d,forceLocked:f,level:p=1}=e,h=(0,x.useRouter)(),y=(0,g.xJ)(),{sort:b,setSort:w,activeComment:j}=C(),E=z(o,a),O=N((0,m.useCallback)(e=>{var t;return null!==(t=e.comments[E])&&void 0!==t?t:[]},[E])),[I,A]=(0,m.useState)(!1),T=()=>A(e=>!e),{data:R,isInitialLoading:_}=v.SX.commentv2.getThreadDetails.useQuery({entityId:a,entityType:o,hidden:d},{enabled:void 0===l||l>0,onSuccess:e=>{B(F(null==e?void 0:e.comments))}}),M=null!==(t=null==R?void 0:R.hidden)&&void 0!==t?t:0,D=(0,m.useMemo)(()=>{var e;let t=null!==(e=null==R?void 0:R.comments)&&void 0!==e?e:[];return b===k.AX.Newest?[...t].reverse():b===k.AX.MostReactions?[...t].sort((e,t)=>t.reactions.length-e.reactions.length):t},[null==R?void 0:R.comments,b]),L=(0,S.D)(h.query.highlight),F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(void 0!==L){let t=e.findIndex(e=>e.id===L)+1;return t{let e=D.sort((e,t)=>{var r,n;return new Date(null!==(r=t.pinnedAt)&&void 0!==r?r:0).getTime()-new Date(null!==(n=e.pinnedAt)&&void 0!==n?n:0).getTime()});return I?e:e.slice(0,U)},[D,I,U]),Z=(0,m.useMemo)(()=>O.filter(e=>!(null==H?void 0:H.some(t=>t.id===e.id))),[O,H]),W=null!==(r=null==R?void 0:R.locked)&&void 0!==r&&r,V=null!==(i=null==y?void 0:y.muted)&&void 0!==i&&i,$=D.length-U;return $=$>0?$:0,(0,n.jsx)(P.Provider,{value:{data:H,isLoading:_,entityId:a,entityType:o,isLocked:W,isMuted:V,created:O,badges:u,limit:U,remaining:$,showMore:I,toggleShowMore:T,highlighted:L,hiddenCount:M,forceLocked:f,sort:b,setSort:w,parentThreadId:null==R?void 0:R.id,level:p},children:s({data:H,isLoading:_,isLocked:W,isMuted:V,created:Z,badges:u,limit:U,remaining:$,showMore:I,toggleShowMore:T,highlighted:L,hiddenCount:M,forceLocked:f,sort:b,setSort:w,activeComment:j})})}let z=(e,t)=>"".concat(t,"_").concat(e),N=(0,y.Ue)()((0,b.n)((e,t)=>({comments:{},expandedComments:[],setExpanded:t=>e(e=>{e.expandedComments=[...new Set([...e.expandedComments,...t])]}),toggleExpanded:t=>e(e=>{e.expandedComments.includes(t)?e.expandedComments=e.expandedComments.filter(e=>e!==t):e.expandedComments.push(t)}),addComment:(t,r,n)=>e(e=>{var i;let o=z(t,r);(null===(i=e.comments[o])||void 0===i?void 0:i.length)?e.comments[o].push(n):e.comments[o]=[n]}),editComment:(t,r,n)=>e(e=>{let i=z(t,r);if(!e.comments[i])return;let o=e.comments[i].findIndex(e=>e.id===n.id);o>-1&&(e.comments[i][o].content=n.content)}),deleteComment:(t,r,n)=>e(e=>{let i=z(t,r);e.comments[i]&&(e.comments[i]=e.comments[i].filter(e=>e.id!==n))})})));var R=r(74403),_=r(9094),M=r(79543),D=r(78308),L=r(12902),F=r(66214),U=r(1604),B=r(7792);let H=U.z.object({entityId:U.z.number(),entityType:U.z.enum(["question","answer","image","post","model","comment","review","article","bounty","bountyEntry","clubPost"]),hidden:U.z.boolean().optional(),parentThreadId:U.z.number().optional(),excludedUserIds:U.z.array(U.z.number()).optional()}).extend({id:U.z.number().optional(),content:(0,B.T)({allowedTags:["div","strong","p","em","u","s","a","br","span"]}).refine(e=>e&&e.length>0&&"

"!==e,"Cannot be empty"),nsfw:U.z.boolean().optional(),tosViolation:U.z.boolean().optional()});U.z.object({id:U.z.number(),entityId:U.z.number(),entityType:U.z.enum(["question","answer","image","post","model","comment","review","article","bounty","bountyEntry","clubPost"])});var Z=r(9242),W=r(2807);let{comments:V,...$}=N.getState(),q=e=>{let{comment:t,onCancel:r,autoFocus:a,replyTo:s,replyToCommentId:l,borderless:c}=e,{classes:u,cx:f}=G(),{expanded:p,toggleExpanded:h}=C(),{entityId:g,entityType:y,isMuted:b,data:x,parentThreadId:w}=A(),S=l||g,k=l?"comment":y,j=(0,m.useRef)(null),[E,O]=(0,m.useState)(a),I={...t,entityId:S,entityType:k};s&&(I.content='@').concat(s.username," "));let P=(0,F.cI)({schema:H,defaultValues:I,shouldUnregister:!1,mode:"onChange"}),T=(0,m.useMemo)(()=>{var e;return(0,Z.R1)(null!==(e=null==x?void 0:x.map(e=>({id:e.user.id,label:e.user.username})))&&void 0!==e?e:[],"id")},[x]),z=v.SX.useUtils(),{mutate:N,isLoading:M}=v.SX.commentv2.upsert.useMutation({async onSuccess(e,t){t.id?(z.commentv2.getSingle.setData({id:t.id},e),z.commentv2.getThreadDetails.setData({entityType:k,entityId:S},(0,L.ZP)(r=>{var n;if(!r)return;let i=null===(n=r.comments)||void 0===n?void 0:n.find(e=>e.id===t.id);i?i.content=t.content:$.editComment(k,S,e)}))):(z.commentv2.getThreadDetails.getData({entityType:k,entityId:S})||await z.commentv2.getThreadDetails.invalidate({entityType:k,entityId:S}),z.commentv2.getCount.setData({entityType:k,entityId:S},function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}),$.addComment(k,S,e)),l&&!p.includes(l)&&h(l),U()},onError(e){(0,W.s9)({error:Error(e.message),title:"Could not save comment"})}}),U=()=>{a||O(!1),null==r||r(),P.reset()},B=e=>{N({...t,...e,entityId:S,entityType:k,parentThreadId:l?w:void 0})};return b?(0,n.jsx)(R.b,{color:"yellow",icon:(0,n.jsx)(D.Z,{}),children:(0,n.jsx)(_.M,{children:"You cannot add comments because you have been muted"})}):(0,n.jsx)(F.l0,{form:P,onSubmit:B,style:{flex:1},children:(0,n.jsxs)(o.K,{children:[(0,n.jsx)(F.ZN,{innerRef:j,name:"content",disabled:M,includeControls:["formatting","link","mentions"],defaultSuggestions:T,hideToolbar:!0,placeholder:(null==x?void 0:x.length)?"Type your comment...":"Be the first to leave a comment...",autoFocus:E,onFocus:a?void 0:()=>O(!0),onSuperEnter:()=>P.handleSubmit(B)(),classNames:{root:c?"border-none":void 0,content:f(u.content,"rounded-3xl")}}),E&&(0,n.jsxs)(i.Z,{position:"right",children:[(0,n.jsx)(d.z,{variant:"default",size:"xs",onClick:U,children:"Cancel"}),(0,n.jsx)(d.z,{type:"submit",size:"xs",loading:M,disabled:!P.formState.isDirty,children:"Comment"})]})]})})},G=(0,h.k)(e=>({content:{padding:0,fontSize:14,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0],".ProseMirror":{padding:"8px 12px",minHeight:38,cursor:"text"}}}));var K=r(65297);function X(e){let{onCancel:t,autoFocus:r,replyToCommentId:o,className:s,borderless:l}=e,c=(0,g.xJ)(),{isLocked:u,isMuted:d,forceLocked:f}=A();return c?f?(0,n.jsx)(R.b,{color:"yellow",children:(0,n.jsx)(_.M,{children:"You do not have permissions to add comments."})}):u||d?(0,n.jsx)(R.b,{color:"yellow",icon:(0,n.jsx)(D.Z,{}),children:(0,n.jsx)(_.M,{children:d?"You cannot add comments because you have been muted":"This thread has been locked"})}):(0,n.jsxs)(i.Z,{align:"flex-start",noWrap:!0,spacing:"sm",className:s,children:[(0,n.jsx)(K.Y,{user:c,size:o?"sm":"md"}),(0,n.jsx)(q,{onCancel:t,autoFocus:r,replyToCommentId:o,borderless:l})]}):(0,n.jsx)(R.b,{children:(0,n.jsx)(i.Z,{align:"center",position:"center",spacing:"xs",children:(0,n.jsxs)(a.x,{size:"sm",children:["You must"," ",(0,n.jsx)(a.x,{variant:"link",component:M.p,href:"/login?returnUrl=".concat(w().asPath),rel:"nofollow",inline:!0,children:"sign in"})," ","to add a comment"]})})})}var J=r(65729),Y=r(94454),Q=r(94351),ee=r(60254),et=r(71033),er=r(97118),en=r(33704),ei=r(7893),eo=r(21020),ea=r(75471),es=r(68848),el=r(9957),ec=r(70096),eu=r(80354),ed=r(35818);function ef(e){let{comment:t}=e,r=(0,g.xJ)(),i=t.reactions.filter(e=>e.userId===(null==r?void 0:r.id)),o=(0,m.useMemo)(()=>({likeCount:t.reactions.filter(e=>e.reaction===ed.BE.Like).length,dislikeCount:t.reactions.filter(e=>e.reaction===ed.BE.Dislike).length,heartCount:t.reactions.filter(e=>e.reaction===ed.BE.Heart).length,laughCount:t.reactions.filter(e=>e.reaction===ed.BE.Laugh).length,cryCount:t.reactions.filter(e=>e.reaction===ed.BE.Cry).length}),[t.reactions]);return(0,n.jsx)(eu.J,{reactions:i,entityId:t.id,entityType:"comment",metrics:o})}var ep=r(25963);function eh(e){let{children:t,id:r,entityId:i,entityType:o}=e,s=v.SX.useContext(),{created:l}=A(),{mutate:c,isLoading:u}=v.SX.commentv2.delete.useMutation({async onSuccess(e,t){(0,W.LX)({title:"Your comment has been deleted",message:"Successfully deleted the comment"}),l.some(e=>e.id===t.id)?N.getState().deleteComment(o,i,r):await s.commentv2.getThreadDetails.setData({entityType:o,entityId:i},(0,L.ZP)(e=>{var r;e&&(e.comments=null===(r=e.comments)||void 0===r?void 0:r.filter(e=>e.id!==t.id))})),s.commentv2.getCount.setData({entityId:i,entityType:o},function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e-1}),(0,ep.pT)()},onError(e){(0,W.s9)({error:Error(e.message),title:"Could not delete comment",reason:"An unexpected error occurred, please try again"})}});return t({onClick:()=>{(0,ep._5)({title:"Delete comment",children:(0,n.jsx)(a.x,{size:"sm",children:"Are you sure you want to delete this comment?"}),centered:!0,labels:{confirm:"Delete comment",cancel:"No, don't delete it"},confirmProps:{color:"red",loading:u},closeOnConfirm:!1,onConfirm:()=>c({id:r})})},isLoading:u})}let em=(0,m.createContext)(null),eg=()=>{let e=(0,m.useContext)(em);if(!e)throw Error("CommentV2Context not in tree");return e};function ev(e){var t,r;let{comment:i,children:o,resourceOwnerId:a}=e,{isLocked:s,isMuted:l,badges:c,forceLocked:u}=A(),d=(0,g.xJ)(),f=(null==d?void 0:d.id)===i.user.id,p=null!==(t=null==d?void 0:d.isModerator)&&void 0!==t&&t,h=f||(null==d?void 0:d.isModerator),m=!s&&!l||p,v=null!==(r=d&&!s&&!l&&!u&&!i.hidden)&&void 0!==r?r:void 0,y=(null==d?void 0:d.id)===a||p,b=null==c?void 0:c.find(e=>e.userId===i.user.id);return(0,n.jsx)(em.Provider,{value:{canReport:!d||!f,canDelete:h,canEdit:m,canReply:v,canHide:y,badge:b,comment:i},children:o})}var ey=r(17789);function eb(e){let{label:t,color:r,userId:i,...o}=e;return(0,n.jsx)(ey.C,{size:"xs",color:r,...o,children:t})}let ex=()=>{let e=v.SX.useContext(),t=v.SX.commentv2.toggleHide.useMutation({async onSuccess(t,r){let{entityType:n,entityId:i}=r;await e.commentv2.getThreadDetails.invalidate({entityType:n,entityId:i}),await e.commentv2.getThreadDetails.invalidate({entityType:n,entityId:i,hidden:!0}),await e.commentv2.getCount.invalidate({entityType:n,entityId:i}),await e.commentv2.getCount.invalidate({entityType:n,entityId:i,hidden:!0})},onError(e){(0,W.s9)({title:"Unable to hide comment",error:Error(e.message)})}}),r=v.SX.commentv2.togglePinned.useMutation({onError(e){(0,W.s9)({title:"Unable to pin comment",error:Error(e.message)})}});return{toggleHide:e=>{if(!t.isLoading)return t.mutateAsync(e)},togglePinned:async function(t){let{id:n,entityType:i,entityId:o}=t;r.mutateAsync({id:n}).then(async()=>{await e.commentv2.getThreadDetails.invalidate({entityType:i,entityId:o}),await e.commentv2.getThreadDetails.invalidate({entityType:i,entityId:o,hidden:!0}),await e.commentv2.getCount.invalidate({entityType:i,entityId:o}),await e.commentv2.getCount.invalidate({entityType:i,entityId:o,hidden:!0})})}}};var ew=r(20966);function eS(e){let{commentId:t,userId:r}=e,{level:s,badges:l}=A(),{classes:c}=eI();return(0,n.jsx)(o.K,{mt:"md",className:c.replyInset,children:(0,n.jsx)(T,{entityType:"comment",entityId:t,badges:l,level:(null!=s?s:0)+1,children:e=>{let{data:t,created:r,isLoading:s,remaining:l,showMore:c,toggleShowMore:u}=e;return s?(0,n.jsx)(_.M,{children:(0,n.jsx)(ew.a,{variant:"bars"})}):(0,n.jsxs)(o.K,{children:[null==t?void 0:t.map(e=>(0,n.jsx)(eO,{comment:e},e.id)),!!l&&!c&&(0,n.jsx)(f.i,{label:(0,n.jsx)(i.Z,{spacing:"xs",align:"center",children:(0,n.jsxs)(a.x,{variant:"link",sx:{cursor:"pointer"},onClick:u,children:["Show ",l," More"]})}),labelPosition:"center",variant:"dashed"}),r.map(e=>(0,n.jsx)(eO,{comment:e},e.id))]})}})})}var ek=r(93476),ej=r(76326);let eE=(0,y.Ue)(e=>({setId:t=>e(()=>({id:t}))}));function eO(e){let{comment:t,resourceOwnerId:r,...i}=e;return(0,n.jsx)(ev,{comment:t,resourceOwnerId:r,children:(0,n.jsx)(eC,{comment:t,...i})})}function eC(e){let{comment:t,viewOnly:r,highlight:h,borderless:y,...b}=e,x=(0,g.xJ)(),{expanded:w,toggleExpanded:S,setRootThread:k}=C(),{entityId:j,entityType:O,highlighted:I,level:P}=A(),{canDelete:T,canEdit:z,canReply:N,canHide:R,badge:_,canReport:M}=eg(),{data:D=0}=v.SX.commentv2.getCount.useQuery({entityId:t.id,entityType:"comment"}),{classes:L,cx:F}=eI(),U=eE(e=>e.id),B=eE(e=>e.setId),{toggleHide:H,togglePinned:Z}=ex(),W=U===t.id,[V,$]=(0,m.useState)(!1),G=I===t.id;(0,m.useEffect)(()=>{if(!G)return;let e=document.getElementById("comment-".concat(t.id));e&&e.scrollIntoView({behavior:"auto",block:"center",inline:"center"})},[G,t.id]);let eu=!r&&w.includes(t.id),ed=()=>{(null!=P?P:0)>=E._G.comments.getMaxDepth({entityType:O})&&!eu?k("comment",t.id):S(t.id)};for(let e of["

"])t.content.endsWith(e)&&(t.content=t.content.slice(0,t.content.lastIndexOf(e)));return(0,n.jsxs)(i.Z,{id:"comment-".concat(t.id),align:"flex-start",noWrap:!0,...b,spacing:"sm",className:F(b.className,L.groupWrap,{[L.highlightedComment]:h||G}),children:[(0,n.jsx)(i.Z,{spacing:"xs",children:(0,n.jsx)(K.Y,{user:t.user,size:"sm",linkToProfile:!0})}),(0,n.jsxs)(o.K,{spacing:0,style:{flex:1},children:[(0,n.jsxs)(i.Z,{position:"apart",children:[(0,n.jsxs)(i.Z,{spacing:8,align:"center",children:[(0,n.jsx)(K.Y,{user:t.user,size:"md",linkToProfile:!0,includeAvatar:!1,withUsername:!0,badge:_?(0,n.jsx)(eb,{..._}):null}),(0,n.jsx)(a.x,{color:"dimmed",size:"xs",mt:2,children:(0,n.jsx)(ea.i,{date:t.createdAt})}),t.pinnedAt&&(0,n.jsx)(s.k,{size:"sm",color:"orange",children:(0,n.jsx)(J.Z,{size:16,stroke:2})})]}),(0,n.jsxs)(l.v,{position:"bottom-end",withinPortal:!0,children:[(0,n.jsx)(l.v.Target,{children:(0,n.jsx)(c.A,{size:"xs",variant:"subtle",children:(0,n.jsx)(Y.Z,{size:14})})}),(0,n.jsxs)(l.v.Dropdown,{children:[T&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eh,{id:t.id,entityId:j,entityType:O,children:e=>{let{onClick:t}=e;return(0,n.jsx)(l.v.Item,{icon:(0,n.jsx)(Q.Z,{size:14,stroke:1.5}),color:"red",onClick:t,children:"Delete comment"})}}),z&&(0,n.jsx)(l.v.Item,{icon:(0,n.jsx)(ee.Z,{size:14,stroke:1.5}),onClick:()=>B(t.id),children:"Edit comment"})]}),R&&(0,n.jsx)(l.v.Item,{icon:t.hidden?(0,n.jsx)(et.Z,{size:14,stroke:1.5}):(0,n.jsx)(er.Z,{size:14,stroke:1.5}),onClick:()=>H({id:t.id,entityType:O,entityId:j}),children:t.hidden?"Unhide comment":"Hide comment"}),(null==x?void 0:x.isModerator)&&(0,n.jsx)(l.v.Item,{icon:t.pinnedAt?(0,n.jsx)(en.Z,{size:14,stroke:1.5}):(0,n.jsx)(J.Z,{size:14,stroke:1.5}),onClick:()=>Z({id:t.id,entityType:O,entityId:j}),children:t.pinnedAt?"Unpin comment":"Pin comment"}),M&&(0,n.jsx)(ec.b,{reason:"report-model",children:(0,n.jsx)(l.v.Item,{icon:(0,n.jsx)(ei.Z,{size:14,stroke:1.5}),onClick:()=>(0,ej.$B)({entityType:el.Bj.CommentV2,entityId:t.id}),children:"Report"})})]})]})]}),(0,n.jsx)(o.K,{style:{flex:1},spacing:4,children:W?(0,n.jsx)(q,{comment:t,onCancel:()=>B(void 0),autoFocus:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.x,{my:5,children:(0,n.jsx)(ek.x,{lineClamp:3,children:(0,n.jsx)(es.u,{html:t.content,sx:e=>({fontSize:e.fontSizes.sm})})})}),(0,n.jsxs)(i.Z,{spacing:4,children:[(0,n.jsx)(ef,{comment:t}),N&&!r&&(0,n.jsx)(d.z,{variant:"subtle",size:"xs",radius:"xl",onClick:()=>$(!0),compact:!0,color:"gray",children:(0,n.jsxs)(i.Z,{spacing:4,children:[(0,n.jsx)(eo.Z,{size:14}),"Reply"]})})]})]})}),eu&&(0,n.jsx)(eS,{commentId:t.id,userId:t.user.id}),N&&V&&(0,n.jsx)(u.x,{pt:"sm",children:(0,n.jsx)(X,{autoFocus:!0,onCancel:()=>$(!1),replyToCommentId:t.id,className:L.replyInset,borderless:y})}),D>0&&!r&&!eu&&(0,n.jsx)(f.i,{label:(0,n.jsx)(i.Z,{spacing:"xs",align:"center",children:(0,n.jsxs)(a.x,{variant:"link",sx:{cursor:"pointer"},onClick:ed,children:["Show ",D," More"]})}),labelPosition:"center",variant:"dashed"})]}),D>0&&!r&&(0,n.jsx)(p.k,{onClick:ed,className:L.repliesIndicator})]})}let eI=(0,h.k)(e=>({highlightedComment:{background:e.fn.rgba(e.colors.blue[5],.2),margin:"-".concat(e.spacing.xs,"px"),padding:"".concat(e.spacing.xs,"px"),borderRadius:e.radius.sm},groupWrap:{position:"relative"},repliesIndicator:{position:"absolute",top:34,width:2,height:"calc(100% - 26px - 8px)",background:"dark"===e.colorScheme?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.31)",left:12,"&:hover":{background:"dark"===e.colorScheme?"rgba(255,255,255,0.8)":"rgba(0,0,0,0.7)"}},replyInset:{marginLeft:-12},rootCommentReplyInset:{paddingLeft:46}}));function eP(e){let{children:t,entityId:r,entityType:n,onSuccess:i}=e,o=v.SX.useContext(),{data:a}=v.SX.commentv2.getThreadDetails.useQuery({entityId:r,entityType:n}),{mutate:s,isLoading:l}=v.SX.commentv2.toggleLockThread.useMutation({onMutate:async()=>{o.commentv2.getThreadDetails.setData({entityId:r,entityType:n},(0,L.ZP)(e=>{e&&(e.locked=!e.locked)}))},onSuccess:i,onError:()=>{o.commentv2.getThreadDetails.setData({entityType:n,entityId:r},(0,L.ZP)(e=>{e&&(e.locked=!e.locked)}))}});return a?t({toggle:()=>s({entityId:r,entityType:n}),isLoading:l,locked:a.locked}):null}},63155:function(e,t,r){"use strict";r.d(t,{a:function(){return S}});var n=r(85893),i=r(67294),o=r(64761);let[a,s]=(0,r(68216).R)("Container grid component was not found in tree");var l=r(37447),c=r(56817),u=r(81447);let d=(e,t)=>"content"===e?"auto":"auto"===e?"0px":e?"".concat(100/(t/e),"%"):void 0,f=(e,t,r)=>r||"auto"===e||"content"===e?"unset":d(e,t),p=(e,t)=>{if(e)return"auto"===e||t?1:0},h=(e,t)=>0===e?0:e?"".concat(100/(t/e),"%"):void 0,m=(e,t)=>void 0!==e?t.fn.size({size:e,sizes:t.spacing})/2:void 0;var g=(0,c.k)((e,t)=>{let{gutter:r,gutterXs:n,gutterSm:i,gutterMd:o,gutterLg:a,gutterXl:s,grow:c,offset:g,offsetXs:v,offsetSm:y,offsetMd:b,offsetLg:x,offsetXl:w,columns:S,span:k,xs:j,sm:E,md:O,lg:C,xl:I,order:P,orderXs:A,orderSm:T,orderMd:z,orderLg:N,orderXl:R,containerName:_}=t;return{col:{boxSizing:"border-box",flexGrow:p(k,c),order:P,padding:m(r,e),marginLeft:h(g,S),flexBasis:d(k,S),flexShrink:0,width:"content"===k?"auto":void 0,maxWidth:f(k,S,c),...function(e){let{sizes:t,offsets:r,orders:n,theme:i,columns:o,gutters:a,grow:s,containerName:c}=e;return l.j1.reduce((e,l)=>(e[u.D.largerThan(l,c)]={order:n[l],flexBasis:d(t[l],o),padding:m(a[l],i),flexShrink:0,width:"content"===t[l]?"auto":void 0,maxWidth:f(t[l],o,s),marginLeft:h(r[l],o),flexGrow:p(t[l],s)},e),{})}({sizes:{xs:j,sm:E,md:O,lg:C,xl:I},offsets:{xs:v,sm:y,md:b,lg:x,xl:w},orders:{xs:A,sm:T,md:z,lg:N,xl:R},gutters:{xs:n,sm:i,md:o,lg:a,xl:s},theme:e,columns:S,grow:c,containerName:_})}}}),v=r(64523);let y={},b=(0,i.forwardRef)((e,t)=>{let{children:r,span:i,offset:a,offsetXs:l,offsetSm:c,offsetMd:u,offsetLg:d,offsetXl:f,xs:p,sm:h,md:m,lg:b,xl:x,order:w,orderXs:S,orderSm:k,orderMd:j,orderLg:E,orderXl:O,className:C,id:I,unstyled:P,...A}=(0,o.N4)("GridCol",y,e),T=s(),z=i||T.columns,{classes:N,cx:R}=g({gutter:T.gutter,gutterXs:T.gutterXs,gutterSm:T.gutterSm,gutterMd:T.gutterMd,gutterLg:T.gutterLg,gutterXl:T.gutterXl,offset:a,offsetXs:l,offsetSm:c,offsetMd:u,offsetLg:d,offsetXl:f,xs:p,sm:h,md:m,lg:b,xl:x,order:w,orderXs:S,orderSm:k,orderMd:j,orderLg:E,orderXl:O,grow:T.grow,columns:T.columns,span:z,containerName:T.containerName},{unstyled:P,name:"ContainerGrid"});return!("auto"===z||"content"===z||"number"==typeof z&&z>0&&z%1==0)||"number"==typeof z&&z>T.columns?null:(0,n.jsx)(v.x,{className:R(N.col,C),ref:t,...A,children:r})});b.displayName="ContainerCol";var x=(0,c.k)((e,t)=>{var r;let{justify:n,align:i,gutter:o,gutterXs:a,gutterSm:s,gutterMd:c,gutterLg:d,gutterXl:f,containerName:p}=t;return{root:{margin:-e.fn.size({size:o,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:n,alignItems:i,...(r={xs:a,sm:s,md:c,lg:d,xl:f},l.j1.reduce((t,n)=>(void 0!==r[n]&&(t[u.D.largerThan(n,p)]={margin:-e.fn.size({size:r[n],sizes:e.spacing})/2}),t),{}))}}});let w={gutter:"md",justify:"flex-start",align:"stretch",columns:12},S=(0,i.forwardRef)((e,t)=>{let{gutter:r,gutterXs:i,gutterSm:s,gutterMd:l,gutterLg:c,gutterXl:u,children:d,grow:f,justify:p,align:h,columns:m,className:g,id:y,unstyled:b,containerName:S,...k}=(0,o.N4)("Grid",w,e),{classes:j,cx:E}=x({gutter:r,justify:p,align:h,gutterXs:i,gutterSm:s,gutterMd:l,gutterLg:c,gutterXl:u,containerName:S},{unstyled:b,name:"ContainerGrid"});return(0,n.jsx)(a,{value:{gutter:r,gutterXs:i,gutterSm:s,gutterMd:l,gutterLg:c,gutterXl:u,grow:f,columns:m,containerName:S},children:(0,n.jsx)(v.x,{className:E(j.root,g),...k,ref:t,children:d})})});S.Col=b,S.displayName="ContainerGrid"},12603:function(e,t,r){"use strict";r.d(t,{NA:function(){return u},b7:function(){return l},e4:function(){return d},jm:function(){return c}});var n=r(85893),i=r(67294),o=r(73445),a=r(74865);let s=(0,i.createContext)(null),l=()=>{let e=(0,i.useContext)(s);if(!e)throw"missing ContainerProvider";return e},c=e=>{let{children:t,containerName:r,className:o,...l}=e,c=(0,a.y)(e=>{u.setState(()=>({[r]:e.borderBoxSize[0]}))});return(0,i.useEffect)(()=>{let e=c.current;e&&u.setState(()=>({[r]:{inlineSize:e.clientWidth,blockSize:e.clientHeight}}))},[]),(0,n.jsx)(s.Provider,{value:{nodeRef:c,containerName:r},children:(0,n.jsx)("div",{ref:c,...l,className:"relative flex h-full flex-col @container ".concat(o||""),children:t})})},u=(0,o.Ue)(()=>({}));function d(e){let{containerName:t}=l(),r=null!=e?e:t;return u((0,i.useCallback)(e=>{var t;return null===(t=e[r])||void 0===t?void 0:t.inlineSize},[r]))}},15067:function(e,t,r){"use strict";r.d(t,{D:function(){return a}});var n=r(67294),i=r(12603),o=r(81447);let a=e=>{let{type:t,width:r,containerName:a}=e,s="string"==typeof r?o.Q[r]:r,{nodeRef:l,...c}=(0,i.b7)();return(0,i.NA)((0,n.useCallback)(e=>{var r,n,i;let{inlineSize:o=null!==(n=null===(r=l.current)||void 0===r?void 0:r.offsetWidth)&&void 0!==n?n:0}=null!==(i=e[null!=a?a:c.containerName])&&void 0!==i?i:{};return"max-width"===t?s>o:s<=o},[s,t,a]))}},97012:function(e,t,r){"use strict";r.d(t,{y:function(){return i}});var n=r(15067);let i=(e,t)=>(0,n.D)({type:"max-width",width:e,containerName:t})},82633:function(e,t,r){"use strict";r.d(t,{i:function(){return a}});var n=r(85893),i=r(47834),o=r(95117);function a(e){let{children:t,maxHeight:r=200,labelSize:a="sm",label:s,...l}=e;return(0,n.jsx)(i.o,{showLabel:(0,n.jsx)(o.x,{size:a,children:null!=s?s:"Show More"}),hideLabel:(0,n.jsx)(o.x,{size:a,children:"Hide"}),maxHeight:r,sx:e=>({fontSize:e.fontSizes.sm}),...l,children:t})}},10989:function(e,t,r){"use strict";r.d(t,{q:function(){return a}});var n=r(18060),i=r(63208),o=r(38615);function a(e){let{children:t,value:r,timeout:a}=e,{copy:s,copied:l}=(0,n.V)({timeout:a}),c=l?i.Z:o.Z;return t({copy:()=>{s("string"==typeof r?r:r())},copied:l,Icon:c,color:l?"teal":void 0})}},16053:function(e,t,r){"use strict";r.d(t,{V7:function(){return v},XT:function(){return c},f3:function(){return u},h1:function(){return m},iO:function(){return f},n3:function(){return h},ou:function(){return p},tJ:function(){return d}});var n=r(35818),i=r(1604),o=r(17578),a=r(80937),s=r(2807),l=r(72456);let c=(e,t)=>{var r;let n=(0,o.xJ)(),{data:i,...a}=l.SX.cosmeticShop.getShopItemsPaged.useQuery({...e},{...t,enabled:(null===(r=null==t?void 0:t.enabled)||void 0===r||r)&&(null==n?void 0:n.isModerator)});if(i){let{items:e=[],...t}=i;return{cosmeticShopItems:e,pagination:t,...a}}return{cosmeticShopItems:[],pagination:null,...a}},u=e=>{let{id:t}=e,r=(0,o.xJ)(),{data:n,...i}=l.SX.cosmeticShop.getShopItemById.useQuery({id:t},{enabled:null==r?void 0:r.isModerator});return n?{cosmeticShopItem:n,...i}:{cosmeticShopItem:null,...i}},d=e=>{let t=(0,o.xJ)(),{data:r=[],...n}=l.SX.cosmeticShop.getAllSections.useQuery(null!=e?e:{},{enabled:null==t?void 0:t.isModerator});return r?{cosmeticShopSections:r,...n}:{cosmeticShopSections:[],...n}},f=e=>{let{id:t}=e,r=(0,o.xJ)(),{data:n,...i}=l.SX.cosmeticShop.getSectionById.useQuery({id:t},{enabled:null==r?void 0:r.isModerator});return n?{cosmeticShopSection:n,...i}:{cosmeticShopSection:null,...i}},p=()=>{let e=l.SX.useUtils(),t=(0,o.xJ)(),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"There was an error while performing your request";try{let r=JSON.parse(e.message);(0,s.s9)({title:t,error:r})}catch(r){(0,s.s9)({title:t,error:Error(e.message)})}},n=l.SX.cosmeticShop.upsertShopItem.useMutation({async onSuccess(){await e.cosmeticShop.getShopItemsPaged.invalidate()},onError(e){r(e,"Failed to update or create the cosmetic shop item")}}),i=l.SX.cosmeticShop.upsertShopSection.useMutation({async onSuccess(){await e.cosmeticShop.getAllSections.invalidate()},onError(e){r(e,"Failed to update or create the cosmetic shop section")}}),a=l.SX.cosmeticShop.deleteShopItem.useMutation({async onSuccess(t){await e.cosmeticShop.getShopItemsPaged.invalidate()},onError(e){r(e,"Failed to delete the cosmetic shop item")}}),c=l.SX.cosmeticShop.deleteShopSection.useMutation({async onSuccess(t){await e.cosmeticShop.getAllSections.invalidate()},onError(e){r(e,"Failed to delete the cosmetic shop section")}}),u=l.SX.cosmeticShop.updateSectionsOrder.useMutation({async onSuccess(t,r){let{sortedSectionIds:n}=r;e.cosmeticShop.getAllSections.setData({},e=>e?[...e].sort((e,t)=>n.indexOf(e.id)-n.indexOf(t.id)):[])},onError(e){r(e,"Failed to delete the cosmetic shop section")}}),d=l.SX.cosmeticShop.purchaseShopItem.useMutation({async onSuccess(r,n){let{shopItemId:i}=n;await e.userProfile.get.invalidate(),await e.user.getCosmetics.invalidate(),(null==t?void 0:t.id)&&await e.user.getCreator.invalidate({id:t.id}),e.cosmeticShop.getShop.setData({},e=>e?e.map(e=>{let t=e.items.map(e=>{var t,r;let n=null!==(t=e.shopItem.meta)&&void 0!==t?t:{};return e.shopItem.id===i?{...e,shopItem:{...e.shopItem,meta:{...n,purchases:(null!==(r=n.purchases)&&void 0!==r?r:0)+1}}}:e});return{...e,items:t}}):[])},onError(e){r(e,"Failed to purchase cosmetic")}});return{upsertShopItem:e=>n.mutateAsync(e),upsertingShopItem:n.isLoading,upsertShopSection:e=>i.mutateAsync(e),upsertingShopSection:i.isLoading,deleteShopSection:e=>c.mutateAsync(e),deletingShopSection:c.isLoading,updateShopSectionsOrder:e=>u.mutateAsync(e),updatingShopSectionsOrder:u.isLoading,deleteShopItem:e=>a.mutateAsync(e),deletingShopItem:a.isLoading,purchaseShopItem:e=>d.mutateAsync(e),purchasingShopItem:d.isLoading}},h=(e,t)=>{var r;let{data:n=[],...i}=l.SX.cosmeticShop.getShop.useQuery({...e},{...t,enabled:null===(r=null==t?void 0:t.enabled)||void 0===r||r});return n?{cosmeticShopSections:n,...i}:{cosmeticShopSections:[],...i}},m=()=>{let e=(0,o.xJ)(),{data:t,isLoading:r,isFetched:n,...i}=l.SX.user.getSettings.useQuery(void 0,{enabled:!!e}),{cosmeticStoreLastViewed:a}=null!=t?t:{cosmeticStoreLastViewed:null},s=l.SX.user.setSettings.useMutation({onError(e,t,r){}});return{lastViewed:a,isLoading:r,isFetched:n,updateLastViewed:async()=>{!e||s.isLoading||s.isSuccess||s.mutate({cosmeticStoreLastViewed:new Date})},updatedLastViewed:s.isSuccess}},g=i.z.object({cosmeticTypes:i.z.preprocess(e=>Array.isArray(e)?e:[e],i.z.nativeEnum(n.c_).array()).optional()}).partial(),v=()=>(0,a.s)(g)},81643:function(e,t,r){"use strict";r.d(t,{JX:function(){return a},XP:function(){return c},nt:function(){return u},pA:function(){return l},r2:function(){return s}});var n=r(17578),i=r(2807),o=r(72456);let a=(e,t)=>{var r;let i=(0,n.xJ)(),{data:a,...s}=o.SX.cosmetic.getPaged.useQuery({...e},{...t,enabled:(null===(r=null==t?void 0:t.enabled)||void 0===r||r)&&(null==i?void 0:i.isModerator)});if(a){let{items:e=[],...t}=a;return{cosmetics:e,pagination:t,...s}}return{cosmetics:[],pagination:null,...s}},s=e=>{let{id:t}=e,{data:r,...n}=o.SX.cosmetic.getById.useQuery({id:t},{enabled:!!t});return r?{cosmetic:r,...n}:{cosmetic:null,...n}},l=()=>{let e=(0,n.xJ)();return o.SX.user.getCosmetics.useQuery(void 0,{enabled:!!e})},c=()=>{let e=o.SX.useUtils(),t=(0,n.xJ)(),r=o.SX.user.equipCosmetic.useMutation({async onSuccess(){await e.user.getCosmetics.invalidate(),await e.userProfile.get.invalidate(),(null==t?void 0:t.id)&&await e.user.getCreator.invalidate({id:t.id})},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to assign decoration",error:t})}catch(t){(0,i.s9)({title:"Failed to assign decoration",error:Error(e.message)})}}});return{equip:e=>r.mutateAsync(e),isLoading:r.isLoading}},u=()=>{let e=o.SX.useUtils(),t={async onSuccess(t,r){let{equippedToType:n}=r;switch(await e.user.getCosmetics.invalidate(),n){case"Model":await e.model.getAll.invalidate();break;case"Post":await e.post.getInfinite.invalidate();break;case"Article":await e.article.getInfinite.invalidate();break;case"Image":await e.image.getInfinite.invalidate()}},onError(e){try{let t=JSON.parse(e.message);(0,i.s9)({title:"Failed to assign decoration",error:t})}catch(t){(0,i.s9)({title:"Failed to assign decoration",error:Error(e.message)})}}},r=o.SX.cosmetic.equipContentDecoration.useMutation(t),n=o.SX.cosmetic.unequipCosmetic.useMutation(t);return{equip:e=>r.mutateAsync(e),unequip:e=>n.mutateAsync(e),isLoading:r.isLoading||n.isLoading}}},42213:function(e,t,r){"use strict";r.d(t,{W7:function(){return A},tk:function(){return P},xq:function(){return T}});var n=r(85893),i=r(21124),o=r(56817),a=r(21017),s=r(97564),l=r(71232),c=r(49834),u=r(22870),d=r(64523),f=r(95117),p=r(82863),h=r(96718),m=r(24838),g=r(1689),v=r(65297),y=r(38498),b=r(36777),x=r(51111),w=r(72456),S=r(83523),k=r(62475),j=r(35818),E=r(9749),O=r(5779),C=r(28075);let I=(0,o.k)(e=>({profileDetailsContainer:{background:e.fn.rgba(e.colors.dark[9],.8),margin:-e.spacing.md,marginTop:0,minHeight:50,display:"flex",justifyContent:"center",flexDirection:"column",color:e.white,zIndex:10},profileDetails:{padding:e.spacing.md,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,position:"relative"},avatar:{position:"absolute",bottom:4,overflow:"visible"}}));function P(e){var t;let{user:r,tipBuzzEntityType:i,tipBuzzEntityId:o,withActions:u=!0,subText:d,...f}=e,{data:j}=w.SX.user.getCreator.useQuery({id:r.id},{enabled:r.id!==y._G.system.user.id}),E=j||{...r,createdAt:null,_count:{models:0},rank:null,links:[],stats:{downloadCountAllTime:0,thumbsUpCountAllTime:0,followerCountAllTime:0}},{models:O}=null!==(t=null==E?void 0:E._count)&&void 0!==t?t:{models:0},C=null==E?void 0:E.stats;return E&&-1!==r.id?(0,n.jsxs)(a.Z,{p:"xs",withBorder:!0,...f,children:[(0,n.jsx)(a.Z.Section,{children:(0,n.jsxs)(s.K,{spacing:"xs",p:"xs",children:[(0,n.jsxs)(l.Z,{align:"center",position:"apart",children:[(0,n.jsx)(v.Y,{size:"sm",avatarProps:{size:32},user:E,subText:null!=d?d:E.createdAt?"Joined ".concat((0,b.p6)(E.createdAt)):void 0,withUsername:!0,linkToProfile:!0}),u&&(0,n.jsxs)(l.Z,{spacing:8,noWrap:!0,children:[(0,n.jsx)(S.x,{toUserId:E.id,size:"xs",entityId:o,label:"",entityType:i,compact:!0}),(0,n.jsx)(p.$,{user:E,size:"xs",label:"",compact:!0}),(0,n.jsx)(m.c,{userId:E.id,size:"xs",compact:!0})]})]}),(0,n.jsxs)(l.Z,{spacing:8,children:[(0,n.jsx)(g.O,{size:"md",rank:E.rank}),C&&(0,n.jsx)(k.q,{uploads:O,followers:C.followerCountAllTime,favorites:C.thumbsUpCountAllTime,downloads:C.downloadCountAllTime})]})]})}),E.links&&E.links.length>0?(0,n.jsx)(a.Z.Section,{withBorder:!0,inheritPadding:!0,sx:e=>({background:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0]}),py:5,children:(0,n.jsx)(l.Z,{spacing:4,children:(0,x.uq)(E.links).map((e,t)=>(0,n.jsx)(c.A,{component:"a",href:e.url,target:"_blank",rel:"nofollow noreferrer",size:32,children:(0,n.jsx)(h.R,{domain:e.domain,size:20})},t))})}):null]}):null}let A=e=>{var t,r,o,O,P,A,T,z;let{user:N,tipBuzzEntityType:R,tipBuzzEntityId:_,withActions:M=!0,cosmeticOverwrites:D,useEquippedCosmetics:L=!0,statDisplayOverwrite:F,subText:U,...B}=e,{classes:H,theme:Z}=I(),{data:W}=w.SX.user.getCreator.useQuery({id:N.id},{enabled:N.id!==y._G.system.user.id}),V={...N,createdAt:null,_count:{models:0},rank:null,links:[],stats:{downloadCountAllTime:0,thumbsUpCountAllTime:0,followerCountAllTime:0,reactionCountAllTime:0,generationCountAllTime:0,uploadCountAllTime:0},publicSettings:{creatorCardStatsPreferences:[]}},$=W||V;if(!$||-1===N.id)return null;let q=(0,i.Z)([...(null!=D?D:[]).map(e=>({cosmetic:e,data:{}})),...L?(null!==(P=null==$?void 0:$.cosmetics)&&void 0!==P?P:[]).filter(e=>{let{cosmetic:t}=e;return!!t}):[]],"cosmetic.type"),G={...$,cosmetics:q},K=null===(t=q.find(e=>{let{cosmetic:t}=e;return(null==t?void 0:t.type)===j.c_.ProfileBackground}))||void 0===t?void 0:t.cosmetic,X=(null==K?void 0:null===(r=K.data)||void 0===r?void 0:r.type)==="video",J=null===(o=q.find(e=>{let{cosmetic:t}=e;return(null==t?void 0:t.type)===j.c_.Badge}))||void 0===o?void 0:o.cosmetic,Y=null==$?void 0:$.stats,Q=W?null!==(T=null!=F?F:null===(O=null!==(A=W.publicSettings)&&void 0!==A?A:{})||void 0===O?void 0:O.creatorCardStatsPreferences)&&void 0!==T?T:y.Z5:[];return(0,n.jsxs)(a.Z,{p:"md",withBorder:!0,...B,children:[(0,n.jsxs)(a.Z.Section,{style:{position:"relative"},children:[K&&K.data.url?(0,n.jsx)(C.i,{src:K.data.url,type:null!==(z=K.data.type)&&void 0!==z?z:"image",transcode:X,anim:!0,wrapperProps:{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}},contain:!0,style:X?{height:"100%",objectFit:"cover"}:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"}}):(0,n.jsx)(u.E,{src:"/images/civitai-default-account-bg.png",alt:"default creator card background decoration",pos:"absolute",top:0,left:0,w:"100%",h:"100%",styles:{figure:{height:"100%"},imageWrapper:{height:"100%"},image:{objectFit:"cover",height:"100% !important"}}}),(0,n.jsxs)(s.K,{p:"md",children:[(0,n.jsxs)(l.Z,{position:"apart",align:"flex-start",mih:60,style:{zIndex:1},children:[(0,n.jsx)(l.Z,{children:(0,n.jsxs)(l.Z,{spacing:4,children:[(0,n.jsx)(g.O,{size:"md",rank:$.rank}),Y&&Q.length>0&&(0,n.jsx)(k.P,{uploads:Q.includes("uploads")?Y.uploadCountAllTime:null,followers:Q.includes("followers")?Y.followerCountAllTime:null,favorites:Q.includes("likes")?Y.thumbsUpCountAllTime:null,downloads:Q.includes("downloads")?Y.downloadCountAllTime:null,reactions:Q.includes("reactions")?Y.reactionCountAllTime:null,generations:Q.includes("generations")?Y.generationCountAllTime:null,colorOverrides:null==K?void 0:K.data})]})}),(0,n.jsx)(E.m,{badge:J||void 0,badgeSize:60,zIndex:1})]}),(0,n.jsx)(d.x,{className:H.profileDetailsContainer,children:(0,n.jsx)(s.K,{spacing:"xs",className:H.profileDetails,py:8,h:"100%",children:(0,n.jsxs)(l.Z,{align:"center",position:"apart",noWrap:!0,children:[(0,n.jsx)(v.K,{user:$,linkToProfile:!0,children:(0,n.jsxs)(l.Z,{noWrap:!0,children:[(0,n.jsx)(d.x,{className:H.avatar,children:(0,n.jsx)(v.Y,{size:"lg",avatarProps:{size:60,style:{minHeight:"100%",objectFit:"cover"}},user:G})}),(0,n.jsxs)(s.K,{spacing:0,ml:70,children:[(0,n.jsx)(E.R,{username:null==$?void 0:$.username,deletedAt:null==$?void 0:$.deletedAt,cosmetics:null!=q?q:[],size:"md",badgeSize:0}),U?(0,n.jsx)(n.Fragment,{children:U}):(0,n.jsx)(n.Fragment,{children:$.createdAt&&(0,n.jsxs)(f.x,{size:"xs",lh:1,lineClamp:1,style:{color:Z.fn.rgba(Z.white,.75)},children:["Joined ",(0,b.p6)($.createdAt)]})})]})]})}),M&&(0,n.jsxs)(l.Z,{spacing:8,noWrap:!0,children:[(0,n.jsx)(S.x,{toUserId:$.id,size:"xs",entityId:_,label:"",entityType:R,radius:"xl",color:"gray",variant:"filled",w:32,h:32}),(0,n.jsx)(p.$,{user:$,size:"xs",label:"",radius:"xl",color:"gray",variant:"filled",w:32,h:32}),(0,n.jsx)(m.c,{userId:$.id,size:"xs",radius:"xl",variant:"filled",h:32})]})]})})})]})]}),$.links&&$.links.length>0?(0,n.jsx)(a.Z.Section,{withBorder:!0,inheritPadding:!0,sx:e=>({background:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0]}),py:5,children:(0,n.jsx)(l.Z,{spacing:4,children:(0,x.uq)($.links).map((e,t)=>(0,n.jsx)(c.A,{component:"a",href:e.url,target:"_blank",rel:"nofollow noreferrer",size:32,children:(0,n.jsx)(h.R,{domain:e.domain,size:20})},t))})}):null]})},T=e=>(0,O.g)().cosmeticShop?(0,n.jsx)(A,{...e}):(0,n.jsx)(P,{...e})},61328:function(e,t,r){"use strict";r.d(t,{N:function(){return p}});var n=r(85893),i=r(64761),o=r(88393),a=r(17789),s=r(20966),l=r(35818),c=r(38498),u=r(88182),d=r(67294);let f={xs:12,sm:14,md:16,lg:18,xl:20},p=(0,d.forwardRef)((e,t)=>{var r,d,p;let{unitAmount:h,currency:m,formatter:g,displayCurrency:v=!0,sx:y,children:b,loading:x,iconProps:w,textColor:S,type:k,typeDistrib:j,...E}=e,O=(0,u.pT)(h,m),C=(0,i.rZ)(),I=null!==(d=null===(r=c.tQ[m].themes)||void 0===r?void 0:r[null!=k?k:""])&&void 0!==d?d:c.tQ[m],P=I.icon,A=S||I.color(C);return(0,n.jsx)(o.u,{label:j?"Blue: ".concat(j.amt.blue," | Yellow: ").concat(j.amt.yellow):void 0,disabled:!j,children:(0,n.jsx)(a.C,{ref:t,variant:"dark"===C.colorScheme?"filled":"light",color:"gray",radius:"xl",pl:8,pr:12,sx:{fontSize:12,fontWeight:600,lineHeight:1.5,color:A,position:"relative",...y?"function"==typeof y?y(C):y:{}},styles:{root:j?{"::after":{content:'""',position:"absolute",pointerEvents:"none",left:"1px",right:"1px",top:"1px",bottom:"1px",border:"1px solid yellow",borderRadius:"50%",borderImage:"linear-gradient(to right, ".concat(C.colors.blue[4]," ").concat(Math.round(100*j.pct.blue),"%, ").concat(C.colors.yellow[7]," ").concat(Math.round(100*j.pct.blue),"%, ").concat(C.colors.yellow[7]," ").concat(Math.round(100*j.pct.yellow),"%) 1"),clipPath:"inset(0% 0% 0% 0% round 1px)"}}:void 0},...E,children:(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(P,{size:f[null!==(p=E.size)&&void 0!==p?p:"sm"],fill:m===l.F.BUZZ?"currentColor":void 0,...w}),x?(0,n.jsx)(s.a,{size:"xs",variant:"dots",color:A}):(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[g?g(h):"".concat(O||0," ").concat(v?m:""),b]})]})})})});p.displayName="CurrencyBadge"},13520:function(e,t,r){"use strict";r.d(t,{r:function(){return s}});var n=r(85893),i=r(64761);r(67294);var o=r(38498),a=r(35818);function s(e){var t,r,s,l;let{currency:c=a.F.BUZZ,type:u,...d}=e,f=(0,i.rZ)(),p=null!==(s=null===(t=o.tQ[c].themes)||void 0===t?void 0:t[null!=u?u:""])&&void 0!==s?s:o.tQ[c],h=p.icon;return(0,n.jsx)(h,{color:p.color(f),fill:null!==(l=null===(r=p.fill)||void 0===r?void 0:r.call(p,f))&&void 0!==l?l:"transparent",...d})}},75471:function(e,t,r){"use strict";r.d(t,{i:function(){return s}});var n=r(85893),i=r(27484),o=r.n(i),a=r(97755);let s=e=>{let{date:t,withoutSuffix:r=!1,inUtc:i=!1}=e,s=i?o().utc(t):o()(t),l=s.format();return(0,a.Z)()?(0,n.jsx)("time",{title:l,dateTime:l,children:s.fromNow(r)}):null}},74818:function(e,t,r){"use strict";r.d(t,{f:function(){return c}});var n=r(85893),i=r(88002),o=(0,r(21955).Z)("outline","device-tablet-star","IconDeviceTabletStar",[["path",{d:"M11 21h-5a1 1 0 0 1 -1 -1v-16a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v6",key:"svg-0"}],["path",{d:"M17.8 20.817l-2.172 1.138a.392 .392 0 0 1 -.568 -.41l.415 -2.411l-1.757 -1.707a.389 .389 0 0 1 .217 -.665l2.428 -.352l1.086 -2.193a.392 .392 0 0 1 .702 0l1.086 2.193l2.428 .352a.39 .39 0 0 1 .217 .665l-1.757 1.707l.414 2.41a.39 .39 0 0 1 -.567 .411l-2.172 -1.138z",key:"svg-1"}]]),a=r(81643),s=r(61119),l=r(74082);function c(e){let t=e.currentCosmetic,{unequip:r}=(0,a.nt)(),c=async()=>{t?r({equippedToId:e.entityId,equippedToType:e.entityType,cosmeticId:t.id,claimKey:t.claimKey}).catch(()=>null):s.Pq.trigger({component:l.R,props:e})};return(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(o,{size:16,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),c()},children:t?"Remove Content Decoration":"Add Content Decoration"})}},42597:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(85893),i=r(38090),o=r(95117),a=r(97564),s=r(71232),l=r(67841),c=r(67294),u=r(20573);function d(e){var t,r;let{title:d,message:f,onConfirm:p,onCancel:h,labels:m,confirmProps:g,cancelProps:v}=e,y=(0,u.D)(),[b,x]=(0,c.useState)(!1),w=()=>{null==h||h(),y.onClose()},S=async()=>{let e=null==p?void 0:p();e instanceof Promise&&(x(!0),await Promise.resolve(e),x(!1)),y.onClose()};return(0,n.jsx)(i.u,{...y,title:(0,n.jsx)(o.x,{className:"font-semibold",children:d}),onClose:w,centered:!0,children:(0,n.jsxs)(a.K,{children:[f,(0,n.jsxs)(s.Z,{position:"right",children:[(0,n.jsx)(l.z,{variant:"default",onClick:w,...v,children:null!==(t=null==m?void 0:m.cancel)&&void 0!==t?t:"No"}),(0,n.jsx)(l.z,{onClick:S,loading:b,...g,children:null!==(r=null==m?void 0:m.confirm)&&void 0!==r?r:"Yes"})]})]})})}},20573:function(e,t,r){"use strict";r.d(t,{T:function(){return p},D:function(){return d}});var n=r(85893),i=r(67294),o=r(61119),a=r(50579);function s(e){let{freeze:t,children:r}=e,o=(0,i.useRef)({}).current;if(t&&!o.promise)throw o.promise=new Promise(e=>{o.resolve=e}),o.promise;if(t)throw o.promise;return o.promise&&(o.resolve(),o.promise=void 0),(0,n.jsx)(i.Fragment,{children:(0,n.jsx)(l,{"data-frozen":t,children:r})})}function l(e){let{children:t}=e,r=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(!r.current)return;let e=new MutationObserver(e=>{for(let r of e){var t;if("attributes"!==r.type||"style"!==r.attributeName)continue;let e=r.target;(null===(t=e.getAttribute("style"))||void 0===t?void 0:t.includes("display: none !important;"))&&e.setAttribute("style","")}});return e.observe(r.current,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[r]),(0,n.jsx)("span",{ref:r,children:t})}function c(e){let{freeze:t,children:r}=e;return(0,n.jsx)(i.Suspense,{children:(0,n.jsx)(s,{freeze:t,children:r})})}let u=(0,i.createContext)({opened:!1,onClose:()=>void 0}),d=()=>(0,i.useContext)(u),f=e=>{let{dialog:t,index:r}=e,[a,s]=(0,i.useState)(!1),l=t.component;return(0,i.useEffect)(()=>{setTimeout(()=>{s(!0)},0)},[]),(0,n.jsx)(u.Provider,{value:{opened:a,onClose:function(){var e,r;null===(r=t.options)||void 0===r||null===(e=r.onClose)||void 0===e||e.call(r),o.Pq.closeById(t.id)},zIndex:300+r,target:t.target},children:(0,n.jsx)(l,{...t.props})})},p=()=>{let e=(0,o.IA)(e=>e.dialogs);return(0,n.jsx)(n.Fragment,{children:e.map((t,r)=>(0,n.jsx)(c,{freeze:e.length!==r+1,children:h(t,r)},t.id.toString()))})},h=(0,a.Z)([WeakMap,{},{}],(e,t)=>(0,n.jsx)(f,{dialog:e,index:t}))},40572:function(e,t,r){"use strict";r.d(t,{v4:function(){return O},nG:function(){return j},NI:function(){return E}});var n=r(85893),i=r(67294),o=r(61119),a=r(11163),s=r.n(a),l=r(5152),c=r.n(l);let u=c()(()=>Promise.all([r.e(4281),r.e(2273),r.e(874),r.e(2058),r.e(7)]).then(r.bind(r,10007)),{loadableGenerated:{webpack:()=>[10007]}}),d=c()(()=>Promise.all([r.e(1046),r.e(1431),r.e(9640)]).then(r.bind(r,29640)),{loadableGenerated:{webpack:()=>[29640]}}),f=c()(()=>r.e(3808).then(r.bind(r,53808)),{loadableGenerated:{webpack:()=>[53808]}}),p=c()(()=>Promise.all([r.e(2761),r.e(6063),r.e(1740),r.e(3650)]).then(r.bind(r,46925)),{loadableGenerated:{webpack:()=>[46925]}}),h=c()(()=>Promise.all([r.e(308),r.e(4009)]).then(r.bind(r,54009)),{loadableGenerated:{webpack:()=>[54009]}}),m=c()(()=>Promise.all([r.e(2761),r.e(8027),r.e(6904)]).then(r.bind(r,6904)),{loadableGenerated:{webpack:()=>[6904]}}),g=c()(()=>r.e(1470).then(r.bind(r,11470)),{loadableGenerated:{webpack:()=>[11470]}}),v={imageDetail:{component:u,target:"#main",resolve:(e,t)=>{let{imageId:r,...n}=t;return{query:{...e,imageId:r},asPath:"/images/".concat(r),state:n}}},postDetail:{component:d,target:"#main",resolve:(e,t)=>{let{postId:r}=t;return{query:{...e,postId:r},asPath:"/posts/".concat(r)}}},collectionEdit:{component:f,resolve:(e,t)=>{let{collectionId:r}=t;return{query:{...e,collectionId:r}}}},hiddenModelComments:{component:p,resolve:(e,t)=>{let{modelId:r}=t;return{query:{...e,modelId:r}}}},resourceReview:{component:h,target:"#main",resolve:(e,t)=>{let{reviewId:r}=t;return{query:{...e,reviewId:r}}}},filesEdit:{component:m,resolve:(e,t)=>{let{modelVersionId:r}=t;return{query:{...e,modelVersionId:r}}}},commentEdit:{component:g,resolve:(e,t)=>{let{commentId:r}=t;return{query:{...e,commentId:r}}}},commentThread:{component:c()(()=>r.e(969).then(r.bind(r,30969)),{loadableGenerated:{webpack:()=>[30969]}}),resolve:(e,t)=>{let{commentId:r,highlight:n}=t;return{query:{...e,commentId:r,highlight:n}}}},support:{component:c()(()=>r.e(3710).then(r.bind(r,43710)),{loadableGenerated:{webpack:()=>[43710]},ssr:!1}),resolve:e=>({query:e,asPath:"/support"})}};var y=r(36429),b=r(69975),x=r(17578),w=r(99490),S=r(95448),k=r(54685);function j(){let e=(0,a.useRouter)(),t=(0,y.mq)(),r=(0,i.useRef)(),l=(0,x.xJ)();return(0,i.useEffect)(()=>{e.beforePopState(t=>{let n=r.current;return(0,y.eQ)(!0),!t.url.includes("dialog")&&e.asPath.split("?")[0]!==t.as.split("?")[0]||!(t.url.includes("dialog")||(null==n?void 0:n.url.includes("dialog")))||((0,y.eQ)(!1),!1)})},[e]),(0,i.useEffect)(()=>{let n=n=>{var i;if(e.asPath===n&&(null===(i=r.current)||void 0===i?void 0:i.url.includes("dialog")))throw t.push({query:e.query}),"nextjs route change aborted"};return e.events.on("routeChangeStart",n),()=>{e.events.off("routeChangeStart",n)}},[e]),(0,i.useEffect)(()=>{var e;let i={},a=[].concat(null!==(e=t.query.dialog)&&void 0!==e?e:[]).map(e=>(i[e]?i[e]+=1:i[e]=1,{name:e,key:"".concat(e,"_").concat(i[e])}));r.current=history.state;let c=o.IA.getState().dialogs.filter(e=>"routed-dialog"===e.type).map(e=>e.id),u=c.filter(e=>!a.find(t=>e===t.key));for(let{key:e,name:r}of a.filter(e=>!c.includes(e.name))){if(v[r].requireAuth&&!l)continue;let i=history.state.state,a=function(e){return function(t){let{query:r,state:i}=(0,y.mq)();return(0,n.jsx)(e,{...t,...r,...i})}}(v[r].component);o.Pq.trigger({id:e,component:a,props:{...t.query,...i},options:{onClose:()=>(function(e){let t=(0,y.an)();if((0,S.kZ)())t.back();else{let{dialog:e,...t}=s().query,[r]=s().asPath.split("?");s().push({pathname:r,query:t},{pathname:r},{shallow:!0})}})(0)},type:"routed-dialog",target:v[r].target})}for(let e of u)o.Pq.closeById(e)},[t.query,l]),null}function E(e){let{name:t,state:r}=e,n=(0,y.an)(),{url:i,asPath:o,state:a}=I(t,n.query,r);n.push(i,o,a)}function O(e){let{name:t,state:r,children:o,className:s,passHref:l,style:c,onClick:u,variant:d="text"}=e,f=(0,a.useRouter)(),{query:p=w.QS.parse(w.QS.stringify(f.query))}=(0,y.an)(),{asPath:h}=I(t,p,r,f),m=e=>{e.ctrlKey||(e.preventDefault(),E({name:t,state:r}),null==u||u())};return l?(0,i.cloneElement)(o,{href:h,onClick:m}):(0,n.jsx)(k.e,{href:h,onClick:m,className:s,style:c,variant:d,children:o})}let C=(e,t)=>{let r=t.pathname.match(/\[([\.\w]+)\]/g),n={...e};for(let e in n)(null==r?void 0:r.some(t=>t.includes(e)))&&delete n[e];let i=t.asPath.split("?")[0];return Object.keys(n).length>0&&(i="".concat(i,"?").concat(w.QS.stringify(n))),i};function I(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s(),o=v[e];if(!o)throw Error("invalid dialog name");let{query:a,asPath:l=C(a,i),state:c}=o.resolve({...r,dialog:[].concat(null!==(t=r.dialog)&&void 0!==t?t:[]).concat(e)},n),[u,d]=(0,b.resolveHref)(i,{query:a},!0),[,f]=l?(0,b.resolveHref)(i,l,!0):[u,d];return{url:u,asPath:f,state:c}}},76326:function(e,t,r){"use strict";r.d(t,{$B:function(){return S},Ch:function(){return k},Fw:function(){return v},IQ:function(){return w},LN:function(){return y},O_:function(){return b},dl:function(){return g},kH:function(){return x},o1:function(){return m}});var n=r(5152),i=r.n(n),o=r(61119);let a=i()(()=>r.e(3246).then(r.bind(r,63246)),{loadableGenerated:{webpack:()=>[63246]}}),s=i()(()=>r.e(2533).then(r.bind(r,82533)),{loadableGenerated:{webpack:()=>[82533]}}),l=i()(()=>Promise.all([r.e(2761),r.e(5441)]).then(r.bind(r,55441)),{loadableGenerated:{webpack:()=>[55441]}}),c=i()(()=>Promise.all([r.e(3117),r.e(1770),r.e(9947),r.e(6514)]).then(r.bind(r,96514)),{loadableGenerated:{webpack:()=>[96514]}}),u=i()(()=>Promise.all([r.e(3117),r.e(2948),r.e(3076)]).then(r.bind(r,73076)),{loadableGenerated:{webpack:()=>[73076]}}),d=i()(()=>r.e(8707).then(r.bind(r,38707)),{loadableGenerated:{webpack:()=>[38707]}}),f=i()(()=>r.e(5824).then(r.bind(r,35824)),{loadableGenerated:{webpack:()=>[35824]}}),p=i()(()=>r.e(6866).then(r.bind(r,96866)),{loadableGenerated:{webpack:()=>[96866]}}),h=i()(()=>Promise.all([r.e(3117),r.e(4713),r.e(4464),r.e(1197),r.e(2365),r.e(6935),r.e(9947),r.e(9805)]).then(r.bind(r,29805)),{loadableGenerated:{webpack:()=>[29805]}}),m=()=>o.Pq.trigger({component:a}),g=e=>o.Pq.trigger({component:s,props:e}),v=()=>o.Pq.trigger({component:l,target:"#browsing-mode"});function y(e){o.Pq.trigger({component:c,props:e})}function b(e){o.Pq.trigger({component:u,props:e})}function x(e){o.Pq.trigger({component:d,props:e})}function w(e){o.Pq.trigger({component:f,props:e})}function S(e){o.Pq.trigger({component:p,props:e})}function k(e){o.Pq.trigger({component:h,props:e})}},61119:function(e,t,r){"use strict";r.d(t,{IA:function(){return o},Pq:function(){return s}}),r(67294);var n=r(73445),i=r(18753);let o=(0,n.Ue)()((0,i.n)((e,t)=>({dialogs:[],trigger:t=>{var r,n;let i={component:t.component,props:t.props,options:t.options,id:null!==(r=t.id)&&void 0!==r?r:Date.now(),type:null!==(n=t.type)&&void 0!==n?n:"dialog",target:t.target};e(e=>{e.dialogs.findIndex(e=>e.id===i.id)>-1||e.dialogs.push(i)})},toggle:e=>{let{trigger:r,dialogs:n,closeById:i}=t();n.findIndex(t=>t.id===e.id)>-1?i(e.id):r(e)},closeById:t=>e(e=>{e.dialogs=e.dialogs.filter(e=>e.id!==t)}),closeLatest:()=>e(e=>{e.dialogs.pop()}),closeAll:()=>e(e=>{e.dialogs=[]})})));(0,n.Ue)(()=>({stackingContext:[]}));let{dialogs:a,...s}=o.getState()},96718:function(e,t,r){"use strict";r.d(t,{R:function(){return C}});var n=r(85893),i=r(80223),o=r(19434),a=r(36224),s=r(19412),l=r(82231),c=r(21955),u=(0,c.Z)("outline","brand-facebook","IconBrandFacebook",[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]]),d=r(17197),f=(0,c.Z)("outline","cup","IconCup",[["path",{d:"M5 11h14v-3h-14z",key:"svg-0"}],["path",{d:"M17.5 11l-1.5 10h-8l-1.5 -10",key:"svg-1"}],["path",{d:"M6 8v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1",key:"svg-2"}],["path",{d:"M15 5v-2",key:"svg-3"}]]),p=(0,c.Z)("outline","brand-patreon","IconBrandPatreon",[["path",{d:"M20 8.408c-.003 -2.299 -1.746 -4.182 -3.79 -4.862c-2.54 -.844 -5.888 -.722 -8.312 .453c-2.939 1.425 -3.862 4.545 -3.896 7.656c-.028 2.559 .22 9.297 3.92 9.345c2.75 .036 3.159 -3.603 4.43 -5.356c.906 -1.247 2.071 -1.599 3.506 -1.963c2.465 -.627 4.146 -2.626 4.142 -5.273z",key:"svg-0"}]]),h=(0,c.Z)("outline","mug","IconMug",[["path",{d:"M4.083 5h10.834a1.08 1.08 0 0 1 1.083 1.077v8.615c0 2.38 -1.94 4.308 -4.333 4.308h-4.334c-2.393 0 -4.333 -1.929 -4.333 -4.308v-8.615a1.08 1.08 0 0 1 1.083 -1.077",key:"svg-0"}],["path",{d:"M16 8h2.5c1.38 0 2.5 1.045 2.5 2.333v2.334c0 1.288 -1.12 2.333 -2.5 2.333h-2.5",key:"svg-1"}]]),m=(0,c.Z)("outline","pig-money","IconPigMoney",[["path",{d:"M15 11v.01",key:"svg-0"}],["path",{d:"M5.173 8.378a3 3 0 1 1 4.656 -1.377",key:"svg-1"}],["path",{d:"M16 4v3.803a6.019 6.019 0 0 1 2.658 3.197h1.341a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-1.342c-.336 .95 -.907 1.8 -1.658 2.473v2.027a1.5 1.5 0 0 1 -3 0v-.583a6.04 6.04 0 0 1 -1 .083h-4a6.04 6.04 0 0 1 -1 -.083v.583a1.5 1.5 0 0 1 -3 0v-2l0 -.027a6 6 0 0 1 4 -10.473h2.5l4.5 -3h0z",key:"svg-2"}]]),g=r(50397),v=r(98517),y=(0,c.Z)("outline","brand-linktree","IconBrandLinktree",[["path",{d:"M4 10h16",key:"svg-0"}],["path",{d:"M6.5 4.5l11 11",key:"svg-1"}],["path",{d:"M6.5 15.5l11 -11",key:"svg-2"}],["path",{d:"M12 10v-8",key:"svg-3"}],["path",{d:"M12 15v7",key:"svg-4"}]]),b=(0,c.Z)("outline","brand-deviantart","IconBrandDeviantart",[["path",{d:"M18 3v4l-3.857 6h3.857v4h-6.429l-2.571 4h-3v-4l3.857 -6h-3.857v-4h6.429l2.571 -4z",key:"svg-0"}]]),x=(0,c.Z)("outline","brand-tumblr","IconBrandTumblr",[["path",{d:"M14 21h4v-4h-4v-6h4v-4h-4v-4h-4v1a3 3 0 0 1 -3 3h-1v4h4v6a4 4 0 0 0 4 4",key:"svg-0"}]]),w=(0,c.Z)("outline","brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),S=(0,c.Z)("outline","brand-vk","IconBrandVk",[["path",{d:"M14 19h-4a8 8 0 0 1 -8 -8v-5h4v5a4 4 0 0 0 4 4h0v-9h4v4.5l.03 0a4.531 4.531 0 0 0 3.97 -4.496h4l-.342 1.711a6.858 6.858 0 0 1 -3.658 4.789h0a5.34 5.34 0 0 1 3.566 4.111l.434 2.389h0h-4a4.531 4.531 0 0 0 -3.97 -4.496v4.5z",key:"svg-0"}]]),k=(0,c.Z)("outline","brand-bilibili","IconBrandBilibili",[["path",{d:"M3 10a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v6a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4v-6z",key:"svg-0"}],["path",{d:"M8 3l2 3",key:"svg-1"}],["path",{d:"M16 3l-2 3",key:"svg-2"}],["path",{d:"M9 13v-2",key:"svg-3"}],["path",{d:"M15 11v2",key:"svg-4"}]]),j=(0,c.Z)("outline","brand-linkedin","IconBrandLinkedin",[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M8 11l0 5",key:"svg-1"}],["path",{d:"M8 8l0 .01",key:"svg-2"}],["path",{d:"M12 16l0 -5",key:"svg-3"}],["path",{d:"M16 16v-3a2 2 0 0 0 -4 0",key:"svg-4"}]]),E=r(37901),O=r(51111);function C(e){let{url:t,domain:r,...o}=e,a=t?(0,O.HD)(t):r,s=a?I[a]:i.Z;return(0,n.jsx)(s,{...o})}let I={huggingFace:function(e){let{size:t=24,color:r="currentColor",stroke:i=2,...o}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-123",x:"0px",y:"0px",viewBox:"0 0 95 88",xmlSpace:"preserve",width:t,height:t,strokeWidth:i,stroke:r,fill:r,strokeLinecap:"round",strokeLinejoin:"round",...o,children:(0,n.jsx)("path",{className:"st0",d:"M58.5,32.3c1.3,0.5,1.8,3.1,3.1,2.4c2.4-1.3,3.4-4.3,2.1-6.8c-1.3-2.4-4.3-3.4-6.8-2.1 c-2.4,1.3-3.4,4.3-2.1,6.8C55.4,33.8,57.4,31.9,58.5,32.3z M34.9,32.3c-1.3,0.5-1.8,3.1-3.1,2.4c-2.4-1.3-3.4-4.3-2.1-6.8 c1.3-2.4,4.3-3.4,6.8-2.1c2.4,1.3,3.4,4.3,2.1,6.8C38,33.8,36.1,31.9,34.9,32.3z M47,56.3c9.8,0,13-8.8,13-13.3 c0-2.3-1.6-1.6-4.1-0.4c-2.3,1.2-5.5,2.7-8.9,2.7c-7.2,0-13-6.9-13-2.4S37.1,56.3,47,56.3z M17.5,48c-1.6,0-3.1,0.7-4.1,1.9 c-0.6,0.7-1.3,2-1.3,3.8c-0.7-0.2-1.3-0.3-1.9-0.3c-1.6,0-3,0.6-3.9,1.7c-1.3,1.4-1.8,3.1-1.6,4.8C4.8,60.6,5,61.3,5.4,62 c-0.9,0.7-1.5,1.7-1.8,2.8c-0.2,0.9-0.5,2.8,0.8,4.7c-0.1,0.1-0.2,0.3-0.2,0.4c-0.8,1.5-0.8,3.1-0.1,4.6c1,2.3,3.6,4.1,8.5,6.1 c3.1,1.2,5.9,2,5.9,2c4.1,1.1,7.7,1.6,10.9,1.6c5.9,0,10-1.8,12.5-5.3c3.9-5.7,3.3-10.9-1.7-15.9c-2.8-2.8-4.6-6.9-5-7.8 c-0.8-2.7-2.8-5.6-6.2-5.6h0c-0.3,0-0.6,0-0.9,0.1c-1.5,0.2-2.8,1.1-3.7,2.4c-1-1.3-2-2.2-2.9-2.8C20.2,48.4,18.8,48,17.5,48z M17.5,52c0.5,0,1.1,0.2,1.8,0.7c2.1,1.4,6.2,8.4,7.8,11.2c0.5,0.9,1.4,1.3,2.1,1.3c1.5,0,2.7-1.5,0.1-3.5c-3.9-2.9-2.5-7.7-0.7-8 c0.1,0,0.2,0,0.2,0c1.7,0,2.4,2.9,2.4,2.9s2.2,5.5,6,9.3c3.8,3.8,4,6.8,1.2,10.8c-1.9,2.8-5.5,3.6-9.2,3.6c-3.8,0-7.7-0.9-9.9-1.5 c-0.1,0-13.5-3.8-11.8-7c0.3-0.5,0.8-0.8,1.3-0.8c2.4,0,6.7,3.5,8.6,3.5c0.4,0,0.7-0.2,0.8-0.6c0.8-2.8-12.1-4-11-8.2 c0.2-0.7,0.7-1,1.4-1c3.1,0,10.2,5.5,11.7,5.5c0.1,0,0.2,0,0.2-0.1c0.7-1.2,0.3-2-4.9-5.2c-5.2-3.2-8.9-5.1-6.8-7.3 c0.2-0.3,0.6-0.4,1-0.4c3.2,0,10.7,6.8,10.7,6.8s2,2.1,3.2,2.1c0.3,0,0.5-0.1,0.7-0.4c0.9-1.5-8.1-8.2-8.6-11 C15.9,53,16.5,52,17.5,52z M53.8,79.9c-2.1,0.4-4.3,0.6-6.6,0.6c-2.1,0-4.1-0.2-6.1-0.5c0.3-0.3,0.6-0.7,0.8-1.1 c0.6-0.9,1.1-1.8,1.5-2.7c1.3,0.1,2.5,0.2,3.8,0.2c1.5,0,2.9-0.1,4.3-0.3c0.4,0.9,0.9,1.8,1.5,2.7C53.3,79.3,53.5,79.6,53.8,79.9z M47.2,7C66.4,7,82,22.6,82,41.8c0,2.7-0.3,5.2-0.9,7.7c0.1,0.1,0.3,0.3,0.4,0.4c0.6,0.7,1.3,2,1.3,3.8c0.5-0.1,0.9-0.2,1.4-0.3 c1.2-3.7,1.8-7.6,1.8-11.6C86,20.3,68.6,3,47.2,3C25.8,3,8.5,20.3,8.5,41.8c0,4,0.6,7.9,1.8,11.6c0.6,0,1.2,0.1,1.9,0.3 c0.1-1.8,0.7-3,1.3-3.7c-0.6-2.6-1-5.3-1-8.1C12.5,22.6,28,7,47.2,7z M77.4,48c1.6,0,3.1,0.7,4.1,1.9c0.6,0.7,1.3,2,1.3,3.8 c0.7-0.2,1.3-0.3,1.9-0.3c1.5,0,2.9,0.6,3.9,1.7c1.3,1.4,1.8,3.1,1.6,4.8c-0.1,0.8-0.4,1.5-0.8,2.2c0.9,0.7,1.5,1.7,1.8,2.8 c0.2,0.9,0.5,2.8-0.8,4.7c0.1,0.1,0.2,0.3,0.2,0.4c0.8,1.5,0.8,3.1,0.1,4.6c-1,2.3-3.6,4.1-8.5,6.1c-3.1,1.2-5.9,2-5.9,2 c-4.1,1.1-7.7,1.6-10.9,1.6c-5.9,0-10-1.8-12.5-5.3C49.1,73.2,49.7,68,54.7,63c2.8-2.8,4.6-6.9,5-7.8c0.8-2.7,2.8-5.6,6.2-5.6h0 c0.3,0,0.6,0,0.9,0.1c1.5,0.2,2.8,1.1,3.7,2.4c1-1.3,2-2.2,2.9-2.8C74.8,48.4,76.1,48,77.4,48z M77.4,52c-0.5,0-1.1,0.2-1.8,0.7 c-2.1,1.4-6.2,8.4-7.8,11.2c-0.5,0.9-1.4,1.3-2.1,1.3c-1.5,0-2.7-1.5-0.1-3.5c3.9-2.9,2.5-7.7,0.7-8c-0.1,0-0.2,0-0.2,0 c-1.7,0-2.5,2.9-2.5,2.9s-2.2,5.5-6,9.3c-3.8,3.8-4,6.8-1.2,10.8c1.9,2.8,5.5,3.6,9.2,3.6c3.8,0,7.7-0.9,9.9-1.5 c0.1,0,13.5-3.8,11.8-7c-0.3-0.5-0.8-0.8-1.3-0.8c-2.4,0-6.7,3.5-8.6,3.5c-0.4,0-0.7-0.2-0.8-0.6c-0.8-2.8,12.1-4,11-8.2 c-0.2-0.7-0.7-1-1.4-1c-3.1,0-10.2,5.5-11.7,5.5c-0.1,0-0.2,0-0.2-0.1c-0.7-1.2-0.3-2,4.9-5.2c5.2-3.2,8.9-5.1,6.8-7.3 c-0.2-0.3-0.6-0.4-1-0.4c-3.2,0-10.7,6.8-10.7,6.8s-2,2.1-3.2,2.1c-0.3,0-0.5-0.1-0.7-0.4c-0.9-1.5,8.1-8.2,8.6-11 C79.1,53,78.5,52,77.4,52z"})})},twitter:o.Z,x:o.Z,twitch:a.Z,reddit:s.Z,youtube:l.Z,facebook:u,instagram:d.Z,buyMeACoffee:f,patreon:p,koFi:h,coindrop:m,discord:g.Z,github:v.Z,linktree:y,deviantArt:b,tumblr:x,telegram:w,vk:S,bilibili:k,civitai:E.I,linkedin:j}},41584:function(e,t,r){"use strict";r.d(t,{x:function(){return a}});var n=r(85893),i=r(17789),o=r(88182);function a(e){let{duration:t,...r}=e;return(0,n.jsx)(i.C,{color:"gray",radius:"xl",className:"text-gray-500 dark:text-white",style:{flexShrink:0,boxShadow:"1px 2px 3px -1px #25262B33"},...r,children:(0,o.LU)(t)})}},28075:function(e,t,r){"use strict";r.d(t,{i:function(){return M},P:function(){return D}});var n=r(85893),i=r(95117),o=r(56817),a=r(67294),s=r(70652),l=r(79323),c=r(49834),u=r(5044),d=r(58823),f=(0,r(21955).Z)("filled","player-pause-filled","IconPlayerPauseFilled",[["path",{d:"M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z",key:"svg-0"}],["path",{d:"M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z",key:"svg-1"}]]),p=r(28642),h=r(6231),m=r(50909),g=r(82705),v=r(70663),y=r(64523),b=r(20966),x=r(90512),w=r(72456),S=r(10316),k=r.n(S);let j=e=>{let{videoId:t,autoplay:r,fallbackContent:i,sx:o,className:s,...l}=e,{data:c,isLoading:u}=w.SX.vimeo.checkVideoAvailable.useQuery({id:t}),[d,f]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{if(!c&&!u){f(!0);return}},[c,u]),d&&i)?(0,n.jsx)(n.Fragment,{children:i}):u?(0,n.jsx)(y.x,{...l,children:(0,n.jsx)(b.a,{m:"auto"})}):(0,n.jsx)(y.x,{...l,sx:{overflow:"hidden",position:"relative",iframe:{position:"absolute",top:0,left:0,width:"100%",height:"100%",body:{background:"#000"}}},id:t,"data-vimeo-id":t,className:(0,x.Z)(s,k().vimeoWrapper),children:c&&(0,n.jsx)("iframe",{src:"".concat(c,"&autoplay=1&transparent=0"),allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"})})};var E=r(25216),O=r(21997),C=r(98697),I=r(90101);let P=(0,a.forwardRef)((e,t)=>{var r;let{src:i,options:o,muted:l=!0,controls:y,style:b,wrapperProps:w,contain:S,fadeIn:k,html5Controls:E=!1,onMutedChange:P,youtubeVideoId:z,vimeoVideoId:N,threshold:R=.25,thumbnailUrl:_,disableWebm:M,disablePoster:D,...L}=e,F=(0,a.useRef)(null),U=(0,a.useRef)(null),[B,H]=(0,a.useState)({loaded:!1,muted:l,isPlaying:!1,showPlayIndicator:!1}),[Z,W]=(0,O._)({key:"global-volume",defaultValue:B.muted?0:.5}),{classes:V,cx:$}=T();(0,a.useImperativeHandle)(t,()=>({stop:()=>{F.current&&(F.current.pause(),F.current.currentTime=0)}}));let q=(0,a.useCallback)(()=>{y&&!E&&F.current&&(F.current.paused?F.current.play():F.current.pause(),H(e=>({...e,showPlayIndicator:!0})),setTimeout(()=>H(e=>({...e,showPlayIndicator:!1})),500))},[y,E]),G=(0,a.useCallback)(()=>{let e=U.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(e=>{console.error("Error attempting to enable fullscreen mode: ".concat(e.message))}))},[]),K=(0,a.useCallback)(e=>{H(e=>({...e,loaded:!0})),e.currentTarget.style.opacity="1"},[]),X=(0,a.useCallback)(()=>{let e=F.current;e&&(e.muted=!e.muted,W(e.muted?0:e.volume),H(t=>({...t,muted:e.muted})),null==P||P(e.muted))},[P,W]),J=(0,a.useCallback)(e=>{let t=F.current;t&&(t.volume=e,W(e),H(t=>({...t,muted:0===e})))},[W]),Y=B.loaded&&y&&!E,Q=F.current&&A(F.current);!l&&B.loaded&&F.current&&(F.current.volume=Z),(0,a.useEffect)(()=>{var e;"undefined"!=typeof navigator&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&F.current&&F.current.classList.add("w-full"),k&&(null===(e=F.current)||void 0===e?void 0:e.readyState)===4&&(F.current.style.opacity="1")},[k]);let{url:ee}=(0,s.pq)(i,{...o,anim:!0}),{url:et}=(0,s.pq)(null!=_?_:i,{width:null==o?void 0:o.width,optimized:null==o?void 0:o.optimized,skip:_?void 0:null==o?void 0:o.skip,anim:!!_&&void 0,transcode:!_||void 0}),er=(0,I.T)(),en=(0,a.useRef)();(0,a.useEffect)(()=>{let e=F.current;if(e&&null!==R)return en.current||(en.current=new IntersectionObserver(e=>{let[{isIntersecting:t,intersectionRatio:r,target:n}]=e;(null==o?void 0:o.anim)&&(t&&r>=R?n.play().catch(console.error):(!t||t&&r{var t;null===(t=en.current)||void 0===t||t.unobserve(e)}},[R,null==o?void 0:o.anim]);let[ei,eo]=(0,a.useState)(!1),{start:ea,clear:es}=(0,C.K)(e=>{let[t]=e;t.target.play(),eo(!0)},1e3),el=(0,n.jsxs)("div",{ref:U,className:$(V.iosScroll,null==w?void 0:w.className,"overflow-hidden relative flex items-center justify-center h-full"),...w,children:[(0,n.jsxs)("video",{ref:F,className:(0,x.Z)("block cursor-pointer ".concat(S?"h-full":"h-auto")),muted:B.muted,style:b,onLoadedData:K,controls:E,onClick:q,onPlaying:()=>H(e=>({...e,isPlaying:!0})),onPause:()=>H(e=>({...e,isPlaying:!1})),onVolumeChange:e=>{l||J(e.currentTarget.volume)},playsInline:!0,onMouseOver:(null==o?void 0:o.anim)?void 0:ea,onMouseLeave:(null==o?void 0:o.anim)?void 0:e=>{e.currentTarget.pause(),es(),eo(!1)},autoPlay:null==o?void 0:o.anim,loop:!0,poster:D?void 0:et,disablePictureInPicture:!0,preload:"none",...L,children:[!M&&(0,n.jsx)("source",{src:null==ee?void 0:ee.replace(".mp4",".webm"),type:"video/webm"}),(0,n.jsx)("source",{src:ee,type:"video/mp4"})]}),!(null==o?void 0:o.anim)&&!Y&&!E&&!ei&&(0,n.jsx)(d.Z,{className:$(V.playButton,"absolute-center pointer-events-none")}),Y&&(0,n.jsxs)("div",{className:V.controls,children:[(0,n.jsx)(c.A,{onClick:q,className:"z-10",variant:"light",size:"lg",radius:"xl",children:B.isPlaying?(0,n.jsx)(f,{size:16}):(0,n.jsx)(d.Z,{size:16})}),(0,n.jsxs)("div",{className:"flex flex-nowrap gap-4",children:[Q&&(0,n.jsxs)("div",{className:V.volumeControl,children:[(0,n.jsx)("div",{className:V.volumeSlider,children:(0,n.jsx)("input",{type:"range",className:"w-20",min:"0",max:"1",step:"0.05",value:Z,onChange:e=>J(e.currentTarget.valueAsNumber)})}),(0,n.jsx)(c.A,{onClick:X,className:"z-10",variant:"light",size:"lg",radius:"xl",disabled:!Q,children:B.muted||0===Z||!Q?(0,n.jsx)(p.Z,{size:16}):(0,n.jsx)(h.Z,{size:16})})]}),(0,n.jsx)(c.A,{onClick:G,className:"z-10",variant:"light",size:"lg",radius:"xl",children:document.fullscreenElement?(0,n.jsx)(m.Z,{size:16}):(0,n.jsx)(g.Z,{size:16})})]})]}),B.showPlayIndicator&&(0,n.jsx)(u.k,{className:V.playIndicator,size:64,radius:"xl",color:"dark",children:(null===(r=F.current)||void 0===r?void 0:r.paused)?(0,n.jsx)(f,{}):(0,n.jsx)(d.Z,{})})]});return z?(0,n.jsx)(v.H,{className:"block size-full",style:b,videoId:z,autoPlay:!0}):N?(0,n.jsx)(j,{className:"block size-full",style:b,videoId:N,autoplay:!0,fallbackContent:el}):el});P.displayName="EdgeVideo";let A=e=>e.mozHasAudio||!!e.webkitAudioDecodedByteCount||!!(e.audioTracks&&e.audioTracks.length),T=(0,o.k)((e,t,r)=>({controls:{position:"absolute",display:"flex",gap:8,flexWrap:"nowrap",padding:e.spacing.xs,width:"100%",justifyContent:"space-between",bottom:0},iosScroll:{[e.fn.smallerThan("md")]:{"&::after":{position:"absolute",top:"0px",right:"0px",bottom:"0px",left:"0px",content:'""',pointerEvents:"none"}}},playIndicator:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:e.white,opacity:0,animation:"".concat(E.Ic," .5s"),pointerEvents:"none"},volumeControl:{zIndex:10,display:"flex",position:"relative",flexDirection:"column",gap:8,"&:hover":{["& .".concat(r("volumeSlider"))]:{display:"block"}}},volumeSlider:{ref:r("volumeSlider"),display:"none",position:"absolute",lineHeight:1,padding:e.spacing.xs,top:0,left:0,transform:"translate(-33%, -170%) rotate(270deg)",zIndex:10},playButton:{width:80,height:80,color:e.white,backgroundColor:"rgba(0,0,0,.6)",padding:20,borderRadius:"50%",boxShadow:"0 2px 2px 1px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.2)",transition:"background-color 200ms ease",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}));var z=r(15131),N=r(26769),R=r.n(N);let _=(0,a.forwardRef)((e,t)=>{let{className:r,fadeIn:i,src:o,options:a,style:l,...c}=e,{anim:u,...d}=null!=a?a:{},{url:f}=(0,s.pq)(o,!1!==u?d:{...d,anim:!1});return(0,n.jsx)("img",{ref:t,className:(0,x.Z)(R().image,{[R().fadeIn]:i},r),onLoad:e=>i?e.currentTarget.style.opacity="1":void 0,onError:e=>e.currentTarget.classList.add(R().loadError),src:f,style:{maxWidth:(null==a?void 0:a.width)?a.width:void 0,...l},onDragStart:e=>e.dataTransfer.setData("text/uri-list",f),...c})});function M(e){var t,r,o;let{src:l,height:c,width:u,fit:d,anim:f,blur:p,quality:h,gravity:m,className:g,name:v,type:y,style:b,children:x,controls:w,wrapperProps:S,contain:k,fadeIn:j,mediaRef:E,transcode:O,original:C,skip:I,muted:A,html5Controls:T,onMutedChange:z,videoRef:N,youtubeVideoId:R,vimeoVideoId:M,thumbnailUrl:D,disableWebm:F,disablePoster:U,...B}=e,{classes:H,cx:Z}=L({maxWidth:null!=u?u:void 0}),W=(0,a.useRef)(null);j&&(null===(t=W.current)||void 0===t?void 0:t.complete)&&(null==W||null===(o=W.current)||void 0===o||null===(r=o.style)||void 0===r||r.setProperty("opacity","1")),(0,a.useEffect)(()=>{null==E||E[1](W.current)},[E]),u&&"number"==typeof u&&(u=Math.min(u,4096));let V=(0,s.rk)(l,{name:v,type:y}),$={name:v,width:u,height:c,fit:d,blur:p,quality:h,gravity:m,transcode:O,type:y,original:C,skip:I,anim:f};switch(V){case"image":return(0,n.jsx)(_,{ref:W,src:l,options:$,className:g,style:b,...B});case"video":return(0,n.jsx)(P,{src:l,thumbnailUrl:D,options:$,className:Z(H.responsive,g,{[H.fadeIn]:j}),style:b,controls:w,wrapperProps:S,contain:k,fadeIn:j,muted:A,html5Controls:T,onMutedChange:z,ref:N,youtubeVideoId:R,vimeoVideoId:M,disableWebm:F,disablePoster:U});default:return(0,n.jsx)(i.x,{align:"center",children:"Unsupported media type"})}}function D(e){var t;let{metadata:r,...i}=e,o=(0,z.s7)(e=>e.autoplayGifs),a=null!==(t=i.anim)&&void 0!==t?t:(0,l.hf)({type:i.type,metadata:r,forceDisabled:!o});return(0,n.jsx)(M,{...i,anim:a})}_.displayName="EdgeImage";let L=(0,o.k)((e,t,r)=>({responsive:{width:"100%",height:"auto",maxWidth:t.maxWidth},fadeIn:{opacity:0,transition:e.other.fadeIn},videoThumbRoot:{height:"100%",width:"100%",position:"relative",img:{objectFit:"cover",height:"100%",objectPosition:"50% 50%"}}}))},79323:function(e,t,r){"use strict";r.d(t,{Bn:function(){return l},hf:function(){return s},M2:function(){return c}});var n=r(35818),i=r(38498),o=r(1604);o.z.object({height:o.z.number(),width:o.z.number(),hash:o.z.string().optional(),size:o.z.number().optional()});let a=o.z.object({height:o.z.number(),width:o.z.number(),hash:o.z.string().optional(),duration:o.z.number().optional(),audio:o.z.boolean().optional(),size:o.z.number().optional(),thumbnailFrame:o.z.number().nullish(),youtubeVideoId:o.z.string().optional(),youtubeUploadAttempt:o.z.number().optional(),youtubeUploadEnqueuedAt:o.z.string().optional(),vimeoVideoId:o.z.string().optional(),vimeoUploadAttempt:o.z.number().optional(),vimeoUploadEnqueuedAt:o.z.string().optional(),thumbnailId:o.z.number().optional(),parentId:o.z.number().optional()});function s(e){let{type:t,metadata:r,forceDisabled:o}=e;if(o)return!1;let s=a.safeParse(r);return s.success&&s.data.duration?s.data.duration<=i.ch:t===n.DD.video}function l(e){var t;let{type:r,metadata:o,thumbnailUrl:s}=e,l=a.safeParse(o);if(!l.success)return;let c=l.data;if(r===n.DD.video&&c&&c.duration&&!s)return c.duration>i.ch?null!==(t=c.thumbnailFrame)&&void 0!==t?t:4:void 0}let c=e=>{let{type:t,metadata:r}=e,o=a.safeParse(r);if(!o.success)return!1;let s=o.data;return t===n.DD.video&&!!s&&!!s.duration&&s.duration>i.ch}},47405:function(e,t,r){"use strict";var n=r(85893),i=r(67294);class o extends i.Component{componentDidCatch(e,t){this.setState(e=>({errorCount:e.errorCount+1}))}render(){return(0,n.jsx)(i.Fragment,{children:this.props.children},this.state.errorCount)}constructor(...e){super(...e),this.state={errorCount:0}}}t.Z=o},83156:function(e,t,r){"use strict";r.d(t,{W:function(){return s},l:function(){return a}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null);function a(){return(0,i.useContext)(o)}function s(e){let{children:t}=e,r=(0,i.useState)([]),[a]=r;return(0,i.useEffect)(()=>()=>{for(let e of a)e.abort()},[]),(0,n.jsx)(o.Provider,{value:r,children:t})}},30914:function(e,t,r){"use strict";r.d(t,{z:function(){return f}});var n=r(85893),i=r(11163),o=r(38266),a=r(15131),s=r(5779),l=r(38394),c=r(32957),u=r(14619);let d={models:Object.values(c.Qp),posts:Object.values(c.H_),images:Object.values(c.FA).filter(e=>!Object.values(c.Ti).includes(e)),modelImages:Object.values(c.FA).filter(e=>!Object.values(c.Ti).includes(e)),questions:Object.values(c.hx),articles:Object.values(c.Qo),collections:Object.values(c.CI),bounties:Object.values(c.Tp),clubs:Object.values(c.xU),videos:Object.values(c.FA).filter(e=>!Object.values(c.Ti).includes(e)),threads:Object.values(c.AX),markers:Object.values(c.YJ),tools:Object.values(c.IM),buzzWithdrawalRequests:Object.values(c.vL)};function f(e){return e.value?(0,n.jsx)(p,{...e}):(0,n.jsx)(h,{...e,type:e.type})}function p(e){var t;let{type:r,value:i,onChange:l,...c}=e,u=(0,a.s7)(e=>e.showNsfw),{canViewNsfw:f}=(0,s.g)(),p={label:i,options:d[r].map(e=>({label:e,value:e})).filter(e=>(!!f||"Newest"!==e.value&&"Oldest"!==e.value)&&("images"!==r||!!u||"Newest"!==e.value)),onClick:l,value:i};return null!==(t=c.variant)&&void 0!==t||(c.variant="menu"),(0,n.jsxs)(n.Fragment,{children:["menu"===c.variant&&(0,n.jsx)(o.S,{...p}),"button"===c.variant&&(0,n.jsx)(o._,{...p,buttonProps:c.buttonProps})]})}function h(e){let{type:t,variant:r,...o}=e,{query:a,pathname:s,replace:c}=(0,i.useRouter)(),d=(0,l.PH)(e=>e[t].sort),f=a.sort,h=(0,l.Bx)(t);return(0,n.jsx)(p,{type:t,value:f||d,onChange:e=>{f&&f!==e&&c({pathname:s,query:(0,u.HO)({...a,sort:void 0})},void 0,{shallow:!0}),h({sort:e})},variant:r,...o})}},43597:function(e,t,r){"use strict";r.d(t,{q:function(){return w},z:function(){return n.z}});var n=r(30914),i=r(85893),o=r(56817),a=r(64002),s=r(11163),l=r(67294),c=r(64523),u=r(54777),d=r(73819),f=r(20142),p=r(38394),h=r(14619);let m=[{label:"Stats",value:"stats"},{label:"Published",value:"published"}];function g(e){let{type:t,...r}=e,{query:n,pathname:o,replace:a}=(0,s.useRouter)(),l=(0,p.PH)(e=>e[t].periodMode),g=n.periodMode,v=(0,p.Bx)(t);return(0,i.jsx)(f.u,{children:(0,i.jsxs)(c.x,{...r,children:[(0,i.jsx)(u.i,{label:"Mode",labelPosition:"center"}),(0,i.jsx)(d.s,{data:m,value:g||l,onChange:e=>{g&&g!==e&&a({pathname:o,query:(0,h.HO)({...n,periodMode:void 0})},void 0,{shallow:!0}),v({periodMode:e})},size:"xs"})]})})}var v=r(38266),y=r(35818),b=r(27943);let x=Object.values(y.Tz);function w(e){return e.value?(0,i.jsx)(k,{...e}):(0,i.jsx)(j,{...e,type:e.type})}let S=(0,o.k)(e=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}}}));function k(e){let{value:t,onChange:r,disabled:n,type:o,hideMode:s,variant:l="menu"}=e,{classes:c}=S(),u=!s&&(0,p.Nv)(o),d=x.map(e=>({label:(0,b.Gf)(e),value:e}));return(0,i.jsxs)(f.u,{children:["menu"===l&&(0,i.jsx)(v.S,{label:(0,b.Gf)(t),options:d,onClick:r,value:t,disabled:n,children:u&&(0,i.jsx)(g,{type:o})}),"chips"===l&&(0,i.jsx)(a.A.Group,{spacing:8,value:t,onChange:r,children:d.map((e,t)=>(0,i.jsx)(a.A,{value:e.value,classNames:c,size:"sm",radius:"xl",variant:"filled",tt:"capitalize",children:(0,i.jsx)("span",{children:e.label})},t))})]})}function j(e){let{type:t,disabled:r,hideMode:n,variant:o}=e,{query:a,pathname:c,replace:u}=(0,s.useRouter)(),d=(0,p.PH)((0,l.useCallback)(e=>"collections"!==t&&"clubs"!==t&&"threads"!==t&&"markers"!==t&&"tools"!==t&&"buzzWithdrawalRequests"!==t?e[t].period:void 0,[t])),f=a.period,m=(0,p.Bx)(t),g=f||d;return g?(0,i.jsx)(k,{type:t,value:g,onChange:e=>{f&&f!==e&&u({pathname:c,query:(0,h.HO)({...a,period:void 0})},void 0,{shallow:!0}),m({period:e})},disabled:r,hideMode:n,variant:o}):null}},24838:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(85893),i=r(67841),o=r(70096),a=r(17578),s=r(72456);function l(e){let{userId:t,onToggleFollow:r,...l}=e,c=(0,a.xJ)(),u=s.SX.useUtils(),{data:d=[]}=s.SX.user.getFollowingUsers.useQuery(void 0,{enabled:!!c}),f=d.some(e=>t==e.id),p=s.SX.user.toggleFollow.useMutation({async onMutate(){await u.user.getFollowingUsers.cancel();let e=u.user.getFollowingUsers.getData();u.user.getFollowingUsers.setData(void 0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return f?e.filter(e=>e.id!==t):[...e,{id:t,username:null,image:null,deletedAt:null,profilePicture:null}]});let r={id:t},n=u.user.getCreator.getData(r);return u.user.getCreator.setData(r,e=>e&&e.stats?{...e,stats:{...e.stats,followerCountAllTime:f?e.stats.followerCountAllTime-1:e.stats.followerCountAllTime+1}}:e),{prevFollowing:e,prevCreator:n}},onError(e,r,n){u.user.getFollowingUsers.setData(void 0,null==n?void 0:n.prevFollowing),u.user.getCreator.setData({id:t},null==n?void 0:n.prevCreator)},async onSettled(){await u.user.getFollowingUsers.invalidate(),await u.user.getLists.invalidate()}});return t===(null==c?void 0:c.id)?null:(0,n.jsx)(o.b,{reason:"follow-user",children:(0,n.jsx)(i.z,{radius:"xl",variant:f?"outline":"light",onClick:e=>{e.preventDefault(),e.stopPropagation(),p.mutate({targetUserId:t}),null==r||r()},loading:p.isLoading,px:"sm",sx:{fontSize:12,fontWeight:600,lineHeight:1.5},...l,children:f?"Unfollow":"Follow"})})}},89521:function(e,t,r){"use strict";r.d(t,{m:function(){return u},u:function(){return c}});var n=r(85893),i=r(67294),o=r(49630),a=r(17578),s=r(15131);let l=(0,i.createContext)(null),c=()=>{let e=(0,i.useContext)(l);if(!e)throw Error("useHiddenPreferences can only be used inside HiddenPreferencesProvider");return e},u=e=>{let{children:t}=e,{data:r,isLoading:c}=(0,o.HX)(),u=(0,a.xJ)(),d=(0,s.s7)(e=>e.disableHidden),f=(0,i.useMemo)(()=>{let e=r.hiddenTags.filter(e=>!!e.nsfwLevel),t=new Map(r.hiddenTags.filter(e=>!d&&e.hidden).map(e=>[e.id,!0])),n=new Map(r.hiddenImages.filter(e=>!e.tagId||t.get(e.tagId)).map(e=>[e.id,!0]));return{hiddenUsers:new Map(((null==u?void 0:u.isModerator)?r.hiddenUsers.map(e=>e.id):[...new Set([...r.hiddenUsers,...r.blockedUsers,...r.blockedByUsers].map(e=>e.id))]).map(e=>[e,!0])),hiddenModels:new Map(r.hiddenModels.map(e=>[e.id,!0])),hiddenTags:t,hiddenImages:n,hiddenLoading:c,moderatedTags:e}},[r,c,d]),p=(0,i.useDeferredValue)(f);return(0,n.jsx)(l.Provider,{value:p,children:t})}},36061:function(e,t,r){"use strict";r.d(t,{f:function(){return p}});var n=r(67294),i=r(58456),o=r(89521),a=r(17578),s=r(5779),l=r(32957),c=r(54671),u=r(7379),d=r(79444),f=r(48600);function p(e){let{type:t,data:r,showHidden:p,showImageless:h,disabled:m,isRefetching:g,hiddenImages:v=[],hiddenUsers:y=[],hiddenTags:b=[],browsingLevel:x,allowLowerLevels:w}=e,S=(0,a.xJ)(),[k,j]=(0,n.useState)([]),E=(0,i.bT)(),O=null!=x?x:E,{canViewNsfw:C}=(0,s.g)(),I=(0,o.u)(),P=JSON.stringify([...v,...y,...b]),{items:A,hidden:T}=(0,n.useMemo)(()=>{let e={...I};v.length>0&&(e.hiddenImages=new Map([...e.hiddenImages,...v.map(e=>[e,!0])])),y.length>0&&(e.hiddenUsers=new Map([...e.hiddenUsers,...y.map(e=>[e,!0])])),b.length>0&&(e.hiddenTags=new Map([...e.hiddenTags,...b.map(e=>[e,!0])]));let{items:n,hidden:i}=function(e){let{type:t,data:r,hiddenPreferences:n,browsingLevel:i,showHidden:o,showImageless:a,disabled:s,currentUser:p,allowLowerLevels:h,canViewNsfw:m}=e,g={unprocessed:0,browsingLevel:0,models:0,images:0,tags:0,users:0,noImages:0};if(!r||n.hiddenLoading)return{items:[],hidden:g};if(s)return g.unprocessed=r.length,{items:r,hidden:g};let v=!!(null==p?void 0:p.isModerator),{key:y,value:b}=(0,f._x)(t,r),{hiddenModels:x,hiddenImages:w,hiddenTags:S,hiddenUsers:k,moderatedTags:j}=n,E=Math.max(...(0,c.Ql)(i)),O=u.v.maxValue(i);switch(y){case"models":return{items:b.filter(e=>{var t;let r=e.user.id,n=r===(null==p?void 0:p.id);if(!m&&((0,d.sr)(e.name)||!0===e.nsfw))return!1;if((n||v)&&0===e.nsfwLevel)return!0;if(o&&!x.get(e.id))return!1;if(!u.v.intersects(e.nsfwLevel,i))return g.browsingLevel++,!1;if(r&&k.get(r))return g.users++,!1;if(x.get(e.id)&&!o)return g.models++,!1;for(let r of null!==(t=e.tags)&&void 0!==t?t:[])if(S.get(r))return g.tags++,!1;return!0}).map(e=>{var t;let{images:r,...n}=e,o=n.user.id===(null==p?void 0:p.id),s=null!==(t=null==r?void 0:r.filter(e=>{var t;let r=e.userId;if((r&&r===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(n.nsfw){if(e.nsfwLevel>E)return!1}else if(!u.v.intersects(e.nsfwLevel,i))return!1;if(w.get(e.id))return!1;for(let r of null!==(t=e.tags)&&void 0!==t?t:[])if(S.get(r))return!1;return!0}))&&void 0!==t?t:[],l=n.nsfw?s.sort((e,t)=>{let r=u.v.intersects(e.nsfwLevel,i);return r===u.v.intersects(t.nsfwLevel,i)?0:r?-1:1}):s;return 0===l.length&&g.noImages++,l.length||a&&(o||v)?{...n,images:s}:null}).filter(f.$K),hidden:g};case"images":let C=b.filter(e=>{var t,r,n;let a=null!==(r=e.userId)&&void 0!==r?r:null===(t=e.user)||void 0===t?void 0:t.id;if((a&&a===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(h?e.nsfwLevel>O:!u.v.intersects(e.nsfwLevel,i))return g.browsingLevel++,!1;if(a&&k.get(a))return g.users++,!1;if(w.get(e.id)&&!o)return g.images++,!1;for(let t of null!==(n=e.tagIds)&&void 0!==n?n:[])if(S.get(t))return g.tags++,!1;return!0});return{hidden:g,items:C};case"articles":let I=b.filter(e=>{var t;let r=e.user.id===(null==p?void 0:p.id);if(!m&&(0,d.sr)(e.title))return!1;if((r||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i)||e.userNsfwLevel&&!u.v.intersects(e.userNsfwLevel,i))return g.browsingLevel++,!1;if(e.user&&k.get(e.user.id))return g.users++,!1;for(let r of null!==(t=e.tags)&&void 0!==t?t:[])if(S.get(r.id))return g.tags++,!1;if(e.coverImage){if(w.get(e.coverImage.id))return g.images++,!1;for(let t of e.coverImage.tags)if(S.get(t))return g.tags++,!1}return!0});return{hidden:g,items:I};case"users":let P=b.filter(e=>e.id===(null==p?void 0:p.id)||!k.get(e.id)||(g.users++,!1));return{hidden:g,items:P};case"collections":return{items:b.filter(e=>{var t,r,n;let o=null!==(r=e.userId)&&void 0!==r?r:null===(t=e.user)||void 0===t?void 0:t.id;if((o&&o===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i))return g.browsingLevel++,!1;if(o&&k.get(o))return g.users++,!1;if(e.image){if(w.get(e.image.id))return g.images++,!1;for(let t of null!==(n=e.image.tagIds)&&void 0!==n?n:[])S.get(t)&&g.images++}return!0}).map(e=>{var t;let{images:r=[],image:n,...o}=e,s=null!==(t=(n?[...r,n]:r).filter(e=>{var t;if((e.userId===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i)||w.get(e.id))return!1;for(let r of null!==(t=e.tagIds)&&void 0!==t?t:[])if(S.get(r))return!1;return!0}))&&void 0!==t?t:[];return 0===s.length&&g.noImages++,s.length||a?{...o,images:s}:null}).filter(f.$K),hidden:g};case"bounties":return{items:b.filter(e=>{var t,r;let n=e.user.id===(null==p?void 0:p.id);if(!m&&(0,d.sr)(e.name))return!1;if((n||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i))return g.browsingLevel++,!1;if(k.get(e.user.id))return g.users++,!1;for(let r of null!==(t=e.images)&&void 0!==t?t:[])if(w.get(r.id))return g.images++,!1;for(let t of null!==(r=e.tags)&&void 0!==r?r:[])if(S.get(t))return g.tags++,!1;return!0}).map(e=>{let{images:t,...r}=e,n=null==t?void 0:t.filter(e=>{var t;if((e.userId===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i)||w.get(e.id))return!1;for(let r of null!==(t=e.tagIds)&&void 0!==t?t:[])if(S.get(r))return!1;return!0});return(null==n?void 0:n.length)===0&&g.noImages++,n.length?{...r,images:n}:null}).filter(f.$K),hidden:g};case"posts":return{items:b.filter(e=>{var t,r;let n=null!==(r=e.userId)&&void 0!==r?r:null===(t=e.user)||void 0===t?void 0:t.id,o=n&&n===(null==p?void 0:p.id);return!(!m&&(0,d.sr)(e.title))&&((!!o||!!v)&&0===e.nsfwLevel||(u.v.intersects(e.nsfwLevel,i)?!(n&&k.get(n))||(g.users++,!1):(g.browsingLevel++,!1)))}).map(e=>{let t=e.images;if(!t)return e;let r=t.filter(e=>{var t,r,n;if(((null!==(r=e.userId)&&void 0!==r?r:null===(t=e.user)||void 0===t?void 0:t.id)===(null==p?void 0:p.id)||v)&&0===e.nsfwLevel)return!0;if(!u.v.intersects(e.nsfwLevel,i)||w.get(e.id))return!1;for(let t of null!==(n=e.tagIds)&&void 0!==n?n:[])if(S.get(t))return!1;return!0});return 0===r.length&&g.noImages++,r.length||a?{...e,images:r}:null}).filter(f.$K),hidden:g};case"tags":{let e=j.filter(e=>!!e.nsfwLevel&&u.v.intersects(e.nsfwLevel,i)).map(e=>e.id);return{items:b.filter(t=>!(!m&&(0,d.sr)(t.name))&&(S.get(t.id)?(g.tags++,!1):!t.nsfwLevel||!(t.nsfwLevel>l.Sh.PG13)||!!e.includes(t.id)||(g.browsingLevel++,!1))),hidden:g}}case"tools":return{items:b,hidden:g};default:throw Error("unhandled hidden user preferences filter type")}}({type:t,data:r,showHidden:p,showImageless:h,disabled:m,browsingLevel:O,hiddenPreferences:e,currentUser:S,allowLowerLevels:w,canViewNsfw:C});return{items:n,hidden:i}},[r,I,P,p,m,O]);(0,n.useEffect)(()=>j(A),[A]);let z=T.browsingLevel+T.models+T.images+T.tags+T.users;return{loadingPreferences:I.hiddenLoading,items:g?k:A,hiddenCount:z}}},75566:function(e,t,r){"use strict";r.d(t,{r:function(){return p}});var n=r(85893),i=r(72456),o=r(67841),a=r(88002),s=r(71033),l=r(97118),c=r(70096),u=r(49630),d=r(17578),f=r(2807);function p(e){let{modelId:t,as:r="button",onToggleHide:p,...h}=e,m=(0,d.xJ)(),g=i.SX.useUtils(),v=(0,u.s9)().hiddenModels.filter(e=>e.hidden).some(e=>e.id===t),y=(0,u.ZI)(),b=async e=>{e.preventDefault(),e.stopPropagation(),v||await g.model.getAll.invalidate({hidden:!0},{exact:!1}),y.mutateAsync({kind:"model",data:[{id:t}]}).then(()=>{(0,f.LX)({title:"Model ".concat(v?"unhidden":"hidden"),message:"This model will".concat(v?" ":" not ","show up in your feed")})}),null==p||p()};return null!=m&&t===m.id?null:"button"===r?(0,n.jsx)(c.b,{reason:"hide-content",children:(0,n.jsx)(o.z,{variant:v?"outline":"filled",onClick:b,loading:y.isLoading,...h,children:v?"Unhide":"Hide"})}):(0,n.jsx)(c.b,{reason:"hide-content",children:(0,n.jsxs)(a.v.Item,{onClick:b,icon:v?(0,n.jsx)(s.Z,{size:16,stroke:1.5}):(0,n.jsx)(l.Z,{size:16,stroke:1.5}),children:[v?"Unhide ":"Hide ","this model"]})})}},61271:function(e,t,r){"use strict";r.d(t,{A:function(){return f}});var n=r(85893),i=r(67841),o=r(88002),a=r(236),s=r(68434),l=r(70096),c=r(49630),u=r(17578),d=r(2807);function f(e){let{userId:t,as:r="button",onToggleHide:f,...p}=e,h=(0,u.xJ)(),m=(0,c.s9)().hiddenUsers.some(e=>e.id===t),g=(0,c.ZI)(),v=async e=>{e.preventDefault(),e.stopPropagation(),g.mutateAsync({kind:"user",data:[{id:t}],hidden:!m}).then(()=>{(0,d.LX)({title:"User marked as ".concat(m?"show":"hidden"),message:"Content from this user will".concat(m?" ":" not"," show up in your feed")})}),null==f||f()};return null!=h&&t===h.id?null:"button"===r?(0,n.jsx)(l.b,{reason:"hide-content",children:(0,n.jsx)(i.z,{variant:m?"outline":"filled",onClick:v,loading:g.isLoading,...p,children:m?"Unhide":"Hide"})}):(0,n.jsx)(l.b,{reason:"hide-content",children:(0,n.jsxs)(o.v.Item,{onClick:v,icon:m?(0,n.jsx)(a.Z,{size:16,stroke:1.5}):(0,n.jsx)(s.Z,{size:16,stroke:1.5}),children:[m?"Unhide ":"Hide ","content from this user"]})})}},53772:function(e,t,r){"use strict";r.r(t),r.d(t,{openManageHomeBlocksModal:function(){return I}});var n=r(85893),i=r(67294),o=r(60887),a=r(45587),s=r(35362),l=r(72456),c=r(56817),u=r(9094),d=r(20966),f=r(71232),p=r(17789),h=r(95117),m=r(15544),g=r(97564),v=r(67841),y=r(21017),b=r(49834),x=r(74943),w=r(63324),S=r(94351),k=r(98729),j=r(24285),E=r(2807),O=r(1566);let C=(0,c.k)(e=>({sectionHeader:{height:30,fontSize:e.fontSizes.sm,textTransform:"capitalize",fontWeight:500}})),{openModal:I,Modal:P}=(0,s.W)({name:"manageHomeBlocks",title:"Manage Home Page",size:"md",Element:e=>{let{context:t,props:r}=e;return(0,n.jsx)(A,{...r,onClose:t.close})}});function A(e){let{onClose:t}=e,{classes:r}=C(),{data:s=[],isLoading:c}=l.SX.homeBlock.getHomeBlocks.useQuery({withCoreData:!0,ownedOnly:!0}),{data:y=[],isLoading:b}=l.SX.homeBlock.getSystemHomeBlocks.useQuery({permanent:!1}),w=l.SX.useContext(),S=b||c,[k,j]=(0,i.useState)(s),[I,P]=(0,i.useState)("system-home-blocks"),{mutate:A,isLoading:N}=l.SX.homeBlock.setHomeBlockOrder.useMutation({async onSuccess(){(0,E.LX)({title:"Home page has been updated",message:"Your preferred order has been saved"}),t(),await w.homeBlock.getHomeBlocks.invalidate()},onError(e){(0,E.s9)({title:"There was an error updating your home page",error:Error(e.message)})}}),R=(0,o.Dy)((0,o.VT)(o.we,{activationConstraint:{distance:8}})),_=(0,i.useMemo)(()=>y.filter(e=>!k.find(t=>t.sourceId===e.id||t.id===e.id)),[k,y]);if((0,i.useEffect)(()=>{c||j(s)},[s,c]),(0,i.useEffect)(()=>{!S&&0===k.length&&_.length>0&&P("system-home-blocks")},[_.length,S,k.length]),S)return(0,n.jsx)(u.M,{py:"xl",children:(0,n.jsx)(d.a,{variant:"bars"})});let M=e=>{j(k.filter(t=>t.id!==e))},D=e=>{let t=_.find(t=>e===t.id);t&&j([...k,t])};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(f.Z,{spacing:"xs",py:"md",sx:e=>({borderTop:"1px solid ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2])}),children:[(0,n.jsx)(p.C,{color:"yellow",variant:"light",size:"xs",children:"Beta"}),(0,n.jsx)(h.x,{size:"xs",color:"dimmed",inline:!0,children:"Expect frequent changes."})]}),(0,n.jsx)(m.U,{variant:"separated",value:I,onChange:e=>P(e),children:(0,n.jsxs)(m.U.Item,{value:"system-home-blocks",children:[(0,n.jsx)(m.U.Control,{children:"Civitai Home Blocks"}),(0,n.jsx)(m.U.Panel,{children:_.length>0?(0,n.jsx)(g.K,{spacing:8,children:_.map(e=>(0,n.jsx)(z,{onAdd:D,homeBlock:e},e.id))}):(0,n.jsx)(O.L,{py:5,my:"xs",title:"All home blocks selected",icon:(0,n.jsx)(x.Z,{}),iconSize:"lg",radius:"md",children:(0,n.jsx)(h.x,{children:"All civitai home blocks are already selected."})})})]})}),(0,n.jsxs)(g.K,{spacing:8,children:[(0,n.jsx)(p.C,{mt:"md",size:"md",h:30,gradient:{from:"cyan",to:"blue"},variant:"gradient",className:r.sectionHeader,children:"Your home"}),(0,n.jsx)(o.LB,{sensors:R,onDragEnd:e=>{let{active:t,over:r}=e;if(r&&t.id!==(null==r?void 0:r.id)){let e=k.findIndex(e=>{let{id:r}=e;return r===t.id}),n=k.findIndex(e=>{let{id:t}=e;return t===r.id});j((0,a.Rp)(k,e,n))}},collisionDetection:o.Xo,children:(0,n.jsxs)(a.Fo,{items:k,strategy:a.qw,children:[0===k.length&&(0,n.jsx)(O.L,{py:5,my:"xs",title:"No home blocks selected",icon:(0,n.jsx)(x.Z,{}),iconSize:"lg",radius:"md",children:(0,n.jsx)(h.x,{children:"By leaving this empty you will end up with our default recommended home page setup."})}),k.map(e=>(0,n.jsx)(T,{onRemove:M,homeBlock:e},e.id))]})})]}),(0,n.jsx)(g.K,{children:(0,n.jsx)(v.z,{mt:"sm",disabled:N,onClick:()=>{A({homeBlocks:k.map((e,t)=>({id:e.id,index:t,userId:e.userId}))})},children:N?"Updating settings...":"Save"})})]})}function T(e){var t;let{homeBlock:r,onRemove:i}=e,{attributes:o,listeners:s,isDragging:l,setNodeRef:c,transform:u,transition:d}=(0,a.nB)({id:r.id}),p={transform:j.ux.Transform.toString(u),transition:d,cursor:l?"grabbing":"grab",zIndex:l?1:void 0,touchAction:"none"},m=r.metadata,g=(null==m?void 0:m.title)||(null===(t=r.collection)||void 0===t?void 0:t.name);return(0,n.jsx)(y.Z,{px:"md",py:8,withBorder:!0,style:p,...o,...s,ref:c,children:(0,n.jsxs)(f.Z,{noWrap:!0,align:"center",children:[(0,n.jsx)(w.Z,{}),(0,n.jsx)(h.x,{size:"md",lineClamp:1,children:g}),i&&(0,n.jsx)(b.A,{ml:"auto",color:"red",onClick:()=>i(r.id),children:(0,n.jsx)(S.Z,{size:16})})]})})}function z(e){var t;let{homeBlock:r,onAdd:i}=e,o=r.metadata,a=(null==o?void 0:o.title)||(null===(t=r.collection)||void 0===t?void 0:t.name);return(0,n.jsx)(y.Z,{px:"md",py:8,withBorder:!0,children:(0,n.jsxs)(f.Z,{children:[(0,n.jsx)(h.x,{size:"md",lineClamp:1,children:a}),i&&(0,n.jsx)(b.A,{ml:"auto",onClick:()=>i(r.id),children:(0,n.jsx)(k.Z,{size:16})})]})})}t.default=P},48350:function(e,t,r){"use strict";r.d(t,{ep:function(){return T},br:function(){return P}});var n=r(85893),i=r(56817),o=r(67841),a=r(88002),s=r(71232),l=r(95117),c=r(5169),u=r(86866),d=r(23693),f=r(76145),p=r(82300),h=r(20098),m=r(81439),g=r(696),v=r(53315),y=r(61298),b=r(9206),x=(0,r(21955).Z)("outline","caret-down","IconCaretDown",[["path",{d:"M6 10l6 6l6 -6h-12",key:"svg-0"}]]),w=r(90512),S=r(11163),k=r(67294),j=r(79543),E=r(5779),O=r(27943),C=r(48600);let I=[{key:"home",url:"/",icon:e=>(0,n.jsx)(c.Z,{...e})},{key:"models",url:"/models",icon:e=>(0,n.jsx)(u.Z,{...e})},{key:"images",url:"/images",icon:e=>(0,n.jsx)(d.Z,{...e})},{key:"videos",url:"/videos",icon:e=>(0,n.jsx)(f.Z,{...e})},{key:"posts",url:"/posts",icon:e=>(0,n.jsx)(p.Z,{...e}),grouped:!0},{key:"articles",url:"/articles",icon:e=>(0,n.jsx)(h.Z,{...e})},{key:"bounties",url:"/bounties",icon:e=>(0,n.jsx)(m.Z,{...e}),grouped:!0},{key:"tools",url:"/tools",icon:e=>(0,n.jsx)(g.Z,{...e}),grouped:!0},{key:"challenges",url:"/challenges",icon:e=>(0,n.jsx)(v.Z,{...e}),grouped:!0},{key:"events",url:"/events",icon:e=>(0,n.jsx)(y.Z,{...e}),grouped:!0},{key:"shop",url:"/shop",icon:e=>(0,n.jsx)(b.Z,{...e}),classes:["tabHighlight"]}];function P(e){return I.filter(t=>{let{key:r}=t;return!["bounties"===r&&!e.bounties,"clubs"===r&&!e.clubs,"shop"===r&&!e.cosmeticShop,"articles"===r&&!e.articles,"tools"===r&&!e.toolSearch].some(e=>e)})}let A=(0,i.k)(e=>({tabHighlight:{backgroundColor:e.fn.rgba(e.colors.yellow[3],"dark"===e.colorScheme?.1:.3),backgroundImage:"linear-gradient(90deg, ".concat(e.fn.rgba(e.colors.yellow[4],0),", ").concat(e.fn.rgba(e.colors.yellow[4],"dark"===e.colorScheme?.1:.2),", ").concat(e.fn.rgba(e.colors.yellow[4],0),")"),backgroundSize:"50px",backgroundPosition:"-300% 50%",backgroundRepeat:"no-repeat",color:"dark"===e.colorScheme?e.colors.yellow[3]:e.colors.yellow[8],animation:"button-highlight 5s linear infinite",willChange:"background-position"},moreButton:{padding:"8px 10px 8px 16px",fontSize:16,fontWeight:500,display:"none",'&[data-active="true"]':{background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4],color:"dark"===e.colorScheme?e.white:e.colors.gray[8]},"@container (min-width: 992px) and (max-width: 1440px)":{display:"block"}},groupedOptions:{display:"block","@container (min-width: 992px) and (max-width: 1440px)":{display:"none"}}}));function T(){let e=(0,S.useRouter)(),t=(0,E.g)(),r=e.pathname.split("/")[1]||"home",{classes:i,cx:c}=A(),[u,d]=(0,k.useState)(!1),f=P(t);return(0,n.jsxs)("div",{className:"flex items-center gap-1 overflow-x-auto overflow-y-hidden",children:[f.map(e=>{let{key:t,...a}=e;return(0,n.jsxs)(o.z,{variant:"default",component:j.p,href:a.url,className:(0,w.Z)("h-8 rounded-full border-none py-2 pl-3 pr-4",{"bg-gray-4 dark:bg-dark-4":r===t,[i.groupedOptions]:a.grouped,[i.tabHighlight]:"shop"===t}),classNames:{label:"flex gap-2 items-center capitalize overflow-visible"},children:[a.icon({size:16}),(0,n.jsx)("span",{className:"text-base font-medium capitalize",children:(0,O.Gf)(t)})]},t)}),(0,n.jsxs)(a.v,{position:"bottom-end",onChange:d,children:[(0,n.jsx)(a.v.Target,{children:(0,n.jsx)(o.z,{radius:"xl",size:"sm",color:"gray",variant:"subtle","data-active":u,className:i.moreButton,children:(0,n.jsxs)(s.Z,{spacing:4,noWrap:!0,children:["More",(0,n.jsx)(x,{size:16,fill:"currentColor"})]})})}),(0,n.jsx)(a.v.Dropdown,{children:f.filter(e=>e.grouped).map(e=>{var t;return(0,n.jsx)(j.p,{legacyBehavior:!0,href:e.url,passHref:!0,children:(0,n.jsx)(a.v.Item,{component:"a",icon:e.icon({size:16}),className:c(null===(t=e.classes)||void 0===t?void 0:t.map(e=>i.hasOwnProperty(e)?i[e]:null).filter(C.$K)),children:(0,n.jsx)(s.Z,{spacing:8,noWrap:!0,children:(0,n.jsx)(l.x,{tt:"capitalize",children:(0,O.Gf)(e.key)})})})},e.key)})})]})]})}},67614:function(e,t,r){"use strict";r.d(t,{G:function(){return l}});var n=r(85893),i=r(17789),o=r(88393),a=r(67294),s=r(79543);let l=(0,a.forwardRef)((e,t)=>{let{icon:r,children:a,tooltip:l,href:c,...u}=e,d=c?(0,n.jsx)(i.C,{ref:t,component:s.p,href:c,styles:{leftSection:{marginRight:4},root:{paddingLeft:3,paddingRight:5,cursor:"pointer"}},radius:"sm",color:"gray",leftSection:r,...u,children:a}):(0,n.jsx)(i.C,{ref:t,styles:{leftSection:{marginRight:4},root:{paddingLeft:3,paddingRight:5}},radius:"sm",color:"gray",leftSection:r,...u,children:a});return l?(0,n.jsx)(o.u,{label:l,position:"top",color:"dark",withArrow:!0,children:d}):d});l.displayName="IconBadge"},85120:function(e,t,r){"use strict";r.d(t,{t:function(){return J},u:function(){return er}});var n=r(85893),i=r(88002),o=r(71232),a=r(5044),s=r(64523),l=r(6564),c=r(97564),u=r(95117),d=r(65695),f=r(71033),p=r(7893),h=r(13309),m=r(94351),g=r(38047),v=r(25954),y=r(35744),b=r(236),x=r(63208),w=r(68434),S=r(94642),k=r(36571),j=r(58405),E=r(11163),O=r.n(E),C=r(67294),I=r(41605),P=r(74818),A=r(40572),T=r(76326),z=r(67841),N=r(97118),R=r(70096),_=r(49630),M=r(2807);function D(e){let{imageId:t,as:r="button",onToggleHide:o,...a}=e,s=(0,_.s9)().hiddenImages.filter(e=>e.hidden).some(e=>e.id===t),l=(0,_.ZI)(),c=async e=>{e.preventDefault(),e.stopPropagation(),l.mutateAsync({kind:"image",data:[{id:t}]}).then(()=>{(0,M.LX)({title:"Image ".concat(s?"unhidden":"hidden"),message:"This image will".concat(s?" ":" not ","show up in your feed")})}),null==o||o()};return"button"===r?(0,n.jsx)(R.b,{reason:"hide-content",children:(0,n.jsx)(z.z,{variant:s?"outline":"filled",onClick:c,loading:l.isLoading,...a,children:s?"Unhide":"Hide"})}):(0,n.jsx)(R.b,{reason:"hide-content",children:(0,n.jsxs)(i.v.Item,{onClick:c,icon:s?(0,n.jsx)(f.Z,{size:16,stroke:1.5}):(0,n.jsx)(N.Z,{size:16,stroke:1.5}),children:[s?"Unhide ":"Hide ","this image"]})})}var L=r(61271),F=r(72456),U=r(42597),B=r(61119),H=r(58716),Z=r(81644),W=r(10523),V=r(62777),$=r(17578),q=r(76083),G=r(5779),K=r(9957),X=r(35818);function J(e){var t;let{context:r,additionalMenuItems:a,noDelete:s=!1,image:l,className:c,children:u,...d}=e,f=(0,E.useRouter)(),p=(0,$.xJ)(),h={image:l,context:r,additionalMenuItems:a},m=!!p&&(p.id===(null===(t=l.user)||void 0===t?void 0:t.id)||p.id===l.userId),g=!!(null==p?void 0:p.isModerator),v=(0,n.jsxs)(i.v,{withinPortal:!0,withArrow:!0,zIndex:1e3,children:[(0,n.jsx)(i.v.Target,{children:null!=u?u:(0,n.jsx)(I.z,{className:l.needsReview?void 0:c,onClick:e=>{e.preventDefault(),e.stopPropagation()},...d})}),(0,n.jsx)(i.v.Dropdown,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsx)(Y,{...h,isModerator:g,isOwner:m,disableDelete:f.pathname.includes("/collections")||s})})]});return l.needsReview||"Blocked"===l.ingestion?(0,n.jsxs)(o.Z,{spacing:4,className:c,children:[(0,n.jsx)(Q,{...h,isModerator:g,isOwner:m}),v]}):v}function Y(e){var t;let{image:r,context:o="image",additionalMenuItems:a,isOwner:s,isModerator:l,disableDelete:c}=e,u=(0,G.g)(),{id:b,postId:x,user:w,userId:S}=r,k=null!==(t=null==w?void 0:w.id)&&void 0!==t?t:S,j="image"===o,E=function(){let e=F.SX.image.delete.useMutation({onError:e=>(0,M.s9)({error:Error(e.message)})});return function(t){let{imageId:r}=t;B.Pq.trigger({component:U.Z,props:{title:"Delete image",message:"Are you sure you want to delete this image?",labels:{cancel:"Cancel",confirm:"Yes, I am sure"},confirmProps:{color:"red",loading:e.isLoading},onConfirm:async()=>await e.mutateAsync({id:r})}})}}(),C=function(){let{mutateAsync:e}=F.SX.image.rescan.useMutation({onSuccess(){(0,M.LX)({message:"Image sent for rescan"})},onError(e){(0,M.s9)({error:Error(e.message),title:"Could not rescan image, please try again"})}});return async function(t){let{imageId:r}=t;e({id:r})}}(),I=function(){let{mutateAsync:e}=F.SX.image.setTosViolation.useMutation({onError(e){(0,M.s9)({error:Error(e.message),title:"Could not report review, please try again"})}});return function(t){let{imageId:r}=t;B.Pq.trigger({component:U.Z,props:{title:"Report ToS Violation",message:"Are you sure you want to remove this image as a Terms of Service violation? The uploader will be notified.",labels:{cancel:"Cancel",confirm:"Yes"},confirmProps:{color:"red"},onConfirm:async()=>{await e({id:r}),H.i.setImage(r,{tosViolation:!0})}}})}}(),z=(0,Z._V)(),{additionalMenuItemsAfter:N,additionalMenuItemsBefore:_}=et();return(0,n.jsxs)(n.Fragment,{children:[null==_?void 0:_(r),s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(V.M,{entityType:"Image",entityId:b}),j&&(0,n.jsx)(P.f,{entityType:X.iA.Image,entityId:b,image:r,currentCosmetic:r.cosmetic})]}),("post"===o||x)&&(0,n.jsx)(R.b,{reason:"add-to-collection",children:(0,n.jsxs)(i.v.Item,{icon:(0,n.jsx)(d.Z,{size:14,stroke:1.5}),onClick:()=>{"post"===o&&x&&(0,q.C)("addToCollection",{postId:x,type:X.yl.Post}),j&&(0,q.C)("addToCollection",{imageId:b,type:X.yl.Image})},children:["Save ",o," to collection"]})}),x&&!O().query.postId&&(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(f.Z,{size:14,stroke:1.5}),onClick:()=>(0,A.NI)({name:"postDetail",state:{postId:x}}),children:"View Post"}),!s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R.b,{reason:"report-content",children:(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(p.Z,{size:14,stroke:1.5}),onClick:()=>(0,T.$B)({entityType:K.Bj.Image,entityId:b}),children:"Report image"})}),(0,n.jsx)(D,{as:"menu-item",imageId:b}),k&&(0,n.jsx)(L.A,{as:"menu-item",userId:k})]}),(s||l)&&(0,n.jsxs)(n.Fragment,{children:[x&&(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(h.Z,{size:14,stroke:1.5}),onClick:()=>O().push("/posts/".concat(x,"/edit")),children:"Edit Post"}),!c&&(0,n.jsx)(i.v.Item,{color:"red",icon:(0,n.jsx)(m.Z,{size:14,stroke:1.5}),onClick:()=>E({imageId:b}),children:"Delete"})]}),null==N?void 0:N(r),a,l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.v.Label,{children:"Moderator"}),(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(g.Z,{size:14,stroke:1.5}),onClick:()=>I({imageId:b}),children:"Remove as TOS Violation"}),(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(v.Z,{size:14,stroke:1.5}),onClick:()=>C({imageId:b}),children:"Rescan Image"}),(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(y.Z,{size:14,stroke:1.5}),onClick:()=>{k&&(u.csamReports?window.open("/moderator/csam/".concat(k,"?imageId=").concat(b),"_blank"):z.mutate({imageIds:[b]}))},children:"Report CSAM"}),x&&(0,n.jsx)(W.b,{entityType:"Post",entityId:x}),!x&&(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(f.Z,{size:14,stroke:1.5}),onClick:()=>(0,A.NI)({name:"imageDetail",state:{imageId:b}}),children:"View image detail"},"view-image-detail")]})]})}function Q(e){let{image:t,isOwner:r,isModerator:o}=e,{needsReview:d,ingestion:f,id:p}=t,{needsReview:h,ingestion:g}=(0,H.L)({id:p,needsReview:d,ingestion:f}),v=F.SX.image.moderate.useMutation();if(!h&&"Blocked"!==g)return null;let E=e=>{o&&(v.mutate({ids:[p],needsReview:"accept"===e?null:void 0,reviewAction:"accept"!==e?e:void 0,reviewType:null!=h?h:"blocked"}),H.i.setImage(p,{needsReview:null,ingestion:"Scanned"}))},O=(0,n.jsx)(a.k,{size:"lg",color:"csam"===h&&o?"red":"yellow",children:"poi"===h?(0,n.jsx)(b.Z,{strokeWidth:2.5,size:26}):(0,n.jsx)(y.Z,{strokeWidth:2.5,size:26})});return h&&"csam"!==h&&o?(0,n.jsxs)(i.v,{position:"bottom",children:[(0,n.jsx)(i.v.Target,{children:(0,n.jsx)(s.x,{style:{cursor:"pointer"},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:O})}),(0,n.jsxs)(i.v.Dropdown,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,n.jsx)(i.v.Item,{onClick:()=>E("accept"),icon:(0,n.jsx)(x.Z,{size:14,stroke:1.5}),children:"Approve"}),"poi"===h&&(0,n.jsx)(i.v.Item,{onClick:()=>E("mistake"),icon:(0,n.jsx)(w.Z,{size:14,stroke:1.5}),children:"Not POI"}),"poi"===h&&(0,n.jsx)(i.v.Item,{onClick:()=>E("removeName"),icon:(0,n.jsx)(S.Z,{size:14,stroke:1.5}),children:"Remove Name"}),(0,n.jsx)(i.v.Item,{onClick:()=>E("delete"),icon:(0,n.jsx)(m.Z,{size:14,stroke:1.5}),children:"Reject"})]})]}):o&&"Blocked"===g?(0,n.jsxs)(i.v,{position:"bottom",children:[(0,n.jsx)(i.v.Target,{children:(0,n.jsx)(s.x,{style:{cursor:"pointer"},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsx)(a.k,{size:"lg",color:"yellow",children:(0,n.jsx)(k.Z,{strokeWidth:2.5,size:20})})})}),(0,n.jsx)(i.v.Dropdown,{children:(0,n.jsx)(i.v.Item,{onClick:()=>E("accept"),icon:(0,n.jsx)(j.Z,{size:14,stroke:1.5}),children:"Restore"})})]}):(0,n.jsxs)(l.z,{width:200,withArrow:!0,children:[(0,n.jsx)(l.z.Target,{children:O}),(0,n.jsx)(l.z.Dropdown,{p:8,children:(0,n.jsxs)(c.K,{spacing:0,children:[(0,n.jsx)(u.x,{weight:"bold",size:"xs",children:"Flagged for review"}),(0,n.jsx)(u.x,{size:"xs",children:"This image won't be visible to other users until it's reviewed by our moderators."})]})})]})}let ee=(0,C.createContext)({}),et=()=>(0,C.useContext)(ee);function er(e){let{children:t,...r}=e;return(0,n.jsx)(ee.Provider,{value:r,children:t})}},19649:function(e,t,r){"use strict";r.d(t,{J:function(){return m}});var n=r(85893),i=r(67841),o=r(95117),a=r(17789),s=r(49834),l=r(54777),c=r(93476),u=r(10989),d=r(72456);r(67294);var f=r(48600),p=r(65057);let h={comfy:"Workflow",cfgScale:"Guidance",steps:"Steps",sampler:"Sampler",seed:"Seed",clipSkip:"Clip skip"};function m(e){var t;let{imageId:r}=e,{data:m}=d.SX.image.getGenerationData.useQuery({id:r}),{meta:g,resources:v=[],onSite:y,process:b}=null!=m?m:{},x=(0,p.jr)(v);if(!g)return null;let{comfy:w}=g,S=null!==(t=g.software)&&void 0!==t?t:y?"Civitai Generator":"External Generator";function k(e){return g?"comfy"===e?w?(0,n.jsx)(u.q,{value:()=>JSON.stringify(w.workflow),children:e=>{let{copy:t,copied:r,Icon:o,color:a}=e;return(0,n.jsxs)(i.z,{color:a,size:"xs",compact:!0,className:"rounded-lg",classNames:{label:"flex items-center gap-1"},onClick:t,children:[r?"Copied":"Nodes",(0,n.jsx)(o,{size:16})]})}}):null:(0,n.jsx)("span",{children:g[e]}):null}let{prompt:j,negativePrompt:E,...O}=g,C=function(){var e,t;if(!m)return[];if("image"===m.type){let e;let t=(e=[],"Flux1"===x&&(e=["clipSkip","sampler"]),e.length?Object.entries(O).reduce((t,r)=>{let[n,i]=r;return e.includes(n)?t:{...t,[n]:i}},{}):O);return Object.entries(h).filter(e=>{let[r]=e;return t[r]}).map(e=>{let[t,r]=e,n=k(t);return n?{label:r,content:n}:null}).filter(f.$K)}if("video"!==m.type)return[];{let r=p.M2.find(e=>e.key===g.workflow);return r&&null!==(t=null===(e=r.metadataDisplayProps)||void 0===e?void 0:e.map(e=>({label:e,content:k(e)})))&&void 0!==t?t:[]}}(),I=!!C.length;return(0,n.jsxs)(n.Fragment,{children:[j?(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,n.jsx)(o.x,{className:"text-lg font-semibold",children:"Prompt"}),(0,n.jsx)(a.C,{size:"xs",radius:"sm",children:S}),(0,n.jsx)(a.C,{size:"xs",radius:"sm",children:b})]}),(0,n.jsx)(u.q,{value:j,children:e=>{let{copy:t,Icon:r,color:i}=e;return(0,n.jsx)(s.A,{onClick:t,color:i,children:(0,n.jsx)(r,{size:16})})}})]}),(0,n.jsx)(c.x,{color:"dimmed",className:"text-sm",children:j})]}):(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)(a.C,{size:"xs",radius:"sm",children:S}),(0,n.jsx)(a.C,{size:"xs",radius:"sm",children:b})]}),E&&(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(o.x,{className:"font-semibold",children:"Negative prompt"}),(0,n.jsx)(u.q,{value:E,children:e=>{let{copy:t,Icon:r,color:i}=e;return(0,n.jsx)(s.A,{onClick:t,color:i,children:(0,n.jsx)(r,{size:16})})}})]}),(0,n.jsx)(c.x,{color:"dimmed",className:"text-sm",children:E})]}),I&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.i,{}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsx)(o.x,{className:"font-semibold",children:"Other metadata"})}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:C.map(e=>{let{label:t,content:r}=e;return(0,n.jsxs)(a.C,{classNames:{inner:"flex gap-1 items-center leading-snug"},children:[(0,n.jsxs)("span",{children:[t,":"]}),r]},t)})})]})]})]})}},49926:function(e,t,r){"use strict";r.d(t,{R:function(){return _}});var n=r(85893),i=r(67294),o=r(56817),a=r(14821),s=r(67841),l=r(71232),c=r(97564),u=r(54777),d=r(64002),f=r(49834),p=r(7001),h=r(40633),m=r(73723),g=r(21997),v=r(81811),y=r(60136),b=r(52289),x=r(43597),w=r(39419),S=r(72456);function k(e){let{value:t,onChange:r,placeholder:i="select..."}=e,{data:o=[],isLoading:a}=S.SX.technique.getAll.useQuery();return(0,n.jsx)(w.y$,{value:t,onChange:r,loading:a,placeholder:i,data:o.map(e=>{let{id:t,name:r}=e;return{value:t,label:r}}),searchable:!0,clearable:!0})}var j=r(62220),E=r(17578),O=r(97755),C=r(10558),I=r(38394),P=r(38498),A=r(35818),T=r(81447),z=r(27943);let N=Object.values(A.DD).filter(e=>"image"===e||"video"===e),R=(0,o.k)(e=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}},opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"},actionButton:{[T.D.smallerThan("sm")]:{width:"100%"}},indicatorRoot:{lineHeight:1},indicatorIndicator:{lineHeight:1.6}}));function _(e){var t,r,o,w,S,T,_,M,D,L;let{query:F,onChange:U,isFeed:B,filterType:H="images",hideBaseModels:Z=!1,hideMediaTypes:W=!1,hideTools:V=!1,...$}=e,{classes:q,theme:G,cx:K}=R(),X=(0,C.d)(),J=(0,O.Z)(),Y=(0,E.xJ)(),Q=null==Y?void 0:Y.isModerator,[ee,et]=(0,i.useState)(!1),[er,en]=(0,g._)({key:"image-filter-truncate-base-models",defaultValue:!1}),{filters:ei,setFilters:eo}=(0,I.PH)(e=>({filters:e[H],setFilters:"images"===H?e.setImageFilters:"videos"===H?e.setVideoFilters:e.setModelImageFilters})),ea=F||ei,es=er?P.Bj.filter((e,t)=>{var r;return t<3||(null===(r=ea.baseModels)||void 0===r?void 0:r.includes(e))}):P.Bj,el=("types"in ea&&!W&&null!==(S=null===(t=ea.types)||void 0===t?void 0:t.length)&&void 0!==S?S:0)+(ea.withMeta?1:0)+(ea.hidden?1:0)+(ea.fromPlatform?1:0)+(ea.hideManualResources?1:0)+(ea.hideAutoResources?1:0)+(ea.notPublished?1:0)+(ea.scheduled?1:0)+((null===(r=ea.tools)||void 0===r?void 0:r.length)?1:0)+((null===(o=ea.techniques)||void 0===o?void 0:o.length)?1:0)+(ea.period&&ea.period!==A.Tz.AllTime?1:0)+(Z?0:null!==(T=null===(w=ea.baseModels)||void 0===w?void 0:w.length)&&void 0!==T?T:0)+(ea.remixesOnly||ea.nonRemixesOnly?1:0),ec=(0,i.useCallback)(()=>{let e={types:void 0,withMeta:!1,hidden:!1,fromPlatform:!1,notPublished:!1,scheduled:!1,hideManualResources:!1,hideAutoResources:!1,tools:[],techniques:[],period:A.Tz.AllTime,baseModels:[],remixesOnly:!1,nonRemixesOnly:!1};U?U(e):eo(e)},[U,eo]),eu={size:"sm",radius:"xl",variant:"filled",classNames:q,tt:"capitalize"},ed=e=>{U?U(e):eo(e)},ef=(0,n.jsx)(a.z,{offset:4,label:J&&el?el:void 0,size:16,zIndex:10,showZero:!1,dot:!1,classNames:{root:q.indicatorRoot,indicator:q.indicatorIndicator},inline:!0,children:(0,n.jsx)(s.z,{className:q.actionButton,color:"gray",radius:"xl",variant:"dark"===G.colorScheme?"filled":"light",rightIcon:(0,n.jsx)(v.Z,{className:K({[q.opened]:ee}),size:16}),...$,onClick:()=>et(e=>!e),"data-expanded":ee,children:(0,n.jsxs)(l.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(y.Z,{size:16}),"Filters"]})})}),ep=(0,n.jsxs)(c.K,{spacing:"lg",p:"md",children:[(0,n.jsxs)(c.K,{spacing:"md",children:[(0,n.jsx)(u.i,{label:"Time period",labelProps:{weight:"bold",size:"sm"}}),(null==F?void 0:F.period)&&U?(0,n.jsx)(x.q,{type:H,variant:"chips",value:F.period,onChange:e=>U({period:e})}):(0,n.jsx)(x.q,{type:H,variant:"chips"})]}),!Z&&(0,n.jsxs)(c.K,{spacing:"md",children:[(0,n.jsx)(u.i,{label:"Base model",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsxs)(d.A.Group,{spacing:8,value:null!==(_=ea.baseModels)&&void 0!==_?_:[],onChange:e=>ed({baseModels:e}),multiple:!0,my:4,children:[es.map((e,t)=>(0,n.jsx)(d.A,{value:e,...eu,children:(0,n.jsx)("span",{children:e})},t)),P.Bj.length>3&&(0,n.jsx)(f.A,{variant:"transparent",size:"sm",onClick:()=>en(e=>!e),children:er?(0,n.jsx)(v.Z,{strokeWidth:3}):(0,n.jsx)(b.Z,{strokeWidth:3})})]})]}),(0,n.jsxs)(c.K,{spacing:"md",children:[!W&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.i,{label:"Media type",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(d.A.Group,{spacing:8,value:null!==(M=ea.types)&&void 0!==M?M:[],onChange:e=>ed({types:e}),multiple:!0,children:N.map((e,t)=>(0,i.createElement)(d.A,{...eu,key:t,value:e},(0,n.jsx)("span",{children:(0,z.Gf)(e)})))})]}),(0,n.jsx)(u.i,{label:"Modifiers",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(d.A,{...eu,checked:ea.withMeta,onChange:e=>ed({withMeta:e}),children:(0,n.jsx)("span",{children:"Metadata only"})}),B&&Y&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(d.A,{...eu,checked:ea.hidden,onChange:e=>ed({hidden:e}),children:(0,n.jsx)("span",{children:"Hidden"})})}),(0,n.jsx)(d.A,{...eu,checked:ea.fromPlatform,onChange:e=>ed({fromPlatform:e}),children:(0,n.jsx)("span",{children:"Made On-site"})}),(0,n.jsx)(d.A,{...eu,checked:ea.nonRemixesOnly,onChange:e=>{ed({nonRemixesOnly:e,remixesOnly:!e&&void 0})},children:(0,n.jsx)("span",{children:"Originals Only"})}),(0,n.jsx)(d.A,{...eu,checked:ea.remixesOnly,onChange:e=>ed({remixesOnly:e,nonRemixesOnly:!e&&void 0}),children:(0,n.jsx)("span",{children:"Remixes Only"})})]}),"modelImages"===H&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.i,{label:"Resources",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.A,{...eu,checked:ea.hideManualResources,onChange:e=>ed({hideManualResources:e}),children:(0,n.jsx)("span",{children:"Hide manually-added"})}),(0,n.jsx)(d.A,{...eu,checked:ea.hideAutoResources,onChange:e=>ed({hideAutoResources:e}),children:(0,n.jsx)("span",{children:"Hide auto-detected"})})]})]}),Q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.i,{label:"Moderator",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.A,{...eu,checked:ea.notPublished,onChange:e=>ed({notPublished:e}),children:(0,n.jsx)("span",{children:"Not Published"})}),(0,n.jsx)(d.A,{...eu,checked:ea.scheduled,onChange:e=>ed({scheduled:e}),children:(0,n.jsx)("span",{children:"Scheduled"})})]})]}),!V&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.i,{label:"Tools",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(j.O,{value:null!==(D=ea.tools)&&void 0!==D?D:[],onChange:e=>ed({tools:e}),placeholder:"Created with..."})]}),(0,n.jsx)(u.i,{label:"Techniques",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(k,{value:null!==(L=ea.techniques)&&void 0!==L?L:[],onChange:e=>ed({techniques:e}),placeholder:"Created with..."})]}),el>0&&(0,n.jsx)(s.z,{color:"gray",variant:"dark"===G.colorScheme?"filled":"light",onClick:ec,fullWidth:!0,children:"Clear all filters"})]});return X?(0,n.jsxs)(n.Fragment,{children:[ef,(0,n.jsx)(p.d,{opened:ee,onClose:()=>et(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--header-height))",overflowY:"auto"},body:{padding:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:ep})]}):(0,n.jsxs)(h.J,{zIndex:200,position:"bottom-end",shadow:"md",radius:12,onClose:()=>et(!1),middlewares:{flip:!0,shift:!0},withinPortal:!0,children:[(0,n.jsx)(h.J.Target,{children:ef}),(0,n.jsx)(h.J.Dropdown,{maw:468,p:0,w:"100%",children:(0,n.jsx)(m.x.Autosize,{type:"hover",maxHeight:"calc(90vh - var(--header-height) - 56px)",children:ep})})]})}},39164:function(e,t,r){"use strict";r.d(t,{K:function(){return u}});var n=r(85893),i=r(21955),o=(0,i.Z)("outline","sitemap","IconSitemap",[["path",{d:"M3 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M15 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M12 9l0 3",key:"svg-4"}]]),a=(0,i.Z)("outline","hierarchy","IconHierarchy",[["path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5",key:"svg-3"}],["path",{d:"M12 7l0 6",key:"svg-4"}]]),s=r(90512),l=r(53722),c=r.n(l);function u(e){let{isRemix:t}=e;return(0,n.jsxs)("div",{className:(0,s.Z)(c().indicator,{[c().remix]:t}),title:t?"Remixed from another image":"Created on Civitai",children:[!t&&(0,n.jsx)(o,{size:14,strokeWidth:2}),t&&(0,n.jsx)(a,{size:14,strokeWidth:2})]})}},24121:function(e,t,r){"use strict";r.d(t,{C:function(){return j}});var n=r(85893),i=r(21017),o=r(54777),a=r(67841),s=r(10989),l=r(72456),c=r(48305),u=r(67294),d=r(75247),f=r(49824),p=r(2459),h=r(14840),m=r(18030),g=r(71327);let v=(0,f.yV)(function(e,t){var r;let n=(0,g.B)(),{disabled:i=n||!1,autoFocus:o=!1,...a}=e,{isFocusVisible:s,focusProps:l}=(0,p.F)({autoFocus:o}),{isHovered:c,hoverProps:d}=(0,h.XI)({isDisabled:i}),{pressed:v,pressProps:y}=(0,m.x)({disabled:i}),b=(0,f.dG)({ref:t,type:null!=(r=a.type)?r:"button",disabled:i||void 0,autoFocus:o},l,d,y),x=(0,u.useMemo)(()=>({disabled:i,hover:c,focus:s,active:v,autofocus:o}),[i,c,s,v,o]);return(0,f.L6)()({ourProps:b,theirProps:a,slot:x,defaultTag:"button",name:"Button"})}),y=(0,f.yV)(function(e,t){let r=(0,d.$)();return u.createElement(v,{ref:t,...(0,f.dG)({onClick:r},e)})});var b=r(90693),x=r(3153),w=r(8449),S=r(19649),k=r(76705);function j(e){let{imageId:t,children:r,type:o}=e;return(0,k.O)()?(0,n.jsxs)(c.J2,{className:"relative flex items-center",children:[(0,n.jsx)(c.O7,{children:r}),(0,n.jsx)(c.Hi,{className:"z-[500]",anchor:"top end",onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsx)(i.Z,{withBorder:!0,className:"flex w-96 max-w-full flex-col gap-3 rounded-xl",children:(0,n.jsx)(O,{imageId:t})})})]}):r}let E={size:"xs",variant:"light",classNames:{inner:"flex gap-1"}};function O(e){let{imageId:t}=e,{data:r,isLoading:i}=l.SX.image.getGenerationData.useQuery({id:t});if(i){let e=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"h-3 w-32 rounded-full bg-gray-200 dark:bg-gray-700"}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[[,,,].fill(0).map((e,t)=>(0,n.jsx)("div",{className:"h-2.5 rounded-full bg-gray-200 dark:bg-gray-700"},t)),(0,n.jsx)("div",{className:"h-2.5 w-56 rounded-full bg-gray-200 dark:bg-gray-700"})]})]});return(0,n.jsxs)("div",{className:"flex animate-pulse flex-col gap-3",children:[e,(0,n.jsx)(o.i,{}),e]})}let{meta:c,canRemix:u,type:d="image"}=null!=r?r:{};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.J,{imageId:t}),(0,n.jsxs)(a.z.Group,{children:[u&&(0,n.jsxs)(y,{as:a.z,...E,"data-activity":"remix:image-meta",onClick:()=>{x.Ft.open({type:d,id:null!=t?t:0})},className:"flex-1",children:[(0,n.jsx)(b.Z,{size:16}),"Remix"]}),c&&(0,n.jsx)(s.q,{value:()=>(0,w.qK)(c),children:e=>{let{copy:t,copied:r,color:i,Icon:o}=e;return(0,n.jsxs)(a.z,{...E,onClick:t,color:i,children:[(0,n.jsx)(o,{size:16}),!u&&(r?"Copied":"Copy Generation Data")]})}})]})]})}},24480:function(e,t,r){"use strict";r.d(t,{Z:function(){return a},q:function(){return s}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null),a=()=>(0,i.useContext)(o)||{};function s(e){let{children:t,...r}=e;return(0,n.jsx)(o.Provider,{value:r,children:t})}},81644:function(e,t,r){"use strict";r.d(t,{G6:function(){return S},LD:function(){return w},QM:function(){return k},XQ:function(){return j},_V:function(){return O},d:function(){return C},lL:function(){return x}});var n=r(25963),i=r(9585),o=r(77446),a=r(67294),s=r(1604),l=r(36061),c=r(80937),u=r(38394),d=r(38498),f=r(32957),p=r(32760),h=r(35818),m=r(2807),g=r(14619),v=r(27943),y=r(72456),b=r(25291);let x=s.z.object({baseModels:s.z.union([s.z.enum(d._G.baseModels).array(),s.z.enum(d._G.baseModels)]).transform(e=>Array.isArray(e)?e:[e]).optional(),collectionId:(0,b.Cz)(),collectionTagId:(0,b.Cz)(),hideAutoResources:(0,b.rK)(),hideManualResources:(0,b.rK)(),followed:(0,b.rK)(),fromPlatform:(0,b.rK)(),hidden:(0,b.rK)(),limit:(0,b.Cz)(),modelId:(0,b.Cz)(),modelVersionId:(0,b.Cz)(),notPublished:(0,b.rK)(),period:s.z.nativeEnum(h.Tz),periodMode:p.XY,postId:(0,b.Cz)(),prioritizedUserIds:(0,b.RV)(),reactions:s.z.preprocess(e=>Array.isArray(e)?e:[e],s.z.array(s.z.nativeEnum(h.BE))),scheduled:(0,b.rK)(),section:s.z.enum(["images","reactions"]),sort:s.z.nativeEnum(f.FA),tags:(0,b.RV)(),techniques:(0,b.RV)(),tools:(0,b.RV)(),types:s.z.union([s.z.array(s.z.nativeEnum(h.DD)),s.z.nativeEnum(h.DD)]).transform(e=>Array.isArray(e)?e:[e]).optional(),useIndex:(0,b.rK)().nullish(),userId:(0,b.Cz)(),username:s.z.coerce.string().transform(v.Bm),view:s.z.enum(["categories","feed"]),withMeta:(0,b.rK)(),remixOfId:(0,b.Cz)()}).partial(),w=()=>(0,c.s)(x),S=e=>{let t=(0,u.PH)(t=>t[e]),{query:r}=w();return(0,g.HO)({...t,...r})},k=e=>{let[t,r]=(0,a.useState)(null!=e?e:{}),n=!(0,o.Z)(t,e);return{filters:{...t},setFilters:r,filtersUpdated:n}},j=(e,t)=>{let{applyHiddenPreferences:r=!0,...n}=null!=t?t:{};null!=e||(e={});let{data:i,isLoading:o,...s}=y.SX.image.getInfinite.useInfiniteQuery({...e},{getNextPageParam:e=>e.nextCursor,trpc:{context:{skipBatch:!0}},...n}),c=(0,a.useMemo)(()=>null==i?void 0:i.pages.flatMap(e=>e?e.items:[]),[i]),{items:u,loadingPreferences:d,hiddenCount:f}=(0,l.f)({type:"images",data:c,showHidden:!!e.hidden,disabled:!r,isRefetching:s.isRefetching});return{data:i,flatData:c,images:u,removedImages:f,fetchedImages:null==c?void 0:c.length,isLoading:o||d,...s}},E="sending-report";function O(e){let{onMutate:t,onSuccess:r,onError:o,onSettled:a,...s}=null!=e?e:{},{mutateAsync:l,...c}=y.SX.image.reportCsamImages.useMutation({async onMutate(){for(var e=arguments.length,r=Array(e),n=0;n1?r-1:0),i=1;i{(0,n._5)({modalId:"confirm-csam",title:"Report CSAM",children:"Are you sure you want to report this as CSAM?",centered:!0,labels:{confirm:"Yes",cancel:"Cancel"},confirmProps:{color:"red",loading:c.isLoading},closeOnConfirm:!1,onConfirm:()=>c.mutate(e)})}}}let C=(e,t)=>{var r,n;let{data:i,...o}=y.SX.image.getContestCollectionDetails.useQuery({...e},{...t});return{collectionItems:null!==(r=null==i?void 0:i.collectionItems)&&void 0!==r?r:[],post:null!==(n=null==i?void 0:i.post)&&void 0!==n?n:null,...o}}},29020:function(e,t,r){"use strict";r.d(t,{L:function(){return l},s:function(){return s}});var n=r(1604),i=r(86628),o=r(38498),a=r(35818);let s={[i.L[0]]:"Relevance",[i.L[1]]:"Popularity",[i.L[7]]:"Newest"},l=n.z.object({hasLabels:n.z.boolean().nullable(),labelType:n.z.enum(o._G.autoLabel.labelTypes).nullable(),statuses:n.z.array(n.z.nativeEnum(a.RE)),types:n.z.array(n.z.enum(o._G.trainingModelTypes)),baseModels:n.z.array(n.z.enum(o._G.baseModels))})},42381:function(e,t,r){"use strict";r.d(t,{cQ:function(){return O},i8:function(){return E},mO:function(){return j},VY:function(){return x},Av:function(){return w},Db:function(){return b},f$:function(){return k},In:function(){return T},bb:function(){return C}});var n=r(93431);class i{get operations(){return this._operations}addOperation(e){let t={op:e.op,path:"/".concat(e.path),from:e.from?"/".concat(e.from):void 0,value:e.value instanceof Date?e.value.toJSON():e.value};this._operations.push(t)}constructor(){this._operations=[]}}var o=r(16058),a=r(12902),s=r(28425),l=r(67294),c=r(40893),u=r(72456),d=r(17578),f=r(38394),p=r(32957),h=r(65057),m=r(85625),g=r(2807),v=r(14619);function y(e){let{step:t,tags:r}=e;return t.images.filter(e=>{var n,i;let{id:o}=e,a=null===(i=t.metadata)||void 0===i?void 0:null===(n=i.images)||void 0===n?void 0:n[o];return!((null==a?void 0:a.hidden)||(null==r?void 0:r.includes(h.cE.FAVORITE))&&!(null==a?void 0:a.favorite)||(null==r?void 0:r.includes(h.cE.FEEDBACK.LIKED))&&(null==a?void 0:a.feedback)!=="liked"||(null==r?void 0:r.includes(h.cE.FEEDBACK.DISLIKED))&&(null==a?void 0:a.feedback)!=="disliked")})}function b(){let e=u.SX.useUtils();return function(){e.orchestrator.getImageWhatIf.invalidate()}}function x(e,t){var r,n;let i=(0,d.xJ)(),o=(0,f.PH)(e=>e.markers),a=(0,l.useMemo)(()=>{switch(o.marker){case p.QZ.Favorited:return[h.cE.FAVORITE];case p.QZ.Liked:return[h.cE.FEEDBACK.LIKED];case p.QZ.Disliked:return[h.cE.FEEDBACK.DISLIKED];default:return[]}},[o.marker]),{data:s,...c}=u.SX.orchestrator.queryGeneratedImages.useInfiniteQuery({...e,tags:[h.cE.GENERATION,...(null==t?void 0:t.includeTags)===!1?[]:[...a,...null!==(r=o.tags)&&void 0!==r?r:[]],...null!==(n=null==e?void 0:e.tags)&&void 0!==n?n:[]]},{getNextPageParam:e=>e?e.nextCursor:0,enabled:!!i&&(null==t?void 0:t.enabled)}),m=(0,l.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.pages.flatMap(e=>{var t;return(null!==(t=e.items)&&void 0!==t?t:[]).filter(e=>!(a.length&&e.tags.every(e=>!a.includes(e)))).map(e=>{let t=e.steps.map(e=>{let t=y({step:e,tags:a}).sort((e,t)=>t.completed?e.completed?t.completed.getTime()-e.completed.getTime():-1:1);return{...e,images:t}});return{...e,steps:t}})}))&&void 0!==e?e:[]},[s]),g=(0,l.useMemo)(()=>m.flatMap(e=>e.steps),[m]),v=(0,l.useMemo)(()=>g.flatMap(e=>y({step:e,tags:a})),[g]);return{data:m,steps:g,images:v,...c}}function w(e){let{data:t,steps:r,...n}=x(e);return{requests:t,steps:r,...n}}function S(e){let t=(0,o.Ol)(u.SX.orchestrator.queryGeneratedImages);u.Eh.setQueriesData({queryKey:t,exact:!1},t=>(0,a.ZP)(t,t=>{t&&e(t)}))}function k(){return u.SX.orchestrator.generateImage.useMutation({onSuccess:(e,t)=>{S(t=>{t.pages[0].items.unshift(e)}),z()},onError:e=>{var t;(0,g.s9)({title:"Failed to generate",error:Error(e.message),reason:null!==(t=e.message)&&void 0!==t?t:"An unexpected error occurred. Please try again later."})}})}function j(){return u.SX.orchestrator.generate.useMutation({onSuccess:e=>{S(t=>{t.pages[0].items.unshift(e)}),z()}})}function E(){return u.SX.orchestrator.deleteWorkflow.useMutation({onSuccess:(e,t)=>{let{workflowId:r}=t;S(e=>{for(let t of e.pages){let e=t.items.findIndex(e=>e.id===r);e>-1&&t.items.splice(e,1)}})},onError:e=>{(0,g.s9)({title:"Error deleting request",error:Error(e.message)})}})}function O(){return u.SX.orchestrator.cancelWorkflow.useMutation({onError:e=>{(0,g.s9)({title:"Error cancelling request",error:Error(e.message)})}})}function C(e){let t=(0,o.Ol)(u.SX.orchestrator.queryGeneratedImages),{mutate:r,isLoading:l}=u.SX.orchestrator.patch.useMutation();return{updateImages:function(l,c){var d,f,p,m,g,y;let b=u.Eh.getQueriesData({queryKey:t,exact:!1}),x=[];e:for(let[,e]of b)for(let t of null!==(d=null==e?void 0:e.pages)&&void 0!==d?d:[])for(let e of t.items)if(l.find(t=>t.workflowId===e.id)&&x.push(e),x.length===l.length)break e;let w=[],S=[],k=[],j=[],E=[];for(let e of x){let t=l.find(t=>t.workflowId===e.id);if(!t)continue;let{workflowId:r,stepName:o,images:a}=t;for(let l of e.steps){if(l.name!==o)continue;let c=null!==(f=l.metadata)&&void 0!==f?f:{},u=new i;for(let e in c.images||u.addOperation({op:"add",path:"images",value:{}}),a){(null===(p=c.images)||void 0===p?void 0:p[e])||u.addOperation({op:"add",path:"images/".concat(e),value:{}});let r=null!==(g=null===(m=c.images)||void 0===m?void 0:m[e])&&void 0!==g?g:{},{hidden:n,feedback:i,comments:o,postId:a,favorite:s}=t.images[e];n&&u.addOperation({op:"add",path:"images/".concat(e,"/hidden"),value:!0}),i&&u.addOperation({op:i!==r.feedback?"add":"remove",path:"images/".concat(e,"/feedback"),value:i}),o&&u.addOperation({op:"add",path:"images/".concat(e,"/comments"),value:o}),a&&u.addOperation({op:"add",path:"images/".concat(e,"/postId"),value:a}),void 0!==s&&u.addOperation({op:s?"add":"remove",path:"images/".concat(e,"/favorite"),value:!0})}let d=(0,s.Z)(c,5);(0,n.af)(d,u.operations);let b=null!==(y=d.images)&&void 0!==y?y:{},x=Object.values(b).filter(e=>e.hidden).length;if(l.images.length===x)E.push(e.id);else{let t=(0,v.HO)(b);k.push({workflowId:r,stepName:o,images:t});let n=e.tags.includes(h.cE.FAVORITE),i=e.tags.includes(h.cE.FEEDBACK.LIKED),a=e.tags.includes(h.cE.FEEDBACK.DISLIKED),s=Object.values(t).some(e=>e.favorite),l=Object.values(t).some(e=>"liked"===e.feedback),c=Object.values(t).some(e=>"disliked"===e.feedback);n&&!s?j.push({workflowId:r,tag:h.cE.FAVORITE,op:"remove"}):!n&&s&&j.push({workflowId:r,tag:h.cE.FAVORITE,op:"add"}),i&&!l?j.push({workflowId:r,tag:h.cE.FEEDBACK.LIKED,op:"remove"}):!i&&l&&j.push({workflowId:r,tag:h.cE.FEEDBACK.LIKED,op:"add"}),a&&!c?j.push({workflowId:r,tag:h.cE.FEEDBACK.DISLIKED,op:"remove"}):!a&&c&&j.push({workflowId:r,tag:h.cE.FEEDBACK.DISLIKED,op:"add"}),S.push({workflowId:r,stepName:o,patches:u.operations})}}}r({workflows:w.length?w:void 0,steps:S.length?S:void 0,remove:E.length?E:void 0,tags:j.length?j:void 0},{onSuccess:()=>{var r,n;for(let e of(n=e=>{for(let r of e.pages)for(let e of(r.items=r.items.filter(e=>!E.includes(e.id)),r.items)){let r=j.find(t=>t.workflowId===e.id&&"add"===t.op),n=j.find(t=>t.workflowId===e.id&&"remove"===t.op);r&&e.tags.push(r.tag),n&&(e.tags=e.tags.filter(e=>e!==n.tag));let i=k.filter(t=>t.workflowId===e.id);if(i.length)for(let r of e.steps){var t;let e=null===(t=i.find(e=>e.stepName===r.name))||void 0===t?void 0:t.images;e&&(r.metadata={...r.metadata,images:e})}}},u.Eh.setQueriesData({queryKey:t,exact:!1},e=>(0,a.ZP)(e,e=>{e&&n(e)})),[...new Set(j.filter(e=>"add"===e.op).map(e=>e.tag))])){let t=(0,o.Ol)(u.SX.orchestrator.queryGeneratedImages,{tags:[e]});u.Eh.invalidateQueries(t,{exact:!1})}null==e||null===(r=e.onSuccess)||void 0===r||r.call(e)},onError:c})},isLoading:l}}let I=(0,m.Ot)(100),P={},A={};function T(){return(0,c.Df)(p.m.TextToImageUpdate,e=>{"job"===e.$type&&e.jobId?P[e.jobId]={...e,completed:new Date}:"workflow"===e.$type&&e.workflowId&&(A[e.workflowId]=e),I(()=>z())})}function z(){Object.keys(P).length&&S(e=>{for(let n of e.pages)for(let e of n.items){if(!Object.keys(P).length&&!Object.keys(A).length)return;let n=A[e.id];for(let i of(n&&(e.status=n.status,e.status===A[e.id].status&&delete A[e.id]),e.steps)){let e=[...new Set(i.images.map(e=>e.jobId))];for(let n of Object.keys(P).filter(t=>e.includes(t))){let e=P[n];if(!e)continue;let{status:o}=e;for(let o of i.images.filter(e=>e.jobId===n))if(o.status=e.status,o.completed=e.completed,"video"===o.type){var t,r;o.progress=null!==(t=e.progress)&&void 0!==t?t:0,o.reason=null!==(r=o.reason)&&void 0!==r?r:e.reason}if(o===P[n].status&&(delete P[n],!Object.keys(P).length))break}}}})}},49987:function(e,t,r){"use strict";r.d(t,{SY:function(){return R},kL:function(){return z},tc:function(){return M}});var n=r(85893),i=r(95117),o=r(17789),a=r(67841),s=r(74403),l=r(97118),c=r(71033),u=r(11163),d=r.n(u),f=r(67294),p=r(73445),h=r(42597),m=r(76326),g=r(61119),v=r(17578),y=r(38498),b=r(32957),x=r(54671),w=r(7379),S=r(58716),k=r(42956),j=r.n(k),E=r(90512),O=r(58456);let C=(0,p.Ue)(()=>({})),I=(0,p.Ue)(()=>({})),P=(0,p.Ue)(()=>0),A=(0,f.createContext)(null);function T(e){var t,r;let{image:n,connectId:i,connectType:o}=e,a=(0,v.xJ)(),{blurLevels:s}=(0,O.NV)(),l=I((0,f.useCallback)(e=>e[n.id],[n.id])),c=function(e){let{connectId:t,connectType:r}=e;return t&&r?"".concat(t,"_").concat(r):null}({connectType:o,connectId:i}),{nsfwLevel:u=0,...d}=(0,S.L)(n),p=w.v.hasFlag(s,u),h=C((0,f.useCallback)(e=>c?e[c]:void 0,[c])),m=null!==(r=n.userId)&&void 0!==r?r:null===(t=n.user)||void 0===t?void 0:t.id,g=!u&&((null==a?void 0:a.isModerator)||m===(null==a?void 0:a.id)),y=w.v.hasFlag(x.V,u),b=!y||!(p&&!g);return{safe:b,show:b||(null!=h?h:l),browsingLevel:u,imageId:n.id,key:c,nsfw:y,userId:m,...d}}function z(e){let{image:t,children:r,explain:i=!0,inView:o,...a}=e,s=T({image:t,...a}),{show:l,browsingLevel:c,tosViolation:u}=s;return(0,n.jsx)(A.Provider,{value:s,children:(0,n.jsx)(N,{show:l,browsingLevel:c,tosViolation:u,explain:i,inView:o,children:r(l)})})}function N(e){let{show:t,explain:r,browsingLevel:l,tosViolation:c,children:u,inView:d}=e;return(0,n.jsxs)(n.Fragment,{children:[(void 0===d||d)&&!t&&r&&(0,n.jsx)(_,{children:e=>(0,n.jsxs)("div",{className:"pointer-events-none absolute left-1/2 top-1/2 z-20 flex -translate-x-1/2 -translate-y-[60%] flex-col items-center gap-2 text-white",children:[(0,n.jsx)(i.x,{size:"sm",className:"shadow-black/50 text-shadow-sm",children:"This image is rated"}),(0,n.jsx)(o.C,{color:"red",size:"xl",classNames:{root:D(j().root,l)},className:"min-w-[32px] text-center shadow shadow-black/30",children:x.vU[l]}),(0,n.jsx)(a.z,{className:"pointer-events-auto",onClick:e,radius:"xl",sx:e=>({color:"dark"===e.colorScheme?e.white:e.colors.gray[9],backgroundColor:e.fn.rgba("dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],.6),boxShadow:e.shadows.sm,"&:hover":{backgroundColor:e.fn.rgba("dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],.7)}}),children:"Show"})]})}),c?(0,n.jsx)("div",{className:"flex size-full items-center justify-center",children:(0,n.jsx)(s.b,{color:"red",children:"TOS Violation"})}):u]})}function R(e){var t;let{browsingLevel:r,className:i,sfwClassName:a,nsfwClassName:s,...l}=e,c=w.v.hasFlag(x.V,null!=r?r:b.Sh.XXX),u=(0,E.Z)(i,{[a||""]:!c,[s||""]:c});return(0,n.jsx)(o.C,{classNames:{root:D(j().root,r)},className:u,...l,children:null!==(t=x.vU[r])&&void 0!==t?t:"?"})}function _(e){let{className:t,classNames:r,children:a,sfwClassName:s,nsfwClassName:u,color:p,alwaysVisible:b,...w}=e,S=(0,v.xJ)(),{safe:k,show:O,browsingLevel:T,imageId:z,key:N,nsfw:R,userId:_}=function(){let e=(0,f.useContext)(A);if(!e)throw Error("missing ImageGuardProvider");return e}(),M=e=>(function(e){let{event:t,isAuthed:r,key:o,imageId:a}=e;t.preventDefault(),t.stopPropagation();let s=P.getState()>=y._G.imageGuard.noAccountLimit;!r&&s&&g.Pq.trigger({id:"limited-toggle-modal",component:h.Z,props:{message:(0,n.jsx)(i.x,{size:"sm",weight:500,sx:{flex:1},children:"Login now to continue viewing mature content and unblur everything."}),onConfirm:()=>d().push("/login?returnUrl=".concat(d().asPath,"&reason=blur-toggle")),labels:{cancel:"Cancel",confirm:"Continue"}}}),s||(o?C.setState(e=>({[o]:!e[o]})):I.setState(e=>({[a]:!e[a]}))),r||P.setState(e=>e+1)})({event:e,isAuthed:!!S,key:N,imageId:z});if(a)return a(M);if(!T)return null;let L=(0,E.Z)(t,{[s||""]:!R,[u||""]:R});if(k){let e=(null==S?void 0:S.isModerator)||_&&(null==S?void 0:S.id)===_;return e||b?(0,n.jsx)(o.C,{classNames:{root:D(j().root,T)},className:L,onClick:e?e=>{e.preventDefault(),e.stopPropagation(),(0,m.dl)({imageId:z,nsfwLevel:T})}:void 0,color:R?void 0:p,...w,children:x.vU[T]}):null}return(0,n.jsx)(o.C,{component:"button",classNames:{...r,root:D(j().root,T)},className:(0,E.Z)(L,"pointer-events-auto cursor-pointer"),...w,onClick:M,children:O?(0,n.jsx)(l.Z,{size:14,strokeWidth:2.5}):(0,n.jsx)(c.Z,{size:14,strokeWidth:2.5})})}function M(e){let{image:t,children:r,explain:i=!0,...o}=e,{show:a,browsingLevel:s,tosViolation:l}=T({image:t,...o});return(0,n.jsx)(N,{show:a,browsingLevel:s,tosViolation:l,explain:i,children:r(a)})}function D(e,t){return(0,E.Z)(e,{[j().red]:!(0,x.A_)(null!=t?t:0)})}z.BlurToggle=_},65521:function(e,t,r){"use strict";r.d(t,{R:function(){return y}});var n,i,o=r(85893),a=r(67294),s=r(43985),l=(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.canvas=null,t.handleRef=function(e){t.canvas=e,t.draw()},t.draw=function(){var e=t.props,r=e.hash,n=e.height,i=e.punch,o=e.width;if(t.canvas){var a=(0,s.Jx)(r,o,n,i),l=t.canvas.getContext("2d"),c=l.createImageData(o,n);c.data.set(a),l.putImageData(c,0,0)}},t}return l(t,e),t.prototype.componentDidUpdate=function(){this.draw()},t.prototype.render=function(){var e=this.props,t=(e.hash,e.height),r=e.width,n=u(e,["hash","height","width"]);return a.createElement("canvas",c({},n,{height:t,width:r,ref:this.handleRef}))},t.defaultProps={height:128,width:128},t}(a.PureComponent),f=(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},m={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}f(t,e),t.prototype.componentDidUpdate=function(){if(this.props.resolutionX<=0)throw Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw Error("resolutionY must be larger than zero")},t.prototype.render=function(){var e=this.props,t=e.hash,r=e.height,n=e.width,i=e.punch,o=e.resolutionX,s=e.resolutionY,l=e.style,c=h(e,["hash","height","width","punch","resolutionX","resolutionY","style"]);return a.createElement("div",p({},c,{style:p(p({display:"inline-block",height:r,width:n},l),{position:"relative"})}),a.createElement(d,{hash:t,height:s,width:o,punch:i,style:m}))},t.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32}}(a.PureComponent);var g=r(59743),v=r(90512);function y(e){let{hash:t,height:r,width:n,style:i,cropFocus:a,className:s}=e;if(!t||!n||!r)return null;let l=(0,g.ir)(n,r,32);return l.height?(0,o.jsx)(d,{hash:t,height:l.height,width:l.width,className:(0,v.Z)("absolute inset-0 size-full object-cover object-center",s),style:{objectPosition:a,...i}}):null}},30295:function(e,t,r){"use strict";r.d(t,{R:function(){return T}});var n=r(85893),i=r(97564),o=r(71232),a=r(95117),s=r(50331),l=r(88393),c=r(49834),u=r(67084),d=r(69469),f=r(67841),p=r(54777),h=r(40633),m=r(18060),g=r(38615),v=r(63208),y=r(90693),b=r(67294),x=r(5779),w=r(35818),S=r(3153),k=r(34163),j=r(8449),E=r(27943),O=r(72456);let C={prompt:"Prompt",negativePrompt:"Negative prompt",cfgScale:"CFG scale",steps:"Steps",sampler:"Sampler",seed:"Seed",Model:"Model","Clip skip":"Clip skip",clipSkip:"Clip skip",scheduler:"Scheduler"};function I(e){var t;let{meta:r,imageId:h,generationProcess:m="txt2img",mainResourceId:k,onCreateClick:j,hideSoftware:I}=e,T=(0,x.g)(),z=(0,b.useMemo)(()=>{var e,t,i,o;let a=[],s=[],l=[];for(let e of Object.keys(C)){let n=null===(t=r[e])||void 0===t?void 0:t.toString();if(null==n)continue;let i=C[e];n.length>30||"prompt"===e?a.push({label:i,value:n}):n.length>14||"Model"===e||"negativePrompt"===e&&n.length>0?l.push({label:i,value:n}):s.push({label:i,value:n})}let c=Object.keys(r).some(e=>e.startsWith("ControlNet"));r.comfy&&(l.push({label:"Workflow",value:(0,n.jsx)(P,{meta:r})}),c=(null===(i=r.controlNets)||void 0===i?void 0:i.length)>0);let u="civitaiResources"in r,d=null!==(o=null===(e=r.software)||void 0===e?void 0:e.toString())&&void 0!==o?o:u?"Civitai Generator":"External Generator",{external:f}=r,p=a.length>0||l.length>0||s.length>0;return{long:a,medium:l,short:s,hasControlNet:c,onSite:u,software:d,hasRegular:p,external:f}},[r]),{data:N=[]}=O.SX.image.getResources.useQuery({id:h},{enabled:T.imageGeneration&&!!h,trpc:{context:{skipBatch:!0}}}),R=null!=k?k:null===(t=N.find(e=>e.modelType===w.BY.Checkpoint))||void 0===t?void 0:t.modelVersionId,{data:_}=O.SX.generation.checkResourcesCoverage.useQuery({id:R},{enabled:T.imageGeneration&&!!R,trpc:{context:{skipBatch:!0}}}),M=T.imageGeneration&&!!_&&!!r.prompt;return(0,n.jsxs)(i.K,{spacing:"xs",children:[z.hasRegular?(0,n.jsxs)(n.Fragment,{children:[z.long.map(e=>{let{label:t,value:r}=e;return(0,n.jsxs)(i.K,{spacing:0,children:[(0,n.jsxs)(o.Z,{spacing:4,align:"center",children:[(0,n.jsx)(a.x,{size:"sm",weight:500,children:t}),("Prompt"===t||"Negative prompt"===t)&&(0,n.jsx)(s.q,{value:r,children:e=>{let{copied:r,copy:i}=e;return(0,n.jsx)(l.u,{label:"Copy ".concat(t.toLowerCase()),color:"dark",withArrow:!0,children:(0,n.jsx)(c.A,{variant:"transparent",size:"xs",color:r?"green":"blue",onClick:i,ml:"auto","data-activity":"copy:prompt",children:r?(0,n.jsx)(v.Z,{size:16}):(0,n.jsx)(g.Z,{size:16})})})}})]}),(0,n.jsx)(u.E,{block:!0,sx:{wordBreak:"break-word",whiteSpace:"pre-wrap",maxHeight:150,overflowY:"auto"},children:r})]},t)}),z.medium.map(e=>{let{label:t,value:r}=e;return(0,n.jsxs)(o.Z,{position:"apart",children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:t}),(0,n.jsx)(u.E,{sx:{flex:"1",textAlign:"right",overflow:"hidden",whiteSpace:"pre-wrap"},children:r})]},t)}),(0,n.jsx)(d.M,{cols:2,verticalSpacing:"xs",children:z.short.map(e=>{let{label:t,value:r}=e;return(0,n.jsxs)(o.Z,{spacing:"xs",children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:t}),(0,n.jsx)(u.E,{sx:{flex:"1",textAlign:"right",overflow:"hidden",whiteSpace:"pre-wrap",maxWidth:300},children:r})]},t)})}),(0,n.jsxs)(f.z.Group,{children:[M&&(0,n.jsx)(f.z,{size:"xs",variant:"light",leftIcon:(0,n.jsx)(y.Z,{size:16}),"data-activity":"remix:image-meta",onClick:()=>{S.Ft.open({type:"image",id:null!=h?h:0}),null==j||j()},sx:{flex:1},children:"Remix"}),(0,n.jsx)(A,{meta:r,iconOnly:M})]})]}):(0,n.jsx)(a.x,{mt:"sm",size:"xs",align:"center",fs:"italic",children:"No Data"}),!!z.external&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.i,{mx:"-md",label:"External Data",labelPosition:"center"}),!!z.external.source&&(0,n.jsx)(o.Z,{spacing:"xs",children:Object.entries(z.external.source).map(e=>{let[t,r]=e;return(0,n.jsxs)(o.Z,{spacing:"xs",sx:{flexGrow:1},children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:(0,E.Qs)("name"===t?"Source":t)}),(0,n.jsx)(u.E,{sx:{flex:"1",overflowWrap:"anywhere",textAlign:"right"},children:r})]},t)})}),!!z.external.referenceUrl&&(0,n.jsxs)(o.Z,{spacing:"xs",children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:"Source URL"}),(0,n.jsx)(u.E,{sx:{flex:"1",textAlign:"right",overflowWrap:"anywhere"},children:z.external.referenceUrl})]}),!!z.external.createUrl&&(0,n.jsxs)(o.Z,{spacing:"xs",children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:"Create URL"}),(0,n.jsx)(u.E,{sx:{flex:"1",textAlign:"right",overflowWrap:"anywhere"},children:z.external.createUrl})]}),!!z.external.details&&Object.keys(z.external.details).length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.x,{size:"xs",align:"center",children:"Custom Properties"}),(0,n.jsx)(d.M,{cols:2,verticalSpacing:"xs",children:Object.entries(z.external.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(o.Z,{spacing:"xs",children:[(0,n.jsx)(a.x,{size:"sm",mr:"xs",weight:500,children:(0,E.Qs)(t)}),(0,n.jsx)(u.E,{sx:{flex:"1",textAlign:"right",overflow:"hidden",whiteSpace:"pre-wrap",maxWidth:300},children:r.toString()})]},t)})})]})]})]})}function P(e){var t,r;let{meta:i}=e,{copied:a,copy:s}=(0,m.V)(),l="string"==typeof i.comfy?(0,k.xZ)(i.comfy):i.comfy,{workflow:c}=null!=l?l:{};return(0,n.jsxs)(o.Z,{onClick:()=>s(JSON.stringify(c)),spacing:4,sx:{justifyContent:"flex-end",cursor:"pointer"},"data-activity":"copy:workflow",children:[null!==(r=null==c?void 0:null===(t=c.nodes)||void 0===t?void 0:t.length)&&void 0!==r?r:0," Nodes",a?(0,n.jsx)(v.Z,{size:16}):(0,n.jsx)(g.Z,{size:16})]})}function A(e){let{meta:t,iconOnly:r=!1}=e,{copied:i,copy:a}=(0,m.V)(),s=i?"Copied":"Copy Generation Data",c=(0,n.jsx)(f.z,{size:"xs",color:i?"teal":"blue",variant:"light",onClick:()=>{a((0,j.qK)(t))},w:r?void 0:"100%","data-activity":"copy:image-meta",children:(0,n.jsxs)(o.Z,{spacing:4,children:[i?(0,n.jsx)(v.Z,{size:16}):(0,n.jsx)(g.Z,{size:16}),!r&&s]})});return r?(0,n.jsx)(l.u,{label:s,color:"dark",withArrow:!0,withinPortal:!0,children:c}):c}function T(e){let{meta:t,generationProcess:r,children:i,imageId:o,mainResourceId:a,hideSoftware:s=!1,...l}=e,[c,u]=(0,b.useState)(!1);return(0,n.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,n.jsxs)(h.J,{width:350,shadow:"md",position:"top-end",withArrow:!0,withinPortal:!0,opened:c,onChange:e=>u(e),...l,children:[(0,n.jsx)(h.J.Target,{children:(0,b.cloneElement)(i,{onClick:()=>u(e=>!e)})}),(0,n.jsx)(h.J.Dropdown,{children:(0,n.jsx)(I,{meta:t,generationProcess:r,imageId:o,mainResourceId:a,hideSoftware:s,onCreateClick:()=>u(!1)})})]})})}},83895:function(e,t,r){"use strict";r.d(t,{T:function(){return a}});var n=r(67294),i=r(45587),o=r(24285);function a(e){var t;let{disabled:r,children:a,id:s}=e,{attributes:l,listeners:c,isDragging:u,setNodeRef:d,transform:f,transition:p}=(0,i.nB)({id:s}),h={transform:o.ux.Transform.toString(f),transition:p,cursor:u?"grabbing":r?"auto":"pointer",zIndex:u?1:void 0,touchAction:"none"};return(0,n.cloneElement)(a,{ref:d,style:{...h,...(null===(t=a.props)||void 0===t?void 0:t.style)||{}},...l,...c})}},56311:function(e,t,r){"use strict";r.d(t,{YD:function(){return d},bK:function(){return f},dS:function(){return p}});var n=r(85893),i=r(67294),o=r(90101),a=r(72676),s=r(27943);let l=new Map,c=(0,i.createContext)(null);function u(){let e=(0,i.useContext)(c);if(!e)throw Error("missing IntersectionObserverCtx in tree");return e}function d(){let{initialInView:e=!1,callback:t,key:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.useRef)(null),{ready:o,observe:a,unobserve:s}=u(),[l,c]=(0,i.useState)(e),d=(0,i.useRef)();return d.current=t,(0,i.useEffect)(()=>{if(!o)return;let e=n.current;return e&&a(e,function(e,t){var r;null===(r=d.current)||void 0===r||r.call(d,e,t),c(e)}),()=>{e&&s(e)}},[o,r]),[n,l]}function f(e){let{initialInView:t,id:r}=e,{providerId:n}=u();if(!n)throw Error("missing providerId. providerId must be present to use IntersectionObserver for content with dynamic bounds");let o=(0,i.useRef)();o.current||(o.current=[null!=n?n:"",r].join("_"));let s=(0,i.useRef)();s.current||(s.current=l.get(o.current));let[c,f]=d({initialInView:null!=t?!!t:!s.current,callback:(e,t)=>{let r=t.target,n=o.current;if(!e&&n){let{width:e,height:t}=r.getBoundingClientRect();t>0&&(l.set(n,{width:e,height:t}),r.style.height="".concat(t,"px"))}}});return(0,a.L)(()=>{let e=s.current,t=c.current;t&&e&&(t.style.height="".concat(e.height,"px"))},[]),(0,i.useEffect)(()=>{let e=c.current;e&&f&&e.style.removeProperty("height")},[f]),[c,!s.current||f]}function p(e){let{id:t,options:r,children:a}=e,l=(0,o.T)(),u=(0,i.useRef)(),d=(0,i.useRef)(),[f,p]=(0,i.useState)(!1);return d.current||(d.current=new Map),(0,i.useEffect)(()=>(u.current||(u.current=new IntersectionObserver(e=>{for(let r of e)if(r.target.id){var t;let e=null===(t=d.current)||void 0===t?void 0:t.get(r.target.id);null==e||e(r.isIntersecting,r)}},{root:null==l?void 0:l.current,rootMargin:"200% 0px",...r}),p(!0)),()=>{var e;null===(e=u.current)||void 0===e||e.disconnect(),u.current=void 0}),[]),(0,n.jsx)(c.Provider,{value:{ready:f,providerId:t,observe:function(e,t){var r,n;e.id||(e.id=(0,s.RA)(8)),null===(r=u.current)||void 0===r||r.observe(e),null===(n=d.current)||void 0===n||n.set(e.id,t)},unobserve:function(e){var t,r;e.id&&(null===(t=u.current)||void 0===t||t.unobserve(e),null===(r=d.current)||void 0===r||r.delete(e.id))}},children:a})}},20142:function(e,t,r){"use strict";r.d(t,{u:function(){return o}});var n=r(85893),i=r(97755);function o(e){let{children:t}=e;return(0,i.Z)()?(0,n.jsx)(n.Fragment,{children:t}):null}},1689:function(e,t,r){"use strict";r.d(t,{O:function(){return f}});var n=r(85893),i=r(88393),o=r(71232),a=r(64523),s=r(95117),l=r(59862),c=r(28075),u=r(67614);let d={1:"blue",3:"yellow",10:"gray",100:"orange"},f=e=>{let{rank:t,size:r,textSize:f="sm",iconSize:p=18,withTitle:h,...m}=e;if(!t||!t.leaderboardRank||t.leaderboardRank>100)return null;let g="gray";for(let[e,r]of Object.entries(d))if(t.leaderboardRank<=parseInt(e)){g=r;break}let v=!!t.leaderboardCosmetic;return(0,n.jsx)(i.u,{label:"".concat(t.leaderboardTitle," Rank"),position:"top",color:"dark",withArrow:!0,children:(0,n.jsxs)(o.Z,{spacing:0,noWrap:!0,sx:{position:"relative"},children:[t.leaderboardCosmetic?(0,n.jsx)(a.x,{pos:"relative",sx:{zIndex:2},children:(0,n.jsx)(c.i,{src:t.leaderboardCosmetic,alt:"".concat(t.leaderboardTitle," position #").concat(t.leaderboardRank),width:32})}):null,(0,n.jsx)(u.G,{size:r,color:g,variant:h?"transparent":"gray"===g?"filled":void 0,href:"/leaderboard/".concat(t.leaderboardId,"?position=").concat(t.leaderboardRank),icon:v?void 0:(0,n.jsx)(l.Z,{size:p}),sx:v?{paddingLeft:16,marginLeft:-14,borderTopLeftRadius:0,borderBottomLeftRadius:0}:void 0,...m,children:(0,n.jsxs)(s.x,{size:f,inline:!0,children:["#",t.leaderboardRank," ",h?t.leaderboardTitle:null]})})]})})}},93476:function(e,t,r){"use strict";r.d(t,{x:function(){return a}});var n=r(85893),i=r(95117),o=r(67294);function a(e){let{children:t,lineClamp:r=3,...a}=e,s=(0,o.useRef)(null),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=s.current;e&&c(e.offsetHeightd(!u),children:u?"Show less":"Show more"})})]})}},19612:function(e,t,r){"use strict";r.d(t,{L:function(){return y}});var n=r(85893),i=r(40633),o=r(97564),a=r(71232),s=r(5044),l=r(95117),c=r(67841),u=r(78308),d=r(11163),f=r(67294),p=r(73445),h=r(17578),m=r(57632),g=r(79543);let v=(0,p.Ue)((e,t)=>({keys:{},toggleKey:r=>{let n=t().keys[r];e(()=>({keys:{[r]:!n}}))}}));function y(e){let{children:t,message:r,dependency:p=!0,...y}=e,[b]=(0,f.useState)((0,m.Z)()),x=(0,h.xJ)(),w=(0,d.useRouter)(),S=v(e=>e.keys[b]),k=v(e=>e.toggleKey);return!x&&p?(0,n.jsxs)(i.J,{width:300,position:"bottom",opened:S,withArrow:!0,closeOnClickOutside:!0,withinPortal:!0,...y,children:[(0,n.jsx)(i.J.Target,{children:(0,f.cloneElement)(t,{onClick:e=>{e.stopPropagation(),e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),k(b)}})}),(0,n.jsx)(i.J.Dropdown,{children:(0,n.jsxs)(o.K,{spacing:"xs",children:[(0,n.jsxs)(a.Z,{noWrap:!0,children:[(0,n.jsx)(s.k,{color:"red",size:"xl",variant:"outline",children:(0,n.jsx)(u.Z,{})}),null!=r?r:(0,n.jsx)(l.x,{size:"sm",weight:500,sx:{flex:1},children:"You must be logged in to perform this action"})]}),(0,n.jsx)(g.p,{href:"/login?returnUrl=".concat(w.asPath),children:(0,n.jsx)(c.z,{size:"xs",children:"Login"})})]})})]}):(0,f.cloneElement)(t,{onClick:e=>{var r,n;e.stopPropagation(),e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),null===(r=(n=t.props).onClick)||void 0===r||r.call(n,e)}})}},70096:function(e,t,r){"use strict";r.d(t,{b:function(){return l},j:function(){return s}});var n=r(11163),i=r(67294),o=r(17578),a=r(94626);function s(e){let{reason:t,returnUrl:r}=e,i=(0,n.useRouter)(),s=(0,o.xJ)();return{requireLogin:(e,n)=>{if(s)null==e||e();else{var o,l,c;i.push((0,a.UD)({returnUrl:null!==(l=null!==(o=null==n?void 0:n.returnUrl)&&void 0!==o?o:r)&&void 0!==l?l:i.asPath,reason:null!==(c=null==n?void 0:n.reason)&&void 0!==c?c:t}))}}}}function l(e){let{children:t,reason:r,returnUrl:s}=e,l=(0,n.useRouter)();return(0,o.xJ)()?t:i.cloneElement(t,{...t.props,onClick:e=>{e.preventDefault(),l.push((0,a.UD)({returnUrl:null!=s?s:l.asPath,reason:r}))}})}},36128:function(e,t,r){"use strict";r.d(t,{t:function(){return t5}});var n={};r.r(n),r.d(n,{attentionMarkers:function(){return e8},contentInitial:function(){return e1},disable:function(){return e7},document:function(){return e0},flow:function(){return e5},flowInitial:function(){return e2},insideSpan:function(){return e6},string:function(){return e4},text:function(){return e3}});var i=r(85893),o=r(95078),a=r(79543),s=r(24345),l=r(25668);let c=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d={};function f(e,t){return((t||d).jsx?u:c).test(e)}let p=/[ \t\n\f\r]/g;function h(e){return""===e.replace(p,"")}var m=r(91634),g=r(26103);let v={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var y=r(50342),b=r(5174),x=b.default||b,w=r(3980);function S(e){return e&&"object"==typeof e?"position"in e||"type"in e?j(e.position):"start"in e||"end"in e?j(e):"line"in e||"column"in e?k(e):"":""}function k(e){return E(e&&e.line)+":"+E(e&&e.column)}function j(e){return k(e&&e.start)+"-"+k(e&&e.end)}function E(e){return e&&"number"==typeof e?e:1}class O extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",i={},o=!1;if(t&&(i="line"in t&&"column"in t?{place:t}:"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!i.cause&&e&&(o=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof r){let e=r.indexOf(":");-1===e?i.ruleId=r:(i.source=r.slice(0,e),i.ruleId=r.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=S(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}O.prototype.file="",O.prototype.name="",O.prototype.reason="",O.prototype.message="",O.prototype.stack="",O.prototype.column=void 0,O.prototype.line=void 0,O.prototype.ancestors=void 0,O.prototype.cause=void 0,O.prototype.fatal=void 0,O.prototype.place=void 0,O.prototype.ruleId=void 0,O.prototype.source=void 0;let C={}.hasOwnProperty,I=new Map,P=/[A-Z]/g,A=/-([a-z])/g,T=new Set(["table","tbody","thead","tfoot","tr"]),z=new Set(["td","th"]),N="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function R(e,t,r){return"element"===t.type?function(e,t,r){let n=e.schema,i=n;"svg"===t.tagName.toLowerCase()&&"html"===n.space&&(i=m.YP,e.schema=i),e.ancestors.push(t);let o=L(e,t.tagName,!1),a=function(e,t){let r,n;let i={};for(n in t.properties)if("children"!==n&&C.call(t.properties,n)){let o=function(e,t,r){let n=(0,g.s)(e.schema,t);if(!(null==r||"number"==typeof r&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?(0,l.P)(r):(0,y.P)(r)),"style"===n.property){let t="object"==typeof r?r:function(e,t){let r={};try{x(t,function(e,t){let n=e;"--"!==n.slice(0,2)&&("-ms-"===n.slice(0,4)&&(n="ms-"+n.slice(4)),n=n.replace(A,U)),r[n]=t})}catch(t){if(!e.ignoreInvalidStyle){let r=new O("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=N+"#cannot-parse-style-attribute",r}}return r}(e,String(r));return"css"===e.stylePropertyNameCase&&(t=function(e){let t;let r={};for(t in e)C.call(e,t)&&(r[function(e){let t=e.replace(P,B);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return r}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&n.space?v[n.property]||n.property:n.attribute,r]}}(e,n,t.properties[n]);if(o){let[n,a]=o;e.tableCellAlignToStyle&&"align"===n&&"string"==typeof a&&z.has(t.tagName)?r=a:i[n]=a}}return r&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),i}(e,t),s=D(e,t);return T.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&h(e.value):h(e))})),_(e,a,o,t),M(a,s),e.ancestors.pop(),e.schema=n,e.create(t,o,a,r)}(e,t,r):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let r=t.data.estree.body[0];return(0,s.ok)("ExpressionStatement"===r.type),e.evaluater.evaluateExpression(r.expression)}F(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,r){let n=e.schema,i=n;"svg"===t.name&&"html"===n.space&&(i=m.YP,e.schema=i),e.ancestors.push(t);let o=null===t.name?e.Fragment:L(e,t.name,!0),a=function(e,t){let r={};for(let n of t.attributes)if("mdxJsxExpressionAttribute"===n.type){if(n.data&&n.data.estree&&e.evaluater){let t=n.data.estree.body[0];(0,s.ok)("ExpressionStatement"===t.type);let i=t.expression;(0,s.ok)("ObjectExpression"===i.type);let o=i.properties[0];(0,s.ok)("SpreadElement"===o.type),Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else F(e,t.position)}else{let i;let o=n.name;if(n.value&&"object"==typeof n.value){if(n.value.data&&n.value.data.estree&&e.evaluater){let t=n.value.data.estree.body[0];(0,s.ok)("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else F(e,t.position)}else i=null===n.value||n.value;r[o]=i}return r}(e,t),l=D(e,t);return _(e,a,o,t),M(a,l),e.ancestors.pop(),e.schema=n,e.create(t,o,a,r)}(e,t,r):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);F(e,t.position)}(e,t):"root"===t.type?function(e,t,r){let n={};return M(n,D(e,t)),e.create(t,e.Fragment,n,r)}(e,t,r):"text"===t.type?t.value:void 0}function _(e,t,r,n){"string"!=typeof r&&r!==e.Fragment&&e.passNode&&(t.node=n)}function M(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function D(e,t){let r=[],n=-1,i=e.passKeys?new Map:I;for(;++n=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){this.setCursor(Math.trunc(e));let n=this.right.splice(this.right.length-(t||0),Number.POSITIVE_INFINITY);return r&&$(this.left,r),n.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),$(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),$(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length)){if(e-1&&e.test(String.fromCharCode(t))}}J(/[A-Za-z]/),J(/[\dA-Za-z]/),J(/[#-'*+\--9=?A-Z^-~]/),J(/\d/),J(/[\dA-Fa-f]/),J(/[!-/:-@[-`{-~]/),J(/\p{P}|\p{S}/u),J(/\s/);let Y={tokenize:function(e){let t;let r=e.attempt(this.parser.constructs.contentInitial,function(t){if(null===t){e.consume(t);return}return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,K.f)(e,r,"linePrefix")},function(r){return e.enter("paragraph"),function r(n){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(n){if(null===n){e.exit("chunkText"),e.exit("paragraph"),e.consume(n);return}return X(n)?(e.consume(n),e.exit("chunkText"),r):(e.consume(n),t)}(n)}(r)});return r}},Q={tokenize:function(e){let t,r,n;let i=this,o=[],a=0;return s;function s(t){if(an))return;let s=i.events.length,l=s;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){if(e){r=i.events[l][1].end;break}e=!0}for(g(a),o=s;ot;){let t=o[r];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function v(){t.write([null]),r=void 0,t=void 0,i.containerState._closeFlow=void 0}}},ee={tokenize:function(e,t,r){return(0,K.f)(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var et=r(23402),er=r(6799);let en={resolve:function(e){return q(e),e},tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):(0,er.Ch)(t)?e.check(ei,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},ei={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,K.f)(e,i,"linePrefix")};function i(i){if(null===i||(0,er.Ch)(i))return r(i);let o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}}},eo={tokenize:function(e){let t=this,r=e.attempt(et.w,function(n){if(null===n){e.consume(n);return}return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r},e.attempt(this.parser.constructs.flowInitial,n,(0,K.f)(e,e.attempt(this.parser.constructs.flow,n,e.attempt(en,n)),"linePrefix")));return r;function n(n){if(null===n){e.consume(n);return}return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r}}},ea={resolveAll:eu()},es=ec("string"),el=ec("text");function ec(e){return{resolveAll:eu("text"===e?ed:void 0),tokenize:function(t){let r=this,n=this.parser.constructs[e],i=t.attempt(n,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null===e){t.consume(e);return}return t.enter("data"),t.consume(e),s}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;let t=n[e],i=-1;if(t)for(;++i=3&&(null===a||(0,er.Ch)(a))?(e.exit("thematicBreak"),t(a)):r(a)}(o)}}},ep={continuation:{tokenize:function(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(et.w,function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,(0,K.f)(e,t,"listItemIndent",n.containerState.size+1)(r)},function(r){return n.containerState.furtherBlankLines||!(0,er.xz)(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(em,t,i)(r))});function i(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,(0,K.f)(e,e.attempt(ep,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){let n=this,i=n.events[n.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){let i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:(0,er.pY)(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(ef,r,s)(t):s(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return(0,er.pY)(i)&&++a<10?(e.consume(i),t):(!n.interrupt||a<2)&&(n.containerState.marker?i===n.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),s(i)):r(i)}(t)}return r(t)};function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(et.w,n.interrupt?r:l,e.attempt(eh,u,c))}function l(e){return n.containerState.initialBlankLine=!0,o++,u(e)}function c(t){return(0,er.xz)(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}}},eh={partial:!0,tokenize:function(e,t,r){let n=this;return(0,K.f)(e,function(e){let i=n.events[n.events.length-1];return!(0,er.xz)(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},em={partial:!0,tokenize:function(e,t,r){let n=this;return(0,K.f)(e,function(e){let i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)},"listItemIndent",n.containerState.size+1)}},eg={continuation:{tokenize:function(e,t,r){let n=this;return function(t){return(0,er.xz)(t)?(0,K.f)(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(n){return e.attempt(eg,t,r)(n)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){let n=this;return function(t){if(62===t){let r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return(0,er.xz)(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}};function ev(e){return null!==e&&(e<32||127===e)}function ey(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eb(e,t,r,n,i,o,a,s,l){let c=l||Number.POSITIVE_INFINITY,u=0;return function(t){return 60===t?(e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||ev(t)?r(t):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t))};function d(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(r))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||null!==t&&t<-2?r(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(i){return!u&&(null===i||41===i||null!==i&&(i<0||32===i))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(i)):u-1&&e.test(String.fromCharCode(t))}}function eS(e,t,r,n,i,o){let a;let s=this,l=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):ex(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||ex(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),!a&&(a=!(-2===t||-1===t||32===t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function ek(e){return null!==e&&e<-2}function ej(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eE(e,t,r,n,i,o){let a;return function(t){return 34===t||39===t||40===t?(e.enter(n),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s):r(t)};function s(r){return r===a?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),l(r))}function l(t){return t===a?(e.exit(o),s(a)):null===t?r(t):ek(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,K.f)(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||ek(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function eO(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eC(e,t){let r;return function n(i){return null!==i&&i<-2?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):-2===i||-1===i||32===i?(0,K.f)(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}ey(/[A-Za-z]/),ey(/[\dA-Za-z]/),ey(/[#-'*+\--9=?A-Z^-~]/),ey(/\d/),ey(/[\dA-Fa-f]/),ey(/[!-/:-@[-`{-~]/),ey(/\p{P}|\p{S}/u),ey(/\s/),ew(/[A-Za-z]/),ew(/[\dA-Za-z]/),ew(/[#-'*+\--9=?A-Z^-~]/),ew(/\d/),ew(/[\dA-Fa-f]/),ew(/[!-/:-@[-`{-~]/),ew(/\p{P}|\p{S}/u),ew(/\s/),ej(/[A-Za-z]/),ej(/[\dA-Za-z]/),ej(/[#-'*+\--9=?A-Z^-~]/),ej(/\d/),ej(/[\dA-Fa-f]/),ej(/[!-/:-@[-`{-~]/),ej(/\p{P}|\p{S}/u),ej(/\s/),eO(/[A-Za-z]/),eO(/[\dA-Za-z]/),eO(/[#-'*+\--9=?A-Z^-~]/),eO(/\d/),eO(/[\dA-Fa-f]/),eO(/[!-/:-@[-`{-~]/),eO(/\p{P}|\p{S}/u),eO(/\s/);var eI=r(11098);let eP={partial:!0,tokenize:function(e,t,r){return function(t){return(0,er.z3)(t)?eC(e,n)(t):r(t)};function n(t){return eE(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return(0,er.xz)(t)?(0,K.f)(e,o,"whitespace")(t):o(t)}function o(e){return null===e||(0,er.Ch)(e)?t(e):r(e)}}},eA={name:"codeIndented",tokenize:function(e,t,r){let n=this;return function(t){return e.enter("codeIndented"),(0,K.f)(e,i,"linePrefix",5)(t)};function i(t){let i=n.events[n.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(r){return null===r?o(r):(0,er.Ch)(r)?e.attempt(eT,t,o)(r):(e.enter("codeFlowValue"),function r(n){return null===n||(0,er.Ch)(n)?(e.exit("codeFlowValue"),t(n)):(e.consume(n),r)}(r))}(t):r(t)}function o(r){return e.exit("codeIndented"),t(r)}}},eT={partial:!0,tokenize:function(e,t,r){let n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):(0,er.Ch)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):(0,K.f)(e,o,"linePrefix",5)(t)}function o(e){let o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):(0,er.Ch)(e)?i(e):r(e)}}},ez={name:"setextUnderline",resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,r){let n;let i=this;return function(t){let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),n=t,e.enter("setextHeadingLineSequence"),function t(r){return r===n?(e.consume(r),t):(e.exit("setextHeadingLineSequence"),(0,er.xz)(r)?(0,K.f)(e,o,"lineSuffix")(r):o(r))}(t)):r(t)};function o(n){return null===n||(0,er.Ch)(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}}},eN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],eR=["pre","script","style","textarea"],e_={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(et.w,t,r)}}},eM={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return(0,er.Ch)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},eD={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return null===t?r(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},eL={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){let n;let i=this,o={partial:!0,tokenize:function(e,t,r){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),(0,er.xz)(t)?(0,K.f)(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===n?(e.enter("codeFencedFenceSequence"),function t(i){return i===n?(o++,e.consume(i),t):o>=s?(e.exit("codeFencedFenceSequence"),(0,er.xz)(i)?(0,K.f)(e,c,"whitespace")(i):c(i)):r(i)}(t)):r(t)}function c(n){return null===n||(0,er.Ch)(n)?(e.exit("codeFencedFence"),t(n)):r(n)}}},a=0,s=0;return function(t){return function(t){let o=i.events[i.events.length-1];return a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,n=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===n?(s++,e.consume(i),t):s<3?r(i):(e.exit("codeFencedFenceSequence"),(0,er.xz)(i)?(0,K.f)(e,l,"whitespace")(i):l(i))}(t)}(t)};function l(o){return null===o||(0,er.Ch)(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(eD,u,h)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,er.Ch)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):(0,er.xz)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),(0,K.f)(e,c,"whitespace")(i)):96===i&&i===n?r(i):(e.consume(i),t)}(o))}function c(t){return null===t||(0,er.Ch)(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,er.Ch)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===n?r(i):(e.consume(i),t)}(t))}function u(t){return e.attempt(o,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return a>0&&(0,er.xz)(t)?(0,K.f)(e,p,"linePrefix",a+1)(t):p(t)}function p(t){return null===t||(0,er.Ch)(t)?e.check(eD,u,h)(t):(e.enter("codeFlowValue"),function t(r){return null===r||(0,er.Ch)(r)?(e.exit("codeFlowValue"),p(r)):(e.consume(r),t)}(t))}function h(r){return e.exit("codeFenced"),t(r)}}},eF=document.createElement("i");function eU(e){let t="&"+e+";";eF.innerHTML=t;let r=eF.textContent;return(59!==r.charCodeAt(r.length-1)||"semi"===e)&&r!==t&&r}let eB={name:"characterReference",tokenize:function(e,t,r){let n,i;let o=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),n=31,i=er.H$,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,i=er.AF,c):(e.enter("characterReferenceValue"),n=7,i=er.pY,c(t))}function c(s){if(59===s&&a){let n=e.exit("characterReferenceValue");return i!==er.H$||eU(o.sliceSerialize(n))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return i(s)&&a++1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[u][1].start};eY(d,-s),eY(f,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},i={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[u][1].start}},n={type:s>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[u][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=(0,W.V)(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=(0,W.V)(l,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=(0,W.V)(l,(0,eW.C)(t.parser.constructs.insideSpan.null,e.slice(r+1,u),t)),l=(0,W.V)(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",n,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=(0,W.V)(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,(0,W.d)(e,r-1,u-r+3,l),u=r+l.length-c-2;break}}for(u=-1;++uo&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},(0,W.d)(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(i){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),function i(o){return 35===o&&n++<6?(e.consume(o),i):null===o||(0,er.z3)(o)?(e.exit("atxHeadingSequence"),function r(n){return 35===n?(e.enter("atxHeadingSequence"),function t(n){return 35===n?(e.consume(n),t):(e.exit("atxHeadingSequence"),r(n))}(n)):null===n||(0,er.Ch)(n)?(e.exit("atxHeading"),t(n)):(0,er.xz)(n)?(0,K.f)(e,r,"whitespace")(n):(e.enter("atxHeadingText"),function t(n){return null===n||35===n||(0,er.z3)(n)?(e.exit("atxHeadingText"),r(n)):(e.consume(n),t)}(n))}(o)):r(o)}(i)}}},42:ef,45:[ez,ef],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,r){let n,i,o,a,s;let l=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,p):63===a?(e.consume(a),n=3,l.interrupt?t:z):(0,er.jv)(a)?(e.consume(a),o=String.fromCharCode(a),h):r(a)}function u(i){return 45===i?(e.consume(i),n=2,d):91===i?(e.consume(i),n=5,a=0,f):(0,er.jv)(i)?(e.consume(i),n=4,l.interrupt?t:z):r(i)}function d(n){return 45===n?(e.consume(n),l.interrupt?t:z):r(n)}function f(n){let i="CDATA[";return n===i.charCodeAt(a++)?(e.consume(n),a===i.length)?l.interrupt?t:j:f:r(n)}function p(t){return(0,er.jv)(t)?(e.consume(t),o=String.fromCharCode(t),h):r(t)}function h(a){if(null===a||47===a||62===a||(0,er.z3)(a)){let s=47===a,c=o.toLowerCase();return!s&&!i&&eR.includes(c)?(n=1,l.interrupt?t(a):j(a)):eN.includes(o.toLowerCase())?(n=6,s)?(e.consume(a),m):l.interrupt?t(a):j(a):(n=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(a):i?function t(r){return(0,er.xz)(r)?(e.consume(r),t):S(r)}(a):g(a))}return 45===a||(0,er.H$)(a)?(e.consume(a),o+=String.fromCharCode(a),h):r(a)}function m(n){return 62===n?(e.consume(n),l.interrupt?t:j):r(n)}function g(t){return 47===t?(e.consume(t),S):58===t||95===t||(0,er.jv)(t)?(e.consume(t),v):(0,er.xz)(t)?(e.consume(t),g):S(t)}function v(t){return 45===t||46===t||58===t||95===t||(0,er.H$)(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):(0,er.xz)(t)?(e.consume(t),y):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),s=t,x):(0,er.xz)(t)?(e.consume(t),b):function t(r){return null===r||34===r||39===r||47===r||60===r||61===r||62===r||96===r||(0,er.z3)(r)?y(r):(e.consume(r),t)}(t)}function x(t){return t===s?(e.consume(t),s=null,w):null===t||(0,er.Ch)(t)?r(t):(e.consume(t),x)}function w(e){return 47===e||62===e||(0,er.xz)(e)?g(e):r(e)}function S(t){return 62===t?(e.consume(t),k):r(t)}function k(t){return null===t||(0,er.Ch)(t)?j(t):(0,er.xz)(t)?(e.consume(t),k):r(t)}function j(t){return 45===t&&2===n?(e.consume(t),I):60===t&&1===n?(e.consume(t),P):62===t&&4===n?(e.consume(t),N):63===t&&3===n?(e.consume(t),z):93===t&&5===n?(e.consume(t),T):(0,er.Ch)(t)&&(6===n||7===n)?(e.exit("htmlFlowData"),e.check(e_,R,E)(t)):null===t||(0,er.Ch)(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),j)}function E(t){return e.check(eM,O,R)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),C}function C(t){return null===t||(0,er.Ch)(t)?E(t):(e.enter("htmlFlowData"),j(t))}function I(t){return 45===t?(e.consume(t),z):j(t)}function P(t){return 47===t?(e.consume(t),o="",A):j(t)}function A(t){if(62===t){let r=o.toLowerCase();return eR.includes(r)?(e.consume(t),N):j(t)}return(0,er.jv)(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),A):j(t)}function T(t){return 93===t?(e.consume(t),z):j(t)}function z(t){return 62===t?(e.consume(t),N):45===t&&2===n?(e.consume(t),z):j(t)}function N(t){return null===t||(0,er.Ch)(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),N)}function R(r){return e.exit("htmlFlow"),t(r)}}},61:ez,95:ef,96:eL,126:eL},e4={38:eB,92:eH},e3={[-5]:eZ,[-4]:eZ,[-3]:eZ,33:eK,38:eB,42:eJ,60:[{name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return(0,er.jv)(t)?(e.consume(t),o):64===t?r(t):s(t)}function o(t){return 43===t||45===t||46===t||(0,er.H$)(t)?(n=1,function t(r){return 58===r?(e.consume(r),n=0,a):(43===r||45===r||46===r||(0,er.H$)(r))&&n++<32?(e.consume(r),t):(n=0,s(r))}(t)):s(t)}function a(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||(0,er.Av)(n)?r(n):(e.consume(n),a)}function s(t){return 64===t?(e.consume(t),l):(0,er.n9)(t)?(e.consume(t),s):r(t)}function l(i){return(0,er.H$)(i)?function i(o){return 46===o?(e.consume(o),n=0,l):62===o?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(o){if((45===o||(0,er.H$)(o))&&n++<63){let r=45===o?t:i;return e.consume(o),r}return r(o)}(o)}(i):r(i)}}},{name:"htmlText",tokenize:function(e,t,r){let n,i,o;let a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):(0,er.jv)(t)?(e.consume(t),S):r(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):(0,er.jv)(t)?(e.consume(t),v):r(t)}function c(t){return 45===t?(e.consume(t),f):r(t)}function u(t){return null===t?r(t):45===t?(e.consume(t),d):(0,er.Ch)(t)?(o=u,A(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?P(e):45===e?d(e):u(e)}function p(t){let n="CDATA[";return t===n.charCodeAt(i++)?(e.consume(t),i===n.length?h:p):r(t)}function h(t){return null===t?r(t):93===t?(e.consume(t),m):(0,er.Ch)(t)?(o=h,A(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?P(t):93===t?(e.consume(t),g):h(t)}function v(t){return null===t||62===t?P(t):(0,er.Ch)(t)?(o=v,A(t)):(e.consume(t),v)}function y(t){return null===t?r(t):63===t?(e.consume(t),b):(0,er.Ch)(t)?(o=y,A(t)):(e.consume(t),y)}function b(e){return 62===e?P(e):y(e)}function x(t){return(0,er.jv)(t)?(e.consume(t),w):r(t)}function w(t){return 45===t||(0,er.H$)(t)?(e.consume(t),w):function t(r){return(0,er.Ch)(r)?(o=t,A(r)):(0,er.xz)(r)?(e.consume(r),t):P(r)}(t)}function S(t){return 45===t||(0,er.H$)(t)?(e.consume(t),S):47===t||62===t||(0,er.z3)(t)?k(t):r(t)}function k(t){return 47===t?(e.consume(t),P):58===t||95===t||(0,er.jv)(t)?(e.consume(t),j):(0,er.Ch)(t)?(o=k,A(t)):(0,er.xz)(t)?(e.consume(t),k):P(t)}function j(t){return 45===t||46===t||58===t||95===t||(0,er.H$)(t)?(e.consume(t),j):function t(r){return 61===r?(e.consume(r),E):(0,er.Ch)(r)?(o=t,A(r)):(0,er.xz)(r)?(e.consume(r),t):k(r)}(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),n=t,O):(0,er.Ch)(t)?(o=E,A(t)):(0,er.xz)(t)?(e.consume(t),E):(e.consume(t),C)}function O(t){return t===n?(e.consume(t),n=void 0,I):null===t?r(t):(0,er.Ch)(t)?(o=O,A(t)):(e.consume(t),O)}function C(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||(0,er.z3)(t)?k(t):(e.consume(t),C)}function I(e){return 47===e||62===e||(0,er.z3)(e)?k(e):r(e)}function P(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function A(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return(0,er.xz)(t)?(0,K.f)(e,z,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):z(t)}function z(t){return e.enter("htmlTextData"),o(t)}}}],91:eQ,92:[{name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return(0,er.Ch)(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}},eH],93:eV,95:eJ,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,r,n=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type)){for(t=i;++t13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(65535&r)==65535||(65535&r)==65534||r>1114111?"�":String.fromCodePoint(r)}let tt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tr(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){let e=r.charCodeAt(1),t=120===e||88===e;return te(r.slice(t?2:1),t?16:10)}return eU(r)||e}let tn={}.hasOwnProperty;function ti(e){return{line:e.line,column:e.column,offset:e.offset}}function to(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+S({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+S({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+S({start:t.start,end:t.end})+") is still open")}function ta(e){let t=this;t.parser=function(r){var i,o;let a,s,l,c;return"string"!=typeof(i={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(o=i,i=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:n(v),autolinkProtocol:c,autolinkEmail:c,atxHeading:n(h),blockQuote:n(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:n(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:n(p,i),codeText:n(function(){return{type:"inlineCode",value:""}},i),codeTextData:c,data:c,codeFlowValue:c,definition:n(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:n(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:n(m),hardBreakTrailing:n(m),htmlFlow:n(g,i),htmlFlowData:c,htmlText:n(g,i),htmlTextData:c,image:n(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:n(v),listItem:n(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:n(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:n(y),paragraph:n(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:n(h),strong:n(function(){return{type:"strong",children:[]}}),thematicBreak:n(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];if(!t.depth){let r=this.sliceSerialize(e).length;t.depth=r}},autolink:a(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t;let r=this.sliceSerialize(e),n=this.data.characterReferenceType;n?(t=te(r,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):t=eU(r);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=ti(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=(0,eI.d)(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(d),hardBreakTrailing:a(d),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){let t=e.children;r.children=t}else r.alt=t},labelText:function(e){let t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=t.replace(tt,tr),r.identifier=(0,eI.d)(t).toLowerCase()},lineEnding:function(e){let r=this.stack[this.stack.length-1];if(this.data.atHardBreak){r.children[r.children.length-1].position.end=ti(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(c.call(this,e),u.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=(0,eI.d)(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};(function e(t,r){let n=-1;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||to).call(a,void 0,e[0])}for(n.position={start:ti(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ti(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u-1){let e=r[0];"string"==typeof e?r[0]=e.slice(i):r.shift()}a>0&&r.push(e[o].slice(0,a))}return r}(a,e)}function f(){let{_bufferIndex:e,_index:t,line:r,column:i,offset:o}=n;return{_bufferIndex:e,_index:t,line:r,column:i,offset:o}}function p(e,t){t.restore()}function h(e,t){return function(r,i,o){let a,u,d,p;return Array.isArray(r)?h(r):"tokenize"in r?h([r]):function(e){let t=null!==e&&r[e],n=null!==e&&r.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)};function h(e){return(a=e,u=0,0===e.length)?o:m(e[u])}function m(e){return function(r){return(p=function(){let e=f(),t=c.previous,r=c.currentConstruct,i=c.events.length,o=Array.from(s);return{from:i,restore:function(){n=e,c.previous=t,c.currentConstruct=r,c.events.length=i,s=o,g()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?y(r):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,v,y)(r)}}function v(t){return e(d,p),i}function y(e){return(p.restore(),++u-1&&e.test(String.fromCharCode(t))}}function tu(e){let t=[],r=-1,n=0,i=0;for(;++r55295&&o<57344){let t=e.charCodeAt(r+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function td(e,t){let r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function tf(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}tc(/[#-'*+\--9=?A-Z^-~]/),tc(/\d/),tc(/[\dA-Fa-f]/),tc(/[!-/:-@[-`{-~]/),tc(/\p{P}|\p{S}/u),tc(/\s/);var tp=r(21623);function th(e,t){let r=t.referenceType,n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];let i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&"text"===a.type?a.value+=n:i.push({type:"text",value:n}),i}function tm(e){let t=e.spread;return null==t?e.children.length>1:t}function tg(e,t,r){let n=0,i=e.length;if(t){let t=e.codePointAt(n);for(;9===t||32===t;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}let tv={blockquote:function(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){let r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){let r;let n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=tu(i.toLowerCase()),a=e.footnoteOrder.indexOf(i),s=e.footnoteCounts.get(i);void 0===s?(s=0,e.footnoteOrder.push(i),r=e.footnoteOrder.length):r=a+1,s+=1,e.footnoteCounts.set(i,s);let l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return th(e,t);let i={src:tu(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(i.title=n.title);let o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){let r={src:tu(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return th(e,t);let i={href:tu(n.url||"")};null!==n.title&&void 0!==n.title&&(i.title=n.title);let o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){let r={href:tu(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){let n=e.all(t),i=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s0){let n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=(0,w.Pk)(t.children[1]),a=(0,w.rb)(t.children[t.children.length-1]);o&&a&&(n.position={start:o,end:a}),i.push(n)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){let n=r?r.children:void 0,i=0===(n?n.indexOf(t):1)?"th":"td",o=r&&"table"===r.type?r.align:void 0,a=o?o.length:t.children.length,s=-1,l=[];for(;++s0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return o.push(tg(t.slice(i),i>0,!1)),o.join("")}(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:ty,yaml:ty,definition:ty,footnoteDefinition:ty};function ty(){}let tb={}.hasOwnProperty,tx={};function tw(e,t){e.position&&(t.position=(0,w.FK)(e))}function tS(e,t){let r=t;if(e&&e.data){let t=e.data.hName,n=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===r.type?r.tagName=t:r={type:"element",tagName:t,properties:{},children:"children"in r?r.children:[r]}),"element"===r.type&&i&&Object.assign(r.properties,(0,ts.ZP)(i)),"children"in r&&r.children&&null!=n&&(r.children=n)}return r}function tk(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:"\n"});++n0&&r.push({type:"text",value:"\n"}),r}function tj(e){let t=0,r=e.charCodeAt(t);for(;9===r||32===r;)t++,r=e.charCodeAt(t);return e.slice(t)}function tE(e,t){let r=function(e,t){let r=t||tx,n=new Map,i=new Map,o={all:function(e){let t=[];if("children"in e){let r=e.children,n=-1;for(;++n0&&d.push({type:"text",value:" "});let e="string"==typeof r?r:r(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof n?n:n(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else o.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...(0,ts.ZP)(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(r),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&((0,s.ok)("children"in o),o.children.push({type:"text",value:"\n"},i)),o}function tO(e,t){return e&&"run"in e?async function(r,n){let i=tE(r,{file:n,...t});await e.run(i,n)}:function(r,n){return tE(r,{file:n,...e||t})}}function tC(e){if(e)throw e}var tI=r(94470);function tP(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let tA={basename:function(e,t){let r;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');tT(e);let n=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else i<0&&(r=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(r){n=o+1;break}}else a<0&&(r=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)},dirname:function(e){let t;if(tT(e),0===e.length)return".";let r=-1,n=e.length;for(;--n;)if(47===e.codePointAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.codePointAt(0)?"/":".":1===r&&47===e.codePointAt(0)?"//":e.slice(0,r)},extname:function(e){let t;tT(e);let r=e.length,n=-1,i=0,o=-1,a=0;for(;r--;){let s=e.codePointAt(r);if(47===s){if(t){i=r+1;break}continue}n<0&&(t=!0,n=r+1),46===s?o<0?o=r:1!==a&&(a=1):o>-1&&(a=-1)}return o<0||n<0||0===a||1===a&&o===n-1&&o===i+1?"":e.slice(o,n)},join:function(...e){let t,r=-1;for(;++r2){if((n=i.lastIndexOf("/"))!==i.length-1){n<0?(i="",o=0):o=(i=i.slice(0,n)).length-1-i.lastIndexOf("/"),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===r&&s>-1?s++:s=-1}return i}(e,!t);return 0!==r.length||t||(r="."),r.length>0&&47===e.codePointAt(e.length-1)&&(r+="/"),t?"/"+r:r}(t)},sep:"/"};function tT(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let tz={cwd:function(){return"/"}};function tN(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let tR=["history","path","basename","stem","extname","dirname"];class t_{constructor(e){let t,r;t=e?tN(e)?{path:e}:"string"==typeof e||e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e?{value:e}:e:{},this.cwd="cwd"in t?"":tz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++nt.length;a&&t.push(n);try{o=e.apply(this,t)}catch(e){if(a&&r)throw e;return n(e)}a||(o instanceof Promise?o.then(i,n):o instanceof Error?n(o):i(o))};function n(e,...i){r||(r=!0,t(e,...i))}function i(e){n(null,e)}})(s,i)(...a):n(null,...a)})(null,...t)},use:function(r){if("function"!=typeof r)throw TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}()}copy(){let e=new tB,t=-1;for(;++t0){let[n,...o]=t,a=r[i][1];tP(a)&&tP(n)&&(n=tI(!0,a,n)),r[i]=[e,n,...o]}}}}let tH=new tB().freeze();function tZ(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function tW(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function tV(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function t$(e){if(!tP(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function tq(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tG(e){return e&&"object"==typeof e&&"message"in e&&"messages"in e?e:new t_(e)}let tK=[],tX={allowDangerousHtml:!0},tJ=/^(https?|ircs?|mailto|xmpp)$/i,tY=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function tQ(e){let t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,a=e.components,l=e.disallowedElements,c=e.rehypePlugins||tK,u=e.remarkPlugins||tK,d=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tX}:tX,f=e.skipHtml,p=e.unwrapDisallowed,h=e.urlTransform||t0,g=tH().use(ta).use(u).use(tO,d).use(c),v=new t_;for(let r of("string"==typeof n?v.value=n:(0,s.t1)("Unexpected value `"+n+"` for `children` prop, expected `string`"),t&&l&&(0,s.t1)("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),tY))Object.hasOwn(e,r.from)&&(0,s.t1)("Unexpected `"+r.from+"` prop, "+(r.to?"use `"+r.to+"` instead":"remove it")+" (see for more info)");let y=g.parse(v),b=g.runSync(y,v);return o&&(b={type:"element",tagName:"div",properties:{className:o},children:"root"===b.type?b.children:[b]}),(0,tp.Vn)(b,function(e,n,i){if("raw"===e.type&&i&&"number"==typeof n)return f?i.children.splice(n,1):i.children[n]={type:"text",value:e.value},n;if("element"===e.type){let t;for(t in H)if(Object.hasOwn(H,t)&&Object.hasOwn(e.properties,t)){let r=e.properties[t],n=H[t];(null===n||n.includes(e.tagName))&&(e.properties[t]=h(String(r||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&r&&"number"==typeof n&&(o=!r(e,n,i)),o&&i&&"number"==typeof n)return p&&e.children?i.children.splice(n,1,...e.children):i.children.splice(n,1),n}}),function(e,t){var r,n,i;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=t.jsxDEV,o=function(e,t,n,i){let o=Array.isArray(n.children),s=(0,w.Pk)(e);return r(t,n,i,o,{columnNumber:s?s.column-1:void 0,fileName:a,lineNumber:s?s.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");n=t.jsx,i=t.jsxs,o=function(e,t,r,o){let a=Array.isArray(r.children)?i:n;return o?a(t,r,o):a(t,r)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?m.YP:m.dy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},l=R(s,e,void 0);return l&&"string"!=typeof l?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}(b,{Fragment:i.Fragment,components:a,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0})}function t0(e){let t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||tJ.test(e.slice(0,t))?e:""}var t1=r(90512),t2=r(47405);function t5(e){let{allowExternalVideo:t,components:r,className:n,...s}=e;return(0,i.jsx)(t2.Z,{children:(0,i.jsx)(tQ,{...s,className:(0,t1.Z)(n,"markdown-content"),components:{...r,a:e=>{let{node:r,href:n,...o}=e;if(!n)return(0,i.jsx)("a",{...o,children:o.children});if(t&&t4.some(e=>e.every(e=>null==n?void 0:n.includes(e))))return(0,i.jsx)("span",{className:"relative mx-auto mb-3 block aspect-video max-w-sm",children:(0,i.jsx)("iframe",{allowFullScreen:!0,src:n,className:"absolute inset-0 size-full border-none"})});let s=n.startsWith("http");return n=n.replace("//civitai.com","//".concat(location.host)),(0,i.jsx)(a.p,{legacyBehavior:!0,href:n,passHref:!0,children:(0,i.jsx)("a",{target:s?"_blank":"_self",rel:"nofollow noreferrer",children:o.children})})},table:e=>{let{node:t,children:r,ref:n,...a}=e;return(0,i.jsx)(o.i,{...a,striped:!0,withBorder:!0,withColumnBorders:!0,children:r})}}})})}let t4=[["youtube","embed"],["drive.google.com","preview"]]},20897:function(e,t,r){"use strict";r.d(t,{b:function(){return u}});var n=r(85893),i=r(48427),o=r(67294),a=r(97693),s=r(58192),l=r(90512);let c=(0,o.forwardRef)((e,t)=>{let{height:r,children:i,style:o,uniform:c,frameDecoration:u,className:d,onClick:f,withBorder:p,shadow:h,...m}=e;return(0,n.jsx)(a.A,{cosmetic:null==u?void 0:u.data,children:(0,n.jsx)(s.I,{ref:t,style:{height:r,...o},className:(0,l.Z)(d,{border:p,shadow:void 0!==h}),onClick:f,children:i})})});c.displayName="MasonryCard";let u=(0,i.F)(c)},94652:function(e,t,r){"use strict";r.d(t,{a:function(){return l}});var n=r(85893),i=r(64761),o=r(88002),a=r(65695),s=r(70096);function l(e){let{onClick:t}=e;return(0,i.rZ)(),(0,n.jsx)(s.b,{reason:"add-to-collection",children:(0,n.jsx)(o.v.Item,{icon:(0,n.jsx)(a.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),t()},children:"Save"})})}},38903:function(e,t,r){"use strict";r.d(t,{S:function(){return s}});var n=r(85893),i=r(88002),o=r(7893),a=r(70096);function s(e){let{loginReason:t="report-content",label:r="Report resource",onReport:s}=e;return(0,n.jsx)(a.b,{reason:t,children:(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(o.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),s()},children:r})})}},10523:function(e,t,r){"use strict";r.d(t,{b:function(){return u}});var n=r(85893),i=r(88002),o=r(5140),a=(0,r(21955).Z)("outline","search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),s=r(17578),l=r(72456),c=r(35818);function u(e){let{entityType:t,entityId:r}=e,u=(0,s.xJ)(),d=l.SX.useContext(),{data:f=[],isLoading:p}=l.SX.common.getEntityAccess.useQuery({entityId:[r],entityType:t},{enabled:null==u?void 0:u.isModerator}),[h]=null!=f?f:[],{mutateAsync:m}=l.SX.common.updateAvailability.useMutation({onSuccess:(e,n)=>{let{availability:i}=n;d.common.getEntityAccess.setData({entityId:[r],entityType:t},e=>e?[{...e[0],availability:i}]:e)}});if(!(null==u?void 0:u.isModerator)||!h)return null;let g=h.availability===c.a8.Public;return p?(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(o.Z,{size:14,stroke:1.5}),disabled:!0,children:"…Loading…"}):(0,n.jsx)(i.v.Item,{icon:g?(0,n.jsx)(a,{size:14,stroke:1.5}):(0,n.jsx)(o.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),m({entityId:r,entityType:t,availability:g?c.a8.Unsearchable:c.a8.Public})},children:g?"Remove ".concat(t," from search"):"Add ".concat(t," to search")})}},37398:function(e,t,r){"use strict";r.d(t,{h:function(){return c}});var n=r(85893),i=r(9008),o=r.n(i),a=r(70652),s=r(54671),l=r(66035);function c(e){let{title:t,description:r,links:i=[],schema:c,deIndex:u,images:d,imageUrl:f}=e,p=d?[].concat(d):void 0,h=null==p?void 0:p.find(e=>(0,s.A_)(e.nsfwLevel)),m=(null==h?void 0:h.type)==="video"?{anim:!1,transcode:!0,optimized:!0}:{},g=h?(0,a.Qy)(h.url,{width:1200,...m}):f,{canIndex:v}=(0,l.b)();return(0,n.jsxs)(o(),{children:[t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:t}),(0,n.jsx)("meta",{name:"title",content:t}),(0,n.jsx)("meta",{property:"og:title",content:t}),(0,n.jsx)("meta",{property:"twitter:title",content:t})]}),r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"description",content:r}),(0,n.jsx)("meta",{property:"og:description",content:r}),(0,n.jsx)("meta",{property:"twitter:description",content:r})]}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{property:"og:image",content:g}),(0,n.jsx)("meta",{property:"twitter:image",content:g}),(0,n.jsx)("meta",{name:"robots",content:"max-image-preview:large"})]}),(u||!v)&&(0,n.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),i.map((e,t)=>(0,n.jsx)("link",{...e},e.href||t)),c&&(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}},"product-schema")]})}},9155:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M},openAssociateModelsModal:function(){return _}});var n=r(85893),i=r(97564),o=r(71232),a=r(95117),s=r(80971),l=r(21017),c=r(17789),u=r(61885),d=r(60887),f=r(45587),p=r(67841),h=r(9094),m=r(20966),g=r(49834),v=r(74403),y=r(64523),b=r(63324),x=r(236),w=r(94351),S=r(77446),k=r(67294),j=r(83895),E=r(72456),O=r(56621),C=r(17578),I=r(54671);function P(e){let{fromId:t,type:r,onSave:s,limit:u=10}=e,y=(0,C.xJ)(),P=E.SX.useUtils(),[A,T]=(0,k.useState)(!1),z=(0,d.Dy)((0,d.VT)(d.we,{activationConstraint:{distance:8}})),{data:N=[],isLoading:R}=E.SX.model.getAssociatedResourcesSimple.useQuery({fromId:t,type:r,browsingLevel:I.ki}),[_,M]=(0,k.useState)(N),[D,L]=(0,k.useState)("all"),{mutate:F,isLoading:U}=E.SX.model.setAssociatedResources.useMutation({onSuccess:async()=>{P.model.getAssociatedResourcesSimple.setData({fromId:t,type:r,browsingLevel:I.ki},()=>_),await P.model.getAssociatedResourcesCardData.invalidate({fromId:t,type:r}),T(!1),null==s||s()}}),B=e=>{let t=[..._.filter(t=>{let{item:r}=t;return r.id!==e})];M(t),T(!(0,S.Z)(N,t))};(0,k.useEffect)(()=>{!_.length&&N.length&&M(N)},[N]);let H="me"===D;return(0,n.jsxs)(i.K,{children:[_.length{T(!0),M(n=>"Model"===e.entityType?n.some(t=>t.item.id===e.entityId)||e.entityId===t?n:[...n,{resourceType:"model",item:r}]:n.some(t=>t.item.id===e.entityId)||e.entityId===t?n:[...n,{resourceType:"article",item:r}])},filters:H&&y?"user.username='".concat(y.username,"'"):void 0,rightSectionWidth:100,rightSection:(0,n.jsx)(p.z,{size:"xs",variant:"light",onClick:()=>L(e=>"me"===e?"all":"me"),compact:!0,children:H?"Only mine":"Everywhere"}),dropdownItemLimit:25,clearable:!1}),R?(0,n.jsx)(h.M,{p:"xl",children:(0,n.jsx)(m.a,{})}):(0,n.jsxs)(i.K,{spacing:0,children:[(0,n.jsxs)(a.x,{align:"right",color:"dimmed",size:"xs",children:["You can select ",u-_.length," more resources"]}),_.length?(0,n.jsx)(d.LB,{sensors:z,collisionDetection:d.pE,onDragEnd:e=>{let{active:t,over:r}=e;if(r&&t.id!==r.id){let e=[..._],n=e.map(e=>{let{item:t}=e;return t.id}),i=n.indexOf(t.id),o=n.indexOf(r.id),a=(0,f.Rp)(e,i,o);M(a),T(!(0,S.Z)(N,a))}},children:(0,n.jsx)(f.Fo,{items:_.map(e=>{let{item:t}=e;return t.id}),strategy:f.qw,children:(0,n.jsx)(i.K,{spacing:4,children:_.map(e=>(0,n.jsx)(j.T,{id:e.item.id,children:(0,n.jsx)(l.Z,{withBorder:!0,pl:4,pr:6,pt:4,pb:6,children:(0,n.jsxs)(o.Z,{position:"apart",children:[(0,n.jsxs)(o.Z,{align:"center",spacing:"xs",children:[(0,n.jsx)(b.Z,{}),(0,n.jsxs)(i.K,{spacing:4,children:[(0,n.jsx)(a.x,{size:"md",lineClamp:2,children:"name"in e.item?e.item.name:e.item.title}),(0,n.jsxs)(o.Z,{spacing:4,children:[(0,n.jsx)(c.C,{size:"xs",children:"type"in e.item?e.item.type:"Article"}),(0,n.jsx)(c.C,{size:"xs",pl:4,children:(0,n.jsxs)(o.Z,{spacing:2,children:[(0,n.jsx)(x.Z,{size:12,strokeWidth:2.5}),e.item.user.username]})}),!(0,I.A_)(e.item.nsfwLevel)&&(0,n.jsx)(c.C,{color:"red",size:"xs",children:"NSFW"})]})]})]}),(0,n.jsx)(g.A,{variant:"outline",color:"red",onClick:()=>B(e.item.id),children:(0,n.jsx)(w.Z,{size:20})})]})})},e.item.id))})})}):(0,n.jsxs)(v.b,{children:["There are no ",r.toLowerCase()," resources associated with this model"]})]}),A&&(0,n.jsxs)(o.Z,{position:"right",children:[(0,n.jsx)(p.z,{variant:"default",onClick:()=>{T(!1),M(N)},children:"Reset"}),(0,n.jsx)(p.z,{onClick:()=>{F({fromId:t,type:r,associations:_.map(e=>{let{id:t,resourceType:r,item:n}=e;return{id:t,resourceType:r,resourceId:n.id}})})},loading:U,children:"Save Changes"})]})]})}(0,k.forwardRef)((e,t)=>{let{value:r,item:s,nsfw:l,...u}=e;return(0,n.jsx)(y.x,{ref:t,...u,children:(0,n.jsxs)(o.Z,{noWrap:!0,spacing:"xs",children:[(0,n.jsxs)(i.K,{spacing:0,children:[(0,n.jsx)(a.x,{lineClamp:1,lh:1,children:r}),(0,n.jsxs)(a.x,{size:"xs",color:"dimmed",lineClamp:1,lh:1,children:["by ",s.user.username]})]}),l&&(0,n.jsx)(c.C,{color:"red",ml:"auto",children:"NSFW"})]})})}).displayName="SearchItem";var A=r(21782),T=r(35362),z=r(5779);let{openModal:N,Modal:R}=(0,T.W)({name:"associateModels",withCloseButton:!1,size:600,Element:e=>{let{context:t,props:{fromId:r,type:d,versionId:f}}=e,p=(0,z.g)(),{data:h}=E.SX.model.getById.useQuery({id:r}),{toggleResourceRecommendation:m,isLoading:g}=(0,A.D)(),v=null==h?void 0:h.modelVersions.find(e=>e.id===f),y=async()=>{f&&p.recommenders&&await m({resourceId:f}).catch(()=>null)};return(0,n.jsxs)(i.K,{children:[(0,n.jsxs)(o.Z,{noWrap:!0,position:"apart",children:[(0,n.jsx)(a.x,{children:"Manage ".concat(d," Resources")}),(0,n.jsx)(s.P,{onClick:t.close})]}),p.recommenders&&(0,n.jsx)(l.Z,{withBorder:!0,children:(0,n.jsxs)(o.Z,{spacing:8,position:"apart",noWrap:!0,children:[(0,n.jsxs)(i.K,{spacing:0,children:[(0,n.jsxs)(o.Z,{spacing:8,noWrap:!0,children:[(0,n.jsx)(a.x,{weight:600,children:"Include AI recommendations"}),(0,n.jsx)(c.C,{radius:"xl",size:"sm",color:"yellow",children:"Beta"})]}),(0,n.jsx)(a.x,{size:"sm",color:"dimmed",children:"Use Civitai AI to recommended resources related to your creation"})]}),(0,n.jsx)(u.r,{onChange:y,defaultChecked:null==v?void 0:v.meta.allowAIRecommendations,disabled:g})]})}),(0,n.jsx)(P,{fromId:r,type:d,onSave:t.close})]})}}),_=N;var M=R},26813:function(e,t,r){"use strict";r.r(t),r.d(t,{openBlockModelTagsModal:function(){return v}});var n=r(85893),i=r(9094),o=r(20966),a=r(97564),s=r(95117),l=r(64002),c=r(71232),u=r(67841),d=r(67294),f=r(35362),p=r(49630),h=r(72456);let{openModal:m,Modal:g}=(0,f.W)({name:"blockModelTags",title:"Hide Tags",Element:e=>{let{context:t,props:{modelId:r}}=e,f=(0,p.s9)().hiddenTags,m=(0,d.useMemo)(()=>f.filter(e=>e.hidden),[f]),{data:g,isLoading:v}=h.SX.tag.getAll.useQuery({limit:200,entityType:["Model"],modelId:r}),y=(0,d.useMemo)(()=>{var e;return null!==(e=null==g?void 0:g.items)&&void 0!==e?e:[]},[null==g?void 0:g.items]),b=(0,d.useMemo)(()=>y.filter(e=>m.some(t=>t.id===e.id)),[y,m]),[x,w]=(0,d.useState)([]);(0,d.useEffect)(()=>{b.length&&w(b.map(e=>String(e.id)))},[b]);let S=(0,p.ZI)(),k=async()=>{let e=x.map(Number),r=y.filter(t=>e.includes(t.id)).map(e=>{let{id:t,name:r}=e;return{id:t,name:r}});await S.mutateAsync({kind:"tag",data:r,hidden:!0}),t.close()};return v?(0,n.jsx)(i.M,{p:"lg",children:(0,n.jsx)(o.a,{size:"lg"})}):(0,n.jsx)(a.K,{children:y.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.x,{size:"sm",color:"dimmed",children:"Select the tags you want to add to your blocking list"}),(0,n.jsx)(l.A.Group,{spacing:4,position:"center",value:x,onChange:w,multiple:!0,children:y.map(e=>{let t=x.includes(String(e.id));return(0,n.jsx)(l.A,{color:t?"red":void 0,radius:"xs",value:String(e.id),children:(0,n.jsx)("span",{children:e.name})},e.id)})}),(0,n.jsxs)(c.Z,{position:"apart",children:[(0,n.jsx)(u.z,{variant:"default",onClick:t.close,children:"Cancel"}),(0,n.jsx)(u.z,{onClick:k,loading:S.isLoading,children:"Save"})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.x,{children:"This model doesn't have any tags"}),(0,n.jsx)(c.Z,{position:"right",children:(0,n.jsx)(u.z,{variant:"default",onClick:t.close,children:"Close"})})]})})}}),v=m;t.default=g},74082:function(e,t,r){"use strict";r.d(t,{R:function(){return C},o:function(){return I}});var n=r(85893),i=r(56817),o=r(38090),a=r(20050),s=r(9094),l=r(20966),c=r(97564),u=r(67841),d=r(71232),f=r(82623),p=r(25963),h=r(79735),m=r(1604),g=r(10194),v=r(81643),y=r(20573),b=r(28075),x=r(20897),w=r(66214),S=r(38498),k=r(81447),j=r(69519);let E=(0,i.k)(e=>({preview:{order:1,[k.D.largerThan("xs")]:{order:2}},decorations:{order:2,[e.fn.largerThan("xs")]:{order:1}},hideMobile:{[e.fn.smallerThan("xs")]:{display:"none"}},showMobile:{[e.fn.largerThan("xs")]:{display:"none"}}})),O=m.z.object({cosmetic:j.cl.nullish()});function C(e){var t;let{entityType:r,entityId:i,image:m,currentCosmetic:g}=e,x=(0,y.D)(),k=(0,w.cI)({schema:O,defaultValues:{cosmetic:g}}),{classes:j}=E(),{data:C,isInitialLoading:P}=(0,v.pA)(),{equip:A,unequip:T,isLoading:z}=(0,v.nt)(),N=async e=>{let{cosmetic:t}=e;if(g&&!t&&g){await T({equippedToId:i,equippedToType:r,cosmeticId:g.id,claimKey:g.claimKey}).catch(()=>null),x.onClose();return}async function n(){t&&await A({equippedToId:i,equippedToType:r,cosmeticId:t.id,claimKey:t.claimKey}).catch(()=>null),x.onClose()}if(D&&D.inUse)return(0,p._5)({title:"Reassign Content Decoration",children:"This content decoration is being used on another post. Are you sure you want to reassign it?",labels:{confirm:"Continue",cancel:"No, go back"},onConfirm:n,zIndex:310});await n()},{isDirty:R}=k.formState,_=k.watch("cosmetic"),M=null!==(t=null==C?void 0:C.contentDecorations.filter(e=>{let{data:t,forId:n,forType:o}=e;return(t.url||t.cssFrame)&&(!n||n&&o&&n===i&&o===r)}))&&void 0!==t?t:[],D=M.find(e=>e.id===(null==_?void 0:_.id)&&e.claimKey===(null==_?void 0:_.claimKey));return(0,n.jsx)(o.u,{...x,onClose:()=>{z||x.onClose()},title:"Content Decorations",closeButtonLabel:"Close content decorations modal",size:"lg",closeOnClickOutside:!z,closeOnEscape:!z,children:(0,n.jsx)(w.l0,{form:k,onSubmit:N,children:(0,n.jsxs)(a.r,{gutter:"xl",children:[(0,n.jsx)(a.r.Col,{xs:12,sm:6,className:j.decorations,children:P?(0,n.jsx)(s.M,{children:(0,n.jsx)(l.a,{})}):(0,n.jsxs)(c.K,{children:[(0,n.jsx)(w.RB,{name:"cosmetic",data:M,shopUrl:"/shop",gridProps:{breakpoints:[{cols:3,minWidth:"xs"}]}}),(0,n.jsx)(u.z,{radius:"xl",type:"submit",w:"80%",mx:"auto",className:j.showMobile,disabled:P||!R,children:"Apply"})]})}),(0,n.jsx)(a.r.Col,{xs:12,sm:6,className:j.preview,children:(0,n.jsxs)(c.K,{align:"center",spacing:"xl",children:[D&&D.entityImage&&(D.entityImage.entityId!==i||D.entityImage.entityType!==r)&&(0,n.jsxs)(d.Z,{noWrap:!0,children:[(0,n.jsx)(f.X,{className:"overflow-hidden",radius:"md",w:48,h:62,children:(0,n.jsx)(b.P,{src:D.entityImage.url,thumbnailUrl:D.entityImage.thumbnailUrl,type:D.entityImage.type,width:S.N5,alt:"current item with decoration",className:"size-full object-cover",wrapperProps:{className:"h-full"},skip:4})}),(0,n.jsx)(h.Z,{size:24,style:{flexShrink:0}}),(0,n.jsx)(f.X,{className:"overflow-hidden",radius:"md",w:48,h:62,children:(0,n.jsx)(b.P,{src:m.url,thumbnailUrl:m.thumbnailUrl,type:m.type,width:S.N5,alt:"new item with decoration",className:"size-full object-cover",wrapperProps:{className:"h-full"},skip:4,contain:!0})})]}),(0,n.jsx)(I,{image:m,decoration:D}),(0,n.jsx)(u.z,{radius:"xl",type:"submit",w:"80%",mx:"auto",className:j.hideMobile,disabled:P||!R,loading:z,children:"Apply"})]})})]})})})}let I=e=>{let{image:t,decoration:r}=e,i=t&&t.width&&t.height?t.width/t.height:1,o=i>1?S.N5*i:S.N5,{classes:a}=(0,g.v)({aspectRatio:i});if(!t)return null;let s=(t.height&&t.width?t.height/t.width:1)*S._G.cardSizes.image;return(0,n.jsx)(x.b,{height:s,frameDecoration:r,children:(0,n.jsx)(b.P,{src:t.url,type:t.type,className:a.image,width:o,wrapperProps:{className:"h-full"},anim:!0,contain:!0})})}},33428:function(e,t,r){"use strict";r.r(t),r.d(t,{openManageClubPostModal:function(){return b}});var n=r(85893),i=r(35362),o=r(67294),a=r(72456),s=r(9094),l=r(20966),c=r(97564),u=r(95117),d=r(67841),f=r(66214),p=r(32508),h=r(93747),m=r(2807);let g=p.al.omit({entityId:!0,entityType:!0}),{openModal:v,Modal:y}=(0,i.W)({name:"manageClubPostModal",withCloseButton:!1,centered:!0,size:"lg",radius:"lg",zIndex:400,Element:e=>{var t;let{context:r,props:{entityId:i,entityType:p}}=e,{data:v,isLoading:y}=a.SX.club.resourceDetails.useQuery({entityId:i,entityType:p}),{upsertClubResource:b,upsertingResource:x}=(0,h.eD)(),w=()=>{r.close()},S=(0,f.cI)({schema:g,defaultValues:{clubs:null!==(t=null==v?void 0:v.clubs)&&void 0!==t?t:[]}}),k=async e=>{await b({...e,entityId:i,entityType:p}),w(),(0,m.LX)({message:"Resource clubs updated successfully!"})};return((0,o.useEffect)(()=>{if(v){var e;S.reset({clubs:null!==(e=v.clubs)&&void 0!==e?e:[]})}},[v]),y)?(0,n.jsx)(s.M,{children:(0,n.jsx)(l.a,{})}):(0,n.jsx)(f.l0,{form:S,onSubmit:k,children:(0,n.jsxs)(c.K,{children:[(0,n.jsx)(u.x,{children:"Manage resource’s clubs"}),(0,n.jsx)(f._n,{name:"clubs"}),(0,n.jsx)(d.z,{type:"submit",loading:x,children:"Save"})]})})}}),b=v;t.default=y},7823:function(e,t,r){"use strict";r.r(t),r.d(t,{openRunStrategyModal:function(){return s}});var n=r(85893),i=r(35362),o=r(95117),a=r(42551);let{openModal:s,Modal:l}=(0,i.W)({name:"runStrategy",title:(0,n.jsx)(o.x,{weight:700,children:"Generate using this model now"}),size:600,Element:e=>{let{props:{modelVersionId:t}}=e;return(0,n.jsx)(a.e,{modelVersionId:t})}});t.default=l},10479:function(e,t,r){"use strict";r.r(t),r.d(t,{openSendTipModal:function(){return R}});var n=r(85893),i=r(56817),o=r(97564),a=r(95117),s=r(71232),l=r(17789),c=r(80971),u=r(54777),d=r(64002),f=r(67841),p=r(35818),h=r(83425),m=r(67294),g=r(1604),v=r(38574),y=r(67882),b=r(61328),x=r(13520),w=r(35362),S=r(66214),k=r(2807),j=r(88182),E=r(72456),O=r(86164),C=r(54870),I=r(38498);let P=(0,i.k)(e=>({presetCard:{position:"relative",width:"100%",borderRadius:e.radius.sm,border:"1px solid ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2]),"&:hover:not([disabled])":{borderColor:e.colors.blue[6]},"&[disabled]":{opacity:.5,cursor:"not-allowed"}},sendIcon:{backgroundColor:e.colors.blue[e.fn.primaryShade()],color:e.white,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},label:{padding:"0 ".concat(e.spacing.xs,"px"),"&[data-checked]":{border:"2px solid ".concat(e.colors.accent[5]),color:e.colors.accent[5],'&[data-variant="filled"], &[data-variant="filled"]:hover':{backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white}}},iconWrapper:{display:"none"},chipGroup:{gap:8,[e.fn.smallerThan("sm")]:{gap:e.spacing.md}},actions:{[e.fn.smallerThan("sm")]:{flexDirection:"column",position:"absolute",bottom:0,left:0,width:"100%",padding:e.spacing.md}},cancelButton:{[e.fn.smallerThan("sm")]:{width:"100%",order:2}},submitButton:{[e.fn.smallerThan("sm")]:{width:"100%",order:1}}})),A=g.z.object({amount:g.z.string(),customAmount:g.z.number().positive().min(I._G.buzz.minTipAmount).max(I._G.buzz.maxTipAmount).optional(),description:g.z.string().trim().max(100,"Cannot be longer than 100 characters").optional()}).refine(e=>"-1"!==e.amount||e.customAmount,{message:"Please enter a valid amount",path:["customAmount"]}),T=[{label:"xs",amount:"100"},{label:"sm",amount:"200"},{label:"md",amount:"500"},{label:"lg",amount:"1000"}],{openModal:z,Modal:N}=(0,w.W)({name:"sendTip",centered:!0,radius:"lg",withCloseButton:!1,Element:e=>{var t;let{context:r,props:{toUserId:i,entityId:g,entityType:w}}=e,{classes:z}=P(),N=E.SX.useUtils(),[R,_]=(0,m.useState)(!1),M=(0,S.cI)({schema:A,defaultValues:{amount:T[0].amount}}),{trackAction:D}=(0,O.K)(),{conditionalPerformTransaction:L}=(0,v.VN)({message:e=>"You don't have enough funds to perform this action. Required Buzz: ".concat((0,j.x6)(e),". Buy or earn more buzz to perform this action."),purchaseSuccessMessage:e=>(0,n.jsxs)(o.K,{children:[(0,n.jsx)(a.x,{children:"Thank you for your purchase!"}),(0,n.jsxs)(a.x,{children:["We have added ",(0,n.jsx)(b.N,{currency:p.F.BUZZ,unitAmount:e})," ","to your account and your tip has been sent to the desired user."]})]}),performTransactionOnPurchase:!0}),F=E.SX.buzz.tipUser.useMutation({async onSuccess(){_(!1),U(),await N.buzz.getBuzzAccount.invalidate()},onError(e){(0,k.s9)({title:"Unable to send tip",error:Error(e.message)})}}),U=()=>r.close(),B=R||F.isLoading,[H,Z,W]=M.watch(["amount","description","customAmount"]),V=-1===Number(H)?W:Number(H);return(0,n.jsxs)(o.K,{spacing:"md",children:[(0,n.jsxs)(s.Z,{position:"apart",noWrap:!0,children:[(0,n.jsx)(a.x,{size:"lg",weight:700,children:"Tip"}),(0,n.jsxs)(s.Z,{spacing:"sm",noWrap:!0,children:[(0,n.jsx)(l.C,{radius:"xl",variant:"filled",h:"auto",py:4,px:12,sx:e=>({backgroundColor:"dark"===e.colorScheme?e.fn.rgba("#000",.31):e.colors.gray[0]}),children:(0,n.jsxs)(s.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(a.x,{size:"xs",color:"dimmed",transform:"capitalize",weight:600,children:"Available Buzz"}),(0,n.jsx)(C.a,{iconSize:16,textSize:"sm",accountType:"user",withTooltip:!0})]})}),(0,n.jsx)(c.P,{radius:"xl",iconSize:22,onClick:U})]})]}),(0,n.jsx)(u.i,{mx:"-lg"}),(0,n.jsx)(a.x,{children:"How much buzz do you want to tip?"}),(0,n.jsx)(S.l0,{form:M,onSubmit:e=>{let{customAmount:t,description:r}=e,n=Number(e.amount),o=-1===Number(n)?null!=t?t:0:Number(n);L(o,()=>(D({type:"Tip_Confirm",details:{toUserId:i,entityType:w,entityId:g,amount:o}}).catch(()=>void 0),F.mutate({toAccountId:i,amount:o,description:r||null,entityId:g,entityType:w})))},style:{position:"static"},children:(0,n.jsxs)(o.K,{spacing:"md",children:[(0,n.jsxs)(S.eH,{className:z.chipGroup,name:"amount",spacing:8,children:[T.map(e=>(0,n.jsx)(d.A,{classNames:z,variant:"filled",value:e.amount,children:(0,n.jsxs)(s.Z,{spacing:4,children:[e.amount===H&&(0,n.jsx)(h.Z,{size:16,fill:"currentColor"}),e.amount]})},e.label)),(0,n.jsx)(d.A,{classNames:z,variant:"filled",value:"-1",children:(0,n.jsxs)(s.Z,{spacing:4,children:["-1"===H&&(0,n.jsx)(h.Z,{size:16,fill:"currentColor"}),"Other"]})})]}),"-1"===H&&(0,n.jsx)(S.Rn,{name:"customAmount",placeholder:"Your tip. Minimum 50 BUZZ",variant:"filled",rightSectionWidth:"10%",min:1,max:I._G.buzz.maxTipAmount,disabled:B,icon:(0,n.jsx)(x.r,{currency:"BUZZ",size:16}),parser:e=>null==e?void 0:e.replace(/\$\s?|(,*)/g,""),formatter:e=>e&&!Number.isNaN(parseFloat(e))?e.replace(RegExp("\\B(?{let{onPaymentSuccess:t,clientSecret:r}=e,[n,i]=(0,h.useState)(!1),o=(0,h.useRef)(0),a=(0,g.useStripe)(),s=(0,g.useElements)(),l=(0,h.useCallback)(async e=>{if(a)return await a.retrievePaymentIntent(e)},[a,r]),c=(0,y.Y)(async()=>{if(o.current>=w){f("processing_too_long"),m("Your payment is taking too long to be processed. Once the payment goes through, you will receive a confirmation email and purchase will be completed."),i(!1);return}if(o.current+=1,!r)return;let e=await l(r);if(!e)return;let{paymentIntent:t}=e;await u(t)},S),u=(0,h.useCallback)(async e=>{if(!e){f("error"),i(!1);return}switch(e.status){case"succeeded":try{f("succeeded"),await (null==t?void 0:t(e)),i(!1)}catch(e){m("Payment was successful but there was an error performing requested actions after completion. Please contact support. Do not attempt to pay again."),i(!1),f("success_with_error")}break;case"processing":f("processing"),i(!0),c.active||c.start();break;case"requires_payment_method":f("requires_payment_method"),m("Your card was declined."),i(!1);break;default:f("error"),m("Something went wrong."),i(!1)}},[t,c]),[d,f]=(0,h.useState)(""),[p,m]=(0,h.useState)("");return(0,h.useEffect)(()=>(!n&&c.active&&c.stop(),()=>{n||c.stop()}),[n,c.active]),{errorMessage:p,onConfirmPayment:async e=>{if(!a||!(s||e))return;i(!0),o.current=0;let{error:t,paymentIntent:n}=e?await a.confirmPayment({clientSecret:r,redirect:"if_required",confirmParams:{return_url:"".concat(x.O.NEXT_PUBLIC_BASE_URL,"/purchase/buzz"),payment_method:e,expand:["payment_method"]}}):s?await a.confirmPayment({elements:s,redirect:"if_required",confirmParams:{return_url:"".concat(x.O.NEXT_PUBLIC_BASE_URL,"/purchase/buzz"),expand:["payment_method"]}}):{error:{message:"Something went wrong."},paymentIntent:void 0};if(t){var l;"card_error"===t.type||"validation_error"===t.type?f(t.type):f("error"),m(null!==(l=t.message)&&void 0!==l?l:"Something went wrong."),i(!1);return}return u(n),n},processingPayment:n,paymentIntentStatus:d}};var j=r(88182),E=r(86164),O=r(25963),C=r(40382),I=r(34324),P=r(21708),A=r(1566),T=r(72050);let z=e=>{let{error:t,onClose:r}=e;return(0,n.jsxs)(i.K,{children:[(0,n.jsx)(o.D,{order:3,children:"Whoops!"}),(0,n.jsx)(A.L,{icon:(0,n.jsx)(T.Z,{}),color:"red",iconColor:"red",title:"Sorry, it looks like there was an error",children:t}),(0,n.jsx)(P.CY,{}),(0,n.jsx)(a.M,{children:(0,n.jsx)(s.z,{onClick:r,children:"Close this window"})})]})},N=e=>{var t;let{unitAmount:r,currency:o,message:a,onSuccess:d,onClose:f,metadata:p,clientSecret:m,successMessage:v,paymentMethodTypes:y=[],setupFuturePayment:b,setupFuturePaymentToggle:x}=e,{userPaymentMethods:w,isLoading:S}=(0,C.KR)(),[A,T]=(0,h.useState)(!1),z=(0,h.useMemo)(()=>{var e,t,r;let n=null!==(e=null==w?void 0:w.filter(e=>y.includes(e.type)))&&void 0!==e?e:[],i=[],o=new Set;for(let e of n){let n=null!==(r=null===(t=e.card)||void 0===t?void 0:t.last4)&&void 0!==r?r:e.id;o.has(n)||(o.add(n),i.push(e))}return i},[w,y]),{trackAction:N}=(0,E.K)(),{processingPayment:R,onConfirmPayment:_,errorMessage:M,paymentIntentStatus:D}=k({clientSecret:m,onPaymentSuccess:async e=>{await (null==d?void 0:d(e.id)),T(!0)},metadata:p}),L="processing_too_long"===D,F="success_with_error"===D;return A?(0,n.jsxs)(i.K,{children:[(0,n.jsx)(l.Z,{position:"apart",noWrap:!0,children:(0,n.jsx)(c.x,{size:"lg",weight:700,children:"Complete your transaction"})}),(0,n.jsx)(u.i,{mx:"-lg"}),v?(0,n.jsx)(n.Fragment,{children:v}):(0,n.jsx)(c.x,{children:"Thank you for your purchase!"}),(0,n.jsx)(s.z,{onClick:()=>{(0,O.pT)(),f()},children:"Close"})]}):F?(0,n.jsxs)(i.K,{children:[(0,n.jsx)(l.Z,{position:"apart",noWrap:!0,children:(0,n.jsx)(c.x,{size:"lg",weight:700,children:"Complete your transaction"})}),(0,n.jsx)(u.i,{mx:"-lg"}),(0,n.jsxs)(c.x,{children:["Thank you, we have received your payment but something seems to have gone wrong. Please"," ",(0,n.jsx)(c.x,{component:"span",weight:"bold",children:"DO NOT ATTEMPT TO PURCHASE AGAIN"}),". If your Buzz is not delivered within the next few minutes, please contact support."]}),(0,n.jsx)(s.z,{onClick:()=>{(0,O.pT)(),f()},children:"Close"})]}):(0,n.jsx)("form",{id:"stripe-payment-form",onSubmit:async e=>{var t;e.preventDefault();let r=await _();r&&N({type:"PurchaseFunds_Confirm",details:{...p,method:null===(t=r.payment_method)||void 0===t?void 0:t.type}}).catch(()=>void 0)},children:(0,n.jsxs)(i.K,{spacing:"md",children:[(0,n.jsx)(l.Z,{position:"apart",noWrap:!0,children:(0,n.jsx)(c.x,{size:"lg",weight:700,children:"Complete your transaction"})}),(0,n.jsx)(u.i,{mx:"-lg"}),a&&(0,n.jsx)(n.Fragment,{children:a}),(null!==(t=null==z?void 0:z.length)&&void 0!==t?t:0)>0&&(0,n.jsxs)(i.K,{children:[(0,n.jsx)(u.i,{mx:"-lg"}),(0,n.jsx)(c.x,{weight:"bold",children:"Saved payment methods"}),(0,n.jsx)(i.K,{spacing:"sm",children:z.map(e=>(0,n.jsx)(I.y,{paymentMethod:e,children:(0,n.jsxs)(s.z,{color:"blue",onClick:async()=>{await _(e.id),N({type:"PurchaseFunds_Confirm",details:{...p,method:e.type}}).catch(()=>void 0)},disabled:R||L||F,loading:R,children:["Pay $",(0,j.UD)(r,o)]})},e.id))}),(0,n.jsx)(u.i,{mx:"-lg"}),(0,n.jsx)(c.x,{weight:"bold",children:"Add new payment method"})]}),b&&(0,n.jsxs)(c.x,{size:"sm",children:["Don’t see your payment method?"," ",(0,n.jsx)(c.x,{color:"blue.4",component:"button",onClick:x,children:"Click here"})]}),!b&&(0,n.jsx)(c.x,{size:"sm",children:(0,n.jsx)(c.x,{color:"blue.4",component:"button",onClick:x,children:"Back to default payment methods"})}),(0,n.jsx)(g.PaymentElement,{id:"payment-element",options:{layout:"tabs"}}),M&&(0,n.jsx)(c.x,{color:"red",size:"sm",children:M}),(0,n.jsx)(P.CY,{}),(0,n.jsxs)(l.Z,{position:"right",children:[(0,n.jsx)(s.z,{variant:"filled",color:"gray",onClick:()=>{N({type:"PurchaseFunds_Cancel",details:{step:2}}).catch(()=>void 0),f()},disabled:R,children:L||F?"Close":"Cancel"}),(0,n.jsx)(s.z,{component:"button",disabled:R||L||F,loading:R,type:"submit",children:R?"Processing...":"Pay $".concat((0,j.UD)(r,o))})]})]})})},{openModal:R,Modal:_}=(0,m.W)({name:"stripeTransaction",withCloseButton:!1,size:"lg",radius:"lg",closeOnEscape:!1,closeOnClickOutside:!1,zIndex:400,Element:e=>{let{context:t,props:{unitAmount:r,currency:i=p.F.USD,metadata:o,paymentMethodTypes:s,...l}}=e,c=(0,d.rZ)(),u=(0,v.x)(),{clientSecret:h,paymentMethodTypes:m,isLoading:y,setupFuturePayment:b,setSetupFuturePayment:x,error:w}=(0,C.S1)({currency:i,metadata:o,unitAmount:r,desiredPaymentMethodTypes:s}),{isLoading:S}=(0,C.KR)({enabled:!!h});if(y||S&&!w)return(0,n.jsx)(a.M,{children:(0,n.jsx)(f.a,{variant:"bars"})});let k=()=>{t.close()};if(w||!h)return(0,n.jsx)(z,{error:null!=w?w:"We are unable to connect you with Stripe services to perform a transaction. Please try again later.",onClose:k});let j={clientSecret:h,appearance:{theme:"dark"===c.colorScheme?"night":"stripe"},locale:"en"};return(0,n.jsx)(g.Elements,{stripe:u,options:j,children:(0,n.jsx)(N,{clientSecret:h,onClose:k,unitAmount:r,currency:i,metadata:o,paymentMethodTypes:m,setupFuturePayment:b,setupFuturePaymentToggle:()=>x(!b),...l},h)},h)}}),M=R;var D=_},53624:function(e,t,r){"use strict";r.r(t),r.d(t,{openUnpublishModal:function(){return v}});var n=r(85893),i=r(97564),o=r(58654),a=r(52615),s=r(71232),l=r(67841),c=r(67294),u=r(35362),d=r(76772),f=r(2807),p=r(72456);let h=Object.entries(d.O).map(e=>{let[t,{optionLabel:r}]=e;return{value:t,label:r}}),{openModal:m,Modal:g}=(0,u.W)({name:"unpublishModel",title:"Unpublish as Violation",Element:e=>{let{context:t,props:{modelId:r,versionId:u}}=e,d=p.SX.useContext(),[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(""),[b,x]=(0,c.useState)(""),w=p.SX.model.unpublish.useMutation({onSuccess:async()=>{await d.model.getById.invalidate({id:r}),await d.model.getAll.invalidate(),t.close()},onError:e=>{(0,f.s9)({title:"Failed to unpublish",error:Error(e.message),reason:"An unexpected error occurred. Please try again later."})}}),S=p.SX.modelVersion.unpublish.useMutation({onSuccess:async()=>{await d.model.getById.invalidate({id:r}),t.close()},onError:e=>{(0,f.s9)({title:"Failed to unpublish",error:Error(e.message),reason:"An unexpected error occurred. Please try again later."})}}),k=w.isLoading||S.isLoading;return(0,n.jsxs)(i.K,{children:[(0,n.jsx)(o.Y.Group,{orientation:"vertical",value:m,onChange:e=>g(e),children:h.map(e=>(0,n.jsx)(o.Y,{value:e.value,label:e.label},e.value))}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.g,{name:"customMessage",label:"Reason",placeholder:"Why is this being unpublished?",rows:2,value:v,onChange:e=>y(e.currentTarget.value),error:b,withAsterisk:"other"===m}),(0,n.jsx)(s.Z,{position:"right",children:(0,n.jsx)(l.z,{onClick:()=>(x(""),"other"!==m||v)?u?S.mutate({id:u,reason:m,customMessage:v}):w.mutate({id:r,reason:m,customMessage:v}):x("Required"),loading:k,children:"Unpublish"})})]})]})}}),v=m;t.default=g},65850:function(e,t,r){"use strict";r.r(t),r.d(t,{ProfilePreview:function(){return Y},default:function(){return ee},openUserProfileEditModal:function(){return Q}});var n=r(85893),i=r(64761),o=r(97564),a=r(9094),s=r(67841),l=r(20966),c=r(71232),u=r(95117),d=r(80971),f=r(54777),p=r(64002),h=r(94151),m=r(40633),g=r(64523),v=r(82623),y=r(67294),b=r(35362),x=r(72456),w=r(66214),S=r(1604),k=r(10292),j=r(58504),E=r(35818),O=r(6915);S.z.object({username:S.z.string().optional(),id:S.z.number().optional()});let C=S.z.object({key:S.z.nativeEnum({Showcase:"showcase",PopularModels:"popularModels",PopularArticles:"popularArticles",ModelsOverview:"modelsOverview",ImagesOverview:"imagesOverview",RecentReviews:"recentReviews"}),enabled:S.z.boolean()}),I=S.z.object({entityType:S.z.nativeEnum(j.G),entityId:S.z.number()}),P=S.z.object({showLocation:S.z.boolean().optional(),showFollowers:S.z.boolean().optional(),showFollowing:S.z.boolean().optional(),showRating:S.z.boolean().optional()}),A=S.z.object({userId:S.z.number().optional(),showcaseItems:S.z.array(I).optional(),profileSectionsSettings:S.z.array(C).optional(),privacySettings:P.optional(),message:S.z.string().nullish(),bio:S.z.string().nullish(),location:S.z.string().max(100).nullish(),coverImage:k.el.nullish(),socialLinks:S.z.array(S.z.object({id:S.z.number().optional(),url:S.z.string(),type:S.z.nativeEnum(E.Un)})).optional(),sponsorshipLinks:S.z.array(S.z.object({id:S.z.number().optional(),url:S.z.string(),type:S.z.nativeEnum(E.Un)})).optional(),creatorCardStatsPreferences:O.k5.optional()});var T=r(17578),z=r(1566),N=r(29488),R=r(74943),_=r(38498),M=r(2807),D=r(65297),L=r(36777),F=r(27943),U=r(77446),B=r(74403),H=r(54685);function Z(e){let{ingestion:t}=e;return t===E.hY.Pending?(0,n.jsx)(B.b,{color:"yellow",children:"Your avatar is currently being scanned. You'll still be able to see it, but other users won't see your avatar until it has finished the scan process."}):t===E.hY.Blocked?(0,n.jsxs)(B.b,{color:"red",children:["Your avatar has been blocked and won't be visible for other users. This means that it was rejected by our automated scanning process. Please provide a different picture which comply with our"," ",(0,n.jsx)(H.e,{href:"/content/tos",target:"_blank",rel:"nofollow",span:!0,children:"Content Policies"}),"."]}):null}var W=r(69519),V=r(42213),$=r(48600),q=r(5779);let G=A.merge(O.gV.pick({profilePicture:!0,nameplateId:!0,leaderboardShowcase:!0}).extend({badge:W.cl.nullish(),profileImage:S.z.string().nullish(),profileDecoration:W.cl.nullish(),profileBackground:W.cl.nullish()})),K={size:"sm",radius:"xl",variant:"filled",tt:"capitalize"},{openModal:X,Modal:J}=(0,b.W)({name:"userProfileEditModal",withCloseButton:!1,closeOnEscape:!1,size:"xl",Element:e=>{var t,r,v,b,S,k,j,O;let{context:C}=e,I=x.SX.useUtils(),P=(0,T.xJ)();(0,i.rZ)();let A=(0,q.g)(),D=(0,y.useRef)(),{data:L=[],isLoading:B}=x.SX.leaderboard.getLeaderboards.useQuery(void 0,{trpc:{context:{skipBatch:!0}}}),{mutate:H,isLoading:W}=x.SX.userProfile.update.useMutation({onSuccess:e=>{P&&(I.userProfile.get.setData({username:P.username},e),I.userProfile.get.invalidate({username:P.username})),(0,M.LX)({message:"Profile updated successfully"}),C.close()},onError:async e=>{(0,M.s9)({title:"There was an error updating your profile",error:Error(e.message)})}}),X=x.SX.user.update.useMutation({onSuccess:async()=>{P&&(await (null==P?void 0:P.refresh()),await I.userProfile.get.invalidate({username:P.username})),C.close()},onError:async e=>{(0,M.s9)({title:"There was an error updating your profile",error:Error(e.message)})}}),{isLoading:J,data:Q}=x.SX.userProfile.get.useQuery({username:P?P.username:""},{enabled:!!(null==P?void 0:P.username)}),ee=(0,y.useMemo)(()=>Q?Q.cosmetics.filter(e=>{let{cosmetic:t}=e;return t.type===E.c_.Badge&&!!t.data}).map(e=>{let{cosmetic:t,cosmeticId:r,...n}=e;return{...n,...t,data:t.data}}):[],[Q]),et=(0,y.useMemo)(()=>Q?Q.cosmetics.filter(e=>{let{cosmetic:t}=e;return t.type===E.c_.NamePlate&&!!t.data}).map(e=>{let{cosmetic:t,cosmeticId:r,...n}=e;return{...n,...t,data:t.data}}):[],[Q]),er=(0,y.useMemo)(()=>Q?Q.cosmetics.filter(e=>{let{cosmetic:t}=e;return t.type===E.c_.ProfileDecoration&&!!t.data}).map(e=>{let{cosmetic:t,cosmeticId:r,...n}=e;return{...n,...t,data:t.data}}):[],[Q]),en=(0,y.useMemo)(()=>Q?Q.cosmetics.filter(e=>{let{cosmetic:t}=e;return t.type===E.c_.ProfileBackground&&!!t.data}).map(e=>{let{cosmetic:t,cosmeticId:r,...n}=e;return{...n,...t,data:t.data}}):[],[Q]),ei=(0,y.useMemo)(()=>L.filter(e=>e.public).map(e=>{let{title:t,id:r}=e;return{label:(0,F.Qs)(t),value:r}}),[L]),eo=(0,w.cI)({schema:G,shouldUnregister:!1}),[ea,es,el,ec,eu,ed,ef,ep,eh,em,eg]=eo.watch(["badge","nameplateId","profileDecoration","profileBackground","message","bio","location","profileImage","profilePicture","profileSectionsSettings","creatorCardStatsPreferences"]),ev=(0,y.useMemo)(()=>!!(null!=em?em:[]).find(e=>"showcase"===e.key&&e.enabled),[em]),ey=null==Q?void 0:Q.publicSettings;(0,y.useEffect)(()=>{if(Q&&(null==Q?void 0:Q.profile)){var e,t,r,n,i;let o=Q.cosmetics.filter(e=>!!e.equippedAt).map(e=>{let{cosmetic:t,data:r,...n}=e;return{...n,...t}}),a=o.find(e=>e.type===E.c_.Badge),s=o.find(e=>e.type===E.c_.NamePlate),l=o.find(e=>e.type===E.c_.ProfileDecoration),c=o.find(e=>e.type===E.c_.ProfileBackground),u={...Q.profile,coverImage:Q.profile.coverImage,profileImage:null==Q?void 0:Q.image,socialLinks:(null!==(e=null==Q?void 0:Q.links)&&void 0!==e?e:[]).filter(e=>e.type===E.Un.Social).map(e=>({id:e.id,url:e.url,type:e.type})),sponsorshipLinks:(null!==(t=null==Q?void 0:Q.links)&&void 0!==t?t:[]).filter(e=>e.type===E.Un.Sponsorship).map(e=>({id:e.id,url:e.url,type:e.type})),nameplateId:null!==(r=null==s?void 0:s.id)&&void 0!==r?r:null,badge:null!=a?a:null,profileDecoration:null!=l?l:null,profileBackground:null!=c?c:null,leaderboardShowcase:null!==(n=null==Q?void 0:Q.leaderboardShowcase)&&void 0!==n?n:null,profilePicture:Q.profilePicture?Q.profilePicture:Q.image?{url:Q.image,type:"image"}:null,creatorCardStatsPreferences:null!==(i=null==ey?void 0:ey.creatorCardStatsPreferences)&&void 0!==i?i:_.Z5};D.current||(D.current=u),eo.reset(u)}},[Q]);let eb=()=>C.close(),ex=J||B;if(!Q&&!ex)return(0,n.jsxs)(o.K,{children:[(0,n.jsx)(z.L,{icon:(0,n.jsx)(N.Z,{}),color:"red",children:"Something went wrong. we could not fetch your user."}),(0,n.jsx)(a.M,{children:(0,n.jsx)(s.z,{variant:"default",onClick:eb,children:"Close"})})]});if(ex)return(0,n.jsx)(a.M,{children:(0,n.jsx)(l.a,{})});let ew=W||X.isLoading,eS=null!==(r=null==eh?void 0:eh.url)&&void 0!==r?r:ep,ek=Q?{...Q,image:eS||Q.image,cosmetics:[],deletedAt:null,profilePicture:{...Q.profilePicture,url:eS||Q.image}}:null,ej=[ea?ee.find(e=>e.id===ea.id):void 0,es?et.find(e=>e.id===es):void 0,el?er.find(e=>e.id===el.id):void 0,ec?en.find(e=>e.id===ec.id):void 0].filter($.$K);return(0,n.jsx)(w.l0,{form:eo,onSubmit:e=>{var t,r,n,i;let{profilePicture:o,badge:a,nameplateId:s,profileDecoration:l,profileBackground:c,leaderboardShowcase:u,...d}=null!==(t=D.current)&&void 0!==t?t:{},{profilePicture:f,nameplateId:p,badge:h,profileDecoration:m,profileBackground:g,leaderboardShowcase:v,creatorCardStatsPreferences:y,...b}=e,x=(null==o?void 0:o.url)!==(null==f?void 0:f.url)||h!==a||p!==s||m!==l||g!==c||v!==u;(0,U.Z)(d,b)||H({creatorCardStatsPreferences:y,...b}),Q&&x&&X.mutate({id:Q.id,profilePicture:f,badgeId:null!==(r=null==h?void 0:h.id)&&void 0!==r?r:null,nameplateId:p,profileDecorationId:null!==(n=null==m?void 0:m.id)&&void 0!==n?n:null,profileBackgroundId:null!==(i=null==g?void 0:g.id)&&void 0!==i?i:null,leaderboardShowcase:v})},children:(0,n.jsxs)(o.K,{children:[(0,n.jsxs)(c.Z,{position:"apart",children:[(0,n.jsx)(u.x,{size:24,weight:590,children:"Customize Profile"}),(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(s.z,{radius:"xl",size:"md",loading:ew,type:"submit",children:"Save Changes"}),(0,n.jsx)(d.P,{size:"md",radius:"xl",variant:"transparent",ml:"auto",iconSize:20,loading:ew,onClick:()=>{C.close()}})]})]}),(0,n.jsx)(f.i,{label:"Profile"}),(0,n.jsxs)(o.K,{children:[ek&&(0,n.jsx)(n.Fragment,{children:A.cosmeticShop?(0,n.jsx)(o.K,{align:"center",children:(0,n.jsx)(V.W7,{user:ek,cosmeticOverwrites:ej,useEquippedCosmetics:!1,style:{width:"100%",maxWidth:"500px"},statDisplayOverwrite:eg})}):(0,n.jsx)(Y,{user:Q,badge:ea?ee.find(e=>e.id===ea.id):void 0,nameplate:es?et.find(e=>e.id===es):void 0,profileImage:null!==(v=null==eh?void 0:eh.url)&&void 0!==v?v:ep})}),(0,n.jsxs)(o.K,{spacing:"md",children:[A.cosmeticShop&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.Bl,{name:"profilePicture",label:"Edit avatar"}),(0,n.jsx)(f.i,{label:"Showcase Stats"}),(0,n.jsx)(w.eH,{spacing:8,name:"creatorCardStatsPreferences",multiple:!0,children:Object.values(_.iC).map((e,t)=>(0,n.jsx)(p.A,{value:e,...K,children:(0,n.jsx)("span",{children:(0,F.Gf)(e)})},t))}),(null!==(b=null==eg?void 0:eg.length)&&void 0!==b?b:0)>_.GR&&(0,n.jsxs)(u.x,{color:"red",size:"xs",children:["A maximum of ",_.GR," stats can be displayed"]}),(0,n.jsx)(Z,{ingestion:null==Q?void 0:null===(t=Q.profilePicture)||void 0===t?void 0:t.ingestion}),(0,n.jsx)(w.RB,{name:"profileDecoration",label:"Avatar decoration",shopUrl:"/shop?cosmeticTypes=".concat(E.c_.ProfileDecoration),data:er,nothingFound:(0,n.jsx)(u.x,{size:"xs",children:"You don’t have any avatar decorations yet"}),onShopClick:eb}),(0,n.jsx)(w.RB,{name:"profileBackground",label:"Creator Card Backgrounds",shopUrl:"/shop?cosmeticTypes=".concat(E.c_.ProfileBackground),nothingFound:(0,n.jsx)(u.x,{size:"xs",children:"You don’t have any profile backgrounds yet"}),data:en,onShopClick:eb})]}),(0,n.jsx)(w.RB,{name:"badge",label:"Featured Badge",shopUrl:"/shop?cosmeticTypes=".concat(E.c_.Badge),nothingFound:(0,n.jsx)(u.x,{size:"xs",children:"You don’t have any badges yet"}),data:ee,onShopClick:eb})]}),(0,n.jsxs)(o.K,{children:[(0,n.jsx)(w.JD,{name:"nameplateId",placeholder:"Select style",label:(0,n.jsxs)(c.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(h.I.Label,{children:"Nameplate Style"}),(0,n.jsxs)(m.J,{withArrow:!0,width:300,withinPortal:!0,position:"top",children:[(0,n.jsx)(m.J.Target,{children:(0,n.jsx)(g.x,{display:"inline-block",sx:{lineHeight:.8,cursor:"pointer",opacity:.5},children:(0,n.jsx)(R.Z,{size:16})})}),(0,n.jsxs)(m.J.Dropdown,{children:[(0,n.jsx)(u.x,{weight:500,size:"sm",children:"Nameplates"}),(0,n.jsx)(u.x,{size:"sm",children:"Nameplates change the appearance of your username. They can include special colors or effects. You can earn nameplates by being a subscriber or earning trophies on the site."})]})]})]}),nothingFound:"Your earned nameplate styles will appear here",data:null!==(S=et.map(e=>({label:e.name,value:e.id})))&&void 0!==S?S:[],clearable:!0}),(0,n.jsx)(w.JD,{label:"Showcase Leaderboard",placeholder:"Select a leaderboard",description:"Choose which leaderboard badge to display on your profile card",name:"leaderboardShowcase",data:ei,disabled:B,searchable:!0,clearable:!0})]})]}),(0,n.jsx)(f.i,{label:"Links"}),(0,n.jsx)(w.GE,{name:"socialLinks",label:"Social Links",type:E.Un.Social}),(0,n.jsx)(w.GE,{name:"sponsorshipLinks",label:"Sponsorship Links",type:E.Un.Sponsorship}),(0,n.jsx)(f.i,{label:"Profile Page"}),(0,n.jsx)(w.WE,{name:"coverImage",label:"Cover Image",description:"Suggested resolution: ".concat(_._G.profile.coverImageWidth,"x").concat(_._G.profile.coverImageHeight,"px"),aspectRatio:_._G.profile.coverImageAspectRatio,previewWidth:_._G.profile.coverImageWidth}),(0,n.jsx)(w.zg,{autosize:!0,name:"message",description:"Have something you want to share with people visiting your profile? Put it here and we'll display it at the top of your page",maxLength:_._G.profile.messageMaxLength,labelProps:{style:{width:"100%"}},label:(0,n.jsxs)(c.Z,{position:"apart",children:[(0,n.jsx)(u.x,{children:"Announcement"}),(0,n.jsxs)(u.x,{size:"xs",children:[null!==(k=null==eu?void 0:eu.length)&&void 0!==k?k:0,"/",_._G.profile.messageMaxLength]})]})}),(0,n.jsx)(w.zg,{name:"bio",labelProps:{style:{width:"100%"}},label:(0,n.jsxs)(c.Z,{position:"apart",children:[(0,n.jsx)(u.x,{children:"Bio"}),(0,n.jsxs)(u.x,{size:"xs",children:[null!==(j=null==ed?void 0:ed.length)&&void 0!==j?j:0,"/",_._G.profile.bioMaxLength]})]}),autosize:!0,maxLength:_._G.profile.bioMaxLength}),(0,n.jsx)(w.oH,{name:"location",labelProps:{style:{width:"100%"}},label:(0,n.jsxs)(c.Z,{position:"apart",children:[(0,n.jsx)(u.x,{children:"Location"}),(0,n.jsxs)(u.x,{size:"xs",children:[null!==(O=null==ef?void 0:ef.length)&&void 0!==O?O:0,"/",_._G.profile.locationMaxLength]})]}),maxLength:_._G.profile.locationMaxLength}),(null==Q?void 0:Q.profile)&&(0,n.jsx)(w.Pb,{name:"profileSectionsSettings",label:"Page sections",description:"Drag diferent sections on your profile in order of your preference"}),ev&&(0,n.jsx)(w.A1,{name:"showcaseItems",label:"Showcase Items",limit:_._G.profile.showcaseItemsLimit,description:"Select up to ".concat(_._G.profile.showcaseItemsLimit,' items to showcase on your profile. You do this via the "Add to showcase" button on models and images')}),(0,n.jsx)(c.Z,{position:"right",align:"flex-end",children:(0,n.jsx)(s.z,{radius:"xl",size:"md",loading:ew,type:"submit",children:"Save Changes"})})]})})}});function Y(e){let{user:t,badge:r,nameplate:i,profileImage:a,profileBackground:s}=e;if(!t)return null;let l={...t,image:a||t.image,cosmetics:[],deletedAt:null,profilePicture:{...t.profilePicture,url:a||t.image}};return r&&l.cosmetics.push({cosmetic:{...r,type:"Badge"},data:null}),i&&l.cosmetics.push({cosmetic:{...i,type:"NamePlate"},data:null}),(0,n.jsxs)(o.K,{spacing:4,children:[(0,n.jsx)(h.I.Label,{children:"Preview"}),(0,n.jsx)(v.X,{p:"sm",withBorder:!0,children:(0,n.jsx)(D.Y,{user:l,size:"lg",subText:t.createdAt?"Member since ".concat((0,L.p6)(t.createdAt)):"",withOverlay:!!s,withUsername:!0})})]})}let Q=X;var ee=J},35362:function(e,t,r){"use strict";r.d(t,{W:function(){return o}});var n=r(85893),i=r(25963);function o(e){let{name:t,Element:r,...o}=e;return{openModal:(e,r)=>{(0,i.m6)({modal:t,...o,...r,onClose:()=>{var e;null===(e=o.onClose)||void 0===e||e.call(o)},innerProps:e})},Modal:function(e){let{context:t,id:i,innerProps:o}=e;return(0,n.jsx)(r,{context:{close:()=>t.closeModal(i)},props:o})}}}},12646:function(e,t,r){"use strict";r.d(t,{f:function(){return s},o:function(){return a}});var n=r(85893),i=r(67294);let o=(0,i.createContext)({}),a=()=>(0,i.useContext)(o);function s(e){let{children:t,...r}=e;return(0,n.jsx)(o.Provider,{value:r,children:t})}},73620:function(e,t,r){"use strict";r.d(t,{L:function(){return T},k:function(){return z}});var n=r(85893),i=r(14821),o=r(67841),a=r(71232),s=r(97564),l=r(54777),c=r(64002),u=r(7001),d=r(40633),f=r(73723),p=r(56817),h=r(35818),m=r(81811),g=r(60136),v=r(67294),y=r(43597),b=r(20142),x=r(67731),w=r(17578),S=r(10558),k=r(5779),j=r(38394),E=r(38498),O=r(81447),C=r(27943);let I=Object.values(h.GJ).filter(e=>["Draft","Deleted","Unpublished"].includes(e)),P=E._G.modelFileFormats.filter(e=>"Other"!==e),A=[{label:"All",value:"all"}].concat(Object.values(h.yz).map(e=>({label:(0,C.Yt)(e),value:e})));function T(e){let{filters:t,setFilters:r}=(0,j.PH)(e=>({filters:e.models,setFilters:e.setModelFilters}));return(0,n.jsx)(z,{...e,filters:t,setFilters:r})}function z(e){var t,r,p,j,O,T,z,R,_,M,D,L,F,U,B;let{filters:H,setFilters:Z,filterMode:W="local",position:V="bottom-end",isFeed:$,maxPopoverHeight:q,...G}=e,K=(0,w.xJ)(),{classes:X,cx:J,theme:Y}=N(),Q=(0,k.g)(),ee=(0,S.d)(),{set:et,period:er=h.Tz.AllTime,hidden:en,...ei}=(0,x.Pb)(),[eo,ea]=(0,v.useState)(!1),es="local"===W,el=es?H:{...ei,period:er,hidden:en},ec=!(null===(t=el.types)||void 0===t?void 0:t.length)||el.types.includes("Checkpoint"),eu=(null!==(T=null===(r=el.types)||void 0===r?void 0:r.length)&&void 0!==T?T:0)+(null!==(z=null===(p=el.baseModels)||void 0===p?void 0:p.length)&&void 0!==z?z:0)+(null!==(R=null===(j=el.status)||void 0===j?void 0:j.length)&&void 0!==R?R:0)+(ec&&el.checkpointType?1:0)+(el.earlyAccess?1:0)+(el.supportsGeneration?1:0)+(el.fromPlatform?1:0)+(el.hidden?1:0)+(null!==(_=null===(O=el.fileFormats)||void 0===O?void 0:O.length)&&void 0!==_?_:0)+(el.period&&el.period!==h.Tz.AllTime?1:0),ed=(0,v.useCallback)(()=>{let e={types:void 0,baseModels:void 0,status:void 0,checkpointType:void 0,earlyAccess:void 0,supportsGeneration:!1,followed:!1,hidden:void 0,fileFormats:void 0,fromPlatform:!1,period:h.Tz.AllTime};es||et({types:void 0,baseModels:void 0,status:void 0,checkpointType:void 0,earlyAccess:void 0,supportsGeneration:void 0,followed:void 0,hidden:void 0,fileFormats:void 0,fromPlatform:void 0,period:h.Tz.AllTime}),Z(e)},[es,Z,et]),ef=e=>{es?Z(e):et(e)},ep={size:"sm",radius:"xl",variant:"filled",classNames:X,tt:"capitalize"},eh=(0,n.jsx)(i.z,{offset:4,label:eu||void 0,size:14,zIndex:10,showZero:!1,dot:!1,classNames:{root:X.indicatorRoot,indicator:X.indicatorIndicator},inline:!0,children:(0,n.jsx)(o.z,{className:X.actionButton,color:"gray",radius:"xl",variant:"dark"===Y.colorScheme?"filled":"light",...G,rightIcon:(0,n.jsx)(m.Z,{className:J({[X.opened]:eo}),size:16}),onClick:()=>ea(e=>!e),"data-expanded":eo,children:(0,n.jsxs)(a.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(g.Z,{size:16}),"Filters"]})})}),em=(0,n.jsxs)(s.K,{spacing:8,p:"md",children:[(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Time period",labelProps:{weight:"bold",size:"sm"},mb:4}),es?(0,n.jsx)(y.q,{type:"models",variant:"chips",value:null!==(M=H.period)&&void 0!==M?M:h.Tz.AllTime,onChange:e=>ef({period:e})}):(0,n.jsx)(y.q,{type:"models",variant:"chips",value:er,onChange:e=>et({period:e})})]}),(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Model status",labelProps:{weight:"bold",size:"sm"},mb:4}),(null==K?void 0:K.isModerator)&&(0,n.jsx)(c.A.Group,{spacing:8,value:null!==(D=el.status)&&void 0!==D?D:[],mb:8,onChange:e=>ef({status:e}),multiple:!0,children:I.map(e=>(0,n.jsx)(c.A,{value:e,...ep,children:(0,n.jsx)("span",{children:e})},e))}),(0,n.jsxs)(a.Z,{spacing:8,mb:4,children:[(0,n.jsx)(c.A,{checked:el.earlyAccess,onChange:e=>ef({earlyAccess:e}),...ep,children:(0,n.jsx)("span",{children:"Early Access"})}),Q.imageGeneration&&(0,n.jsx)(c.A,{checked:el.supportsGeneration,onChange:e=>ef({supportsGeneration:e}),...ep,children:(0,n.jsx)("span",{children:"On-site Generation"})}),(0,n.jsx)(c.A,{checked:el.fromPlatform,onChange:e=>ef({fromPlatform:e}),...ep,children:(0,n.jsx)("span",{children:"Made On-site"})})]})]}),(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Model types",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(c.A.Group,{spacing:8,value:null!==(L=el.types)&&void 0!==L?L:[],onChange:e=>ef({types:e}),multiple:!0,my:4,children:Object.values(h.BY).map((e,t)=>(0,n.jsx)(c.A,{value:e,...ep,children:(0,n.jsx)("span",{children:(0,C.Gf)(e)})},t))})]}),ec?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Checkpoint type",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(c.A.Group,{my:4,spacing:8,value:null!==(F=el.checkpointType)&&void 0!==F?F:"all",onChange:e=>ef({checkpointType:"all"!==e?e:void 0}),children:A.map((e,t)=>(0,n.jsx)(c.A,{value:e.value,...ep,children:(0,n.jsx)("span",{children:e.label})},t))})]}),(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"File format",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(c.A.Group,{spacing:8,value:null!==(U=el.fileFormats)&&void 0!==U?U:[],onChange:e=>ef({fileFormats:e}),multiple:!0,my:4,children:P.map((e,t)=>(0,n.jsx)(c.A,{value:e,...ep,children:(0,n.jsx)("span",{children:e})},t))})]})]}):null,(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Base model",labelProps:{weight:"bold",size:"sm"}}),(0,n.jsx)(c.A.Group,{spacing:8,value:null!==(B=el.baseModels)&&void 0!==B?B:[],onChange:e=>ef({baseModels:e}),multiple:!0,my:4,children:E.Bj.map((e,t)=>(0,n.jsx)(c.A,{value:e,...ep,children:(0,n.jsx)("span",{children:(0,C.Gf)(e,{splitNumbers:!1})})},t))})]}),(0,n.jsxs)(s.K,{spacing:0,children:[(0,n.jsx)(l.i,{label:"Modifiers",labelProps:{weight:"bold",size:"sm"},mb:4}),(0,n.jsx)(a.Z,{spacing:8,children:K&&$&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.A,{checked:el.hidden,onChange:e=>ef({hidden:e}),...ep,children:(0,n.jsx)("span",{children:"Hidden"})})})})]}),eu>0&&(0,n.jsx)(o.z,{color:"gray",variant:"dark"===Y.colorScheme?"filled":"light",onClick:ed,fullWidth:!0,children:"Clear all filters"})]});return ee?(0,n.jsxs)(b.u,{children:[eh,(0,n.jsx)(u.d,{opened:eo,onClose:()=>ea(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--header-height))"},body:{padding:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:em})]}):(0,n.jsx)(b.u,{children:(0,n.jsxs)(d.J,{zIndex:200,position:V,shadow:"md",onClose:()=>ea(!1),middlewares:{flip:!0,shift:!0},withinPortal:!0,withArrow:!0,children:[(0,n.jsx)(d.J.Target,{children:eh}),(0,n.jsx)(d.J.Dropdown,{maw:576,p:0,w:"100%",children:(0,n.jsx)(f.x.Autosize,{maxHeight:null!=q?q:"calc(90vh - var(--header-height) - 56px)",type:"hover",children:em})})]})})}let N=(0,p.k)((e,t,r)=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}},iconWrapper:{ref:r("iconWrapper")},opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"},actionButton:{[O.D.smallerThan("sm")]:{width:"100%"}},indicatorRoot:{lineHeight:1},indicatorIndicator:{lineHeight:1.6}}))},77996:function(e,t,r){"use strict";r.d(t,{i:function(){return u}});var n=r(85893),i=r(17789),o=r(95117),a=r(54777),s=r(39238),l=r(27943);let c={"SDXL 1.0":"XL","SDXL 0.9":"XL","SDXL Lightning":"XL","SDXL 1.0 LCM":"XL","SDXL Distilled":"XL","SDXL Turbo":"XL","SDXL Hyper":"XL",Pony:(0,n.jsx)(s.Z,{size:16,strokeWidth:2.5}),"Flux.1 D":"F1","Flux.1 S":"F1","SD 1.4":"SD1","SD 1.5":"SD1","SD 1.5 LCM":"SD1","SD 1.5 Hyper":"SD1","SD 2.0":"SD2","SD 2.0 768":"SD2","SD 2.1":"SD2","SD 2.1 768":"SD2","SD 2.1 Unclip":"SD2","SD 3":"SD3","SD 3.5":"SD3","SD 3.5 Medium":"SD3","SD 3.5 Large":"SD3","SD 3.5 Large Turbo":"SD3",SVD:"SVD","SVD XT":"SVD","PixArt E":"Σ","PixArt a":"α","Hunyuan 1":"HY",Lumina:"L",ODOR:(0,n.jsx)(function(e){let{size:t=24,color:r="currentColor",stroke:i=2,...o}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",xmlSpace:"preserve",width:t,height:t,strokeWidth:i,stroke:r,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...o,children:(0,n.jsx)("path",{d:"M17.1,12.8c0,1.4-1.1,2.5-2.5,2.5c-0.1,0-0.3,0-0.4,0l-0.3,0C13.4,16.8,11.8,18,10,18c-1.8,0-3.4-1.2-3.9-2.8 l-0.3,0c-0.1,0-0.3,0-0.4,0c-1.4,0-2.5-1.1-2.5-2.5c0-1.4,2.4-3.4,3.5-3.4c0.1,0,0.2-0.1,0.2-0.3l0-0.1c0.2-1.1,0.8-4.8,0.8-4.8 C7.8,2.9,8.8,2,10,2c1.2,0,2.2,0.9,2.6,2.2c0,0,0.7,3.8,0.8,4.8l0,0c0,0.2,0.1,0.3,0.2,0.3C14.7,9.4,17.1,11.4,17.1,12.8z M5.9,13.3 c0,0.2-0.1,0.4-0.1,0.6c0,2.3,1.9,4.2,4.2,4.2c2.3,0,4.2-1.9,4.2-4.2c0-0.2,0-0.4-0.1-0.6"})})},{size:16,strokeWidth:2}),Illustrious:"IL"};function u(e){let{type:t,baseModel:r,...s}=e,u=c[r];return(0,n.jsxs)(i.C,{variant:"light",radius:"xl",...s,children:[(0,n.jsx)(o.x,{size:"xs",transform:"capitalize",children:(0,l.Gf)(t)}),u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.i,{orientation:"vertical"}),"string"==typeof u?(0,n.jsx)(o.x,{size:"xs",inherit:!0,children:u}):u]})]})}},12029:function(e,t,r){"use strict";r.d(t,{$v:function(){return d},L2:function(){return f},NL:function(){return c},S3:function(){return u},Yz:function(){return s},hw:function(){return l}});var n=r(17578),i=r(32957),o=r(35818),a=r(72456);let s=1e3,l=1e9,c=(e,t)=>{let{modelId:r,versionId:i}=e,o=(0,n.xJ)(),{data:{Notify:s=[],Downloaded:l=[]}={Notify:[],Downloaded:[]},...c}=a.SX.user.getEngagedModelVersions.useQuery({id:r},{enabled:!!o&&(null==t?void 0:t.enabled),cacheTime:1/0,staleTime:1/0});return{alreadyNotifying:s.includes(i),alreadyDownloaded:l.includes(i),...c}},u=e=>{var t,r;let{modelVersionId:s}=e,{data:l}=a.SX.modelVersion.getById.useQuery({id:s},{enabled:!!s}),{data:c,isLoading:u}=a.SX.common.getEntityAccess.useQuery({entityId:[s],entityType:"ModelVersion"},{enabled:!!l}),d=(0,n.xJ)();if(!l)return{isLoadingAccess:u,isDownloadable:!0,isSelectableInGenerator:!0,canDownload:!1,canGenerate:!1,earlyAccessEndsAt:void 0,earlyAccessConfig:void 0,modelVersion:void 0,isEarlyAccess:!1};let[f]=null!=c?c:[],p=(null==l?void 0:l.earlyAccessEndsAt)&&(null==l?void 0:l.earlyAccessEndsAt)>new Date,h=null==l?void 0:l.earlyAccessConfig,m=(null==l?void 0:null===(r=l.model)||void 0===r?void 0:null===(t=r.user)||void 0===t?void 0:t.id)===(null==d?void 0:d.id)||(null==d?void 0:d.isModerator);return{isLoadingAccess:u,isDownloadable:!(null==l?void 0:l.usageControl)||(null==l?void 0:l.usageControl)===o.j3.Download||m,isSelectableInGenerator:(null==l?void 0:l.usageControl)!==o.j3.InternalGeneration,canDownload:!p||(null==f?void 0:f.hasAccess)&&((null==f?void 0:f.permissions)&i.st.EarlyAccessDownload)!=0,canGenerate:!p||(null==f?void 0:f.hasAccess)&&((null==f?void 0:f.permissions)&i.st.EarlyAccessGeneration)!=0,earlyAccessEndsAt:null==l?void 0:l.earlyAccessEndsAt,earlyAccessConfig:p?h:void 0,modelVersion:l,isEarlyAccess:p}},d=()=>{let e=a.SX.useUtils(),t=a.SX.modelVersion.earlyAccessPurchase.useMutation({onSuccess(t,r){let{modelVersionId:n}=r;e.common.getEntityAccess.invalidate({entityId:[n],entityType:"ModelVersion"}),e.modelVersion.donationGoals.invalidate({id:n})},onError(e){(0,a.bV)(e,"Failed to purchase early access")}});return{modelVersionEarlyAccessPurchase:e=>t.mutateAsync(e),purchasingModelVersionEarlyAccess:t.isLoading}},f=(e,t)=>{let{modelVersionId:r}=e;(0,n.xJ)();let{data:i,...o}=a.SX.modelVersion.donationGoals.useQuery({id:r},{...null!=t?t:{}});return{donationGoals:null!=i?i:[],...o}}},67731:function(e,t,r){"use strict";r.d(t,{Lu:function(){return O},Pb:function(){return w},Pk:function(){return E},RD:function(){return k},Rr:function(){return j},_n:function(){return S}});var n=r(35818),i=r(77446),o=r(11163),a=r(67294),s=r(1604),l=r(58456),c=r(36061);r(80937);var u=r(38394),d=r(38498),f=r(32957),p=r(32760),h=r(6915),m=r(2807),g=r(14619),v=r(27943),y=r(72456),b=r(25291);let x=s.z.object({period:s.z.nativeEnum(n.Tz),periodMode:p.XY,sort:s.z.nativeEnum(f.Qp),query:s.z.string(),user:s.z.string(),username:h.QA.transform(v.Bm),tagname:s.z.string(),tag:s.z.string(),favorites:(0,b.rK)(),hidden:(0,b.rK)(),archived:(0,b.rK)(),followed:(0,b.rK)(),view:s.z.enum(["categories","feed"]),section:s.z.enum(["published","draft","training"]),collectionId:s.z.coerce.number(),excludedTagIds:s.z.array(s.z.coerce.number()),excludedImageTagIds:s.z.array(s.z.coerce.number()),baseModels:s.z.preprocess(e=>Array.isArray(e)?e:[e],s.z.array(s.z.enum(d._G.baseModels))),clubId:s.z.coerce.number().optional(),collectionTagId:s.z.coerce.number().optional(),earlyAccess:(0,b.rK)().optional(),types:s.z.preprocess(e=>Array.isArray(e)?e:[e],s.z.nativeEnum(n.BY).array()).optional(),checkpointType:s.z.nativeEnum(n.yz).optional(),supportsGeneration:(0,b.rK)().optional(),status:s.z.preprocess(e=>Array.isArray(e)?e:[e],s.z.nativeEnum(n.GJ).array()).optional(),fileFormats:s.z.preprocess(e=>Array.isArray(e)?e:[e],s.z.enum(d._G.modelFileFormats).array()).optional(),fromPlatform:(0,b.rK)().optional()}).partial(),w=()=>{let{query:e,pathname:t,replace:r}=(0,o.useRouter)();return(0,a.useMemo)(()=>{let n=x.safeParse(e);return{...n.success?n.data:{},set:(n,i)=>{r({pathname:null!=i?i:t,query:(0,g.HO)({...e,...n})},void 0,{shallow:!i||t===i})}}},[e,t,r])},S=()=>{let e=(0,u.PH)(e=>e.models);return(0,g.HO)(e)},k=e=>{let[t,r]=(0,a.useState)(null!=e?e:{}),n=!(0,i.Z)(t,e);return{filters:t,setFilters:r,filtersUpdated:n}},j=(e,t)=>{var r;let i=null!=e?e:{},o=y.SX.useUtils(),s=(0,l.bT)(),{data:u,isLoading:d,...f}=y.SX.model.getAll.useInfiniteQuery({...i,browsingLevel:s},{getNextPageParam:e=>e?e.nextCursor:0,getPreviousPageParam:e=>e?e.nextCursor:0,trpc:{context:{skipBatch:!0}},keepPreviousData:!0,onError:e=>{o.model.getAll.setInfiniteData({...i,browsingLevel:s},e=>null!=e?e:u),(0,m.s9)({title:"Failed to fetch data",error:Error("Something went wrong: ".concat(e.message))})},...t}),p=(0,a.useMemo)(()=>null==u?void 0:u.pages.flatMap(e=>e?e.items:[]),[u]),{items:h,loadingPreferences:g}=(0,c.f)({type:"models",data:p,showHidden:!!i.hidden,showImageless:(null!==(r=i.status)&&void 0!==r?r:[]).includes(n.GJ.Draft)||i.pending,isRefetching:f.isRefetching,hiddenTags:i.excludedTagIds});return{data:u,models:h,isLoading:d||g,...f}},E=()=>{let e=y.SX.useUtils(),t=y.SX.model.toggleCheckpointCoverage.useMutation({onSuccess:(t,r)=>{let{id:n,versionId:i}=r;e.model.getById.setData({id:n},e=>e?{...e,modelVersions:e.modelVersions.map(e=>e.id===i?{...e,canGenerate:!e.canGenerate}:e)}:e)},onError:e=>{(0,m.s9)({title:"Failed to toggle checkpoint coverage",error:Error(e.message)})}});return{...t,toggle:e=>t.mutateAsync(e)}},O=e=>{let{modelId:t}=e,r=y.SX.useUtils(),{data:i,isLoading:o}=y.SX.model.getCollectionShowcase.useQuery({id:t}),{data:a,models:s,isLoading:l,...c}=j({collectionId:null==i?void 0:i.id,sort:f.Qp.Newest,period:n.Tz.AllTime,periodMode:"published",limit:10},{enabled:!o&&!!(null==i?void 0:i.id),keepPreviousData:!0}),u=y.SX.model.setCollectionShowcase.useMutation({onSuccess:async()=>{await r.model.getCollectionShowcase.invalidate({id:t})},onError:e=>{(0,m.s9)({title:"Failed to set showcase collection",error:Error(e.message)})}});return{...c,collection:i,items:s,isLoading:o||l,setShowcaseCollection:e=>u.mutateAsync({id:t,collectionId:e}),settingShowcase:u.isLoading}}},79543:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(85893),i=r(41664),o=r.n(i);let a=(0,r(67294).forwardRef)((e,t)=>{let{children:r,...i}=e;return(0,n.jsx)(o(),{ref:t,prefetch:!1,...i,children:r})});a.displayName="NextLink"},67993:function(e,t,r){"use strict";r.d(t,{EW:function(){return y},J4:function(){return v},Yg:function(){return g},kS:function(){return w},p9:function(){return x},xi:function(){return b},zk:function(){return m}});var n=r(85945),i=r(16058),o=r(12902),a=r(67294),s=r(47721),l=r(40893),c=r(17578),u=r(32957),d=r(86013),f=r(27943),p=r(72456);let h={[u.mN.Comment]:"Comments",[u.mN.Milestone]:"Milestones",[u.mN.Update]:"Updates",[u.mN.Bounty]:"Bounties",[u.mN.Other]:"Others"},m=e=>{var t;return null!==(t=h[e])&&void 0!==t?t:(0,f.Gf)(e)},g=(e,t)=>{let{data:r,...n}=p.SX.notification.getAllByUser.useInfiniteQuery({limit:100,...e},{getNextPageParam:e=>e.nextCursor,keepPreviousData:!0,...t}),i=(0,a.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[null==r?void 0:r.pages]);return{data:r,notifications:i,...n}};function v(e){let{hideRead:t}=e,{data:r}=(0,s.A2)();return(0,a.useMemo)(()=>null==r?void 0:r.map(e=>{var t,r,n;return{id:e.id,type:"announcement",category:"announcement",createdAt:e.startsAt,read:e.dismissed,details:{url:null===(n=e.metadata)||void 0===n?void 0:null===(r=n.actions)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.link,target:"_blank",message:e.title,actor:void 0,content:void 0,type:"announcement"}}}).filter(e=>!t||!e.read),[r,t])}let y=()=>{let e=(0,c.xJ)(),{data:t,isLoading:r}=p.SX.user.checkNotifications.useQuery(void 0,{enabled:!!e,cacheTime:1/0,staleTime:1/0}),{data:n,isLoading:i}=(0,s.A2)(),o=n.filter(e=>!e.dismissed);return r||i||!t||!o?{all:0,comment:0,milestone:0,update:0,bounty:0,other:0,system:0,buzz:0,announcements:0}:{...t,all:t.all+o.length,announcements:o.length}},b=()=>{let e=p.SX.useUtils(),t=(0,n.NL)();return p.SX.notification.markRead.useMutation({async onMutate(r){let{category:n,all:a,id:s}=r,l=null==n?void 0:n.toLowerCase();await e.user.checkNotifications.cancel(),e.user.checkNotifications.setData(void 0,e=>{var t,r;let n={...e,all:null!==(t=null==e?void 0:e.all)&&void 0!==t?t:0};if(s)n.all--,l&&l in n&&n[l]--;else if(l)l in n&&(n.all-=null!==(r=n[l])&&void 0!==r?r:0,n[l]=0);else for(let e of Object.keys(n))n[e]=0;for(let e of Object.keys(n))n[e]<0&&(n[e]=0);return n});let c=(0,i.Ol)(p.SX.notification.getAllByUser);t.setQueriesData({queryKey:c,exact:!1},(0,o.ZP)(e=>{var t,r;if(e){for(let n of null!==(t=null==e?void 0:e.pages)&&void 0!==t?t:[])if(a)for(let e of n.items)l&&e.category.toLowerCase()!==l||(e.read=!0);else if(s){let e=null===(r=n.items)||void 0===r?void 0:r.find(e=>e.id==s);e&&(e.read=!0)}}}))}})},x=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],{data:t=[],isLoading:r}=p.SX.user.getNotificationSettings.useQuery(void 0,{enabled:e}),{hasNotifications:n,hasCategory:i,notificationSettings:o}=(0,a.useMemo)(()=>{let e=!1,r={},n={};for(let[i,o]of Object.entries(d.yw))for(let{type:a}of(n[i]=!1,o)){let o=!t.some(e=>e.type===a);r[a]=o,!n[i]&&o&&(n[i]=!0),!e&&o&&(e=!0)}return{hasNotifications:e,hasCategory:n,notificationSettings:r}},[t]);return{hasNotifications:n,hasCategory:i,notificationSettings:o,isLoading:r}},w=()=>{let e=(0,n.NL)(),t=p.SX.useUtils(),r=(0,a.useCallback)(async r=>{let n=(0,i.Ol)(p.SX.notification.getAllByUser)[0],a=r;try{let e=await fetch("/api/notification/getDetails",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(e.ok){let t=await e.json();a={...a,...t}}}catch(e){}e.setQueriesData({queryKey:[n,{input:{category:null}}],exact:!1},(0,o.ZP)(e=>{e&&e.pages&&e.pages.length&&e.pages[0].items.unshift(a)})),e.setQueriesData({queryKey:[n,{input:{category:r.category}}],exact:!1},(0,o.ZP)(e=>{e&&e.pages&&e.pages.length&&e.pages[0].items.unshift(a)})),t.user.checkNotifications.setData(void 0,e=>{var t,n;let i={...e,all:null!==(t=null==e?void 0:e.all)&&void 0!==t?t:0};return i[r.category.toLowerCase()]=(null!==(n=i[r.category.toLowerCase()])&&void 0!==n?n:0)+1,i.all++,i})},[e,t]);(0,l.Df)(u.m.NotificationNew,r)}},87650:function(e,t,r){"use strict";r.d(t,{PQ:function(){return u},U8:function(){return c},cp:function(){return l}});var n=r(17578),i=r(32957),o=r(72456),a=r(2807),s=r(7379);let l=[i.Af.TOS,i.Af.Profile,i.Af.BrowsingLevels,i.Af.Buzz],c=()=>{let e=(0,n.xJ)();return e?l.filter(t=>!s.v.hasFlag(e.onboarding,t)):[]},u=()=>{let e=(0,n.xJ)();return o.SX.user.completeOnboardingStep.useMutation({async onSuccess(){await (null==e?void 0:e.refresh())},onError(e){(0,a.s9)({title:"Cannot save",error:Error(e.message)})}})}},2815:function(e,t,r){"use strict";r.d(t,{cA:function(){return l},oc:function(){return c},tF:function(){return u},tG:function(){return d},ts:function(){return s}});var n=r(67294),i=r(80687),o=r(17578),a=r(72456);let s=()=>{let e=a.SX.useUtils(),t=a.SX.paddle.processCompleteBuzzTransaction.useMutation(),r=a.SX.paddle.updateSubscription.useMutation(),n=a.SX.paddle.cancelSubscription.useMutation(),i=a.SX.paddle.purchaseBuzzWithSubscription.useMutation(),o=a.SX.paddle.getOrCreateCustomer.useMutation(),s=a.SX.paddle.refreshSubscription.useMutation({onSuccess:async()=>{await e.subscriptions.getUserSubscription.invalidate()}});return{processCompleteBuzzTransaction:e=>t.mutateAsync(e),processingCompleteBuzzTransaction:t.isLoading,updateSubscription:(e,t)=>r.mutateAsync(e,t),updatingSubscription:r.isLoading,cancelSubscription:e=>n.mutateAsync(void 0,e),cancelingSubscription:n.isLoading,purchaseBuzzWithSubscription:e=>i.mutateAsync(e),purchasingBuzzWithSubscription:i.isLoading,getOrCreateCustomer:()=>o.mutateAsync(),gettingOrCreateCustomer:o.isLoading,refreshSubscription:()=>s.mutateAsync(),refreshingSubscription:s.isLoading}},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0},t=(0,o.xJ)(),{data:r,...n}=a.SX.paddle.getManagementUrls.useQuery(void 0,{enabled:!!t&&(null==e?void 0:e.enabled),trpc:{context:{skipBatch:!0}}});return{managementUrls:r,...n}},c=()=>{let e=(0,o.xJ)(),{data:t,isLoading:r}=a.SX.paddle.hasSubscription.useQuery(void 0,{enabled:!!e});return{hasPaddleSubscription:t,isLoading:r}},u=(e,t)=>{let{data:r,isLoading:i,...o}=a.SX.paddle.getAdjustmentsInfinite.useInfiniteQuery({...null!=e?e:{}},{getNextPageParam:e=>e.nextCursor,trpc:{context:{skipBatch:!0}},...t});return{adjustments:(0,n.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[r]),isLoading:i,...o}},d=()=>{let{refreshSubscription:e,refreshingSubscription:t}=s(),{hasPaddleSubscription:r,isLoading:o}=c(),[a,l]=(0,n.useState)(!1),{subscription:u,subscriptionLoading:d}=(0,i.FG)({checkWhenInBadState:!0}),f=t||o||d,p=async()=>{await e(),l(!0)};return(0,n.useEffect)(()=>{f||a||u||!r||p()},[r,u,e,f,a]),f}},52119:function(e,t,r){"use strict";r.d(t,{w:function(){return s}});var n=r(85893),i=r(20966),o=r(95117),a=r(90512);function s(e){let{text:t,className:r}=e;return(0,n.jsxs)("div",{className:(0,a.Z)(r,"absolute inset-0 flex items-center justify-center"),children:[(0,n.jsx)(i.a,{}),t&&(0,n.jsx)(o.x,{children:t})]})}},91587:function(e,t,r){"use strict";r.d(t,{w:function(){return a}});var n=r(524),i=r(5779),o=r(35818);let a=()=>(0,i.g)().customPaymentProvider&&(n.O.NEXT_PUBLIC_DEFAULT_PAYMENT_PROVIDER!==o.OH.Paddle||n.O.NEXT_PUBLIC_PADDLE_TOKEN)?n.O.NEXT_PUBLIC_DEFAULT_PAYMENT_PROVIDER:o.OH.Stripe},89220:function(e,t,r){"use strict";r.d(t,{p:function(){return w}});var n=r(85893),i=r(56817),o=r(14821),a=r(67841),s=r(71232),l=r(97564),c=r(54777),u=r(7001),d=r(40633),f=r(35818),p=r(81811),h=r(60136),m=r(67294),g=r(43597),v=r(10558),y=r(38394),b=r(81447);let x=(0,i.k)(e=>({label:{fontSize:12,fontWeight:600,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:"transparent"}}},opened:{transform:"rotate(180deg)",transition:"transform 200ms ease"},actionButton:{[b.D.smallerThan("sm")]:{width:"100%"}},indicatorRoot:{lineHeight:1},indicatorIndicator:{lineHeight:1.6}}));function w(e){let{query:t,onChange:r,...i}=e,{classes:b,theme:w,cx:S}=x(),k=(0,v.d)(),[j,E]=(0,m.useState)(!1),{filters:O,setFilters:C}=(0,y.PH)(e=>({filters:e.posts,setFilters:e.setPostFilters})),I=t||O,P=I.period&&I.period!==f.Tz.AllTime?1:0,A=(0,m.useCallback)(()=>{let e={followed:!1,period:f.Tz.AllTime};r?r(e):C(e)},[r,C]),T=(0,n.jsx)(o.z,{offset:4,label:P||void 0,size:16,zIndex:10,showZero:!1,dot:!1,classNames:{root:b.indicatorRoot,indicator:b.indicatorIndicator},inline:!0,children:(0,n.jsx)(a.z,{className:b.actionButton,color:"gray",radius:"xl",variant:"dark"===w.colorScheme?"filled":"light",...i,rightIcon:(0,n.jsx)(p.Z,{className:S({[b.opened]:j}),size:16}),onClick:()=>E(e=>!e),"data-expanded":j,children:(0,n.jsxs)(s.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(h.Z,{size:16}),"Filters"]})})}),z=(0,n.jsxs)(l.K,{spacing:"lg",children:[(0,n.jsxs)(l.K,{spacing:"md",children:[(0,n.jsx)(c.i,{label:"Time period",labelProps:{weight:"bold",size:"sm"}}),(null==t?void 0:t.period)&&r?(0,n.jsx)(g.q,{type:"posts",variant:"chips",value:t.period,onChange:e=>r({period:e})}):(0,n.jsx)(g.q,{type:"posts",variant:"chips"})]}),P>0&&(0,n.jsx)(a.z,{color:"gray",variant:"dark"===w.colorScheme?"filled":"light",onClick:A,fullWidth:!0,children:"Clear all filters"})]});return k?(0,n.jsxs)(n.Fragment,{children:[T,(0,n.jsx)(u.d,{opened:j,onClose:()=>E(!1),size:"90%",position:"bottom",styles:{drawer:{height:"auto",maxHeight:"calc(100dvh - var(--header-height))",overflowY:"auto"},body:{padding:16,paddingTop:0,overflowY:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},children:z})]}):(0,n.jsxs)(d.J,{zIndex:200,position:"bottom-end",shadow:"md",radius:12,onClose:()=>E(!1),middlewares:{flip:!0,shift:!0},children:[(0,n.jsx)(d.J.Target,{children:T}),(0,n.jsx)(d.J.Dropdown,{maw:468,p:"md",w:"100%",children:z})]})}},62777:function(e,t,r){"use strict";r.d(t,{M:function(){return l}});var n=r(85893),i=r(88002),o=r(33416),a=r(72456),s=r(2807);function l(e){let{entityType:t,entityId:r}=e,l=a.SX.useContext(),c=a.SX.userProfile.addEntityToShowcase.useMutation({onSuccess:async()=>{(0,s.LX)({message:"".concat(t," has been added to showcase")});try{await l.userProfile.get.invalidate()}catch(e){}}}),u=async()=>{await c.mutateAsync({entityType:t,entityId:r}).catch(e=>{(0,s.s9)({title:"Unable to add to showcase",error:Error(e.message)})})};return(0,n.jsx)(i.v.Item,{icon:(0,n.jsx)(o.Z,{size:14,stroke:1.5}),onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},children:"Add to Showcase"},"add-to-showcase")}},42724:function(e,t,r){"use strict";r.d(t,{EX:function(){return et},OW:function(){return en},K3:function(){return er},ew:function(){return ei}});var n=r(85893),i=r(56817),o=r(97564),a=r(38623),s=r(64577),l=r(71232),c=r(5044),u=r(95117),d=r(41071),f=r(67294),p=r(81447);let h=(0,i.k)(function(e){let{count:t=4,rowCount:r=2,columnCount:n,widthGrid:i="380px",widthCarousel:o="280px"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,s=a("scrollGrid"),l=a("grid"),c=a("nullState");return{title:{fontSize:"32px",[p.D.smallerThan("sm")]:{fontSize:"24px"}},profileSection:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,paddingTop:e.spacing.xl,paddingBottom:e.spacing.xl,marginRight:-e.spacing.md,marginLeft:-e.spacing.md,"&:nth-of-type(even)":{background:"dark"===e.colorScheme?e.colors.dark[8]:e.fn.darken(e.colors.gray[0],.01)},"&:hover":{["& .".concat(s,", & .").concat(l)]:{"&::-webkit-scrollbar":{opacity:1},"&::-webkit-scrollbar-thumb":{backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}}}},loader:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:101},nullState:{ref:c,position:"relative"},loading:{position:"relative","&::after":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',background:"rgba(0,0,0, 0.3)",zIndex:100}},grid:{ref:l,display:"grid",gridTemplateColumns:"repeat(".concat(null!=n?n:"auto-fill",", minmax(").concat(i,", 1fr))"),columnGap:e.spacing.md,gridTemplateRows:"repeat(".concat(null!=r?r:"2",", auto)"),gridAutoRows:0,overflow:"hidden",marginTop:-e.spacing.md,paddingBottom:e.spacing.md,"&::-webkit-scrollbar":{background:"transparent",opacity:0,height:8},"&::-webkit-scrollbar-thumb":{borderRadius:4},"& > *":{marginTop:e.spacing.md},[p.D.smallerThan("sm")]:{gridAutoFlow:"column",gridTemplateColumns:"repeat(".concat(t,", ").concat(o,")"),gridTemplateRows:"auto",scrollSnapType:"x mandatory",overflowX:"auto",marginRight:-e.spacing.md,marginLeft:-e.spacing.md,paddingLeft:e.spacing.md,paddingRight:e.spacing.md,"& > *":{scrollSnapAlign:"center"}}}}}),m=e=>{let{rowCount:t=1,columnCount:r=7}=e,{classes:i}=h({count:r*t,rowCount:t,widthGrid:"280px"});return(0,n.jsxs)(o.K,{spacing:"md",w:"100%",style:{overflow:"hidden"},children:[(0,n.jsx)(a.O,{width:"33%",height:22}),(0,n.jsx)("div",{className:i.grid,children:Array.from({length:t*r}).map((e,t)=>(0,n.jsx)(s.o,{ratio:7/9,children:(0,n.jsx)(a.O,{width:"100%"})},t))})]})},g=e=>{let{children:t,title:r,icon:i,action:a}=e,{theme:s,classes:d}=h({});return(0,n.jsxs)(o.K,{spacing:"md",children:[(0,n.jsxs)(l.Z,{position:"apart",align:"center",children:[(0,n.jsxs)(l.Z,{children:[(0,n.jsx)(c.k,{size:"xl",color:"dark",variant:"default",children:i}),(0,n.jsx)(u.x,{className:d.title,weight:590,color:"dark"===s.colorScheme?"white":"black",children:r})]}),a]}),t]})},v=()=>(0,n.jsxs)(o.K,{align:"center",py:"lg",children:[(0,n.jsx)(c.k,{size:128,radius:100,children:(0,n.jsx)(d.Z,{size:80})}),(0,n.jsx)(u.x,{size:32,align:"center",children:"No results found"}),(0,n.jsx)(u.x,{align:"center",children:"Try adjusting your search or filters to find what you're looking for"})]});var y=(0,r(21955).Z)("outline","trending-up","IconTrendingUp",[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]]),b=r(79735),x=r(67731),w=r(32957),S=r(75085),k=r(79543),j=r(67841),E=r(74865);function O(e){let{children:t,className:r,...i}=e,{classes:o,cx:a}=C(i),s=(0,E.y)(e=>{for(let t of[...e.target.childNodes]){let{height:e}=t.getBoundingClientRect();0===e?t.style.visibility="hidden":t.style.removeProperty("visibility")}});return i.carousel?(0,n.jsx)("div",{className:o.container,children:(0,n.jsx)("div",{className:o.scrollArea,children:(0,n.jsx)("div",{ref:s,className:a(o.grid,o.gridCarousel,r),children:t})})}):(0,n.jsx)("div",{ref:s,className:a(o.grid,r),children:t})}let C=(0,i.k)((e,t,r)=>{let{itemCount:n,rows:i,minWidth:o=280,defaultWidth:a=280}=t;return{grid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(o,"px, 1fr))"),gridTemplateRows:"repeat(".concat(null!=i?i:"2",", auto)"),gridAutoRows:0,overflow:"hidden",marginTop:-8,"&::-webkit-scrollbar":{background:"transparent",opacity:0,height:8},"&::-webkit-scrollbar-thumb":{borderRadius:4},"& > *":{margin:8},[p.D.smallerThan("sm")]:{gridAutoFlow:"column",gridTemplateColumns:"repeat(".concat(n,", ").concat(a,"px)"),gridTemplateRows:"auto",scrollSnapType:"x mandatory",overflowX:"auto",marginRight:-e.spacing.md,marginLeft:-e.spacing.md,paddingLeft:e.spacing.md,paddingRight:e.spacing.md,"& > *":{scrollSnapAlign:"center"}}},gridCarousel:{gridAutoRows:void 0,gridAutoFlow:"column",gridTemplateColumns:"repeat(".concat(n,", ").concat(a,"px)"),gridTemplateRows:"auto",overflow:"visible",marginRight:-e.spacing.md,marginLeft:-e.spacing.md,paddingLeft:e.spacing.md,paddingRight:e.spacing.md,"& > *":{scrollSnapAlign:"initial"},[p.D.smallerThan("sm")]:{scrollSnapType:"x mandatory","& > *":{scrollSnapAlign:"center"}}},container:{position:"relative","&:hover":{["& .".concat(r("scrollArea"))]:{"&::-webkit-scrollbar":{opacity:1},"&::-webkit-scrollbar-thumb":{backgroundColor:"dark"===e.colorScheme?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}}}},scrollArea:{ref:r("scrollArea"),overflow:"auto",scrollSnapType:"auto",[p.D.smallerThan("sm")]:{scrollSnapType:"x mandatory"},"&::-webkit-scrollbar":{background:"transparent",opacity:0,height:8},"&::-webkit-scrollbar-thumb":{borderRadius:4}}}});var I=r(56311),P=r(93580),A=r(65542),T=r(9354),z=r(86866),N=r(20966),R=r(35818),_=r(23693),M=r(58456),D=r(68888),L=r(81644),F=r(24480),U=r(82623),B=r(16045),H=r(63155),Z=r(82633),W=r(75471),V=r(68848),$=r(12260),q=r(40099),G=r(65297);let K=(0,i.k)(()=>({title:{[p.D.smallerThan("sm")]:{fontSize:"24px"}},ContainerGrid:{[p.D.smallerThan("sm")]:{flexDirection:"column-reverse"}}}));var X=r(33416),J=r(72456),Y=r(52215),Q=r(36061);let ee={showcase:!1,popularModels:!0,popularArticles:!1,modelsOverview:!0,imagesOverview:!0,recentReviews:!0},et={showcase:e=>{let{user:t}=e,[r,i]=(0,I.bK)({id:"profile-showcase-section"}),o=t.profile.showcaseItems,{data:a,isLoading:s,isRefetching:l}=J.SX.image.getEntitiesCoverImage.useQuery({entities:o},{enabled:o.length>0&&i,keepPreviousData:!0,trpc:{context:{skipBatch:!0}}}),c=(0,f.useMemo)(()=>{var e;return null!==(e=null==a?void 0:a.map(e=>{var t;return{...e,tagIds:null===(t=e.tags)||void 0===t?void 0:t.map(e=>e.id)}}))&&void 0!==e?e:[]},[a]),{items:u}=(0,Q.f)({type:"images",data:c}),{classes:d,cx:p}=h({count:o.length,rowCount:2,widthGrid:"280px"}),v=0===o.length||!s&&!u.length;return v?null:(0,n.jsx)("div",{ref:r,className:v?void 0:d.profileSection,children:i&&(s?(0,n.jsx)(m,{rowCount:2}):(0,n.jsx)(g,{title:"Showcase",icon:(0,n.jsx)(X.Z,{}),children:(0,n.jsx)(O,{itemCount:o.length,rows:2,className:p({[d.nullState]:!u.length,[d.loading]:l}),children:u.map(e=>(0,n.jsx)(Y.t,{image:e,entityId:e.entityId,entityType:e.entityType},"".concat(e.entityType,"-").concat(e.entityId)))})}))})},popularModels:e=>{let{user:t}=e,[r,i]=(0,I.bK)({id:"profile-popular-models-section"}),{models:o,isLoading:a}=(0,x.Rr)({limit:32,username:t.username,sort:w.Qp.HighestRated},{keepPreviousData:!0,enabled:i}),{classes:s}=h({count:o.length,rowCount:2,widthGrid:"280px"}),l=!a&&!o.length;return l?null:(0,n.jsx)("div",{ref:r,className:l?void 0:s.profileSection,children:i&&(a?(0,n.jsx)(m,{rowCount:2}):(0,n.jsx)(g,{title:"Most popular models",icon:(0,n.jsx)(y,{}),action:(0,n.jsx)(k.p,{legacyBehavior:!0,href:"/user/".concat(t.username,"/models?sort=").concat(w.Qp.HighestRated),passHref:!0,children:(0,n.jsx)(j.z,{h:34,component:"a",variant:"subtle",rightIcon:(0,n.jsx)(b.Z,{size:16}),children:(0,n.jsx)(u.x,{inherit:!0,children:" View all models"})})}),children:(0,n.jsx)(O,{itemCount:o.length,rows:2,children:o.map(e=>(0,n.jsx)(S.L,{data:e},e.id))})}))})},popularArticles:e=>{let{user:t}=e,[r,i]=(0,I.bK)({id:"profile-article-section"}),{articles:o,isLoading:a}=(0,A.Zw)({limit:33,username:t.username,sort:w.Qo.MostBookmarks},{keepPreviousData:!0,enabled:i}),s=(0,f.useMemo)(()=>o.slice(0,32),[o]),{classes:l}=h({count:s.length,rowCount:1}),c=!a&&!s.length;return c&&i?null:(0,n.jsx)("div",{ref:r,className:c?void 0:l.profileSection,children:i&&(a?(0,n.jsx)(m,{}):(0,n.jsx)(g,{title:"Most popular articles",icon:(0,n.jsx)(P.Z,{}),action:(0,n.jsx)(k.p,{legacyBehavior:!0,href:"/user/".concat(t.username,"/articles?sort=").concat(w.Qo.Newest),passHref:!0,children:(0,n.jsx)(j.z,{h:34,component:"a",variant:"subtle",rightIcon:(0,n.jsx)(b.Z,{size:16}),children:(0,n.jsx)(u.x,{inherit:!0,children:" View all Articles"})})}),children:(0,n.jsx)(O,{itemCount:s.length,rows:1,children:s.map(e=>(0,n.jsx)(T.T,{data:e,aspectRatio:"square"},e.id))})}))})},modelsOverview:e=>{let{user:t}=e,[r,i]=(0,I.bK)({id:"profile-models-section"}),{filters:o}=(0,x.RD)({period:"AllTime",sort:w.Qp.Newest}),{models:a,isLoading:s,isRefetching:l}=(0,x.Rr)({...o,username:t.username,limit:64},{keepPreviousData:!0,enabled:i}),c=(0,f.useMemo)(()=>a.slice(0,32),[a]),{classes:d,cx:p}=h({count:c.length,rowCount:2,widthGrid:"280px"}),y=!s&&!c.length;return y?null:(0,n.jsx)("div",{ref:r,className:y?void 0:d.profileSection,children:i&&(s?(0,n.jsx)(m,{rowCount:2}):(0,n.jsx)(g,{title:"Models",icon:(0,n.jsx)(z.Z,{}),action:!l&&(0,n.jsx)(k.p,{legacyBehavior:!0,href:"/user/".concat(t.username,"/models?sort=").concat(w.Qp.Newest),passHref:!0,children:(0,n.jsx)(j.z,{h:34,component:"a",variant:"subtle",rightIcon:(0,n.jsx)(b.Z,{size:16}),children:(0,n.jsx)(u.x,{inherit:!0,children:" View all models"})})}),children:(0,n.jsxs)(O,{itemCount:c.length,rows:2,className:p({[d.nullState]:!c.length,[d.loading]:l}),children:[!c.length&&(0,n.jsx)(v,{}),c.map(e=>(0,n.jsx)(S.L,{data:e},e.id)),l&&(0,n.jsx)(N.a,{className:d.loader})]})}))})},imagesOverview:e=>{let{user:t}=e,[r,i]=(0,I.bK)({id:"profile-images-section"}),{filters:o}=(0,L.QM)({sort:w.FA.Newest,period:R.Tz.AllTime,tags:[]}),a=(0,M.bT)(),{images:s,isLoading:l,isRefetching:c}=(0,L.XQ)({...o,limit:64,userId:t.id,withMeta:!1,types:void 0,include:["profilePictures","cosmetics"],browsingLevel:a},{keepPreviousData:!0,enabled:i}),d=(0,f.useMemo)(()=>s.slice(0,32),[s]),{classes:p,cx:y}=h({count:d.length,rowCount:2,widthGrid:"280px"}),x=!l&&!d.length;return x?null:(0,n.jsx)("div",{ref:r,className:x?void 0:p.profileSection,children:i&&(l?(0,n.jsx)(m,{rowCount:2}):(0,n.jsx)(g,{title:"Images",icon:(0,n.jsx)(_.Z,{}),action:!c&&(0,n.jsx)(k.p,{legacyBehavior:!0,href:"/user/".concat(t.username,"/images?sort=").concat(w.FA.Newest),passHref:!0,children:(0,n.jsx)(j.z,{h:34,component:"a",variant:"subtle",rightIcon:(0,n.jsx)(b.Z,{size:16}),children:(0,n.jsx)(u.x,{inherit:!0,children:" View all images"})})}),children:(0,n.jsxs)(O,{itemCount:d.length,rows:2,className:y({[p.nullState]:!d.length,[p.loading]:c}),children:[!d.length&&(0,n.jsx)(v,{}),(0,n.jsx)(F.q,{images:d,children:d.map(e=>(0,n.jsx)(D.f,{data:e},e.id))}),c&&(0,n.jsx)(N.a,{className:p.loader})]})}))})},recentReviews:e=>{let{user:t}=e,{classes:r}=K(),[i,a]=(0,I.bK)({id:"profile-reviews-section"}),{classes:s,theme:d}=h({}),{resourceReviews:f,isLoading:p}=(0,$.Mq)({username:t.username,include:["model"],limit:5,hasDetails:!0},{enabled:a}),v=!p&&!f.length;return v?null:(0,n.jsx)("div",{ref:i,className:v?void 0:s.profileSection,children:a&&(p?(0,n.jsx)(m,{}):(0,n.jsx)(g,{title:"Recent Reviews",icon:(0,n.jsx)(B.Z,{}),children:(0,n.jsx)(H.a,{className:r.ContainerGrid,children:(0,n.jsx)(H.a.Col,{sm:12,md:8,children:(0,n.jsx)(o.K,{children:f.map(e=>{let t=e.user,r=e.recommended;return(0,n.jsx)(U.X,{p:"md",radius:"sm",style:{background:"dark"===d.colorScheme?d.colors.dark[6]:d.colors.gray[1]},children:(0,n.jsxs)(o.K,{children:[(0,n.jsxs)(l.Z,{align:"flex-start",position:"apart",noWrap:!0,children:[(0,n.jsx)(G.Y,{user:t,withUsername:!0,size:"lg",avatarSize:40,spacing:"md",linkToProfile:!0,subText:(0,n.jsx)(u.x,{color:"dimmed",size:"sm",children:(0,n.jsx)(W.i,{date:e.createdAt})})}),(0,n.jsx)(c.k,{size:"lg",radius:"md",variant:"light",color:r?"success.5":"red",children:r?(0,n.jsx)(q.l,{filled:!0}):(0,n.jsx)(q.k,{filled:!0})})]}),(0,n.jsxs)(o.K,{w:"100%",children:[e.details&&(0,n.jsx)(Z.i,{maxHeight:300,children:(0,n.jsx)(V.u,{html:e.details,style:{color:"dark"===d.colorScheme?"white":"black"}})}),(0,n.jsx)(l.Z,{spacing:"xs",children:e.model&&(0,n.jsx)(j.z,{px:4,py:2,component:"a",href:"/models/".concat(e.model.id,"?modelVersionId=").concat(e.modelVersion.id),color:"blue",size:"xs",style:{height:"26px"},children:(0,n.jsxs)(l.Z,{spacing:2,children:[(0,n.jsx)(z.Z,{size:15}),(0,n.jsx)("span",{children:e.model.name})]})})})]})]})},e.id)})})})})}))})}},er={showcase:"Showcase",popularModels:"Most popular models",popularArticles:"Most popular articles",modelsOverview:"Models overview",imagesOverview:"Images overview",recentReviews:"Recent reviews"},en=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e.filter(e=>{let{key:t}=e;return Object.keys(et).includes(t)}),...Object.keys(ee).filter(t=>!e.find(e=>e.key===t)).map(e=>({key:e,enabled:ee[e]}))]},ei=e=>{var t,r,n,i;let{overview:o,userWithProfile:a}=e;if(a.bannedAt)return!0;let s=en(null!==(n=null==a?void 0:null===(t=a.profile)||void 0===t?void 0:t.profileSectionsSettings)&&void 0!==n?n:[]);if(!s.find(e=>e.enabled))return!0;let l=null!==(i=null==a?void 0:null===(r=a.profile)||void 0===r?void 0:r.showcaseItems)&&void 0!==i?i:[],c=e=>s.find(t=>e.includes(t.key)&&t.enabled);return(0===l.length||!c(["showcase"]))&&((null==o?void 0:o.modelCount)===0||!c(["modelsOverview","popularModels"]))&&((null==o?void 0:o.imageCount)===0||!c(["imagesOverview"]))&&((null==o?void 0:o.articleCount)===0||!c(["popularArticles"]))&&(!(null==o?void 0:o.hasReceivedReviews)||!c(["recentReviews"]))}},60210:function(e,t,r){"use strict";r.d(t,{O:function(){return s},x:function(){return a}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null),a=()=>{let e=(0,i.useContext)(o);return null!=e?e:{}},s=e=>{let{children:t,settings:r}=e;return(0,n.jsx)(o.Provider,{value:r,children:t})}},80354:function(e,t,r){"use strict";r.d(t,{z:function(){return N},J:function(){return R}});var n=r(85893),i=r(71232),o=r(95117),a=r(67841),s=r(64761),l=r(17789),c=r(80777),u=r(23693),d=r(33416),f=r(98729),p=r(14408),h=r(83425),m=r(87099),g=r(27338),v=r(19612),y=r(60210),b=r(17578),x=r(38498),w=r(88182),S=r(67294),k=r(73445),j=r(782),E=r(18753),O=r(72456);let C=e=>{let{entityType:t,entityId:r}=e;return"".concat(t,"_").concat(r)},I=(0,k.Ue)()((0,j.mW)((0,E.n)(e=>({reactions:{},toggleReaction:t=>{let{entityType:r,entityId:n,reaction:i,value:o}=t,a=C({entityType:r,entityId:n});e(e=>{e.reactions[a]?e.reactions[a][i]=o:e.reactions[a]={[i]:o}})}})))),P=e=>{let{entityType:t,entityId:r}=e,n=C({entityType:t,entityId:r});return I((0,S.useCallback)(e=>{var t;return null!==(t=e.reactions[n])&&void 0!==t?t:{}},[n]))};function A(e){let{userReaction:t,count:r=0,entityType:n,entityId:i,reaction:o,readonly:a,children:s,noEmpty:l,invisibleEmpty:c}=e,u=(0,b.xJ)(),d=C({entityType:n,entityId:i}),f=!!t,p=I(e=>{var r,n,i;return null!==(i=null===(n=e.reactions)||void 0===n?void 0:null===(r=n[d])||void 0===r?void 0:r[o])&&void 0!==i?i:!!t}),h=I(e=>e.toggleReaction),m=(0,S.useMemo)(()=>{if(!f)return p?r+1:r;{let e=r>0?r:1;return p?e:Math.max(0,e-1)}},[f,p,r]),{mutate:g,isLoading:v}=O.SX.reaction.toggle.useMutation(),y=!!u&&!a&&!v,x=s({hasReacted:p,count:m,reaction:o,canClick:y});return l&&m<1?c?(0,S.cloneElement)(x,{className:"invisible"}):null:y?(0,S.cloneElement)(x,{onClick:e=>{e.preventDefault(),e.stopPropagation(),h({entityType:n,entityId:i,reaction:o,value:!p}),g({entityId:i,entityType:n,reaction:o})}}):x}var T=r(90512);let z={image:["Like","Heart","Laugh","Cry"],post:["Like","Heart","Laugh","Cry"],bountyEntry:["Like","Heart","Laugh","Cry"],clubPost:["Like","Heart","Laugh","Cry"],commentOld:["Like","Heart","Laugh","Cry"],comment:["Like","Heart","Laugh","Cry"],article:["Like","Heart","Laugh","Cry"]};function N(e){let{metrics:t={},imageCount:r,...a}=e,s=Object.values(t).reduce((e,t)=>e+(null!=t?t:0),0);return 0===s&&0===r?null:(0,n.jsxs)(i.Z,{spacing:"xs",sx:{cursor:"default"},...a,children:[r&&(0,n.jsxs)(i.Z,{spacing:4,align:"center",children:[(0,n.jsx)(u.Z,{size:20,strokeWidth:2}),(0,n.jsx)(o.x,{size:"sm",weight:500,children:r})]}),s>0&&(0,n.jsxs)(i.Z,{spacing:4,align:"center",children:[(0,n.jsx)(d.Z,{size:20,strokeWidth:2}),(0,n.jsx)(o.x,{size:"sm",weight:500,pr:2,children:s})]})]})}function R(e){var t;let{reactions:r,metrics:i,entityType:o,entityId:s,readonly:l,targetUserId:u,className:d,showAll:h,invisibleEmpty:g}=e,b=P({entityType:o,entityId:s}),[x,w]=(0,c.X)({key:"showAllReactions",defaultValue:!1,getInitialValueInEffect:!0}),{buttonStyling:S,hideReactions:k}=(0,y.x)(),j=["tippedAmountCount"],E=z[o],O=!1,C=!0;if(i)for(let[e,t]of Object.entries(i)){let n=(0,m.Z)(e).replace(/count/,"");if(E&&!E.includes(n)||j.includes(e))continue;let i=void 0!==b[n]?b[n]:!!r.find(e=>e.reaction===n);t>0||b[n]||i?O=!0:C=!1}else C=!1;let I=["image"].includes(o);return l&&!O||k?null:(0,n.jsx)(v.L,{message:"You must be logged in to react to this",withArrow:!1,children:(0,n.jsxs)("div",{className:(0,T.Z)("flex items-center justify-center gap-1",d),onClick:e=>{l||(e.preventDefault(),e.stopPropagation())},children:[!h&&!C&&!l&&(0,n.jsxs)(a.z,{variant:"subtle",size:"xs",color:"gray",radius:"xs",px:0,compact:!0,onClick:()=>w(e=>!e),classNames:{inner:"flex gap-0.5"},...S?S("AddReaction"):{},children:[(0,n.jsx)(f.Z,{size:16,stroke:2.5}),(0,n.jsx)(p.Z,{size:18,stroke:2.5})]}),(0,n.jsx)(L,{reactions:r,metrics:i,entityType:o,entityId:s,noEmpty:!(null!=h?h:x),readonly:l,available:E,invisibleEmpty:g}),I&&u&&(0,n.jsx)(U,{toUserId:u,tippedAmountCount:null!==(t=null==i?void 0:i.tippedAmountCount)&&void 0!==t?t:0,entityType:o,entityId:s,hideLoginPopover:!0,readonly:l})]})})}let _=Object.keys(x._G.availableReactions),M=_.reduce((e,t)=>({...e,[t]:"".concat(t.toLowerCase(),"Count")}),{});function D(e,t){var r;return null!==(r=t[M[e]])&&void 0!==r?r:0}function L(e){let{reactions:t,metrics:r={},entityType:i,entityId:o,available:a=z[i],noEmpty:s,readonly:l,invisibleEmpty:c}=e,u=(0,b.xJ)();return(0,n.jsx)(n.Fragment,{children:_.filter(e=>!a||a.includes(e)).sort((e,t)=>{if(!c||!s)return 0;let n=D(e,r),i=D(t,r);return 0===n&&i>0?1:0===i&&n>0?-1:0}).map(e=>{let a=D(e,r),d=t.find(t=>t.userId===(null==u?void 0:u.id)&&t.reaction===e);return(0,n.jsx)(A,{reaction:e,userReaction:d,count:a,entityType:i,entityId:o,readonly:!u||u.muted||l,noEmpty:s,invisibleEmpty:c,children:F},e)})})}function F(e){let{hasReacted:t,count:r,reaction:i,canClick:s}=e,l=t?"blue":"gray",{hideReactionCount:c,buttonStyling:u}=(0,y.x)();return(0,n.jsxs)(a.z,{size:"xs",radius:"xs",variant:t?"light":"subtle",sx:e=>({"&[data-disabled]":{cursor:"default",color:e.fn.variant({variant:"light",color:l}).color,...!t&&{background:"transparent !important"}},"&:hover":{background:e.fn.rgba(e.fn.variant({variant:"light",color:l}).background,.4)}}),disabled:!s,pl:2,pr:3,color:l,compact:!0,classNames:{label:"flex gap-1"},...null==u?void 0:u(i,t),children:[(0,n.jsx)(o.x,{sx:{fontSize:"1.2em",lineHeight:1.1},children:x._G.availableReactions[i]})," ",!c&&r]})}function U(e){let{tippedAmountCount:t,entityId:r,entityType:i,toUserId:a,readonly:c,...u}=e,{buttonStyling:d}=(0,y.x)(),f=(0,s.rZ)(),p={image:"Image"}[i],m=(0,g.A)({entityType:null!=p?p:"Image",entityId:r});if(!p)return null;let v=(0,n.jsxs)(l.C,{size:"md",radius:"xs",py:10,px:3,color:"yellow.7",variant:"light",...d?d("BuzzTip"):{},classNames:{inner:"flex gap-0.5 items-center"},children:[(0,n.jsx)(h.Z,{color:"yellow.7",style:{fill:f.colors.yellow[7]},size:16}),(0,n.jsx)(o.x,{inherit:!0,children:(0,w.dm)(t+m)})]});return c?v:(0,n.jsx)(g.k,{toUserId:a,entityType:p,entityId:r,...u,children:v})}},21708:function(e,t,r){"use strict";r.d(t,{CY:function(){return l},ko:function(){return s}});var n=r(85893),i=r(67294);r(4298),r(524);var o=r(95117),a=r(54685);let s=(0,i.createContext)({ready:!1});function l(e){return(0,n.jsxs)(o.x,{size:"xs",...e,children:["This site is protected by reCAPTCHA and the Google"," ",(0,n.jsx)(a.e,{href:"https://policies.google.com/privacy",children:"Privacy Policy"})," and"," ",(0,n.jsx)(a.e,{href:"https://policies.google.com/terms",children:"Terms of Service"})," apply."]})}},57652:function(e,t,r){"use strict";r.d(t,{F:function(){return h},v:function(){return f}});var n=r(85893),i=r(67294),o=r(11163),a=r(1604),s=r(64980),l=r(27484),c=r.n(l),u=r(17578);let d=(0,i.createContext)(null),f=()=>{let e=(0,i.useContext)(d);if(!e)throw Error("ReferralsContext not in tree");return e},p=a.z.object({ref_id:a.z.string().optional(),ref_code:a.z.string().optional(),ref_source:a.z.string().optional()}),h=e=>{let{children:t,...r}=e,a=(0,u.xJ)(),l=(0,o.useRouter)(),f=p.safeParse(l.query),[h,m]=(0,i.useState)(r.code),[g,v]=(0,i.useState)(r.source),[y,b]=(0,i.useState)(r.landingPage),[x,w]=(0,i.useState)(r.loginRedirectReason);return(0,i.useEffect)(()=>{if(f.success&&!(null==a?void 0:a.referral)){let{ref_id:e,ref_source:t,ref_code:n}=f.data,{code:i,source:o,landingPage:a}=r,u=c()().add(5,"day").toDate();e&&e!==i&&((0,s.d)("ref_code",e,u),m(e)),n&&n!==i&&((0,s.d)("ref_code",n,u),m(n)),t&&t!==o&&((0,s.d)("ref_source",t,u),v(t)),a||((0,s.d)("ref_landing_page",l.asPath,u),b(l.asPath))}},[f.success,a]),(0,n.jsx)(d.Provider,{value:{code:h,source:g,landingPage:y,setLoginRedirectReason:e=>{(0,s.d)("ref_login_redirect_reason",e,c()().add(5,"day").toDate()),w(e)}},children:t})}},68848:function(e,t,r){"use strict";r.d(t,{u:function(){return u}});var n=r(85893),i=r(56817),o=r(4397),a=r(67294),s=r(28270),l=r(81447);let c=(0,i.k)(e=>({htmlRenderer:{"& p:last-of-type":{marginBottom:0},p:{wordBreak:"break-word"},iframe:{border:"none"},code:{whiteSpace:"break-spaces"},'div[data-type="instagram"]':{display:"flex",flexDirection:"column",alignItems:"center",height:769,"& > iframe":{width:"50%",overflow:"hidden",flexGrow:1},[l.D.smallerThan("md")]:{height:649},[l.D.smallerThan("sm")]:{height:681,"& > iframe":{width:"100%"}}},'div[data-type="strawPoll"]':{display:"flex",flexDirection:"column",alignItems:"center",height:480,"& > iframe":{flexGrow:1}},"h1, h2, h3":{"&:before":{display:"block",content:'""',marginTop:-7*e.spacing.xs,height:7*e.spacing.xs+e.spacing.xs,visibility:"hidden"}},hr:{height:"4px",padding:0,margin:"24px 0",backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[2],border:0}}}));function u(e){let{html:t,withMentions:r=!1,...i}=e,{classes:l,theme:u}=c();return t=(0,a.useMemo)(()=>(0,s.Z6)(t,{parseStyleAttributes:!0,allowedAttributes:{...s.Mn,div:["data-youtube-video","data-type","style"]},allowedStyles:{div:{height:[/^\d+px$/]}},transformTags:{div:function(e,t){return"strawPoll"!==t["data-type"]&&delete t.style,{tagName:e,attribs:t}},span:function(e,t){var n,i,o;let a=t["data-type"],l=t.style,c=null==l?void 0:null===(n=l.match(/color:#([0-9a-f]{6})/))||void 0===n?void 0:n[1],[,d,f,p]=null!==(i=null==l?void 0:l.match(/color:rgba?\((\d+), (\d+), (\d+),? ?(\d+)?\)/))&&void 0!==i?i:[],h=[d,f,p].map(e=>{let t=parseInt(e,10);return isNaN(t)?"":t.toString(16).padStart(2,"0")}).filter(Boolean);3===h.length&&(c=h.join(""));let m=!!c&&(0,s.V9)({hexColor:c,colorScheme:u.colorScheme,threshold:.2});return r&&"mention"===a?{tagName:"a",attribs:{...t,href:"/user/".concat(null!==(o=t["data-label"])&&void 0!==o?o:t["data-id"])}}:{tagName:e,attribs:{...t,style:m&&c?l+";color:".concat("dark"===u.colorScheme?u.fn.lighten(c,.5):u.fn.darken(c,.3)):l}}},a:function(e,t){return t.href&&(t.href=t.href.replace("//civitai.com","//".concat(location.host))),{tagName:e,attribs:t}}}}),[t,r,u.colorScheme]),(0,n.jsx)(o.l,{...i,className:l.htmlRenderer,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})})}},12260:function(e,t,r){"use strict";r.d(t,{KD:function(){return p},LS:function(){return f},Mq:function(){return d},Pr:function(){return g},UV:function(){return l},VV:function(){return u},cz:function(){return h},kL:function(){return m},nO:function(){return c}});var n=r(16058),i=r(12902),o=r(67294),a=r(17578),s=r(72456);let l=()=>{let e=s.SX.useUtils();return s.SX.resourceReview.create.useMutation({onSuccess:async(t,r)=>{var n,i,o;let{modelId:a,recommended:s,modelVersionId:l}=r;e.resourceReview.getUserResourceReview.setData({modelId:a},e=>[...(null!=e?e:[]).filter(e=>e.modelVersionId!==l),t]),e.resourceReview.getRatingTotals.setData({modelId:a,modelVersionId:l},e=>e?s?{...e,up:e.up+1}:{...e,down:e.down+1}:e);let c=null!==(i=e.user.getEngagedModels.getData())&&void 0!==i?i:{Recommended:[]},u=!s||null!==(o=null===(n=c.Recommended)||void 0===n?void 0:n.includes(a))&&void 0!==o&&o;e.user.getEngagedModels.setData(void 0,e=>{if(!e)return;let{Recommended:t=[],Notify:r=[],...n}=e;return u?{Recommended:t.filter(e=>e!==a),Notify:r.filter(e=>e!==a),...n}:{Recommended:[...t,a],Notify:[...r,a],...n}}),e.model.getById.setData({id:a},e=>{if(e)return s?(e.rank.thumbsUpCountAllTime+=1,e.rank.collectedCountAllTime+=1,l&&(e.modelVersions=e.modelVersions.map(e=>(e.id===l&&(e.rank.thumbsUpCountAllTime+=1),e)))):(e.rank.thumbsDownCountAllTime+=1,l&&(e.modelVersions=e.modelVersions.map(e=>(e.id===l&&(e.rank.thumbsDownCountAllTime+=1),e)))),e})}})},c=()=>{let e=s.SX.useUtils();return s.SX.resourceReview.update.useMutation({onSuccess:async(t,r)=>{var o,a,l,c,u;let{id:d,modelId:f,modelVersionId:p}=t;null!=r.recommended&&await e.resourceReview.getRatingTotals.invalidate({modelId:f,modelVersionId:p}),e.resourceReview.getUserResourceReview.setData({modelId:f},(0,i.ZP)(e=>{e&&e.forEach(e=>{e.modelVersionId===p&&(r.details&&(e.details=r.details),null!=r.recommended&&(e.recommended=r.recommended))})})),e.resourceReview.get.setData({id:r.id},(0,i.ZP)(e=>{e&&(null!=r.recommended&&(e.recommended=r.recommended),r.details&&(e.details=r.details),r.rating&&(e.rating=r.rating))}));let h=(0,n.Ol)(s.SX.resourceReview.getPaged),m=!0;s.Eh.setQueriesData({queryKey:h,exact:!1},(0,i.ZP)(e=>{let t=null==e?void 0:e.items.find(e=>e.id===d);t&&(m=!1,r.rating&&(t.rating=r.rating),r.details&&(t.details=r.details))})),m&&await e.resourceReview.getPaged.invalidate(),await e.user.getEngagedModels.cancel();let g=null!==(l=e.user.getEngagedModels.getData())&&void 0!==l?l:{Recommended:[],Notify:[]},v=null!==(c=null===(o=g.Notify)||void 0===o?void 0:o.indexOf(f))&&void 0!==c?c:-1,y=null!==(u=null===(a=g.Recommended)||void 0===a?void 0:a.indexOf(f))&&void 0!==u?u:-1,b=!r.recommended||y>-1;e.user.getEngagedModels.setData(void 0,e=>{if(!e)return;let{Recommended:t=[],...r}=e;return b?{Recommended:t.filter(e=>e!==f),...r}:{Recommended:[...t,f],...r}}),e.model.getById.setData({id:f},e=>{if(e)return!0===r.recommended?(e.rank.thumbsUpCountAllTime+=1,-1===v&&(e.rank.collectedCountAllTime+=1),e.rank.thumbsDownCountAllTime>0&&(e.rank.thumbsDownCountAllTime-=1),p&&(e.modelVersions=e.modelVersions.map(e=>(e.id===p&&(e.rank.thumbsUpCountAllTime+=1,e.rank.thumbsDownCountAllTime>0&&(e.rank.thumbsDownCountAllTime-=1)),e)))):!1===r.recommended&&(e.rank.thumbsDownCountAllTime+=1,e.rank.thumbsUpCountAllTime>0&&(e.rank.thumbsUpCountAllTime-=1),p&&(e.modelVersions=e.modelVersions.map(e=>(e.id===p&&(e.rank.thumbsDownCountAllTime+=1,e.rank.thumbsUpCountAllTime>0&&(e.rank.thumbsUpCountAllTime-=1)),e)))),e})}})},u=()=>{let e=s.SX.useUtils();return s.SX.resourceReview.delete.useMutation({onSuccess:async(t,r)=>{let{modelId:n,modelVersionId:o,recommended:a}=t,{id:s}=r;await e.resourceReview.getUserResourceReview.reset({modelId:n}),await e.resourceReview.get.reset({id:s}),e.resourceReview.getRatingTotals.setData({modelId:n,modelVersionId:o},(0,i.ZP)(e=>{e&&(a?e.up-=1:e.down-=1)})),e.user.getEngagedModels.setData(void 0,e=>{if(!e)return;let{Recommended:t=[],Notify:r=[],...i}=e;return{Recommended:t.filter(e=>e!==n),Notify:r.filter(e=>e!==n),...i}}),e.model.getById.setData({id:n},e=>{if(e)return a&&e.rank.thumbsUpCountAllTime>0?(e.rank.thumbsUpCountAllTime-=1,o&&(e.modelVersions=e.modelVersions.map(e=>(e.id===o&&e.rank.thumbsUpCountAllTime>0&&(e.rank.thumbsUpCountAllTime-=1),e)))):(e.rank.thumbsDownCountAllTime>0&&(e.rank.thumbsDownCountAllTime-=1),o&&(e.modelVersions=e.modelVersions.map(e=>(e.id===o&&e.rank.thumbsDownCountAllTime>0&&(e.rank.thumbsDownCountAllTime-=1),e)))),e})}})},d=(e,t)=>{null!=e||(e={});let{data:r,...n}=s.SX.resourceReview.getInfinite.useInfiniteQuery({...e},{getNextPageParam:e=>e?e.nextCursor:0,getPreviousPageParam:e=>e?e.nextCursor:0,trpc:{context:{skipBatch:!0}},...t}),i=(0,o.useMemo)(()=>{var e;return null!==(e=null==r?void 0:r.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[r]);return{data:r,resourceReviews:i,...n}},f=e=>{let{modelId:t,modelVersionId:r}=e,n=(0,a.xJ)();if(!t)return{currentUserReview:void 0,loading:!1};let{data:i,isLoading:o,isRefetching:l}=s.SX.resourceReview.getUserResourceReview.useQuery({modelId:t},{enabled:!!n&&!n.muted}),c=i;return r&&(c=null==i?void 0:i.filter(e=>e.modelVersionId===r)),{currentUserReview:null==c?void 0:c[0],loading:o||l}};function p(){let e=s.SX.useUtils();return s.SX.user.toggleFavorite.useMutation({onMutate:async t=>{var r,n,i,o,a,s;let{modelId:l,modelVersionId:c,setTo:u}=t,d=e.user.getEngagedModels.getData(),f=e.user.getBookmarkedModels.getData(),p=e.model.getById.getData({id:l});e.user.getBookmarkedModels.setData(void 0,e=>e?u?[l,...e]:e.filter(e=>e!==l):e);let h=null!==(a=null==d?void 0:null===(r=d.Notify)||void 0===r?void 0:r.indexOf(l))&&void 0!==a?a:-1,m=null!==(s=null==d?void 0:null===(n=d.Recommended)||void 0===n?void 0:n.indexOf(l))&&void 0!==s?s:-1;e.user.getEngagedModels.setData(void 0,e=>{if(e){if(u){var t,r;-1===h&&(e.Notify=[...null!==(t=e.Notify)&&void 0!==t?t:[],l]),-1===m&&(e.Recommended=[...null!==(r=e.Recommended)&&void 0!==r?r:[],l])}else -1!==m&&(e.Recommended=e.Recommended.filter(e=>e!==l));return e}}),e.model.getById.setData({id:l},e=>{if(e)return u&&-1===m?(e.rank.thumbsUpCountAllTime+=1,-1===h&&(e.rank.collectedCountAllTime+=1)):u||-1===m||(e.rank.thumbsUpCountAllTime-=1),e.rank.thumbsUpCountAllTime<0&&(e.rank.thumbsUpCountAllTime=0),e.rank.collectedCountAllTime<0&&(e.rank.collectedCountAllTime=0),e.modelVersions=e.modelVersions.map(e=>(e.id===c&&(u?e.rank.thumbsUpCountAllTime+=1:e.rank.thumbsUpCountAllTime-=1,e.rank.thumbsUpCountAllTime<0&&(e.rank.thumbsUpCountAllTime=0)),e)),e});let g=null==p?void 0:null===(o=p.modelVersions)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.id,v=e.resourceReview.getUserResourceReview.getData({modelId:l});return e.resourceReview.getUserResourceReview.setData({modelId:l},e=>{if(!u)return c?null==e?void 0:e.filter(e=>e.modelVersionId!==c):[];if(u){e||(e=[]);let t=null!=c?c:g,r=e.find(e=>e.modelVersionId===t);return t?r?e.map(e=>(e.modelVersionId===t&&(e.recommended=u),e)):[...e,{id:0,modelId:l,modelVersionId:t,recommended:!0,createdAt:new Date,exclude:!1}]:e}}),{prevData:{engagedModels:d,modelDetails:p,userReviews:v,bookmarkedModels:f}}},onError:(t,r,n)=>{var i,o,a;let{modelId:s}=r;e.user.getEngagedModels.setData(void 0,null==n?void 0:null===(i=n.prevData)||void 0===i?void 0:i.engagedModels),e.user.getBookmarkedModels.setData(void 0,null==n?void 0:null===(o=n.prevData)||void 0===o?void 0:o.bookmarkedModels),e.model.getById.setData({id:s},null==n?void 0:null===(a=n.prevData)||void 0===a?void 0:a.modelDetails)},onSettled:async(t,r,n)=>{let{modelId:i}=n;await e.resourceReview.getUserResourceReview.invalidate({modelId:i})}})}function h(e){return e?Object.entries(e).reduce((e,t)=>{let[r,n]=t;return"up"===r||"down"===r?e:e+n},0):0}function m(e,t){return t||(t=h(e)),Math.round(100*(e&&t>0?Object.entries(e).reduce((e,t)=>{let[r,n]=t;return"up"===r||"down"===r?e:e+Number(r)*n},0)/t:0))/100}let g=(e,t)=>{let{modelId:r,modelVersionId:n}=e,{data:i,isLoading:o,isRefetching:a}=s.SX.resourceReview.getRatingTotals.useQuery({modelId:r,modelVersionId:n},{...t});return{totals:i,loading:o||a}}},59455:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(5152);let i=r.n(n)()(()=>Promise.all([r.e(9584),r.e(6911),r.e(5276),r.e(1205)]).then(r.bind(r,11205)).then(e=>e.RichTextEditor),{loadableGenerated:{webpack:()=>[11205]}})},60326:function(e,t,r){"use strict";r.d(t,{W:function(){return y},r:function(){return b}});var n=r(85893),i=r(3594),o=r(64761),a=r(83143),s=r(3941),l=r(73678),c=r(65217),u=r(37048),d=r(67294);let[f,p]=(0,r(94878).P)("mantine-nprogress"),h=p("start");p("stop"),p("reset"),p("set"),p("increment"),p("decrement");let m=p("complete");function g({initialProgress:e=0,color:t,size:r=3,stepInterval:n=500,transitionDuration:p=300,exitTimeout:h=500,exitTransitionDuration:m=400,onFinish:g,autoReset:v=!1,withinPortal:y=!0,zIndex:b=(0,i.w)("max"),progressLabel:x}){let w=(0,o.rZ)(),S=(0,l.J)(),k=!!w.respectReducedMotion&&S,[j,E]=(0,d.useState)(e),[O,C]=(0,d.useState)(!0),[I,P]=(0,d.useState)(!1),A=(0,d.useRef)(),T=(0,d.useRef)(),z=(0,c.Y)(()=>{E(e=>{let t=0;return e>=0&&e<=20?t=10:e>=20&&e<=50?t=4:e>=50&&e<=80?t=2:e>=80&&e<=99&&(t=.5),e+t})},n),N=()=>z.stop(),R=()=>{P(!0),N(),E(0),window.setTimeout(()=>P(!1),0)},_=()=>{T.current&&(window.clearTimeout(T.current),T.current=null),A.current&&(window.clearTimeout(A.current),A.current=null),C(!0)};return(0,u.l)(()=>{j>=100?(N(),null==g||g(),T.current=window.setTimeout(()=>{T.current=null,C(!1),v&&(A.current=window.setTimeout(()=>{A.current=null,R()},k?0:m))},h)):O||_()},[j]),f({start:()=>{z.stop(),z.start()},stop:N,set:e=>E(e),increment:e=>E(t=>Math.min(t+e,100)),decrement:e=>E(t=>Math.max(t-e,0)),reset:R,complete:()=>E(100)}),d.createElement(a.q,{withinPortal:y},!I&&d.createElement(s.E,{radius:0,value:j,size:r,color:t,styles:{root:{position:"fixed",top:0,left:0,right:0,zIndex:b,backgroundColor:"transparent",transitionProperty:"opacity",transitionTimingFunction:w.transitionTimingFunction,transitionDuration:`${k||100!==j?0:m}ms`,opacity:O?1:0},bar:{position:"relative",transitionProperty:"width",transitionTimingFunction:w.transitionTimingFunction,transitionDuration:`${k||!O?0:p}ms`}},"aria-label":x}))}var v=r(11163);function y(){return b(),(0,n.jsx)(g,{autoReset:!0})}let b=()=>{let e=(0,v.useRouter)(),[t,r]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{let t=t=>{t!==e.asPath&&(r(!0),h())},n=()=>{r(!1),m()};return e.events.on("routeChangeStart",t),e.events.on("routeChangeComplete",n),e.events.on("routeChangeError",n),()=>{e.events.off("routeChangeStart",t),e.events.off("routeChangeComplete",n),e.events.off("routeChangeError",n)}},[e.asPath,e.events]),t}},41169:function(e,t,r){"use strict";r.d(t,{F:function(){return m}});var n=r(85893),i=r(64761),o=r(17789),a=r(71232),s=r(95117),l=r(67841),c=r(88393),u=r(83425),d=r(90693),f=r(67294),p=r(3153),h=r(88182);function m(e){let{iconOnly:t,modelVersionId:r,mode:m="replace",children:g,generationPrice:v,onPurchase:y,onClick:b,...x}=e,w=(0,i.rZ)(),S=(0,n.jsx)(o.C,{radius:"sm",size:"sm",variant:"filled",color:"yellow.7",style:{position:"absolute",top:"-8px",right:"-8px",boxShadow:w.shadows.sm,padding:"4px 2px",paddingRight:"6px"},children:(0,n.jsxs)(a.Z,{spacing:0,children:[(0,n.jsx)(u.Z,{style:{fill:w.colors.dark[9]},color:"dark.9",size:16})," ",(0,n.jsx)(s.x,{color:"dark.9",children:(0,h.dm)(null!=v?v:0,{decimals:0})})]})}),k=(0,p.Pr)(e=>e.opened),j=()=>{if(v){null==y||y();return}if("toggle"===m&&k)return p.Ft.close();r?p.Ft.open({type:"modelVersion",id:r}):p.Ft.open(),null==b||b()};if(g)return f.cloneElement(g,{...x,onClick:j,style:{cursor:"pointer"}});let E=(0,n.jsxs)(l.z,{variant:"filled",sx:t?{paddingRight:0,paddingLeft:0,width:36}:{flex:1},onClick:j,...x,children:[v&&(0,n.jsx)(n.Fragment,{children:S}),t?(0,n.jsx)(d.Z,{size:24}):(0,n.jsxs)(a.Z,{spacing:8,noWrap:!0,children:[(0,n.jsx)(d.Z,{size:20}),(0,n.jsx)(s.x,{inherit:!0,inline:!0,className:"hide-mobile",children:"Create"})]})]});return t?(0,n.jsx)(c.u,{label:"Start Generating",withArrow:!0,children:E}):E}},42551:function(e,t,r){"use strict";r.d(t,{e:function(){return I}});var n=r(85893),i=r(69469),o=r(21017),a=r(95117),s=r(71232),l=r(17789),c=r(67841),u=r(95078),d=r(40633),f=r(9094),p=r(97564),h=r(88393),m=r(20966),g=r(73723),v=r(54777),y=r(74403),b=r(56817),x=r(85707),w=r(23693),S=(0,r(21955).Z)("outline","arrow-big-right","IconArrowBigRight",[["path",{d:"M4 9h8v-3.586a1 1 0 0 1 1.707 -.707l6.586 6.586a1 1 0 0 1 0 1.414l-6.586 6.586a1 1 0 0 1 -1.707 -.707v-3.586h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1z",key:"svg-0"}]]),k=r(74943),j=r(38047),E=r(28075),O=r(99490),C=r(72456);function I(e){var t;let{modelVersionId:r}=e,{theme:b,classes:I}=T(),{data:z=[],isLoading:N}=C.SX.modelVersion.getRunStrategies.useQuery({id:r}),{data:R,isLoading:_}=C.SX.partner.getAll.useQuery(),M=null!==(t=null==R?void 0:R.map(e=>({...e,strategies:z.filter(t=>t.partnerId===e.id)})).map(e=>({...e,available:e.strategies.length>0})))&&void 0!==t?t:[],D={variant:"outline",radius:"sm",color:"dark"===b.colorScheme?"gray":"dark",styles:{root:{textTransform:"none",userSelect:"none"}}},L={withArrow:!0,openDelay:500},F=M.filter(e=>e.available&&e.tier>0),U=M.filter(e=>e.available&&e.tier<=0),B=M.filter(e=>!e.available),H=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,n.jsx)(u.i,{striped:!0,verticalSpacing:0,horizontalSpacing:0,children:(0,n.jsxs)("tbody",{children:[e.map((e,t)=>{let{id:i,name:o,about:u,startupTime:m,stepsPerSecond:g,price:v,strategies:y,available:b,homepage:j,tos:E,privacy:C}=e;return(0,n.jsx)("tr",{style:{opacity:b?void 0:1},children:(0,n.jsx)("td",{children:(0,n.jsxs)(s.Z,{position:"apart",p:"sm",children:[(0,n.jsxs)(s.Z,{spacing:"xs",children:[(0,n.jsx)(a.x,{children:o}),(0,n.jsxs)(d.J,{width:400,withinPortal:!0,withArrow:!0,position:"right",children:[(0,n.jsx)(d.J.Target,{children:(0,n.jsx)(f.M,{style:{cursor:"pointer"},children:(0,n.jsx)(k.Z,{size:20})})}),(0,n.jsx)(d.J.Dropdown,{children:(0,n.jsxs)(p.K,{children:[(0,n.jsx)(a.x,{children:u}),(0,n.jsxs)(s.Z,{spacing:"xs",children:[j&&(0,n.jsx)(c.z,{compact:!0,variant:"light",component:"a",href:j,target:"_blank",rel:"nofollow noreferrer",children:"Website"}),E&&(0,n.jsx)(c.z,{compact:!0,variant:"light",component:"a",href:E,target:"_blank",rel:"nofollow noreferrer",children:"Terms of Service"}),C&&(0,n.jsx)(c.z,{compact:!0,variant:"light",component:"a",href:C,target:"_blank",rel:"nofollow noreferrer",children:"Privacy"})]})]})})]})]}),(0,n.jsxs)(s.Z,{spacing:"xs",position:"apart",children:[(0,n.jsxs)(s.Z,{spacing:"xs",noWrap:!0,children:[m&&(0,n.jsx)(h.u,{...L,label:"Startup time",children:(0,n.jsx)(l.C,{...D,leftSection:(0,n.jsx)(x.Z,{size:14}),children:P(m)})}),g&&(0,n.jsx)(h.u,{...L,label:"Image generation time",children:(0,n.jsx)(l.C,{...D,leftSection:(0,n.jsx)(w.Z,{size:14}),children:P(A(g))})}),v&&(0,n.jsx)(h.u,{...L,label:"Price",children:(0,n.jsx)(l.C,{...D,children:v})})]}),b&&(0,n.jsx)(c.z,{color:"blue",compact:!0,size:"xs",px:"md",component:"a",href:"/api/run/".concat(r,"?").concat(O.QS.stringify({partnerId:i})),target:"_blank",rel:"nofollow noreferrer",children:(0,n.jsx)(S,{size:20})})]})]})})},t)}),t]})})};return(0,n.jsxs)(p.K,{children:[(0,n.jsx)(a.x,{children:"Want to try out this model? Use one of these services to start generating right away."}),_||N?(0,n.jsx)(f.M,{p:"md",children:(0,n.jsx)(m.a,{})}):(null==M?void 0:M.length)?(0,n.jsx)(g.x.Autosize,{maxHeight:"55vh",children:(0,n.jsxs)(p.K,{children:[(0,n.jsx)(i.M,{cols:3,children:F.map(e=>(0,n.jsxs)(o.Z,{withBorder:!0,className:I.premiumPartner,children:[(0,n.jsx)(o.Z.Section,{children:e.logo&&(0,n.jsx)(E.i,{src:e.logo,alt:e.name})}),(0,n.jsx)(o.Z.Section,{inheritPadding:!0,py:"xs",children:(0,n.jsx)(a.x,{children:e.name})}),(0,n.jsx)(o.Z.Section,{inheritPadding:!0,pb:"xs",children:(0,n.jsxs)(s.Z,{spacing:4,children:[e.startupTime&&(0,n.jsx)(l.C,{...D,leftSection:(0,n.jsx)(x.Z,{size:14}),children:P(e.startupTime)}),(0,n.jsx)(l.C,{...D,leftSection:(0,n.jsx)(w.Z,{size:14}),children:P(A(e.stepsPerSecond))}),(0,n.jsx)(l.C,{...D,children:e.price})]})}),(0,n.jsxs)(c.z,{color:"blue",size:"xs",px:"md",component:"a",href:"/api/run/".concat(r,"?").concat(O.QS.stringify({partnerId:e.id})),target:"_blank",rel:"nofollow noreferrer",fullWidth:!0,children:[(0,n.jsx)(a.x,{}),(0,n.jsx)(S,{size:20})]})]},e.id))}),H(U),B.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.i,{variant:"dashed",labelPosition:"center",label:(0,n.jsxs)(s.Z,{spacing:4,children:[(0,n.jsx)(j.Z,{size:14}),(0,n.jsx)(a.x,{children:"Not available"})]})}),H(B)]})]})}):(0,n.jsx)(y.b,{color:"yellow",children:"Currently, there are no model generating services for this model"}),(0,n.jsxs)(s.Z,{spacing:4,children:[(0,n.jsx)(a.x,{size:"sm",children:"Don't see your preferred service?"}),(0,n.jsx)(a.x,{size:"sm",variant:"link",component:"a",href:"https://docs.google.com/forms/d/e/1FAIpQLSdlDQXJMIhgnOjmpgEqfesPThDpxskQNau2HtxPXoLSqDMbwA/viewform",children:"Request that they be added"})]})]})}let P=e=>e<60?"".concat(e,"s"):"".concat(Math.round(e/60),"m"),A=e=>{let t=30/e;return t<1?Math.round(10*t)/10:Math.round(t)},T=(0,b.k)(e=>({premiumPartner:{".mantine-Badge-root":{padding:"2px 8px"}}}))},37901:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var n=r(85893);function i(e){let{size:t=24,color:r="currentColor",stroke:i=0,...o}=e;return(0,n.jsxs)("svg",{viewBox:"0 0 178 178",width:t,height:t,strokeWidth:i,stroke:r,fill:r,strokeLinecap:"round",strokeLinejoin:"round",...o,children:[(0,n.jsx)("path",{d:"M89.3,29.2l52,30v60l-52,30l-52-30v-60L89.3,29.2 M89.3,1.5l-76,43.9v87.8l76,43.9l76-43.9V45.4L89.3,1.5z"}),(0,n.jsx)("path",{d:"M104.1,97.2l-14.9,8.5l-14.9-8.5v-17l14.9-8.5l14.9,8.5h18.2V69.7l-33-19l-33,19v38.1l33,19l33-19V97.2H104.1z"})]})}},53459:function(e,t,r){"use strict";r.d(t,{x:function(){return b}});var n=r(85893),i=r(64523),o=r(64761),a=r(5044),s=r(85707),l=r(67294),c=r(56311),u=r(90101),d=r(10558),f=r(74865),p=r(85625),h=r(72688);let m=new Map,g=(0,p.GY)(300),v=e=>{let{key:t,enabled:r=!0}=null!=e?e:{},n=(0,l.useRef)(new h.v),i=(0,l.useRef)(!1),o=(0,l.useRef)(!1),a=(0,l.useRef)(!1),s=(0,l.useRef)(new Date),c="".concat(history.state.key,"_").concat(location.pathname.substring(1)),u=null!=t?t:c;(0,l.useEffect)(()=>{let e=p.current,t=n.current;if(!r||!t||!e)return;let i=t.on("scroll",e=>{let{key:t,...r}=e;return g(t,()=>m.set(t,r))});return()=>t.off("scroll",i)},[r]),(0,l.useEffect)(()=>{let e=p.current;if(!e||!r)return;i.current=!1,o.current=!0,a.current=!1,s.current=new Date,m.get(u)||(e.scrollTop=0,e.scrollLeft=0);let t=()=>{o.current?o.current=!1:(i.current=!0,n.current.emit("scroll",{key:u,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}))};return e.addEventListener("scroll",t,{passive:!0}),()=>{e.removeEventListener("scroll",t)}},[u,r]);let d=(0,l.useCallback)(()=>{let e=p.current;if(i.current||!e)return;let t=m.get(u);if(!t||e.scrollTop===t.scrollTop&&e.scrollLeft===t.scrollLeft){a.current=!0;return}o.current=!0,e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft},[u]),p=(0,f.y)(()=>{if(a.current)return;let e=new Date;s.current.getTime()+5e3>e.getTime()&&d()},{observeChildren:!0});return{ref:p,key:u}};var y=r(90512);function b(e){var t;let{children:r,className:o,scrollRestore:a,intersectionObserverOptions:s,...f}=e,{ref:p,key:h}=v(a),[m,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{g((0,d.s)())},[]),(0,n.jsx)(u.q.Provider,{value:{ref:p},children:(0,n.jsx)(c.dS,{id:null!==(t=f.id)&&void 0!==t?t:h,options:s,children:(0,n.jsxs)(i.x,{ref:p,className:(0,y.Z)("scroll-area flex-1 @container ",o),...f,children:[m&&(0,n.jsx)(x,{}),r]})})})}function x(){let e=(0,u.T)(),t=(0,l.useRef)(null),r=(0,l.useRef)(null),i=(0,l.useRef)(0),c=(0,o.rZ)();return(0,l.useEffect)(()=>{let n=null==e?void 0:e.current,o=t.current;if(!n||!o)return;let a=()=>{setTimeout(()=>{window.location.reload()},1e3)},s=e=>{let{screenY:t}=e.targetTouches[0];0===n.scrollTop&&(r.current=t)},l=()=>{o.style.transition=".2s ease-in-out",o.style.top="".concat(-o.clientHeight,"px"),o.style.opacity="0",i.current=0,r.current=null},u=e=>{if(!r.current)return;let t=r.current;if(!t)return;let{screenY:n}=e.targetTouches[0],a=t220?220:a,l=s/220,c=1*l;o.style.removeProperty("transition"),o.style.opacity="".concat(c>1?1:c),o.style.top="".concat(-o.clientHeight+s/2+o.clientHeight*l,"px")},d=()=>{o.style.transition=".2s ease-in-out",i.current>220?(o.style.top="".concat(c.spacing.md,"px"),o.style.animation="overscroll-spin 1s infinite linear",a()):l()};return n.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("touchmove",u,{passive:!0}),n.addEventListener("touchend",d,{passive:!0}),()=>{n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",u),n.removeEventListener("touchend",d)}},[]),(0,n.jsx)(a.k,{ref:t,radius:"xl",size:"xl",style:{position:"absolute",left:"50%",zIndex:10,opacity:0,transform:"translateX(-50%)"},children:(0,n.jsx)(s.Z,{})})}},90101:function(e,t,r){"use strict";r.d(t,{T:function(){return o},q:function(){return i}});var n=r(67294);let i=(0,n.createContext)(null),o=e=>{var t;let r=(0,n.useRef)(null),o=(0,n.useContext)(i),{ref:a}=null!=o?o:{};return r.current=null!==(t=null==e?void 0:e.onScroll)&&void 0!==t?t:null,(0,n.useEffect)(()=>{let e=null==a?void 0:a.current;if(e)return null==e||e.addEventListener("scroll",t,{passive:!0}),()=>{null==e||e.removeEventListener("scroll",t)};function t(e){var t;let n=e.target;null===(t=r.current)||void 0===t||t.call(r,n)}},[]),a}},27192:function(e,t,r){"use strict";r.d(t,{Pj:function(){return ef},hW:function(){return eu},EB:function(){return ed},LX:function(){return ep},$0:function(){return eh},Cp:function(){return ec},hn:function(){return el}});var n=r(85893),i=r(53214),o=r(92704),a=r(70691),s=r(6216),l=r(83245);function c(e){var t=e.helper,r=e.attributesToClear,n=void 0===r?[]:r,i=t.state.setPage(0);return i=n.reduce(function(e,t){return i.isNumericRefined(t)?e.removeNumericRefinement(t):i.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):i.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):i.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},i),-1!==n.indexOf("query")&&(i=i.setQuery("")),i}var u=r(87215),d=r(35761),f=r(50578);function p(e,t,r,n){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a={type:t,attribute:r,name:n,escapedValue:"number"==typeof n&&n<0||"string"==typeof n?String(n).replace(/^-/,"\\-"):n},s=(0,f.s)(o,function(e){return e.name===r});if("hierarchical"===t){for(var l=e.getHierarchicalFacetByName(r),c=n.split(l.separator),u=function(e){var t;s=s&&s.data&&(0,f.s)(Object.keys(s.data).map((t=s.data,function(e){return t[e]})),function(t){return t.name===c[e]})},d=0;void 0!==s&&de.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:s.Z;return(0,l._)(e,y()),function(r){var n=r||{},i=n.includedAttributes,o=void 0===i?[]:i,a=n.excludedAttributes,l=void 0===a?["query"]:a,f=n.transformItems,h=void 0===f?function(e){return e}:f;if(r&&r.includedAttributes&&r.excludedAttributes)throw Error(y("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var g={refine:s.Z,createURL:function(){return""},attributesToClear:[]},b=function(){return g.refine()},x=function(){return g.createURL()};return{$$type:"ais.clearRefinements",init:function(t){var r=t.instantSearchInstance;e(v(v({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(v(v({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(){t()},getRenderState:function(e,t){return v(v({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,i=e.results;g.attributesToClear=n.reduce(function(e,t){var r,n,a,s,c,u,f;return e.concat((n=(r={scopedResult:t,includedAttributes:o,excludedAttributes:l,transformItems:h,results:i}).scopedResult,a=r.includedAttributes,s=r.excludedAttributes,c=r.transformItems,u=r.results,f=-1!==a.indexOf("query")||-1===s.indexOf("query"),{helper:n.helper,items:c((0,d.j)((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[],i=t.facetsRefinements,o=void 0===i?{}:i,a=t.facetsExcludes,s=void 0===a?{}:a,l=t.disjunctiveFacetsRefinements,c=void 0===l?{}:l,u=t.hierarchicalFacetsRefinements,d=void 0===u?{}:u,f=t.numericRefinements,h=void 0===f?{}:f,m=t.tagRefinements;return Object.keys(o).forEach(function(r){o[r].forEach(function(i){n.push(p(t,"facet",r,i,e.facets))})}),Object.keys(s).forEach(function(e){s[e].forEach(function(t){n.push({type:"exclude",attribute:e,name:t,exclude:!0})})}),Object.keys(c).forEach(function(r){c[r].forEach(function(i){n.push(p(t,"disjunctive",r,"string"==typeof i?i.replace(/^\\-/,"-"):i,e.disjunctiveFacets))})}),Object.keys(d).forEach(function(r){d[r].forEach(function(i){n.push(p(t,"hierarchical",r,i,e.hierarchicalFacets))})}),Object.keys(h).forEach(function(e){var t=h[e];Object.keys(t).forEach(function(r){var i=t[r];(Array.isArray(i)?i:[i]).forEach(function(t){n.push({type:"numeric",attribute:e,name:"".concat(t),numericValue:t,operator:r})})})}),(void 0===m?[]:m).forEach(function(e){n.push({type:"tag",attribute:"_tags",name:e})}),r&&t.query&&t.query.trim()&&n.push({attribute:"query",type:"query",name:t.query,query:t.query}),n})(n.results,n.helper.state,f).map(function(e){return e.attribute}).filter(function(e){return 0===a.length||-1!==a.indexOf(e)}).filter(function(e){return"query"===e&&f||-1===s.indexOf(e)})),{results:u})}))},[]),g.refine=function(){g.attributesToClear.forEach(function(e){var t=e.helper,r=e.items;t.setState(c({helper:t,attributesToClear:r})).search()})},g.createURL=function(){var e;return t(u.Z.apply(void 0,function(e){if(Array.isArray(e))return m(e)}(e=g.attributesToClear.map(function(e){return c({helper:e.helper,attributesToClear:e.items})}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return m(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};var a=g.attributesToClear.some(function(e){return e.items.length>0});return{canRefine:a,hasRefinements:a,refine:b,createURL:x,widgetParams:r}}}}},x=r(34932),w=r(47538),S=r(74163);function k(e){return"number"==typeof e&&isFinite(e)}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:s.Z;return(0,l._)(e,A()),function(r){var n=r||{},i=n.attribute,o=void 0===i?"":i,a=n.min,s=n.max,l=n.precision,c=void 0===l?0:l;if(!o)throw Error(A("The `attribute` option is required."));if(k(a)&&k(s)&&a>s)throw Error(A("The `max` option can't be lower than `min`."));var u={from:function(e){return e.toLocaleString()},to:function(e){return Number(Number(e).toFixed(c)).toLocaleString()}},d=function(e,t,r,n){var i,l,u=e.state,d=t.min,f=t.max,p=I(u.getNumericRefinement(o,">=")||[],1)[0],h=I(u.getNumericRefinement(o,"<=")||[],1)[0],m=void 0===r||""===r,g=void 0===n||""===n,v=T({min:m?void 0:parseFloat(r),max:g?void 0:parseFloat(n),precision:c}),y=v.min,b=v.max;i=k(a)||d!==y?k(a)&&m?a:y:void 0,l=k(s)||f!==b?k(s)&&g?s:b:void 0;var x=void 0===i,w=k(d)&&d<=i,S=x||k(i)&&(!k(d)||w),j=void 0===l,E=k(l)&&f>=l,O=j||k(l)&&(!k(f)||E),C=h!==l;return(p!==i||C)&&S&&O?(u=u.removeNumericRefinement(o),k(i)&&(u=u.addNumericRefinement(o,">=",i)),k(l)&&(u=u.addNumericRefinement(o,"<=",l)),u.resetPage()):null};function p(e,t){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],n=I(r,2),i=d(e,t,n[0],n[1]);i&&e.setState(i).search()}}return{$$type:"ais.range",init:function(t){e(O(O({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(O(O({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return O(O({},e),{},{range:O(O({},e.range),{},C({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n,i,l=e.results,d=e.helper,h=e.instantSearchInstance,m=l&&l.disjunctiveFacets||[],g=(0,f.s)(m,function(e){return e.name===o}),v=(t=g&&g.stats||{min:void 0,max:void 0},T({min:k(a)?a:k(t.min)?t.min:0,max:k(s)?s:k(t.max)?t.max:0,precision:c})),y=(n=I(d.getNumericRefinement(o,">=")||[],1)[0],i=I(d.getNumericRefinement(o,"<=")||[],1)[0],[k(n)?n:-1/0,k(i)?i:1/0]);return{refine:l?p(d,v):p(d,{min:void 0,max:void 0}),canRefine:v.min!==v.max,format:u,range:v,sendEvent:function(){if(1==arguments.length){h.sendEventToInsights(arguments.length<=0?void 0:arguments[0]);return}},widgetParams:O(O({},r),{},{precision:c}),start:y}},dispose:function(e){var r=e.state;return t(),r.removeDisjunctiveFacet(o).removeNumericRefinement(o)},getWidgetUiState:function(e,t){var r=t.searchParameters.getNumericRefinements(o),n=r[">="],i=void 0===n?[]:n,a=r["<="],s=void 0===a?[]:a;return 0===i.length&&0===s.length?e:O(O({},e),{},{range:O(O({},e.range),{},C({},o,"".concat(i,":").concat(s)))})},getWidgetSearchParameters:function(e,t){var r=t.uiState,n=e.addDisjunctiveFacet(o).setQueryParameters({numericRefinements:O(O({},e.numericRefinements),{},C({},o,{}))});k(a)&&(n=n.addNumericRefinement(o,">=",a)),k(s)&&(n=n.addNumericRefinement(o,"<=",s));var i=r.range&&r.range[o];if(!i||-1===i.indexOf(":"))return n;var l=I(i.split(":").map(parseFloat),2),c=l[0],u=l[1];return k(c)&&(!k(a)||a=")).addNumericRefinement(o,">=",c)),k(u)&&(!k(s)||u({divider:{flex:1,borderBottom:0,border:"1px solid",borderColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[3]}})),es=(0,N.k)(()=>({root:{[er.D.smallerThan("md")]:{height:"100%"}},wrapper:{[er.D.smallerThan("md")]:{height:"100%"}},input:{[er.D.smallerThan("md")]:{height:"100%"}}}));function el(e){let{title:t,...r}=e,{classes:o}=ea(),{options:a,refine:s,currentRefinement:l}=(0,i.s)(r);return 0===a.length?null:(0,n.jsx)(R.U,{defaultValue:t,variant:"filled",children:(0,n.jsxs)(R.U.Item,{value:t,children:[(0,n.jsx)(R.U.Control,{children:(0,n.jsxs)(_.Z,{children:[(0,n.jsx)(M.x,{size:"md",weight:500,children:t}),(0,n.jsx)(D.x,{className:o.divider})]})}),(0,n.jsx)(R.U.Panel,{children:(0,n.jsx)(L.Ph,{name:"sort",data:a,value:l,onChange:e=>s(e||a[0].value)})})]})})}function ec(e){var t;let{title:r,...i}=e,{classes:a}=ea(),{items:s,refine:l,searchForItems:c}=(0,o.c)({...i}),[u,d]=(0,V.useState)(""),[f]=(0,$.c)(u,300),[p,h]=(0,V.useState)(null!==(t=(null!=s?s:[]).filter(e=>e.isRefined))&&void 0!==t?t:[]);(0,V.useEffect)(()=>{i.searchable&&c(f)},[f]),(0,V.useEffect)(()=>{let e=s.filter(e=>e.isRefined);0===p.length&&e.length>0?h(e):0===e.length&&p.length>0&&h([])},[s,p]);let m=(0,Y.Z)([...p,...s],"value").map(e=>({label:e.label,value:e.value}));return(0,n.jsx)(R.U,{defaultValue:i.attribute,variant:"filled",children:(0,n.jsxs)(R.U.Item,{value:i.attribute,children:[(0,n.jsx)(R.U.Control,{children:(0,n.jsxs)(_.Z,{children:[(0,n.jsx)(M.x,{size:"md",weight:500,children:r}),(0,n.jsx)(D.x,{className:a.divider})]})}),(0,n.jsx)(R.U.Panel,{children:(0,n.jsx)(F.NU,{data:m,value:p.map(e=>e.value),onChange:e=>{if(e.length>p.length){let t=e[e.length-1],r=s.find(e=>e.value===t);r&&(l(r.value),h([...p,r]))}else{let t=p.filter(t=>!e.includes(t.value))[0];if(!t)return;l(t.value),h(p.filter(e=>e.value!==t.value))}},searchable:!0,searchValue:u,onSearchChange:d,placeholder:"Search ".concat(r),nothingFound:(0,n.jsx)(en.S,{renderTimeout:()=>(0,n.jsx)("span",{children:"Nothing found"})})})})]})})}function eu(e){let{title:t,...r}=e,{classes:i}=ea(),{items:a,refine:s}=(0,o.c)({...r});return a.length?(0,n.jsx)(R.U,{defaultValue:r.attribute,variant:"filled",children:(0,n.jsxs)(R.U.Item,{value:r.attribute,children:[(0,n.jsx)(R.U.Control,{children:(0,n.jsxs)(_.Z,{children:[(0,n.jsx)(M.x,{size:"md",weight:500,children:t})," ",(0,n.jsx)(D.x,{className:i.divider})]})}),(0,n.jsx)(R.U.Panel,{children:(0,n.jsx)(_.Z,{spacing:"xs",children:a.map(e=>(0,n.jsx)(U.A,{size:"sm",tt:"capitalize",checked:e.isRefined,onClick:()=>s(e.value),children:(0,n.jsx)("span",{children:(0,J.Gf)(e.label,{splitNumbers:!1})})},e.value))})})]})}):null}let ed=e=>{let{...t}=e,{refine:r,canRefine:i}=(0,x.B)(b,void 0,void 0);return i?(0,n.jsx)(B.z,{rightIcon:(0,n.jsx)(K.Z,{size:16}),color:"gray",variant:"filled",size:"md",sx:{flexShrink:0},...t,onClick:r,children:"Reset all filters"}):null},ef=e=>{let{attributeName:t,...r}=e,n=(0,ei.bT)(),i=eo.v.instanceToArray(n),{refine:o}=(0,w.l)({...r,filters:t?i.map(e=>"".concat(t,"=").concat(e)).join(" OR "):void 0});return null},ep=(0,V.forwardRef)((e,t)=>{let{isMobile:r,onSearchDone:i,...o}=e,{query:a,refine:s}=(0,S.l)({...o}),[l,c]=(0,V.useState)(a),[u]=(0,$.c)(l,300),{classes:d}=es(),f=(0,V.useRef)(null),p=()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.focus()};return(0,V.useImperativeHandle)(t,()=>({focus:p})),(0,V.useEffect)(()=>{u!==a&&s(u)},[u]),(0,V.useEffect)(()=>{a!==l&&c(a)},[a]),(0,q.A)([["/",p],["mod+k",p]]),(0,n.jsx)(H.o,{...o,classNames:d,variant:r?"filled":void 0,icon:(0,n.jsx)(X.Z,{size:20}),onChange:e=>c(e.target.value),value:l,placeholder:"Search...",onBlur:i,onSubmit:i,ref:f,onKeyDown:(0,G.yr)([["Escape",()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.blur()}]]),rightSection:!r&&(0,n.jsxs)(Z.z,{withArrow:!0,width:300,shadow:"sm",openDelay:500,children:[(0,n.jsx)(Z.z.Target,{children:(0,n.jsx)(M.x,{weight:"bold",sx:e=>({border:"1px solid ".concat("dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3]),borderRadius:e.radius.sm,backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.colors.gray[0],color:"dark"===e.colorScheme?e.colors.gray[5]:e.colors.gray[6],textAlign:"center",width:24,userSelect:"none"}),children:"/"})}),(0,n.jsxs)(Z.z.Dropdown,{children:[(0,n.jsx)(M.x,{size:"sm",color:"yellow",weight:500,children:"Pro-tip: Quick search faster!"}),(0,n.jsxs)(M.x,{size:"xs",lh:1.2,children:["Open the quick search without leaving your keyboard by tapping the ",(0,n.jsx)(W.E,{children:"/"})," ","key from anywhere and just start typing."]})]})]})})});function eh(e){var t;let{title:r,...i}=e,{classes:o}=ea(),{start:a,range:s,refine:l}=(t={...i},(0,x.B)(z,t,void 0)),c=a[0]&&a[0]!==-1/0?new Date(a[0]):null,u=a[1]&&a[1]!==1/0?new Date(a[1]):null,d=s.max?new Date(s.max):void 0,f=s.min?new Date(s.min):void 0,p=(e,t)=>{var r,n;if("start"===e){let e=a[1]===1/0?s.max:a[1];l([t?Math.max(t.getTime(),null!==(r=s.min)&&void 0!==r?r:-1/0):void 0,e])}else l([a[0]===-1/0?s.min:a[0],t?Math.min(t.getTime(),null!==(n=s.max)&&void 0!==n?n:1/0):void 0])};return(0,n.jsx)(R.U,{defaultValue:i.attribute,variant:"filled",children:(0,n.jsxs)(R.U.Item,{value:i.attribute,children:[(0,n.jsx)(R.U.Control,{children:(0,n.jsxs)(_.Z,{children:[(0,n.jsx)(M.x,{size:"md",weight:500,children:r}),(0,n.jsx)(D.x,{className:o.divider})]})}),(0,n.jsxs)(R.U.Panel,{children:[(0,n.jsx)(Q.M,{label:"From",name:"start",placeholder:"Start date",value:c,onChange:e=>{p("start",e)},minDate:f,maxDate:u?et()(u).subtract(1,"day").toDate():d,clearButtonLabel:"Clear start date"}),(0,n.jsx)(Q.M,{label:"To",name:"end",placeholder:"End date",value:u,onChange:e=>{p("end",e)},minDate:c?et()(c).add(1,"day").toDate():f,clearButtonLabel:"Clear end date",maxDate:d})]})]})})}ep.displayName="CustomSearchBox"},56621:function(e,t,r){"use strict";r.d(t,{_:function(){return U}});var n=r(85893),i=r(56817),o=r(71232),a=r(28855),s=r(97564),l=r(95117),c=r(39759),u=r(32608),d=r(81811),f=r(67294),p=r(49255),h=r(2518),m=r(74163),g=r(93625),v=r(18257),y=r(99518),b=r(40595),x=r(3272),w=r(74558),S=r(86393),k=r(36061),j=r(58504),E=r(92677),O=r(18014),C=r(56707),I=r(55543),P=r(524),A=r(5779),T=r(38498),z=r(81447),N=r(48600);let R=(0,u.instantMeiliSearch)(P.O.NEXT_PUBLIC_SEARCH_HOST,P.O.NEXT_PUBLIC_SEARCH_CLIENT_KEY,{primaryKey:"id",keepZeroFacets:!0}),_={...R,search:e=>e.every(e=>{let{params:t}=e;return!(null==t?void 0:t.query)})?Promise.resolve({results:e.map(()=>({hits:[],nbHits:0,nbPages:0,page:0,processingTimeMS:0,hitsPerPage:0,exhaustiveNbHits:!1,query:"",params:""}))}):R.search(e)};var M=r(27192),D=r(38658);let L=(0,u.instantMeiliSearch)(P.O.NEXT_PUBLIC_SEARCH_HOST,P.O.NEXT_PUBLIC_SEARCH_CLIENT_KEY,{primaryKey:"id"}),F=(0,i.k)(e=>({root:{flexGrow:1,[z.D.smallerThan("md")]:{height:"100%",flexGrow:1}},wrapper:{[z.D.smallerThan("md")]:{height:"100%"}},input:{borderRadius:0,[z.D.smallerThan("md")]:{height:"100%"}},dropdown:{[z.D.smallerThan("sm")]:{marginTop:"-7px"}},targetSelectorRoot:{width:"110px",[z.D.smallerThan("sm")]:{width:"25%"}},targetSelectorInput:{borderTopRightRadius:0,borderBottomRightRadius:0,backgroundColor:"dark"===e.colorScheme?e.colors.gray[8]:e.colors.gray[3],paddingRight:"18px","&:not(:focus)":{borderRightStyle:"none"},[z.D.smallerThan("md")]:{height:"100%"}},targetSelectorRightSection:{pointerEvents:"none"},searchButton:{borderTopLeftRadius:0,borderBottomLeftRadius:0,backgroundColor:"dark"===e.colorScheme?e.colors.gray[8]:e.colors.gray[3],color:"dark"===e.colorScheme?e.white:e.black,"&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.gray[7]:e.colors.gray[4]},[z.D.smallerThan("md")]:{display:"none"}}})),U=e=>{let{filters:t,dropdownItemLimit:r=5,startingIndex:i,disableInitialSearch:o,...a}=e,[s,l]=(0,f.useState)(null!=i?i:"models"),c=E.PR[s],u=(0,f.useMemo)(()=>[E.PR.articles,E.PR.bounties,E.PR.models,E.PR.images,E.PR.collections].some(e=>e===c),[c]);return(0,n.jsxs)(p.p,{searchClient:o?_:L,indexName:c,future:{preserveSharedStateOnUnmount:!0},children:[(0,n.jsx)(h.T,{index:c,hitsPerPage:r,filters:t}),u&&(0,n.jsx)(M.Pj,{attributeName:"nsfwLevel"}),(0,n.jsx)(B,{...a,indexName:s,onIndexNameChange:e=>{l(e)},dropdownItemLimit:r})]})};function B(e){var t;let{indexName:r,onIndexNameChange:i,onItemSelected:u,filters:p,supportedIndexes:h,dropdownItemLimit:g=5,showIndexSelect:v=!0,placeholder:y,...b}=e,{query:w,refine:P}=(0,m.l)(),{hits:z,results:R}=(0,O.F)(),{classes:_}=F(),M=(0,A.g)(),[D,L]=(0,f.useState)(w),[U]=(0,c.c)(D,300),B=null!=h?h:[],Z=(null==R?void 0:R.index)?E.j_[R.index]:r,{key:W,value:V}=(0,f.useMemo)(()=>(0,N._x)(Z,z),[Z,z]),{items:$}=(0,k.f)({type:W,data:V}),q=(0,f.useMemo)(()=>$.map(e=>({key:String(e.id),hit:e,value:""})),[$]);return(0,f.useEffect)(()=>{U!==w&&P(U)},[U,w]),(0,n.jsxs)(o.Z,{className:_.wrapper,spacing:0,noWrap:!0,children:[!!v&&(0,n.jsx)(a.Ph,{classNames:{root:_.targetSelectorRoot,input:_.targetSelectorInput,rightSection:_.targetSelectorRightSection},maxDropdownHeight:280,defaultValue:B[0],data:B.filter(e=>(!!M.imageSearch||E.PR[e]!==T.P5)&&(!!M.toolSearch||E.PR[e]!==T.Y)&&(!!M.articles||"articles"!==e)).map(e=>({label:I.fA[E.PR[e]],value:e})),rightSection:(0,n.jsx)(d.Z,{size:16,color:"currentColor"}),sx:{flexShrink:1},onChange:i}),(0,n.jsx)(S.q,{classNames:_,placeholder:null!=y?y:"Search Civitai",type:"search",maxDropdownHeight:300,nothingFound:z.length?void 0:(0,n.jsx)(s.K,{spacing:0,align:"center",children:(0,n.jsx)(C.S,{delay:1500,renderTimeout:()=>(0,n.jsx)(l.x,{children:"No results found"})})}),limit:R&&R.nbHits>g?g+1:g,defaultValue:w,value:D,data:q,onChange:L,onClear:()=>L(""),onItemSubmit:e=>{e.hit&&(u({entityId:e.hit.id,entityType:j.G[E.PR[Z]]},e.hit),L(""))},itemComponent:null!==(t=H[Z])&&void 0!==t?t:x.C,filter:()=>!0,clearable:w.length>0,...b},Z)]})}let H={models:x.C,articles:g.J,users:w.N,images:b.H,collections:y.k,bounties:v.U,tools:D.k}},56707:function(e,t,r){"use strict";r.d(t,{S:function(){return s}});var n=r(85893),i=r(20966),o=r(98697),a=r(67294);let s=e=>{let{renderTimeout:t,delay:r=5e3,...s}=e,[l,c]=(0,a.useState)(!1);return((0,o.K)(()=>c(!0),r,{autoInvoke:!0}),l)?t():(0,n.jsx)(i.a,{...s})}},3943:function(e,t,r){"use strict";r.d(t,{J:function(){return l},v:function(){return d}});var n=r(58504),i=r(1604),o=r(99490),a=r(14619),s=r(38498);let l=[s.xx,"".concat(s.xx,":stats.favoriteCount:desc"),"".concat(s.xx,":stats.viewCount:desc"),"".concat(s.xx,":stats.commentCount:desc"),"".concat(s.xx,":stats.tippedAmountCount:desc"),"".concat(s.xx,":createdAt:desc")],c=l[0],u=n.X.extend({index:i.z.literal("articles"),sortBy:i.z.enum(l),tags:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),users:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(o.QS.parse(t.search)),n=r.success?r.data:{};return{[s.xx]:(0,a.HO)(n)}},routeToState:e=>{let t=e[s.xx]||{},r=(0,a.HO)({"tags.name":t.tags,"user.username":t.users}),{query:n,sortBy:i}=t;return{[s.xx]:{sortBy:null!=i?i:c,refinementList:r,query:n}}},stateToRoute:e=>{var t,r;let n=null===(t=e[s.xx].refinementList)||void 0===t?void 0:t["tags.name"],i=null===(r=e[s.xx].refinementList)||void 0===r?void 0:r["user.username"],o=e[s.xx].sortBy||c,{query:a}=e[s.xx];return{[s.xx]:{tags:n,users:i,sortBy:o,query:a}}}}},58504:function(e,t,r){"use strict";r.d(t,{G:function(){return o},X:function(){return a}});var n=r(1604),i=r(38498);i.Ni,i.xx,i.Wq,i.P5,i.Cc,i.iG,i.Y;let o={[i.Ni]:"Model",[i.xx]:"Article",[i.Wq]:"User",[i.P5]:"Image",[i.Cc]:"Collection",[i.iG]:"Bounty",[i.Y]:"Tool"},a=n.z.object({query:n.z.coerce.string().optional(),page:n.z.coerce.number().optional()})},82596:function(e,t,r){"use strict";r.d(t,{J:function(){return l},n:function(){return d}});var n=r(58504),i=r(1604),o=r(99490),a=r(14619),s=r(38498);let l=[s.iG,"".concat(s.iG,":stats.unitAmountCountAllTime:desc"),"".concat(s.iG,":stats.entryCountAllTime:desc"),"".concat(s.iG,":favoriteCountAllTime:desc"),"".concat(s.iG,":createdAt")],c=l[0],u=n.X.extend({index:i.z.literal("bounties"),sortBy:i.z.enum(l),baseModel:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),users:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),tags:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),type:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(o.QS.parse(t.search)),n=r.success?r.data:{};return{[s.iG]:(0,a.HO)(n)}},routeToState:e=>{let t=e[s.iG]||{},r=(0,a.HO)({"details.baseModel":t.baseModel,type:t.type,"tags.name":t.tags,"user.username":t.users}),{query:n,sortBy:i}=t;return{[s.iG]:{sortBy:null!=i?i:c,refinementList:r,query:n}}},stateToRoute:e=>{var t,r,n,i;let o=null===(t=e[s.iG].refinementList)||void 0===t?void 0:t["details.baseModel"],a=null===(r=e[s.iG].refinementList)||void 0===r?void 0:r.type,l=null===(n=e[s.iG].refinementList)||void 0===n?void 0:n["user.username"],u=null===(i=e[s.iG].refinementList)||void 0===i?void 0:i["tags.name"],d=e[s.iG].sortBy||c,{query:f}=e[s.iG];return{[s.iG]:{baseModel:o,type:a,tags:u,users:l,sortBy:d,query:f}}}}},73561:function(e,t,r){"use strict";r.d(t,{E:function(){return l},J:function(){return d}});var n=r(58504),i=r(1604),o=r(99490),a=r(14619),s=r(38498);let l=[s.Cc,"".concat(s.Cc,":metrics.followerCount:desc"),"".concat(s.Cc,":metrics.itemCount:desc"),"".concat(s.Cc,":createdAt:desc")],c=l[0],u=n.X.extend({index:i.z.literal("collections"),sortBy:i.z.enum(l),users:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),type:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(o.QS.parse(t.search)),n=r.success?r.data:{};return{[s.Cc]:(0,a.HO)(n)}},routeToState:e=>{let t=e[s.Cc]||{},r=(0,a.HO)({type:t.type,"user.username":t.users}),{query:n,sortBy:i}=t;return{[s.Cc]:{sortBy:null!=i?i:c,refinementList:r,query:n}}},stateToRoute:e=>{var t,r;let n=null===(t=e[s.Cc].refinementList)||void 0===t?void 0:t.type,i=null===(r=e[s.Cc].refinementList)||void 0===r?void 0:r["user.username"],o=e[s.Cc].sortBy||c,{query:a}=e[s.Cc];return{[s.Cc]:{type:n,users:i,sortBy:o,query:a}}}}},14158:function(e,t,r){"use strict";r.d(t,{Q:function(){return d},c:function(){return l}});var n=r(1604),i=r(38498),o=r(14619),a=r(99490),s=r(58504);let l=[i.P5,"".concat(i.P5,":stats.reactionCountAllTime:desc"),"".concat(i.P5,":stats.commentCountAllTime:desc"),"".concat(i.P5,":stats.collectedCountAllTime:desc"),"".concat(i.P5,":stats.tippedAmountCountAllTime:desc"),"".concat(i.P5,":createdAt:desc")],c=l[0],u=s.X.extend({imageId:n.z.coerce.number(),index:n.z.literal("images"),createdAt:n.z.string(),sortBy:n.z.enum(l),baseModel:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),aspectRatio:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),tags:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),tools:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),techniques:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),users:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(a.QS.parse(t.search)),n=r.success?r.data:{};return{[i.P5]:(0,o.HO)(n)}},routeToState:e=>{let t=e[i.P5]||{},r=(0,o.HO)({aspectRatio:t.aspectRatio,baseModel:t.baseModel,tagNames:t.tags,toolNames:t.tools,techniqueNames:t.techniques,"user.username":t.users}),n=(0,o.HO)({createdAtUnix:t.createdAt}),{query:a,sortBy:s,imageId:l}=t;return{[i.P5]:{sortBy:null!=s?s:c,refinementList:r,query:a,imageId:l,range:n}}},stateToRoute:e=>{var t,r,n,o,a,s,l;if(!e[i.P5])return{[i.P5]:{}};let u=null===(t=e[i.P5].range)||void 0===t?void 0:t.createdAtUnix,d=null===(r=e[i.P5].refinementList)||void 0===r?void 0:r.aspectRatio,f=null===(n=e[i.P5].refinementList)||void 0===n?void 0:n.baseModel,p=null===(o=e[i.P5].refinementList)||void 0===o?void 0:o.tagNames,h=null===(a=e[i.P5].refinementList)||void 0===a?void 0:a.toolNames,m=null===(s=e[i.P5].refinementList)||void 0===s?void 0:s.techniqueNames,g=null===(l=e[i.P5].refinementList)||void 0===l?void 0:l["user.username"],v=e[i.P5].sortBy||c,y=e[i.P5].imageId||void 0,{query:b}=e[i.P5];return{[i.P5]:{tags:p,tools:h,techniques:m,users:g,sortBy:v,query:b,imageId:y,baseModel:f,aspectRatio:d,createdAt:u}}}}},86628:function(e,t,r){"use strict";r.d(t,{K:function(){return d},L:function(){return l}});var n=r(58504),i=r(1604),o=r(99490),a=r(14619),s=r(38498);let l=[s.Ni,"".concat(s.Ni,":metrics.thumbsUpCount:desc"),"".concat(s.Ni,":metrics.downloadCount:desc"),"".concat(s.Ni,":metrics.favoriteCount:desc"),"".concat(s.Ni,":metrics.commentCount:desc"),"".concat(s.Ni,":metrics.collectedCount:desc"),"".concat(s.Ni,":metrics.tippedAmountCount:desc"),"".concat(s.Ni,":createdAt:desc")],c=l[0],u=n.X.extend({sortBy:i.z.enum(l),lastVersionAt:i.z.string(),baseModel:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),modelType:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),checkpointType:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),tags:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),users:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e]),category:i.z.union([i.z.array(i.z.string()),i.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(o.QS.parse(t.search)),n=r.success?r.data:{};return{[s.Ni]:(0,a.HO)(n)}},routeToState:e=>{let t=e[s.Ni],r=(0,a.HO)({"version.baseModel":t.baseModel,"category.name":t.category,type:t.modelType,checkpointType:t.checkpointType,"tags.name":t.tags,"user.username":t.users}),n=(0,a.HO)({lastVersionAtUnix:t.lastVersionAt}),{query:i,sortBy:o}=t;return{[s.Ni]:{sortBy:null!=o?o:c,refinementList:r,query:i,range:n}}},stateToRoute:e=>{var t,r,n,i,o,a,l;if(!e[s.Ni])return{[s.Ni]:{}};let u=null===(t=e[s.Ni].range)||void 0===t?void 0:t.lastVersionAtUnix,d=null===(r=e[s.Ni].refinementList)||void 0===r?void 0:r["version.baseModel"],f=null===(n=e[s.Ni].refinementList)||void 0===n?void 0:n.type,p=null===(i=e[s.Ni].refinementList)||void 0===i?void 0:i["category.name"],h=null===(o=e[s.Ni].refinementList)||void 0===o?void 0:o.checkpointType,m=null===(a=e[s.Ni].refinementList)||void 0===a?void 0:a["tags.name"],g=null===(l=e[s.Ni].refinementList)||void 0===l?void 0:l["user.username"],v=e[s.Ni].sortBy||c,{query:y}=e[s.Ni];return{[s.Ni]:{category:p,baseModel:d,modelType:f,checkpointType:h,users:g,tags:m,sortBy:v,query:y,lastVersionAt:u}}}}},85958:function(e,t,r){"use strict";r.d(t,{A:function(){return d},L:function(){return l}});var n=r(1604),i=r(58504),o=r(38498),a=r(14619),s=r(99490);let l=[o.Y,"".concat(o.Y,":name:asc"),"".concat(o.Y,":name:desc"),"".concat(o.Y,":createdAt:asc"),"".concat(o.Y,":createdAt:desc")],c=l[0],u=i.X.extend({index:n.z.literal("tools"),sortBy:n.z.enum(l),company:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e]),type:n.z.union([n.z.array(n.z.string()),n.z.string()]).transform(e=>Array.isArray(e)?e:[e])}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(s.QS.parse(t.search)),n=r.success?r.data:{};return{[o.Y]:(0,a.HO)(n)}},routeToState:e=>{let t=e[o.Y]||{},r=(0,a.HO)({company:t.company,type:t.type}),{query:n,sortBy:i}=t;return{[o.Y]:{sortBy:null!=i?i:c,refinementList:r,query:n}}},stateToRoute:e=>{var t,r;let n=null===(t=e[o.Y].refinementList)||void 0===t?void 0:t.company,i=null===(r=e[o.Y].refinementList)||void 0===r?void 0:r.type,a=e[o.Y].sortBy||c,{query:s}=e[o.Y];return{[o.Y]:{company:n,type:i,sortBy:a,query:s}}}}},41237:function(e,t,r){"use strict";r.d(t,{P:function(){return d},s:function(){return l}});var n=r(58504),i=r(1604),o=r(99490),a=r(14619),s=r(38498);let l=[s.Wq,"".concat(s.Wq,":metrics.followerCount:desc"),"".concat(s.Wq,":metrics.thumbsUpCount:desc"),"".concat(s.Wq,":metrics.uploadCount:desc"),"".concat(s.Wq,":createdAt:desc")],c=l[0],u=n.X.extend({index:i.z.literal("users"),sortBy:i.z.enum(l)}).partial(),d={parseURL:e=>{let{location:t}=e,r=u.safeParse(o.QS.parse(t.search)),n=r.success?r.data:{};return{[s.Wq]:(0,a.HO)(n)}},routeToState:e=>{let{query:t,sortBy:r}=e[s.Wq]||{};return{[s.Wq]:{sortBy:null!=r?r:c,query:t}}},stateToRoute:e=>{let t=e[s.Wq].sortBy||c,{query:r}=e[s.Wq];return{[s.Wq]:{sortBy:t,query:r}}}}},92677:function(e,t,r){"use strict";r.d(t,{PR:function(){return i},j_:function(){return o}});var n=r(38498);let i={models:n.Ni,images:n.P5,articles:n.xx,users:n.Wq,collections:n.Cc,bounties:n.iG,tools:n.Y},o={[n.Ni]:"models",[n.P5]:"images",[n.xx]:"articles",[n.Wq]:"users",[n.Cc]:"collections",[n.iG]:"bounties",[n.Y]:"tools"}},18014:function(e,t,r){"use strict";r.d(t,{F:function(){return X},G:function(){return J}});var n=r(54671),i=r(70691),o=r(6216),a=r(83245),s=r(90729);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:o.Z;return(0,a._)(e,I()),function(r){var n,i,o=r||{},a=o.escapeHTML,s=void 0===a||a,l=o.transformItems,c=void 0===l?function(e){return e}:l;return{$$type:"ais.hits",init:function(t){e(O(O({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(O(O({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.items)},getRenderState:function(e,t){return O(O({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,o,a,l=e.results,u=e.helper,d=e.instantSearchInstance;if(n||(n=p({instantSearchInstance:d,getIndex:function(){return u.getIndex()},widgetType:this.$$type})),i||(i=h({getIndex:function(){return u.getIndex()},widgetType:this.$$type,instantSearchInstance:d})),!l)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:n,bindEvent:i,widgetParams:r};s&&l.hits.length>0&&(l.hits=(0,m.mY)(l.hits));var f=c(k(b(l.hits,l.page,l.hitsPerPage),l.queryID),{results:l}),g=null===(t=l.renderingContent)||void 0===t?void 0:null===(o=t.widgets)||void 0===o?void 0:null===(a=o.banners)||void 0===a?void 0:a[0];return{hits:f,items:f,results:l,banner:g,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return(t(),s)?r.setQueryParameters(Object.keys(m.dg).reduce(function(e,t){return O(O({},e),{},C({},t,void 0))},{})):r},getWidgetSearchParameters:function(e,t){return s?e.setQueryParameters(m.dg):e}}}},A=r(34932),T=r(94252),z=r(30381);function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var R=["page"],_=["clickAnalytics","userToken"];function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var H=(0,i.K)({name:"infinite-hits",connector:!0});function Z(e){var t=e||{};return t.page,B(t,R)}function W(e){var t=e||{};return t.clickAnalytics,t.userToken,B(t,_)}var V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Z;return(0,a._)(e,H()),function(r){var n,i,o,a,s,l,c=r||{},u=c.escapeHTML,d=void 0===u||u,f=c.transformItems,g=void 0===f?function(e){return e}:f,v=c.cache,y=void 0===v?(n=null,i=null,{read:function(e){var t=e.state;return(0,T.X)(i,Z(t))?n:null},write:function(e){var t=e.state,r=e.hits;i=Z(t),n=r}}):v,x=function(e,t){var r=e.page,n=void 0===r?0:r,i=Object.keys(t).map(Number);return 0===i.length?n:Math.min.apply(Math,[n].concat(F(i)))},w=function(e,t){var r=e.page,n=void 0===r?0:r,i=Object.keys(t).map(Number);return 0===i.length?n:Math.max.apply(Math,[n].concat(F(i)))};return{$$type:"ais.infiniteHits",init:function(t){e(D(D({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=t.instantSearchInstance,n=this.getWidgetRenderState(t);e(D(D({},n),{},{instantSearchInstance:r}),!1),s("view:internal",n.currentPageHits)},getRenderState:function(e,t){return D(D({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.helper,i=e.parent,c=e.state,u=e.instantSearchInstance,f=[],v=i.getPreviousState()||c,S=y.read({state:W(v)})||{},j=null==t?void 0:null===(E=t.renderingContent)||void 0===E?void 0:null===(O=E.widgets)||void 0===O?void 0:null===(C=O.banners)||void 0===C?void 0:C[0];if(t){var E,O,C,I,P,A,T=v.page,N=void 0===T?0:T;d&&t.hits.length>0&&(t.hits=(0,m.mY)(t.hits));var R=g(k(b(t.hits,t.page,t.hitsPerPage),t.queryID),{results:t}),_=!1;!function e(t,r){r(t),t.getWidgets().forEach(function(t){(0,z.J)(t)&&e(t,r)})}(u.mainIndex,function(e){!_&&e.getWidgets().some(function(e){return"ais.dynamicWidgets"===e.$$type})&&(_=!0)});var M=!(null!==(P=v.disjunctiveFacets)&&void 0!==P&&P.length)&&!(v.facets||[]).filter(function(e){return"*"!==e}).length&&!(null!==(A=v.hierarchicalFacets)&&void 0!==A&&A.length);void 0!==S[N]||t.__isArtificial||"idle"!==u.status||_&&M||(S[N]=R,y.write({state:W(v),hits:S})),f=R,I=0===x(v,S)}else o=function(){n.overrideStateWithoutTriggeringChangeEvent(D(D({},n.state),{},{page:x(n.state,y.read({state:W(n.state)})||{})-1})).searchWithoutTriggeringOnStateChange()},a=function(){n.setPage(w(n.state,y.read({state:W(n.state)})||{})+1).search()},s=p({instantSearchInstance:u,getIndex:function(){return n.getIndex()},widgetType:this.$$type}),l=h({getIndex:function(){return n.getIndex()},widgetType:this.$$type,instantSearchInstance:u}),I=void 0===v.page||0===x(v,S);var L=Object.keys(S).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(S[t])},[]),F=!t||t.nbPages<=w(v,S)+1;return{hits:L,items:L,currentPageHits:f,sendEvent:s,bindEvent:l,banner:j,results:t,showPrevious:o,showMore:a,isFirstPage:I,isLastPage:F,widgetParams:r}},dispose:function(e){var r=e.state;t();var n=r.setQueryParameter("page",void 0);return d?n.setQueryParameters(Object.keys(m.dg).reduce(function(e,t){return D(D({},e),{},L({},t,void 0))},{})):n},getWidgetUiState:function(e,t){var r=t.searchParameters.page||0;return r?D(D({},e),{},{page:r+1}):e},getWidgetSearchParameters:function(e,t){var r=t.uiState,n=e;d&&(n=e.setQueryParameters(m.dg));var i=r.page?r.page-1:0;return n.setQueryParameter("page",i)}}}},$=r(35818),q=r(92677);let G={models:function(e){return e.map(e=>{var t,r;return{...e,nsfwLevel:(0,n.NK)(e.nsfwLevel),tags:e.tags.map(e=>e.id),images:null!==(r=null===(t=e.images)||void 0===t?void 0:t.map(e=>{var t;return{...e,tags:(t=e.tags)?t.map(e=>"number"==typeof e?e:null==e?void 0:e.id):[]}}))&&void 0!==r?r:[]}})},images:function(e){return e.map(e=>({...e,hasMeta:!e.hideMeta&&e.prompt,nsfwLevel:e.nsfwLevel,ingestion:$.hY.Scanned,publishedAt:e.sortAt}))},articles:function(e){return e.map(e=>({...e,nsfwLevel:(0,n.NK)(e.nsfwLevel),coverImage:{...e.coverImage,tags:e.coverImage.tags.map(e=>e.id),metadata:e.coverImage.metadata}}))},users:function(e){return e},collections:function(e){return e.map(e=>{var t;return{...e,nsfwLevel:(0,n.NK)(e.nsfwLevel),userId:e.user.id,image:e.image?{...e.image,tagIds:null===(t=e.image)||void 0===t?void 0:t.tags.map(e=>e.id)}:null,images:e.images.map(e=>({...e,tagIds:e.tags.map(e=>e.id)}))}})},bounties:function(e){return e.map(e=>({...e,nsfwLevel:(0,n.NK)(e.nsfwLevel),tags:e.tags.map(e=>e.id),images:e.images.map(e=>({...e,tagIds:e.tags.map(e=>e.id)}))}))},tools:function(e){return e}},K=(e,t)=>{var r;if(!(null===(r=t.results)||void 0===r?void 0:r.nbHits))return[];let n=t.results.index,i=q.j_[n],o=G[i];if(!i)throw Error("type does not exist on searchIndexTransformMap: ".concat(i));return o(e)};function X(){var e;return e={transformItems:K},(0,A.B)(P,e,void 0)}function J(){var e;return e={transformItems:K},(0,A.B)(V,e,void 0)}},55543:function(e,t,r){"use strict";r.d(t,{fA:function(){return A},DI:function(){return N},Rp:function(){return z}});var n=r(99490),i=r(73445),o=r(782),a=r(18753),s=r(11163),l=r.n(s),c=r(91502);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},r=t.fallback;return"undefined"==typeof window?r():e({window:window})}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}var h=function(e){e&&(window.document.title=e)},m=function(){var e;function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,o=e.createURL,a=e.parseURL,s=e.getLocation,l=e.start,c=e.dispose,d=e.push,p=e.cleanUrlOnDispose;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),f(this,"$$type","ais.browser"),f(this,"windowTitle",void 0),f(this,"writeDelay",void 0),f(this,"_createURL",void 0),f(this,"parseURL",void 0),f(this,"getLocation",void 0),f(this,"writeTimer",void 0),f(this,"_onPopState",void 0),f(this,"inPopState",!1),f(this,"isDisposed",!1),f(this,"latestAcknowledgedHistory",0),f(this,"_start",void 0),f(this,"_dispose",void 0),f(this,"_push",void 0),f(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=void 0===i?400:i,this._createURL=o,this.parseURL=a,this.getLocation=s,this._start=l,this._dispose=c,this._push=d,this._cleanUrlOnDispose=void 0===p||p,u(function(e){var t=e.window;h(r.windowTitle&&r.windowTitle(r.read())),r.latestAcknowledgedHistory=t.history.length})}return e=[{key:"read",value:function(){return this.parseURL({qsModule:c,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;u(function(r){var n=r.window,i=t.createURL(e),o=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){h(o),t.shouldWrite(i)&&(t._push?t._push(i):n.history.pushState(e,o||"",i),t.latestAcknowledgedHistory=n.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},u(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:c,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,u(function(t){var r=t.window;e._onPopState&&r.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return u(function(r){var n=r.window,i=!(t.isDisposed&&t.latestAcknowledgedHistory!==n.history.length);return!t.inPopState&&i&&e!==n.location.href})}}],function(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,l=n.pathname,c=n.hash,u=t.stringify(r),d=""===s?"":":".concat(s);return u?"".concat(i,"//").concat(o).concat(d).concat(l,"?").concat(u).concat(c):"".concat(i,"//").concat(o).concat(d).concat(l).concat(c)}:t,n=e.parseURL,i=e.writeDelay,o=e.windowTitle,a=e.getLocation;return new m({createURL:r,parseURL:void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,writeDelay:void 0===i?400:i,windowTitle:o,getLocation:void 0===a?function(){return u(function(e){return e.window.location},{fallback:function(){throw Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:a,start:e.start,dispose:e.dispose,push:e.push,cleanUrlOnDispose:e.cleanUrlOnDispose})}function v(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return t?e.replace(new RegExp("".concat(r?"/":"").concat(t,"(\\/|\\?|$)")),"$1"):e}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function x(e){for(var t=1;t{switch(e){case E.Ni:return S.K;case E.P5:return w.Q;case E.xx:return k.v;case E.Wq:return j.P;case E.Cc:return O.J;case E.iG:return C.n;case E.Y:return P.A}},z=(0,i.Ue)()((0,o.mW)((0,a.n)(e=>({models:{},images:{},articles:{},users:{},collections:{},bounties:{},tools:{},setSearchParamsByUiState:t=>{let[r]=Object.keys(t);if(!r)return;let n=T(r);switch(r){case E.xx:e(e=>{e.articles=n.stateToRoute(t)[E.xx]});break;case E.Ni:e(e=>{e.models=n.stateToRoute(t)[E.Ni]});break;case E.P5:e(e=>{e.images=n.stateToRoute(t)[E.P5]});break;case E.Wq:e(e=>{e.users=n.stateToRoute(t)[E.Wq]});break;case E.Cc:e(e=>{e.collections=n.stateToRoute(t)[E.Cc]});break;case E.iG:e(e=>{e.bounties=n.stateToRoute(t)[E.iG]});break;case E.Y:e(e=>{e.tools=n.stateToRoute(t)[E.Y]})}},setModelsSearchParams:t=>e(e=>{e.models=t}),setImagesSearchParams:t=>e(e=>{e.images=t}),setArticleSearchParams:t=>e(e=>{e.articles=t}),setUserSearchParams:t=>e(e=>{e.users=t}),setCollectionSearchParams:t=>e(e=>{e.collections=t}),setBountiesSearchParams:t=>e(e=>{e.bounties=t}),setToolsSearchParams:t=>e(e=>{e.tools=t})})))),N={router:function(e){var t,r=e||{},n=r.beforePopState,i=r.singletonRouter,o=r.serverUrl,a=r.beforeStart,s=r.beforeDispose,l=r.routerOptions,c=function(){return!0};if("undefined"==typeof window)return g(x({getLocation:function(){return new URL(o)}},l));var u=!1,d=g(x({start:function(e){a&&a(e);var r,o=i.pathname;function s(){var e=i.asPath.split("?")[0],t=new URL(window.location.href).pathname;return t=v(t,i.locale,"/"!==e),e!==t}t=function(){i.pathname!==o||u||e(),u=!1},i.events.on("routeChangeComplete",t),null!==(r=i.router)&&void 0!==r&&r._bps&&(c=i.router._bps),i.beforePopState(function(e){return n?n({state:e,libraryBeforePopState:s,ownBeforePopState:c}):s()})},dispose:function(){s&&s(),i.events.off("routeChangeComplete",t),i.beforePopState(c)},push:function(e){var t=v(e,i.locale);i.push(t,void 0,{shallow:!0}),u=!0}},l));return d._isNextRouter=!0,d.$$type="ais.nextjs",d}({singletonRouter:l(),routerOptions:{cleanUrlOnDispose:!1,createURL(e){let{routeState:t,location:r}=e;if(!r.pathname.match(/\/search\/([^\/]+)/))return r.href;let i="";return t[E.Ni]?i=n.QS.stringify(t[E.Ni]):t[E.xx]?i=n.QS.stringify(t[E.xx]):t[E.P5]?i=n.QS.stringify(t[E.P5]):t[E.Wq]?i=n.QS.stringify(t[E.Wq]):t[E.Cc]?i=n.QS.stringify(t[E.Cc]):t[E.iG]?i=n.QS.stringify(t[E.iG]):t[E.Y]&&(i=n.QS.stringify(t[E.Y])),"".concat(r.origin).concat(r.pathname,"?").concat(i)},parseURL(e){let{location:t}=e,r=t.pathname.match(/\/search\/([^\/]+)/);if(r){let e=r[1];if(I.PR.hasOwnProperty(e))return T(I.PR[e]).parseURL({location:t})}return{"":{}}}}}),stateMapping:{routeToState:e=>e[E.Ni]?T(E.Ni).routeToState(e):e[E.P5]?T(E.P5).routeToState(e):e[E.xx]?T(E.xx).routeToState(e):e[E.Wq]?T(E.Wq).routeToState(e):e[E.Cc]?T(E.Cc).routeToState(e):e[E.iG]?T(E.iG).routeToState(e):e[E.Y]?T(E.Y).routeToState(e):e,stateToRoute(e){let[t]=Object.keys(e);return T(t||E.Ni).stateToRoute(e)}}}},38266:function(e,t,r){"use strict";r.d(t,{S:function(){return g},_:function(){return v}});var n=r(85893),i=r(64761),o=r(88002),a=r(95117),s=r(67841),l=r(7001),c=r(34736),u=r(81811),d=r(19482),f=r(63208),p=r(90512),h=r(67294),m=r(10558);function g(e){let{label:t,options:r,onClick:s,value:l,disabled:c,children:d}=e,f=(0,i.rZ)();return(0,n.jsxs)(o.v,{withArrow:!0,disabled:c,children:[(0,n.jsx)(o.v.Target,{children:(0,n.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",style:c?{opacity:.3,cursor:"default",userSelect:"none"}:{},children:[(0,n.jsx)(a.x,{weight:700,transform:"uppercase",suppressHydrationWarning:!0,children:t}),(0,n.jsx)(u.Z,{size:16,stroke:3})]})}),(0,n.jsx)(o.v.Dropdown,{children:(0,n.jsxs)(n.Fragment,{children:[r.map(e=>(0,n.jsx)(o.v.Item,{onClick:()=>s(e.value),children:(0,n.jsx)(a.x,{transform:"uppercase",ta:"center",color:e.value===l?f.primaryColor:void 0,weight:e.value===l?700:void 0,children:e.label})},e.value.toString())),d]})})]})}function v(e){let{label:t,options:r,onClick:g,value:v,disabled:y,children:b,buttonProps:x,icon:w,drawerStyles:S}=e,k=(0,i.rZ)(),[j,E]=(0,h.useState)(!1),O=(0,m.d)(),C=(0,n.jsx)(s.z,{color:"gray",radius:"xl",variant:"dark"===k.colorScheme?"filled":"light",disabled:y,rightIcon:(0,n.jsx)(u.Z,{className:(0,p.Z)({"rotate-180 transition-transform":j}),size:16}),size:"sm",compact:!0,...x,onClick:()=>E(e=>!e),children:(0,n.jsxs)("div",{className:"flex items-center gap-1",suppressHydrationWarning:!0,children:[null!=w?w:(0,n.jsx)(d.Z,{size:16}),t]})});return O?(0,n.jsxs)(n.Fragment,{children:[C,(0,n.jsx)(l.d,{position:"bottom",opened:j,onClose:()=>E(!1),styles:{...S,body:{padding:16,paddingTop:0,overflow:"auto"},drawer:{height:"auto"},header:{padding:"4px 8px"},closeButton:{height:32,width:32,"& > svg":{width:24,height:24}}},closeButtonLabel:"Close sort menu",children:(0,n.jsx)("div",{className:"flex flex-col gap-2",children:r.map(e=>{let t=e.value===v;return(0,n.jsx)(c.k,{className:(0,p.Z)("rounded-md px-2.5 py-3",{"bg-gray-0 dark:bg-dark-4":t}),onClick:()=>{g(e.value),E(!1)},children:(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(a.x,{inline:!0,children:e.label}),t&&(0,n.jsx)(a.x,{color:k.primaryColor,inline:!0,children:(0,n.jsx)(f.Z,{size:16,color:"currentColor"})})]})},e.value.toString())})})})]}):(0,n.jsxs)(o.v,{position:"bottom-end",shadow:"md",radius:12,width:256,onChange:E,disabled:y,children:[(0,n.jsx)(o.v.Target,{children:C}),(0,n.jsx)(o.v.Dropdown,{p:8,children:(0,n.jsxs)(n.Fragment,{children:[r.map(e=>{let t=e.value===v;return(0,n.jsx)(o.v.Item,{onClick:()=>g(e.value),"data-hovered":"".concat(t),rightSection:t&&(0,n.jsx)(a.x,{color:k.primaryColor,inline:!0,children:(0,n.jsx)(f.Z,{size:16,color:"currentColor"})}),children:e.label},e.value.toString())}),b]})})]})}},72124:function(e,t,r){"use strict";r.d(t,{$:function(){return c}});var n=r(85893),i=r(95117),o=r(35818),a=r(83917),s=r(28075);let l={sm:{badgeSize:50,textSize:"sm",avatarSize:"md"},md:{badgeSize:80,textSize:"md",avatarSize:"xl"},lg:{badgeSize:120,textSize:"lg",avatarSize:"xl"}},c=e=>{let{cosmetic:t,size:r="sm"}=e,c=l[r];switch(t.type){case o.c_.Badge:case o.c_.ProfileDecoration:let u=t.data;if(!u.url)return null;return(0,n.jsx)("div",{style:{width:c.badgeSize},children:(0,n.jsx)(s.i,{src:u.url,alt:t.name})});case o.c_.ContentDecoration:let d=t.data;if(!d.url&&!d.cssFrame)return null;return(0,n.jsx)("div",{style:{width:c.badgeSize},children:(0,n.jsx)(a.B,{aspectRatio:"square",frameDecoration:t,sx:{margin:"0 !important"},children:(0,n.jsx)("div",{className:"size-full bg-gray-100 dark:bg-dark-7"})})});case o.c_.NamePlate:let f=t.data;return(0,n.jsx)(i.x,{weight:"bold",...f,size:c.textSize,children:"Sample Text"});case o.c_.ProfileBackground:let p=t.data;if(!p.url)return null;return(0,n.jsx)("div",{style:{height:c.badgeSize,width:"100%",overflow:"hidden",borderRadius:10},children:(0,n.jsx)(s.i,{src:p.url,alt:t.name,type:p.type,anim:!0,style:{objectFit:"cover",width:"100%",height:"100%"},wrapperProps:{style:{height:"100%"}},contain:!0})});default:return null}}},40893:function(e,t,r){"use strict";r.d(t,{Fu:function(){return L},C6:function(){return F},Df:function(){return D},t9:function(){return M}});var n=r(85893),i=r(12593),o=r(67294),a=r(32957),s=r(2807),l=r(95117);let c={generation:e=>({color:"blue.4",title:"User Buzz Update",message:e.delta>0?(0,n.jsxs)(l.x,{children:[(0,n.jsxs)(l.x,{weight:"bold",span:!0,children:[e.delta.toLocaleString()," Buzz"]})," ","has been added to your buzz account"]}):(0,n.jsxs)(l.x,{children:[(0,n.jsxs)(l.x,{weight:"bold",span:!0,children:[Math.abs(e.delta).toLocaleString()," Buzz"]})," ","has been debited from your buzz account"]})}),user:e=>({color:"yellow.7",title:"User Buzz Update",message:e.delta>0?(0,n.jsxs)(l.x,{children:[(0,n.jsxs)(l.x,{weight:"bold",span:!0,children:[e.delta.toLocaleString()," Buzz"]})," ","has been added to your buzz account"]}):(0,n.jsxs)(l.x,{children:[(0,n.jsxs)(l.x,{weight:"bold",span:!0,children:[Math.abs(e.delta).toLocaleString()," Buzz"]})," ","has been debited from your buzz account"]})})},u=()=>{let e=(0,o.useCallback)(e=>{let t=c[e.accountType]||c.user;t&&(0,s.mZ)(t(e))},[]);return D(a.m.BuzzUpdate,e),null};var d=r(91429),f=r(35818),p=r(12902),h=r(60619),m=r(17578),g=r(5779),v=r(72456);let y="/sounds/message2.mp3",b=()=>{let e=v.SX.useUtils(),t=(0,m.xJ)(),r=(0,g.g)(),[n]=(0,h.Z)(y,{volume:.5}),i=(0,o.useCallback)(i=>{if(!t||!r.chat||i.userId===t.id||(e.chat.getInfiniteMessages.setInfiniteData({chatId:i.chatId},(0,p.ZP)(e=>{if(!e)return e;e.pages[e.pages.length-1].items.push(i)})),i.contentType===f.Cb.Embed))return;e.chat.getAllByUser.setData(void 0,(0,p.ZP)(e=>{if(!e)return e;let t=e.find(e=>e.id===i.chatId);if(!t)return e;t.messages=[{content:i.content,contentType:i.contentType,createdAt:new Date(i.createdAt)}]})),e.chat.getUnreadCount.setData(void 0,(0,p.ZP)(e=>{if(!e)return e;let t=e.find(e=>e.chatId===i.chatId);t?t.cnt++:e.push({chatId:i.chatId,cnt:1})}));let o=e.chat.getUserSettings.getData();(null==o?void 0:o.muteSounds)!==!0&&n()},[e,n,t,null==t?void 0:t.id,r.chat]);D(a.m.ChatNewMessage,i)},x=()=>{let e=v.SX.useUtils(),t=(0,m.xJ)(),r=(0,g.g)(),[n]=(0,h.Z)(y,{volume:.5}),i=(0,o.useCallback)(i=>{if(!t||!r.chat||i.ownerId===t.id)return;e.chat.getAllByUser.setData(void 0,e=>e?[{...i,createdAt:new Date(i.createdAt)},...e]:[i]),e.chat.getUnreadCount.setData(void 0,(0,p.ZP)(e=>{if(!e)return e;e.push({chatId:i.id,cnt:1})}));let o=e.chat.getUserSettings.getData();(null==o?void 0:o.muteSounds)!==!0&&n()},[e,n,t,r.chat]);D(a.m.ChatNewRoom,i)};var w=r(42381),S=r(67993),k=r(93299),j=r(58716);let E=(0,r(73445).Ue)(()=>({downloading:!1}));function O(){return(0,w.In)(),D(a.m.SchedulerDownload,e=>{let{downloading:t}=e;E.setState({downloading:t})}),(0,d.G)(),(0,k.eh)(),(0,k.qX)(),b(),x(),D(a.m.ImageIngestionStatus,e=>{let{imageId:t,ingestion:r,blockedFor:n}=e;j.i.setImage(t,{ingestion:r,blockedFor:n})}),(0,S.kS)(),null}var C=r(85625),I=r(88182),P=r(40597);class A{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class T{on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),()=>this.off(e,t)}off(e,t){if(!this.callbacks[e])return;let r=this.callbacks[e].indexOf(t);this.callbacks[e].splice(r,1)}emit(e,t){let r=this.callbacks[e];r&&r.forEach(e=>e(t))}stop(){this.callbacks={}}constructor(){this.callbacks={}}}let z={},N=!1,R={connected:"green",reconnecting:"yellow",closed:"red"},_=(0,o.createContext)(null),M=()=>{let e=(0,o.useContext)(_);if(!e)throw Error("SignalContext not in tree");return e},D=(e,t)=>{let{worker:r}=M(),n=(0,o.useRef)(t);n.current=t,(0,o.useEffect)(()=>{let t=e=>n.current(e);return null==r||r.on(e,t),()=>{null==r||r.off(e,t)}},[r,e])};function L(e){let{children:t}=e,i=v.SX.useUtils(),a=(0,o.useRef)(null),s=(0,o.useRef)(!1),l=(0,C.Di)((10+(0,I.XF)(-2,5))*1e3),[c,d]=(0,o.useState)(null);a.current=null!=c?c:null;let f=function(e){let t=(0,m.xJ)(),n=null==t?void 0:t.id,{onStateChange:i}=null!=e?e:{},[a,s]=(0,o.useState)(),[l,c]=(0,o.useState)(!1),[u,d]=(0,o.useState)(null),f=v.SX.useUtils(),{data:p}=v.SX.signals.getToken.useQuery(void 0,{enabled:!!n&&"closed"===a}),h=null==p?void 0:p.accessToken,g=(0,o.useRef)(new T),y=(0,o.useRef)(new A);(0,o.useEffect)(()=>{u||(c(!1),d(e=>null!=e?e:new P.ZP(r.tu(new URL(r.p+r.u(2289),r.b)),{name:"civitai-signals:2",type:void 0})))},[u]),(0,o.useEffect)(()=>{u&&(u.port.onmessage=async e=>{let{data:t}=e;if("worker:ready"===t.type)c(!0);else if("event:received"===t.type)g.current.emit(t.target,t.payload);else if("pong"===t.type)y.current.resolve();else if("connection:state"===t.type){var r;s(null!==(r=t.state)&&void 0!==r?r:"closed"),null==i||i({state:t.state,message:t.message}),"closed"===t.state&&f.signals.getToken.invalidate(),N&&console.log({state:t.state},new Date().toLocaleTimeString())}})},[u]),(0,o.useEffect)(()=>{function e(){null==u||u.port.postMessage({type:"beforeunload"}),g.current.stop()}return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[]),(0,o.useEffect)(()=>{u&&l&&h&&n&&u.port.postMessage({type:"connection:init",token:h,userId:n})},[u,h,l,n]),(0,o.useEffect)(()=>{function e(){if("visible"!==document.visibilityState||!u)return;y.current=new A,null==u||u.port.postMessage({type:"ping"});let e=setTimeout(()=>y.current.reject(),1e3);y.current.promise.then(()=>{clearTimeout(e),c(!0)}).catch(()=>{c(!1),s("closed")})}return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[u]);let b=(0,o.useMemo)(()=>({on:function(e,t){null==u||u.port.postMessage({type:"event:register",target:e}),g.current.on(e,t)},off:function(e,t){g.current.off(e,t)},send:function(e,t){null==u||u.port.postMessage({type:"send",target:e,args:t})}}),[u]);return(0,o.useEffect)(()=>{window.logSignal=(e,t)=>{z[e]||(z[e]=!0,b.on(e,function(e){if(t){let r=[e].find(t);r&&console.log(r)}else console.log(e)}),console.log("begin logging: ".concat(e)))},window.ping=()=>{null==u||u.port.postMessage({type:"ping"}),N=!0}},[b]),b}({onStateChange:e=>{let{state:t}=e,r=a.current,n=s.current;r!==t&&"connected"===t&&n&&l(()=>{i.buzz.getBuzzAccount.invalidate(),i.orchestrator.queryGeneratedImages.invalidate()}),"connected"===t&&(s.current=!0),d(t)}});return(0,n.jsxs)(_.Provider,{value:{connected:"connected"===c,status:c,worker:f},children:[(0,n.jsx)(u,{}),(0,n.jsx)(O,{}),t]})}function F(e){let{title:t,children:r,...o}=e,{connected:a,status:s}=M();return!s||a?null:(0,n.jsx)(i.P,{...o,color:R[s],title:null==t?void 0:t(s),disallowClose:!0,children:r(s)})}},61714:function(e,t,r){"use strict";r.d(t,{W:function(){return g}});var n=r(85893),i=r(49834),o=r(98517),a=r(50397),s=r(19434),l=r(17197),c=(0,r(21955).Z)("outline","brand-tiktok","IconBrandTiktok",[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917z",key:"svg-0"}]]),u=r(19412),d=r(82231),f=r(36224),p=r(10169);let h={size:"lg",radius:"xl"},m={github:o.Z,discord:a.Z,twitter:s.Z,instagram:l.Z,tiktok:c,reddit:u.Z,youtube:d.Z,twitch:f.Z};function g(e){let{iconSize:t=20,include:r,...o}=e;null!=r||(r=["discord","twitter","instagram","youtube","tiktok","reddit","github","twitch"]);let a=(0,p.d)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=m[e],s={};return"twitch"===e&&a&&(s.variant="filled",s.color="red",s.title="Live now!"),(0,n.jsx)(i.A,{component:"a",href:"/".concat(e),target:"_blank",rel:"nofollow noreferrer",...h,...o,...s,children:(0,n.jsx)(r,{size:t})},e)})})}},80687:function(e,t,r){"use strict";r.d(t,{FG:function(){return l},Jl:function(){return u},WY:function(){return d},zd:function(){return c}});var n=r(67294),i=r(17578),o=r(5779),a=r(38498),s=r(72456);let l=function(){var e,t,r,n;let{checkWhenInBadState:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(0,i.xJ)(),l=(null==a?void 0:a.tier)!==void 0,{data:c,isLoading:u,isFetching:d}=s.SX.subscriptions.getUserSubscription.useQuery(void 0,{enabled:!!a&&!!(l||o)}),f=null==c?void 0:null===(e=c.product)||void 0===e?void 0:e.metadata;return{subscription:c,subscriptionLoading:!!l&&(u||d),subscriptionPaymentProvider:null==c?void 0:null===(t=c.product)||void 0===t?void 0:t.provider,isFreeTier:!c||(null==f?void 0:f.tier)==="free",tier:null!==(n=null!==(r=null==f?void 0:f.tier)&&void 0!==r?r:null==a?void 0:a.tier)&&void 0!==n?n:"free",meta:f}},c=()=>{var e;let t=(0,i.xJ)(),{subscription:r,subscriptionLoading:n,subscriptionPaymentProvider:c}=l(),{data:u=[],isLoading:d}=s.SX.subscriptions.getPlans.useQuery({}),f=(0,o.g)();if(!t||n||d||!f.membershipsV2)return!1;if(!r)return!0;if(u.filter(e=>e.provider===c).length<=1)return!1;let p=null==r?void 0:null===(e=r.product)||void 0===e?void 0:e.metadata;return a._G.memberships.tierOrder.indexOf(p.tier)+1!!e&&e===a._G.memberships.founderDiscount.tier&&new Date{let e=(0,i.xJ)(),[t,r]=(0,n.useState)(!1);return{refreshSession:async()=>{var t;r(!0),await (null==e?void 0:e.refresh()),null===(t=window)||void 0===t||t.location.reload(),r(!1)},refreshing:t}}},40382:function(e,t,r){"use strict";r.d(t,{yp:function(){return h},S1:function(){return m},KR:function(){return p}});var n=r(72456);r(2807);var i=r(17578),o=r(67294),a=r(524),s=r(21708),l=r(85625),c=r(8346);let u=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{ready:r}=(0,o.useContext)(s.ko),[n,i]=(0,o.useState)(!1),[u,d]=(0,o.useState)(null),[f,p]=(0,o.useState)(null),h=(0,l.Di)(100),m=(0,o.useCallback)(async()=>{if(!n){if(!r){p("Google recaptcha has not loaded yet");return}d(null),i(!0),p(null);try{var t;if(c.r8){let e="dev-recaptcha-token";return d(e),e}let r=await (null===(t=window)||void 0===t?void 0:t.grecaptcha.enterprise.execute(a.O.NEXT_PUBLIC_RECAPTCHA_KEY,{action:e}));return d(r),r}catch(e){p(e.message)}finally{i(!1)}}},[r,n,e]);return(0,o.useEffect)(()=>{r&&t&&h(()=>{m()})},[r,t]),{token:u,loading:n,error:f,getToken:m}};var d=r(38498),f=r(35818);let p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0},t=(0,i.xJ)(),{data:r=[],...o}=n.SX.user.getPaymentMethods.useQuery(void 0,{enabled:!!t&&(null==e?void 0:e.enabled),trpc:{context:{skipBatch:!0}}});return{userPaymentMethods:r,...o}},h=e=>"month"===e?"mo":null!=e?e:"",m=e=>{let{unitAmount:t,currency:r=f.F.USD,metadata:i,desiredPaymentMethodTypes:a}=e,[s,c]=(0,o.useState)(!0),[p,h]=(0,o.useState)(null),[m,g]=(0,o.useState)(void 0),[v,y]=(0,o.useState)(null),[b,x]=(0,o.useState)(!0),w=n.SX.stripe.getPaymentIntent.useMutation(),{getToken:S}=u(d.et.STRIPE_TRANSACTION,!1),k=(0,l.Di)(300),j=(0,o.useCallback)(async()=>{h(null),g(void 0),y(null),x(!0);try{let e=await S();if(!e)throw Error("Unable to get recaptcha token.");let n=await w.mutateAsync({unitAmount:t,currency:r,metadata:i,paymentMethodTypes:a,setupFuturePayment:s,recaptchaToken:e});h(n.clientSecret),g(n.paymentMethodTypes)}catch(t){var e,n;y(null!==(n=null!==(e=null==t?void 0:t.message)&&void 0!==e?e:t)&&void 0!==n?n:"An error occurred")}finally{x(!1)}},[t,r,i,a,s,S]);return(0,o.useEffect)(()=>{k(()=>j())},[s]),{clientSecret:p,paymentMethodTypes:m,isLoading:b,setupFuturePayment:s,setSetupFuturePayment:c,error:v}}},62093:function(e,t,r){"use strict";r.d(t,{h:function(){return h},i:function(){return f}});var n=r(85893),i=r(95117),o=r(97564),a=r(8949),s=r(5044),l=r(54777),c=(0,r(21955).Z)("outline","ad-circle-off","IconAdCircleOff",[["path",{d:"M4.91 4.949a9.968 9.968 0 0 0 -2.91 7.051c0 5.523 4.477 10 10 10a9.968 9.968 0 0 0 7.05 -2.909",key:"svg-0"}],["path",{d:"M20.778 16.793a9.955 9.955 0 0 0 1.222 -4.793c0 -5.523 -4.477 -10 -10 -10c-1.74 0 -3.376 .444 -4.8 1.225",key:"svg-1"}],["path",{d:"M7 15v-4.5a1.5 1.5 0 0 1 2.138 -1.358",key:"svg-2"}],["path",{d:"M9.854 9.853c.094 .196 .146 .415 .146 .647v4.5",key:"svg-3"}],["path",{d:"M7 13h3",key:"svg-4"}],["path",{d:"M14 14v1h1",key:"svg-5"}],["path",{d:"M17 13v-2a2 2 0 0 0 -2 -2h-1v1",key:"svg-6"}],["path",{d:"M3 3l18 18",key:"svg-7"}]]),u=r(46812),d=r(49597);let f=18,p=[{content:"Ad free browsing",icon:(0,n.jsx)(c,{size:f})},{content:(0,n.jsx)(i.x,{variant:"link",td:"underline",component:"a",href:"/product/link",target:"_blank",children:"Civitai Link"})},{content:"Exclusive Discord channels"},{content:"Early access to new features"},{content:"Enhanced Model Creator controls",tiers:["gold"]}],h=e=>{let{benefits:t,useDefaultBenefits:r=!0,defaultBenefitsDisabled:i,tier:c}=e;return(0,n.jsxs)(o.K,{children:[(0,n.jsx)(a.a,{spacing:"xs",size:"md",center:!0,icon:(0,n.jsx)(s.k,{color:"gray",size:24,radius:"xl",children:(0,n.jsx)(u.Z,{size:f})}),children:t.map((e,t)=>{let{content:r,icon:i,iconColor:o,iconVariant:l}=e;return(0,n.jsx)(a.a.Item,{icon:i?(0,n.jsx)(s.k,{color:null!=o?o:"teal",size:24,radius:"xl",variant:l,children:i}):void 0,children:r},t)})}),r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.i,{mx:"-md"}),(0,n.jsx)(a.a,{spacing:"xs",size:"md",center:!0,children:p.map((e,t)=>{let{content:r,tiers:o}=e,l=i||o&&(!c||!o.includes(c));return(0,n.jsx)(a.a.Item,{icon:(0,n.jsx)(s.k,{color:l?"gray":"green",variant:"light",size:24,radius:"xl",children:l?(0,n.jsx)(d.Z,{size:f}):(0,n.jsx)(u.Z,{size:f})}),children:r},t)})})]})]})}},40099:function(e,t,r){"use strict";r.d(t,{k:function(){return u},l:function(){return c}});var n=r(85893),i=r(64761),o=r(20213),a=r(92918),s=r(12861),l=r(43808);function c(e){let{filled:t,...r}=e,s=(0,i.rZ)();return t?(0,n.jsx)(o.Z,{...r,color:"dark"===s.colorScheme?void 0:s.white}):(0,n.jsx)(a.Z,{...r})}function u(e){let{filled:t,...r}=e,o=(0,i.rZ)();return t?(0,n.jsx)(s.Z,{...r,color:"dark"===o.colorScheme?void 0:o.white}):(0,n.jsx)(l.Z,{...r})}},62220:function(e,t,r){"use strict";r.d(t,{O:function(){return s}});var n=r(85893),i=r(54687),o=r(39419);r(93680);var a=r(32957);function s(e){let{value:t,onChange:r,placeholder:s="select...",grouped:l=!0,...c}=e,{tools:u,loading:d}=(0,i.g)({filters:{include:["unlisted"],sort:a.IM.AZ}});return(0,n.jsx)(o.y$,{...c,value:t,onChange:r,loading:d,placeholder:s,data:u.map(e=>{let{id:t,name:r,type:n}=e;return l?{value:t,label:r,group:n}:{value:t,label:r}}),searchable:!0,clearable:!0})}},54687:function(e,t,r){"use strict";r.d(t,{$:function(){return s},g:function(){return l}});var n=r(67294),i=r(38394),o=r(14619),a=r(72456);let s=()=>{let e=(0,i.PH)(e=>e.tools);return(0,o.HO)(e)};function l(e){let{filters:t,options:r}=e||{},{data:i,isLoading:o,isRefetching:s,fetchNextPage:l,hasNextPage:c}=a.SX.tool.getAll.useInfiniteQuery({...t},{...r,getNextPageParam:e=>{var t;return null!==(t=e.nextCursor)&&void 0!==t?t:null},keepPreviousData:!0});return{tools:(0,n.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.pages.flatMap(e=>e.items))&&void 0!==e?e:[]},[i]),loading:o,refetching:s,fetchNextPage:l,hasNextPage:c}}},86164:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(72456);let i=()=>{let{mutateAsync:e}=n.SX.track.trackShare.useMutation(),{mutateAsync:t}=n.SX.track.addAction.useMutation(),{mutateAsync:r}=n.SX.track.trackSearch.useMutation();return{trackShare:t=>e(t),trackAction:e=>t(e),trackSearch:e=>r(e)}}},93299:function(e,t,r){"use strict";r.d(t,{Hm:function(){return w},I_:function(){return y},Tq:function(){return g},_x:function(){return x},eh:function(){return S},oG:function(){return b},p8:function(){return v},qX:function(){return k},sb:function(){return m}});var n=r(85945),i=r(16058),o=r(12902),a=r(11163),s=r.n(a),l=r(67294),c=r(40893),u=r(32957),d=r(67946),f=r(2807),p=r(72456),h=r(48600);let m="/models/train",g=["civitai:53761@285757","urn:air:sd1:checkpoint:civitai:53761@285757"],v=e=>{if(!isFinite(e))return 0;let t=0;for(;Math.round(1*e)/1!==e;)e*=10,t++;return t},y=e=>{if(!e)return"Unknown";let t=Math.floor(e/60),r=Math.floor(e%60),n=t>0?"".concat(t," hour").concat(1===t?"":"s",", "):"",i="".concat(r," min").concat(1===r?"":"s");return"".concat(n).concat(i)},b=e=>e.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0),x=(e,t,r)=>{e&&t<3&&s().replace("".concat(m,"?modelId=").concat(e,"&step=").concat(t+1),void 0,{shallow:!0,scroll:!0}).then(()=>null==r?void 0:r())},w=(e,t)=>{e&&t>1&&s().replace("".concat(m,"?modelId=").concat(e,"&step=").concat(t-1),void 0,{shallow:!0,scroll:!0}).then()},S=()=>{let e=(0,n.NL)(),t=p.SX.useUtils(),r=(0,l.useCallback)(r=>{let n=(0,i.Ol)(p.SX.model.getMyTrainingModels);e.setQueriesData({queryKey:n,exact:!1},(0,o.ZP)(e=>{var t;let n=null==e?void 0:null===(t=e.items)||void 0===t?void 0:t.find(e=>e.id==r.modelVersionId);if(n){n.trainingStatus=r.status;let e=n.files[0];e&&(e.metadata=r.fileMetadata)}})),t.model.getById.setData({id:r.modelId},(0,o.ZP)(e=>{if(!e)return e;let t=e.modelVersions.find(e=>e.id==r.modelVersionId);if(t){t.trainingStatus=r.status;let e=t.files.find(e=>"Training Data"===e.type);e&&(e.metadata=r.fileMetadata)}}))},[e]);(0,c.Df)(u.m.TrainingUpdate,r)},k=()=>{(0,c.Df)(u.m.OrchestratorUpdate,e=>{var t;let{context:r,jobProperties:n,jobType:i,type:o}=e;if(!["MediaTagging","MediaCaptioning"].includes(i)||!["Updated","Failed"].includes(o)||!(0,h.$K)(n))return;let{modelId:a}=n,{autoLabeling:s,autoTagging:l,autoCaptioning:c}=null!==(t=d.an.getState()[a])&&void 0!==t?t:{...d.xb},{updateImage:u,setAutoLabeling:p}=d.trainingStore;if("Failed"===o){(0,f.s9)({error:Error("Could not complete. Please try again."),title:"Failed to auto label",autoClose:!1}),p(a,{...d.xb.autoLabeling});return}if(!(0,h.$K)(r))return;let{isDone:m}=r;"MediaTagging"===i?Object.entries(Object.assign({},...Object.entries(r.data).map(e=>{let[t,r]=e;return{[t]:r.wdTagger.tags}}))).forEach(e=>{var t,r,n,i;let[o,c]=e,f=Object.entries(c),h=b(null!==(t=l.blacklist)&&void 0!==t?t:""),m=b(null!==(r=l.prependTags)&&void 0!==r?r:""),g=b(null!==(n=l.appendTags)&&void 0!==n?n:"");if(0===f.length)p(a,{...s,fails:[...s.fails,o]});else{let e=f.sort((e,t)=>{let[,r]=e,[,n]=t;return n-r}).filter(e=>{var t;return e[1]>=(null!==(t=l.threshold)&&void 0!==t?t:d.$r.tag.threshold.min)&&!h.includes(e[0])}).slice(0,null!==(i=l.maxTags)&&void 0!==i?i:d.$r.tag.tags.max).map(e=>e[0]);u(a,{matcher:o,label:(e=[...m,...e,...g]).join(", "),appendLabel:"append"===l.overwrite}),p(a,{...s,successes:s.successes+1})}}):Object.entries(Object.assign({},...Object.entries(r.data).map(e=>{let[t,r]=e;return{[t]:r.joyCaption.caption}}))).forEach(e=>{let[t,r]=e;0===r.length?p(a,{...s,fails:[...s.fails,t]}):(u(a,{matcher:t,label:r,appendLabel:"append"===c.overwrite}),p(a,{...s,successes:s.successes+1}))}),m&&((0,f.LX)({title:"Images auto-labeled successfully!",message:"Tagged ".concat(s.successes," image").concat(1===s.successes?"":"s",". Failures: ").concat(s.fails.length)}),p(a,{...d.xb.autoLabeling}))})}},56141:function(e,t,r){"use strict";r.d(t,{MX:function(){return s},We:function(){return o},_d:function(){return a}});var n=r(85893);r(67294);var i=r(47838);let o={Adafactor:"scale_parameter=False, relative_step=False, warmup_init=False",AdamW8Bit:"weight_decay=0.1",Prodigy:"weight_decay=0.5, decouple=True, betas=0.9,0.99, use_bias_correction=False"},a={Adafactor:{kohya:o.Adafactor,"x-flux":"(empty)",rapid:"(empty)"},AdamW8Bit:{kohya:"weight_decay=0.01, eps=0.00000001, betas=(0.9, 0.999)","x-flux":"weight_decay=0.01, eps=0.00000001, betas=(0.9, 0.999)",rapid:"(empty)"},Prodigy:{kohya:o.Prodigy,"x-flux":"(empty)",rapid:"(empty)"}},s=[{name:"engine",label:"Engine",hint:"The training script used. In most cases, you'll want Kohya.",type:"select",default:"kohya",options:i.A5,disabled:!0,overrides:{flux_dev:{all:{disabled:!1}}}},{name:"maxTrainEpochs",label:"Epochs",hint:"An epoch is one set of learning. By default, we will save a maximum of 20 epochs (evenly distributed), and they are all available for download.",type:"int",default:10,min:3,max:500,step:1,overrides:{sdxl:{all:{min:1}},pony:{all:{min:1}},illustrious:{all:{min:1}},flux_dev:{kohya:{default:5},"x-flux":{default:5,max:5,min:2},rapid:{default:1,min:1,max:1}},sd3_medium:{all:{default:5}},sd3_large:{all:{default:5}}}},{name:"numRepeats",label:"Num Repeats",hint:"Num Repeats defines how many times each individual image gets put into VRAM. As opposed to batch size, which is how many images are placed into VRAM at once.",type:"int",default:void 0,min:1,max:5e3,step:1,overrides:{flux_dev:{"x-flux":{disabled:!0}}}},{name:"trainBatchSize",label:"Train Batch Size",hint:"Batch size is the number of images that will be placed into VRAM at once. A batch size of 2 will train two images at a time, simultaneously.",type:"int",default:6,min:1,max:9,step:1,overrides:{realistic:{all:{default:2,max:2}},sdxl:{all:{default:4,max:4}},pony:{all:{default:5,max:5}},illustrious:{all:{default:4,max:4}},flux_dev:{"x-flux":{default:1,max:1,disabled:!0},kohya:{default:4,max:4}},sd3_medium:{all:{default:4,max:4}},sd3_large:{all:{default:4,max:4}}}},{name:"targetSteps",label:"Steps",hint:(0,n.jsxs)(n.Fragment,{children:["The total number of steps for training. Computed automatically with (epochs * # of images * repeats / batch size).",(0,n.jsx)("br",{}),"The maximum allowed is 10,000 steps."]}),type:"int",default:void 0,min:1,max:1e4,step:1,disabled:!0,overrides:{flux_dev:{"x-flux":{disabled:!1,default:2500,min:1e3,hint:"The number of target training steps."}}}},{name:"resolution",label:"Resolution",hint:"Specify the maximum resolution of training images. If the training images exceed the resolution specified here, they will be scaled down to this resolution.",type:"int",default:512,min:512,max:1024,step:64,overrides:{sdxl:{all:{min:1024,max:2048,default:1024}},pony:{all:{min:1024,max:2048,default:1024}},illustrious:{all:{min:1024,max:2048,default:1024}}}},{name:"loraType",label:"LoRA Type",hint:"Specifies the type of LoRA learning. Only standard LoRA is currently supported.",type:"select",default:"lora",options:i.qS,disabled:!0},{name:"enableBucket",label:"Enable Bucket",hint:"Sorts images into buckets by size for the purposes of training. If your training images are all the same size, you can turn this option off, but leaving it on has no effect.",type:"bool",default:!0,overrides:{flux_dev:{"x-flux":{default:!1,disabled:!0}}}},{name:"shuffleCaption",label:"Shuffle Tags",hint:"Randomly changes the order of your tags during training. The intent of shuffling is to improve learning. If you are using captions (sentences), this option has no meaning.",type:"bool",default:!1,overrides:{flux_dev:{all:{disabled:!0}},sd3_medium:{all:{disabled:!0}},sd3_large:{all:{disabled:!0}}}},{name:"keepTokens",label:"Keep Tokens",hint:(0,n.jsxs)(n.Fragment,{children:['If your training images have tags, you can randomly shuffle them (see "Shuffle Tags" option for details). However, if you have words that you want to keep at the beginning, you can use this option to specify how many to keep.',(0,n.jsx)("br",{}),'This option does nothing if the "Shuffle Tags" option is off.']}),type:"int",default:0,min:0,max:3,step:1,overrides:{flux_dev:{all:{disabled:!0}},sd3_medium:{all:{disabled:!0}},sd3_large:{all:{disabled:!0}}}},{name:"clipSkip",label:"Clip Skip",hint:'Determines which layer\'s vector output will be used. There are 12 layers, and setting the skip will select "xth from the end" of the total layers. For anime, we use 2. For everything else, 1.',type:"int",default:1,min:1,max:4,step:1,overrides:{anime:{all:{default:2}},flux_dev:{"x-flux":{disabled:!0,default:0,min:0,max:0}}}},{name:"flipAugmentation",label:"Flip Augmentation",hint:"If this option is turned on, the image will be horizontally flipped randomly. It can learn left and right angles, which is useful when you want to learn symmetrical people and objects.",type:"bool",default:!1,overrides:{flux_dev:{"x-flux":{disabled:!0}}}},{name:"unetLR",label:"Unet LR",hint:"Sets the learning rate for U-Net. This is the learning rate when performing additional learning on each attention block (and other blocks depending on the setting) in U-Net.",type:"number",default:5e-4,min:0,max:1,step:1e-5,overrides:{flux_dev:{"x-flux":{default:5e-5}},sd3_medium:{all:{default:1e-5}},sd3_large:{all:{default:1e-5}}}},{name:"textEncoderLR",label:"Text Encoder LR",hint:"Sets the learning rate for the text encoder. The effect of additional training on text encoders affects the entire U-Net.",type:"number",default:5e-5,min:0,max:1,step:1e-5,overrides:{anime:{all:{default:1e-4}},flux_dev:{all:{disabled:!0,default:0,max:0}},sd3_medium:{all:{disabled:!0,default:0,max:0}},sd3_large:{all:{disabled:!0,default:0,max:0}}}},{name:"lrScheduler",label:"LR Scheduler",hint:"You can change the learning rate in the middle of learning. A scheduler is a setting for how to change the learning rate.",type:"select",default:"cosine_with_restarts",options:i.Mg,overrides:{pony:{all:{default:"cosine"}},flux_dev:{"x-flux":{default:"cosine",disabled:!0}}}},{name:"lrSchedulerNumCycles",label:"LR Scheduler Cycles",hint:'This option specifies how many cycles the scheduler runs during training. It is only used when "cosine_with_restarts" or "polynomial" is used as the scheduler.',type:"int",default:3,min:1,max:4,step:1,overrides:{flux_dev:{"x-flux":{disabled:!0,default:0,min:0,max:0}}}},{name:"minSnrGamma",label:"Min SNR Gamma",hint:(0,n.jsxs)(n.Fragment,{children:["Learning is performed by putting noise of various strengths on the training image, but depending on the difference in strength of the noise on which it is placed, learning will be stable by moving closer to or farther from the learning target.",(0,n.jsx)("br",{}),"Min SNR gamma was introduced to compensate for that. When learning images have little noise, it may deviate greatly from the target, so try to suppress this jump."]}),type:"int",default:5,min:0,max:20,step:1,overrides:{pony:{all:{default:0}},flux_dev:{"x-flux":{disabled:!0,default:0,max:0}}}},{name:"networkDim",label:"Network Dim",hint:"The larger the Dim setting, the more learning information can be stored, but the possibility of learning unnecessary information other than the learning target increases. A larger Dim also increases LoRA file size.",type:"int",default:32,min:1,max:128,step:1,overrides:{sdxl:{all:{max:256}},pony:{all:{max:256}},illustrious:{all:{max:256}},anime:{all:{default:16}},flux_dev:{"x-flux":{default:16},kohya:{default:2}},sd3_medium:{all:{default:2}},sd3_large:{all:{default:2}}}},{name:"networkAlpha",label:"Network Alpha",hint:(0,n.jsxs)(n.Fragment,{children:["The smaller the Network alpha value, the larger the stored LoRA neural net weights. For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5, meaning that the learning rate is only half as powerful as the Learning Rate setting.",(0,n.jsx)("br",{}),"If Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate."]}),type:"int",default:16,min:1,max:128,step:1,overrides:{sdxl:{all:{max:256}},pony:{all:{max:256,default:32}},illustrious:{all:{max:256}},anime:{all:{default:8}},flux_dev:{"x-flux":{disabled:!0,default:1,min:1,max:1}}}},{name:"noiseOffset",label:"Noise Offset",hint:"Adds noise to training images. 0 adds no noise at all. A value of 1 adds strong noise.",type:"number",default:.1,min:0,max:1,step:.01,overrides:{pony:{all:{default:.03}},flux_dev:{"x-flux":{disabled:!0,default:0,min:0,max:0}}}},{name:"optimizerType",label:"Optimizer",hint:(0,n.jsxs)(n.Fragment,{children:['The optimizer determines how to update the neural net weights during training. Various methods have been proposed for smart learning, but the most commonly used in LoRA learning is "AdamW8bit", or "Adafactor" for SDXL.',(0,n.jsx)("br",{}),"We will automatically generate the proper optimizer args depending on your choice."]}),type:"select",default:"AdamW8Bit",options:i.Gc,overrides:{sdxl:{all:{default:"Adafactor"}},pony:{all:{default:"Prodigy"}},illustrious:{all:{default:"Adafactor"}},flux_dev:{"x-flux":{disabled:!0}}}},{name:"optimizerArgs",label:"Optimizer Args",hint:"Additional arguments can be passed to control the behavior of the selected optimizer. This is set automatically.",type:"string",default:o.AdamW8Bit,disabled:!0,overrides:{sdxl:{all:{default:o.Adafactor}},pony:{all:{default:o.Prodigy}},illustrious:{all:{default:o.Adafactor}},flux_dev:{kohya:{default:a.AdamW8Bit.kohya},"x-flux":{default:a.AdamW8Bit["x-flux"]}}}}]},58192:function(e,t,r){"use strict";r.d(t,{I:function(){return s}});var n=r(85893),i=r(67294),o=r(90512),a=r(79543);let s=(0,i.forwardRef)((e,t)=>{let{children:r,className:i,direction:s="col",href:l,...c}=e;return l?(0,n.jsx)(a.p,{ref:t,href:l,className:(0,o.Z)("relative flex overflow-hidden rounded-md border-gray-3 bg-gray-0 shadow-gray-4 dark:border-dark-4 dark:bg-dark-6 dark:shadow-dark-8","col"===s?"flex-col":"",i),...c,children:r}):(0,n.jsx)("div",{ref:t,className:(0,o.Z)("relative flex overflow-hidden rounded-md border-gray-3 bg-gray-0 shadow-gray-4 dark:border-dark-4 dark:bg-dark-6 dark:shadow-dark-8","col"===s?"flex-col":"",i),...c,children:r})});s.displayName="TwCard"},97693:function(e,t,r){"use strict";r.d(t,{A:function(){return d}});var n=r(85893),i=r(67294),o=r(90512),a=r(14237),s=r.n(a),l=r(88473),c=r.n(l);function u(e){let{cosmetic:t}=e,{lights:r,color:i,brightness:o}=null!=t?t:{};return r?(0,n.jsx)("div",{className:"".concat(c().light," ").concat(i?c()[i]:""," ").concat(o?c()["brightness-"+100*o]:""),children:Array(r).fill(0).map((e,t)=>(0,n.jsx)("span",{},t))}):null}function d(e){let{children:t,className:r,cosmetic:a,style:l,...c}=e,d=(0,i.useRef)();if(!a||!Object.keys(a).length)return t;let{cssFrame:f,texture:p,border:h,borderWidth:m,glow:g,type:v}=a;return d.current={},(null==p?void 0:p.url)&&(d.current["--bgImage"]=null==p?void 0:p.url),f&&(d.current["--bgGradient"]=null==f?void 0:f.replace(";","")),(null==p?void 0:p.size)&&(d.current["--bgSize"]="".concat(p.size.width,"px ").concat(p.size.height,"px, cover")),h&&(d.current["--border"]=h,d.current["--borderWidth"]="".concat(null!=m?m:1,"px")),(0,n.jsxs)("div",{style:{...d.current,...l},className:(0,o.Z)(s().wrapper,{[s().border]:h,[s().cssFrame]:f,[s().texture]:p,[s().glow]:g&&!h},r),...c,children:[(0,n.jsx)(u,{cosmetic:a}),t]})}},54870:function(e,t,r){"use strict";r.d(t,{a:function(){return f}});var n=r(85893),i=r(64761),o=r(71232),a=r(20966),s=r(95117),l=r(88393),c=r(91429),u=r(88182),d=r(38498);function f(e){var t,r;let{iconSize:f=20,textSize:p="md",withTooltip:h,withAbbreviation:m=!0,accountId:g,accountType:v,...y}=e,{balance:b,balanceLoading:x}=(0,c.dw)(g,v),w=null!==(r=null===(t=d.tQ.BUZZ.themes)||void 0===t?void 0:t[null!=v?v:""])&&void 0!==r?r:d.tQ.BUZZ,S=w.icon,k=(0,i.rZ)(),j=x?(0,n.jsxs)(o.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(S,{size:f,color:w.color(k),fill:w.color(k)}),(0,n.jsx)(a.a,{color:w.color(k),variant:"dots",size:"xs"})]}):(0,n.jsx)(s.x,{color:w.color(k),transform:"uppercase",...y,children:(0,n.jsxs)(o.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(S,{size:f,color:"currentColor",fill:"currentColor"}),(0,n.jsx)(s.x,{size:p,weight:600,lh:0,sx:{fontVariantNumeric:"tabular-nums"},children:null===b?(0,n.jsx)(a.a,{size:"sm",variant:"dots",color:w.color(k)}):m?(0,u.dm)(b,{floor:!0}):b.toLocaleString()})]})});return h?(0,n.jsx)(l.u,{label:"Total balance: ".concat(null===b?"(Loading...)":b.toLocaleString()),children:j}):j}},9749:function(e,t,r){"use strict";r.d(t,{R:function(){return c},m:function(){return u}});var n=r(85893),i=r(95117),o=r(71232),a=r(88393);r(67294);var s=r(28075);let l={xs:16,sm:20,md:24,lg:28,xl:32};function c(e){var t,r;let{username:a,deletedAt:s,cosmetics:c=[],size:d="sm",inherit:f=!1,badgeSize:p}=e;if(s)return(0,n.jsx)(i.x,{size:d,children:"[deleted]"});let h=null==c?void 0:null===(t=c.find(e=>{let{cosmetic:t}=e;return t?"NamePlate"===t.type:void 0}))||void 0===t?void 0:t.cosmetic,m=null==c?void 0:null===(r=c.find(e=>{let{cosmetic:t}=e;return t?"Badge"===t.type:void 0}))||void 0===r?void 0:r.cosmetic,g=null==h?void 0:h.data;return null!=p||(p=l[d]),(0,n.jsxs)(o.Z,{spacing:8,noWrap:!0,align:"center",children:[(0,n.jsx)(i.x,{size:d,weight:500,lineClamp:1,sx:e=>({verticalAlign:"middle",filter:"dark"===e.colorScheme?"drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.8))":"drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2))"}),inherit:f,...g,children:a}),(0,n.jsx)(u,{badge:m,badgeSize:p})]})}let u=e=>{let{badge:t,badgeSize:r,zIndex:i}=e;if(!(null==t?void 0:t.data.url)||0===r)return null;let o=Math.max(1,Math.round((null!=r?r:24)/24)),l="drop-shadow(".concat(o,"px ").concat(o,"px 1px rgba(0, 0, 0, 0.8))");return(0,n.jsx)(a.u,{color:"dark",label:(0,n.jsxs)("div",{style:{textAlign:"center",padding:4},children:[(0,n.jsx)("div",{children:t.name}),(0,n.jsx)("div",{style:{fontSize:"small",color:"gray"},children:t.description})]}),maw:300,multiline:!0,withArrow:!0,withinPortal:!0,children:t.data.animated?(0,n.jsx)("div",{style:{display:"flex",width:r,zIndex:i,filter:l},children:(0,n.jsx)(s.i,{src:t.data.url,alt:t.name})}):(0,n.jsx)("div",{style:{display:"flex",zIndex:i,filter:l},children:(0,n.jsx)(s.i,{src:t.data.url,alt:t.name,width:r})})})}},65297:function(e,t,r){"use strict";r.d(t,{K:function(){return C},Y:function(){return O}});var n=r(85893),i=r(64761),o=r(71232),a=r(20966),s=r(95117),l=r(14821),c=r(82623),u=r(99985),d=r(97564),f=r(236),p=r(70652),h=r(9749),m=r(80572),g=r(27943),v=r(72456),y=r(28075),b=r(54671),x=r(5779),w=r(79543),S=r(58456);let k={xs:{textSize:"xs",subTextSize:"xs"},sm:{textSize:"sm",subTextSize:"xs"},md:{textSize:"sm",subTextSize:"xs"},lg:{textSize:"md",subTextSize:"sm"},xl:{textSize:"lg",subTextSize:"sm"}},j=e=>{if("number"==typeof e)return e;switch(e){case"xs":return 16;case"sm":return 26;case"md":return 38;case"lg":return 56;case"xl":return 84;default:return 96}},E=(e,t)=>"number"==typeof e?e:"xl"===e?"50%":t.radius[e];function O(e){var t,r,w,O,I,P,A,T,z,N;let{user:R,withUsername:_,subText:M,subTextForce:D=!1,avatarProps:L,badge:F,size:U="sm",spacing:B=8,linkToProfile:H=!1,textSize:Z,subTextSize:W,includeAvatar:V=!0,radius:$="xl",avatarSize:q,userId:G,indicatorProps:K,badgeSize:X,withDecorations:J=!0,withOverlay:Y=!1}=e,Q=(0,i.rZ)(),{canViewNsfw:ee}=(0,x.g)(),et=(0,S.bT)(),{data:er,isInitialLoading:en}=v.SX.user.getById.useQuery({id:G},{enabled:!R&&!!G&&G>-1,cacheTime:1/0,staleTime:1/0}),ei=null!=R?R:{...er,cosmetics:[]},eo=(0,p.hs)(null==ei?void 0:ei.image,{width:"number"==typeof q?q:96});if(en)return(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(a.a,{size:"sm"}),(0,n.jsx)(s.x,{size:"sm",children:"Loading user..."})]});if(!ei||-1===ei.id)return null;let ea=!!ei.deletedAt;null!=Z||(Z=k[U].textSize),null!=W||(W=k[U].subTextSize);let es=j(null!==(A=null!==(P=null==L?void 0:L.size)&&void 0!==P?P:q)&&void 0!==A?A:U),el=E(null!==(T=null==L?void 0:L.radius)&&void 0!==T?T:$,Q),ec=null!==(z=null===(t=ei.profilePicture)||void 0===t?void 0:t.nsfwLevel)&&void 0!==z?z:0,eu=(null===(r=ei.profilePicture)||void 0===r?void 0:r.ingestion)==="Blocked"||(ee?ec>et:!(0,b._7)(ec)),ed="dark"===Q.colorScheme?"rgba(255,255,255,0.31)":"rgba(0,0,0,0.31)",ef=ei.profilePicture,ep=J&&ei&&!ei.deletedAt?null===(O=ei.cosmetics)||void 0===O?void 0:null===(w=O.find(e=>{var t;return(null===(t=e.cosmetic)||void 0===t?void 0:t.type)==="ProfileDecoration"}))||void 0===w?void 0:w.cosmetic:void 0;return(0,n.jsxs)(o.Z,{align:"center",sx:Y?{padding:"0 10px 0 0",backgroundColor:"rgba(0, 0, 0, 0.31)",borderRadius:"1000px"}:void 0,spacing:B,noWrap:!0,children:[V&&(0,n.jsx)(C,{user:ei,linkToProfile:H,children:(0,n.jsxs)(l.z,{...K,position:"bottom-end",offset:7,size:16,disabled:!K,withBorder:!0,children:[ep&&ep.data.url&&(0,n.jsx)(y.i,{src:ep.data.url,type:"image",name:"user avatar decoration",style:{position:"absolute",top:"50%",left:"50%",maxWidth:"none",transform:"translate(-50%,-50%)",width:ep.data.offset?"calc(100% + ".concat(ep.data.offset,")"):"100%",height:ep.data.offset?"calc(100% + ".concat(ep.data.offset,")"):"100%",zIndex:1}}),(null===(I=ei.profilePicture)||void 0===I?void 0:I.id)&&!eu&&!ea?(0,n.jsx)(c.X,{w:es,h:es,style:{overflow:"hidden",position:"relative",backgroundColor:ed,borderRadius:el},children:ef&&ei.id?(0,n.jsx)(m.W,{id:ei.id,username:ei.username,image:ef}):(0,n.jsx)(s.x,{size:Z,children:ei.username?(0,g.Qm)(ei.username):(0,n.jsx)(f.Z,{size:es})})}):(0,n.jsx)(u.q,{src:!ei.image||eu||ea?void 0:eo,alt:ei.username&&!ea?"".concat(ei.username,"'s Avatar"):void 0,radius:$||"xl",size:null!=q?q:U,imageProps:{loading:"lazy"},sx:{backgroundColor:ed},...L,children:ei.username&&!ea?(0,g.Qm)(ei.username):null})]})}),_||M?(0,n.jsxs)(d.K,{spacing:0,align:"flex-start",children:[_&&(0,n.jsx)(C,{user:ei,linkToProfile:H,children:(0,n.jsxs)(o.Z,{spacing:4,align:"center",children:[(0,n.jsx)(h.R,{username:ei.username,deletedAt:ei.deletedAt,cosmetics:null!==(N=ei.cosmetics)&&void 0!==N?N:[],size:Z,badgeSize:X}),F]})}),M&&("string"==typeof M||D)?(0,n.jsx)(s.x,{size:W,color:"dimmed",my:-2,lineClamp:1,children:M}):M]}):null]})}let C=e=>{let{children:t,user:r,linkToProfile:i}=e;if(!r||!i||r.deletedAt)return(0,n.jsx)(n.Fragment,{children:t});let o="/user/".concat(r.username);return r.username||(o+="?id=".concat(r.id)),(0,n.jsx)(w.p,{href:o,onClick:e=>e.stopPropagation(),children:t})}},80572:function(e,t,r){"use strict";r.d(t,{W:function(){return f}});var n=r(85893),i=r(9094),o=r(49834),a=r(97118),s=r(71033),l=r(28075),c=r(49987),u=r(65521),d=r(17578);function f(e){let{id:t,image:r,username:f}=e,p=(0,d.xJ)(),h=(null==p?void 0:p.id)===t;return(0,n.jsx)(c.kL,{image:r,explain:!1,children:e=>{var t;return(0,n.jsx)(n.Fragment,{children:h||e?(0,n.jsx)(l.i,{src:r.url,width:450,name:null!==(t=r.name)&&void 0!==t?t:r.id.toString(),alt:f?"".concat(f,"'s Avatar"):void 0,type:r.type,loading:"lazy",wrapperProps:{style:{width:"100%",height:"100%"}},contain:!0,style:{objectFit:"cover",minHeight:"100%"}}):(0,n.jsxs)(i.M,{h:"100%",className:"relative",children:[(0,n.jsx)(c.kL.BlurToggle,{children:t=>(0,n.jsx)(o.A,{color:"red",radius:"xl",sx:e=>({backgroundColor:e.fn.rgba(e.colors.red[9],.6),color:"white",backdropFilter:"blur(7px)",boxShadow:"1px 2px 3px -1px rgba(37,38,43,0.2)",zIndex:10}),onClick:t,children:e?(0,n.jsx)(a.Z,{size:14,strokeWidth:2.5}):(0,n.jsx)(s.Z,{size:14,strokeWidth:2.5})})}),(0,n.jsx)(u.R,{...r})]})})}})}},87699:function(e,t,r){"use strict";r.d(t,{B:function(){return b}});var n=r(85893),i=r(34736),o=r(95117),a=r(88393),s=r(236),l=r(11163),c=r(58456),u=r(28075),d=r(80572),f=r(5779),p=r(54671),h=r(7379),m=r(27943),g=r(41516),v=r.n(g),y=r(15131);function b(e){var t,r,g;let{id:b,profilePicture:x,username:w,deletedAt:S,cosmetics:k,autoplayAnimations:j}=e,{canViewNsfw:E}=(0,f.g)(),O=(0,c.bT)(),C=!S&&x&&"Blocked"!==x.ingestion,I=(0,l.useRouter)(),P=(0,y.s7)(e=>e.autoplayGifs);if(-1===b)return null;let A=null==k?void 0:null===(t=k.find(e=>{let{cosmetic:t}=e;return t?"NamePlate"===t.type:void 0}))||void 0===t?void 0:t.cosmetic,T=null==k?void 0:null===(r=k.find(e=>{let{cosmetic:t}=e;return t?"Badge"===t.type:void 0}))||void 0===r?void 0:r.cosmetic,z=null==k?void 0:null===(g=k.find(e=>{let{cosmetic:t}=e;return t?"ProfileDecoration"===t.type:void 0}))||void 0===g?void 0:g.cosmetic,N=null==A?void 0:A.data,R=!!P&&!1!==j&&void 0;return(0,n.jsxs)(i.k,{onClick:()=>I.push(w?"/user/".concat(w):"/user?id=".concat(b)),className:"flex items-center gap-2",children:[C&&(0,n.jsxs)("div",{className:"relative ",children:[(0,n.jsx)("div",{className:"flex size-8 items-center justify-center overflow-hidden rounded-full bg-white/30 dark:bg-black/30",children:x&&(E?h.v.hasFlag(O,x.nsfwLevel):(0,p._7)(x.nsfwLevel))?(0,n.jsx)(d.W,{id:b,username:w,image:x}):(0,n.jsx)("span",{className:"text-sm font-semibold text-dark-8 dark:text-gray-0",children:w?(0,m.Qm)(w):(0,n.jsx)(s.Z,{size:32})})}),z&&z.data.url&&(0,n.jsx)(u.i,{src:z.data.url,anim:R,original:!1!==R&&void 0,type:"image",name:"user avatar decoration",className:"absolute left-1/2 top-1/2 z-[2] -translate-x-1/2 -translate-y-1/2",style:{maxWidth:"none",width:z.data.offset?"calc(100% + ".concat(z.data.offset,")"):"100%",height:z.data.offset?"calc(100% + ".concat(z.data.offset,")"):"100%"}})]}),S?(0,n.jsx)(o.x,{size:"sm",children:"[deleted]"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.x,{size:"sm",weight:500,lineClamp:1,color:"white",className:v().username,...N,children:w}),(null==T?void 0:T.data.url)&&(0,n.jsx)(a.u,{color:"dark",label:T.name,withArrow:!0,withinPortal:!0,children:(0,n.jsx)("div",{style:{display:"flex",width:28},children:(0,n.jsx)(u.i,{src:T.data.url,anim:T.data.animated&&R,original:(!T.data.animated||!1!==R)&&void 0,alt:T.name})})})]})]})}},62475:function(e,t,r){"use strict";r.d(t,{q:function(){return k},P:function(){return E}});var n=r(85893),i=r(64761),o=r(71232),a=r(17789),s=r(95117),l=r(88393),c=r(64523),u=r(42362),d=r(58937),f=r(14102),p=(0,r(21955).Z)("outline","checks","IconChecks",[["path",{d:"M7 12l5 5l10 -10",key:"svg-0"}],["path",{d:"M2 12l5 5m5 -5l5 -5",key:"svg-1"}]]),h=r(14408),m=r(90693),g=r(67614),v=r(88182),y=r(97564);function b(e){let{value:t,label:r}=e,i="string"==typeof t?(0,n.jsx)(s.x,{size:"xs",children:t}):"number"==typeof t||void 0===t?(0,n.jsx)(s.x,{size:"xs",children:(0,v.x6)(null!=t?t:0)}):t;return(0,n.jsxs)(y.K,{spacing:0,align:"center",w:"100%",children:[(0,n.jsx)(s.x,{sx:{borderBottom:"1px solid rgba(255,255,255,0.2)"},size:"xs",color:"dimmed",mb:4,mt:-5,mx:-8,px:5,pb:2,weight:500,children:r}),i]})}var x=r(40099),w=r(25675),S=r.n(w);function k(e){var t,r,l,c,h,m;let{followers:y,favorites:w,uploads:S,downloads:k,answers:j,username:E,colorOverrides:O}=e,C=(0,i.rZ)();return(0,n.jsx)(o.Z,{spacing:8,position:"apart",children:(0,n.jsx)(a.C,{size:"lg",radius:"xl",px:8,color:"dark",sx:O?{backgroundColor:null!==(t=O.backgroundColor)&&void 0!==t?t:void 0}:void 0,variant:"dark"===C.colorScheme?"filled":"light",children:(0,n.jsxs)(o.Z,{spacing:"xs",noWrap:!0,children:[null!=S?(0,n.jsx)(g.G,{p:0,tooltip:(0,n.jsx)(b,{label:"Uploads",value:S}),icon:(0,n.jsx)(u.Z,{size:14}),sx:O?{color:null!==(r=O.textColor)&&void 0!==r?r:C.colors.gray[0]}:void 0,size:"lg",variant:"transparent",children:(0,n.jsx)(s.x,{size:"xs",weight:600,inline:!0,children:(0,v.dm)(S)})}):null,null!=y?(0,n.jsx)(g.G,{p:0,tooltip:(0,n.jsx)(b,{label:"Followers",value:y}),href:E?"/user/".concat(E,"/followers"):void 0,icon:(0,n.jsx)(d.Z,{size:14}),sx:O?{color:null!==(l=O.textColor)&&void 0!==l?l:C.colors.gray[0]}:void 0,size:"lg",variant:"transparent",children:(0,n.jsx)(s.x,{size:"xs",weight:600,inline:!0,children:(0,v.dm)(y)})}):null,null!=w?(0,n.jsx)(g.G,{p:0,tooltip:(0,n.jsx)(b,{label:"Likes",value:w}),icon:(0,n.jsx)(x.l,{size:14}),sx:O?{color:null!==(c=O.textColor)&&void 0!==c?c:C.colors.gray[0]}:void 0,variant:"transparent",size:"lg",children:(0,n.jsx)(s.x,{size:"xs",weight:600,inline:!0,children:(0,v.dm)(w)})}):null,null!=k?(0,n.jsx)(g.G,{p:0,tooltip:(0,n.jsx)(b,{label:"Downloads",value:k}),icon:(0,n.jsx)(f.Z,{size:14}),sx:O?{color:null!==(h=O.textColor)&&void 0!==h?h:C.colors.gray[0]}:void 0,variant:"transparent",size:"lg",children:(0,n.jsx)(s.x,{size:"xs",weight:600,inline:!0,children:(0,v.dm)(k)})}):null,null!=j&&j>0?(0,n.jsx)(g.G,{p:0,tooltip:(0,n.jsx)(b,{label:"Answers",value:j}),icon:(0,n.jsx)(p,{size:14}),sx:O?{color:null!==(m=O.textColor)&&void 0!==m?m:C.colors.gray[0]}:void 0,variant:"transparent",size:"lg",children:(0,n.jsx)(s.x,{size:"xs",weight:600,inline:!0,children:(0,v.dm)(j)})}):null]})})})}let j=e=>{let{label:t,icon:r,value:i,size:a="md",textSize:u="xs",...d}=e;return(0,n.jsxs)(o.Z,{spacing:0,noWrap:!0,sx:{position:"relative"},children:[(0,n.jsx)(l.u,{label:t,children:(0,n.jsxs)(c.x,{pos:"relative",sx:{zIndex:2,overflow:"hidden"},h:32,children:[(0,n.jsx)(S(),{src:"/images/base-badge.png",alt:"".concat(t," - ").concat(i),width:32,height:32}),(0,n.jsx)(c.x,{style:{top:"50%",left:"50%",position:"absolute",transform:"translate(-50%, -50%)"},children:r})]})}),(0,n.jsx)(g.G,{size:a,color:"dark.6",variant:"filled",sx:{paddingLeft:16,marginLeft:-14,borderTopLeftRadius:0,borderBottomLeftRadius:0},...d,children:(0,n.jsx)(s.x,{size:u,inline:!0,title:(0,v.x6)(null!=i?i:0),children:(0,v.dm)(null!=i?i:0)})})]})};function E(e){let{followers:t,favorites:r,uploads:i,downloads:a,generations:s,answers:l,reactions:c}=e;return(0,n.jsxs)(o.Z,{spacing:4,noWrap:!0,children:[null!=i?(0,n.jsx)(j,{icon:(0,n.jsx)(u.Z,{size:18,color:"white"}),label:"Uploads",value:i}):null,null!=c?(0,n.jsx)(j,{icon:(0,n.jsx)(h.Z,{size:18,color:"white"}),label:"Reactions",value:c}):null,null!=t?(0,n.jsx)(j,{icon:(0,n.jsx)(d.Z,{size:18,color:"white"}),label:"Followers",value:t}):null,null!=r?(0,n.jsx)(j,{icon:(0,n.jsx)(x.l,{size:18,color:"white"}),label:"Likes",value:r}):null,null!=a?(0,n.jsx)(j,{icon:(0,n.jsx)(f.Z,{size:18,color:"white"}),label:"Downloads",value:a}):null,null!=s?(0,n.jsx)(j,{icon:(0,n.jsx)(m.Z,{size:18,color:"white"}),label:"Generations",value:s}):null,null!=l&&l>0?(0,n.jsx)(j,{icon:(0,n.jsx)(p,{size:18,color:"white"}),label:"Answers",value:l}):null]})}},70663:function(e,t,r){"use strict";r.d(t,{H:function(){return o}});var n=r(85893),i=r(64523);let o=e=>{let{videoId:t,autoPlay:r,sx:o,...a}=e;return(0,n.jsx)(i.x,{...a,sx:{overflow:"hidden",position:"relative",height:0,paddingBottom:"56.25%",iframe:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}},children:(0,n.jsx)("iframe",{width:"853",height:"480",src:"https://www.youtube.com/embed/".concat(t,"?autoplay=").concat(r?1:0),frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:"Embedded youtube"})})}},524:function(e,t,r){"use strict";r.d(t,{O:function(){return d}});var n=r(1604),i=r(92066),o=r(25291),a=r(8346),s=r(83454);n.z.object({DATABASE_URL:n.z.string().url(),DATABASE_REPLICA_URL:n.z.string().url(),DATABASE_REPLICA_LONG_URL:n.z.string().url().optional(),DATABASE_SSL:i.zc.booleanString.default(!0),NOTIFICATION_DB_URL:n.z.string().url(),NOTIFICATION_DB_REPLICA_URL:n.z.string().url(),DATABASE_CONNECTION_TIMEOUT:n.z.coerce.number().default(0),DATABASE_POOL_MAX:n.z.coerce.number().default(20),DATABASE_POOL_IDLE_TIMEOUT:n.z.coerce.number().default(3e4),DATABASE_READ_TIMEOUT:n.z.coerce.number().optional(),DATABASE_WRITE_TIMEOUT:n.z.coerce.number().optional(),REDIS_URL:n.z.string().url(),REDIS_URL_DIRECT:(0,o.o8)().default([]),REDIS_SYS_URL:n.z.string().url(),REDIS_TIMEOUT:n.z.preprocess(e=>e?parseInt(String(e)):5e3,n.z.number().optional()),NODE_ENV:n.z.enum(["development","test","production"]),NEXTAUTH_SECRET:n.z.string(),NEXTAUTH_URL:n.z.preprocess(e=>{var t;return null!==(t=s.env.VERCEL_URL)&&void 0!==t?t:e},s.env.VERCEL?n.z.string():n.z.string().url()),CLICKHOUSE_HOST:a.BB?n.z.string():n.z.string().optional(),CLICKHOUSE_USERNAME:a.BB?n.z.string():n.z.string().optional(),CLICKHOUSE_PASSWORD:a.BB?n.z.string():n.z.string().optional(),CLICKHOUSE_TRACKER_URL:n.z.string().url().optional(),DISCORD_CLIENT_ID:n.z.string(),DISCORD_CLIENT_SECRET:n.z.string(),DISCORD_BOT_TOKEN:n.z.string().optional(),DISCORD_GUILD_ID:n.z.string().optional(),GITHUB_CLIENT_ID:n.z.string(),GITHUB_CLIENT_SECRET:n.z.string(),GOOGLE_CLIENT_ID:n.z.string(),GOOGLE_CLIENT_SECRET:n.z.string(),REDDIT_CLIENT_ID:n.z.string(),REDDIT_CLIENT_SECRET:n.z.string(),EMAIL_HOST:n.z.string(),EMAIL_PORT:n.z.preprocess(e=>parseInt(String(e)),n.z.number()),EMAIL_SECURE:i.zc.booleanString,EMAIL_USER:n.z.string(),EMAIL_PASS:n.z.string(),EMAIL_FROM:n.z.string(),S3_UPLOAD_KEY:n.z.string(),S3_UPLOAD_SECRET:n.z.string(),S3_UPLOAD_REGION:n.z.string(),S3_UPLOAD_ENDPOINT:n.z.string().url(),S3_UPLOAD_BUCKET:n.z.string(),S3_IMAGE_UPLOAD_KEY:n.z.string().optional(),S3_IMAGE_UPLOAD_SECRET:n.z.string().optional(),S3_IMAGE_UPLOAD_REGION:n.z.string().optional(),S3_IMAGE_UPLOAD_ENDPOINT:n.z.string().url().optional(),S3_IMAGE_UPLOAD_BUCKET:n.z.string(),S3_IMAGE_UPLOAD_OVERRIDE:n.z.string().optional(),S3_IMAGE_UPLOAD_BUCKET_OLD:n.z.string().optional(),S3_IMAGE_CACHE_BUCKET:n.z.string().default(""),S3_IMAGE_CACHE_BUCKET_OLD:n.z.string().optional(),CF_ACCOUNT_ID:n.z.string().optional(),CF_IMAGES_TOKEN:n.z.string().optional(),CF_API_TOKEN:n.z.string().optional(),CF_ZONE_ID:n.z.string().optional(),JOB_TOKEN:n.z.string(),WEBHOOK_URL:n.z.string().url().optional(),WEBHOOK_TOKEN:n.z.string(),SCANNING_ENDPOINT:a.BB?n.z.string():n.z.string().optional(),SCANNING_TOKEN:n.z.string(),UNAUTHENTICATED_DOWNLOAD:i.zc.booleanString,UNAUTHENTICATED_LIST_NSFW:i.zc.booleanString,LOGGING:(0,o.o8)(),IMAGE_SCANNING_ENDPOINT:a.BB?n.z.string():n.z.string().optional(),IMAGE_SCANNING_CALLBACK:n.z.string().optional(),IMAGE_SCANNING_MODEL:n.z.string().optional(),IMAGE_SCANNING_RETRY_DELAY:n.z.coerce.number().default(5),DELIVERY_WORKER_ENDPOINT:n.z.string().optional(),DELIVERY_WORKER_TOKEN:n.z.string().optional(),TRPC_ORIGINS:(0,o.o8)().default([]),ORCHESTRATOR_ENDPOINT:a.BB?n.z.string().url():n.z.string().url().optional(),ORCHESTRATOR_MODE:n.z.string().default("dev"),ORCHESTRATOR_ACCESS_TOKEN:n.z.string().default(""),ORCHESTRATOR_EXPERIMENTAL:(0,o.rK)().default(!1),AXIOM_TOKEN:n.z.string().optional(),AXIOM_ORG_ID:n.z.string().optional(),AXIOM_DATASTREAM:n.z.string().optional(),SEARCH_HOST:n.z.string().url().optional(),SEARCH_API_KEY:n.z.string().optional(),METRICS_SEARCH_HOST:n.z.string().url().optional(),METRICS_SEARCH_API_KEY:n.z.string().optional(),PODNAME:n.z.string().optional(),FEATUREBASE_JWT_SECRET:n.z.string().optional(),INTEGRATION_TOKEN:n.z.string().optional(),FEATUREBASE_URL:n.z.string().url().optional(),NEWSLETTER_ID:n.z.string().optional(),NEWSLETTER_KEY:n.z.string().optional(),BUZZ_ENDPOINT:a.BB?n.z.string().url():n.z.string().url().optional(),SIGNALS_ENDPOINT:a.BB?n.z.string().url():n.z.string().url().optional(),CACHE_DNS:i.zc.booleanString,MINOR_FALLBACK_SYSTEM:i.zc.booleanString,CSAM_UPLOAD_KEY:n.z.string().default(""),CSAM_UPLOAD_SECRET:n.z.string().default(""),CSAM_BUCKET_NAME:n.z.string().default(""),CSAM_UPLOAD_REGION:n.z.string().default(""),CSAM_UPLOAD_ENDPOINT:n.z.string().default(""),NCMEC_URL:n.z.string().optional(),NCMEC_USERNAME:n.z.string().optional(),NCMEC_PASSWORD:n.z.string().optional(),RESOURCE_RECOMMENDER_URL:n.z.string().url().optional(),DIRNAME:n.z.string().optional(),IMAGE_QUERY_CACHING:i.zc.booleanString,POST_QUERY_CACHING:i.zc.booleanString,EXTERNAL_MODERATION_ENDPOINT:n.z.string().url().optional(),EXTERNAL_MODERATION_TOKEN:n.z.string().optional(),EXTERNAL_MODERATION_CATEGORIES:(0,o.Ef)().optional(),EXTERNAL_MODERATION_THRESHOLD:n.z.coerce.number().optional().default(.5),BLOCKED_IMAGE_HASH_CHECK:i.zc.booleanString.optional().default(!1),EXTERNAL_IMAGE_SCANNER:n.z.enum(["hive","rekognition"]).optional().default("hive").catch("hive"),MINOR_SCANNER:n.z.enum(["custom","hive"]).optional().catch(void 0),HIVE_VISUAL_TOKEN:n.z.string().optional(),ALT_ORCHESTRATION_ENDPOINT:n.z.string().url().optional(),ALT_ORCHESTRATION_TOKEN:n.z.string().optional(),ALT_ORCHESTRATION_TIMEFRAME:n.z.preprocess(e=>{if("string"!=typeof e)return null;let[t,r]=e.split(",").map(e=>new Date(e));return{start:t,end:r}},n.z.object({start:n.z.date().optional(),end:n.z.date().optional()})).optional(),REPLICATION_LAG_DELAY:n.z.coerce.number().default(0),RECAPTCHA_PROJECT_ID:n.z.string(),AIR_WEBHOOK:n.z.string().url().optional(),AIR_PAYMENT_LINK_ID:n.z.string().optional(),PAYPAL_API_URL:n.z.string().url().optional(),PAYPAL_SECRET:n.z.string().optional(),PAYPAL_CLIENT_ID:n.z.string().optional(),S3_VAULT_BUCKET:n.z.string().optional(),HEALTHCHECK_TIMEOUT:n.z.coerce.number().optional().default(1500),FRESHDESK_JWT_SECRET:n.z.string().optional(),FRESHDESK_JWT_URL:n.z.string().optional(),FRESHDESK_DOMAIN:n.z.string().optional(),FRESHDESK_TOKEN:n.z.string().optional(),UPLOAD_PROHIBITED_EXTENSIONS:(0,o.o8)().optional(),POST_INTENT_DETAILS_HOSTS:n.z.preprocess(o.W7,n.z.array(n.z.string().url()).optional()),CHOPPED_TOKEN:n.z.string().optional(),FINGERPRINT_SECRET:n.z.string().length(64).optional(),FINGERPRINT_IV:n.z.string().length(32).optional(),TIER_METADATA_KEY:n.z.string().default("tier"),STRIPE_SECRET_KEY:n.z.string().optional(),STRIPE_WEBHOOK_SECRET:n.z.string().optional(),STRIPE_CONNECT_WEBHOOK_SECRET:n.z.string().optional(),STRIPE_DONATE_ID:n.z.string().optional(),PADDLE_SECRET_KEY:n.z.string().optional(),PADDLE_WEBHOOK_SECRET:n.z.string().optional(),CLOUDFLARE_TURNSTILE_SECRET:n.z.string().optional(),CF_INVISIBLE_TURNSTILE_SECRET:n.z.string().optional(),CF_MANAGED_TURNSTILE_SECRET:n.z.string().optional(),CONTENT_SCAN_ENDPOINT:a.BB?n.z.string():n.z.string().optional(),CONTENT_SCAN_CALLBACK_URL:n.z.string().optional(),CONTENT_SCAN_MODEL:n.z.string().optional(),TIPALTI_PAYER_NAME:n.z.string().optional(),TIPALTI_PAYEE_DASHBOARD_URL:n.z.string().optional(),TIPALTI_IFRAME_KEY:n.z.string().optional(),TIPALTI_WEBTOKEN_SECRET:n.z.string().optional(),TIPALTI_API_URL:n.z.string().optional(),TIPALTI_API_CLIENT_ID:n.z.string().optional(),TIPALTI_API_SECRET:n.z.string().optional(),TIPALTI_API_CODE_VERIFIER:n.z.string().optional(),TIPALTI_API_REFRESH_TOKEN:n.z.string().optional(),TIPALTI_API_TOKEN_URL:n.z.string().optional(),OPENAI_API_KEY:n.z.string().optional(),YOUTUBE_APP_CLIENT_ID:n.z.string().optional(),YOUTUBE_APP_CLIENT_SECRET:n.z.string().optional(),YOUTUBE_VIDEO_UPLOAD_URL:n.z.string().optional(),VIMEO_ACCESS_TOKEN:n.z.string().optional(),VIMEO_SECRET:n.z.string().optional(),VIMEO_CLIENT_ID:n.z.string().optional(),VIMEO_VIDEO_UPLOAD_URL:n.z.string().optional(),CREATOR_POOL_TAXES:n.z.coerce.number().optional(),CREATOR_POOL_PORTION:n.z.coerce.number().optional()});let l=n.z.object({NEXT_PUBLIC_CONTENT_DECTECTION_LOCATION:n.z.string().default(""),NEXT_PUBLIC_IMAGE_LOCATION:n.z.string().default(""),NEXT_PUBLIC_CIVITAI_LINK:a.BB?n.z.string().url():n.z.string().url().optional(),NEXT_PUBLIC_GIT_HASH:n.z.string().optional(),NEXT_PUBLIC_PICFINDER_WS_ENDPOINT:n.z.string().url().optional(),NEXT_PUBLIC_PICFINDER_API_KEY:n.z.string().optional(),NEXT_PUBLIC_SEARCH_HOST:n.z.string().url().optional(),NEXT_PUBLIC_SEARCH_CLIENT_KEY:n.z.string().optional(),NEXT_PUBLIC_SIGNALS_ENDPOINT:n.z.string().optional(),NEXT_PUBLIC_USER_LOOKUP_URL:n.z.string().optional(),NEXT_PUBLIC_MODEL_LOOKUP_URL:n.z.string().optional(),NEXT_PUBLIC_CHAT_LOOKUP_URL:n.z.string().optional(),NEXT_PUBLIC_POST_LOOKUP_URL:n.z.string().optional(),NEXT_PUBLIC_GPTT_UUID:n.z.string().optional(),NEXT_PUBLIC_BASE_URL:n.z.string().optional(),NEXT_PUBLIC_UI_HOMEPAGE_IMAGES:i.zc.booleanString.default(!0),NEXT_PUBLIC_LOG_TRPC:i.zc.booleanString.default(!1),NEXT_PUBLIC_RECAPTCHA_KEY:n.z.string().optional(),NEXT_PUBLIC_PAYPAL_CLIENT_ID:n.z.string().optional(),NEXT_PUBLIC_CHOPPED_ENDPOINT:n.z.string().url().optional(),NEXT_PUBLIC_SERVER_DOMAIN_GREEN:n.z.string().optional(),NEXT_PUBLIC_SERVER_DOMAIN_BLUE:n.z.string().optional(),NEXT_PUBLIC_SERVER_DOMAIN_RED:n.z.string().optional(),NEXT_PUBLIC_PADDLE_TOKEN:n.z.string().optional(),NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY:n.z.string().optional(),NEXT_PUBLIC_DEFAULT_PAYMENT_PROVIDER:n.z.enum(["Stripe","Paddle"]).default("Stripe"),NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITEKEY:n.z.string().optional(),NEXT_PUBLIC_CF_INVISIBLE_TURNSTILE_SITEKEY:n.z.string().optional(),NEXT_PUBLIC_CF_MANAGED_TURNSTILE_SITEKEY:n.z.string().optional()}),c={NEXT_PUBLIC_CONTENT_DECTECTION_LOCATION:"https://publicstore.civitai.com/content_detection/model.json",NEXT_PUBLIC_IMAGE_LOCATION:"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA",NEXT_PUBLIC_GIT_HASH:s.env.NEXT_PUBLIC_GIT_HASH,NEXT_PUBLIC_CIVITAI_LINK:"https://link.civitai.com",NEXT_PUBLIC_PICFINDER_WS_ENDPOINT:"wss://ws-api.diffusionmaster.com/v1/",NEXT_PUBLIC_PICFINDER_API_KEY:"N4DIhPIPlDMKICJtQ4ngEX5G8hArWnG8AIsPx4AJnJJjeOsSlGtuhnYcwkdohqP0TCb1HgZ1OzTudS9nX5OA7IN4C0ltGgJcIeJo",NEXT_PUBLIC_SEARCH_HOST:"https://meilisearch-v1-9.civitai.com",NEXT_PUBLIC_SEARCH_CLIENT_KEY:"274bfa4d6a925e901ff6867823bf01158c90eda527fd8a87a71b2022a3c85bd9",NEXT_PUBLIC_SIGNALS_ENDPOINT:"https://signals.civitai.com",NEXT_PUBLIC_USER_LOOKUP_URL:"https://civitai.retool.com/apps/8701da36-82ac-11ef-bb7f-fb62065c19cb/Production/User%20Lookup%20v2?userId=",NEXT_PUBLIC_MODEL_LOOKUP_URL:"https://civitai.retool.com/apps/1288409e-5177-11ee-9fa6-43a6fd96bf35/Production/Model%20History%20Lookup?modelId=",NEXT_PUBLIC_CHAT_LOOKUP_URL:"https://civitai.retool.com/apps/b7ed4d06-becb-11ee-ba05-bb226bd2d875/Development/Chat%20Audit?chatId=",NEXT_PUBLIC_POST_LOOKUP_URL:"https://civitai.retool.com/apps/57fd8fb4-51ac-11ee-a0dd-9f0a271c8c9b/Development/Bulk%20Image%20Manager?postId=",NEXT_PUBLIC_GPTT_UUID:"c29979b27574465bacf3e8ad901153f8",NEXT_PUBLIC_BASE_URL:"https://civitai.com",NEXT_PUBLIC_UI_HOMEPAGE_IMAGES:!1,NEXT_PUBLIC_LOG_TRPC:"false"!==s.env.NEXT_PUBLIC_LOG_TRPC,NEXT_PUBLIC_RECAPTCHA_KEY:"6Lcx-VApAAAAAPCvgMtVJagKUcyiRSw-rgqf89_T",NEXT_PUBLIC_PAYPAL_CLIENT_ID:s.env.NEXT_PUBLIC_PAYPAL_CLIENT_ID,NEXT_PUBLIC_CHOPPED_ENDPOINT:"https://chopped.civitai.com",NEXT_PUBLIC_SERVER_DOMAIN_GREEN:"civitai.green",NEXT_PUBLIC_SERVER_DOMAIN_BLUE:"civitai.com",NEXT_PUBLIC_SERVER_DOMAIN_RED:"civitai.red",NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY:"pk_live_51MZHdsLAn4if8jivSdtLXudmxfqUrdXTj8y2m54fS59DUwXhnF4vXUvzThwjLeX3L0UKL1NPJbFwPpkQWjHdV68l00HYViU8HB",NEXT_PUBLIC_PADDLE_TOKEN:"live_8b41c3a3f1584d6d278a4a0e535",NEXT_PUBLIC_DEFAULT_PAYMENT_PROVIDER:"Paddle",NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITEKEY:"0x4AAAAAAAiq5FOmSBHbHiqn",NEXT_PUBLIC_CF_INVISIBLE_TURNSTILE_SITEKEY:"0x4AAAAAAAiq5FOmSBHbHiqn",NEXT_PUBLIC_CF_MANAGED_TURNSTILE_SITEKEY:"0x4AAAAAAAjx6ONipgMtMbKO"},u=l.safeParse(c);if(!u.success)throw console.error("❌ Invalid environment variables:\n",...Object.entries(u.error.format()).map(e=>{let[t,r]=e;if(r&&"_errors"in r)return"".concat(t,": ").concat(r._errors.join(", "),"\n")}).filter(Boolean)),Error("Invalid environment variables");for(let e of Object.keys(u.data))if(!e.startsWith("NEXT_PUBLIC_"))throw console.warn("❌ Invalid public environment variable name: ".concat(e,". It must begin with 'NEXT_PUBLIC_'")),Error("Invalid public environment variable name");let d=u.data},8346:function(e,t,r){"use strict";r.d(t,{BB:function(){return i},Y8:function(){return o},r8:function(){return n}});let n=!1,i=!0,o=!1},49630:function(e,t,r){"use strict";r.d(t,{s9:function(){return a},HX:function(){return o},ZI:function(){return c},aU:function(){return u}});var n=r(67294),i=r(72456);let o=()=>{let{data:e,...t}=i.SX.hiddenPreferences.getHidden.useQuery(void 0,{trpc:{context:{skipBatch:!0}}});return{data:(0,n.useMemo)(()=>null!=e?e:{hiddenModels:[],hiddenImages:[],hiddenTags:[],hiddenUsers:[],blockedUsers:[],blockedByUsers:[]},[e]),...t}},a=()=>{let{data:e}=o();return e};var s=r(12902);let l={image:"hiddenImages",model:"hiddenModels",tag:"hiddenTags",user:"hiddenUsers",blockedUser:"blockedUsers"},c=()=>{let e=i.SX.useUtils(),t=u();return i.SX.hiddenPreferences.toggleHidden.useMutation({onMutate:async r=>{await e.hiddenPreferences.getHidden.cancel();let n=e.hiddenPreferences.getHidden.getData();return t(r),{previous:n}},onSuccess:(t,r)=>{let{added:n,removed:i}=t,{kind:o}=r,a=l[o];e.hiddenPreferences.getHidden.setData(void 0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{hiddenImages:[],hiddenModels:[],hiddenUsers:[],hiddenTags:[],blockedUsers:[],blockedByUsers:[]};return(0,s.ZP)(e,e=>{for(let{kind:t,id:r,...i}of n){let t=e[a].findIndex(e=>e.id===r&&e.hidden);-1===t?e[a].push({id:r,...i}):e[a][t]={id:r,...i}}for(let{kind:t,id:r,...n}of i){let t=e[a].findIndex(e=>e.id===r&&e.hidden);t>-1&&e[a].splice(t,1)}})})},onError:(t,r,n)=>{e.hiddenPreferences.getHidden.setData(void 0,null==n?void 0:n.previous)}})},u=()=>{let e=i.SX.useUtils();return t=>{let{kind:r,data:n,hidden:i}=t,o=l[r];e.hiddenPreferences.getHidden.setData(void 0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{hiddenImages:[],hiddenModels:[],hiddenUsers:[],hiddenTags:[],blockedUsers:[],blockedByUsers:[]};return(0,s.ZP)(e,e=>{for(let t of n){let r=e[o].findIndex(e=>e.id===t.id&&e.hidden);!0===i&&-1===r?e[o].push({...t,hidden:!0}):!1===i&&r>-1?e[o].splice(r,1):void 0===i&&(r>-1?e[o].splice(r,1):e[o].push({...t,hidden:!0}))}})})}}},57374:function(e,t,r){"use strict";r.d(t,{R:function(){return a}});var n=r(67294),i=r(8449);let o={progress:0,uploaded:0,size:0,speed:0,timeRemaining:0,status:"pending",abort:()=>void 0},a=()=>{let[e,t]=(0,n.useState)([]);return{uploadToCF:async function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=await (0,i.m7)(e);if(!n)throw Error();let a=encodeURIComponent(e.name),s=await fetch("/api/v1/image-upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:a,metadata:r})}),l=await s.json();if("error"in l)throw console.error(l.error),l.error;let{id:c,uploadURL:u}=l,d=new XMLHttpRequest;function f(r){t(t=>t.map(t=>t.file!==e?t:{...t,...r,url:c}))}return t(e=>[...e,{...o,...n,abort:d.abort.bind(d),url:c}]),await new Promise((t,r)=>{let n=Date.now();d.upload.addEventListener("loadstart",()=>{n=Date.now()}),d.upload.addEventListener("progress",e=>{let{loaded:t,total:r}=e,i=null!=t?t:0,o=null!=r?r:0;if(i){let e=i/((Date.now()-n)/1e3);f({uploaded:i,size:o,progress:o?i/o*100:0,timeRemaining:(o-i)/e,speed:e,status:"uploading"})}}),d.addEventListener("loadend",()=>{let e=4===d.readyState&&200===d.status;e&&f({status:"success"}),t(e)}),d.addEventListener("error",()=>{f({status:"error"}),r(!1)}),d.addEventListener("abort",()=>{f({status:"aborted"}),r(!1)}),d.open("PUT",u),d.send(e)}),{url:u.split("?")[0],id:c,objectUrl:n.objectUrl}},files:e,resetFiles:()=>{t([])},removeImage:e=>{t(t=>t.filter(t=>t.url!==e))}}}},17578:function(e,t,r){"use strict";r.d(t,{Pk:function(){return a},xJ:function(){return o}});var n=r(85891),i=r(49072);function o(){let e=(0,n.I)();return"authed"===e.type?e:null}function a(){let e=o();if(!e)throw new i.M_;return e}r(27943)},31483:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(56311);function i(e){let[t,r]=(0,n.YD)(e);return{ref:t,inView:r}}},97755:function(e,t,r){"use strict";var n=r(76705);t.Z=n.O},10169:function(e,t,r){"use strict";r.d(t,{d:function(){return i}});var n=r(72456);function i(){let{data:e,isLoading:t}=n.SX.system.getLiveNow.useQuery(void 0,{refetchInterval:3e5,refetchOnWindowFocus:!0,staleTime:3e5,trpc:{context:{skipBatch:!0}}});return!t&&e}},10558:function(e,t,r){"use strict";let n;r.d(t,{d:function(){return o},s:function(){return a}});var i=r(15067);function o(e){let{breakpoint:t="sm"}=e||{};return(0,i.D)({type:"max-width",width:t})}function a(){return void 0===n&&(n="ontouchstart"in window||navigator.maxTouchPoints>0),n}},72676:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});let n=r(67294).useLayoutEffect},74865:function(e,t,r){"use strict";let n;r.d(t,{y:function(){return s}});var i=r(67294);let o=new WeakMap,a=0,s=(e,t)=>{let r=(0,i.useRef)(null),{observeChildren:s}=null!=t?t:{},l=(0,i.useRef)(null);return l.current=e,(0,i.useEffect)(()=>{r.current&&!n&&(n=new ResizeObserver(e=>{e.length>0&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{for(let r of e){var t;for(let e of null!==(t=o.get(r.target))&&void 0!==t?t:[])e.current(r)}})}))},[]),(0,i.useEffect)(()=>{let e;let t=r.current,i=n;if(!t||!i)return;let c=s?[...t.children]:[t],u=e=>{for(let r of e){var t;let e=null!==(t=o.get(r))&&void 0!==t?t:[];i.observe(r),c.push(r),o.set(r,e.concat(l))}},d=e=>{for(let r of e){var t;let e=(null!==(t=o.get(r))&&void 0!==t?t:[]).filter(e=>e!==l),n=c.indexOf(r);n>-1&&c.splice(n,1),e.length?o.set(r,e):(i.unobserve(r),o.delete(r))}};return s?(u([...t.children]),(e=new MutationObserver(e=>{for(let t of e)d(t.removedNodes),u(t.addedNodes)})).observe(t,{childList:!0})):u([t]),()=>{s?(null==e||e.disconnect(),d(c)):d([t]),a&&cancelAnimationFrame(a)}},[s]),r}},30220:function(e,t,r){"use strict";r.d(t,{d:function(){return u}});var n=r(85893),i=r(67294),o=r(83156),a=r(32957),s=r(49072);let l=(0,i.forwardRef)((e,t)=>{let{onChange:r,...i}=e;return(0,n.jsx)("input",{onChange:e=>{var t,n;let i=Array.from(null!==(n=null===(t=e.target)||void 0===t?void 0:t.files)&&void 0!==n?n:[]);null==r||r(i,e)},...i,ref:t,type:"file"})}),c={progress:0,uploaded:0,size:0,speed:0,timeRemaining:0,status:"pending",abort:()=>void 0,name:"",url:""},u=function(){var e,t,r;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=(0,i.useRef)(),f=(0,i.useState)([]),p=(0,o.l)(),[h,m]=null!=p?p:f,g=null!==(e=u.endpoint)&&void 0!==e?e:"/api/upload",v=null!==(t=u.endpointComplete)&&void 0!==t?t:"/api/upload/complete",y=null!==(r=u.endpointComplete)&&void 0!==r?r:"/api/upload/abort";return{FileInput:e=>(0,n.jsx)(l,{...e,ref:d,style:{display:"none"}}),openFileDialog:()=>{if(d.current){var e;d.current.value="",null===(e=d.current)||void 0===e||e.click()}},uploadToS3:async function(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.AJ.Default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=encodeURIComponent(e.name),l=null!==(r=null==i?void 0:null===(t=i.endpoint)||void 0===t?void 0:t.request)&&void 0!==r?r:{headers:{},body:{}},{size:u,type:d}=e,f={filename:o,type:n,size:u,mimeType:d,...l.body},p={...l.headers,"Content-Type":"application/json"},h=await fetch(g,{method:"POST",headers:p,body:JSON.stringify(f)}),b=await h.json();if(b.error)throw console.error(b.error),b.error;{let t;let{bucket:r,key:i,uploadId:o,urls:a}=b,l=()=>{t&&t.abort()};function x(t){m(r=>r.map(r=>r.file!==e?r:{...r,...t}))}m(t=>[...t,{file:e,...c,abort:l}]);let d=Date.now(),f=0,h=t=>{let{loaded:r}=t,n=f+(null!=r?r:0);if(n){let t=n/((Date.now()-d)/1e3);x({progress:u?n/u*100:0,uploaded:n,size:u,speed:t,timeRemaining:(u-n)/t,status:"uploading",name:e.name})}},g=()=>fetch(y,{method:"POST",headers:p,body:JSON.stringify({bucket:r,key:i,type:n,uploadId:o})}),w=a.length,S=(r,n)=>new Promise((i,o)=>{let a;let s=(n-1)*104857600,l=n===w?e.slice(s):e.slice(s,104857600*n),c=new XMLHttpRequest;c.upload.addEventListener("progress",h),c.upload.addEventListener("loadend",e=>{let{loaded:t}=e;f+=t}),c.addEventListener("loadend",()=>{4===c.readyState&&200===c.status&&(k.push({ETag:a,PartNumber:n}),i("success"))}),c.addEventListener("load",()=>{var e;a=null!==(e=c.getResponseHeader("ETag"))&&void 0!==e?e:""}),c.addEventListener("error",()=>o("error")),c.addEventListener("abort",()=>o("aborted")),c.open("PUT",r),c.setRequestHeader("Content-Type","application/octet-stream"),c.send(l),t=c}),k=[];for(let{url:e,partNumber:t}of a){let n="pending",o=0;for(;o<3&&"error"===(n=await S(e,t));)o++,await new Promise(e=>setTimeout(e,5e3*o));if("success"!==n)return x({status:n,file:void 0}),await g(),{url:null,bucket:r,key:i}}return(await (0,s.Hk)(async e=>{let t=await fetch(v,{method:"POST",headers:p,body:JSON.stringify({bucket:r,key:i,type:n,uploadId:o,parts:k})});if(!t.ok&&e>0)throw Error("Failed to complete upload");return t},3,200)).ok?(x({status:"success"}),{url:a[0].url.split("?")[0],bucket:r,key:i,name:e.name,size:e.size}):(x({status:"error",file:void 0}),await g(),{url:null,bucket:r,key:i})}},files:h,resetFiles:()=>{m([])},removeFile:function(e,t){if(t){let t=h.find(t=>t.file===e);t&&t.abort()}m(t=>t.filter(t=>t.file!==e))}}}},80937:function(e,t,r){"use strict";r.d(t,{s:function(){return a}});var n=r(11163),i=r(67294),o=r(14619);function a(e){let{query:t,pathname:r,replace:a}=(0,n.useRouter)();return(0,i.useMemo)(()=>{let n=e.safeParse(t);return{query:n.success?n.data:{},replace:e=>{a({pathname:r,query:(0,o.HO)({...t,...e})},void 0,{shallow:!0,scroll:!1})}}},[t,r,a])}},25216:function(e,t,r){"use strict";r.d(t,{D:function(){return i},Ic:function(){return a},us:function(){return o}});var n=r(70917);(0,n.F4)({"0%":{transform:"translateX(48px)",animationTimingFunction:"ease-in",opacity:1},"24%":{opacity:1},"40%":{transform:"translateX(26px)",animationTimingFunction:"ease-in"},"65%":{transform:"translateX(13px)",animationTimingFunction:"ease-in"},"82%":{transform:"translateX(6.5px)",animationTimingFunction:"ease-in"},"93%":{transform:"translateX(4px)",animationTimingFunction:"ease-in"},"25%, 55%, 75%, 87%, 98%":{transform:"translateX(0px)",animationTimingFunction:"ease-out"},"100%":{transform:"translateX(0px)",animationTimingFunction:"ease-out",opacity:1}}),(0,n.F4)({from:{transform:"scale(1)",animationTimingFunction:"ease-out"},"10%":{transform:"scale(0.96)",animationTimingFunction:"ease-in"},"17%":{transform:"scale(0.98)",animationTimingFunction:"ease-out"},"33%":{transform:"scale(0.94)",animationTimingFunction:"ease-in"},"45%":{transform:"scale(1)",animationTimingFunction:"ease-out"}});let i=(0,n.F4)({"0%":{transform:"scale3d(1, 1, 1)"},"30%":{transform:"scale3d(0.75, 1.25, 1)"},"40%":{transform:"scale3d(1.25, 0.75, 1)"},"50%":{transform:"scale3d(0.85, 1.15, 1)"},"65%":{transform:"scale3d(1.05, 0.95, 1)"},"75%":{transform:"scale3d(0.95, 1.05, 1)"},"100%":{transform:"scale3d(1, 1, 1)"}}),o=(0,n.F4)({"0%":{transform:"translateY(-500px)",animationTimingFunction:"ease-in",opacity:"0"},"38%":{transform:"translateY(0)",animationTimingFunction:"ease-out",opacity:"1"},"55%":{transform:"translateY(-65px)",animationTimingFunction:"ease-in"},"72%":{transform:"translateY(0)",animationTimingFunction:"ease-out"},"81%":{transform:"translateY(-28px)",animationTimingFunction:"ease-in"},"90%":{transform:"translateY(0)",animationTimingFunction:"ease-out"},"95%":{transform:"translateY(-8px)",animationTimingFunction:"ease-in"},"100%":{transform:"translateY(0)",animationTimingFunction:"ease-out"}}),a=(0,n.F4)({"0%":{opacity:1},"100%":{opacity:0}})},39419:function(e,t,r){"use strict";r.d(t,{y$:function(){return d}});var n=r(85893),i=r(31194),o=r(20966),a=r(73723),s=r(54777),l=r(64523),c=r(5140),u=r(67294);function d(e){let{data:t=[],value:r,defaultValue:a,loading:s,onChange:l,parsePaste:c=!1,...d}=e,h=!t.length||("object"!=typeof t[0]?typeof t[0]:typeof t[0].value),m=t.map(e=>"string"==typeof e?e:{...e,value:String(e.value)}),g=(0,u.useMemo)(()=>r?null==r?void 0:r.map(String):void 0,[r]),v=(0,u.useMemo)(()=>a?null==a?void 0:a.map(String):void 0,[a]),y=e=>{let t="number"===h?e.map(Number):e;null==l||l(t)},b=e=>{y([...new Set([...null!=r?r:[],...e.split(/[\n,]/).map(e=>e.trim())])])};return(0,n.jsx)(p.Provider,{value:{limit:d.limit},children:(0,n.jsx)(i.NU,{data:m,value:g,onChange:y,onPaste:c?e=>{e.preventDefault(),e.stopPropagation(),b(e.clipboardData.getData("text"))}:void 0,dropdownComponent:d.searchable&&(!d.limit||d.limit>t.length)?void 0:f,defaultValue:v,...d,rightSection:s?(0,n.jsx)(o.a,{size:16}):null})})}let f=(0,u.forwardRef)((e,t)=>{var r,i,o,u;let{style:d,...f}=e,{limit:p}=h(),m=(null!==(u=null===(o=f.children)||void 0===o?void 0:null===(i=o.props)||void 0===i?void 0:null===(r=i.children)||void 0===r?void 0:r.props.data)&&void 0!==u?u:[]).length;return(0,n.jsxs)(a.x,{...f,style:{width:"100%",...d},viewportRef:t,children:[f.children,m==p&&(0,n.jsx)(s.i,{my:"xs",variant:"dashed",labelPosition:"center",label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{size:12}),(0,n.jsx)(l.x,{ml:5,children:"Search to show additional results"})]})})]})});f.displayName="OverflowScrollArea";let p=u.createContext({}),h=()=>u.useContext(p)},54163:function(e,t,r){"use strict";r.d(t,{N:function(){return d}});var n=r(85893),i=r(80971),o=r(59947),a=r(95117),s=r(80665),l=r(67294),c=r(88182),u=r(38498);let d=(0,l.forwardRef)((e,t)=>{let{format:r="delimited",clearable:d,onClear:f,onChange:p,value:h,currency:m=u._G.defaultCurrency,...g}=e,v=(0,l.useRef)(null),y=(0,s.Y)(t,v),b=()=>{var e;if(!v.current)return;let t=null===(e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))||void 0===e?void 0:e.set;null==t||t.call(v.current,"");let r=new Event("input",{bubbles:!0});v.current.dispatchEvent(r)};(0,l.useEffect)(()=>{(void 0===h||"number"!=typeof h)&&b()},[h]);let x=d&&("number"==typeof h||!!h),w=(0,n.jsx)(i.P,{radius:"xl",color:"gray",size:"xs",variant:"filled",mr:3,onClick:()=>{b(),null==f||f(),null==p||p(void 0)}}),{parser:S,formatter:k}=(0,l.useMemo)(()=>{switch(r){case"delimited":return{parser:e=>e&&e.replace(/\$\s?|(,*)/g,""),formatter:e=>(0,c.x6)(e)};case"currency":return{parser:e=>{if(!e)return"";let t=parseInt(e.replace(/\$\s?|(,*)/g,"").replace(".",""));return isNaN(t)?"":t.toString()},formatter:e=>{if(!e)return"";let t=parseInt(e);if(isNaN(t))return"";let[r,n]=(t/100).toFixed(2).split(".");return"".concat((0,c.x6)(r),".").concat(n)}};default:return{parser:void 0,formatter:void 0}}},[r]);return(0,n.jsx)(o.Y,{ref:y,parser:S,formatter:k,rightSection:"currency"===r?(0,n.jsx)(a.x,{size:"xs",children:m}):x?w:null,rightSectionWidth:"currency"===r?45:void 0,onChange:e=>{null==p||p(e)},value:h,...g})});d.displayName="NumberInputWrapper"},82173:function(e,t,r){"use strict";r.d(t,{l:function(){return d}});var n=r(85893),i=r(94151),o=r(71232),a=r(45050),s=r(59947),l=r(67294),c=r(53672),u=r(90512);function d(e){var t,r;let{value:d,onChange:p,min:h=0,max:m=100,step:g,precision:v,sliderProps:y,numberProps:b,reverse:x,presets:w,label:S,disabled:k,...j}=e,E=(0,l.useRef)(null),[O,C]=(0,l.useState)({focused:!1,value:d,changeEndValue:void 0,computedWidth:void 0,selectedPreset:null==d?void 0:d.toString()}),I=(0,l.useMemo)(()=>{var e;return null!=v?v:null==g?void 0:null===(e=g.toString().split(".")[1])||void 0===e?void 0:e.length},[v,g]);(0,l.useEffect)(()=>{O.focused||C(e=>({...e,value:d}))},[d,I,O.focused]),(0,l.useEffect)(()=>{(null==d?void 0:d.toString())!==O.selectedPreset&&C(e=>({...e,selectedPreset:null==d?void 0:d.toString()}))},[O.selectedPreset,d]),(0,l.useEffect)(()=>{O.changeEndValue&&(null==p||p(O.changeEndValue))},[O.changeEndValue]),(0,l.useEffect)(()=>{E.current&&C(e=>({...e,computedWidth:E.current?f(E.current,h,m,I):void 0}))},[h,m,I]);let P=w&&w.length>0;return(0,n.jsx)(i.I.Wrapper,{...j,label:P?(0,n.jsxs)(o.Z,{spacing:8,position:"apart",noWrap:!0,children:[S,(0,n.jsx)(c.p,{disabled:k,color:"blue",options:w,value:null==d?void 0:d.toString(),onChange:e=>{C(t=>({...t,selectedPreset:e})),null==p||p(Number(e))}})]}):S,className:(0,u.Z)("flex flex-col",j.className),styles:{label:P?{width:"100%",marginBottom:5}:void 0},children:(0,n.jsxs)("div",{className:(0,u.Z)("mt-1 flex items-center gap-2",{"flex-row-reverse":x}),children:[(0,n.jsx)(a.i,{...y,className:(0,u.Z)("flex-1",null==y?void 0:y.className),min:h,max:m,step:g,precision:I,value:O.value,onChange:e=>{C(t=>({...t,value:e,selectedPreset:null==e?void 0:e.toString()}))},onBlur:e=>{var t;C(e=>({...e,focused:!1})),null==y||null===(t=y.onBlur)||void 0===t||t.call(y,e)},onFocus:e=>{var t;C(e=>({...e,focused:!0})),null==y||null===(t=y.onFocus)||void 0===t||t.call(y,e)},label:e=>e&&I?e.toFixed(I):e,onChangeEnd:e=>C(t=>({...t,changeEndValue:e})),disabled:k}),(0,n.jsx)(s.Y,{ref:E,...b,className:(0,u.Z)("min-w-[60px] flex-[0]",null==b?void 0:b.className),style:{...null==b?void 0:b.style,minWidth:null!==(r=null==b?void 0:null===(t=b.style)||void 0===t?void 0:t.minWidth)&&void 0!==r?r:O.computedWidth},min:h,max:m,step:g,precision:I,value:O.value,onChange:e=>{C(t=>({...t,value:e,selectedPreset:null==e?void 0:e.toString()})),null==p||p(e)},onBlur:e=>{var t;C(e=>({...e,focused:!1})),null==b||null===(t=b.onBlur)||void 0===t||t.call(b,e)},onFocus:e=>{var t;C(e=>({...e,focused:!0})),null==b||null===(t=b.onFocus)||void 0===t||t.call(b,e)},disabled:k})]})})}let f=(e,t,r,n)=>{let i=[t,r].map(e=>n?e.toFixed(n):e.toString()).sort((e,t)=>t.length-e.length)[0],o=i.length;i.includes(".")&&(o-=.75);let a=getComputedStyle(e);return"calc(".concat(o,"ch + ").concat(a.paddingLeft," + ").concat(a.paddingRight," + ").concat(a.borderLeftWidth," + ").concat(a.borderRightWidth," + 6px)")}},53672:function(e,t,r){"use strict";r.d(t,{p:function(){return l}});var n=r(85893),i=r(67294),o=r(56817),a=r(64002);let s=(0,o.k)(e=>({label:{padding:8,fontWeight:590,lineHeight:1,fontSize:12,"&[data-checked]":{"&, &:hover":{color:"dark"===e.colorScheme?e.white:e.black,border:"1px solid ".concat(e.colors[e.primaryColor][e.fn.primaryShade()])},'&[data-variant="filled"]':{backgroundColor:e.fn.rgba(e.colors[e.primaryColor][e.fn.primaryShade()],.2)}}},iconWrapper:{display:"none"}}));function l(e){let{options:t,disabled:r,...o}=e,{classes:l}=s();return 0===t.length?null:(0,n.jsx)(a.A.Group,{...o,multiple:!1,spacing:4,children:t.map((e,t)=>{let{label:o,...s}=e;return(0,i.createElement)(a.A,{...s,key:t,classNames:l,radius:"sm",variant:"filled",disabled:r},(0,n.jsx)("span",{children:o}))})})}},93680:function(e,t,r){"use strict";r.d(t,{b:function(){return c}});var n=r(85893),i=r(28855),o=r(20966),a=r(71232),s=r(67294),l=r(53672);function c(e){let{data:t=[],value:r,defaultValue:c,loading:u,onChange:d,presets:f,label:p,disabled:h,...m}=e,g=t.length&&"object"==typeof t[0]?typeof t[0].value:typeof t[0],[v,y]=(0,s.useState)(null==r?void 0:r.toString());(0,s.useEffect)(()=>{(null==r?void 0:r.toString())!==v&&y(null==r?void 0:r.toString())},[r]);let b=t.map(e=>"string"==typeof e?e:{...e,value:String(e.value)}),x=(0,s.useMemo)(()=>null!=r?String(r):null,[r]),w=(0,s.useMemo)(()=>c?String(c):void 0,[c]),S=f&&f.length>0;return(0,n.jsx)(i.Ph,{data:b,value:x,onChange:e=>{let t="number"===g&&null!=e?Number(e):e;y(t),null==d||d(t)},defaultValue:w,rightSection:u?(0,n.jsx)(o.a,{size:16}):null,styles:{label:S?{width:"100%",marginBottom:5}:void 0},disabled:h,label:S?(0,n.jsxs)(a.Z,{spacing:8,position:"apart",noWrap:!0,children:[p,(0,n.jsx)(l.p,{disabled:h,color:"blue",options:f,value:v,onChange:e=>{y(e),null==d||d(e)}})]}):p,...m})}},41449:function(e,t,r){"use strict";r.d(t,{J:function(){return I}});var n=r(85893),i=r(64761),o=r(94151),a=r(82623),s=r(49737),l=r(88393),c=r(49834),u=r(64523),d=r(71232),f=r(95117),p=r(94155),h=r(37048),m=r(35818),g=r(94351),v=r(42362),y=r(38710),b=r(23693),x=r(77446),w=r(67294),S=r(28075),k=r(49987),j=r(57374),E=r(38498),O=r(72323),C=r(88182);function I(e){var t,r;let{value:I,onChange:P,maxSize:A=E._G.mediaUpload.maxImageFileSize,previewWidth:T=450,aspectRatio:z,children:N,previewDisabled:R,dropzoneProps:_,withNsfwLevel:M=!0,...D}=e,L=(0,i.rZ)(),{uploadToCF:F,files:U,resetFiles:B}=(0,j.R)(),H=U[0],[Z,W]=(0,w.useState)(),[V,$]=(0,w.useState)(""),q=async e=>{if(e.some(e=>e.size>A))return $("Files should not exceed ".concat((0,C.td)(A)));G(),$("");let[t]=e;await F(t)},G=()=>{W(void 0),null==P||P(null),B()};(0,w.useEffect)(()=>{let e="string"==typeof I?I.length>0?{url:I}:void 0:I;(0,x.Z)(Z,e)||W("string"==typeof I?I.length>0?{url:I}:void 0:I)},[Z,I]),(0,h.l)(()=>{H&&(W({url:H.url,objectUrl:H.objectUrl}),"success"===H.status&&(null==P||P(H)))},[H]);let[K]=U,X=K&&K.progress<100;return(0,n.jsxs)(o.I.Wrapper,{...D,error:null!==(t=D.error)&&void 0!==t?t:V,children:[X?(0,n.jsx)(a.X,{style:{position:"relative",marginTop:5,width:"100%",height:200},withBorder:!0,children:(0,n.jsx)(s.f,{visible:!0})}):!R&&Z?(0,n.jsxs)("div",{style:{position:"relative",width:"100%",marginTop:5},children:[(0,n.jsx)(l.u,{label:"Remove image",children:(0,n.jsx)(c.A,{size:"sm",variant:z?"filled":"light",color:"red",onClick:G,sx:e=>({position:"absolute",top:.4*e.spacing.xs,right:.4*e.spacing.xs,zIndex:1}),children:(0,n.jsx)(g.Z,{})})}),(0,n.jsxs)(u.x,{sx:e=>z?{position:"relative",width:"100%",overflow:"hidden",height:0,paddingBottom:"".concat((100*z).toFixed(3),"%"),borderRadius:e.radius.md,"& > img":{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"auto",objectFit:"cover",borderRadius:e.radius.md}}:{height:"calc(100vh / 3)",display:"flex",alignItems:"center",justifyContent:"center","& > img":{height:"100%",objectFit:"cover",borderRadius:e.radius.md}},children:[M&&!!I&&"string"!=typeof I&&(0,n.jsx)(k.SY,{browsingLevel:I.nsfwLevel,className:"absolute left-2 top-2 z-10"}),(0,n.jsx)(S.i,{src:null!==(r=Z.objectUrl)&&void 0!==r?r:Z.url,type:m.DD.image,width:T,style:{maxWidth:z?"100%":void 0},anim:!0})]})]}):(0,n.jsxs)(p.fh,{mt:5,styles:e=>({root:D.error||V?{borderColor:e.colors.red[6],marginBottom:e.spacing.xs/2}:void 0}),accept:O.d1,..._,onDrop:q,maxFiles:1,children:[(0,n.jsx)(p.fh.Accept,{children:(0,n.jsxs)(d.Z,{position:"center",spacing:"xs",children:[(0,n.jsx)(v.Z,{size:32,stroke:1.5,color:L.colors[L.primaryColor]["dark"===L.colorScheme?4:6]}),(0,n.jsx)(f.x,{color:"dimmed",children:"Drop image here"})]})}),(0,n.jsx)(p.fh.Reject,{children:(0,n.jsxs)(d.Z,{position:"center",spacing:"xs",children:[(0,n.jsx)(y.Z,{size:32,stroke:1.5,color:L.colors.red["dark"===L.colorScheme?4:6]}),(0,n.jsx)(f.x,{children:"File not accepted"})]})}),(0,n.jsx)(p.fh.Idle,{children:(0,n.jsxs)(d.Z,{position:"center",spacing:"xs",children:[(0,n.jsx)(b.Z,{size:32,stroke:1.5}),(0,n.jsx)(f.x,{color:"dimmed",children:"Drop image here, should not exceed ".concat((0,C.td)(A))})]})})]}),N]})}},86234:function(e,t,r){"use strict";r.d(t,{C:function(){return c}});var n=r(85893),i=r(80971),o=r(80061),a=r(71232),s=r(80665),l=r(67294);let c=(0,l.forwardRef)((e,t)=>{let{clearable:r=!0,rightSection:c,onClear:u,...d}=e,f=(0,l.useRef)(null),p=(0,s.Y)(t,f),h=d.value&&"hidden"!==d.type&&(0,n.jsx)(i.P,{variant:"transparent",tabIndex:-1,onClick:()=>{var e,t;let r=null===(e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))||void 0===e?void 0:e.set;null==r||r.call(f.current,"");let n=new Event("input",{bubbles:!0});null===(t=f.current)||void 0===t||t.dispatchEvent(n),null==u||u()}});return(0,n.jsx)(o.o,{ref:p,...d,rightSection:(r||c)&&"hidden"!==d.type&&(0,n.jsxs)(a.Z,{spacing:4,noWrap:!0,children:[r&&!d.disabled&&h,c]})})});c.displayName="ClearableTextInput"},61590:function(e,t,r){"use strict";r.d(t,{l:function(){return a}});var n=r(85893),i=r(67294),o=r(87536);function a(e,t){let r=(0,i.forwardRef)((r,i)=>{let{name:a,...s}=r,{control:l,...c}=(0,o.Gc)();return(0,n.jsx)(o.Qr,{control:l,name:a,render:r=>{var o,l,u,d,f;let{field:p,fieldState:h,formState:m}=r,g=null==t?void 0:t({field:p,fieldState:h,formState:m,props:s}),v={onChange:function(){for(var e,t=arguments.length,r=Array(t),n=0;n{var e;null===(e=s.onBlur)||void 0===e||e.call(s),p.onBlur()},placeholder:null!==(f=s.placeholder)&&void 0!==f?f:"string"==typeof s.label?s.label:void 0,...g};return(0,n.jsx)(e,{id:"input_".concat(a),ref:i,...s,...v,reset:c.resetCount,name:a})}})});return r.displayName="ControlledInput",r}},66214:function(e,t,r){"use strict";r.d(t,{l0:function(){return nY},hn:function(){return iy},o2:function(){return ih},Se:function(){return n6},eH:function(){return n8},_n:function(){return iu},YZ:function(){return iv},RB:function(){return ig},$x:function(){return n7},uN:function(){return ie},GE:function(){return il},q2:function(){return it},bX:function(){return n5},Rn:function(){return n0},MP:function(){return is},Bl:function(){return ir},Pb:function(){return id},ZN:function(){return n9},P2:function(){return n3},b1:function(){return im},Dr:function(){return n4},JD:function(){return n2},A1:function(){return ic},WE:function(){return ii},Ql:function(){return ip},md:function(){return io},oH:function(){return nQ},zg:function(){return n1},lJ:function(){return ia},ML:function(){return nJ},cI:function(){return iw}});var n=r(85893),i=r(60887),o=r(45587),a=r(94151),s=r(71232),l=r(95117),c=r(64523),u=r(97564),d=r(82623),f=r(49737),p=r(9094),h=r(17577),m=r(20966),g=r(6564),v=r(74403),y=r(49834),b=r(56817),x=r(94155),w=r(67294),S=Object.defineProperty,k=Object.defineProperties,j=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,I=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&I(e,r,t[r]);if(E)for(var r of E(t))C.call(t,r)&&I(e,r,t[r]);return e},A=(e,t)=>k(e,j(t));function T(e=[]){let[t,r]=(0,w.useState)(e);return[t,{setState:r,append:(...e)=>r(t=>[...t,...e]),prepend:(...e)=>r(t=>[...e,...t]),insert:(e,...t)=>r(r=>[...r.slice(0,e),...t,...r.slice(e)]),pop:()=>r(e=>{let t=[...e];return t.pop(),t}),shift:()=>r(e=>{let t=[...e];return t.shift(),t}),apply:e=>r(t=>t.map((t,r)=>e(t,r))),applyWhere:(e,t)=>r(r=>r.map((r,n)=>e(r,n)?t(r,n):r)),remove:(...e)=>r(t=>t.filter((t,r)=>!e.includes(r))),reorder:({from:e,to:t})=>r(r=>{let n=[...r],i=r[e];return n.splice(e,1),n.splice(t,0,i),n}),setItem:(e,t)=>r(r=>{let n=[...r];return n[e]=t,n}),setItemProp:(e,t,n)=>r(r=>{let i=[...r];return i[e]=A(P({},i[e]),{[t]:n}),i}),filter:e=>{r(t=>t.filter(e))}}]}var z=r(37048),N=r(42362),R=r(38710),_=r(23693),M=r(35744),D=r(13309),L=r(94351),F=r(12902),U=r(30295),B=r(40633),H=r(67084),Z=r(28075),W=r(24285),V=r(74943),$=r(47653),q=r(35818);let G=(0,w.forwardRef)((e,t)=>{var r;let{image:i,children:a,isPrimary:c,disabled:f,id:m,...g}=e,{classes:b,cx:x}=K({isPrimary:c}),[S,k]=(0,w.useState)(!1),{attributes:j,listeners:E,isDragging:O,setNodeRef:C,transform:I,transition:P}=(0,o.nB)({id:m}),A=f||(null==i?void 0:i.status)==="blocked",T={transform:W.ux.Transform.toString(I),transition:P,cursor:O?"grabbing":A?"auto":"pointer",touchAction:"none"};if(!i)return null;let z="blocked"===i.status,N="error"===i.status;return(0,n.jsxs)(d.X,{ref:C,className:x(b.root,{[b.error]:"blocked"===i.status}),...g,radius:"sm",style:{...T,...g.style},children:[!S&&i.previewUrl?(0,n.jsx)(Z.i,{src:i.previewUrl,type:q.DD.image,width:450,className:b.image}):i.url&&i.url!=i.previewUrl?(0,n.jsx)(Z.i,{src:i.url,type:q.DD.image,width:450,className:b.image,onLoad:()=>{var e;null===(e=i.onLoad)||void 0===e||e.call(i),k(!0)}}):null,(z||N)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.a,{color:"#000",zIndex:10}),(0,n.jsxs)(v.b,{variant:"filled",color:"red",sx:{position:"absolute",bottom:0,left:0,right:0,textAlign:"center",zIndex:11},radius:0,children:[z&&(0,n.jsxs)(s.Z,{spacing:4,children:[(0,n.jsxs)(B.J,{position:"top",withinPortal:!0,withArrow:!0,children:[(0,n.jsx)(B.J.Target,{children:(0,n.jsx)(y.A,{children:(0,n.jsx)(V.Z,{})})}),(0,n.jsx)(B.J.Dropdown,{sx:{maxWidth:400},pb:14,children:(0,n.jsxs)(u.K,{spacing:0,children:[(0,n.jsx)(l.x,{size:"xs",weight:500,children:"Blocked for"}),(0,n.jsx)(H.E,{color:"red",children:null===(r=i.blockedFor)||void 0===r?void 0:r.join(", ")})]})})]}),(0,n.jsx)(l.x,{children:"TOS Violation"})]}),N&&(0,n.jsx)(l.x,{children:"Error"})]})]}),!A&&(0,n.jsx)(p.M,{className:b.draggable,...E,...j,children:(0,n.jsx)(d.X,{className:b.draggableIcon,p:"xl",radius:100,children:(0,n.jsx)($.Z,{size:48,stroke:1.5,style:{transform:"rotate(45deg)"},color:"white"})})}),a]})});G.displayName="ImagePreview";let K=(0,b.k)((e,t)=>{let{faded:r,isPrimary:n}=t,i=e.fn.variant({variant:"filled",color:"red"});return{root:{position:"relative",opacity:r?"0.2":"1",transformOrigin:"0 0",height:n?410:200,gridRowStart:n?"span 2":void 0,gridColumnStart:n?"span 2":void 0,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:"grey",overflow:"hidden"},error:{border:"1px solid ".concat(i.background)},draggableIcon:{background:e.fn.rgba("dark",.5),height:"120px",width:"120px",display:"flex",justifyContent:"center",alignItems:"center"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"50% 50%"},draggable:{position:"absolute",top:0,left:0,right:0,bottom:0,opacity:0,"&:hover":{opacity:1}}}});var X=r(57374),J=r(97755),Y=r(38498),Q=r(72323),ee=r(88182);function et(e){let{image:t,index:r,isPrimary:i,filesHandler:o,removeImage:a,withMeta:c,sortable:d=!0}=e,f="error"===t.status,b="complete"===t.status,x="blocked"===t.status,S=t.status&&!f&&!b&&!x,k=(0,w.useMemo)(()=>(t.id||t.status,!1),[t.id,t.analysis,t.status]);return(0,n.jsxs)(G,{image:t,isPrimary:i,id:t.url,disabled:!d,children:[S&&(0,n.jsxs)(p.M,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:[(0,n.jsx)(h.a,{blur:2,zIndex:10,color:"#000"}),(0,n.jsxs)(u.K,{spacing:"xs",sx:{zIndex:11},align:"center",children:[(0,n.jsx)(m.a,{size:"lg"}),t.message&&(0,n.jsxs)(l.x,{weight:600,children:[t.message,"..."]})]})]}),k&&(0,n.jsxs)(g.z,{withinPortal:!0,withArrow:!0,position:"top",width:250,children:[(0,n.jsx)(g.z.Target,{children:(0,n.jsx)(v.b,{color:"yellow",variant:"filled",radius:0,p:4,sx:{position:"absolute",bottom:0,right:0,left:0,zIndex:11},children:(0,n.jsxs)(s.Z,{spacing:4,noWrap:!0,position:"center",children:[(0,n.jsx)(M.Z,{size:20,strokeWidth:2.5}),(0,n.jsx)(l.x,{sx:{lineHeight:1.1},weight:500,children:"Will be reviewed"})]})})}),(0,n.jsxs)(g.z.Dropdown,{children:[(0,n.jsx)(l.x,{size:"sm",weight:500,children:"Flagged for review"}),(0,n.jsx)(l.x,{size:"sm",sx:{lineHeight:1.2},children:"After submission this image will be reviewed by a moderator."})]})]}),(0,n.jsxs)(s.Z,{sx:e=>({position:"absolute",background:e.fn.rgba(e.colors.dark[9],.6),borderBottomLeftRadius:e.radius.sm,top:0,right:0,zIndex:11}),align:"center",position:"right",p:4,spacing:4,children:[!S&&(!t.status||"complete"===t.status)&&(0,n.jsx)(n.Fragment,{children:c&&(0,n.jsx)(U.R,{meta:t.meta,children:(0,n.jsx)(y.A,{variant:"outline",color:t.meta&&Object.keys(t.meta).length?"primary":void 0,children:(0,n.jsx)(D.Z,{})})})}),(0,n.jsx)(y.A,{color:"red",variant:"outline",onClick:()=>{o.remove(r),a(t.url)},children:(0,n.jsx)(L.Z,{size:16})})]})]})}let er=(0,b.k)((e,t)=>({sortItem:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},draggableIcon:{position:"absolute",top:"4px",right:0},checkbox:{position:"absolute",top:"4px",left:"4px"},meta:{position:"absolute",bottom:"4px",right:"4px"},fullWidth:{width:"100%"},disabled:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0],borderColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[2],cursor:"not-allowed","& *":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}}}));var en=r(59455),ei=r(61590),eo=r(86234),ea=r(54163),es=r(52615),el=r(64761),ec=r(15851),eu=r(32819),ed=r(65053),ef=r(75851),ep=(0,b.k)((e,{reversed:t,native:r,radius:n})=>({transferList:{flex:1,display:"flex",flexDirection:"column"},transferListItem:{display:"block",width:"calc(100% - 14px)",padding:7,marginLeft:`calc(${e.spacing.sm}px - 7px)`,marginRight:`calc(${e.spacing.sm}px - 7px)`,borderRadius:e.fn.radius(n),"&:first-of-type":{marginTop:`calc(${e.spacing.sm}px - 7px)`},"&:last-of-type":{marginBottom:`calc(${e.spacing.sm}px - 7px)`}},transferListItemHovered:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[0]},transferListItems:{overflow:r?"auto":"hidden"},transferListHeader:{display:"flex",flexDirection:t?"row-reverse":"row"},transferListBody:{flex:1,borderRadius:e.fn.radius(n),backgroundColor:"dark"===e.colorScheme?e.colors.dark[7]:e.white,border:`1px solid ${"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}`},transferListTitle:{marginBottom:5},transferListSearch:{borderTopWidth:0,borderRightWidth:0,borderLeftWidth:0,borderTopLeftRadius:t?0:`calc(${e.fn.radius(n)}px - 1px)`,borderTopRightRadius:t?`calc(${e.fn.radius(n)}px - 1px)`:0,display:"block",borderBottomColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]},transferListControl:{borderTop:0,borderRightWidth:t?void 0:0,borderLeftWidth:t?0:void 0,borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4],"&:last-of-type":{borderTopLeftRadius:t?`calc(${e.fn.radius(n)}px - 1px)`:0,borderTopRightRadius:t?0:`calc(${e.fn.radius(n)}px - 1px)`},"&:disabled":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:"transparent",borderColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4]}},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:"7px 12px"},separatorLabel:{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}})),eh=r(34736),em=r(54777),eg=r(80061),ev=r(9500),ey=r(89144),eb=r(4144),ex=r(78175);let ew={Prev:ev.g,Next:ey.N,First:eb.O,Last:ex.O},eS={Next:ev.g,Prev:ey.N,Last:eb.O,First:ex.O};function ek({className:e,data:t,onSelect:r,selection:n,itemComponent:i,listComponent:o,transferIcon:a,transferAllIcon:s,transferAllMatchingFilter:c,searchPlaceholder:u,query:d,onSearch:f,filter:p,nothingFound:h,placeholder:m,title:g,showTransferAll:v,reversed:b,onMoveAll:x,onMove:S,height:k,radius:j,classNames:E,styles:O,limit:C,unstyled:I}){let{classes:P,cx:A,theme:T}=ep({reversed:b,native:o!==ef.r,radius:j},{name:"TransferList",classNames:E,styles:O,unstyled:I}),z=[],N=[],[R,_]=(0,w.useState)(-1),M=t.filter(e=>p(d,e)).slice(0,C),D="rtl"===T.dir?eS:ew,L=(0,w.useRef)({}),F=(0,ed.j)({data:M}),{scrollIntoView:U,targetRef:B,scrollableRef:H}=(0,eu.g)({duration:0,offset:5,cancelable:!1,isList:!0}),Z=null;F.forEach((e,t)=>{let o=w.createElement(eh.k,{unstyled:I,tabIndex:-1,onClick:()=>r(e.value),key:e.value,onMouseEnter:()=>_(t),className:A(P.transferListItem,{[P.transferListItemHovered]:t===R}),ref:t=>{L&&L.current&&(L.current[e.value]=t)}},w.createElement(i,{data:e,selected:n.includes(e.value),radius:j}));e.group?(Z!==e.group&&(Z=e.group,N.push(w.createElement("div",{className:P.separator,key:Z},w.createElement(em.i,{classNames:{label:P.separatorLabel},label:Z})))),N.push(o)):z.push(o)}),N.length>0&&z.length>0&&z.unshift(w.createElement("div",{className:P.separator},w.createElement(em.i,{unstyled:I,classNames:{label:P.separatorLabel}})));let W=b?w.createElement(D.Prev,null):w.createElement(D.Next,null),V=b?w.createElement(D.First,null):w.createElement(D.Last,null);return w.createElement("div",{className:A(P.transferList,e)},g&&w.createElement(l.x,{weight:500,unstyled:I,className:P.transferListTitle},g),w.createElement("div",{className:P.transferListBody},w.createElement("div",{className:P.transferListHeader},w.createElement(eg.o,{unstyled:I,value:d,onChange:e=>{f(e.currentTarget.value),_(0)},onFocus:()=>_(0),onBlur:()=>_(-1),placeholder:u,radius:0,onKeyDown:e=>{switch(e.key){case"Enter":e.preventDefault(),M[R]&&r(M[R].value);break;case"ArrowDown":e.preventDefault(),_(e=>{var t;let r=e{var t;let r=e>0?e-1:e;return B.current=L.current[null==(t=M[r])?void 0:t.value],U({alignment:"start"}),r})}},sx:{flex:1},classNames:{input:P.transferListSearch}}),w.createElement(y.A,{variant:"default",size:36,radius:0,className:P.transferListControl,disabled:0===n.length,onClick:S,unstyled:I},a?w.createElement(a,{reversed:b}):W),v&&w.createElement(y.A,{variant:"default",size:36,radius:0,className:P.transferListControl,disabled:c?0===M.length:0===t.length,onClick:x,unstyled:I},s?w.createElement(s,{reversed:b}):V)),w.createElement(o||"div",{ref:H,onMouseLeave:()=>_(-1),className:P.transferListItems,style:{height:k,position:"relative",overflowX:"hidden"}},N.length>0||z.length>0?w.createElement(w.Fragment,null,N,z):w.createElement(l.x,{color:"dimmed",unstyled:I,size:"sm",align:"center",mt:"sm"},!d&&m?m:h))))}ek.displayName="@mantine/core/RenderList";var ej=r(87092);let eE=w.memo(({data:e,selected:t,radius:r})=>w.createElement(ej.X,{checked:t,onChange:()=>{},label:e.label,tabIndex:-1,radius:r,sx:{pointerEvents:"none"}}));var eO=r(69469),eC=Object.defineProperty,eI=Object.defineProperties,eP=Object.getOwnPropertyDescriptors,eA=Object.getOwnPropertySymbols,eT=Object.prototype.hasOwnProperty,ez=Object.prototype.propertyIsEnumerable,eN=(e,t,r)=>t in e?eC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eR=(e,t)=>{for(var r in t||(t={}))eT.call(t,r)&&eN(e,r,t[r]);if(eA)for(var r of eA(t))ez.call(t,r)&&eN(e,r,t[r]);return e},e_=(e,t)=>eI(e,eP(t)),eM=(e,t)=>{var r={};for(var n in e)eT.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eA)for(var n of eA(e))0>t.indexOf(n)&&ez.call(e,n)&&(r[n]=e[n]);return r};let eD={itemComponent:eE,filter:function(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())},titles:[null,null],placeholder:[null,null],listHeight:150,listComponent:ef.r,showTransferAll:!0,limit:1/0,transferAllMatchingFilter:!1},eL=(0,w.forwardRef)((e,t)=>{let r=(0,el.N4)("TransferList",eD,e),{value:n,onChange:i,itemComponent:o,searchPlaceholder:a,searchValues:s,onSearch:l,filter:c,nothingFound:u,placeholder:d,titles:f,initialSelection:p,listHeight:h,listComponent:m,showTransferAll:g,breakpoint:v,radius:y,classNames:b,styles:x,limit:S,unstyled:k,transferIcon:j,transferAllIcon:E,transferAllMatchingFilter:O}=r,C=eM(r,["value","onChange","itemComponent","searchPlaceholder","searchValues","onSearch","filter","nothingFound","placeholder","titles","initialSelection","listHeight","listComponent","showTransferAll","breakpoint","radius","classNames","styles","limit","unstyled","transferIcon","transferAllIcon","transferAllMatchingFilter"]),[I,P]=function(e=[[],[]]){let[t,r]=(0,w.useState)(e);return[t,{select:(e,t)=>r(r=>{let n=r[e],i=n;"string"==typeof t&&(i=n.includes(t)?n.filter(e=>e!==t):[...n,t]);let o=[...r];return o[e]=i,o}),deselect:(e,t)=>r(r=>{let n=[...r];return n[e]=r[e].filter(e=>!t.includes(e)),n}),deselectAll:e=>r(t=>{let r=[...t];return r[e]=[],r})}]}(p),[A,T]=(0,ec.C)({value:s,defaultValue:["",""],finalValue:["",""],onChange:l}),z=e=>{let t=[,,],r=0===e?1:0;if(O){let i=A[e],o=n[e].filter(e=>c(i,e)).slice(0,S),a=n[e].filter(e=>!c(i,e));t[e]=a,t[r]=[...n[r],...o]}else t[e]=[],t[r]=[...n[r],...n[e]];i(t),P.deselectAll(e)},N=e=>{let t=0===e?1:0,r=[,,],o=n[e].reduce((t,r)=>(I[e].includes(r.value)?t.current.push(r):t.filtered.push(r),t),{filtered:[],current:[]});r[e]=o.filtered,r[t]=[...o.current,...n[t]],i(r),P.deselectAll(e)},R={itemComponent:o,listComponent:m,transferIcon:j,transferAllIcon:E,filter:c,height:h,showTransferAll:g,classNames:b,styles:x,limit:S,radius:y};return w.createElement(eO.M,eR({cols:2,spacing:"xl",breakpoints:v?[{maxWidth:v,cols:1}]:[],ref:t,unstyled:k},C),w.createElement(ek,e_(eR({},R),{data:n[0],selection:I[0],onSelect:e=>P.select(0,e),onMoveAll:()=>z(0),onMove:()=>N(0),title:f[0],placeholder:Array.isArray(d)?d[0]:d,searchPlaceholder:Array.isArray(a)?a[0]:a,nothingFound:Array.isArray(u)?u[0]:u,query:A[0],onSearch:e=>T([e,A[1]]),unstyled:k,transferAllMatchingFilter:O})),w.createElement(ek,e_(eR({},R),{data:n[1],selection:I[1],onSelect:e=>P.select(1,e),onMoveAll:()=>z(1),onMove:()=>N(1),title:f[1],placeholder:Array.isArray(d)?d[1]:d,searchPlaceholder:Array.isArray(a)?a[1]:a,nothingFound:Array.isArray(u)?u[1]:u,query:A[1],onSearch:e=>T([A[0],e]),reversed:!0,unstyled:k,transferAllMatchingFilter:O})))});eL.displayName="@mantine/core/TransferList";var eF=r(58654),eU=r(64002),eB=r(36289),eH=r(35227),eZ=Object.defineProperty,eW=Object.defineProperties,eV=Object.getOwnPropertyDescriptors,e$=Object.getOwnPropertySymbols,eq=Object.prototype.hasOwnProperty,eG=Object.prototype.propertyIsEnumerable,eK=(e,t,r)=>t in e?eZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eX=(e,t)=>{for(var r in t||(t={}))eq.call(t,r)&&eK(e,r,t[r]);if(e$)for(var r of e$(t))eG.call(t,r)&&eK(e,r,t[r]);return e},eJ=(e,t)=>eW(e,eV(t)),eY=(0,b.k)((e,{size:t,rightSectionWidth:r})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:eJ(eX({},e.fn.fontStyles()),{backgroundColor:"transparent",border:"1px solid transparent",borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",position:"absolute",display:"block",width:`calc(100% - ${r}px)`,paddingLeft:e.fn.size({size:t,sizes:eH.J})/3,fontSize:e.fn.size({size:t,sizes:e.fontSizes}),height:e.fn.size({size:t,sizes:eH.J})-2,lineHeight:`${e.fn.size({size:t,sizes:eH.J})-4}px`,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,top:0,bottom:0,left:0,right:0,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed"},"&::placeholder":eJ(eX({},e.fn.placeholderStyles()),{opacity:1})}),invalid:{color:e.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:e.fn.variant({variant:"filled",color:"red"}).background}},withIcon:{paddingLeft:`${e.fn.size({size:t,sizes:eH.J})}px !important`}})),eQ=r(12756),e0=Object.defineProperty,e1=Object.defineProperties,e2=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertySymbols,e4=Object.prototype.hasOwnProperty,e3=Object.prototype.propertyIsEnumerable,e6=(e,t,r)=>t in e?e0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,e8=(e,t)=>{for(var r in t||(t={}))e4.call(t,r)&&e6(e,r,t[r]);if(e5)for(var r of e5(t))e3.call(t,r)&&e6(e,r,t[r]);return e},e7=(e,t)=>e1(e,e2(t)),e9=(e,t)=>{var r={};for(var n in e)e4.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&e5)for(var n of e5(e))0>t.indexOf(n)&&e3.call(e,n)&&(r[n]=e[n]);return r};let te={xs:22,sm:26,md:28,lg:32,xl:40},tt={xs:12,sm:15,md:17,lg:19,xl:21},tr={xs:28,sm:32,md:34,lg:44,xl:54},tn={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:({reveal:e,size:t=15})=>w.createElement("svg",{width:t,height:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w.createElement("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),__staticSelector:"PasswordInput"},ti=(0,w.forwardRef)((e,t)=>{let r=(0,el.N4)("PasswordInput",tn,e),{radius:n,disabled:i,size:o,toggleTabIndex:s,className:l,id:c,label:u,error:d,required:f,style:p,icon:h,description:m,wrapperProps:g,classNames:v,styles:b,variant:x,visibilityToggleIcon:S,__staticSelector:k,rightSection:j,rightSectionWidth:E,rightSectionProps:O,sx:C,labelProps:I,descriptionProps:P,errorProps:A,unstyled:T,visibilityToggleLabel:z,withAsterisk:N,inputContainer:R,iconWidth:_,inputWrapperOrder:M,visible:D,defaultVisible:L,onVisibilityChange:F}=r,U=e9(r,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","rightSection","rightSectionWidth","rightSectionProps","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),B=(0,el.rZ)(),H=B.fn.size({size:o,sizes:tr}),{classes:Z,cx:W}=eY({size:o,rightSectionWidth:H},{name:"PasswordInput",classNames:v,styles:b,unstyled:T}),V=(0,eB.M)(c),{systemStyles:$,rest:q}=(0,eQ.x)(U),[G,K]=(0,ec.C)({value:D,defaultValue:L,finalValue:!1,onChange:F}),X=()=>K(!G),J=w.createElement(y.A,{className:Z.visibilityToggle,tabIndex:s,radius:n,size:B.fn.size({size:o,sizes:te}),"aria-hidden":!z,"aria-label":z,unstyled:T,onMouseDown:e=>{e.preventDefault(),X()},onKeyDown:e=>{" "===e.key&&(e.preventDefault(),X())}},w.createElement(S,{reveal:G,size:B.fn.size({size:o,sizes:tt})}));return w.createElement(a.I.Wrapper,e8(e8({required:f,id:V,label:u,error:d,description:m,size:o,className:l,style:p,classNames:v,styles:b,__staticSelector:k,sx:C,errorProps:A,descriptionProps:P,labelProps:I,unstyled:T,withAsterisk:N,inputWrapperOrder:M,inputContainer:R},$),g),w.createElement(a.I,{component:"div",invalid:!!d,icon:h,size:o,classNames:e7(e8({},v),{input:Z.input}),styles:b,radius:n,disabled:i,__staticSelector:k,rightSectionWidth:H,rightSection:!i&&J,variant:x,unstyled:T,iconWidth:_},w.createElement("input",e8({type:G?"text":"password",required:f,className:W(Z.innerInput,{[Z.withIcon]:h,[Z.invalid]:!!d}),disabled:i,id:V,ref:t},q))))});ti.displayName="@mantine/core/PasswordInput";var to=r(63456),ta=r(16232),ts=r(10129),tl=r(3594),tc=r(91611),tu=Object.defineProperty,td=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable,th=(e,t,r)=>t in e?tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tm=(e,t)=>{for(var r in t||(t={}))tf.call(t,r)&&th(e,r,t[r]);if(td)for(var r of td(t))tp.call(t,r)&&th(e,r,t[r]);return e},tg=(e,t)=>{var r={};for(var n in e)tf.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&td)for(var n of td(e))0>t.indexOf(n)&&tp.call(e,n)&&(r[n]=e[n]);return r};function tv(e){var{size:t}=e,r=tg(e,["size"]);return w.createElement("svg",tm({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-color-picker",width:t,height:t,viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),w.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.createElement("path",{d:"M11 7l6 6"}),w.createElement("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"}))}var ty=r(66261),tb=r(12549),tx=r(66033),tw=r(21380),tS=Object.defineProperty,tk=Object.defineProperties,tj=Object.getOwnPropertyDescriptors,tE=Object.getOwnPropertySymbols,tO=Object.prototype.hasOwnProperty,tC=Object.prototype.propertyIsEnumerable,tI=(e,t,r)=>t in e?tS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tP=(e,t)=>{for(var r in t||(t={}))tO.call(t,r)&&tI(e,r,t[r]);if(tE)for(var r of tE(t))tC.call(t,r)&&tI(e,r,t[r]);return e},tA=(e,t)=>tk(e,tj(t)),tT=(e,t)=>{var r={};for(var n in e)tO.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tE)for(var n of tE(e))0>t.indexOf(n)&&tC.call(e,n)&&(r[n]=e[n]);return r};let tz={xs:16,sm:18,md:22,lg:28,xl:36},tN={xs:14,sm:16,md:18,lg:20,xl:22},tR={xs:28,sm:32,md:38,lg:44,xl:58},t_={size:"sm",format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:10,withPicker:!0,transition:"pop-top-left",dropdownZIndex:(0,tl.w)("popover"),transitionDuration:0,withinPortal:!0,shadow:"md",withEyeDropper:!0},tM=(0,w.forwardRef)((e,t)=>{let r=(0,ty.k)("ColorInput",t_,e),{wrapperProps:n,inputProps:i,format:o,onChange:s,onChangeEnd:l,onFocus:c,onBlur:u,onClick:d,value:f,defaultValue:p,disallowInput:h,fixOnBlur:m,withPreview:g,swatchesPerRow:v,withPicker:b,icon:x,transition:S,dropdownZIndex:k,transitionDuration:j,transitionTimingFunction:E,withinPortal:O,swatches:C,shadow:I,classNames:P,styles:A,unstyled:T,readOnly:N,withEyeDropper:R,eyeDropperIcon:_,rightSection:M,rightSectionWidth:D,closeOnColorSwatchClick:L,disabled:F}=r,U=tT(r,["wrapperProps","inputProps","format","onChange","onChangeEnd","onFocus","onBlur","onClick","value","defaultValue","disallowInput","fixOnBlur","withPreview","swatchesPerRow","withPicker","icon","transition","dropdownZIndex","transitionDuration","transitionTimingFunction","withinPortal","swatches","shadow","classNames","styles","unstyled","readOnly","withEyeDropper","eyeDropperIcon","rightSection","rightSectionWidth","closeOnColorSwatchClick","disabled"]),H=(0,el.rZ)(),[Z,W]=(0,w.useState)(!1),[V,$]=(0,w.useState)(""),[q,G]=(0,ec.C)({value:f,defaultValue:p,finalValue:"",onChange:s}),{supported:K,open:X}=function(){let[e,t]=(0,w.useState)(!1);(0,ts.Y)(()=>{t("undefined"!=typeof window&&"EyeDropper"in window)},[]);let r=(0,w.useCallback)((t={})=>{if(e)return new window.EyeDropper().open(t)},[e]);return{supported:e,open:r}}(),J=w.createElement(y.A,{sx:{color:"dark"===H.colorScheme?H.colors.dark[0]:H.black},size:i.size,onClick:()=>X().then(({sRGBHex:e})=>G((0,tb.Rt)(o,(0,tx.lu)(e)))).catch(tc.Z)},_||w.createElement(tv,{size:H.fn.size({size:i.size,sizes:tN})}));return(0,w.useEffect)(()=>{((0,tx.fi)(q)||""===q.trim())&&$(q)},[q]),(0,z.l)(()=>{(0,tx.fi)(q)&&G((0,tb.Rt)(o,(0,tx.lu)(q)))},[o]),w.createElement(a.I.Wrapper,tA(tP({},n),{__staticSelector:"ColorInput"}),w.createElement(B.J,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,zIndex:k,withinPortal:O,transitionDuration:j,transition:S,opened:Z,shadow:I,classNames:P,styles:A,unstyled:T,disabled:N||!1===b&&(!Array.isArray(C)||0===C.length)},w.createElement(B.J.Target,null,w.createElement("div",null,w.createElement(a.I,tA(tP(tP({autoComplete:"nope"},U),i),{disabled:F,ref:t,__staticSelector:"ColorInput",onFocus:e=>{null==c||c(e),W(!0)},onBlur:e=>{null==u||u(e),W(!1),m&&G(V)},onClick:e=>{null==d||d(e),W(!0)},spellCheck:!1,value:q,onChange:e=>{let t=e.currentTarget.value;G(t),(0,tx.fi)(t)&&(null==l||l((0,tb.Rt)(o,(0,tx.lu)(t))))},icon:x||(g?w.createElement(tw.b,{color:(0,tx.fi)(q)?q:"#fff",size:H.fn.size({size:i.size,sizes:tz})}):null),readOnly:h||N,sx:{cursor:h?"pointer":void 0},unstyled:T,classNames:P,styles:A,rightSection:M||(R&&!F&&!N&&K?J:null),rightSectionWidth:null!=D?D:H.fn.size({size:i.size,sizes:tR})})))),w.createElement(B.J.Dropdown,{onMouseDown:e=>e.preventDefault(),p:i.size},w.createElement(ta.z,{__staticSelector:"ColorInput",value:q,onChange:G,onChangeEnd:l,format:o,swatches:C,swatchesPerRow:v,withPicker:b,size:i.size,focusable:!1,unstyled:T,styles:A,classNames:P,onColorSwatchClick:()=>L&&W(!1)}))))});tM.displayName="@mantine/core/ColorInput";var tD=r(52785),tL=r(45050),tF=(0,b.k)(()=>({placeholder:{},input:{cursor:"pointer"}})),tU=r(80971),tB=r(83979),tH=r(80665),tZ=Object.defineProperty,tW=Object.getOwnPropertySymbols,tV=Object.prototype.hasOwnProperty,t$=Object.prototype.propertyIsEnumerable,tq=(e,t,r)=>t in e?tZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tG=(e,t)=>{for(var r in t||(t={}))tV.call(t,r)&&tq(e,r,t[r]);if(tW)for(var r of tW(t))t$.call(t,r)&&tq(e,r,t[r]);return e},tK=(e,t)=>{var r={};for(var n in e)tV.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&tW)for(var n of tW(e))0>t.indexOf(n)&&t$.call(e,n)&&(r[n]=e[n]);return r};let tX={multiple:!1},tJ=(0,w.forwardRef)((e,t)=>{let r=(0,el.N4)("FileButton",tX,e),{onChange:n,children:i,multiple:o,accept:a,name:s,form:l,resetRef:c,disabled:u,capture:d,inputProps:f}=r,p=tK(r,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),h=(0,w.useRef)();return(0,tB.k)(c,()=>{h.current.value=""}),w.createElement(w.Fragment,null,i(tG({onClick:()=>{u||h.current.click()}},p)),w.createElement("input",tG({style:{display:"none"},type:"file",accept:a,multiple:o,onChange:e=>{o?n(Array.from(e.currentTarget.files)):n(e.currentTarget.files[0]||null)},ref:(0,tH.Y)(t,h),name:s,form:l,capture:d},f)))});tJ.displayName="@mantine/core/FileButton";var tY=Object.defineProperty,tQ=Object.defineProperties,t0=Object.getOwnPropertyDescriptors,t1=Object.getOwnPropertySymbols,t2=Object.prototype.hasOwnProperty,t5=Object.prototype.propertyIsEnumerable,t4=(e,t,r)=>t in e?tY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t3=(e,t)=>{for(var r in t||(t={}))t2.call(t,r)&&t4(e,r,t[r]);if(t1)for(var r of t1(t))t5.call(t,r)&&t4(e,r,t[r]);return e},t6=(e,t)=>tQ(e,t0(t)),t8=(e,t)=>{var r={};for(var n in e)t2.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&t1)for(var n of t1(e))0>t.indexOf(n)&&t5.call(e,n)&&(r[n]=e[n]);return r};let t7={size:"sm",valueComponent:({value:e})=>w.createElement(l.x,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},Array.isArray(e)?e.map(e=>e.name).join(", "):null==e?void 0:e.name),clearButtonTabIndex:0},t9={xs:24,sm:30,md:34,lg:40,xl:44},re=(0,w.forwardRef)((e,t)=>{let r=(0,ty.k)("FileInput",t7,e),{inputProps:n,wrapperProps:i,placeholder:o,value:s,defaultValue:l,onChange:c,multiple:u,accept:d,name:f,form:p,classNames:h,styles:m,unstyled:g,valueComponent:v,rightSection:y,rightSectionWidth:b,clearable:x,clearButtonLabel:S,clearButtonTabIndex:k,readOnly:j,capture:E,fileInputProps:O}=r,C=t8(r,["inputProps","wrapperProps","placeholder","value","defaultValue","onChange","multiple","accept","name","form","classNames","styles","unstyled","valueComponent","rightSection","rightSectionWidth","clearable","clearButtonLabel","clearButtonTabIndex","readOnly","capture","fileInputProps"]),I=(0,w.useRef)(),{classes:P,theme:A,cx:T}=tF(null,{name:"FileInput",classNames:h,styles:m,unstyled:g}),[z,N]=(0,ec.C)({value:s,defaultValue:l,onChange:c,finalValue:u?[]:null}),R=Array.isArray(z)?0!==z.length:null!==z,_=y||(x&&R&&!j?w.createElement(tU.P,{variant:"transparent","aria-label":S,onClick:()=>N(u?[]:null),size:n.size,tabIndex:k,unstyled:g}):null);return(0,w.useEffect)(()=>{(Array.isArray(z)&&0===z.length||null===z)&&I.current()},[z]),w.createElement(a.I.Wrapper,t6(t3({},i),{__staticSelector:"FileInput"}),w.createElement(tJ,{onChange:N,multiple:u,accept:d,name:f,form:p,resetRef:I,disabled:j,capture:E,inputProps:O},e=>w.createElement(a.I,t6(t3(t3(t3({multiline:!0},e),n),C),{component:"button",type:"button",ref:t,__staticSelector:"FileInput",rightSection:_,rightSectionWidth:b||A.fn.size({size:n.size,sizes:t9}),classNames:t6(t3({},h),{input:T(P.input,null==h?void 0:h.input)})}),R?w.createElement(v,{value:z}):w.createElement(a.I.Placeholder,{className:P.placeholder},o))))});re.displayName="@mantine/core/FileInput";var rt=r(61885),rr=r(93680),rn=r(39419),ri=r(99352),ro=r(9276);function ra(e){let t=parseInt(e,10);return t>=10?t.toString():`0${t}`}var rs=Object.defineProperty,rl=Object.defineProperties,rc=Object.getOwnPropertyDescriptors,ru=Object.getOwnPropertySymbols,rd=Object.prototype.hasOwnProperty,rf=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rh=(e,t)=>{for(var r in t||(t={}))rd.call(t,r)&&rp(e,r,t[r]);if(ru)for(var r of ru(t))rf.call(t,r)&&rp(e,r,t[r]);return e},rm=(e,t)=>rl(e,rc(t));let rg={xs:20,sm:23,md:25,lg:27,xl:29};var rv=(0,b.k)((e,{size:t,hasValue:r})=>({timeInput:rm(rh({},e.fn.fontStyles()),{width:e.fn.size({size:t,sizes:rg}),appearance:"none",backgroundColor:"transparent",color:"inherit",padding:0,textAlign:"center",border:"1px solid transparent",fontSize:e.fn.size({size:t,sizes:e.fontSizes}),lineHeight:1,outline:0,"&:focus":{textAlign:r?void 0:"start"},"&::placeholder":{width:"auto",textAlign:"left"},"&[disabled]":{color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[7],cursor:"not-allowed"}}),amPmInput:{textAlign:"left"}})),ry=Object.defineProperty,rb=Object.getOwnPropertySymbols,rx=Object.prototype.hasOwnProperty,rw=Object.prototype.propertyIsEnumerable,rS=(e,t,r)=>t in e?ry(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rk=(e,t)=>{for(var r in t||(t={}))rx.call(t,r)&&rS(e,r,t[r]);if(rb)for(var r of rb(t))rw.call(t,r)&&rS(e,r,t[r]);return e},rj=(e,t)=>{var r={};for(var n in e)rx.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&rb)for(var n of rb(e))0>t.indexOf(n)&&rw.call(e,n)&&(r[n]=e[n]);return r};let rE=(0,w.forwardRef)((e,t)=>{var{className:r,onFocus:n,onBlur:i,onChange:o,setValue:a,withSeparator:s=!1,size:c="sm",max:u,min:d=0,value:f,unstyled:p}=e,h=rj(e,["className","onFocus","onBlur","onChange","setValue","withSeparator","size","max","min","value","unstyled"]);let[m,g]=(0,w.useState)(0),{classes:v,cx:y,theme:b}=rv({size:c,hasValue:!!f},{name:"TimeField",unstyled:p}),x=(0,w.useRef)();return w.createElement(w.Fragment,null,w.createElement("input",rk({type:"text",inputMode:"numeric",ref:(0,tH.Y)(x,t),onChange:e=>{g(m+1);let t=parseInt(e.currentTarget.value,10).toString();if("0"===t&&0===m){a("00");return}o(t,!0,m>0)},onClick:e=>{e.stopPropagation(),x.current.select()},onFocus:e=>{"function"==typeof n&&n(e),x.current.select(),g(0)},onBlur:e=>{"function"==typeof i&&i(e),1===m&&"function"==typeof o&&o(e.currentTarget.value,!1)},onKeyDown:e=>{if("ArrowUp"===e.key){e.preventDefault();let t=ra((0,ro.u)(parseInt(e.currentTarget.value,10)+1,d,u).toString());f!==t&&o(t,!1)}if("ArrowDown"===e.key){e.preventDefault();let t=ra((0,ro.u)(parseInt(e.currentTarget.value,10)-1,d,u).toString());f!==t&&o(t,!1)}},value:f,className:y(v.timeInput,r)},h)),s&&w.createElement(l.x,{size:c,unstyled:p,style:{lineHeight:1,color:f?"inherit":"dark"===b.colorScheme?b.colors.dark[2]:b.colors.gray[7]}},":"))});function rO(e){return Math.floor(e/10)}function rC({onChange:e,nextRef:t,min:r,max:n,nextMax:i}){return(o,a,s=!1)=>{var l,c;let u=parseInt(o,10);if(!Number.isNaN(u)){if(u>rO(n)||s){let o,s;let d=u%10;u>n&&i&&d<=rO(i)?(o=ra(rO(u).toString()),s=ra(d.toString())):o=ra((0,ro.u)(u,r,n).toString()),e(o,s),a&&(null==(l=null==t?void 0:t.current)||l.focus()),a&&(null==(c=null==t?void 0:t.current)||c.select());return}e(u.toString())}}}rE.displayName="@mantine/dates/TimeField";var rI=(0,b.k)((e,{size:t})=>({timeInput:{},amPmInput:{},disabled:{cursor:"not-allowed"},controls:{display:"flex",alignItems:"center",height:e.fn.size({size:t,sizes:eH.J})-2}})),rP=Object.defineProperty,rA=Object.getOwnPropertySymbols,rT=Object.prototype.hasOwnProperty,rz=Object.prototype.propertyIsEnumerable,rN=(e,t,r)=>t in e?rP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rR=(e,t)=>{for(var r in t||(t={}))rT.call(t,r)&&rN(e,r,t[r]);if(rA)for(var r of rA(t))rz.call(t,r)&&rN(e,r,t[r]);return e},r_=(e,t)=>{var r={};for(var n in e)rT.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&rA)for(var n of rA(e))0>t.indexOf(n)&&rz.call(e,n)&&(r[n]=e[n]);return r};let rM=(0,w.forwardRef)((e,t)=>{var{className:r,onChange:n,onFocus:i,size:o="sm",value:a,unstyled:s,amLabel:l,pmLabel:c}=e,u=r_(e,["className","onChange","onFocus","size","value","unstyled","amLabel","pmLabel"]);let{classes:d,cx:f}=rv({size:o,hasValue:!!a},{name:"AmPmInput",unstyled:s}),p=(0,w.useRef)();return w.createElement("input",rR({type:"text",ref:(0,tH.Y)(p,t),onClick:e=>{e.stopPropagation(),p.current.select()},onFocus:e=>{"function"==typeof i&&i(e),p.current.select()},onKeyDown:e=>{("ArrowUp"===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),n(a===l?c:l,!0))},onChange:e=>{let t=e.target.value.slice(-1).toLowerCase();if("p"===t){e.preventDefault(),n(c,!0);return}if("a"===t){e.preventDefault(),n(l,!0);return}n(a.toString(),!0)},value:a,className:f(d.timeInput,d.amPmInput)},u))});rM.displayName="@mantine/dates/AmPmInput";var rD=r(27484),rL=r.n(rD);function rF(e,t,r,n){if(!(e instanceof Date))return{hours:"",minutes:"",seconds:"",amPm:""};let i=e.getHours(),o=i>=12;return"12"===t&&0==(i%=12)&&(i+=12),{hours:ra(i.toString()),minutes:ra(e.getMinutes().toString()),seconds:ra(e.getSeconds().toString()),amPm:o?n:r}}var rU=Object.defineProperty,rB=Object.defineProperties,rH=Object.getOwnPropertyDescriptors,rZ=Object.getOwnPropertySymbols,rW=Object.prototype.hasOwnProperty,rV=Object.prototype.propertyIsEnumerable,r$=(e,t,r)=>t in e?rU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rq=(e,t)=>{for(var r in t||(t={}))rW.call(t,r)&&r$(e,r,t[r]);if(rZ)for(var r of rZ(t))rV.call(t,r)&&r$(e,r,t[r]);return e},rG=(e,t)=>rB(e,rH(t)),rK=(e,t)=>{var r={};for(var n in e)rW.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&rZ)for(var n of rZ(e))0>t.indexOf(n)&&rV.call(e,n)&&(r[n]=e[n]);return r};let rX={xs:24,sm:30,md:34,lg:40,xl:44},rJ={size:"sm",withSeconds:!1,clearable:!1,format:"24",amLabel:"am",pmLabel:"pm",timePlaceholder:"--",amPmPlaceholder:"am",disabled:!1},rY=(0,w.forwardRef)((e,t)=>{let r=(0,el.N4)("TimeInput",rJ,e),{required:n,label:i,error:o,description:s,className:l,style:c,size:u,wrapperProps:d,classNames:f,styles:p,id:h,value:m,defaultValue:g,onChange:v,withSeconds:y,clearable:b,clearButtonLabel:x,format:S,amLabel:k,pmLabel:j,name:E,hoursLabel:O,minutesLabel:C,secondsLabel:I,amPmLabel:P,timePlaceholder:A,amPmPlaceholder:T,disabled:N,sx:R,nextRef:_,labelProps:M,descriptionProps:D,errorProps:L,unstyled:F,withAsterisk:U,inputWrapperOrder:B}=r,H=rK(r,["required","label","error","description","className","style","size","wrapperProps","classNames","styles","id","value","defaultValue","onChange","withSeconds","clearable","clearButtonLabel","format","amLabel","pmLabel","name","hoursLabel","minutesLabel","secondsLabel","amPmLabel","timePlaceholder","amPmPlaceholder","disabled","sx","nextRef","labelProps","descriptionProps","errorProps","unstyled","withAsterisk","inputWrapperOrder"]),{classes:Z,cx:W,theme:V}=rI({size:u},{classNames:f,styles:p,unstyled:F,name:"TimeInput"}),{systemStyles:$,rest:q}=(0,eQ.x)(H),G=(0,eB.M)(h),K=(0,w.useRef)(),X=(0,w.useRef)(),J=(0,w.useRef)(),Y=(0,w.useRef)(),[Q,ee]=(0,w.useState)(rF(m||g,S,k,j)),[et,er]=(0,w.useState)(m||g);(0,z.l)(()=>{ee(rF(et,S,k,j))},[et,S,k,j]),(0,z.l)(()=>{(null==m?void 0:m.getTime())!==(null==et?void 0:et.getTime())&&er(m)},[m]);let en=e=>{let t=rq(rq({},Q),e),r=function(e,t,r,n,i,o){let a=rL()(),s=parseInt(e,10),l=parseInt(t,10),c=parseInt(r,10);return Number.isNaN(s)&&(s=0),"12"===n&&(s%=12,o===i&&(s+=12)),a.hour(s).minute(Number.isNaN(l)?0:l).second(Number.isNaN(c)?0:c).millisecond(0).toDate()}(t.hours,t.minutes,t.seconds,S,j,t.amPm);er(r),"function"==typeof v&&v(r)},ei=rC({onChange:(e,t)=>{en({hours:e,minutes:null!=t?t:Q.minutes})},min:"12"===S?1:0,max:"12"===S?12:23,nextRef:X,nextMax:59}),eo=rC({onChange:(e,t)=>{en({minutes:e,seconds:null!=t?t:Q.seconds})},min:0,max:59,nextRef:y?J:"12"===S?Y:_,nextMax:y?59:void 0}),ea=rC({onChange:e=>{en({seconds:e})},min:0,max:59,nextRef:"12"===S?Y:_}),es=function({amLabel:e,pmLabel:t,onChange:r,nextRef:n}){return(i,o)=>{var a,s;let l=RegExp(`(^(${e}|${t})?$)`),c=i.toLowerCase();if(c===e||c===t){r(c),o&&(null==(a=null==n?void 0:n.current)||a.focus()),o&&(null==(s=null==n?void 0:n.current)||s.select());return}l.test(c)&&r(c)}}({amLabel:k,pmLabel:j,onChange:e=>{en({amPm:e})},nextRef:_}),ec=b&&et&&!N?w.createElement(tU.P,{variant:"transparent","aria-label":x,onClick:()=>{ee({hours:"",minutes:"",seconds:"",amPm:""}),er(null),null==v||v(null),K.current.focus()},size:u,unstyled:F}):null;return w.createElement(a.I.Wrapper,rq(rq({required:n,label:i,error:o,description:s,className:l,style:c,classNames:f,styles:p,size:u,__staticSelector:"TimeInput",id:G,sx:R,errorProps:L,descriptionProps:D,labelProps:M,unstyled:F,withAsterisk:U,inputWrapperOrder:B},$),d),w.createElement(a.I,rq({component:"div",__staticSelector:"TimeInput",required:n,invalid:!!o,onClick:()=>K.current.focus(),size:u,className:W({[Z.disabled]:N}),classNames:f,styles:p,disabled:N,rightSection:ec,rightSectionWidth:V.fn.size({size:u,sizes:rX}),unstyled:F},q),w.createElement("div",{className:Z.controls},w.createElement(rE,{ref:(0,tH.Y)(K,t),value:Q.hours,onChange:ei,setValue:e=>ee(t=>rG(rq({},t),{hours:e})),id:G,className:Z.timeInput,withSeparator:!0,size:u,max:"12"===S?12:23,placeholder:A,"aria-label":O,disabled:N,name:E,unstyled:F}),w.createElement(rE,{ref:X,value:Q.minutes,onChange:eo,setValue:e=>ee(t=>rG(rq({},t),{minutes:e})),className:Z.timeInput,withSeparator:y,size:u,max:59,placeholder:A,"aria-label":C,disabled:N,unstyled:F}),y&&w.createElement(rE,{ref:J,value:Q.seconds,onChange:ea,setValue:e=>ee(t=>rG(rq({},t),{seconds:e})),className:Z.timeInput,size:u,max:59,placeholder:A,"aria-label":I,disabled:N,unstyled:F}),"12"===S&&w.createElement(rM,{ref:Y,value:Q.amPm,onChange:es,placeholder:T,amLabel:k,pmLabel:j,size:u,"aria-label":P,disabled:N,unstyled:F}))))});rY.displayName="@mantine/dates/TimeInput";var rQ=r(236),r0=r(48600),r1=r(45957),r2=r(17789),r5=r(59417),r4=r(91759),r3=r(94707),r6=r(98729),r8=r(72456);let r7=(0,b.k)(e=>({badge:{textTransform:"none",cursor:"pointer"},inner:{display:"flex"},createOption:{fontSize:e.fontSizes.sm,padding:e.spacing.xs,borderRadius:e.radius.sm,"&:hover":{backgroundColor:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[1]}},dropdown:{maxWidth:"300px !important"}}));var r9=r(88393),ne=r(3941),nt=r(49672),nr=r(30220),nn=r(9242);function ni(e){let{progress:t,speed:r,timeRemaining:i,abort:o,name:a}=e;return(0,n.jsxs)(u.K,{spacing:4,children:[(0,n.jsxs)(s.Z,{spacing:8,position:"apart",noWrap:!0,children:[(0,n.jsx)(l.x,{size:"sm",weight:500,lineClamp:1,children:a}),(0,n.jsx)(r9.u,{label:"Cancel",children:(0,n.jsx)(y.A,{size:"sm",color:"red",variant:"transparent",onClick:()=>o(),children:(0,n.jsx)(R.Z,{})})})]}),(0,n.jsxs)(u.K,{spacing:2,children:[(0,n.jsx)(ne.E,{sx:{width:"100%"},size:"xl",value:t,label:"".concat(Math.floor(t),"%"),color:t<100?"blue":"green",striped:!0,animate:!0}),(0,n.jsxs)(s.Z,{position:"apart",children:[(0,n.jsx)(l.x,{size:"xs",color:"dimmed",children:"".concat((0,ee.td)(r),"/s")}),(0,n.jsx)(l.x,{size:"xs",color:"dimmed",children:"".concat((0,ee.ZC)(i)," remaining")})]})]})]})}var no=r(41449),na=r(82173),ns=r(96718),nl=r(92066),nc=r(77446),nu=r(67841),nd=r(56621),nf=r(52215),np=r(83895),nh=r(81447);let nm=(0,b.k)(e=>({selectedItemsGrid:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gridGap:4,[nh.D.smallerThan("sm")]:{gridTemplateColumns:"repeat(3, 1fr)"}},selectedItemRemove:{position:"absolute",top:"-10px",left:"-10px",width:"30px",height:"30px",borderRadius:"50%",padding:0,display:"flex",alignItems:"center",justifyContent:"center"}}));var ng=r(21955),nv=(0,ng.Z)("outline","arrows-move","IconArrowsMove",[["path",{d:"M18 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M15 12h6",key:"svg-1"}],["path",{d:"M6 9l-3 3l3 3",key:"svg-2"}],["path",{d:"M3 12h6",key:"svg-3"}],["path",{d:"M9 18l3 3l3 -3",key:"svg-4"}],["path",{d:"M12 15v6",key:"svg-5"}],["path",{d:"M15 6l-3 -3l-3 3",key:"svg-6"}],["path",{d:"M12 3v6",key:"svg-7"}]]),ny=r(42724),nb=r(93747),nx=r(7379),nw=r(54671);let nS={NsfwLevel:nw.Us.map(e=>({label:nw.PP[e],value:e}))};var nk=r(28855),nj=r(20050),nE=r(39759),nO=r(82633),nC=r(68848),nI=r(16053);let nP=(0,w.forwardRef)((e,t)=>{let{title:r,description:i,...o}=e;return(0,n.jsx)("div",{ref:t,...o,children:(0,n.jsxs)(u.K,{spacing:0,children:[(0,n.jsx)(l.x,{size:"sm",children:r}),i&&(0,n.jsx)(nO.i,{maxHeight:200,children:(0,n.jsx)(nC.u,{html:i})})]})})});nP.displayName="CosmeticShopItemSelectItem";let nA=e=>{let{onItemSelected:t}=e,[r,i]=(0,w.useState)({page:1}),[o,a]=(0,nE.c)(r,500),{cosmeticShopItems:s=[],isLoading:l}=(0,nI.XT)(o),c=(0,w.useMemo)(()=>s.filter(r0.$K).map(e=>({value:e.id.toString(),label:e.title,title:e.title,description:e.description})),[s]);return(0,n.jsx)(nk.Ph,{label:"Search products by title",description:"Select items to add to this section",onChange:e=>{let r=s.find(t=>t.id===Number(e));r&&t(r)},onSearchChange:e=>i({...r,name:e}),searchValue:r.name,nothingFound:"No options",itemComponent:nP,data:c,searchable:!0,withAsterisk:!0,value:""})};var nT=r(14821),nz=(0,ng.Z)("outline","building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),nN=r(79543),nR=r(72124);let n_=(0,b.k)(e=>({decoration:{borderRadius:e.radius.md,backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[1],display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},selected:{border:"2px solid ".concat(e.colors.blue[4])},noContent:{backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[1],gridColumn:"2 / min-content"},noContentNoUrl:{gridColumn:"1 / min-content"}}));var nM=r(76326),nD=r(10662),nL=r(71327),nF=r(78009),nU=r(21221),nB=r(49824),nH=r(91389),nZ=r(43123);let nW=(0,nB.yV)(function(e,t){let r="headlessui-control-".concat((0,w.useId)()),[n,i]=(0,nZ.bE)(),[o,a]=(0,nH.fw)(),s=(0,nL.B)(),{disabled:l=s||!1,...c}=e,u=(0,w.useMemo)(()=>({disabled:l}),[l]),d=(0,nB.L6)();return w.createElement(nL.G,{value:l},w.createElement(i,{value:n},w.createElement(a,{value:o},w.createElement(nU.v,{id:r},d({ourProps:{ref:t,disabled:l||void 0,"aria-disabled":l||void 0},theirProps:{...c,children:w.createElement(nF.wR,null,"function"==typeof c.children?c.children(u):c.children)},slot:u,defaultTag:"div",name:"Field"})))))});var nV=r(73819);function n$(e){let{level:t,browsingLevel:r,onToggle:i}=e,o=nx.v.hasFlag(r,t),{classes:a}=nq();return(0,n.jsx)(eU.A,{classNames:a,checked:o,onChange:()=>i(t),variant:"outline",children:(0,n.jsx)("span",{children:nw.vU[t]})})}let nq=(0,b.k)((e,t,r)=>({root:{flex:1},label:{width:"100%",display:"inline-flex",justifyContent:"center","&[data-checked]":{"&, &:hover":{backgroundColor:e.colors.blue[e.fn.primaryShade()],color:e.white},["& .".concat(r("iconWrapper"))]:{color:e.white,display:"none",["@media (min-width: ".concat(e.breakpoints.xs,"px)")]:{display:"inline-block"}}},paddingLeft:10,paddingRight:10,["@media (min-width: ".concat(e.breakpoints.xs,"px)")]:{"&":{paddingLeft:20,paddingRight:20}}},iconWrapper:{ref:r("iconWrapper")}}));var nG=r(87536),nK=r(90512);let nX=(0,w.createContext)(null);function nJ(){let e=(0,w.useContext)(nX);if(!e)throw Error("missing CustomFormCtx in tree");return e}function nY(e){let{id:t,form:r,className:i,style:o,children:a,onSubmit:s,onError:l,loading:c=!1}=e,u=s?r.handleSubmit(s,(e,t)=>{null==l||l(e,t),Object.entries(e).forEach(e=>{let[t,r]=e;return console.warn("".concat(t,": Form validation: ").concat(null==r?void 0:r.message),{value:r})})}):e=>e.preventDefault();return(0,n.jsx)(nG.RV,{...r,children:(0,n.jsx)(nX.Provider,{value:{onSubmit:s},children:(0,n.jsxs)("form",{id:t,onSubmit:u,className:(0,nK.Z)("relative",i),style:o,children:[(0,n.jsx)(f.f,{visible:c,zIndex:1}),a]})})})}let nQ=(0,ei.l)(eo.C),n0=(0,ei.l)(ea.N,e=>{let{field:t}=e;return{value:t.value}}),n1=(0,ei.l)(es.g);(0,ei.l)(eL);let n2=(0,ei.l)(rr.b),n5=(0,ei.l)(rn.y$),n4=(0,ei.l)(function(e){let{value:t,onChange:r,defaultValue:i,data:o,...a}=e,s=o.length&&"object"==typeof o[0]?typeof o[0].value:typeof o[0],l=o.map(e=>"object"==typeof e?{...e,value:e.value.toString()}:e.toString()),c=(0,w.useMemo)(()=>null!=t?String(t):void 0,[t]),u=(0,w.useMemo)(()=>i?String(i):void 0,[i]);return(0,n.jsx)(nV.s,{value:c,defaultValue:u,data:l,onChange:function(e){if(null!=e){let t="number"===s?Number(e):e;null==r||r(t)}},...a})}),n3=(0,ei.l)(eF.Y.Group),n6=(0,ei.l)(ej.X.Group),n8=(0,ei.l)(eU.A.Group);(0,ei.l)(ti),(0,ei.l)(to.q),(0,ei.l)(ta.z),(0,ei.l)(tM),(0,ei.l)(eU.A.Group),(0,ei.l)(tD.F);let n7=(0,ei.l)(ri.M);(0,ei.l)(function(e){let{id:t,label:r,description:i,error:o,required:s,withAsterisk:l,labelProps:c,descriptionProps:u,errorProps:d,inputWrapperOrder:f,...p}=e;return(0,n.jsx)(a.I.Wrapper,{id:t,label:r,description:i,error:o,required:s,withAsterisk:l,labelProps:c,descriptionProps:u,errorProps:d,inputWrapperOrder:f,children:(0,n.jsx)(r1.i,{...p})})}),(0,ei.l)(tL.i),(0,ei.l)(re);let n9=(0,ei.l)(en.L),ie=(0,ei.l)(function(e){var t;let{value:r=[],onChange:p,label:h,extra:m,max:g=10,maxSize:v=Y._G.mediaUpload.maxImageFileSize,hasPrimaryImage:y,withMeta:b=!0,sortable:S=!0,reset:k=0,...j}=e,{classes:E,theme:O,cx:C}=er(),I=(0,J.Z)(),P=(0,i.Dy)((0,i.VT)(i.we,{activationConstraint:{distance:8}})),{files:A,uploadToCF:M,removeImage:D}=(0,X.R)(),[L,U]=T(Array.isArray(r)?r:[]),[B,H]=(0,w.useState)(),[Z,W]=(0,w.useState)("");(0,z.l)(()=>{k>0&&U.setState(r)},[k]),(0,z.l)(()=>{L&&(null==p||p(L))},[L]);let V=async e=>{if(L.length+e.length>g)return;if(e.some(e=>e.size>v))return W("Files should not exceed ".concat((0,ee.td)(v)));W("");let t=e.map(e=>({url:URL.createObjectURL(e),file:e}));U.setState(e=>[...e,...t.map(e=>({url:e.url,file:e.file}))]),await Promise.all(t.map(async e=>{let{id:t}=await M(e.file);U.setState((0,F.ZP)(r=>{let n=r.findIndex(t=>t.file===e.file);-1!==n&&(r[n].url=t,r[n].file=void 0)})),URL.revokeObjectURL(e.url)}))},$=L.length>=g;return(0,n.jsx)(a.I.Wrapper,{label:h,description:(0,n.jsxs)(s.Z,{children:[(0,n.jsx)(l.x,{children:"".concat(L.length,"/").concat(g," uploaded files")}),m&&(0,n.jsx)(c.x,{ml:"auto",children:m})]}),...j,error:null!==(t=j.error)&&void 0!==t?t:Z,children:(0,n.jsxs)(u.K,{my:5,children:[(0,n.jsx)(x.fh,{accept:Q.d1,onDrop:V,maxFiles:g-L.length,className:C({[E.disabled]:$}),styles:e=>({root:j.error||Z?{borderColor:e.colors.red[6],marginBottom:e.spacing.xs/2}:void 0}),disabled:$,children:(0,n.jsxs)(s.Z,{position:"center",spacing:"xl",style:{minHeight:120,pointerEvents:"none"},children:[(0,n.jsx)(x.fh.Accept,{children:(0,n.jsx)(N.Z,{size:50,stroke:1.5,color:O.colors[O.primaryColor]["dark"===O.colorScheme?4:6]})}),(0,n.jsx)(x.fh.Reject,{children:(0,n.jsx)(R.Z,{size:50,stroke:1.5,color:O.colors.red["dark"===O.colorScheme?4:6]})}),(0,n.jsx)(x.fh.Idle,{children:(0,n.jsx)(_.Z,{size:50,stroke:1.5})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(l.x,{size:"xl",inline:!0,children:"Drag images here or click to select files"}),(0,n.jsxs)(l.x,{size:"sm",color:"dimmed",inline:!0,mt:7,children:[g?"Attach up to ".concat(g," files"):"Attach as many files as you like",", each file should not exceed ".concat((0,ee.td)(v))]})]})]})}),I&&(0,n.jsxs)(i.LB,{sensors:P,collisionDetection:i.pE,onDragEnd:function(e){let{active:t,over:r}=e;r&&t.id!==r.id&&U.setState(e=>{let n=e.map(e=>{let{url:t}=e;return t}),i=n.indexOf(t.id),a=n.indexOf(r.id);return(0,o.Rp)(e,i,a)})},onDragStart:function(e){H(e.active.id)},onDragCancel:function(){H(void 0)},children:[(0,n.jsx)(o.Fo,{items:L.map(e=>e.url),disabled:!S,children:L.length>0?(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(".concat(g>1?3:1,", 1fr)"),gridGap:10},children:L.map((e,t)=>{var r;let i=A.find(t=>e.file===t.file),{progress:o}=null!=i?i:{progress:0},a=i&&o<100||e.file;return a?(0,n.jsx)("div",{children:(0,n.jsx)(d.X,{withBorder:!0,style:{position:"relative",height:"96px",width:"96px"},children:(0,n.jsx)(f.f,{visible:!!a})})},t):(0,n.jsx)(et,{image:e,index:t,removeImage:D,withMeta:b,filesHandler:U,isPrimary:!0===y&&0===t,sortable:S},null!==(r=e.id)&&void 0!==r?r:e.url)})}):null}),y&&(0,n.jsx)(i.y9,{adjustScale:!0,children:B&&(0,n.jsx)(G,{isPrimary:0===L.findIndex(e=>e.url===B),image:L.find(e=>e.url===B),id:"selected"})})]})]})})}),it=(0,ei.l)(function(e){let{value:t,onChange:r,dropzoneProps:i,renderItem:o,orientation:c,showDropzoneStatus:d=!0,onFilesValidate:f,...p}=e,h=(0,el.rZ)(),{uploadToS3:m,files:g}=(0,nr.d)(),[v,b]=T(t||[]),[S,k]=(0,w.useState)([]),j=async e=>{if(k([]),(null==i?void 0:i.maxFiles)&&v.length+e.length>i.maxFiles){k(["Max files exceeded"]);return}if(f){let r=await f(e);if(!r.valid){var t;k(null!==(t=r.errors)&&void 0!==t?t:[]);return}}let r=(await Promise.all(e.map(e=>m(e,"default")))).filter(e=>{let{url:t}=e;return!!t}).map(e=>{var t;return{url:e.url,name:null!==(t=e.name)&&void 0!==t?t:"",sizeKB:e.size?(0,ee.qw)(e.size):0,metadata:{}}});b.append(...r)},E=e=>{b.remove(e),null==r||r(v.slice(0,e).concat(v.slice(e+1)))},O=(e,t)=>{b.setItem(t,e)};(0,z.l)(()=>{v&&v.length&&(null==r||r(v))},[v]);let C=g.filter(e=>"uploading"===e.status),I=S.length>0,{accept:P,maxSize:A,maxFiles:_}=null!=i?i:{},M=(P?Array.isArray(P)?P:Object.values(P).flat():[]).filter(e=>e!==Q.LO.xZipCompressed&&e!==Q.LO.xZipMultipart).map(e=>e.replace(/.*\//,".")),D="vertical"===c;return(0,n.jsxs)(u.K,{children:[(0,n.jsx)(a.I.Wrapper,{...p,error:S.length>0?S[0]:p.error,description:(null==i?void 0:i.maxFiles)?"".concat(v.length,"/").concat(i.maxFiles," uploaded files"):p.description,children:(0,n.jsx)(x.fh,{...i,mt:5,accept:P,onDrop:j,onReject:e=>{k((0,nn.R1)(e.flatMap(e=>e.errors),"code").map(e=>e.message))},styles:e=>({root:p.error||I?{borderColor:e.colors.red[6],marginBottom:e.spacing.xs/2}:void 0}),sx:d?void 0:e=>({"&[data-reject], &[data-reject]:hover, &[data-accept], &[data-accept]:hover":{background:e.colors.dark[5],borderColor:e.colors.dark[4]}}),children:(0,n.jsxs)(s.Z,{position:"center",spacing:D?8:"xl",style:{minHeight:120,pointerEvents:"none",flexDirection:D?"column":"row"},noWrap:!0,children:[d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.fh.Accept,{children:(0,n.jsx)(N.Z,{size:50,stroke:1.5,color:h.colors[h.primaryColor]["dark"===h.colorScheme?4:6]})}),(0,n.jsx)(x.fh.Reject,{children:(0,n.jsx)(R.Z,{size:50,stroke:1.5,color:h.colors.red["dark"===h.colorScheme?4:6]})}),(0,n.jsx)(x.fh.Idle,{children:(0,n.jsx)(nt.Z,{size:50,stroke:1.5})})]}):(0,n.jsx)(nt.Z,{size:50,stroke:1.5}),(0,n.jsxs)(u.K,{spacing:4,align:D?"center":"flex-start",children:[(0,n.jsx)(l.x,{size:"xl",children:"Drop your files or click to select"}),(0,n.jsxs)(l.x,{color:"dimmed",size:"sm",children:[_?"Attach up to ".concat(_," files"):"Attach as many files as you like",A&&". Each file should not exceed ".concat((0,ee.td)(null!=A?A:0)),M.length>0&&". Accepted file types: ".concat(M.join(", "))]})]})]})})}),(0,n.jsxs)(u.K,{spacing:8,children:[v.map((e,t)=>{var r;return(0,n.jsx)(s.Z,{spacing:8,position:"apart",noWrap:!0,children:o?o(e,()=>E(t),e=>{O(e,t)}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.x,{size:"sm",weight:500,lineClamp:1,children:e.name}),(0,n.jsx)(r9.u,{label:"Remove",children:(0,n.jsx)(y.A,{size:"sm",color:"red",variant:"transparent",onClick:()=>E(t),children:(0,n.jsx)(L.Z,{})})})]})},null!==(r=e.id)&&void 0!==r?r:e.url)}),C.map((e,t)=>(0,n.jsx)(ni,{...e},t))]})]})}),ir=(0,ei.l)(function(e){var t,r;let{value:i,onChange:o,previewWidth:c=96,maxSize:p=Y._G.mediaUpload.maxImageFileSize,previewDisabled:h,...m}=e,{uploadToCF:g,files:v,resetFiles:y}=(0,X.R)(),[b,S]=(0,w.useState)("string"==typeof i&&(0,r0.K2)(i)?{url:i}:void 0),[k,j]=(0,w.useState)(""),E=v[0],O=async e=>{if(e.some(e=>e.size>p))return j("File should not exceed ".concat((0,ee.td)(p)));j(""),S(void 0),y();let[t]=e;await g(t)};(0,z.l)(()=>{if(E&&(S({url:E.url,objectUrl:E.objectUrl}),"success"===E.status)){let{status:e,...t}=E;null==o||o(t)}},[E]),(0,w.useEffect)(()=>{let e=i?"string"==typeof i?{url:i}:i:void 0;e&&(null==b?void 0:b.url)!==e.url&&S(e)},[i]);let C=!!m.error||!!k,I=E&&E.progress<100;return(0,n.jsx)(a.I.Wrapper,{...m,error:null!==(t=m.error)&&void 0!==t?t:k,children:(0,n.jsxs)(s.Z,{style:{alignItems:"stretch",marginBottom:C?5:void 0},grow:!0,children:[(0,n.jsx)(d.X,{withBorder:!b,style:{position:"relative",height:"".concat(c,"px"),width:"".concat(c,"px"),display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexGrow:0,borderRadius:"50%"},children:I?(0,n.jsx)(f.f,{visible:!!I}):b?(0,n.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,n.jsx)(Z.i,{src:null!==(r=b.objectUrl)&&void 0!==r?r:b.url,style:{minHeight:"100%",objectFit:"cover"}})}):(0,n.jsx)(rQ.Z,{size:40})}),(0,n.jsx)(u.K,{maw:"unset",children:(0,n.jsx)(x.fh,{onDrop:O,accept:Q.d1,maxFiles:1,sx:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"},radius:"md",styles:e=>({root:C?{borderColor:e.colors.red[6]}:void 0}),children:(0,n.jsx)(l.x,{color:"dimmed",children:"Drop image here, should not exceed ".concat((0,ee.td)(p))})})})]})})}),ii=(0,ei.l)(no.J),io=(0,ei.l)(function(e){var t,r;let{value:i=[],onChange:o,target:l,filter:c,autosuggest:u,...d}=e;i=Array.isArray(i)?i:i?[i]:[];let{classes:f}=r7(),[h,m]=(0,w.useState)(""),[g]=(0,r5.G)(h,300),[v,{open:b,close:x}]=(0,r4.q)(!1),S=h.trim().toLowerCase(),{data:k,isFetching:j}=r8.SX.tag.getAll.useQuery({limit:20,entityType:l,categories:!1,query:g.trim().toLowerCase()},{enabled:u&&g.trim().length>0}),E=(0,w.useMemo)(()=>{var e,t,r;return c?null!==(t=null==k?void 0:null===(e=k.items)||void 0===e?void 0:e.filter(c))&&void 0!==t?t:[]:null!==(r=null==k?void 0:k.items)&&void 0!==r?r:[]},[null==k?void 0:k.items,c]),O=(0,w.useMemo)(()=>i.map(e=>e.name),[i]),C=!!S&&!O.includes(S)&&(null===(t=null==c?void 0:c({name:S}))||void 0===t||t),I=(0,w.useCallback)(()=>{x(),m("")},[x]),P=(0,w.useCallback)(e=>{let t=[...i,{id:e.id,name:e.value.trim().toLowerCase()}];null==o||o(t),I()},[I,o,i]),A=e=>{let t=[...i];t.splice(e,1),null==o||o(t)},T=(0,w.useCallback)(()=>{if(!C){I();return}S&&P({value:S})},[P,I,C,S]);return(0,n.jsx)(a.I.Wrapper,{...d,children:(0,n.jsxs)(s.Z,{mt:5,spacing:8,children:[i.map((e,t)=>{var r;return(0,n.jsx)(r2.C,{size:"xs",sx:{paddingRight:5},rightSection:(0,n.jsx)(y.A,{size:"xs",color:"blue",radius:"xl",variant:"transparent",onClick:()=>A(t),children:(0,n.jsx)(R.Z,{size:12})}),children:e.name},null!==(r=e.id)&&void 0!==r?r:t)}),(0,n.jsx)(r2.C,{className:f.badge,classNames:{inner:f.inner},onClick:v?void 0:b,tabIndex:0,onKeyDown:v?void 0:(0,r3.yr)([["Enter",b],["Space",b]]),leftSection:v&&(0,n.jsx)(p.M,{children:(0,n.jsx)(r6.Z,{size:14})}),children:v?u?(0,n.jsx)(tD.F,{variant:"unstyled",classNames:{dropdown:f.dropdown},data:null!==(r=E.filter(e=>!O.includes(e.name)).map(e=>({id:e.id,value:e.name,group:h?void 0:"Trending tags"})))&&void 0!==r?r:[],onChange:m,onKeyDown:(0,r3.yr)([["Enter",()=>{var e;if(!C)return;let t=E.find(e=>e.name===S);P({id:null==t?void 0:t.id,value:null!==(e=null==t?void 0:t.name)&&void 0!==e?e:h})}]]),nothingFound:j?"Searching...":C?(0,n.jsx)(eh.k,{className:f.createOption,onClick:()=>P({value:h}),children:'+ Create tag "'.concat(h,'"')}):"Nothing found",placeholder:"Type to search...",onItemSubmit:P,onBlur:I,withinPortal:!0,autoFocus:!0}):(0,n.jsx)(eg.o,{variant:"unstyled",onChange:e=>m(e.currentTarget.value),onKeyDown:(0,r3.yr)([["Enter",T]]),placeholder:"Type your tag",onBlur:T,autoFocus:!0}):(0,n.jsx)(r6.Z,{size:16})})]})})}),ia=(0,ei.l)(rY),is=(0,ei.l)(na.l),il=(0,ei.l)(function(e){var t;let{value:r,onChange:i,type:o,...c}=e,[f,p]=(0,w.useState)(""),[h,m]=(0,w.useState)(r||[]),[g,v]=(0,w.useState)("");return(0,z.l)(()=>{h&&(null==i||i(h))},[h]),(0,z.l)(()=>{(0,nc.Z)(r,h)||m(r||[])},[r]),(0,n.jsx)(a.I.Wrapper,{...c,error:null!==(t=c.error)&&void 0!==t?t:f,children:(0,n.jsxs)(u.K,{spacing:"xs",mt:"sm",children:[h.length>0&&(0,n.jsx)(d.X,{withBorder:!0,p:"sm",children:(0,n.jsx)(u.K,{children:h.map((e,t)=>{let r=t===h.length-1;return(0,n.jsxs)(w.Fragment,{children:[(0,n.jsxs)(s.Z,{align:"center",noWrap:!0,children:[(0,n.jsx)(ns.R,{url:e.url,size:24}),(0,n.jsx)(l.x,{size:"sm",children:e.url}),(0,n.jsx)(y.A,{variant:"outline",color:"red",size:"md",radius:"sm",ml:"auto",onClick:()=>{m(e=>e.filter((e,r)=>r!==t))},children:(0,n.jsx)(L.Z,{size:16})})]}),!r&&(0,n.jsx)(em.i,{})]},t)})})}),(0,n.jsxs)(s.Z,{children:[(0,n.jsx)(eg.o,{value:g,onChange:e=>v(e.target.value),radius:"sm",size:"sm",placeholder:"Add new link",styles:{root:{flex:1}}}),(0,n.jsx)(y.A,{variant:"filled",color:"blue",size:"lg",radius:"sm",ml:"auto",onClick:()=>{if(!nl.zc.safeUrl.safeParse(g).success){p("Provided URL appears to be invalid");return}m(e=>[...e,{url:g,type:o}]),v("")},children:(0,n.jsx)(r6.Z,{size:16})})]})]})})}),ic=(0,ei.l)(e=>{var t;let{value:r,onChange:s,username:f,limit:h=15,...g}=e,{classes:v}=nm(),[y,b]=(0,w.useState)(r||[]),[x,S]=(0,w.useState)(""),k=(0,w.useMemo)(()=>[...y].sort((e,t)=>{let r="".concat(e.entityType,"-").concat(e.entityId),n="".concat(t.entityType,"-").concat(t.entityId);return r.localeCompare(n)}),[y]),{data:j,isLoading:E,isRefetching:O}=r8.SX.image.getEntitiesCoverImage.useQuery({entities:k},{enabled:k.length>0,keepPreviousData:!0,trpc:{context:{skipBatch:!0}}});(0,z.l)(()=>{y&&(null==s||s(y))},[y]),(0,z.l)(()=>{(0,nc.Z)(r,y)||b(r||[])},[r]);let C=e=>{b(t=>t.filter(t=>!(t.entityId===e.entityId&&t.entityType===e.entityType)))},I=(0,i.Dy)((0,i.VT)(i.we,{activationConstraint:{distance:8}}));return(0,n.jsx)(a.I.Wrapper,{...g,error:null!==(t=g.error)&&void 0!==t?t:x,children:(0,n.jsxs)(u.K,{spacing:"xs",mt:"sm",children:[f&&(0,n.jsx)(nd._,{supportedIndexes:["models","images"],onItemSelected:e=>{y.find(t=>t.entityId===e.entityId&&t.entityType===e.entityType)||(y.length>=h?b(t=>[e,...t.slice(0,h-1)]):b(t=>[e,...t]))},filters:"user.username='".concat(f,"'"),dropdownItemLimit:25}),(0,n.jsx)(d.X,{mt:"md",children:(0,n.jsx)(i.LB,{sensors:I,collisionDetection:i.Xo,onDragEnd:e=>{let{active:t,over:r}=e;r&&t.id!==r.id&&b(e=>{let n=e.map(e=>{let{entityType:t,entityId:r}=e;return"".concat(t,"-").concat(r)}),i=n.indexOf(t.id),a=n.indexOf(r.id);return(0,o.Rp)(e,i,a)})},children:(0,n.jsx)(o.Fo,{items:y.map(e=>"".concat(e.entityType,"-").concat(e.entityId)),strategy:o.U2,children:y.length>0?(0,n.jsx)(c.x,{className:v.selectedItemsGrid,children:y.map(e=>{let t=null==j?void 0:j.find(t=>t.entityType===e.entityType&&t.entityId===e.entityId),r=(0,n.jsx)(nu.z,{onClick:()=>C(e),className:v.selectedItemRemove,color:"red",variant:"filled",radius:"xl",children:(0,n.jsx)(L.Z,{size:15})}),i="".concat(e.entityType,"-").concat(e.entityId);return t?(0,n.jsx)(np.T,{id:i,children:(0,n.jsxs)(c.x,{pos:"relative",children:[(0,n.jsx)(nf.t,{...e,image:t,disabled:!0}),r]})},i):(0,n.jsx)(np.T,{id:i,children:(0,n.jsxs)(d.X,{withBorder:!0,radius:"md",p:"md",pos:"relative",children:[(0,n.jsx)(u.K,{w:"100%",h:"100%",children:(0,n.jsx)(p.M,{children:O||E?(0,n.jsx)(m.a,{}):(0,n.jsx)(l.x,{align:"center",children:"There was a problem loading the cover image."})})}),r]})},i)})}):(0,n.jsx)(p.M,{children:(0,n.jsx)(l.x,{size:"sm",color:"dimmed",children:"You have not selected any items to showcase."})})})})})]})})}),iu=(0,ei.l)(e=>{var t;let{value:r,onChange:i,...o}=e,[c,d]=(0,w.useState)(null),[f,h]=(0,w.useState)(r||[]),{data:g=[],isFetching:v}=r8.SX.club.getTiers.useQuery({clubIds:f.map(e=>e.clubId)},{enabled:f.length>0,keepPreviousData:!0}),{userClubs:y,isLoading:b}=(0,nb.a8)();(0,z.l)(()=>{f&&(null==i||i(f))},[f]),(0,z.l)(()=>{(0,nc.Z)(r,f)||h(r||[])},[r]);let x=e=>{h(t=>t.find(t=>t.clubId===e)?t.filter(t=>t.clubId!==e):[...t,{clubId:e,clubTierIds:[]}])},S=(e,t)=>{h(r=>r.map(r=>{var n,i,o;return r.clubId===e?{...r,clubTierIds:(null!==(n=r.clubTierIds)&&void 0!==n?n:[]).includes(t)?(null!==(i=r.clubTierIds)&&void 0!==i?i:[]).filter(e=>e!==t):[...null!==(o=r.clubTierIds)&&void 0!==o?o:[],t]}:r}))},k=e=>{h(t=>t.map(t=>t.clubId===e?{...t,clubTierIds:[]}:t))};return b?(0,n.jsx)(p.M,{children:(0,n.jsx)(m.a,{})}):(0,n.jsx)(a.I.Wrapper,{...o,error:null!==(t=o.error)&&void 0!==t?t:c,children:(0,n.jsx)(u.K,{spacing:"xs",mt:"sm",children:(null!=y?y:[]).map(e=>{var t;let r=f.find(t=>t.clubId===e.id),i=g.filter(t=>t.clubId===e.id),o=null!==(t=null==r?void 0:r.clubTierIds)&&void 0!==t?t:[];return(0,n.jsxs)(u.K,{children:[(0,n.jsx)(ej.X,{checked:!!r,onChange:()=>{x(e.id)},label:e.name}),r&&(0,n.jsxs)(s.Z,{children:[(0,n.jsx)(eU.A,{variant:"filled",radius:"xs",size:"xs",checked:0===o.length,onChange:()=>{k(e.id)},children:"All tiers"}),0===i.length?v?(0,n.jsx)(m.a,{size:"xs"}):(0,n.jsx)(l.x,{color:"dimmed",size:"sm",children:"No tiers avilable for this club."}):null,i.length>0&&(0,n.jsx)(n.Fragment,{children:i.map(t=>{var i;return(0,n.jsx)(eU.A,{variant:"filled",radius:"xs",size:"xs",checked:null===(i=r.clubTierIds)||void 0===i?void 0:i.includes(t.id),onChange:()=>{S(e.id,t.id)},children:t.name},t.id)})})]}),(0,n.jsx)(em.i,{})]},e.id)})})})}),id=(0,ei.l)(e=>{var t;let{value:r,onChange:c,...f}=e,[p,h]=(0,w.useState)((0,ny.OW)(r||[])),[m,g]=(0,w.useState)("");(0,z.l)(()=>{p&&(null==c||c(p))},[p]),(0,z.l)(()=>{(0,nc.Z)(r,p)||h((0,ny.OW)(r||[]))},[r]);let v=e=>{h(t=>t.map(t=>t.key===e?{...t,enabled:!t.enabled}:t))},y=(0,i.Dy)((0,i.VT)(i.we,{activationConstraint:{distance:8}}));return(0,n.jsx)(a.I.Wrapper,{...f,error:null!==(t=f.error)&&void 0!==t?t:m,children:(0,n.jsx)(u.K,{mt:"md",spacing:"xs",children:(0,n.jsx)(i.LB,{sensors:y,collisionDetection:i.Xo,onDragEnd:e=>{let{active:t,over:r}=e;r&&t.id!==r.id&&h(e=>{let n=e.map(e=>{let{key:t}=e;return t}),i=n.indexOf(t.id),a=n.indexOf(r.id);return(0,o.Rp)(e,i,a)})},children:(0,n.jsx)(o.Fo,{items:p.map(e=>e.key),strategy:o.qw,children:(0,n.jsx)(u.K,{children:p.map(e=>(0,n.jsx)(np.T,{id:e.key,children:(0,n.jsx)(d.X,{sx:e=>({backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[1]}),withBorder:!0,p:"xs",radius:"md",children:(0,n.jsxs)(s.Z,{noWrap:!0,children:[(0,n.jsx)(nv,{}),(0,n.jsx)(l.x,{size:"sm",children:ny.K3[e.key]}),(0,n.jsx)(rt.r,{checked:e.enabled,onChange:()=>v(e.key),labelPosition:"left","aria-label":ny.K3[e.key],ml:"auto"})]})},e.key)},e.key))})})})})})}),ip=(0,ei.l)(rt.r,e=>{var t,r;let{field:n}=e;return{value:null!==(t=n.value)&&void 0!==t&&t,checked:null!==(r=n.value)&&void 0!==r&&r}}),ih=(0,ei.l)(ej.X,e=>{var t,r;let{field:n}=e;return{value:null!==(t=n.value)&&void 0!==t&&t,checked:null!==(r=n.value)&&void 0!==r&&r}});(0,ei.l)(function(e){let{flag:t,value:r=0,spacing:i,label:o,mapLabel:s,onChange:l}=e,c=(e,t)=>{l&&l(e?nx.v.addFlag(r,t):nx.v.removeFlag(r,t))},d=nS[t];return(0,n.jsxs)(u.K,{spacing:i,children:["string"==typeof o?(0,n.jsx)(a.I.Label,{children:o}):o,d.map(e=>{let t=nx.v.hasFlag(r,e.value),i=s?s(e):e.label;return(0,n.jsx)(ej.X,{label:i,value:e.value,checked:t,onChange:t=>c(t.target.checked,e.value)},e.value)})]})});let im=(0,ei.l)(e=>{var t;let{value:r,onChange:s,...f}=e,[h,m]=(0,w.useState)(r||[]),[g,v]=(0,w.useState)("");(0,z.l)(()=>{h&&(null==s||s(h))},[h]),(0,z.l)(()=>{(0,nc.Z)(r,h)||m(r||[])},[r]);let y=e=>{m(t=>t.filter(t=>t.id!==e))},b=(0,i.Dy)((0,i.VT)(i.we,{activationConstraint:{distance:8}}));return(0,n.jsx)(a.I.Wrapper,{...f,error:null!==(t=f.error)&&void 0!==t?t:g,children:(0,n.jsxs)(u.K,{spacing:"xs",mt:"sm",children:[(0,n.jsx)(nA,{onItemSelected:e=>{h.find(t=>t.id===e.id)||m(t=>{var r;return[...t,{title:e.title,description:null!==(r=e.description)&&void 0!==r?r:void 0,id:e.id}]})}}),(0,n.jsx)(d.X,{mt:"md",children:(0,n.jsx)(i.LB,{sensors:b,collisionDetection:i.Xo,onDragEnd:e=>{let{active:t,over:r}=e;r&&t.id!==r.id&&m(e=>{let n=e.map(e=>e.id),i=n.indexOf(t.id),a=n.indexOf(r.id);return(0,o.Rp)(e,i,a)})},children:(0,n.jsx)(o.Fo,{items:h.map(e=>e.id),strategy:o.U2,children:h.length>0?(0,n.jsx)(nj.r,{children:h.map(e=>(0,n.jsx)(np.T,{id:e.id,children:(0,n.jsx)(nj.r.Col,{span:12,md:3,children:(0,n.jsx)(d.X,{withBorder:!0,pos:"relative",p:"sm",radius:"lg",h:"100%",children:(0,n.jsxs)(u.K,{spacing:0,h:"100%",children:[(0,n.jsx)(l.x,{weight:"bold",size:"md",children:e.title}),e.description&&(0,n.jsx)(nO.i,{maxHeight:50,children:(0,n.jsx)(nC.u,{html:e.description})}),(0,n.jsx)(c.x,{mb:"md"}),(0,n.jsx)(nu.z,{onClick:()=>y(e.id),color:"red",variant:"filled",radius:"xl",mt:"auto",children:(0,n.jsx)(L.Z,{size:15})})]})})})},e.id))}):(0,n.jsx)(p.M,{children:(0,n.jsx)(l.x,{size:"sm",color:"dimmed",children:"You have not selected any items to display in this section."})})})})})]})})}),ig=(0,ei.l)(function(e){let{data:t,value:r=null,onChange:i,gridProps:o,nothingFound:s,shopUrl:c,onShopClick:f,...h}=e,{classes:m,cx:g}=n_(),v=e=>{null==i||i(e)},y=t.length>0;return(0,n.jsx)(a.I.Wrapper,{...h,children:(0,n.jsxs)(eO.M,{spacing:16,breakpoints:[{cols:3,maxWidth:"xs"},{cols:4,minWidth:"xs"},{cols:5,minWidth:"sm"},{cols:7,minWidth:"md"}],...o,children:[c&&(0,n.jsx)(nN.p,{href:c,children:(0,n.jsx)(eh.k,{p:"sm",className:m.decoration,onClick:f,children:(0,n.jsxs)(u.K,{spacing:4,align:"center",justify:"center",children:[(0,n.jsx)(nz,{size:24}),(0,n.jsx)(l.x,{size:"sm",weight:500,children:"Shop"})]})})}),y?t.map(e=>{let t=r&&r.id===e.id&&r.claimKey===e.claimKey;return(0,n.jsx)(nT.z,{label:"In use",position:"top-center",disabled:!e.inUse,color:"gray.1",styles:{indicator:{color:"#222",height:"auto !important",fontWeight:500}},inline:!0,children:(0,n.jsx)(eh.k,{className:g(m.decoration,t&&m.selected),p:"sm",onClick:()=>v(t?null:e),children:(0,n.jsx)(nR.$,{cosmetic:e})})},"".concat(e.id,":").concat(e.claimKey))}):(0,n.jsx)(d.X,{className:g(m.noContent,{[m.noContentNoUrl]:!c}),p:"sm",radius:"md",children:(0,n.jsx)(u.K,{h:"100%",justify:"center",children:(0,n.jsx)(p.M,{children:s||(0,n.jsx)(l.x,{size:"xs",children:"No decorations"})})})})]})})}),iv=(0,ei.l)(function(e){var t;let{value:r,username:i,onChange:o,...s}=e,{data:c,isInitialLoading:u,isRefetching:p}=r8.SX.collection.getById.useQuery({id:r},{enabled:!!r}),h=e=>{null==o||o(e)},m=(null==c?void 0:c.collection)?c.collection.image:null;return(0,n.jsx)(a.I.Wrapper,{...s,children:(0,n.jsxs)(d.X,{className:"relative",px:"sm",py:"xs",mt:5,withBorder:!0,children:[(0,n.jsx)(f.f,{visible:u||p}),(null==c?void 0:c.collection)&&r?(0,n.jsxs)("div",{className:"flex flex-nowrap items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-nowrap items-center gap-2",children:[m&&(0,n.jsx)("div",{className:"relative size-16 shrink-0 grow-0 overflow-hidden rounded-md",children:(0,n.jsx)(Z.P,{src:m.url,type:"image",width:450,anim:!1})}),(0,n.jsx)(l.x,{lineClamp:1,children:null==c?void 0:null===(t=c.collection)||void 0===t?void 0:t.name})]}),(0,n.jsx)(y.A,{radius:"xl",color:"red",variant:"light",onClick:()=>null==o?void 0:o(null),children:(0,n.jsx)(R.Z,{})})]}):(0,n.jsx)(nu.z,{variant:"outline",onClick:()=>{(0,nM.O_)({username:i,onSelect:h})},fullWidth:!0,children:"Click here to select a collection"})]})})});(0,ei.l)(function(e){let{value:t,defaultValue:r,onChange:i,options:o}=e;return(0,n.jsx)(nD.Ee,{value:t,defaultValue:r,onChange:i,children:o.map(e=>{let{label:t,value:r}=e;return(0,n.jsxs)(nW,{className:"flex items-center gap-2",children:[(0,n.jsx)(nD.Y8,{value:r,className:"group flex size-3 items-center justify-center rounded-full border bg-white data-[checked]:bg-blue-400",children:(0,n.jsx)("span",{className:"invisible size-1 rounded-full bg-white group-data-[checked]:visible"})}),(0,n.jsx)(nZ.__,{children:t})]},r)})})});let iy=(0,ei.l)(function(e){let{value:t,onChange:r,...i}=e,[o,l]=(0,w.useState)(t||0),c=(0,w.useCallback)(e=>{l(t=>nx.v.toggleFlag(t,e))},[l]);return(0,z.l)(()=>{o&&(null==r||r(o))},[o]),(0,z.l)(()=>{(0,nc.Z)(t,o)||l(t||0)},[t]),(0,n.jsx)(a.I.Wrapper,{...i,error:i.error,children:(0,n.jsx)(s.Z,{spacing:"xs",mt:"md",noWrap:!0,children:nw.Us.map(e=>(0,n.jsx)(n$,{level:e,browsingLevel:o,onToggle:c},e))})})});var ib=r(56312),ix=r(1604);let iw=e=>{let{schema:t,...r}=null!=e?e:{},[n,i]=(0,w.useState)(0),o=(0,nG.cI)({resolver:t?(0,ib.F)(t instanceof ix.z.ZodObject?t.passthrough():t):void 0,shouldUnregister:!0,...r}),a=(0,w.useCallback)(e=>{o.reset(e),i(e=>e+1)},[o]),s=(0,w.useCallback)(()=>i(e=>e+1),[]);return{...o,resetCount:n,reset:a,refresh:s}}},86647:function(e,t,r){"use strict";r.d(t,{Nk:function(){return n},cK:function(){return i},uq:function(){return o}});let n=[{label:"Explicit Adult Content",value:"explicit nudity",children:[{label:"Nudity",value:"nudity"},{label:"Explicit Male Nudity",value:"graphic male nudity"},{label:"Explicit Female Nudity",value:"graphic female nudity"},{label:"Sexual Acts",value:"sexual activity"},{label:"Illustrated Nudity",value:"illustrated explicit nudity"},{label:"Adult Products",value:"adult toys"}]},{label:"Suggestive Content",value:"suggestive",children:[{label:"Female Swimwear/Underwear",value:"female swimwear or underwear"},{label:"Male Swimwear/Underwear",value:"male swimwear or underwear"},{label:"Partial Nudity",value:"partial nudity"},{label:"Sexy Attire",value:"revealing clothes"},{label:"Sexual Situations",value:"sexual situations"}]},{label:"Violence",value:"violence",children:[{label:"Intense Violence/Gore",value:"graphic violence or gore"},{label:"Physical Violence",value:"physical violence"},{label:"Weapon-related Violence",value:"weapon violence"},{label:"Self-harm",value:"self injury",hidden:!0}]},{label:"Visually Disturbing",value:"visually disturbing",children:[{label:"Emaciated Figures",value:"emaciated bodies"},{label:"Deceased Bodies",value:"corpses"},{label:"Hanging",value:"hanging",hidden:!0},{label:"Explosions",value:"explosions and blasts"},{label:"Disturbing",value:"disturbing"}]},{label:"Offensive Gestures",value:"rude gestures",children:[{label:"Offensive gestures",value:"middle finger"}]},{label:"Hate Symbols",value:"hate symbols",hidden:!0,children:[{label:"Nazi-related Content",value:"nazi party"},{label:"White Supremacist Content",value:"white supremacy"},{label:"Extremist Content",value:"extremist"}]}],i={};for(let e of n)for(let t of(i[e.value]=e.label.toLowerCase(),e.children||[]))i[t.value]=t.label.toLowerCase();n.map(e=>e.value);let o={image:n,model:[{label:"Explicit Adult Content",value:"explicit nudity",children:[{label:"Sexual Acts",value:"sexual activity"}]},{label:"Violence",value:"violence",children:[{label:"Intense Violence/Gore",value:"graphic violence or gore"}]},{label:"Visually Disturbing",value:"visually disturbing",children:[{label:"Emaciated Figures",value:"emaciated bodies"},{label:"Deceased Bodies",value:"corpses"},{label:"Hanging",value:"hanging"},{label:"Disturbing",value:"disturbing"}]},{label:"Hate Symbols",value:"hate symbols",children:[{label:"Nazi-related Content",value:"nazi party"},{label:"White Supremacist Content",value:"white supremacy"},{label:"Extremist Content",value:"extremist"}]}]}},85208:function(e,t,r){"use strict";r.d(t,{Ik:function(){return o},R:function(){return a},ZQ:function(){return l}});var n=r(1604),i=r(86647);let o=n.z.enum(["model","image","tag","article"]),a=n.z.enum(["model","image"]),s={...i.cK,"1girl":"woman","2girls":"women","3girls":"women","4girls":"women","5girls":"women","6+girls":"women","multiple girls":"women","1boy":"man","2boys":"men","3boys":"men","4boys":"men","5boys":"men","6+boys":"men","multiple boys":"men",pussy:"vagina",ass:"butt","ass focus":"butt focus","huge ass":"huge butt"};function l(e){return s[e]||e}},50351:function(e,t,r){"use strict";r.r(t);var n=r(85893);r(67294);var i=r(62827);t.default=()=>(0,n.jsx)(i.T,{})},98678:function(e,t,r){"use strict";let n;r.r(t),r.d(t,{default:function(){return t6}});var i,o=r(85893),a=r(67294),s=r(63366);function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}var u=r(73935),d={disabled:!1},f=a.createContext(null),p="unmounted",h="exited",m="entering",g="entered",v="exiting",y=function(e){function t(t,r){n=e.call(this,t,r)||this;var n,i,o=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(i=h,n.appearStatus=m):i=g:i=t.unmountOnExit||t.mountOnEnter?p:h,n.state={status:i},n.nextCallback=null,n}c(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===p?{status:h}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==m&&r!==g&&(t=m):(r===m||r===g)&&(t=v)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},r.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===m?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===h&&this.setState({status:p})},r.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.isMounting:e,i=this.props.nodeRef?[n]:[u.findDOMNode(this),n],o=i[0],a=i[1],s=this.getTimeouts(),l=n?s.appear:s.enter;if(!e&&!r||d.disabled){this.safeSetState({status:g},function(){t.props.onEntered(o)});return}this.props.onEnter(o,a),this.safeSetState({status:m},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:g},function(){t.props.onEntered(o,a)})})})},r.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:u.findDOMNode(this);if(!t||d.disabled){this.safeSetState({status:h},function(){e.props.onExited(n)});return}this.props.onExit(n),this.safeSetState({status:v},function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:h},function(){e.props.onExited(n)})})})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:u.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(!r||n){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)},r.render=function(){var e=this.state.status;if(e===p)return null;var t=this.props,r=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,s.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.createElement(f.Provider,{value:null},"function"==typeof r?r(e,n):a.cloneElement(a.Children.only(r),n))},t}(a.Component);function b(){}y.contextType=f,y.propTypes={},y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:b,onEntering:b,onEntered:b,onExit:b,onExiting:b,onExited:b},y.UNMOUNTED=p,y.EXITED=h,y.ENTERING=m,y.ENTERED=g,y.EXITING=v;var x=r(87462);function w(e,t){var r=Object.create(null);return e&&a.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=t&&(0,a.isValidElement)(e)?t(e):e}),r}function S(e,t,r){return null!=r[t]?r[t]:e.props[t]}var k=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},j=function(e){function t(t,r){var n,i=(n=e.call(this,t,r)||this).handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n));return n.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},n}c(t,e);var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var r,n,i=t.children,o=t.handleExited;return{children:t.firstRender?w(e.children,function(t){return(0,a.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:S(t,"appear",e),enter:S(t,"enter",e),exit:S(t,"exit",e)})}):(Object.keys(n=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(n=0;n(e+1)%1e6;var P=r(73678),A=r(37048);let T=(0,a.createContext)(null);T.displayName="@mantine/notifications/NotificationsContext";var z=r(9585),N=function([e,t],r){let n={};return"top"===e&&(n.top=r),"bottom"===e&&(n.bottom=r),"left"===t&&(n.left=r),"right"===t&&(n.right=r),"center"===t&&(n.left="50%",n.transform="translateX(-50%)"),n},R=Object.defineProperty,_=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,L=(e,t,r)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t)=>{for(var r in t||(t={}))M.call(t,r)&&L(e,r,t[r]);if(_)for(var r of _(t))D.call(t,r)&&L(e,r,t[r]);return e};let U={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},B={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};var H=function({state:e,maxHeight:t,positioning:r,transitionDuration:n}){let[i,o]=r,a="center"===o?`${i}-center`:o,s={opacity:0,maxHeight:t,transform:U[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:B[a]},c={opacity:0,maxHeight:0,transform:U[a]};return F(F({},s),{entering:l,entered:l,exiting:c,exited:c}[e])},Z=r(12593),W=Object.defineProperty,V=Object.defineProperties,$=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))G.call(t,r)&&X(e,r,t[r]);if(q)for(var r of q(t))K.call(t,r)&&X(e,r,t[r]);return e},Y=(e,t)=>V(e,$(t)),Q=(e,t)=>{var r={};for(var n in e)G.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&q)for(var n of q(e))0>t.indexOf(n)&&K.call(e,n)&&(r[n]=e[n]);return r};function ee(e){var{notification:t,autoClose:r,onHide:n,innerRef:i}=e,o=Q(e,["notification","autoClose","onHide","innerRef"]);let{autoClose:s,message:l}=t,c=Q(t,["autoClose","message"]),u="number"==typeof s?s:!1!==s&&!1!==r&&r,d=(0,a.useRef)(),f=()=>{n(t.id),window.clearTimeout(d.current)},p=()=>{clearTimeout(d.current)},h=()=>{"number"==typeof u&&(d.current=window.setTimeout(f,u))};return(0,a.useEffect)(()=>{"function"==typeof t.onOpen&&t.onOpen(t)},[]),(0,a.useEffect)(()=>(h(),p),[r,t.autoClose]),a.createElement(Z.P,Y(J(J({},c),o),{onClose:f,onMouseEnter:p,onMouseLeave:h,ref:i}),l)}ee.displayName="@mantine/notifications/NotificationContainer";var et=(0,r(56817).k)((e,{zIndex:t})=>({notifications:{width:`calc(100% - ${2*e.spacing.md}px)`,boxSizing:"border-box",position:"fixed",zIndex:t},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}})),er=r(89058),en=Object.defineProperty,ei=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,ea=Object.getOwnPropertySymbols,es=Object.prototype.hasOwnProperty,el=Object.prototype.propertyIsEnumerable,ec=(e,t,r)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eu=(e,t)=>{for(var r in t||(t={}))es.call(t,r)&&ec(e,r,t[r]);if(ea)for(var r of ea(t))el.call(t,r)&&ec(e,r,t[r]);return e},ed=(e,t)=>ei(e,eo(t)),ef=function({limit:e}){let{state:t,queue:r,update:n,cleanQueue:i}=function({initialValues:e=[],limit:t}){let[{state:r,queue:n},i]=(0,a.useState)({state:e.slice(0,t),queue:e.slice(t)});return{state:r,queue:n,add:(...e)=>i(r=>{let n=[...r.state,...r.queue,...e];return{state:n.slice(0,t),queue:n.slice(t)}}),update:e=>i(r=>{let n=e([...r.state,...r.queue]);return{state:n.slice(0,t),queue:n.slice(t)}}),cleanQueue:()=>i(e=>({state:e.state,queue:[]}))}}({initialValues:[],limit:e});return{notifications:t,queue:r,showNotification:e=>{let t=e.id||(0,er.k)();return n(r=>e.id&&r.some(t=>t.id===e.id)?r:[...r,ed(eu({},e),{id:t})]),t},updateNotification:e=>n(t=>{let r=t.findIndex(t=>t.id===e.id);if(-1===r)return t;let n=[...t];return n[r]=e,n}),hideNotification:e=>n(t=>t.filter(t=>t.id!==e||("function"==typeof t.onClose&&t.onClose(t),!1))),cleanQueue:i,clean:()=>n(()=>[])}},ep=Object.defineProperty,eh=Object.getOwnPropertySymbols,em=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,ev=(e,t,r)=>t in e?ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ey=(e,t)=>{for(var r in t||(t={}))em.call(t,r)&&ev(e,r,t[r]);if(eh)for(var r of eh(t))eg.call(t,r)&&ev(e,r,t[r]);return e},eb=(e,t)=>{var r={};for(var n in e)em.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&eh)for(var n of eh(e))0>t.indexOf(n)&&eg.call(e,n)&&(r[n]=e[n]);return r};let ex=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"];function ew(e){var{className:t,position:r="bottom-right",autoClose:n=4e3,transitionDuration:i=250,containerWidth:o=440,notificationMaxHeight:s=200,limit:l=5,zIndex:c=(0,E.w)("overlay"),style:u,children:d,target:f}=e,p=eb(e,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);let h=function(){let[,e]=(0,a.useReducer)(I,0);return e}(),m=(0,a.useRef)({}),g=(0,a.useRef)(0),{notifications:v,queue:b,showNotification:x,updateNotification:w,hideNotification:S,clean:k,cleanQueue:R}=ef({limit:l}),{classes:_,cx:M,theme:D}=et({zIndex:c}),L=(0,P.J)(),F=D.respectReducedMotion&&L?1:i,U=(ex.includes(r)?r:"bottom-right").split("-");(0,A.l)(()=>{v.length>g.current&&setTimeout(()=>h(),0),g.current=v.length},[v]),(0,z.Gy)({show:x,hide:S,update:w,clean:k,cleanQueue:R});let B=v.map(e=>a.createElement(y,{key:e.id,timeout:F,onEnter:()=>m.current[e.id].offsetHeight,nodeRef:{current:m.current[e.id]}},t=>a.createElement(ee,{innerRef:t=>{m.current[e.id]=t},notification:e,onHide:S,className:_.notification,autoClose:n,sx:[ey({},H({state:t,positioning:U,transitionDuration:F,maxHeight:s})),...Array.isArray(e.sx)?e.sx:[e.sx]]})));return a.createElement(T.Provider,{value:{notifications:v,queue:b}},a.createElement(O.h,{target:f},a.createElement(C.x,ey({className:M(_.notifications,t),style:u,sx:ey({maxWidth:o},N(U,D.spacing.md))},p),a.createElement(j,null,B))),d)}ew.displayName="@mantine/notifications/NotificationsProvider";let eS=function(){return null};var ek=r(47041),ej=r(27484),eE=r.n(ej),eO=r(1646),eC=r.n(eO),eI=r(66607),eP=r.n(eI),eA=r(37181),eT=r.n(eA),ez=r(84110),eN=r.n(ez),eR=r(70178),e_=r.n(eR),eM=r(65155),eD=r(33299),eL=r(7544),eF=r.n(eL),eU=r(9008),eB=r.n(eU),eH=r(40828),eZ=r(28345),eW=r(5152),eV=r.n(eW),e$=r(12603),eq=r(84137),eG=r(90512),eK=r(11163),eX=r(73445),eJ=r(782);let eY={left:"right",right:"left",top:"bottom",bottom:"top"},eQ=(0,eX.Ue)()((0,eJ.tJ)(()=>({}),{name:"resizable"})),e0=e=>{let{orientation:t="horizontal",resizePosition:r,minWidth:n,maxWidth:i,defaultWidth:o,name:s}=null!=e?e:{},[l,c]=(0,a.useState)(null),[u,d]=(0,a.useState)(null),[f,p]=(0,a.useState)(!1),h=(0,a.useRef)(0);(0,a.useEffect)(()=>{var e;if(!l)return;let t=null!==(e=eQ.getState()[s])&&void 0!==e?e:o;h.current=requestAnimationFrame(()=>{l.style.width="".concat(t,"px")})},[s,l]);let m="horizontal"===t?"clientX":"clientY",g=(0,a.useCallback)(e=>{e.preventDefault(),p(!0)},[]),v=(0,a.useCallback)(()=>{p(!1),h.current&&cancelAnimationFrame(h.current)},[]),y=(0,a.useCallback)(e=>{if(f&&l){let t=(()=>{let t=e[m],o=r?t-l.getBoundingClientRect()[eY[r]]:t;return n&&oi?i:o})();eQ.setState(()=>({[s]:t})),h.current=requestAnimationFrame(()=>{l.style.width="".concat(t,"px")})}},[f]);return(0,a.useEffect)(()=>(window.addEventListener("mousemove",y),window.addEventListener("mouseup",v),null==u||u.addEventListener("mousedown",g),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",v),null==u||u.removeEventListener("mousedown",g),h.current&&cancelAnimationFrame(h.current)}),[y,v,u,l,g]),{containerRef:c,resizerRef:d}};var e1=r(14549),e2=r.n(e1);function e5(e){let{children:t,resizePosition:r,minWidth:n,maxWidth:i,defaultWidth:a,name:s,...l}=e,{containerRef:c,resizerRef:u}=e0({resizePosition:r,minWidth:n,maxWidth:i,defaultWidth:a,name:s}),d=(0,o.jsx)("div",{className:e2().resizer,ref:u});return(0,o.jsxs)("div",{...l,style:{...l.style},className:(0,eG.Z)(e2().sidebar,e2()[r],l.className),ref:c,children:["left"===r&&d,(0,o.jsx)("div",{className:e2().content,children:t}),"right"===r&&d]})}var e4=r(3153);let e3=eV()(()=>Promise.all([r.e(5908),r.e(6505),r.e(1197),r.e(2797),r.e(5998)]).then(r.bind(r,65998)),{loadableGenerated:{webpack:()=>[65998]}});function e6(){let e=(0,e4.Pr)(e=>e.opened),t=(0,eK.useRouter)(),[r,n]=(0,a.useState)(!1),i=t.pathname.startsWith("/generate"),s=e||i,l=(0,a.useCallback)(()=>{n(eQ.getState()["generation-sidebar"]+320>window.innerWidth)},[]);return((0,a.useEffect)(()=>{i&&e4.Ft.open()},[i]),(0,a.useEffect)(()=>{s&&(l(),eQ.subscribe(e=>{var t;n((null!==(t=e["generation-sidebar"])&&void 0!==t?t:400)+320>window.innerWidth)}))},[s,l]),(0,eq.s)("resize",l),s)?(0,o.jsx)(e5,{name:"generation-sidebar",resizePosition:"right",minWidth:350,maxWidth:800,defaultWidth:400,className:(0,eG.Z)("z-10",r&&"z-[210] max-w-0"),children:(0,o.jsx)("div",{className:(0,eG.Z)("size-full",r&&"fixed inset-0 w-screen"),children:(0,o.jsx)(e$.jm,{containerName:"generation-sidebar",className:"bg-gray-0 dark:bg-dark-7",children:(0,o.jsx)(e3,{fullScreen:r})})})}):null}var e8=r(5779);function e7(){let{isGreen:e}=(0,e8.g)();return(0,o.jsxs)(eB(),{children:[(0,o.jsx)("meta",{name:"viewport",content:"maximum-scale=1, initial-scale=1, width=device-width"}),(0,o.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,o.jsx)("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),(0,o.jsx)("meta",{name:"6a97888e-site-verification",content:"f517e489c958cfe10876b8f7daa294c2"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2048-2732.jpg",media:"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2732-2048.jpg",media:"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1668-2388.jpg",media:"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2388-1668.jpg",media:"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1536-2048.jpg",media:"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2048-1536.jpg",media:"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1668-2224.jpg",media:"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2224-1668.jpg",media:"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1620-2160.jpg",media:"(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2160-1620.jpg",media:"(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1290-2796.jpg",media:"(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2796-1290.jpg",media:"(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1179-2556.jpg",media:"(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2556-1179.jpg",media:"(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1284-2778.jpg",media:"(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2778-1284.jpg",media:"(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1170-2532.jpg",media:"(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2532-1170.jpg",media:"(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1125-2436.jpg",media:"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2436-1125.jpg",media:"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1242-2688.jpg",media:"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2688-1242.jpg",media:"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-828-1792.jpg",media:"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1792-828.jpg",media:"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1242-2208.jpg",media:"(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-2208-1242.jpg",media:"(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-750-1334.jpg",media:"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1334-750.jpg",media:"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-640-1136.jpg",media:"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-1136-640.jpg",media:"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2048-2732.jpg",media:"(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2732-2048.jpg",media:"(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1668-2388.jpg",media:"(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2388-1668.jpg",media:"(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1536-2048.jpg",media:"(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2048-1536.jpg",media:"(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1668-2224.jpg",media:"(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2224-1668.jpg",media:"(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1620-2160.jpg",media:"(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2160-1620.jpg",media:"(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1290-2796.jpg",media:"(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2796-1290.jpg",media:"(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1179-2556.jpg",media:"(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2556-1179.jpg",media:"(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1284-2778.jpg",media:"(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2778-1284.jpg",media:"(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1170-2532.jpg",media:"(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2532-1170.jpg",media:"(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1125-2436.jpg",media:"(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2436-1125.jpg",media:"(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1242-2688.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2688-1242.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-828-1792.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1792-828.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1242-2208.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-2208-1242.jpg",media:"(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-750-1334.jpg",media:"(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1334-750.jpg",media:"(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-640-1136.jpg",media:"(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"}),(0,o.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/splash/apple-splash-dark-1136-640.jpg",media:"(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"}),(0,o.jsx)("link",{rel:"icon",href:"/favicon-".concat(e?"green":"blue",".ico"),type:"image/x-icon"})]})}var e9=r(87650),te=r(17578),tt=r(7379);let tr=eV()(()=>r.e(4164).then(r.bind(r,24164)),{loadableGenerated:{webpack:()=>[24164]}}),tn=eV()(()=>Promise.all([r.e(4713),r.e(1737)]).then(r.bind(r,81737)),{loadableGenerated:{webpack:()=>[81737]}});function ti(e){var t;let{children:r}=e,n=(0,te.xJ)(),i=null!==(t=null==n?void 0:n.bannedAt)&&void 0!==t&&t,a=!!n&&!e9.cp.every(e=>tt.v.hasFlag(n.onboarding,e));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e7,{}),(0,o.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[!i&&!a&&(0,o.jsx)(e6,{}),(0,o.jsx)(e$.jm,{id:"main",containerName:"main",className:"flex-1",children:i?(0,o.jsx)(tr,{}):a?(0,o.jsx)(tn,{onComplete:()=>{}}):r})]})]})}var to=r(52119),ta=r(50351);function ts(e){let{children:t,conditional:r}=e,n=(0,eD.useSession)(),i=(0,e8.g)();if(r){if("loading"===n.status)return(0,o.jsx)(to.w,{});if(!r(i))return(0,o.jsx)(ta.default,{})}return t}var tl=r(36429),tc=r(58456),tu=r(50899),td=r(38577),tf=r(50970),tp=r(85891),th=r(20573),tm=r(40572),tg=r(89521),tv=r(56311),ty=r(57652),tb=r(60326),tx=r(40893),tw=r(41746),tS=r(14619);function tk(){let e=(0,tl.mq)().asPath.split("?")[0],t=(0,a.useRef)([{visible:Date.now()}]),r=(0,a.useRef)(0),n=(0,a.useRef)({value:e,prev:null});return(0,a.useEffect)(()=>{let e=history.pushState,i=history.replaceState;function o(){return t.current.reduce((e,t)=>{let{visible:r,hidden:n=Date.now()}=t;return e+(n-r)},0)}function a(e){let i=n.current.value;e!==i&&(r.current=o(),t.current=[{visible:Date.now()}],n.current={value:e,prev:i})}function s(e){e&&a(new URL(e,location.origin).pathname)}function l(){a(location.pathname)}function c(){"visible"===document.visibilityState?t.current.push({visible:Date.now()}):t.current[t.current.length-1].hidden=Date.now()}function u(){tj({path:location.pathname,duration:o()})}return document.addEventListener("visibilitychange",c),window.addEventListener("popstate",l),window.addEventListener("beforeunload",u),history.replaceState=function(e,t,r){return s(r),i.apply(history,[e,t,r])},history.pushState=function(t,r,n){return s(n),e.apply(history,[t,r,n])},function(){history.pushState=e,history.replaceState=i,window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u),document.removeEventListener("visibilitychange",c)}},[]),(0,a.useEffect)(()=>{let e=n.current.prev;e&&tj({path:e,duration:r.current})},[e]),null}function tj(e){let{path:t,duration:r}=e;if(r<1e3)return;let n=Object.keys(tw.P2).length>0;for(let e in fetch("/api/page-view",{method:"post",keepalive:!0,body:JSON.stringify((0,tS.HO)({duration:r,ads:!!n||void 0,path:t,windowWidth:window.outerWidth,windowHeight:window.outerHeight}))}),tw.P2)delete tw.P2[e]}var tE=r(61119);let tO=eV()(()=>r.e(4528).then(r.bind(r,54528)),{loadableGenerated:{webpack:()=>[54528]}}),tC=!1;function tI(e){let{children:t}=e;return(0,a.useEffect)(()=>{n||(n=window.fetch,window.fetch=async function(){for(var e=arguments.length,t=Array(e),r=0;r{let t=e||("dark"===n?"light":"dark");i(t),(0,ek.setCookie)("mantine-color-scheme",t,{expires:eE()().add(1,"year").toDate()})},[n]);return(0,a.useEffect)(()=>{void 0===n&&i(window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");{let e=document.querySelector("body");"dark"===n?null==e||e.classList.add("dark"):null==e||e.classList.remove("dark")}},[n]),(0,o.jsx)(tU.A,{colorScheme:n,toggleColorScheme:s,children:(0,o.jsx)(tB.Me,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:n,components:{Modal:{styles:{modal:{maxWidth:"100%"},inner:{paddingLeft:0,paddingRight:0}}},Drawer:{styles:{drawer:{containerName:"drawer",containerType:"inline-size",display:"flex",flexDirection:"column"},body:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},header:{margin:0}}},Tooltip:{defaultProps:{withArrow:!0}},Popover:{styles:{dropdown:{maxWidth:"100vw"}}},Rating:{styles:{symbolBody:{cursor:"pointer"}}},Switch:{styles:{body:{verticalAlign:"top"},track:{cursor:"pointer"},label:{cursor:"pointer"}}},Radio:{styles:{radio:{cursor:"pointer"},label:{cursor:"pointer"}}},Badge:{styles:{leftSection:{lineHeight:1}},defaultProps:{radius:"sm"}},Checkbox:{styles:{input:{cursor:"pointer"},label:{cursor:"pointer"}}},Menu:{styles:{itemLabel:{display:"flex"}}}},colors:{accent:["#F4F0EA","#E8DBCA","#E2C8A9","#E3B785","#EBA95C","#FC9C2D","#E48C27","#C37E2D","#A27036","#88643B"],success:["#9EC3B8","#84BCAC","#69BAA2","#4CBD9C","#32BE95","#1EBD8E","#299C7A","#2F826A","#326D5C","#325D51"]},white:"#fefefe",black:"#222",other:{fadeIn:"opacity 200ms ease-in"},respectReducedMotion:!0},children:t})})}var tZ=r(80050),tW=r(72794),tV=r(95448),t$=r(72456);r(48199);var tq=r(19236),tG=r(95117),tK=r(54685),tX=r(54777),tJ=r(48350),tY=r(79543);class tQ extends a.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.log("Error Boundary:",{error:e,errorInfo:t}),this.setState({error:e,stack:t.componentStack}),fetch("/api/application-error",{method:"POST",body:JSON.stringify({message:e.message,stack:t.componentStack})})}render(){return this.state.hasError?(0,o.jsxs)("div",{className:"flex size-full flex-col items-center justify-center p-2",children:[(0,o.jsxs)("div",{className:"mb-5 flex flex-col items-center",children:[(0,o.jsx)(tq.D,{children:"Whoops!"}),(0,o.jsx)(tq.D,{children:"Something went wrong :("})]}),(0,o.jsx)(tG.x,{children:"Try refreshing or navigating to a different page"}),(0,o.jsx)("ul",{className:"mt-1 flex flex-wrap gap-2",children:this.options.map((e,t)=>{let{key:r,url:n}=e;return(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(tK.e,{component:tY.p,href:n,className:"capitalize leading-none",children:r}),t!==this.options.length-1&&(0,o.jsx)(tX.i,{orientation:"vertical"})]},r)})})]}):this.props.children}constructor(...e){super(...e),this.state={hasError:!1},this.options=(0,tJ.br)(this.props.features)}}function t0(e){let{children:t}=e,r=(0,e8.g)();return(0,o.jsx)(tQ,{features:r,children:t})}var t1=r(82260);let t2=null===(i=r(524).O.NEXT_PUBLIC_BASE_URL)||void 0===i?void 0:i.startsWith("https://"),t5="".concat(t2?"__Secure-":"","civitai-token");var t4=r(83454);function t3(e){var t,r,n;let{Component:i,pageProps:{session:a,colorScheme:s,cookies:l=(0,tt.j)((0,ek.getCookies)()),flags:c,seed:u=Date.now(),canIndex:d,hasAuthCookie:f,...p}}=e;return(0,o.jsxs)(tT.w,{seed:u,canIndex:d,children:[(0,o.jsx)(eB(),{children:(0,o.jsx)("title",{children:"Civitai | Share your models"})}),(0,o.jsx)(tH,{colorScheme:s,children:(0,o.jsx)(tI,{children:(0,o.jsxs)(tL.h,{children:[(0,o.jsx)(tV.fK,{}),(0,o.jsx)(tW.vK,{}),(0,o.jsx)(tb.W,{}),(0,o.jsx)(eD.SessionProvider,{session:a||(f?void 0:null),refetchOnWindowFocus:!1,refetchWhenOffline:!1,children:(0,o.jsxs)(e8.O,{flags:c,children:[(0,o.jsx)(tM,{}),(0,o.jsx)(tf.u,{children:(0,o.jsx)(tp.c,{disableHidden:l.disableHidden,children:(0,o.jsx)(t0,{children:(0,o.jsx)(tz.G7,{children:(0,o.jsx)(tc.M9,{children:(0,o.jsx)(tx.Fu,{children:(0,o.jsx)(tA.Y,{children:(0,o.jsx)(ty.F,{...l.referrals,children:(0,o.jsx)(tR.Wy,{children:(0,o.jsx)(eH.i,{children:(0,o.jsx)(tF.x,{children:(0,o.jsx)(tg.m,{children:(0,o.jsx)(td.TO,{children:(0,o.jsx)(ew,{className:"notifications-container",zIndex:9999,children:(0,o.jsx)(tl.dW,{children:(0,o.jsx)(tv.dS,{children:(0,o.jsxs)(ti,{children:[tP.BB&&(0,o.jsx)(tk,{}),(0,o.jsx)(tu.Rv,{children:(0,o.jsxs)(tN.c,{children:[(t=(0,o.jsx)(i,{...p}),(0,o.jsx)(ts,{conditional:null==i?void 0:i.features,children:(0,o.jsx)(tc.VK,{browsingLevel:i.browsingLevel,children:null!==(n=null===(r=i.getLayout)||void 0===r?void 0:r.call(i,t))&&void 0!==n?n:(0,o.jsx)(eZ.LN,{left:i.left,right:i.right,subNav:i.subNav,scrollable:i.scrollable,footer:i.footer,announcements:i.announcements,children:i.InnerLayout?(0,o.jsx)(i.InnerLayout,{children:t}):t})})})),(0,o.jsx)(th.T,{}),(0,o.jsx)(tm.nG,{})]})})]})})})})})})})})})})})})})})})})})]})})]})})}),tP.r8&&(0,o.jsx)(eS,{})]})}eE().extend(eC()),eE().extend(eP()),eE().extend(eT()),eE().extend(eN()),eE().extend(e_()),(0,eM.zR)("civitai",!0),t3.getInitialProps=async e=>{var t;let r=await eF().getInitialProps(e),n=e.ctx.req;if(!n)return r;let{pageProps:i,...o}=r,a=null!==(t=(0,ek.getCookie)("mantine-color-scheme",e.ctx))&&void 0!==t?t:"dark",s=(0,ek.getCookies)(e.ctx),l=(0,tt.j)(s),c=Object.keys(s).some(e=>e.endsWith("civitai-token")),u=(0,tZ.BZ)({host:null==n?void 0:n.headers.host}),d=Object.values(tZ.Wu).includes(n.headers.host),f=await (0,t1.getToken)({req:e.ctx.req,secret:t4.env.NEXTAUTH_SECRET,cookieName:t5}),p=(null==f?void 0:f.user)?{user:f.user}:null;return p&&(e.ctx.req.session=p),{pageProps:{...i,colorScheme:a,cookies:l,canIndex:d,session:p,flags:u,seed:Date.now(),hasAuthCookie:c},...o}};var t6=t$.SX.withTRPC(t3)},32759:function(e,t,r){"use strict";r.d(t,{Y:function(){return h},r:function(){return p}});var n=r(85893),i=r(21997),o=r(40393),a=r(67294),s=r(17578),l=r(72456);let c=[];async function u(){c.length&&(await fetch("/api/internal/activity",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({activities:c})}),c.length=0),setTimeout(u,1e4)}let d=!1,f=(0,a.createContext)({}),p=()=>{let e=(0,a.useContext)(f);if(!e)throw Error("useDeviceFingerprint must be used within a ActivityReportingProvider");return e};function h(e){let{children:t}=e,r=(0,s.xJ)(),[p,h]=(0,i._)({key:"fingerprint",defaultValue:void 0}),m=l.SX.user.ingestFingerprint.useMutation({onSuccess(e){h(e)}});return(0,a.useEffect)(()=>{!window.localStorage.getItem("fingerprint")&&(null==r?void 0:r.id)&&!m.isLoading&&(0,o.$)().then(e=>{m.mutate({fingerprint:e.toString()})})},[null==r?void 0:r.id,m.isLoading,p]),d||(document.addEventListener("click",e=>{let t=e.target;for(;t;){if(t.dataset.activity){c.push(t.dataset.activity);return}t=t.parentElement}},!0),u(),d=!0),(0,n.jsx)(f.Provider,{value:{fingerprint:p},children:t})}},66035:function(e,t,r){"use strict";r.d(t,{b:function(){return a},w:function(){return s}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null);function a(){let e=(0,i.useContext)(o);if(!e)throw Error("missing AppProvider in tree");return e}function s(e){let{children:t,...r}=e;return(0,n.jsx)(o.Provider,{value:r,children:t})}},15131:function(e,t,r){"use strict";r.d(t,{G7:function(){return v},WX:function(){return b},s7:function(){return y}});var n=r(85893),i=r(67294),o=r(73445),a=r(43973),s=r(85891),l=r(7379),c=r(64980),u=r(85625),d=r(2807),f=r(72456),p=r(77446),h=r(782);let m=(0,i.createContext)(null),g=(0,u.Ot)(1e3);function v(e){var t;let{children:r}=e,{type:o,settings:l}=(0,s.I)(),{mutate:u}=f.SX.user.updateContentSettings.useMutation({onError:e=>{(0,d.s9)({title:"Failed to update settings",error:Error(e.message)})}}),v=(0,i.useRef)({}),y=(0,i.useRef)(null);return y.current||(y.current=(t={...l},(0,a.M)()((0,h.mW)(e=>({...t,setState:t=>e(e=>"function"==typeof t?t(e):t)}),{name:"browing settings"}))),v.current=l),(0,i.useEffect)(()=>{y.current&&(y.current.setState({...l}),v.current=l)},[l]),(0,i.useEffect)(()=>{let e=y.current;if(!e||"unauthed"===o)return;let t=e.subscribe((e,t)=>{let{setState:r,...n}=e;g(()=>{var e;let r=(e=v.current,Object.keys(n).reduce((t,r)=>(0,p.Z)(n[r],e[r])?t:{...t,[r]:n[r]},{}));Object.keys(r).length>0&&(u(r),v.current=n),n.disableHidden!==t.disableHidden&&(0,c.d)("disableHidden",n.disableHidden)})});return()=>{t()}},[o]),(0,n.jsx)(m.Provider,{value:y.current,children:r})}function y(e){let t=(0,i.useContext)(m);if(!t)throw Error("Missing ContentSettingsProvider");return(0,o.oR)(t,e)}function b(){let e=y(e=>e.setState);return function(t){e(e=>({browsingLevel:l.v.hasFlag(e.browsingLevel,t)?l.v.removeFlag(e.browsingLevel,t):l.v.addFlag(e.browsingLevel,t)}))}}},76083:function(e,t,r){"use strict";r.d(t,{c:function(){return ef},C:function(){return ep}});var n=r(85893),i=r(67294),o=r(38090),a=r(3594),s=r(89058);let l=(0,i.createContext)(null);l.displayName="@mantine/modals/ModalsContext";var c=r(64523),u=r(71232),d=r(67841),f=Object.defineProperty,p=Object.defineProperties,h=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))g.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))v.call(t,r)&&y(e,r,t[r]);return e},x=(e,t)=>p(e,h(t));function w({id:e,cancelProps:t,confirmProps:r,labels:n={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:a=!0,groupProps:s,onCancel:f,onConfirm:p,children:h}){let{cancel:m,confirm:g}=n,v=function(){let e=(0,i.useContext)(l);if(!e)throw Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}();return i.createElement(i.Fragment,null,h&&i.createElement(c.x,{mb:"md"},h),i.createElement(u.Z,b({position:"right"},s),i.createElement(d.z,x(b({variant:"default"},t),{onClick:r=>{"function"==typeof(null==t?void 0:t.onClick)&&(null==t||t.onClick(r)),"function"==typeof f&&f(),a&&v.closeModal(e)}}),(null==t?void 0:t.children)||m),i.createElement(d.z,x(b({},r),{onClick:t=>{"function"==typeof(null==r?void 0:r.onClick)&&(null==r||r.onClick(t)),"function"==typeof p&&p(),o&&v.closeModal(e)}}),(null==r?void 0:r.children)||g)))}function S(e,t){switch(t.type){case"OPEN":return{current:t.payload,modals:[...e.modals,t.payload]};case"CLOSE":{let r=e.modals.filter(e=>e.id!==t.payload);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return{current:e.current,modals:[]};default:return e}}var k=r(25963),j=Object.defineProperty,E=Object.defineProperties,O=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))I.call(t,r)&&A(e,r,t[r]);if(C)for(var r of C(t))P.call(t,r)&&A(e,r,t[r]);return e},z=(e,t)=>E(e,O(t)),N=(e,t)=>{var r={};for(var n in e)I.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&C)for(var n of C(e))0>t.indexOf(n)&&P.call(e,n)&&(r[n]=e[n]);return r};function R({children:e,modalProps:t,labels:r,modals:n}){let[c,u]=(0,i.useReducer)(S,{modals:[],current:null}),d=(0,i.useRef)(c);d.current=c;let f=(0,i.useCallback)(e=>{d.current.modals.forEach(t=>{var r,n,i,o;"confirm"===t.type&&e&&(null==(n=(r=t.props).onCancel)||n.call(r)),null==(o=(i=t.props).onClose)||o.call(i)}),u({type:"CLOSE_ALL"})},[d,u]),p=(0,i.useCallback)(e=>{var{modalId:t}=e,r=N(e,["modalId"]);let n=t||(0,s.k)();return u({type:"OPEN",payload:{id:n,type:"content",props:r}}),n},[u]),h=(0,i.useCallback)(e=>{var{modalId:t}=e,r=N(e,["modalId"]);let n=t||(0,s.k)();return u({type:"OPEN",payload:{id:n,type:"confirm",props:r}}),n},[u]),m=(0,i.useCallback)((e,t)=>{var{modalId:r}=t,n=N(t,["modalId"]);let i=r||(0,s.k)();return u({type:"OPEN",payload:{id:i,type:"context",props:n,ctx:e}}),i},[u]),g=(0,i.useCallback)((e,t)=>{var r,n,i,o;let a=d.current.modals.find(t=>t.id===e);a&&("confirm"===a.type&&t&&(null==(n=(r=a.props).onCancel)||n.call(r)),null==(o=(i=a.props).onClose)||o.call(i),u({type:"CLOSE",payload:a.id}))},[d,u]);(0,k.Ro)({openModal:p,openConfirmModal:h,openContextModal:e=>{var{modal:t}=e;return m(t,N(e,["modal"]))},closeModal:g,closeAllModals:f});let v={modals:c.modals,openModal:p,openConfirmModal:h,openContextModal:m,closeModal:g,closeAll:f},{modalProps:y,content:b}=(()=>{let e=d.current.current;switch(null==e?void 0:e.type){case"context":{let t=e.props,{innerProps:r}=t,o=N(t,["innerProps"]),a=n[e.ctx];return{modalProps:o,content:i.createElement(a,{innerProps:r,context:v,id:e.id})}}case"confirm":{let{modalProps:t,confirmProps:n}=function(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:r,onCancel:n,onConfirm:i,closeOnConfirm:o,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:u}=e;return{confirmProps:{id:t,children:r,onCancel:n,onConfirm:i,closeOnConfirm:o,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:u},modalProps:T({id:t},N(e,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]))}}(e.props);return{modalProps:t,content:i.createElement(w,z(T({},n),{id:e.id,labels:e.props.labels||r}))}}case"content":{let t=e.props,{children:r}=t;return{modalProps:N(t,["children"]),content:i.createElement(i.Fragment,null,r)}}default:return{modalProps:{},content:null}}})();return i.createElement(l.Provider,{value:v},i.createElement(o.u,z(T(T({zIndex:(0,a.w)("modal")+1},t),y),{opened:c.modals.length>0,onClose:()=>g(c.current.id)}),b),e)}var _=r(5152),M=r.n(_),D=r(73729),L=r(70600),F=r(27977),U=r(90717),B=r(53772),H=r(9155),Z=r(26813),W=r(33428),V=r(7823),$=r(10479),q=r(76994),G=r(53624),K=r(65850);let X=M()(()=>r.e(8349).then(r.bind(r,68349)),{loadableGenerated:{webpack:()=>[68349]}}),J=M()(()=>Promise.resolve().then(r.bind(r,26813)),{loadableGenerated:{webpack:()=>[26813]}}),Y=M()(()=>Promise.resolve().then(r.bind(r,7823)),{loadableGenerated:{webpack:()=>[7823]}}),Q=M()(()=>Promise.resolve().then(r.bind(r,9155)),{loadableGenerated:{webpack:()=>[9155]}}),ee=M()(()=>Promise.resolve().then(r.bind(r,27977)),{loadableGenerated:{webpack:()=>[27977]}}),et=M()(()=>r.e(6931).then(r.bind(r,96931)),{loadableGenerated:{webpack:()=>[96931]}}),er=M()(()=>Promise.resolve().then(r.bind(r,53624)),{loadableGenerated:{webpack:()=>[53624]}}),en=M()(()=>Promise.resolve().then(r.bind(r,90717)),{loadableGenerated:{webpack:()=>[90717]}}),ei=M()(()=>Promise.resolve().then(r.bind(r,53772)),{loadableGenerated:{webpack:()=>[53772]}}),eo=M()(()=>Promise.resolve().then(r.bind(r,10479)),{loadableGenerated:{webpack:()=>[10479]}}),ea=M()(()=>Promise.resolve().then(r.bind(r,73729)),{loadableGenerated:{webpack:()=>[73729]}}),es=M()(()=>Promise.resolve().then(r.bind(r,76994)),{loadableGenerated:{webpack:()=>[76994]}}),el=M()(()=>Promise.resolve().then(r.bind(r,65850)),{loadableGenerated:{webpack:()=>[65850]}}),ec=M()(()=>Promise.resolve().then(r.bind(r,33428)),{loadableGenerated:{webpack:()=>[33428]}}),eu=M()(()=>Promise.resolve().then(r.bind(r,70600)),{loadableGenerated:{webpack:()=>[70600]}}),ed={blockModelTags:{Component:J,fn:Z.openBlockModelTagsModal},unpublishModel:{Component:er,fn:G.openUnpublishModal},runStrategy:{Component:Y,fn:V.openRunStrategyModal},"civitai-link-wizard":{Component:ee,fn:F.openCivitaiLinkModal},associateModels:{Component:Q,fn:H.openAssociateModelsModal},addToCollection:{Component:en,fn:U.openAddToCollectionModal},manageHomeBlocks:{Component:ei,fn:B.openManageHomeBlocksModal},sendTip:{Component:eo,fn:$.openSendTipModal},bountyEntryFiles:{Component:ea,fn:D.openBountyEntryFilesModal},stripeTransaction:{Component:es,fn:q.openStripeTransactionModal},userProfileEditModal:{Component:el,fn:K.openUserProfileEditModal},manageClubPostModal:{Component:ec,fn:W.openManageClubPostModal},chatShareModal:{Component:eu,fn:L.openChatShareModal}},ef=e=>{let{children:t}=e;return(0,n.jsx)(R,{labels:{confirm:"Confirm",cancel:"Cancel"},modals:{questionsInfo:X,"civitai-link-success":et,...Object.keys(ed).reduce((e,t)=>(e[t]=ed[t].Component,e),{})},modalProps:{zIndex:400},children:t})};function ep(e,t,r){ed[e].fn(t,r)}},5779:function(e,t,r){"use strict";r.d(t,{O:function(){return u},g:function(){return c}});var n=r(85893),i=r(33299),o=r(67294),a=r(80050),s=r(72456);let l=(0,o.createContext)(null),c=()=>{let e=(0,o.useContext)(l);if(!e)throw Error("useFeatureFlags can only be used inside FeatureFlagsCtx");return e},u=e=>{var t,r;let{children:c,flags:u}=e,d=(0,i.useSession)(),[f,p]=(0,o.useState)(null!=u?u:(0,a.BZ)({user:null===(t=d.data)||void 0===t?void 0:t.user,host:location.host}));(0,o.useEffect)(()=>{var e;p((0,a.BZ)({user:null===(e=d.data)||void 0===e?void 0:e.user,host:location.host}))},[null===(r=d.data)||void 0===r?void 0:r.expires]);let{data:h={}}=s.SX.user.getFeatureFlags.useQuery(void 0,{cacheTime:1/0,staleTime:1/0,retry:0,enabled:!!d.data}),m=(0,o.useMemo)(()=>({...f,...h}),[f,h]);return(0,n.jsx)(l.Provider,{value:m,children:c})}},38394:function(e,t,r){"use strict";r.d(t,{Bx:function(){return U},Nv:function(){return A},PH:function(){return D},Wy:function(){return L}});var n=r(85893),i=r(67294),o=r(1604),a=r(43973),s=r(73445),l=r(782),c=r(38498),u=r(32957),d=r(32760),f=r(62260),p=r(32508),h=r(35818),m=r(14619);let g=o.z.object({period:o.z.nativeEnum(h.Tz).default(h.Tz.Month),periodMode:d.XY,sort:o.z.nativeEnum(u.Qp).default(u.Qp.HighestRated),types:o.z.nativeEnum(h.BY).array().optional(),checkpointType:o.z.nativeEnum(h.yz).optional(),baseModels:o.z.enum(c._G.baseModels).array().optional(),status:o.z.nativeEnum(h.GJ).array().optional(),earlyAccess:o.z.boolean().optional(),supportsGeneration:o.z.boolean().optional(),fromPlatform:o.z.boolean().optional(),followed:o.z.boolean().optional(),archived:o.z.boolean().optional(),hidden:o.z.boolean().optional(),fileFormats:o.z.enum(c._G.modelFileFormats).array().optional(),pending:o.z.boolean().optional()}),v=o.z.object({sort:o.z.nativeEnum(u.hx).default(u.hx.MostLiked),period:o.z.nativeEnum(h.Tz).default(h.Tz.AllTime),status:o.z.nativeEnum(u.xV).optional()}),y=o.z.object({period:o.z.nativeEnum(h.Tz).default(h.Tz.Week),periodMode:d.XY.optional(),sort:o.z.nativeEnum(u.FA).default(u.FA.MostReactions),generation:o.z.nativeEnum(h.uy).array().optional(),types:o.z.array(o.z.nativeEnum(h.DD)).default([h.DD.image]),withMeta:o.z.boolean().optional(),fromPlatform:o.z.boolean().optional(),hideAutoResources:o.z.boolean().optional(),hideManualResources:o.z.boolean().optional(),notPublished:o.z.boolean().optional(),scheduled:o.z.boolean().optional(),hidden:o.z.boolean().optional(),followed:o.z.boolean().optional(),tools:o.z.number().array().optional(),techniques:o.z.number().array().optional(),baseModels:o.z.enum(c._G.baseModels).array().optional(),remixesOnly:o.z.boolean().optional(),nonRemixesOnly:o.z.boolean().optional()}),b=y.extend({sort:o.z.nativeEnum(u.FA).default(u.FA.Newest),period:o.z.nativeEnum(h.Tz).default(h.Tz.AllTime),types:o.z.array(o.z.nativeEnum(h.DD)).default([])}),x=o.z.object({period:o.z.nativeEnum(h.Tz).default(h.Tz.Week),periodMode:d.XY,sort:o.z.nativeEnum(u.H_).default(u.H_.MostReactions),followed:o.z.boolean().optional()}),w=o.z.object({period:o.z.nativeEnum(h.Tz).default(h.Tz.Month),periodMode:d.XY,sort:o.z.nativeEnum(u.Qo).default(u.Qo.MostBookmarks),followed:o.z.boolean().optional()}),S=o.z.object({sort:o.z.nativeEnum(u.CI).default(c._G.collectionFilterDefaults.sort)}),k=o.z.object({period:o.z.nativeEnum(h.Tz).default(h.Tz.AllTime),periodMode:d.XY.optional(),sort:o.z.nativeEnum(u.Tp).default(u.Tp.EndingSoon),status:o.z.nativeEnum(u.lQ).default(u.lQ.Open)}).merge(f.By.omit({query:!0,period:!0,sort:!0,limit:!0,cursor:!0,status:!0,mode:!0})),j=o.z.object({sort:o.z.nativeEnum(u.xU).default(u.xU.Newest)}).merge(p.NZ.omit({sort:!0,limit:!0,cursor:!0,nsfw:!0})),E=o.z.object({sort:o.z.nativeEnum(u.AX).default(u.AX.Newest)}),O=o.z.object({sort:o.z.nativeEnum(u.YJ).default(u.YJ.Newest),marker:o.z.nativeEnum(u.QZ).optional(),tags:o.z.string().array().optional()}),C=o.z.object({sort:o.z.nativeEnum(u.IM).default(u.IM.Newest),type:o.z.nativeEnum(h.FG).optional()}),I=o.z.object({sort:o.z.nativeEnum(u.vL).default(u.vL.Newest)}),P=["models","images","posts","articles","bounties"],A=e=>P.includes(e),T={models:{key:"model-filters",schema:g},questions:{key:"question-filters",schema:v},images:{key:"image-filters",schema:y},modelImages:{key:"model-image-filters",schema:b},posts:{key:"post-filters",schema:x},articles:{key:"article-filters",schema:w},collections:{key:"collections-filters",schema:S},bounties:{key:"bounties-filters",schema:k},clubs:{key:"clubs-filters",schema:j},videos:{key:"videos-filters",schema:y},threads:{key:"thread-filters",schema:E},markers:{key:"marker-filters",schema:O},tools:{key:"tool-filters",schema:C},buzzWithdrawalRequests:{key:"buzz-withdrawal-request-filters",schema:I}},z=e=>{var t;let{key:r,schema:n}=e,i=function(e){try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}(null!==(t=localStorage.getItem(r))&&void 0!==t?t:"{}"),o=n.safeParse(i);if(o.success)return o.data;{let e=n.parse({});return localStorage.setItem(r,F(e)),e}},N=()=>Object.entries(T).reduce((e,t)=>{let[r,n]=t;return{...e,[r]:z({key:n.key,schema:n.schema})}},{});function R(e){let{key:t,data:r,state:n}=e,i=(0,m.HO)({...n[t],...r});return localStorage.setItem(T[t].key,F(i)),{[t]:i}}let _=()=>(0,a.M)()((0,l.mW)(e=>({...N(),setModelFilters:t=>e(e=>R({key:"models",data:t,state:e})),setQuestionFilters:t=>e(e=>R({key:"questions",data:t,state:e})),setImageFilters:t=>e(e=>R({key:"images",data:t,state:e})),setModelImageFilters:t=>e(e=>R({key:"modelImages",data:t,state:e})),setPostFilters:t=>e(e=>R({key:"posts",data:t,state:e})),setArticleFilters:t=>e(e=>R({key:"articles",data:t,state:e})),setCollectionFilters:t=>e(e=>R({key:"collections",data:t,state:e})),setBountyFilters:t=>e(e=>R({key:"bounties",data:t,state:e})),setClubFilters:t=>e(e=>R({key:"clubs",data:t,state:e})),setVideoFilters:t=>e(e=>R({key:"videos",data:t,state:e})),setThreadFilters:t=>e(e=>R({key:"threads",data:t,state:e})),setMarkerFilters:t=>e(e=>R({key:"markers",data:t,state:e})),setToolFilters:t=>e(e=>R({key:"tools",data:t,state:e})),setBuzzWithdrawalRequestFilters:t=>e(e=>R({key:"buzzWithdrawalRequests",data:t,state:e}))}))),M=(0,i.createContext)(null);function D(e){let t=(0,i.useContext)(M);if(!t)throw Error("Missing FiltersContext.Provider in the tree");return(0,s.oR)(t,e)}let L=e=>{let{children:t}=e,r=(0,i.useRef)();return r.current||(r.current=_()),(0,n.jsx)(M.Provider,{value:r.current,children:t})};function F(e){try{return JSON.stringify(e)}catch(e){throw Error("Failed to serialize the value")}}function U(e){return D((0,i.useCallback)(t=>({models:t.setModelFilters,posts:t.setPostFilters,images:t.setImageFilters,questions:t.setQuestionFilters,modelImages:t.setModelImageFilters,articles:t.setArticleFilters,collections:t.setCollectionFilters,bounties:t.setBountyFilters,clubs:t.setClubFilters,videos:t.setVideoFilters,threads:t.setThreadFilters,markers:t.setMarkerFilters,tools:t.setToolFilters,buzzWithdrawalRequests:t.setBuzzWithdrawalRequestFilters})[e],[e]))}},76705:function(e,t,r){"use strict";r.d(t,{O:function(){return a},h:function(){return s}});var n=r(85893),i=r(67294);let o=(0,i.createContext)(null),a=()=>{let e=(0,i.useContext)(o);if(null===e)throw Error("missing IsClientContext");return e},s=e=>{let{children:t}=e,[r,a]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{a(!0)},[]),(0,n.jsx)(o.Provider,{value:r,children:t})}},72746:function(e,t,r){"use strict";r.d(t,{x:function(){return z},N:function(){return T}});var n,i,o,a,s,l,c,u,d,f,p,h=r(85893),m=r(21997);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function b(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,i)}var x="https://cdn.paddle.com/paddle/v2/paddle.js";(n=c||(c={})).CHECKOUT_LOADED="checkout.loaded",n.CHECKOUT_CLOSED="checkout.closed",n.CHECKOUT_UPDATED="checkout.updated",n.CHECKOUT_COMPLETED="checkout.completed",n.CHECKOUT_ERROR="checkout.error",n.CHECKOUT_FAILED="checkout.failed",n.CHECKOUT_ITEMS_UPDATED="checkout.items.updated",n.CHECKOUT_ITEMS_REMOVED="checkout.items.removed",n.CHECKOUT_CUSTOMER_CREATED="checkout.customer.created",n.CHECKOUT_CUSTOMER_UPDATED="checkout.customer.updated",n.CHECKOUT_CUSTOMER_REMOVED="checkout.customer.removed",n.CHECKOUT_PAYMENT_SELECTED="checkout.payment.selected",n.CHECKOUT_PAYMENT_INITIATED="checkout.payment.initiated",n.CHECKOUT_PAYMENT_FAILED="checkout.payment.failed",n.CHECKOUT_DISCOUNT_APPLIED="checkout.discount.applied",n.CHECKOUT_DISCOUNT_REMOVED="checkout.discount.removed",(i=u||(u={})).DAY="day",i.WEEK="week",i.MONTH="month",i.YEAR="year",(o=d||(d={})).ALIPAY="alipay",o.APPLE_PAY="apple-pay",o.CARD="card",o.GOOGLE_PAY="google-pay",o.IDEAL="ideal",o.PAYPAL="paypal",o.WIRE_TRANSFER="wire-transfer",o.NONE="none",(a=f||(f={})).AMERICAN_EXPRESS="american_express",a.DINERS_CLUB="diners_club",a.DISCOVER="discover",a.JCB="jcb",a.MADA="mada",a.MAESTRO="maestro",a.MASTER_CARD="mastercard",a.UNION_PAY="union_pay",a.VISA="visa",a.UNKNOWN="unknown",(s=p||(p={})).DRAFT="draft",s.READY="ready",s.COMPLETED="completed",s.BILLED="billed",s.canceled="canceled",s.PAST_DUE="past_due";var w=["environment"];function S(){var e;return e=y().mark(function e(t){var r,n,i;return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,void 0!==l?l:l=new Promise(function(e,t){if("undefined"==typeof window){e(void 0);return}if(window.Paddle){e(window.Paddle);return}try{var r=document.querySelector('script[src="'.concat(x,'"]'))||void 0;r||(r=function(e){var t=document.createElement("script");t.src=e;var r=document.head||document.body;if(!r)throw Error("Cannot inject Paddle.js. It needs a or element.");return r.appendChild(t),t}(x)),r.addEventListener("load",function(){window.Paddle?e(window.Paddle):t(Error("Paddle.js not available"))}),r.addEventListener("error",function(){t(Error("Failed to load Paddle.js"))})}catch(e){t(e);return}});case 2:if(!(r=e.sent)){e.next=8;break}if(t){n=t.environment,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,w);try{n&&r.Environment.set(n),r.Initialized?r.Update(v({},i)):r.Initialize(v({},i))}catch(e){console.warn("Paddle Initialization failed. Please check the inputs",e)}}return e.abrupt("return",r);case 8:return console.warn("Error Loading Paddle"),e.abrupt("return");case 10:case"end":return e.stop()}},e)}),(S=function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){b(o,n,i,a,s,"next",e)}function s(e){b(o,n,i,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)}var k=r(27484),j=r.n(k),E=r(67294),O=r(524),C=r(8346),I=r(17578),P=r(72688);let A=(0,E.createContext)(void 0),T=()=>{let e=(0,E.useContext)(A);if(!e)throw Error("Could not initialize paddle");return e};function z(e){let{children:t}=e,r=(0,I.xJ)(),[n,i]=(0,m._)({key:"retain-last-initialized-at",defaultValue:new Date,getInitialValueInEffect:!1}),[o,a]=(0,E.useState)(),s=(0,E.useRef)(),l=(0,E.useCallback)(e=>{var t,r,n;"checkout.completed"===e.name&&(null===(t=s.current)||void 0===t||t.emit(e.name,e.data)),"checkout.closed"===e.name&&(null===(r=s.current)||void 0===r||r.emit(e.name,void 0)),"checkout.loaded"===e.name&&(null===(n=s.current)||void 0===n||n.emit(e.name,void 0))},[s]);return(0,E.useEffect)(()=>{if(O.O.NEXT_PUBLIC_PADDLE_TOKEN&&!o){s.current=new P.v;let e=j()(n).add(1,"day").isBefore(j()()),t=r?r.paddleCustomerId&&e?{id:r.paddleCustomerId}:{email:r.email}:{};(function(e){return S.apply(this,arguments)})({environment:C.r8?"sandbox":"production",token:O.O.NEXT_PUBLIC_PADDLE_TOKEN,eventCallback:l,pwCustomer:t,checkout:{settings:{theme:"dark",allowLogout:!1}}}).then(t=>{t&&a(t),e&&i(new Date)})}},[r,l,o,n,i]),(0,h.jsx)(A.Provider,{value:{paddle:o,emitter:s.current},children:t})}},39755:function(e,t,r){"use strict";r.d(t,{x:function(){return a}}),r(85893);var n=r(67294),i=r(524);r(11163);var o=r(1604);r(2807);let a=()=>{let e=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(i.O.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY)return e.current||r.e(4465).then(r.bind(r,54465)).then(t=>{let{loadStripe:r}=t;e.current=r(i.O.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY)}),()=>{e.current=null}},[]),e.current};o.z.object({setup_intent:o.z.string().optional(),redirect_status:o.z.string().optional()})},38498:function(e,t,r){"use strict";r.d(t,{xx:function(){return L},iG:function(){return B},kw:function(){return W},LY:function(){return y},Cc:function(){return U},Oy:function(){return q},tQ:function(){return Z},N5:function(){return b},uI:function(){return er},P5:function(){return D},ch:function(){return x},TM:function(){return en},SV:function(){return w},Ni:function(){return M},B8:function(){return v},et:function(){return G},kY:function(){return V},V2:function(){return $},Y:function(){return H},Wq:function(){return F},Bj:function(){return f},wf:function(){return et},iQ:function(){return P},Uw:function(){return k},zR:function(){return ee},_G:function(){return d},GR:function(){return J},iC:function(){return K},Z5:function(){return X},A_:function(){return N},Yp:function(){return z},g7:function(){return _},bJ:function(){return m},FA:function(){return p},Ep:function(){return R},Mp:function(){return Y},Tt:function(){return A},zA:function(){return T},Dc:function(){return g}});var n,i=r(35818),o=r(83425),a=(0,r(21955).Z)("outline","currency-dollar","IconCurrencyDollar",[["path",{d:"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2",key:"svg-0"}],["path",{d:"M12 3v3m0 12v3",key:"svg-1"}]]),s=r(524),l=r(32957),c=r(72323),u=r(36777);let d={modelFilterDefaults:{sort:l.Qp.HighestRated,period:i.Tz.AllTime},questionFilterDefaults:{sort:l.hx.MostLiked,period:i.Tz.AllTime,limit:50},galleryFilterDefaults:{sort:l.FA.MostReactions,period:i.Tz.AllTime,limit:50},postFilterDefaults:{sort:l.H_.MostReactions,period:i.Tz.AllTime,limit:50},articleFilterDefaults:{sort:l.Qo.Newest,period:i.Tz.AllTime,limit:50},collectionFilterDefaults:{sort:l.CI.Newest,limit:50},baseModels:["ODOR","SD 1.4","SD 1.5","SD 1.5 LCM","SD 1.5 Hyper","SD 2.0","SD 2.0 768","SD 2.1","SD 2.1 768","SD 2.1 Unclip","SDXL 0.9","SDXL 1.0","SD 3","SD 3.5","SD 3.5 Medium","SD 3.5 Large","SD 3.5 Large Turbo","Pony","Flux.1 S","Flux.1 D","AuraFlow","SDXL 1.0 LCM","SDXL Distilled","SDXL Turbo","SDXL Lightning","SDXL Hyper","Stable Cascade","SVD","SVD XT","Playground v2","PixArt a","PixArt E","Hunyuan 1","Hunyuan Video","Lumina","Kolors","Illustrious","Mochi","LTXV","CogVideoX","Other"],hiddenBaseModels:["ODOR","SD 2.1 768","SD 2.1 Unclip","SDXL Distilled","SDXL 0.9","SD 2.0 768","SDXL Turbo","SVD XT","Playground v2","Stable Cascade","SDXL 1.0 LCM"],modelFileTypes:["Model","Text Encoder","Pruned Model","Negative","Training Data","VAE","Config","Archive"],trainingModelTypes:["Character","Style","Concept"],baseModelTypes:["Standard","Inpainting","Refiner","Pix2Pix"],modelFileFormats:["SafeTensor","PickleTensor","GGUF","Diffusers","Core ML","ONNX","Other"],modelFileSizes:["full","pruned"],modelFileFp:["fp16","fp8","nf4","fp32","bf16"],imageFormats:["optimized","metadata"],tagFilterDefaults:{trendingTagsLimit:20},reportingFilterDefaults:{limit:50},modelFileOrder:{Model:0,"Pruned Model":1,"Training Data":2,Config:3,"Text Encoder":4,VAE:5,Negative:6,Archive:7},cardSizes:{model:320,image:320,articles:320,bounty:320,club:320},modPublishOnlyStatuses:[i.GJ.UnpublishedViolation,i.GJ.Deleted],cacheTime:{postCategories:3600},timeCutOffs:{updatedModel:72e5},samplers:["Euler a","Euler","LMS","Heun","DPM2","DPM2 a","DPM++ 2S a","DPM++ 2M","DPM++ SDE","DPM++ 2M SDE","DPM++ 3M SDE","DPM fast","DPM adaptive","LMS Karras","DPM2 Karras","DPM2 a Karras","DPM++ 2S a Karras","DPM++ 2M Karras","DPM++ SDE Karras","DPM++ 2M SDE Karras","DPM++ 3M SDE Karras","DPM++ 3M SDE Exponential","DDIM","PLMS","UniPC","LCM"],availableReactions:{[i.BE.Like]:"\uD83D\uDC4D",[i.BE.Dislike]:"\uD83D\uDC4E",[i.BE.Heart]:"❤️",[i.BE.Laugh]:"\uD83D\uDE02",[i.BE.Cry]:"\uD83D\uDE22"},richTextEditor:{maxFileSize:5242880,accept:c.d1,presetColors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]},imageGuard:{noAccountLimit:5,cutoff:864e5},imageGeneration:{drawerZIndex:301,requestBlocking:{warned:3,notified:5,muted:8}},tagVoting:{voteDuration:864e5,upvoteThreshold:3},imageTags:{styles:["anime","cartoon","comics","manga"],subjects:["man","woman","men","women"]},maxTrainingRetries:2,mediaUpload:{maxOrchestratorImageFileSize:62914560,maxImageFileSize:52428800,maxVideoFileSize:786432e3,maxVideoDimension:3840,maxVideoDurationSeconds:245},bounties:{engagementTypes:["active","favorite","tracking","supporter","awarded"],minCreateAmount:500,maxCreateAmount:1e8,supportedBountyToModels:[i.YV.ModelCreation,i.YV.LoraCreation]},defaultCurrency:i.F.BUZZ,referrals:{referralCodeMinLength:6,referralCodeMaxCount:3},leaderboard:{legendScoring:{diamond:10,gold:8,silver:6,bronze:4}},buzz:{minChargeAmount:500,maxChargeAmount:99999999,cutoffDate:new Date("2023-10-17T00:00:00.000Z"),referralBonusAmount:500,maxTipAmount:1e8,minTipAmount:50,maxEntityTip:2e3,buzzDollarRatio:1e3,platformFeeRate:3e3,minBuzzWithdrawal:1e5,maxBuzzWithdrawal:1e8,generationBuzzChargingStartDate:new Date("2024-04-04T00:00:00.000Z")},profile:{coverImageAspectRatio:1/4,mobileCoverImageAspectRatio:1/4,coverImageHeight:400,coverImageWidth:1600,showcaseItemsLimit:32,bioMaxLength:400,messageMaxLength:1200,locationMaxLength:30},clubs:{tierMaxMemberLimit:9999,tierImageAspectRatio:1,tierImageDisplayWidth:124,tierImageSidebarDisplayWidth:84,avatarDisplayWidth:124,minMonthlyBuzz:5,minStripeCharge:3e3,headerImageAspectRatio:1/4,postCoverImageAspectRatio:1/4,engagementTypes:["engaged"],coverImageHeight:400,coverImageWidth:1600},article:{coverImageHeight:400,coverImageWidth:850},comments:{getMaxDepth(e){let{entityType:t}=e;switch(t){case"image":case"bountyEntry":return 3;default:return 5}}},altTruncateLength:125,system:{user:{id:-1,username:"civitai"}},creatorsProgram:{rewards:{earlyAccessUniqueDownload:10,generatedImageWithResource:.01}},purchasableRewards:{coverImageAspectRatio:.5,coverImageWidth:180},supportedBaseModelAddendums:["SD 1.5","SDXL 1.0"],vault:{keys:{details:":modelVersionId/:userId/details.pdf",images:":modelVersionId/:userId/images.zip",cover:":modelVersionId/:userId/cover.jpg"}},supporterBadge:"69e4b7fd-129f-45bc-889b-81a846aa0d13",memberships:{tierOrder:["free","founder","bronze","silver","gold"],badges:{free:"69e4b7fd-129f-45bc-889b-81a846aa0d13",founder:"69e4b7fd-129f-45bc-889b-81a846aa0d13",bronze:"69e4b7fd-129f-45bc-889b-81a846aa0d13",silver:"c06c4d84-11f1-49ca-824c-2d7371c23366",gold:"eae8457a-8b18-41a5-8ee7-2b99a1c663c6"},founderDiscount:{maxDiscountDate:new Date("2024-05-01T00:00:00Z"),discountPercent:50,tier:"founder"}},freeMembershipDetails:{name:"Free",price:0,badge:"69e4b7fd-129f-45bc-889b-81a846aa0d13",metadata:{monthlyBuzz:0,generationLimit:1,quantityLimit:4,queueLimit:4,badgeType:"none"}},cosmeticShop:{sectionImageAspectRatio:250/1288,sectionImageHeight:250,sectionImageWidth:1288},cosmetics:{frame:{padding:6}},modelGallery:{maxPinnedPosts:10},chat:{airRegex:RegExp("^civitai:(?\\d+)@(?\\d+)$","i"),civRegex:new RegExp("^(?:https?://)?(?:image\\.)?(?:".concat((null!==(n=s.O.NEXT_PUBLIC_BASE_URL)&&void 0!==n?n:"civitai.com").replace(/^https?:\/\//,"").replace(/\./g,"\\."),"|civitai\\.com)")),externalRegex:/^(?:https?:\/\/)?(?:www\.)?(github\.com|twitter\.com|x\.com)/},entityCollaborators:{maxCollaborators:15},earlyAccess:{article:6341,buzzChargedPerDay:100,timeframeValues:[3,5,7,9,12,15],scoreTimeFrameUnlock:[[4e4,3],[65e3,5],[9e4,7],[125e3,9],[2e5,12],[25e4,15]],scoreQuantityUnlock:[[4e4,1],[65e3,2],[9e4,4],[125e3,6],[2e5,8],[25e4,20]]},autoLabel:{labelTypes:["tag","caption"]}},f=d.baseModels.filter(e=>!d.hiddenBaseModels.includes(e)),p=16777216,h=["https://orchestration.civitai.com","https://orchestration-dev.civitai.com"];function m(e){return h.some(t=>e.startsWith(t))}let g=["Core ML","Diffusers","ONNX"],v=5,y=20,b=450,x=30,w=800;class S{constructor(e){this.name=e.name,this.baseModels=e.baseModels,this.hidden=e.hidden}}let k={SD1:new S({name:"Stable Diffusion",baseModels:["SD 1.4","SD 1.5","SD 1.5 LCM","SD 1.5 Hyper"]}),SD2:new S({name:"Stable Diffusion",baseModels:["SD 2.0","SD 2.0 768","SD 2.1","SD 2.1 768","SD 2.1 Unclip"],hidden:["SD 2.1 768","SD 2.1 Unclip","SD 2.0 768"]}),SD3:new S({name:"Stable Diffusion",baseModels:["SD 3","SD 3.5","SD 3.5 Large","SD 3.5 Large Turbo"]}),SD3_5M:new S({name:"Stable Diffusion",baseModels:["SD 3.5 Medium"]}),Flux1:new S({name:"Flux",baseModels:["Flux.1 S","Flux.1 D"]}),SDXL:new S({name:"Stable Diffusion XL",baseModels:["SDXL 0.9","SDXL 1.0","SDXL 1.0 LCM","SDXL Lightning","SDXL Hyper","SDXL Turbo"],hidden:["SDXL 0.9","SDXL Turbo","SDXL 1.0 LCM"]}),SDXLDistilled:new S({name:"Stable Diffusion XL",baseModels:["SDXL Distilled"],hidden:["SDXL Distilled"]}),PixArtA:new S({name:"PixArt alpha",baseModels:["PixArt a"]}),PixArtE:new S({name:"PixArt sigma",baseModels:["PixArt E"]}),Lumina:new S({name:"Lumina",baseModels:["Lumina"]}),Kolors:new S({name:"Kolors",baseModels:["Kolors"]}),HyDit1:new S({name:"Hunyuan DiT",baseModels:["Hunyuan 1"]}),HyV1:new S({name:"Hunyuan Video",baseModels:["Hunyuan Video"]}),SCascade:new S({name:"Stable Cascade",baseModels:["Stable Cascade"]}),ODOR:new S({name:"ODOR",baseModels:["Odor"],hidden:["Odor"]}),Pony:new S({name:"Stable Diffusion",baseModels:["Pony"]}),Illustrious:new S({name:"Illustrious",baseModels:["Illustrious"]}),Other:new S({name:"Other",baseModels:["Other"]}),Mochi:new S({name:"Mochi",baseModels:["Mochi"]}),LTXV:new S({name:"LTXV",baseModels:["LTXV"]}),CogVideoX:new S({name:"CogVideoX",baseModels:["CogVideoX"]})},j={url:"https://huggingface.co/spaces/CompVis/stable-diffusion-license",name:"CreativeML Open RAIL-M"},E={url:"https://github.com/Stability-AI/generative-models/blob/main/model_licenses/LICENSE-SDXL1.0",name:"CreativeML Open RAIL++-M"},O={url:"https://github.com/Stability-AI/generative-models/blob/main/model_licenses/LICENSE-SDV",name:"Stable Video Diffusion Non-Commercial Research Community License",notice:"Stable Video Diffusion is licensed under the Stable Video Diffusion Research License, Copyright (c) Stability AI Ltd. All Rights Reserved."},C={url:"",name:"Stability AI Community License Agreement",notice:"This Stability AI Model is licensed under the Stability AI Community License, Copyright (c) Stability AI Ltd. All Rights Reserved.",poweredBy:"Powered by Stability AI"},I={url:"https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md",name:"Apache 2.0"},P={"SD 1.4":j,"SD 1.5":j,"SD 1.5 LCM":E,"SD 1.5 Hyper":E,"SD 2.0":j,"SD 2.0 768":j,"SD 2.1":j,"SD 2.1 768":j,"SD 2.1 Unclip":j,"SD 3":C,"SD 3.5":C,"SD 3.5 Medium":C,"SD 3.5 Large":C,"SD 3.5 Large Turbo":C,"SDXL 0.9":{url:"https://github.com/Stability-AI/generative-models/blob/main/model_licenses/LICENSE-SDXL0.9",name:"SDXL 0.9 research license"},"SDXL 1.0":E,"SDXL 1.0 LCM":E,"SDXL Distilled":E,"SDXL Turbo":{url:"https://github.com/Stability-AI/generative-models/blob/main/model_licenses/LICENSE-SDXL-Turbo",name:"Stability AI Non-Commercial Research Community License",notice:"This Stability AI Model is licensed under the Stability AI Non-Commercial Research Community License, Copyright (c) Stability AI Ltd. All Rights Reserved."},"SDXL Lightning":E,"SDXL Hyper":E,SVD:O,"SVD XT":O,"Playground v2":{url:"https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md",name:"Playground v2 Community License"},"PixArt a":E,"PixArt E":E,"Hunyuan 1":{url:"https://github.com/Tencent/HunyuanDiT/blob/main/LICENSE.txt",name:"Tencent Hunyuan Community License Agreement"},"Hunyuan Video":{url:"https://huggingface.co/tencent/HunyuanVideo/blob/main/LICENSE",name:"Tencent Hunyuan Community License Agreement",notice:"Tencent Hunyuan is licensed under the Tencent Hunyuan Community License Agreement, Copyright \xa9 2024 Tencent. All Rights Reserved. The trademark rights of “Tencent Hunyuan” are owned by Tencent or its affiliate.",poweredBy:"Powered by Tencent Hunyuan"},Lumina:I,Kolors:{url:"https://raw.githubusercontent.com/Kwai-Kolors/Kolors/master/MODEL_LICENSE",name:"Kolors License"},"Stable Cascade":{url:"https://huggingface.co/stabilityai/stable-cascade/blob/main/LICENSE",name:"SAI NC RC",notice:"This Stability AI Model is licensed under the Stability AI Non-Commercial Research Community License, Copyright (c) Stability AI Ltd. All Rights Reserved."},Pony:E,AuraFlow:I,"Flux.1 S":I,"Flux.1 D":{url:"https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md",name:"FLUX.1 [dev] Non-Commercial License",notice:"The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.",poweredBy:"IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL."},ODOR:void 0,Other:void 0,Illustrious:{url:"https://freedevproject.org/faipl-1.0-sd/",name:"Illustrious License"},Mochi:I,LTXV:{url:"https://huggingface.co/Lightricks/LTX-Video/blob/main/License.txt",name:"LTX Video License"},CogVideoX:{url:"https://huggingface.co/THUDM/CogVideoX-5b/blob/main/LICENSE",name:"CogVideoX License"}},A=new Map([["Euler a",["euler_ancestral"]],["Euler",["euler"]],["LMS",["lms"]],["Heun",["heun"]],["DPM2",["dpm_2"]],["DPM2 a",["dpm_2_ancestral"]],["DPM++ 2S a",["dpmpp_2s_ancestral"]],["DPM++ 2M",["dpmpp_2m"]],["DPM++ SDE",["dpmpp_sde","dpmpp_sde_gpu"]],["DPM++ 2M SDE",["dpmpp_2m_sde"]],["DPM fast",["dpm_fast"]],["DPM adaptive",["dpm_adaptive"]],["LMS Karras",["lms_karras"]],["DPM2 Karras",["dpm_2_karras"]],["DPM2 a Karras",["dpm_2_ancestral_karras"]],["DPM++ 2S a Karras",["dpmpp_2s_ancestral_karras"]],["DPM++ 2M Karras",["dpmpp_2m_karras"]],["DPM++ SDE Karras",["dpmpp_sde_karras"]],["DPM++ 2M SDE Karras",["dpmpp_2m_sde_karras"]],["DDIM",["ddim"]],["PLMS",["plms"]],["UniPC",["uni_pc","uni_pc_bh2"]],["LCM",["lcm"]]]),T={"Euler a":4,Euler:4,Heun:8,LMS:10,DDIM:15,"DPM++ 2M Karras":4,DPM2:4,"DPM2 a":4,undefined:4},z={SD1:{aspectRatios:[{label:"Square",width:512,height:512},{label:"Landscape",width:768,height:512},{label:"Portrait",width:512,height:768}],checkpoint:{id:128713,name:"8",trainedWords:[],baseModel:"SD 1.5",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:4384,name:"DreamShaper",type:"Checkpoint"}}},SDXL:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:128078,name:"v1.0 VAE fix",trainedWords:[],baseModel:"SDXL 1.0",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:101055,name:"SD XL",type:"Checkpoint"}}},Pony:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:290640,name:"V6 (start with this one)",trainedWords:[],baseModel:"Pony",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:257749,name:"Pony Diffusion V6 XL",type:"Checkpoint"}}},Illustrious:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:889818,name:"v0.1",trainedWords:[],baseModel:"Illustrious",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:795765,name:"Illustrious-XL",type:"Checkpoint"}}},Flux1:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:691639,name:"",trainedWords:[],baseModel:"Flux.1 D",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:618692,name:"FLUX",type:"Checkpoint"}}},SD3:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:983309,name:"Large",trainedWords:[],baseModel:"SD 3.5",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:878387,name:"Stable Diffusion 3.5 Large",type:"Checkpoint"}}},SD3_5M:{aspectRatios:[{label:"Square",width:1024,height:1024},{label:"Landscape",width:1216,height:832},{label:"Portrait",width:832,height:1216}],checkpoint:{id:1003708,name:"Medium",trainedWords:[],baseModel:"SD 3.5 Medium",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:896953,name:"Stable Diffusion 3.5 Medium",type:"Checkpoint"}}},Other:{aspectRatios:[],checkpoint:{id:164821,name:"",trainedWords:[],baseModel:"Other",strength:1,minStrength:-1,maxStrength:2,canGenerate:!0,hasAccess:!0,covered:!0,model:{id:147759,name:"Remacri",type:"Upscaler"}}}},N={formStoreKey:"generation-form",samplers:Object.keys(T),lcmSamplers:["LCM","Euler a"],defaultValues:{workflow:"txt2img",cfgScale:3.5,steps:25,sampler:"DPM++ 2M Karras",seed:void 0,clipSkip:2,quantity:2,aspectRatio:"0",prompt:"",negativePrompt:"",nsfw:!1,baseModel:"Flux1",denoise:.4,upscale:1.5,civitaiTip:0,creatorTip:.25,fluxUltraAspectRatio:"4",fluxMode:"urn:air:flux1:checkpoint:civitai:618692@691639",model:z.Flux1.checkpoint,priority:"low"},maxValues:{seed:4294967295,clipSkip:3}},R=2147483647;function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"SD1";if(!(e in z))throw Error("unsupported baseModel: ".concat(e," in generationConfig"));return z[e]}let M="models_v9",D="images_v6",L="articles_v5",F="users_v3",U="collections_v3",B="bounties_v3",H="tools_v2";i.uD.PaidAccess,i.uD.PaidEarlyAccess,i.uD.CivitaiClubOnly,i.uD.MySubscribersOnly,i.uD.Sponsored,i.uD.PaidGeneration,i.JJ.FixedPrice,i.JJ.Bidding;let Z={[i.F.BUZZ]:{icon:o.Z,color:e=>e.colors.yellow[7],fill:e=>e.colors.yellow[7],themes:{generation:{icon:o.Z,color:e=>e.colors.blue[4],fill:e=>e.colors.blue[4]}}},[i.F.USD]:{icon:a,color:e=>e.colors.yellow[7],fill:void 0}},W=["Support your favorite creators via tips","Pay for on-site model training","Create bounties for models, images and more!","Purchase profile cosmetics from our Cosmetic Store!"],V=2e4,$=1e3,q={xs:60,sm:180,md:600,lg:1800,hour:3600,day:86400,week:604800,month:2592e3},G={STRIPE_TRANSACTION:"STRIPE_TRANSACTION",COMPLETE_ONBOARDING:"COMPLETE_ONBOARDING",PADDLE_TRANSACTION:"PADDLE_TRANSACTION"},K=["followers","likes","uploads","downloads","generations","reactions"],X=["followers","likes"],J=3,Y="2024-04-20",Q=new Date("7-12-2024");(0,u.Hc)(Q,30,"days");let ee={green:s.O.NEXT_PUBLIC_SERVER_DOMAIN_GREEN,blue:s.O.NEXT_PUBLIC_SERVER_DOMAIN_BLUE,red:s.O.NEXT_PUBLIC_SERVER_DOMAIN_RED},et={[l.dL.SexualMinor]:{code:l.dL.SexualMinor,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Images of minors displayed sexually"},[l.dL.SexualMinorGenerator]:{code:l.dL.SexualMinorGenerator,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Prompting for minors displayed sexually in the generator"},[l.dL.SexualMinorTraining]:{code:l.dL.SexualMinorTraining,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Training resources on minors displayed sexually"},[l.dL.SexualPOI]:{code:l.dL.SexualPOI,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Images of real people displayed sexually"},[l.dL.Bestiality]:{code:l.dL.Bestiality,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Images depicting bestiality"},[l.dL.Scat]:{code:l.dL.Scat,publicBanReasonLabel:"Content violated ToS",privateBanReasonLabel:"Images depicting scat"},[l.dL.Harassment]:{code:l.dL.Harassment,publicBanReasonLabel:"Community Abuse",privateBanReasonLabel:"Harassing or spamming users"},[l.dL.LeaderboardCheating]:{code:l.dL.LeaderboardCheating,publicBanReasonLabel:"Leaderboard manipulation",privateBanReasonLabel:"Leaderboard manipulation"},[l.dL.BuzzCheating]:{code:l.dL.BuzzCheating,publicBanReasonLabel:"Abusing Buzz System",privateBanReasonLabel:"Abusing Buzz System"},[l.dL.Other]:{code:l.dL.Other,publicBanReasonLabel:"",privateBanReasonLabel:"Other"}},er=.2,en=220},32957:function(e,t,r){"use strict";var n,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,x,w,S,k,j,E,O,C,I,P,A,T,z,N,R,_,M,D,L,F,U,B,H,Z,W,V,$,q,G,K,X,J,Y,Q,ee,et,er,en,ei,eo,ea,es,el,ec,eu,ed,ef,ep,eh,em,eg,ev,ey,eb,ex,ew,eS,ek,ej,eE,eO,eC,eI,eP,eA,eT,ez,eN,eR,e_,eM;r.d(t,{AJ:function(){return n},AX:function(){return O},Af:function(){return A},BR:function(){return z},CI:function(){return v},FA:function(){return c},H_:function(){return u},IM:function(){return V},KU:function(){return _},Ol:function(){return B},QZ:function(){return C},Qo:function(){return m},Qp:function(){return i},Sh:function(){return P},Ti:function(){return eD},Tp:function(){return b},Wf:function(){return U},Y7:function(){return T},YJ:function(){return I},_J:function(){return W},bG:function(){return Z},dL:function(){return F},hS:function(){return k},hc:function(){return a},hq:function(){return S},hx:function(){return s},lQ:function(){return w},m:function(){return y},mN:function(){return L},nq:function(){return o},st:function(){return D},t0:function(){return p},vL:function(){return $},x3:function(){return H},xU:function(){return j},xV:function(){return l},xs:function(){return M}}),(q=n||(n={})).Image="image",q.TrainingImages="training-images",q.TrainingImagesTemp="training-images-temp",q.Model="model",q.Default="default",(G=i||(i={})).HighestRated="Highest Rated",G.MostDownloaded="Most Downloaded",G.MostLiked="Most Liked",G.MostDiscussed="Most Discussed",G.MostCollected="Most Collected",G.ImageCount="Most Images",G.Newest="Newest",G.Oldest="Oldest",(K=o||(o={})).Newest="newest",K.Oldest="oldest",K.MostLiked="most-liked",K.MostDisliked="most-disliked",K.MostComments="most-comments",K.Rating="rating",(X=a||(a={})).NSFW="nsfw",X.IncludesImages="includes-images",(J=s||(s={})).Newest="Newest",J.MostLiked="Most Liked",(Y=l||(l={})).Answered="Answered",Y.Unanswered="Unanswered",(Q=c||(c={})).MostReactions="Most Reactions",Q.MostComments="Most Comments",Q.MostCollected="Most Collected",Q.Newest="Newest",Q.Oldest="Oldest",Q.Random="Random";let eD={Random:"Random"};(ee=u||(u={})).MostReactions="Most Reactions",ee.MostComments="Most Comments",ee.MostCollected="Most Collected",ee.Newest="Newest",(et=d||(d={})).txt2img="txt2img",et.img2img="img2img",et.inpainting="inpainting",(er=f||(f={})).Manual="Manual",er.Automatic="Automatic",(en=p||(p={})).MostModels="Most Models",en.MostImages="Most Images",en.MostPosts="Most Posts",en.MostArticles="Most Articles",en.MostHidden="Most Hidden",(ei=h||(h={}))[ei.Moderation=0]="Moderation",ei[ei.Label=1]="Label",ei[ei.FaceDetection=2]="FaceDetection",ei[ei.WD14=3]="WD14",ei[ei.Hash=4]="Hash",ei[ei.Hive=5]="Hive",ei[ei.MinorDetection=6]="MinorDetection",ei[ei.HiveDemographics=7]="HiveDemographics",(eo=m||(m={})).MostBookmarks="Most Bookmarks",eo.MostReactions="Most Reactions",eo.MostComments="Most Comments",eo.MostCollected="Most Collected",eo.Newest="Newest",(ea=g||(g={})).Trained="Trained",ea.Merge="Merge",(es=v||(v={})).MostContributors="Most Followers",es.Newest="Newest",(el=y||(y={})).BuzzUpdate="buzz:update",el.ImageGenStatusUpdate="image-gen:status-update",el.TrainingUpdate="training:update",el.ImageIngestionStatus="image-ingestion:status",el.ChatNewMessage="chat:new-message",el.ChatNewRoom="chat:new-room",el.ChatTypingStatus="chat:typing-status",el.OrchestratorUpdate="orchestrator-job:status-update",el.TextToImageUpdate="orchestrator:text-to-image-update",el.SchedulerDownload="scheduler:download",el.NotificationNew="notification:new",el.Pong="pong",(ec=b||(b={})).EndingSoon="Ending Soon",ec.HighestBounty="Highest Bounty",ec.MostLiked="Most Liked",ec.MostDiscussed="Most Discussed",ec.MostContributors="Most Contributors",ec.MostTracked="Most Tracked",ec.MostEntries="Most Entries",ec.Newest="Newest",(eu=x||(x={})).HighestAmount="Highest Amount",eu.Newest="Newest",(ed=w||(w={})).Open="Open",ed.Expired="Expired",ed.Awarded="Awarded",(ef=S||(S={})).Newest="Newest",ef.Oldest="Oldest",(ep=k||(k={})).MostRecent="MostRecent",ep.NextBillingDate="NextBillingDate",ep.MostExpensive="MostExpensive",(eh=j||(j={})).Newest="Newest",eh.MostResources="Most Resources",eh.MostPosts="Most Club Posts",eh.MostMembers="Most Members",(em=E||(E={})).TOS="tos",em.Moderated="moderated",em.CSAM="CSAM",(eg=O||(O={})).Newest="Newest",eg.Oldest="Oldest",eg.MostReactions="Most Reactions",(ev=C||(C={})).Favorited="favorited",ev.Liked="liked",ev.Disliked="disliked",(ey=I||(I={})).Newest="Newest",ey.Oldest="Oldest",(eb=P||(P={}))[eb.PG=1]="PG",eb[eb.PG13=2]="PG13",eb[eb.R=4]="R",eb[eb.X=8]="X",eb[eb.XXX=16]="XXX",eb[eb.Blocked=32]="Blocked",(ex=A||(A={}))[ex.TOS=1]="TOS",ex[ex.Profile=2]="Profile",ex[ex.BrowsingLevels=4]="BrowsingLevels",ex[ex.Buzz=8]="Buzz",(ew=T||(T={})).Available="Available",ew.Purchased="Purchased",(eS=z||(z={})).Available="Available",eS.History="History",eS.Purchased="Purchased",(ek=N||(N={})).Bounty="Bounty",ek.BountyEntry="BountyEntry",(ej=R||(R={})).Update="Update",ej.Delete="Delete",(eE=_||(_={})).RecentlyAdded="Recently Added",eE.RecentlyCreated="Recently Created",eE.ModelName="Model Name",eE.ModelSize="Model Size",(eO=M||(M={})).Pending="Pending",eO.Processing="Processing",eO.Cancelled="Cancelled",eO.Error="Error",eO.Succeeded="Succeeded",(eC=D||(D={}))[eC.None=0]="None",eC[eC.EarlyAccessGeneration=1]="EarlyAccessGeneration",eC[eC.EarlyAccessDownload=2]="EarlyAccessDownload",eC[eC.All=3]="All",(eI=L||(L={})).Comment="Comment",eI.Update="Update",eI.Milestone="Milestone",eI.Bounty="Bounty",eI.Buzz="Buzz",eI.System="System",eI.Other="Other",(eP=F||(F={})).SexualMinor="SexualMinor",eP.SexualMinorGenerator="SexualMinorGenerator",eP.SexualMinorTraining="SexualMinorTraining",eP.SexualPOI="SexualPOI",eP.Bestiality="Bestiality",eP.Scat="Scat",eP.Harassment="Harassment",eP.LeaderboardCheating="LeaderboardCheating",eP.BuzzCheating="BuzzCheating",eP.Other="Other",(eA=U||(U={})).PendingOnboarding="PendingOnboarding",eA.PendingVerification="PendingVerification",eA.Approved="Approved",eA.Rejected="Rejected",(eT=B||(B={})).PendingOnboarding="PendingOnboarding",eT.Active="ACTIVE",eT.Suspended="SUSPENDED",eT.Blocked="BLOCKED",eT.BlockedByTipalti="BLOCKED_BY_TIPALTI",eT.InternalValue="INTERNAL_VALUE",(ez=H||(H={})).High="high",ez.Normal="normal",ez.Low="low",(eN=Z||(Z={})).Kohya="kohya",eN.Rapid="flux-dev-fast",eN["X-Flux"]="x-flux",(eR=W||(W={})).EmailDomain="EmailDomain",eR.LinkDomain="LinkDomain",(e_=V||(V={})).Newest="Newest",e_.Oldest="Oldest",e_.AZ="AZ",e_.ZA="ZA",(eM=$||($={})).Newest="Newest",eM.Oldest="Oldest",eM.HighestAmount="Highest Amount",eM.LowestAmount="Lowest Amount"},72323:function(e,t,r){"use strict";r.d(t,{L1:function(){return s},LO:function(){return i},_d:function(){return l},d1:function(){return a},nr:function(){return c},oZ:function(){return o}});var n=r(35818);let i={png:"image/png",jpg:"image/jpg",jpeg:"image/jpeg",webp:"image/webp",mp4:"video/mp4",webm:"video/webm",mp3:"audio/mpeg",wav:"audio/vnd.wave",zip:"application/zip",xZipCompressed:"application/x-zip-compressed",xZipMultipart:"multipart/x-zip"},o={[i.png]:n.DD.image,[i.jpeg]:n.DD.image,[i.jpg]:n.DD.image,[i.webp]:n.DD.image,[i.mp4]:n.DD.video,[i.webm]:n.DD.video,[i.mp3]:n.DD.audio,[i.wav]:n.DD.audio},a=[i.png,i.jpeg,i.jpg,i.webp],s=[i.mp4,i.webm];i.mp3,i.wav;let l=[i.zip,i.xZipCompressed,i.xZipMultipart];function c(e){return i[e]}},76772:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n={"no-posts":{optionLabel:"Missing images",notificationMessage:"Your model does not include example images, or the provided images were removed for violating our Terms of Service. Please upload new example images that adhere to our guidelines."},"no-versions":{optionLabel:"Missing version",notificationMessage:"Your model currently has no published versions. Please publish a version to make it available to site users."},"no-files":{optionLabel:"Missing files",notificationMessage:"Your model does not include any valid files. Please ensure you have uploaded a valid resource."},"mature-real-person":{optionLabel:"Real person(s) displayed in a mature context",notificationMessage:"Resources designed to depict real people in sexualized or suggestive clothing, poses, or situations are prohibited under our content guidelines."},"mature-underage":{optionLabel:"Minors displayed in a mature context",notificationMessage:"Resources designed to depict minors in sexualized or suggestive clothing, poses, or situations are prohibited under our content guidelines."},"photo-real-underage":{optionLabel:"Photorealistic depiction of a minor",notificationMessage:"Resources designed to depict photorealistic minors are prohibited under our content guidelines."},"hate-speech":{optionLabel:"Promotion of hate-speech or targeted attack",notificationMessage:"Content that attacks, harasses, or discriminates against an individual or group based on their race, ethnicity, nationality, religion, gender, sexual orientation, disability, or any other characteristic is prohibited under our content guidelines."},scat:{optionLabel:'Depiction of "scat" or fecal matter',notificationMessage:'Resources intended to depict excrement ("scat") or fecal matter are prohibited under our content guidelines.'},violence:{optionLabel:"Prohibited violent activities",notificationMessage:"Resources intended to depict graphic violence, death, extreme gore, or other forms of extreme content are prohibited under our content guidelines."},beastiality:{optionLabel:'Depiction of "bestiality"',notificationMessage:"Resources intended to depict sexual activity with animals or any content involving animals in a sexual context are prohibited under our content guidelines."},"non-generated-image":{optionLabel:"Images are not generated by the resource",notificationMessage:"Example images for a resource must either be generated by the resource itself or serve as an aid in demonstrating its use."},"unintenteded-use":{optionLabel:"Unintended site use",notificationMessage:"Content uploaded to Civitai as a model must be a valid resource intended for use in content generation. Models uploaded solely for testing purposes are prohibited."},"insufficient-description":{optionLabel:"Insufficient description",notificationMessage:"Your resource lacks a sufficient description. Please provide a clear and descriptive title along with a detailed resource description. Please tag your model appropriately, and consider including usage tips and any additional information that will help users utilize your content."},duplicate:{optionLabel:"Duplicate upload",notificationMessage:"Your resource matches a previously uploaded resource and is considered a duplicate. Uploading duplicate files is prohibited under our content guidelines."},spam:{optionLabel:"Spam or advertorial content",notificationMessage:"Spam, or advertisements disguised as resources, are strictly prohibited under our Terms of Service."},other:{optionLabel:"Other",notificationMessage:""}}},86013:function(e,t,r){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{b$:function(){return J},yw:function(){return Y},mv:function(){return Q}});var i,o,a=r(38498),s=r(32957),l=r(1604);function c(){let e=n(["\n SELECT DISTINCT entityId\n FROM views\n WHERE time > ","\n AND entityType = 'Article'\n "]);return c=function(){return e},e}l.z.object({id:l.z.number(),type:l.z.string(),details:l.z.record(l.z.string(),l.z.any())});let u=[100,500,1e3,1e4,5e4,1e5,5e5,1e6],d=[100,500,1e3,1e4,5e4],f={"article-view-milestone":{displayName:"Article view milestones",prepareMessage:e=>{let{details:t}=e;return{message:'Congrats! Your article, "'.concat(t.articleTitle,'" has received ').concat(t.viewCount.toLocaleString()," views"),url:"/articles/".concat(t.articleId)}},category:s.mN.Milestone,prepareQuery:async e=>{let{lastSentDate:t,clickhouse:r}=e;if(!r)return;let n=JSON.stringify((await r.$query(c(),t)).map(e=>e.entityId));return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(u.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), val AS (\n SELECT\n "articleId" article_id,\n "viewCount" view_count\n FROM "ArticleMetric" am\n WHERE\n am."articleId" = ANY (SELECT json_array_elements(\'').concat(n,'\'::json)::text::integer)\n AND "viewCount" >= ').concat(u[0],'\n AND timeframe = \'AllTime\'\n ), milestone AS (\n SELECT\n a."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'articleTitle\', a.title,\n \'articleId\', a.id,\n \'viewCount\', ms.value\n ) "details"\n FROM val\n JOIN "Article" a on a.id = val.article_id\n JOIN milestones ms ON ms.value <= val.view_count\n WHERE a."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'article-view-milestone:\', details->>\'articleId\', \':\', details->>\'viewCount\') "key",\n "ownerId" "userId",\n \'article-view-milestone\' "type",\n details\n FROM milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'article-view-milestone\')\n ')}},"article-like-milestone":{displayName:"Article like milestones",category:s.mN.Milestone,prepareMessage:e=>{let{details:t}=e;return{message:'Congrats! Your article, "'.concat(t.articleTitle,'" has received ').concat(t.favoriteCount.toLocaleString()," likes"),url:"/articles/".concat(t.articleId)}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(d.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), affected AS (\n SELECT DISTINCT\n "articleId" article_id\n FROM "CollectionItem" ci\n JOIN "Collection" c ON ci."collectionId" = c.id AND c."type" = \'Article\' AND c."mode" = \'Bookmark\'\n JOIN "Article" a ON ci."articleId" = a.id\n WHERE ci."createdAt" > \'').concat(t,'\'\n AND a."userId" > 0\n ), val AS (\n SELECT\n article_id,\n "favoriteCount" favorite_count\n FROM "ArticleMetric" am\n JOIN affected af ON af.article_id = am."articleId"\n WHERE\n timeframe = \'AllTime\'\n AND "favoriteCount" >= ').concat(d[0],'\n ), milestone AS (\n SELECT\n a."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'articleTitle\', a.title,\n \'articleId\', a.id,\n \'favoriteCount\', ms.value\n ) "details"\n FROM val\n JOIN "Article" a on a.id = val.article_id\n JOIN milestones ms ON ms.value <= val.favorite_count\n WHERE a."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'article-like-milestone:\', details->>\'articleId\', \':\', details->>\'favoriteCount\') "key",\n "ownerId" "userId",\n \'article-like-milestone\' "type",\n details\n FROM milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'article-like-milestone\')\n ')}},"new-article-from-following":{displayName:"New articles from followed users",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username," published a new ").concat(t.articleCategory,' article: "').concat(t.articleTitle,'"'),url:"/articles/".concat(t.articleId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH article_categories AS (\n SELECT\n t.id,\n t.name\n FROM "Tag" t\n JOIN "TagsOnTags" tt ON tt."toTagId" = t.id\n JOIN "Tag" f ON f.id = tt."fromTagId"\n WHERE f.name = \'article category\'\n ), new_article AS (\n SELECT DISTINCT\n ue."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'articleId\', a.id,\n \'articleTitle\', a.title,\n \'username\', u.username,\n \'articleCategory\', ac.name\n ) "details"\n FROM "Article" a\n JOIN (\n SELECT\n toa."articleId",\n ac.name,\n row_number() OVER (PARTITION BY toa."articleId") row\n FROM article_categories ac\n JOIN "TagsOnArticle" toa ON toa."tagId" = ac.id\n ) ac ON ac."articleId" = a.id AND ac.row = 1\n JOIN "User" u ON u.id = a."userId"\n JOIN "UserEngagement" ue ON ue."targetUserId" = a."userId" AND a."publishedAt" >= ue."createdAt" AND ue.type = \'Follow\'\n WHERE a."publishedAt" > \''.concat(t,'\'\n )\n SELECT\n CONCAT(\'new-article-from-following:\', details->>\'articleId\') "key",\n "ownerId" "userId",\n \'new-article-from-following\' "type",\n details\n FROM new_article\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-article-from-following\')\n ')}}},p=[5,10,20,50,100],h={"benefactor-joined":{displayName:"Supporter joined bounty",category:s.mN.Bounty,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.benefactorUsername," added ").concat(t.amount,' to your bounty "').concat(t.bountyName,'"'),url:"/bounties/".concat(t.bountyId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n bo."userId" "ownerId",\n jsonb_build_object(\n \'bountyId\', bb."bountyId",\n \'bountyName\', b.name,\n \'benefactorId\', bb."userId",\n \'benefactorUsername\', u.username,\n \'amount\', bb."unitAmount"\n ) as "details",\n bb."bountyId",\n bb."userId" "benefactorUserId"\n FROM "BountyBenefactor" bb\n JOIN "User" u ON u.id = bb."userId"\n JOIN "Bounty" b ON b.id = bb."bountyId"\n JOIN "BountyBenefactor" bo ON bo."bountyId" = bb."bountyId" AND bo."createdAt" < bb."createdAt"\n WHERE bb."createdAt" > \''.concat(t,'\'\n )\n SELECT\n CONCAT(\'benefactor-joined:\',"bountyId",\':\',"benefactorUserId") "key",\n "ownerId" "userId",\n \'benefactor-joined\' "type",\n details\n FROM data\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'benefactor-joined\')\n ')}},"bounty-ending":{displayName:"Bounty you are involved in is ending",category:s.mN.Bounty,prepareMessage:e=>{let{details:t}=e;return{message:'The bounty "'.concat(t.bountyName,'" is ending in 24 hours'),url:"/bounties/".concat(t.bountyId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH affected AS (\n SELECT DISTINCT b.id\n FROM "Bounty" b\n WHERE\n -- Now is in 24 hour expiration window\n now() BETWEEN b."expiresAt" - interval \'24 hours\' AND b."expiresAt"\n -- And last send was before 24 hour window\n AND \''.concat(t,'\' < b."expiresAt" - interval \'24 hours\'\n ), target_users AS (\n SELECT DISTINCT id, "userId"\n FROM (\n SELECT\n b.id,\n bb."userId"\n FROM affected a\n JOIN "Bounty" b ON b.id = a.id\n JOIN "BountyBenefactor" bb ON b.id = bb."bountyId"\n WHERE bb."awardedAt" IS NULL\n UNION ALL\n SELECT\n b.id,\n be."userId"\n FROM affected a\n JOIN "Bounty" b ON b.id = a.id\n JOIN "BountyEngagement" be ON b.id = be."bountyId"\n WHERE be.type = \'Track\'\n ) b\n ), data AS (\n SELECT DISTINCT\n tu."userId" "ownerId",\n jsonb_build_object(\n \'bountyId\', b.id,\n \'bountyName\', b.name,\n \'bountyEnd\', b."expiresAt"\n ) as "details",\n b.id "bountyId"\n FROM affected a\n JOIN "Bounty" b ON b.id = a.id\n JOIN target_users tu ON tu.id = b.id\n )\n SELECT\n CONCAT(\'bounty-ending:\',"bountyId") "key",\n "ownerId" "userId",\n \'bounty-ending\' "type",\n details\n FROM data\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'bounty-ending\')\n ')}},"bounty-awarded":{displayName:"Bounty awarded to you",category:s.mN.Bounty,prepareMessage:e=>{let{details:t}=e;return{message:"Congrats! You have been awarded ".concat(t.awardAmount," by ").concat(t.benefactorUsername,' for your work on "').concat(t.bountyName,'"'),url:"/bounties/".concat(t.bountyId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n be."userId" "ownerId",\n jsonb_build_object(\n \'bountyEntryId\', be.id,\n \'bountyId\', be."bountyId",\n \'bountyName\', b.name,\n \'benefactorUsername\', bene.username,\n \'benefactorId\', bb."userId",\n \'awardAmount\', bb."unitAmount"\n ) as "details",\n be."bountyId",\n bb."userId" "benefactorUserId"\n FROM "BountyBenefactor" bb\n JOIN "Bounty" b ON b.id = bb."bountyId"\n JOIN "User" bene ON bb."userId" = bene.id\n JOIN "BountyEntry" be ON be.id = bb."awardedToId"\n WHERE bb."awardedAt" > \''.concat(t,'\' AND bb."userId" != be."userId"\n )\n SELECT\n -- TODO maybe remove the userIds here \n CONCAT(\'bounty-awarded:\', "ownerId",\':\',"bountyId",\':\',"benefactorUserId") "key",\n "ownerId" "userId",\n \'bounty-awarded\' "type",\n details\n FROM data\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'bounty-awarded\')\n ')}},"bounty-reaction-milestone":{displayName:"Bounty entry reaction milestones",category:s.mN.Bounty,prepareMessage:e=>{let{details:t}=e;return{message:'Your bounty entry on "'.concat(t.bountyName,'" has reached ').concat(t.reactionCount.toLocaleString()," reactions"),url:"/bounties/".concat(t.bountyId,"/entries/").concat(t.bountyEntryId)}},prepareQuery:async e=>{let{lastSent:t}=e;return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(p.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), affected AS (\n SELECT DISTINCT\n "bountyEntryId"\n FROM "BountyEntryReaction"\n WHERE "createdAt" > \'').concat(t,'\'\n ), affected_value AS (\n SELECT\n br."bountyEntryId",\n COUNT(*) "reaction_count"\n FROM affected a\n JOIN "BountyEntryReaction" br ON br."bountyEntryId" = a."bountyEntryId"\n GROUP BY br."bountyEntryId"\n ), data AS (\n SELECT DISTINCT\n be."userId" "ownerId",\n jsonb_build_object(\n \'bountyId\', be."bountyId",\n \'bountyName\', b.name,\n \'bountyEntryId\', be.id,\n \'reactionCount\', ms.value\n ) as "details",\n a."bountyEntryId",\n ms.value "milestone"\n FROM affected_value a\n JOIN "BountyEntry" be ON be.id = a."bountyEntryId"\n JOIN "Bounty" b ON b.id = be."bountyId"\n JOIN milestones ms ON ms.value <= a.reaction_count\n WHERE b."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'bounty-reaction-milestone:\',"bountyEntryId",\':\',milestone) "key",\n "ownerId" "userId",\n \'bounty-reaction-milestone\' "type",\n details\n FROM data\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'bounty-reaction-milestone\')\n ')}},"bounty-entry":{displayName:"New entry on bounty you are involved in",category:s.mN.Bounty,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.hunterUsername,' has submitted an entry to the bounty "').concat(t.bountyName,'"'),url:"/bounties/".concat(t.bountyId,"/entries/").concat(t.bountyEntryId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH affected AS (\n SELECT DISTINCT\n "bountyId"\n FROM "BountyEntry" be\n WHERE "createdAt" > \''.concat(t,'\'\n ), target_users AS (\n SELECT DISTINCT id, "userId"\n FROM (\n SELECT\n b.id,\n bb."userId"\n FROM affected a\n JOIN "Bounty" b ON b.id = a."bountyId"\n JOIN "BountyBenefactor" bb ON b.id = bb."bountyId"\n UNION ALL\n SELECT\n b.id,\n be."userId"\n FROM affected a\n JOIN "Bounty" b ON b.id = a."bountyId"\n JOIN "BountyEngagement" be ON b.id = be."bountyId"\n ) b\n ), data AS (\n SELECT DISTINCT\n tu."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'bountyName\', b.name,\n \'bountyId\', b.id,\n \'hunterUsername\', u.username,\n \'bountyEntryId\', be.id\n ) as details,\n be.id "bountyEntryId"\n FROM target_users tu\n JOIN "Bounty" b ON b.id = tu.id\n JOIN "BountyEntry" be ON be."bountyId" = tu.id AND be."createdAt" > \'').concat(t,'\'\n JOIN "User" u ON u.id = be."userId"\n WHERE be."userId" != tu."userId"\n )\n SELECT\n CONCAT(\'bounty-entry:\',"bountyEntryId") "key",\n "ownerId" "userId",\n \'bounty-entry\' "type",\n details\n FROM data\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'bounty-entry\')\n ')}}};var m=r(40627);let g={"tip-received":{displayName:"Tip Received",category:s.mN.Buzz,prepareMessage:e=>{let{details:t}=e,{url:r,notification:n}=(0,m.U)(t);return{message:"".concat(n).concat(t.message?' They said: "'.concat(t.message,'".'):""),url:r}}}};var v=r(88182);let y={"challenge-winner":{displayName:"Challenge Winner",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"You placed ".concat((0,v.IP)(t.position),' in the "').concat(t.challengeName,"\" challenge! You've won ").concat((0,v.x6)(t.prize)," Buzz."),url:"/articles/".concat(t.articleId)}}},"challenge-participation":{displayName:"Challenge Participation",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"You've submitted enough entries to earn the participation prize in the \"".concat(t.challengeName,"\" challenge! You've won ").concat((0,v.x6)(t.prize)," Buzz."),url:"/articles/".concat(t.articleId)}}},"challenge-rejection":{displayName:"Challenge Rejection",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.count,' entries to the "').concat(t.challengeName,'" challenge have been declined. Consider making new entries to improve your chances of winning!'),url:"/articles/".concat(t.articleId)}}}};var b=r(36777),x=r(27943);let w={"club-new-member-joined":{displayName:"New Member Joined your club!",category:s.mN.Update,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"A new user has joined the club ".concat(t.clubName," as a member of the tier ").concat(t.tierName,"!"),url:"/clubs/manage/".concat(t.clubId,"/members")}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT\n c.id as "clubId",\n c.name "clubName",\n ct.name "tierName",\n c."userId"\n FROM "ClubMembership" cm\n JOIN "Club" c ON cm."clubId" = c.id\n JOIN "ClubTier" ct ON cm."clubTierId" = ct.id\n WHERE cm."startedAt" > \''.concat(t,'\'\n\n UNION\n\n SELECT\n c.id as "clubId",\n c.name "clubName",\n ct.name "tierName",\n ca."userId"\n FROM "ClubMembership" cm\n JOIN "Club" c ON cm."clubId" = c.id\n JOIN "ClubTier" ct ON cm."clubTierId" = ct.id\n JOIN "ClubAdmin" ca ON ca."clubId" = c.id\n WHERE cm."startedAt" > \'').concat(t,"'\n AND 'ManageMemberships'=ANY(ca.permissions)\n )\n SELECT\n concat('club-new-member-joined:',\"clubId\",':','").concat(t,'\') "key",\n "userId",\n \'club-new-member-joined\' "type",\n jsonb_build_object(\n \'clubId\', "clubId",\n \'clubName\', "clubName",\n \'tierName\', "tierName"\n ) as "details"\n FROM data\n ')}},"club-billing-toggled":{displayName:"Monthly billing for a club you are a member of has been toggled",category:s.mN.Update,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Monthly billing for the club ".concat(t.clubName," has been ").concat(t.billing?"enabled. Your next billing will be on ".concat((0,b.p6)(t.nextBillingAt),"."):"disabled. You will not be charged for this club on a monthly basis anymore."),url:"/clubs/".concat(t.clubId)}}},"club-new-post-created":{displayName:"A new club post has been created!",category:s.mN.Update,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"New club post has been added to ".concat(t.name," club."),url:"/clubs/".concat(t.clubId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT\n p.id "clubPostId",\n c.id as "clubId",\n c.name as "name",\n cm."userId"\n FROM "ClubPost" p\n JOIN "Club" c ON p."clubId" = c.id\n JOIN "ClubMembership" cm ON cm."clubId" = c.id\n WHERE p."createdAt" > \''.concat(t,'\' AND (cm."expiresAt" > NOW() OR cm."expiresAt" IS NULL)\n )\n SELECT\n CONCAT(\'club-new-post-created:\',"clubPostId") "key",\n "userId",\n \'club-new-post-created\' "type",\n jsonb_build_object(\n \'clubId\', "clubId",\n \'name\', "name"\n ) as "details"\n FROM data\n ')}},"club-new-resource-added":{displayName:"A new club resouce has been created!",category:s.mN.Update,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"New ".concat("Post"===t.resourceType?"Image Post":(0,x.Gf)(t.resourceType)," has been added to ").concat(t.name," club."),url:"/clubs/".concat(t.clubId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH "clubEntities" AS (\n SELECT\n COALESCE(c.id, ct."clubId") as "clubId",\n ea."accessToId" "resourceId",\n ea."accessToType" "resourceType",\n COALESCE(c.name, cct.name) as "name"\n FROM "EntityAccess" ea\n LEFT JOIN "Club" c ON ea."accessorId" = c.id AND ea."accessorType" = \'Club\'\n LEFT JOIN "ClubTier" ct ON ea."accessorId" = ct."id" AND ea."accessorType" = \'ClubTier\'\n LEFT JOIN "Club" cct ON ct."clubId" = cct.id\n WHERE COALESCE(c.id, ct."clubId") IS NOT NULL AND ea."addedAt" > \''.concat(t,'\'\n ), data AS (\n SELECT\n ce."clubId",\n ce."resourceId",\n ce."resourceType",\n ce."name",\n cm."userId"\n FROM "clubEntities" ce\n JOIN "ClubMembership" cm ON cm."clubId" = ce."clubId"\n WHERE cm."expiresAt" > NOW() OR cm."expiresAt" IS NULL\n )\n SELECT\n CONCAT(\'club-new-resource-added:\',"resourceType",\':\',"resourceId") "key",\n "userId",\n \'club-new-resource-added\' "type",\n jsonb_build_object(\n \'clubId\', "clubId",\n \'name\', "name",\n \'resourceType\', "resourceType"\n ) as "details"\n FROM data\n ')}}},S={"contest-collection-item-status-change":{displayName:"Your item has been reviewed",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:'The item you submitted to the contest "'.concat(t.collectionName,'" has been ').concat(t.status,"."),url:t.imageId?"/images/".concat(t.imageId):t.modelId?"/models/".concat(t.modelId):t.articleId?"/articles/".concat(t.articleId):t.postId?"/posts/".concat(t.postId):"/collections/".concat(t.collectionId)}}},"beggars-board-rejected":{displayName:"Beggars board entry declined",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your entry to the Buzz Beggars Board was declined. Try again!",url:"/collections/3870938"})},"beggars-board-expired":{displayName:"Beggars board entry expired",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your submission to the Buzz Beggars Board has expired. Time to make a new entry!",url:"/collections/3870938"})},"collection-update":{displayName:"New items added to a collection you follow",category:s.mN.Update,toggleable:!0,prepareMessage:e=>{let{details:t}=e;return{message:'New items have been added to the "'.concat(t.collectionName,'" collection.'),url:"/collections/".concat(t.collectionId)}}}};var k=r(2273),j=r(63568),E=r(99490);let O=e=>{let{threadType:t,threadParentId:r,...n}=e,i=E.QS.stringify({highlight:n.commentId,commentParentType:n.commentParentType,commentParentId:n.commentParentId,threadId:n.threadId});return({model:"/models/".concat(r,"?dialog=commentThread&").concat(i),image:"/images/".concat(r,"?").concat(i),post:"/posts/".concat(r,"?").concat(i,"#comments"),article:"/articles/".concat(r,"?").concat(i,"#comments"),review:"/reviews/".concat(r,"?").concat(i),bounty:"/bounties/".concat(r,"?").concat(i,"#comments"),bountyEntry:"/bounties/entries/".concat(r,"?").concat(i,"#comments")})[t]},C={"new-comment":{displayName:"New comments on your models",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username," commented on your ").concat(t.modelName," model"),url:"/models/".concat(t.modelId,"?dialog=commentThread&commentId=").concat(t.commentId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_comments AS (\n SELECT DISTINCT\n m."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'modelId\', c."modelId",\n \'commentId\', c.id,\n \'modelName\', m.name,\n \'username\', u.username\n ) "details"\n FROM "Comment" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Model" m ON m.id = c."modelId"\n WHERE m."userId" > 0\n AND c."parentId" IS NULL\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != m."userId"\n )\n SELECT\n concat(\'new-comment-model:owner:v1:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-comment\' "type",\n details\n FROM new_comments r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-comment\')\n ')}},"new-comment-response":{displayName:"New comment responses (Models)",category:s.mN.Comment,prepareMessage:e=>{var t;let{details:r}=e;return{message:"".concat(r.username," responded to your comment on the ").concat(r.modelName," model"),url:"/models/".concat(r.modelId,"?dialog=commentThread&commentId=").concat(null!==(t=r.parentId)&&void 0!==t?t:r.commentId,"&highlight=").concat(r.commentId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_comment_response AS (\n SELECT DISTINCT\n p."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'modelId\', c."modelId",\n \'commentId\', c.id,\n \'parentId\', p.id,\n \'modelName\', m.name,\n \'username\', u.username\n ) "details"\n FROM "Comment" c\n JOIN "Comment" p ON p.id = c."parentId"\n JOIN "User" u ON c."userId" = u.id\n JOIN "Model" m ON m.id = c."modelId"\n WHERE m."userId" > 0\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != p."userId"\n )\n SELECT\n concat(\'new-comment-response:owner:v1:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-comment-response\' "type",\n details\n FROM new_comment_response r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-comment-response\')\n ')}},"new-comment-nested":{displayName:"New responses to comments and reviews on your models",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username," responded to a ").concat(t.parentType," on your ").concat(t.modelName," model"),url:"/models/".concat(t.modelId,"?dialog=").concat(t.parentType,"Thread&").concat(t.parentType,"Id=").concat(t.parentId,"&highlight=").concat(t.commentId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_comments_nested AS (\n SELECT DISTINCT\n m."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'modelId\', c."modelId",\n \'commentId\', c.id,\n \'parentId\', c."parentId",\n \'parentType\', CASE WHEN c."parentId" IS NOT NULL THEN \'comment\' ELSE \'review\' END,\n \'modelName\', m.name,\n \'username\', u.username\n ) "details"\n FROM "Comment" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Model" m ON m.id = c."modelId"\n WHERE m."userId" > 0\n AND c."parentId" IS NOT NULL\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != m."userId"\n )\n SELECT\n concat(\'new-comment-nested:user:v1:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-comment-nested\' "type",\n details\n FROM new_comments_nested r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-comment-nested\')\n ')}},"new-comment-reply":{displayName:"New comment replies",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e,r=O(t);return{message:"".concat(t.username," replied to a ").concat(t.threadType," comment you made"),url:r}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_comment_reply AS (\n SELECT DISTINCT\n pc."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'commentId\', c.id,\n \'threadId\', c."threadId",\n \'threadParentId\', COALESCE(\n root."imageId",\n root."modelId",\n root."postId",\n root."questionId",\n root."answerId",\n root."reviewId",\n root."articleId",\n root."bountyId",\n root."bountyEntryId"\n ),\n \'threadType\', CASE\n WHEN root."imageId" IS NOT NULL THEN \'image\'\n WHEN root."modelId" IS NOT NULL THEN \'model\'\n WHEN root."postId" IS NOT NULL THEN \'post\'\n WHEN root."questionId" IS NOT NULL THEN \'question\'\n WHEN root."answerId" IS NOT NULL THEN \'answer\'\n WHEN root."reviewId" IS NOT NULL THEN \'review\'\n WHEN root."articleId" IS NOT NULL THEN \'article\'\n WHEN root."bountyId" IS NOT NULL THEN \'bounty\'\n WHEN root."bountyEntryId" IS NOT NULL THEN \'bountyEntry\'\n ELSE \'comment\'\n END,\n \'commentParentId\', t."commentId",\n \'commentParentType\', \'comment\',\n \'username\', u.username\n ) "details"\n FROM "CommentV2" c\n JOIN "Thread" t ON t.id = c."threadId"\n JOIN "CommentV2" pc ON pc.id = t."commentId"\n JOIN "User" u ON c."userId" = u.id\n JOIN "Thread" root ON root.id = t."rootThreadId"\n WHERE c."createdAt" > \''.concat(t,'\' AND c."userId" != pc."userId"\n )\n SELECT\n concat(\'new-comment-reply:owner:v2:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-comment-reply\' "type",\n details\n FROM new_comment_reply r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-comment-reply\')\n ')}},"new-thread-response":{displayName:"New replies to comment threads you are in",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;if(!t.version)return{message:"".concat(t.username," responded to the ").concat(t.parentType," thread on the ").concat(t.modelName," model"),url:"/models/".concat(t.modelId,"?dialog=").concat(t.parentType,"Thread&").concat(t.parentType,"Id=").concat(t.parentId,"&highlight=").concat(t.commentId)};let r=O(t);return{message:"".concat(t.username," responded to a ").concat((0,k.Z)(t.threadType)," thread you're in"),url:r}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_thread_response AS (\n SELECT DISTINCT\n UNNEST((SELECT ARRAY_AGG("userId") FROM "Comment" cu WHERE cu."parentId" = c."parentId" AND cu."userId" != c."userId")) "ownerId",\n JSONB_BUILD_OBJECT(\n \'modelId\', c."modelId",\n \'commentId\', c.id,\n \'parentId\', c."parentId",\n \'parentType\', \'comment\',\n \'modelName\', m.name,\n \'username\', u.username\n ) "details"\n FROM "Comment" c\n JOIN "Model" m ON m.id = c."modelId"\n JOIN "User" u ON c."userId" = u.id\n WHERE c."parentId" IS NOT NULL AND c."createdAt" > \''.concat(t,'\'\n\n UNION\n\n SELECT DISTINCT\n UNNEST((SELECT ARRAY_AGG("userId") FROM "CommentV2" cu WHERE cu."threadId" = c."threadId" AND cu."userId" != c."userId")) "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'commentId\', c.id,\n \'threadId\', c."threadId",\n \'threadParentId\', COALESCE(\n root."imageId",\n root."modelId",\n root."postId",\n root."questionId",\n root."answerId",\n root."reviewId",\n root."articleId",\n root."bountyId",\n root."bountyEntryId",\n t."imageId",\n t."modelId",\n t."postId",\n t."questionId",\n t."answerId",\n t."reviewId",\n t."articleId",\n t."bountyId",\n t."bountyEntryId"\n ),\n \'threadType\', CASE\n WHEN COALESCE(root."imageId", t."imageId") IS NOT NULL THEN \'image\'\n WHEN COALESCE(root."modelId", t."modelId") IS NOT NULL THEN \'model\'\n WHEN COALESCE(root."postId", t."postId") IS NOT NULL THEN \'post\'\n WHEN COALESCE(root."questionId", t."questionId") IS NOT NULL THEN \'question\'\n WHEN COALESCE(root."answerId", t."answerId") IS NOT NULL THEN \'answer\'\n WHEN COALESCE(root."reviewId", t."reviewId") IS NOT NULL THEN \'review\'\n WHEN COALESCE(root."articleId", t."articleId") IS NOT NULL THEN \'article\'\n WHEN COALESCE(root."bountyId", t."bountyId") IS NOT NULL THEN \'bounty\'\n WHEN COALESCE(root."bountyEntryId", t."bountyEntryId") IS NOT NULL THEN \'bountyEntry\'\n ELSE \'comment\'\n END,\n \'commentParentId\', COALESCE(\n t."imageId",\n t."modelId",\n t."postId",\n t."questionId",\n t."answerId",\n t."reviewId",\n t."articleId",\n t."bountyId",\n t."bountyEntryId",\n t."commentId"\n ),\n \'commentParentType\', CASE\n WHEN t."imageId" IS NOT NULL THEN \'image\'\n WHEN t."modelId" IS NOT NULL THEN \'model\'\n WHEN t."postId" IS NOT NULL THEN \'post\'\n WHEN t."questionId" IS NOT NULL THEN \'question\'\n WHEN t."answerId" IS NOT NULL THEN \'answer\'\n WHEN t."reviewId" IS NOT NULL THEN \'review\'\n WHEN t."articleId" IS NOT NULL THEN \'article\'\n WHEN t."bountyId" IS NOT NULL THEN \'bounty\'\n WHEN t."bountyEntryId" IS NOT NULL THEN \'bountyEntry\'\n ELSE \'comment\'\n END,\n \'username\', u.username\n ) "details"\n FROM "CommentV2" c\n JOIN "Thread" t ON t.id = c."threadId"\n JOIN "User" u ON c."userId" = u.id\n LEFT JOIN "Thread" root ON root.id = t."rootThreadId"\n WHERE c."createdAt" > \'').concat(t,'\'\n -- Unhandled thread types...\n AND t."questionId" IS NULL\n AND t."answerId" IS NULL\n )\n SELECT\n concat(\'new-thread-response:user:\', case when details->>\'version\' is not null then \'v2:\' else \'v1:\' end, details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-thread-response\' "type",\n details\n FROM new_thread_response r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-thread-response\')\n ')}},"new-review-response":{displayName:"New review responses",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;return 2!==t.version?{message:"".concat(t.username," responded to your review on the ").concat(t.modelName," model"),url:"/models/".concat(t.modelId,"?dialog=reviewThread&reviewId=").concat(t.reviewId,"&highlight=").concat(t.commentId)}:{message:"".concat(t.username," responded to your review on the ").concat(t.modelName," model"),url:"/reviews/".concat(t.reviewId,"?highlight=").concat(t.commentId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_review_response AS (\n SELECT DISTINCT\n r."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'modelId\', r."modelId",\n \'commentId\', c.id,\n \'reviewId\', r.id,\n \'modelName\', m.name,\n \'username\', u.username\n ) as "details"\n FROM "CommentV2" c\n JOIN "Thread" t ON t.id = c."threadId"\n JOIN "ResourceReview" r ON r.id = t."reviewId"\n JOIN "User" u ON c."userId" = u.id\n JOIN "Model" m ON m.id = r."modelId"\n WHERE m."userId" > 0\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != r."userId"\n )\n SELECT\n concat(\'new-review-response:owner:v2:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-review-response\' "type",\n details\n FROM new_review_response r\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-review-response\')\n ')}},"new-image-comment":{displayName:"New comments on your images",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;if(2===t.version){let e="".concat(t.username," commented on your image");return t.modelName&&(e+=" posted to the ".concat(t.modelName," model")),{message:e,url:"/images/".concat(t.imageId,"?highlight=").concat(t.commentId)}}let r="".concat(t.username," commented on your ").concat(t.reviewId?"review image":"example image"," posted to the ").concat(t.modelName," model"),n={model:t.modelId,modelVersionId:t.modelVersionId,highlight:t.commentId,infinite:"false"};return t.reviewId?(n.review=t.reviewId,n.returnUrl="/models/".concat(t.modelId,"?dialog=reviewThread&reviewId=").concat(t.reviewId)):n.returnUrl="/models/".concat(t.modelId),{message:r,url:"/images/".concat(t.imageId,"?").concat(new URLSearchParams(n).toString())}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_image_comment AS (\n SELECT DISTINCT\n i."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'imageId\', t."imageId",\n \'postId\', i."postId",\n \'commentId\', c.id,\n \'username\', u.username,\n \'modelName\', m.name,\n \'modelId\', m.id,\n \'modelVersionId\', p."modelVersionId",\n \'modelVersionName\', mv.name\n ) "details"\n FROM "CommentV2" c\n JOIN "Thread" t ON t.id = c."threadId" AND t."imageId" IS NOT NULL\n JOIN "Image" i ON i.id = t."imageId"\n JOIN "Post" p ON p.id = i."postId"\n LEFT JOIN "ModelVersion" mv ON mv.id = p."modelVersionId"\n LEFT JOIN "Model" m ON m.id = mv."modelId"\n JOIN "User" u ON c."userId" = u.id\n WHERE i."userId" > 0\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != i."userId"\n )\n SELECT\n concat(\'new-comment-image:owner:v2:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-image-comment\' "type",\n details\n FROM new_image_comment\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-image-comment\');\n ')}},"new-article-comment":{displayName:"New comments on your articles",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;return t&&!(0,j.Z)(t)?{message:"".concat(t.username,' commented on your article: "').concat(t.articleTitle,'"'),url:"/articles/".concat(t.articleId,"?highlight=").concat(t.commentId,"#comments")}:void 0},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_article_comment AS (\n SELECT DISTINCT\n a."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'articleId\', a.id,\n \'articleTitle\', a.title,\n \'commentId\', c.id,\n \'username\', u.username\n ) "details"\n FROM "CommentV2" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Thread" t ON t.id = c."threadId" AND t."articleId" IS NOT NULL\n JOIN "Article" a ON a.id = t."articleId"\n WHERE a."userId" > 0\n AND c."createdAt" > \''.concat(t,'\'\n AND c."userId" != a."userId"\n )\n SELECT\n concat(\'new-comment-article:owner:v2:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-article-comment\' "type",\n details\n FROM new_article_comment\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-article-comment\');\n ')}},"new-bounty-comment":{displayName:"New comments on your bounty",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username,' commented on your bounty: "').concat(t.bountyTitle,'"'),url:"/bounties/".concat(t.bountyId,"?highlight=").concat(t.commentId,"#comments")}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_bounty_comment AS (\n SELECT DISTINCT\n b."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'bountyId\', b.id,\n \'bountyTitle\', b.name,\n \'commentId\', c.id,\n \'username\', u.username\n ) as "details"\n FROM "CommentV2" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Thread" t ON t.id = c."threadId" AND t."bountyId" IS NOT NULL\n JOIN "Bounty" b ON b.id = t."bountyId"\n WHERE b."userId" > 0\n AND c."createdAt" > \''.concat(t,'\'\n AND c."createdAt" > \'2024-02-24\'\n AND c."userId" != b."userId"\n )\n SELECT\n concat(\'new-comment-bounty:owner:v2:\', details->>\'commentId\') "key",\n "ownerId" "userId",\n \'new-bounty-comment\' "type",\n details\n FROM new_bounty_comment\n WHERE\n NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-bounty-comment\');\n ')}}},I={"cosmetic-shop-item-added-to-section":{defaultDisabled:!0,displayName:"Shop: New Products Available",category:s.mN.System,prepareMessage:()=>({message:"New items have been added to the shop! Check 'em out now!",url:"/shop"}),prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_items AS (\n SELECT * FROM "CosmeticShopSectionItem" ssi\n JOIN "CosmeticShopItem" si ON si.id = ssi."shopItemId"\n JOIN "CosmeticShopSection" ss ON ss.id = ssi."shopSectionId"\n WHERE (\n (\n ssi."createdAt" > \''.concat(t,'\'::timestamp\n AND si."availableFrom" IS NULL\n )\n OR\n (\n si."availableFrom" BETWEEN \'').concat(t,'\'::timestamp\n AND now()\n )\n )\n AND (si."availableTo" >= NOW() OR si."availableTo" IS NULL)\n AND ss."published" = TRUE\n ORDER BY si."availableFrom" DESC, ssi."createdAt" DESC\n LIMIT 1\n )\n SELECT\n CONCAT(\'cosmetic-shop-item-added-to-section:\', ni."shopItemId") "key",\n uns."userId" as "userId",\n \'cosmetic-shop-item-added-to-section\' as "type",\n \'{}\'::jsonb "details"\n FROM new_items ni\n JOIN "UserNotificationSettings" uns ON uns."type" = \'cosmetic-shop-item-added-to-section\'\n WHERE ni."shopItemId" IS NOT NULL\n ')}},"cosmetic-shop-item-sold":{displayName:"Shop: Your Item got bought (Creator's club exclusive)",category:s.mN.System,prepareMessage:e=>{let{details:t}=e;return{message:"You got paid ".concat(t.buzzAmount,' Buzz for selling 1 "').concat(t.shopItemTitle,'" item'),url:"/user/transactions"}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH sold_items AS (\n SELECT DISTINCT\n cp."buzzTransactionId",\n CAST(jsonb_array_elements(si.meta->\'paidToUserIds\') as INT) "ownerId",\n JSONB_BUILD_OBJECT(\n \'shopItemTitle\', si."title",\n \'buzzAmount\', FLOOR(si."unitAmount" / jsonb_array_length(si.meta->\'paidToUserIds\'))\n ) "details"\n FROM "UserCosmeticShopPurchases" cp\n JOIN "CosmeticShopItem" si ON si.id = cp."shopItemId"\n WHERE cp."purchasedAt" > \''.concat(t,'\'::timestamp - INTERVAL \'5 minutes\' AND\n cp."purchasedAt" <= NOW() - INTERVAL \'5 minutes\'\n )\n SELECT\n CONCAT(\'cosmetic-shop-item-sold:\',"buzzTransactionId") "key",\n "ownerId" "userId",\n \'cosmetic-shop-item-sold\' "type",\n details\n FROM sold_items\n ')}}},P={"creators-program-enabled":{displayName:"Creators program enabled",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your account is approved for Creator Payouts! Click this notification to set up your payment details to start receiving payments.",url:"/user/account#payments"})},"creators-program-payments-enabled":{displayName:"Payments enabled",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your account has been verified and approved for payments! You can now start earning money from your content!",url:"/creators-program"})},"creators-program-rejected-stripe":{displayName:"Creators program Rejected (Stripe)",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"We're sorry, but it looks like your stripe account has been rejected for payments. If you need more information, you can contact support.",url:"/creators-program"})},"creators-program-withdrawal-approved":{displayName:"Creators program - Withdrawal Approved",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your withdrawal request has been approved. Your funds will be transferred to your account soon",url:"/user/buzz-dashboard#buzz-withdrawals"})},"creators-program-withdrawal-updated":{displayName:"Creators program - Withdrawal Updated",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your withdrawal request has been updated. You may check the withdrawals' history for more information.",url:"/user/buzz-dashboard#buzz-withdrawals"})},"creators-program-withdrawal-transferred":{displayName:"Creators program - Money transferred",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Your request has been processed and money has been transfered to your account.",url:"/user/buzz-dashboard#buzz-withdrawals"})},"creators-program-withdrawal-rejected":{displayName:"Creators program - Withdrawal Rejected",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"Moderators have rejected your withdrawal request. Please contact us for more information.",url:"/user/buzz-dashboard#buzz-withdrawals"})},"creators-program-withdrawal-reverted":{displayName:"Creators program - Money reverted",category:s.mN.Buzz,toggleable:!1,prepareMessage:()=>({message:"We have decided to revert money that was transfered to your account. Please contact us for more information on why we came to this desicion.",url:"/user/buzz-dashboard#buzz-withdrawals"})}},A={"featured-model":{displayName:"Model featured",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Congrats! Your ".concat(t.modelName," model has been featured on the homepage"),url:"/models/".concat(t.modelId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n m."userId",\n jsonb_build_object(\n \'modelId\', ci."modelId",\n \'modelName\', m.name\n ) "details",\n ci."modelId"\n FROM "CollectionItem" ci\n JOIN "Collection" c ON c.id = ci."collectionId"\n JOIN "Model" m ON m.id = ci."modelId"\n WHERE c."userId" = -1 AND c.name = \'Featured Models\'\n AND ci.status = \'ACCEPTED\'\n AND (ci."createdAt" > \''.concat(t,"' OR ci.\"updatedAt\" > '").concat(t,'\')\n )\n SELECT\n CONCAT(\'featured-model:\',"modelId") "key", -- maybe add last sent\n "userId",\n \'featured-model\' "type",\n details\n FROM data\n ')}},"featured-image":{displayName:"Image featured",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Congrats! Your image has been featured on the homepage",url:"/images/".concat(t.imageId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n i."userId",\n jsonb_build_object(\n \'imageId\', ci."imageId"\n ) "details",\n ci."imageId"\n FROM "CollectionItem" ci\n JOIN "Collection" c ON c.id = ci."collectionId"\n JOIN "Image" i ON i.id = ci."imageId"\n WHERE c."userId" = -1 AND c.name = \'Featured Images\'\n AND ci.status = \'ACCEPTED\'\n AND (ci."createdAt" > \''.concat(t,"' OR ci.\"updatedAt\" > '").concat(t,'\')\n )\n SELECT\n CONCAT(\'featured-image:\',"imageId") "key", -- maybe add last sent\n "userId",\n \'featured-image\' "type",\n details\n FROM data\n ')}},"featured-post":{displayName:"Post featured",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e,r="Congrats! Your post has been featured on the homepage";return t.postTitle&&(r='Congrats! Your post "'.concat(t.postTitle,'" has been featured on the homepage')),{message:r,url:"/posts/".concat(t.postId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n p."userId",\n jsonb_build_object(\n \'postId\', ci."postId",\n \'postTitle\', p.title\n ) "details",\n ci."postId"\n FROM "CollectionItem" ci\n JOIN "Collection" c ON c.id = ci."collectionId"\n JOIN "Post" p ON p.id = ci."postId"\n WHERE c."userId" = -1 AND c.name = \'Featured Posts\'\n AND ci.status = \'ACCEPTED\'\n AND (ci."createdAt" > \''.concat(t,"' OR ci.\"updatedAt\" > '").concat(t,'\')\n )\n SELECT\n CONCAT(\'featured-post:\',"postId") "key", -- maybe add last sent\n "userId",\n \'featured-post\' "type",\n details\n FROM data\n ')}},"featured-article":{displayName:"Article featured",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:'Congrats! Your article "'.concat(t.articleTitle,'" has been featured on the homepage'),url:"/articles/".concat(t.articleId)}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT DISTINCT\n a."userId",\n jsonb_build_object(\n \'articleId\', ci."articleId",\n \'articleTitle\', a.title\n ) "details",\n ci."articleId"\n FROM "CollectionItem" ci\n JOIN "Collection" c ON c.id = ci."collectionId"\n JOIN "Article" a ON a.id = ci."articleId"\n WHERE c."userId" = -1 AND c.name = \'Featured Articles\'\n AND ci.status = \'ACCEPTED\'\n AND (ci."createdAt" > \''.concat(t,"' OR ci.\"updatedAt\" > '").concat(t,'\')\n )\n SELECT\n CONCAT(\'featured-article:\',"articleId") "key", -- maybe add last sent\n "userId",\n \'featured-article\' "type",\n details\n FROM data\n ')}}},T={"followed-by":{displayName:"New followers",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username," has followed you!"),url:"/user/".concat(t.username)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n SELECT\n CONCAT(\'followed-by:\',ue."userId",\':\',ue."targetUserId") "key",\n ue."targetUserId" as "userId",\n \'followed-by\' as "type",\n jsonb_build_object(\n \'userId\', u.id,\n \'username\', u.username\n ) "details"\n FROM "UserEngagement" ue\n JOIN "User" u ON u.id = ue."userId"\n WHERE ue.type = \'Follow\' AND ue."createdAt" > \''.concat(t,'\'\n AND NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = ue."targetUserId" AND type = \'followed-by\')\n ')}}},z={"profile-picture-blocked":{displayName:"Avatar blocked",category:s.mN.System,toggleable:!1,prepareMessage:()=>({message:"Your avatar has been blocked.",url:"/user/account"}),prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH data AS (\n SELECT\n i.id "imageId",\n u.id as "userId"\n FROM "Image" i\n JOIN "User" u ON i.id = u."profilePictureId"\n WHERE i."updatedAt" > \''.concat(t,'\' AND i.ingestion = \'Blocked\'::"ImageIngestionStatus"\n )\n SELECT\n CONCAT(\'profile-picture-blocked:\',"imageId") "key",\n "userId",\n \'profile-picture-blocked\' "type",\n \'{}\'::jsonb "details"\n FROM data\n ')}}},N={"new-mention":{displayName:"New @mentions",category:s.mN.Comment,prepareMessage:e=>{let{details:t}=e;if("comment"===t.mentionedIn&&void 0!==t.threadId){let e=O(t);return{message:"".concat(t.username," mentioned you in a comment on a").concat(["a","e","i","o","u"].includes(t.threadType[0])?"n":""," ").concat("comment"===t.threadType?"comment thread":t.threadType),url:e}}if("comment"===t.mentionedIn){if("review"===t.parentType)return;return{message:"".concat(t.username," mentioned you in a ").concat(t.parentType," on ").concat(t.modelName),url:"/models/".concat(t.modelId,"?dialog=").concat(t.parentType,"Thread&").concat(t.parentType,"Id=").concat(t.parentId,"&highlight=").concat(t.commentId)}}return{message:"".concat(t.username," mentioned you in the description of ").concat(t.modelName),url:"/models/".concat(t.modelId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_mentions AS (\n SELECT DISTINCT\n CAST(unnest(regexp_matches(content, \'"mention:(\\d+)"\', \'g\')) as INT) "ownerId",\n JSONB_BUILD_OBJECT(\n \'version\', 2,\n \'mentionedIn\', \'comment\',\n \'commentId\', c.id,\n \'threadId\', c."threadId",\n \'threadParentId\', COALESCE(\n root."imageId",\n root."modelId",\n root."postId",\n root."questionId",\n root."answerId",\n root."reviewId",\n root."articleId",\n root."bountyId",\n root."bountyEntryId",\n t."imageId",\n t."modelId",\n t."postId",\n t."questionId",\n t."answerId",\n t."reviewId",\n t."articleId",\n t."bountyId",\n t."bountyEntryId"\n ),\n \'threadType\', CASE\n WHEN COALESCE(root."imageId", t."imageId") IS NOT NULL THEN \'image\'\n WHEN COALESCE(root."modelId", t."modelId") IS NOT NULL THEN \'model\'\n WHEN COALESCE(root."postId", t."postId") IS NOT NULL THEN \'post\'\n WHEN COALESCE(root."questionId", t."questionId") IS NOT NULL THEN \'question\'\n WHEN COALESCE(root."answerId", t."answerId") IS NOT NULL THEN \'answer\'\n WHEN COALESCE(root."reviewId", t."reviewId") IS NOT NULL THEN \'review\'\n WHEN COALESCE(root."articleId", t."articleId") IS NOT NULL THEN \'article\'\n WHEN COALESCE(root."bountyId", t."bountyId") IS NOT NULL THEN \'bounty\'\n WHEN COALESCE(root."bountyEntryId", t."bountyEntryId") IS NOT NULL THEN \'bountyEntry\'\n ELSE \'comment\'\n END,\n \'commentParentId\', COALESCE(\n t."imageId",\n t."modelId",\n t."postId",\n t."questionId",\n t."answerId",\n t."reviewId",\n t."articleId",\n t."bountyId",\n t."bountyEntryId",\n t."commentId"\n ),\n \'commentParentType\', CASE\n WHEN t."imageId" IS NOT NULL THEN \'image\'\n WHEN t."modelId" IS NOT NULL THEN \'model\'\n WHEN t."postId" IS NOT NULL THEN \'post\'\n WHEN t."questionId" IS NOT NULL THEN \'question\'\n WHEN t."answerId" IS NOT NULL THEN \'answer\'\n WHEN t."reviewId" IS NOT NULL THEN \'review\'\n WHEN t."articleId" IS NOT NULL THEN \'article\'\n WHEN t."bountyId" IS NOT NULL THEN \'bounty\'\n WHEN t."bountyEntryId" IS NOT NULL THEN \'bountyEntry\'\n ELSE \'comment\'\n END,\n \'username\', u.username\n ) "details"\n FROM "CommentV2" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Thread" t ON t.id = c."threadId"\n LEFT JOIN "Thread" root ON root.id = t."rootThreadId"\n WHERE (c."createdAt" > \''.concat(t,'\')\n AND c.content LIKE \'%"mention:%\'\n -- Unhandled thread types...\n AND t."questionId" IS NULL\n AND t."answerId" IS NULL\n\n UNION\n\n SELECT DISTINCT\n CAST(unnest(regexp_matches(content, \'"mention:(\\d+)"\', \'g\')) as INT) "ownerId",\n JSONB_BUILD_OBJECT(\n \'mentionedIn\', \'comment\',\n \'modelId\', c."modelId",\n \'commentId\', c.id,\n \'parentId\', c."parentId",\n \'parentType\', CASE WHEN c."parentId" IS NOT NULL THEN \'comment\' ELSE \'review\' END,\n \'modelName\', m.name,\n \'username\', u.username\n ) "details"\n FROM "Comment" c\n JOIN "User" u ON c."userId" = u.id\n JOIN "Model" m ON m.id = c."modelId"\n WHERE m."userId" > 0\n AND (c."createdAt" > \'').concat(t,"')\n AND c.content LIKE '%\"mention:%'\n\n UNION\n\n SELECT DISTINCT\n CAST(unnest(regexp_matches(m.description, '\"mention:(\\d+)\"', 'g')) as INT) \"ownerId\",\n JSONB_BUILD_OBJECT(\n 'mentionedIn', 'model',\n 'modelId', m.id,\n 'modelName', m.name,\n 'username', u.username\n ) \"details\"\n FROM \"Model\" m\n JOIN \"User\" u ON m.\"userId\" = u.id\n WHERE m.\"userId\" > 0\n AND (m.\"publishedAt\" > '").concat(t,"' OR m.\"updatedAt\" > '").concat(t,"')\n AND m.description LIKE '%\"mention:%'\n AND m.status = 'Published'\n )\n SELECT\n concat('new-mention:user:', case when details->>'mentionedIn' = 'model' then 'model:' when details->>'version' is not null then 'v2:' else 'v1:' end, coalesce(details->>'commentId', details->>'modelId')) \"key\",\n \"ownerId\" \"userId\",\n 'new-mention' \"type\",\n details\n FROM new_mentions r\n WHERE\n NOT EXISTS (SELECT 1 FROM \"UserNotificationSettings\" WHERE \"userId\" = \"ownerId\" AND type = 'new-mention')\n ")}}};function R(){let e=n(["\n SELECT DISTINCT modelId\n FROM modelVersionEvents\n WHERE time > ","\n AND type = 'Download'\n "]);return R=function(){return e},e}let _=[5,10,20,50,100,500],M=[100,500,1e3,1e4,5e4],D={"model-download-milestone":{displayName:"Model download milestones",category:s.mN.Milestone,prepareMessage:e=>{let{details:t}=e;return{message:"Congrats! Your ".concat(t.modelName," model has received ").concat(t.downloadCount.toLocaleString()," downloads"),url:"/models/".concat(t.modelId)}},prepareQuery:async e=>{let{lastSentDate:t,clickhouse:r}=e;if(!r)return;let n=JSON.stringify((await r.$query(R(),t)).map(e=>e.modelId));return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(_.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), model_value AS (\n SELECT\n "modelId" model_id,\n "downloadCount" download_count\n FROM "ModelMetric"\n WHERE\n "modelId" = ANY (SELECT json_array_elements(\'').concat(n,'\'::json)::text::integer)\n AND "downloadCount" >= ').concat(_[0],'\n AND timeframe = \'AllTime\'\n ), model_milestone AS (\n SELECT\n m."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'modelName\', m.name,\n \'modelId\', m.id,\n \'downloadCount\', ms.value\n ) "details"\n FROM model_value mval\n JOIN "Model" m on m.id = mval.model_id\n JOIN milestones ms ON ms.value <= mval.download_count\n WHERE m."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'model-download-milestone:\', details->>\'modelId\', \':\', details->>\'downloadCount\') as "key",\n "ownerId" "userId",\n \'model-download-milestone\' "type",\n details\n FROM model_milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'model-download-milestone\')\n ')}},"model-like-milestone":{displayName:"Model like milestones",category:s.mN.Milestone,prepareMessage:e=>{let{details:t}=e,r=t.favoriteCount||t.thumbsUpCount;return{message:"Congrats! Your ".concat(t.modelName," model has received ").concat(null==r?void 0:r.toLocaleString()," likes"),url:"/models/".concat(t.modelId)}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(M.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), model_value AS (\n SELECT DISTINCT\n mm."modelId" model_id,\n mm."thumbsUpCount" thumbs_up_count\n FROM "ModelMetric" mm\n JOIN "Model" m ON m.id = mm."modelId"\n WHERE\n mm."updatedAt" > \'').concat(t,'\'\n AND mm."timeframe" = \'AllTime\'\n AND "thumbsUpCount" >= ').concat(M[0],'\n AND m."userId" > 0\n ), model_milestone AS (\n SELECT\n m."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'modelName\', m.name,\n \'modelId\', m.id,\n \'thumbsUpCount\', ms.value\n ) "details"\n FROM model_value mval\n JOIN "Model" m on m.id = mval.model_id\n JOIN milestones ms ON ms.value <= mval.thumbs_up_count\n WHERE m."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'model-like-milestone:\', details->>\'modelId\', \':\', details->>\'thumbsUpCount\') "key",\n "ownerId" "userId",\n \'model-like-milestone\' "type",\n details\n FROM model_milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'model-like-milestone\')\n ')}},"new-model-version":{displayName:"New versions of models you follow",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:"The ".concat(t.modelName," model has a new version: ").concat(t.versionName),url:"/models/".concat(t.modelId).concat(t.modelVersionId?"?modelVersionId=".concat(t.modelVersionId):"")}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_model_version AS (\n SELECT\n m."userId",\n mv."modelId",\n JSONB_BUILD_OBJECT(\n \'modelId\', mv."modelId",\n \'modelName\', m.name,\n \'versionName\', mv.name,\n \'modelVersionId\', mv.id\n ) "details"\n FROM "ModelVersion" mv\n JOIN "Model" m ON m.id = mv."modelId"\n WHERE m."userId" > 0\n AND mv."publishedAt" - m."publishedAt" > INTERVAL \'2 hour\'\n AND (\n -- handle scheduled posts - these can take a little while to update via another job\n (mv."publishedAt" BETWEEN \''.concat(t,"'::timestamptz - interval '59 second' AND now() AND mv.status = 'Published')\n OR (mv.\"publishedAt\" <= '").concat(t,'\' AND mv.status = \'Scheduled\')\n )\n ), followers AS (\n SELECT DISTINCT ON ("userId")\n *\n FROM (\n SELECT\n ue."userId",\n nmv.details\n FROM "UserEngagement" ue\n JOIN new_model_version nmv ON nmv."userId" = ue."targetUserId"\n WHERE ue.type = \'Follow\'\n AND NOT EXISTS (SELECT 1 FROM "ModelEngagement" me WHERE me.type = \'Mute\' AND me."userId" = ue."userId" AND me."modelId" = nmv."modelId")\n\n UNION\n\n SELECT\n me."userId",\n nmv.details\n FROM "ModelEngagement" me\n JOIN new_model_version nmv ON nmv."modelId" = me."modelId"\n WHERE type = \'Notify\'\n ) t\n )\n SELECT\n CONCAT(\'new-model-version:\', details->>\'modelVersionId\') "key",\n "userId",\n \'new-model-version\' "type",\n details\n FROM followers n\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" uns WHERE uns."userId" = n."userId" AND type = \'new-model-version\')\n ')}},"new-model-from-following":{displayName:"New models from followed users",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.username," released a new ").concat((0,x.Gf)(t.modelType),": ").concat(t.modelName),url:"/models/".concat(t.modelId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH new_model_from_following AS (\n SELECT DISTINCT\n ue."userId" "ownerId",\n JSONB_BUILD_OBJECT(\n \'modelId\', m."id",\n \'modelName\', m.name,\n \'username\', u.username,\n \'modelType\', m.type\n ) "details"\n FROM "Model" m\n JOIN "User" u ON u.id = m."userId"\n JOIN "UserEngagement" ue ON ue."targetUserId" = m."userId" AND m."publishedAt" >= ue."createdAt" AND ue.type = \'Follow\'\n WHERE\n m."userId" != -1\n AND m."publishedAt" BETWEEN \''.concat(t,'\' AND now()\n AND m.status IN (\'Published\', \'Scheduled\')\n )\n SELECT\n CONCAT(\'new-model-from-following:\', details->>\'modelId\') "key",\n "ownerId" "userId",\n \'new-model-from-following\' "type",\n details\n FROM new_model_from_following\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'new-model-from-following\')\n ')}},"early-access-complete":{toggleable:!1,displayName:"Early Access Complete",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;return{message:"".concat(t.modelName,": ").concat(t.versionName," has left Early Access!"),url:"/models/".concat(t.modelId,"?modelVersionId=").concat(t.versionId)}},prepareQuery:e=>{let{lastSent:t}=e;return'\n WITH early_access_versions AS (\n SELECT\n mv.id version_id,\n mv.name version_name,\n m.id model_id,\n m.name model_name,\n m.type model_type,\n mv."publishedAt" updated_published_at\n FROM "ModelVersion" mv\n JOIN "Model" m ON m.id = mv."modelId"\n where\n (mv."earlyAccessConfig"->>\'originalTimeframe\')::int > 0\n AND mv."publishedAt" >= \''.concat(t,"'\n ), early_access_complete AS (\n SELECT DISTINCT\n mve.\"userId\" owner_id,\n jsonb_build_object(\n 'modelId', model_id,\n 'modelName', model_name,\n 'modelType', model_type,\n 'versionId', version_id,\n 'versionName', version_name\n ) details\n FROM early_access_versions ev\n JOIN \"ModelVersionEngagement\" mve ON mve.\"modelVersionId\" = ev.version_id AND mve.type = 'Notify'\n WHERE ev.updated_published_at > '").concat(t,"' AND ev.updated_published_at < now()\n )\n SELECT\n concat('early-access-complete:', details->>'versionId') \"key\",\n owner_id \"userId\",\n 'early-access-complete' \"type\",\n details\n FROM early_access_complete;\n ")}},"old-draft":{displayName:"Old Model Draft Deletion Reminder",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Your ".concat(t.modelName," model that is in draft mode will be deleted in 1 week."),url:"/models/".concat(t.modelId,"/").concat((0,x.vY)(t.modelName))}},prepareQuery:e=>{let{lastSent:t}=e;return"\n with to_add AS (\n SELECT DISTINCT\n m.\"userId\",\n jsonb_build_object(\n 'modelId', m.id,\n 'modelName', m.name,\n 'updatedAt', m.\"updatedAt\"\n ) details\n FROM \"Model\" m\n WHERE m.status IN ('Draft')\n AND m.\"updatedAt\" BETWEEN '".concat(t,"'::timestamp - INTERVAL '23 days' AND NOW() - INTERVAL '23 days'\n )\n SELECT\n concat('old-draft:', details->>'modelId', ':', details->>'updatedAt') \"key\",\n \"userId\",\n 'old-draft' \"type\",\n details\n FROM to_add\n ")}},"early-access-failed-to-publish":{displayName:"Model version failed to publish.",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"We were unable to publish your model version: ".concat(t.displayName," due to insufficient funds. Please remove early access or purchase more buzz to publish."),url:"/models/".concat(t.modelId,"?modelVersionId=").concat(t.modelVersionId)}}},"model-hash-fix":{displayName:"Model Hash Fix",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:'The hash in the metadata of your resource "'.concat(t.modelName,": ").concat(t.versionName,'" has been corrected. Please redownload it to ensure that your images report the correct hash going forward.'),url:"/models/".concat(t.modelId,"/").concat((0,x.vY)(t.modelName),"?modelVersionId=").concat(t.versionId)}}}},L=[5,10,20,50,100],F=[5,10,20,50,100],U={"comment-reaction-milestone":{displayName:"Comment reaction milestones",category:s.mN.Milestone,prepareMessage:e=>{let{details:t}=e;return{message:"Your comment on ".concat(t.modelName," has received ").concat(t.reactionCount," reactions"),url:"/models/".concat(t.modelId,"?dialog=commentThread&commentId=").concat(t.rootCommentId)}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(L.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), affected AS (\n SELECT DISTINCT\n "commentId" affected_id\n FROM "CommentReaction"\n WHERE "createdAt" > \'').concat(t,'\'\n ), affected_value AS (\n SELECT\n a.affected_id,\n COUNT(r."commentId") reaction_count\n FROM "CommentReaction" r\n JOIN affected a ON a.affected_id = r."commentId"\n GROUP BY a.affected_id\n HAVING COUNT(*) >= ').concat(L[0],'\n ), reaction_milestone AS (\n SELECT\n c."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'modelName\', m.name,\n \'modelId\', m.id,\n \'rootCommentId\', COALESCE(c."parentId", c.id),\n \'commentId\', c.id,\n \'reactionCount\', ms.value\n ) "details"\n FROM affected_value a\n JOIN "Comment" c on c.id = a.affected_id\n JOIN "Model" m ON m.id = c."modelId"\n JOIN milestones ms ON ms.value <= a.reaction_count\n WHERE c."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'comment-reaction-milestone:\', details->>\'commentId\', \':\', details->>\'reactionCount\') "key",\n "ownerId" "userId",\n \'comment-reaction-milestone\' "type",\n details\n FROM reaction_milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'comment-reaction-milestone\')\n ')}},"image-reaction-milestone":{displayName:"Image reaction milestones",category:s.mN.Milestone,prepareMessage:e=>{let t,{details:r}=e;if(2===r.version){let e;if(r.models){let t=r.models.slice(0,2),n=r.models.length-t.length;e=n>0?t.join(", ")+", and ".concat(n," more"):function(e,t){if(!Array.isArray(e))throw TypeError("Expected an array, but got a non-array value "+e+".");return(t={separator:", ",lastSeparator:", and ",...t},0===e.length)?"":1===e.length?e[0]:e.slice(0,-1).join(t.separator)+t.lastSeparator+e[e.length-1]}(t)}t="Your image".concat(e?" using ".concat(e):""," has received ").concat(r.reactionCount," reactions")}else t="Your ".concat(r.reviewId?"review image":"example image"," on the ").concat(r.modelName," model has received ").concat(r.reactionCount," reactions");return{message:t,url:"/images/".concat(r.imageId,"?postId=").concat(r.postId)}}},"article-reaction-milestone":{displayName:"Article reaction milestones",category:s.mN.Milestone,prepareMessage:e=>{let{details:t}=e;return{message:'Your article, "'.concat(t.articleTitle,'" has received ').concat(t.reactionCount," reactions"),url:"/articles/".concat(t.articleId)}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH milestones AS (\n SELECT * FROM (VALUES ".concat(F.map(e=>"(".concat(e,")")).join(", "),') m(value)\n ), affected AS (\n SELECT DISTINCT\n "articleId" affected_id\n FROM "ArticleReaction"\n WHERE "createdAt" > \'').concat(t,'\'\n ), affected_value AS (\n SELECT\n a.affected_id,\n COUNT(r."articleId") reaction_count\n FROM "ArticleReaction" r\n JOIN affected a ON a.affected_id = r."articleId"\n GROUP BY a.affected_id\n HAVING COUNT(*) >= ').concat(F[0],'\n ), reaction_milestone AS (\n SELECT\n a."userId" "ownerId",\n JSON_BUILD_OBJECT(\n \'articleId\', a.id,\n \'articleTitle\', a.title,\n \'reactionCount\', ms.value\n ) "details"\n FROM affected_value af\n JOIN "Article" a on a.id = af.affected_id\n JOIN milestones ms ON ms.value <= af.reaction_count\n AND a."createdAt" > \'').concat(a.Mp,'\'\n )\n SELECT\n CONCAT(\'article-reaction-milestone:\', details->>\'articleId\', \':\', details->>\'reactionCount\') "key",\n "ownerId" "userId",\n \'article-reaction-milestone\' "type",\n details\n FROM reaction_milestone\n WHERE NOT EXISTS (SELECT 1 FROM "UserNotificationSettings" WHERE "userId" = "ownerId" AND type = \'article-reaction-milestone\')\n ')}}},B={[r(35818).py.Image]:"/images"},H={"report-actioned":{displayName:"Report actioned",category:s.mN.System,toggleable:!1,prepareMessage:e=>{var t;let{details:r}=e;return{message:"The ".concat(null!==(t=r.reportType)&&void 0!==t?t:"item"," you reported has been actioned. Thanks for helping keep the community safe!")}},prepareQuery:async e=>{let{lastSent:t}=e;return'\n WITH actioned AS (\n SELECT DISTINCT\n u."id" "ownerId",\n JSONB_BUILD_OBJECT(\n \'reportId\', r.id,\n \'reportType\',\n CASE\n WHEN jsonb_typeof(r.details->\'reportType\') = \'string\' THEN r.details->>\'reportType\'\n WHEN EXISTS (SELECT 1 FROM "ResourceReviewReport" WHERE "reportId" = r.id) THEN \'review\'\n WHEN EXISTS (SELECT 1 FROM "ModelReport" WHERE "reportId" = r.id) THEN \'resource\'\n WHEN EXISTS (SELECT 1 FROM "CommentReport" WHERE "reportId" = r.id) THEN \'comment\'\n WHEN EXISTS (SELECT 1 FROM "CommentV2Report" WHERE "reportId" = r.id) THEN \'comment\'\n WHEN EXISTS (SELECT 1 FROM "ImageReport" WHERE "reportId" = r.id) THEN \'image\'\n WHEN EXISTS (SELECT 1 FROM "ArticleReport" WHERE "reportId" = r.id) THEN \'article\'\n WHEN EXISTS (SELECT 1 FROM "PostReport" WHERE "reportId" = r.id) THEN \'post\'\n WHEN EXISTS (SELECT 1 FROM "CollectionReport" WHERE "reportId" = r.id) THEN \'collection\'\n END,\n \'reportReason\', r.reason,\n \'createdAt\', r."createdAt"\n ) as "details"\n FROM "Report" r\n JOIN "User" u ON u.id = r."userId" OR u.id = ANY(r."alsoReportedBy")\n WHERE\n r."userId" > 0 AND\n r.reason != \'NSFW\' AND\n r."statusSetAt" > \''.concat(t,"' AND\n r.status = 'Actioned'\n )\n SELECT\n concat('report-actioned:', details->>'reportId') \"key\",\n \"ownerId\" \"userId\",\n 'report-actioned' \"type\",\n details\n FROM actioned r\n ")}},"entity-appeal-resolved":{displayName:"Entity appeal resolved",category:s.mN.Other,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Your appeal regarding your ".concat(t.entityType," has been ").concat(t.status.toLowerCase()).concat(t.resolvedMessage?": ".concat(t.resolvedMessage,"."):"."),url:"".concat(B[t.entityType],"/").concat(t.entityId)}}}},Z={"new-review":{displayName:"New reviews",category:s.mN.Update,prepareMessage:e=>{let{details:t}=e;if(2===t.version){var r;let e=null!==(r=t.recommended)&&void 0!==r?r:!!t.rating&&t.rating>=3,n="".concat(t.username," gave ").concat(t.modelName," ").concat(t.modelVersionName," a ").concat(e?"\uD83D\uDC4D":"\uD83D\uDC4E");return t.imageCount&&(n+=" and posted ".concat(t.imageCount," images")),{message:n,url:"/reviews/".concat(t.reviewId)}}return{message:"".concat(t.username," reviewed ").concat(t.modelName," ").concat(t.modelVersionName),url:"/redirect?to=review&reviewId=".concat(t.reviewId)}}}},W={"civitai-features":{displayName:"New Civitai features",category:s.mN.System,prepareMessage:e=>{let{details:t}=e;return{message:"New Features! ".concat(t.featureBlurb,", check it out!"),url:"/content/release/".concat(t.releaseSlug)}}},"tos-violation":{displayName:"Terms of Service Violation",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:"Your ".concat(t.entity,' on "').concat(t.modelName,'" has been removed due to a Terms of Service violation.'),url:t.url}}},"system-announcement":{displayName:"System Announcement",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:t.message,url:t.url}}},"system-message":{displayName:"Heads Up!",category:s.mN.Other,toggleable:!1,prepareMessage:e=>{let{details:t}=e;return{message:t.message,url:t.url}}}};var V=r(76772);let $={"model-version-unpublished":{displayName:"Model version unpublished",category:s.mN.System,toggleable:!1,prepareMessage:e=>{var t,r;let{details:n}=e;return{message:"other"!==n.reason?"Your ".concat(n.modelName," - ").concat(n.modelVersionName," model has been unpublished: ").concat(null!==(t=V.O[n.reason].notificationMessage)&&void 0!==t?t:""):"Your ".concat(n.modelName," - ").concat(n.modelVersionName," model has been unpublished: ").concat(null!==(r=n.customMessage)&&void 0!==r?r:""),url:"/models/".concat(n.modelId,"/").concat((0,x.vY)(n.modelName),"?modelVersionId=").concat(n.modelVersionId)}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH unpublished AS (\n SELECT DISTINCT\n m.\"userId\",\n jsonb_build_object(\n 'modelId', m.id,\n 'modelName', m.name,\n 'modelVersionId', mv.id,\n 'modelVersionName', mv.name,\n 'reason', mv.meta->>'unpublishedReason',\n 'customMessage', mv.meta->>'customMessage'\n ) \"details\"\n FROM \"ModelVersion\" mv\n JOIN \"Model\" m ON m.id = mv.\"modelId\"\n WHERE jsonb_typeof(mv.meta->'unpublishedReason') = 'string'\n AND (mv.meta->>'unpublishedAt')::timestamp > '".concat(t,"'\n )\n SELECT\n concat('model-version-unpublished:', details->>'modelVersionId', ':', '").concat(t,'\') "key",\n "userId",\n \'model-version-unpublished\' "type",\n details\n FROM unpublished;\n ')}},"model-unpublished":{displayName:"Model unpublished",category:s.mN.System,toggleable:!1,prepareMessage:e=>{var t,r;let{details:n}=e;return n&&!(0,j.Z)(n)?{message:"other"!==n.reason?"Your ".concat(n.modelName," model has been unpublished: ").concat(null!==(t=V.O[n.reason].notificationMessage)&&void 0!==t?t:""):"Your ".concat(n.modelName," model has been unpublished: ").concat(null!==(r=n.customMessage)&&void 0!==r?r:""),url:"/models/".concat(n.modelId,"/").concat((0,x.vY)(n.modelName))}:void 0},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH unpublished AS (\n SELECT DISTINCT\n m.\"userId\",\n jsonb_build_object(\n 'modelId', m.id,\n 'modelName', m.name,\n 'reason', m.meta->>'unpublishedReason',\n 'customMessage', m.meta->>'customMessage'\n ) \"details\"\n FROM \"Model\" m\n WHERE jsonb_typeof(m.meta->'unpublishedReason') = 'string'\n AND (m.meta->>'unpublishedAt')::timestamp > '".concat(t,"'\n )\n SELECT\n concat('model-unpublished:', details->>'modelId', ':', '").concat(t,'\') "key",\n "userId",\n \'model-unpublished\' "type",\n details\n FROM unpublished;\n ')}},"model-republish-declined":{displayName:"Model republish declined",category:s.mN.System,toggleable:!1,prepareMessage:e=>{let{details:t}=e,r="Your republish request for ".concat(t.modelName," has been declined");return t.reason&&(r+=": ".concat(t.reason)),{message:r,url:"/models/".concat(t.modelId,"/").concat((0,x.vY)(t.modelName))}},prepareQuery:e=>{let{lastSent:t}=e;return"\n WITH declined AS (\n SELECT DISTINCT\n m.\"userId\",\n jsonb_build_object(\n 'modelId', m.id,\n 'modelName', m.name,\n 'reason', m.meta->>'declinedReason'\n ) \"details\"\n FROM \"Model\" m\n WHERE jsonb_typeof(m.meta->'declinedReason') = 'string'\n AND (m.meta->>'declinedAt')::timestamp > '".concat(t,"'\n )\n SELECT\n concat('model-republish-declined:', details->>'modelId', ':', '").concat(t,'\') "key",\n "userId",\n \'model-republish-declined\' "type",\n details\n FROM declined;\n ')}}},q={"join-community":{displayName:"Welcome to Civitai",category:s.mN.System,toggleable:!1,prepareMessage:()=>({message:"Happy to have you here! Come join our Discord server to stay up to date with the community and updates to the platform.",url:"/discord",target:"_blank"})}},G={...N,...D,...Z,...C,...U,...W,...q,...$,...f,...H,...A,...h,...g,...S,...z,...w,...P,...T,...I,...y},K=Object.entries(G).map(e=>{let[t,r]=e;return{...r,key:t}}).sort((e,t)=>{var r,n;return(null!==(r=e.priority)&&void 0!==r?r:0)-(null!==(n=t.priority)&&void 0!==n?n:0)}),X={};for(let e of K){let t=null!==(i=e.priority)&&void 0!==i?i:0;null!==(o=X[t])&&void 0!==o||(X[t]=[]),X[t].push(e)}function J(e){var t;let{prepareMessage:r}=null!==(t=G[e.type])&&void 0!==t?t:{};return r?r(e):null}Object.keys(X).sort().map(e=>X[e]);let{notificationCategoryTypes:Y,notificationTypes:Q}=function(){let e=[],t={};for(let[n,{displayName:i,toggleable:o,category:a,defaultDisabled:s}]of Object.entries(G)){var r;!1!==o&&(null!==(r=t[a])&&void 0!==r||(t[a]=[]),t[a].push({type:n,displayName:i,defaultDisabled:null!=s&&s}),e.push(n))}return{notificationCategoryTypes:t,notificationTypes:e}}()},47540:function(e,t,r){"use strict";r.d(t,{Cl:function(){return l},DJ:function(){return p},TD:function(){return c}});var n=r(66781),i=r(827),o=r(1604),a=r(25291),s=r(40130);let l=["16:9","4:3","1:1","3:4","9:16"],c=[2,4,8],u=o.ZP.object({engine:o.ZP.literal("haiper"),workflow:o.ZP.string(),model:o.ZP.nativeEnum(n.RA).default(n.RA.V2).catch(n.RA.V2),enablePromptEnhancer:o.ZP.boolean().default(!0),duration:(0,a.XZ)(c).default(4).catch(4),seed:i.$r,resolution:(0,a.XZ)([720,1080,2160]).default(720)}),d=i.XY.merge(u).extend({negativePrompt:i.ke,aspectRatio:o.ZP.enum(l).default("1:1").catch("1:1")}),f=i.yW.merge(u).extend({prompt:i.ys}),p=[new s.V({subType:"txt2vid",engine:"haiper",schema:d,metadataDisplayProps:["aspectRatio","duration","seed","resolution"]}),new s.V({subType:"img2vid",engine:"haiper",schema:f,metadataDisplayProps:["duration","seed","resolution"]})]},40130:function(e,t,r){"use strict";r.d(t,{V:function(){return n}});class n{constructor(e){this.type="video",this.subType=e.subType,this.engine=e.engine,this.metadataDisplayProps=e.metadataDisplayProps,this.schema=e.schema,this.key="".concat(e.engine,"-").concat(e.subType)}}},827:function(e,t,r){"use strict";r.d(t,{yW:function(){return p},ke:function(){return l},ys:function(){return s},$r:function(){return c},XY:function(){return f}});var n=r(66781),i=r(1604);let o="txt2vid",a="img2vid";Object.values({Kling:"kling",Mochi:"mochi",Haiper:"haiper",Minimax:"minimax",Lightricks:"lightricks"});let s=i.ZP.string().max(1500,"Prompt cannot be longer than 1500 characters").default(""),l=i.ZP.string().max(1e3,"Prompt cannot be longer than 1000 characters").default(""),c=i.ZP.number().optional(),u=i.ZP.nativeEnum(n.UL).default("low").catch("low"),d=i.ZP.object({priority:u}),f=d.extend({type:i.ZP.literal(o).catch(o),prompt:s}),p=d.extend({type:i.ZP.literal(a).catch(a),sourceImage:i.ZP.string(),height:i.ZP.number().optional(),width:i.ZP.number().optional()})},73015:function(e,t,r){"use strict";r.d(t,{Dh:function(){return l},Rk:function(){return s},WD:function(){return f}});var n=r(66781),i=r(1604),o=r(40130),a=r(827);let s=["16:9","1:1","9:16"],l=["5","10"],c=i.ZP.object({engine:i.ZP.literal("kling"),workflow:i.ZP.string(),model:i.ZP.nativeEnum(n.V9).default(n.V9.V1_5).catch(n.V9.V1_5),enablePromptEnhancer:i.ZP.boolean().default(!0),mode:i.ZP.nativeEnum(n.Kn).catch(n.Kn.STANDARD),duration:i.ZP.enum(l).default("5").catch("5"),cfgScale:i.ZP.number().min(.1).max(1).default(.5).catch(.5),seed:a.$r}),u=a.XY.merge(c).extend({negativePrompt:a.ke,aspectRatio:i.ZP.enum(s).default("1:1").catch("1:1")}),d=a.yW.merge(c).extend({prompt:a.ys}),f=[new o.V({subType:"txt2vid",engine:"kling",schema:u,metadataDisplayProps:["cfgScale","mode","aspectRatio","duration","seed"]}),new o.V({subType:"img2vid",engine:"kling",schema:d,metadataDisplayProps:["cfgScale","mode","duration","seed"]})]},18552:function(e,t,r){"use strict";r.d(t,{Dn:function(){return s},P2:function(){return f},W2:function(){return l}});var n=r(1604),i=r(40130),o=r(827),a=r(25291);let s=["16:9","3:2","1:1","2:3"],l=[5,10],c=n.ZP.object({engine:n.ZP.literal("lightricks"),model:n.ZP.string().default("urn:air:ltxv:checkpoint:civitai:982559@1182093"),workflow:n.ZP.string(),negativePrompt:o.ke,duration:(0,a.XZ)(l).default(5).catch(5),cfgScale:n.ZP.number().min(3).max(3.5).default(3).catch(3),steps:n.ZP.number().min(20).max(30).default(25).catch(25),frameRate:n.ZP.number().optional(),seed:o.$r}),u=o.XY.merge(c).extend({aspectRatio:n.ZP.enum(s).default("3:2").catch("3:2")}),d=o.yW.merge(c).extend({prompt:o.ys}),f=[new i.V({subType:"txt2vid",engine:"lightricks",schema:u,metadataDisplayProps:["cfgScale","steps","aspectRatio","duration","seed"]}),new i.V({subType:"img2vid",engine:"lightricks",schema:d,metadataDisplayProps:["cfgScale","steps","duration","seed"]})]},32760:function(e,t,r){"use strict";r.d(t,{XY:function(){return f},a5:function(){return g},dC:function(){return u},lt:function(){return d},mg:function(){return p},pZ:function(){return s},v6:function(){return h},xH:function(){return m}});var n=r(35818),i=r(1604),o=r(54671),a=r(73679);let s=i.z.object({id:i.z.number()});i.z.object({ids:i.z.number().array()}),i.z.object({id:i.z.string()});let l=i.z.coerce.number().min(1).max(200).default(20),c=i.z.preprocess(a.D,i.z.number().min(0).default(1)),u=i.z.object({limit:l,page:c}),d=u.extend({query:i.z.string().optional()}),f=i.z.enum(["stats","published"]).default("published"),p=i.z.object({browsingLevel:i.z.number().min(0).default(o.ki)}),h=i.z.object({limit:l,cursor:i.z.number().optional()}),m=i.z.object({browsingLevel:i.z.number().optional(),excludedModelIds:i.z.array(i.z.number()).optional(),excludedUserIds:i.z.array(i.z.number()).optional(),excludedTagIds:i.z.array(i.z.number()).optional(),excludedImageIds:i.z.array(i.z.number()).optional()});i.z.object({entityType:i.z.string(),entityId:i.z.preprocess(e=>Array.isArray(e)?e:[e],i.z.array(i.z.number()))});let g=i.z.object({entityType:i.z.string(),entityId:i.z.number()});i.z.object({entityType:i.z.enum(["ModelVersion","Article","Post","Model","Collection","Bounty"]),entityId:i.z.number(),availability:i.z.nativeEnum(n.a8)})},62260:function(e,t,r){"use strict";r.d(t,{By:function(){return v},Dc:function(){return x}});var n=r(35818),i=r(27484),o=r.n(i),a=r(1604),s=r(38498),l=r(10292),c=r(7792),u=r(32957),d=r(32760),f=r(15782),p=r(77375),h=r(70178),m=r.n(h),g=r(36777);o().extend(m());let v=d.v6.merge(a.z.object({query:a.z.string().optional(),types:a.z.nativeEnum(n.YV).array().optional(),mode:a.z.nativeEnum(n.gO).optional(),status:a.z.nativeEnum(u.lQ).optional(),nsfw:a.z.boolean().optional(),period:a.z.nativeEnum(n.Tz).default(n.Tz.AllTime),sort:a.z.nativeEnum(u.Tp).default(u.Tp.Newest),engagement:a.z.enum(["tracking","supporter","favorite","awarded","active"]).optional(),userId:a.z.number().optional(),baseModels:a.z.enum(s._G.baseModels).array().optional(),limit:a.z.coerce.number().min(1).max(200).default(60),excludedUserIds:a.z.number().array().optional()})),y=a.z.object({baseModel:a.z.enum(s._G.baseModels),modelSize:a.z.enum(s._G.modelFileSizes),modelFormat:a.z.enum(s._G.modelFileFormats)}),b=a.z.object({name:a.z.string().trim().nonempty(),description:(0,c.T)().refine(e=>e&&e.length>0&&"

"!==e,"Cannot be empty"),unitAmount:a.z.number().min(s._G.bounties.minCreateAmount).max(s._G.bounties.maxCreateAmount),currency:a.z.nativeEnum(n.F),expiresAt:a.z.coerce.date().min(o().utc((0,g.xR)(new Date)).add(1,"day").toDate(),"Expiration date must come after the start date"),startsAt:a.z.coerce.date().min(o().utc((0,g.xR)(new Date)).toDate(),"Start date must be in the future"),mode:a.z.nativeEnum(n.gO),type:a.z.nativeEnum(n.YV),details:y.passthrough().partial().optional(),entryMode:a.z.nativeEnum(n.CP),minBenefactorUnitAmount:a.z.number().min(1),maxBenefactorUnitAmount:a.z.number().optional(),entryLimit:a.z.number().min(1).optional(),tags:a.z.array(p.VY).optional(),nsfw:a.z.boolean().optional(),poi:a.z.boolean().optional(),ownRights:a.z.boolean().optional(),files:a.z.array(f.Xf).optional(),images:a.z.array(l.el.extend({meta:l.Ii.omit({comfy:!0}).nullish()})).min(1,"At least one example image must be uploaded")});b.pick({name:!0,description:!0,tags:!0,files:!0,type:!0,details:!0,poi:!0,nsfw:!0,ownRights:!0,images:!0,entryLimit:!0}).extend({id:a.z.number(),startsAt:a.z.coerce.date(),expiresAt:a.z.coerce.date().min(o()().add(1,"day").startOf("day").toDate(),"Expiration date must be in the future"),lockedProperties:a.z.string().array().optional()});let x=b.extend({id:a.z.number().optional(),startsAt:a.z.string(),expiresAt:a.z.string(),lockedProperties:a.z.string().array().optional()});a.z.object({unitAmount:a.z.number().min(1),bountyId:a.z.number()}),d.v6.extend({id:a.z.number(),owned:a.z.boolean().optional()})},82459:function(e,t,r){"use strict";r.d(t,{Ll:function(){return i},S7:function(){return o}});var n=r(1604);let i="/api/auth/civ-token",o="/api/auth/impersonate";n.z.object({iv:n.z.string(),data:n.z.string(),signedAt:n.z.string()})},32508:function(e,t,r){"use strict";r.d(t,{NZ:function(){return v},QH:function(){return u},al:function(){return m},kr:function(){return d},us:function(){return g}});var n=r(1604),i=r(7792),o=r(10292),a=r(35818),s=r(32760),l=r(32957),c=r(38498);let u=n.z.object({id:n.z.number().optional(),name:n.z.string().trim().nonempty(),description:(0,i.T)().refine(e=>e&&e.length>0&&"

"!==e,"Cannot be empty"),unitAmount:n.z.number().refine(e=>0===e||e>=c._G.clubs.minMonthlyBuzz,"Minimum price is ".concat(c._G.clubs.minMonthlyBuzz," BUZZ")),currency:n.z.nativeEnum(a.F).default(a.F.BUZZ),coverImage:o.d6.nullish(),unlisted:n.z.boolean().default(!1),joinable:n.z.boolean().default(!0),clubId:n.z.number().optional(),memberLimit:n.z.number().max(c._G.clubs.tierMaxMemberLimit).nullish(),oneTimeFee:n.z.boolean().default(!1)}).refine(e=>!!e.clubId||!!e.id,{message:"When creating a new tier, clubId must be provided"}),d=n.z.object({id:n.z.number().optional(),name:n.z.string().trim().nonempty(),description:(0,i.T)().refine(e=>e&&e.length>0&&"

"!==e,"Cannot be empty"),nsfw:n.z.boolean().optional(),billing:n.z.boolean().optional(),unlisted:n.z.boolean().optional(),coverImage:o.d6.nullish(),headerImage:o.d6.nullish(),avatar:o.d6.nullish()});n.z.object({clubId:n.z.number().optional(),clubIds:n.z.array(n.z.number()).optional(),listedOnly:n.z.boolean().optional(),joinableOnly:n.z.boolean().optional(),tierId:n.z.number().optional()});let f=["ModelVersion","Article","Post"],p=[...f,"Model"],h=n.z.object({clubId:n.z.number(),clubTierIds:n.z.array(n.z.number()).optional()}),m=n.z.object({entityType:n.z.enum(f),entityId:n.z.number(),clubs:n.z.array(h)});n.z.object({entityType:n.z.enum(f),entityId:n.z.number(),clubId:n.z.number()}),s.v6.merge(n.z.object({clubId:n.z.number(),limit:n.z.coerce.number().min(1).max(200).default(60)}));let g=n.z.object({id:n.z.number().optional(),title:n.z.string().max(255).nullish(),description:n.z.string().nullish(),coverImage:o.d6.nullish(),membersOnly:n.z.boolean().default(!1),clubId:n.z.number(),entityId:n.z.number().nullish(),entityType:n.z.enum(p).nullish()}),v=s.v6.merge(n.z.object({nsfw:n.z.boolean().optional(),userId:n.z.number().optional(),engagement:n.z.enum(["engaged"]).optional(),sort:n.z.nativeEnum(l.xU).default(l.xU.Newest),limit:n.z.coerce.number().min(1).max(200).default(60),clubIds:n.z.array(n.z.number()).optional(),include:n.z.array(n.z.enum(["tiers"])).optional()}));s.dC.merge(n.z.object({clubId:n.z.number(),limit:n.z.coerce.number().min(1).max(200).default(60),clubTierId:n.z.number().optional()})),h.extend({entityType:n.z.enum(f),entityId:n.z.number()}),s.a5.extend({entityType:n.z.enum(f)}),s.a5.extend({entityType:n.z.enum(p)})},77178:function(e,t,r){"use strict";r.d(t,{Q0:function(){return p},kO:function(){return g},yn:function(){return v}});var n=r(1604),i=r(38498),o=r(32957),a=r(32760),s=r(10292),l=r(77375),c=r(35818),u=r(48600),d=r(25291);let f=n.z.object({type:n.z.nativeEnum(c.yl).optional(),articleId:n.z.number().optional(),postId:n.z.number().optional(),modelId:n.z.number().optional(),imageId:n.z.number().optional(),note:n.z.string().optional()});f.extend({collections:n.z.array(n.z.object({collectionId:n.z.number(),tagId:n.z.number().nullish(),userId:n.z.number().nullish(),read:n.z.nativeEnum(c.zq).optional()})),removeFromCollectionIds:n.z.coerce.number().array().optional()}).refine(e=>{let{articleId:t,imageId:r,postId:n,modelId:i}=e;return 1===[t,r,n,i].filter(u.$K).length},{message:"Only one item can be added at a time."}).refine(e=>{let{type:t,articleId:r,imageId:n,postId:i,modelId:o}=e;return!t||(t===c.yl.Article?void 0!==r:t===c.yl.Post?void 0!==i:t===c.yl.Model?void 0!==o:t===c.yl.Image&&void 0!==n)},{message:"Please pass a valid item type."});let p=n.z.object({collectionId:n.z.coerce.number(),imageIds:n.z.coerce.number().array().optional(),articleIds:n.z.coerce.number().array().optional(),postIds:n.z.coerce.number().array().optional(),modelIds:n.z.coerce.number().array().optional(),tagId:n.z.coerce.number().nullish()}).refine(e=>{let{articleIds:t,imageIds:r,postIds:n,modelIds:i}=e;return 1===[t,r,n,i].filter(u.$K).length},{message:"Only one item can be added at a time."}),h=n.z.object({contributingOnly:n.z.boolean().default(!0),permission:n.z.nativeEnum(c.Wx),permissions:n.z.array(n.z.nativeEnum(c.Wx)),type:n.z.nativeEnum(c.yl).optional()}).partial(),m=n.z.object({endsAt:n.z.coerce.date().nullish(),maxItemsPerUser:n.z.coerce.number().optional(),submissionStartDate:n.z.coerce.date().nullish(),submissionEndDate:n.z.coerce.date().nullish(),submissionsHiddenUntilEndDate:n.z.boolean().optional(),existingEntriesDisabled:n.z.coerce.boolean().optional(),votingPeriodStart:n.z.coerce.date().nullish(),uploadSettings:n.z.object({maxItems:n.z.number(),maxSize:n.z.number(),maxVideoDuration:n.z.number(),maxVideoDimensions:n.z.number()}).optional(),bannerPosition:n.z.string().optional(),judgesApplyBrowsingLevel:n.z.boolean().optional(),judgesCanScoreEntries:n.z.boolean().optional(),disableFollowOnSubmission:n.z.boolean().optional(),disableTagRequired:n.z.boolean().optional(),youtubeSupportEnabled:n.z.boolean().optional(),vimeoSupportEnabled:n.z.boolean().optional(),forcedBrowsingLevel:n.z.number().optional(),entriesRequireTitle:n.z.boolean().optional(),entriesRequireTools:n.z.boolean().optional(),termsOfServicesUrl:n.z.string().optional(),rulesUrl:n.z.string().optional(),hideAds:n.z.boolean().optional(),includeContestCallouts:n.z.boolean().optional(),inviteUrlEnabled:n.z.boolean().optional()}).refine(e=>{let{submissionStartDate:t,submissionEndDate:r}=e;return!t||!r||t{let{submissionStartDate:t,submissionEndDate:r}=e;return!!t&&!!r||!t&&!r},{message:"Either provide both submission values or none.",path:["submissionStartDate"]}),g=n.z.object({id:n.z.number().optional(),name:n.z.string().max(30).nonempty(),description:n.z.string().max(300).nullish(),image:s.el.nullish(),imageId:n.z.number().optional(),nsfw:n.z.boolean().optional(),read:n.z.nativeEnum(c.zq).optional(),write:n.z.nativeEnum(c.gY).optional(),type:n.z.nativeEnum(c.yl).default(c.yl.Model),mode:n.z.nativeEnum(c.KF).nullish(),metadata:m.optional(),tags:n.z.array(l.VY).nullish()}).merge(f);n.z.object({id:n.z.number(),imageId:n.z.number()}),f.extend({note:n.z.never().optional()}).merge(h).refine(e=>{let{articleId:t,imageId:r,postId:n,modelId:i}=e;return 1===[t,r,n,i].filter(u.$K).length},{message:"Please pass a single resource to match collections to."}),n.z.object({collectionId:n.z.number(),userId:n.z.number().optional()}),a.mg.extend({limit:n.z.number().min(0).max(100).optional(),page:n.z.number().optional(),cursor:n.z.number().optional(),collectionId:n.z.number(),statuses:n.z.array(n.z.nativeEnum(c.Xp)).optional(),forReview:n.z.boolean().optional(),reviewSort:n.z.nativeEnum(o.hq).optional(),collectionTagId:n.z.number().optional()}),n.z.object({collectionId:n.z.number(),collectionItemIds:n.z.array(n.z.number()),status:n.z.nativeEnum(c.Xp)});let v=n.z.object({collectionId:n.z.number(),images:n.z.array(s.el).min(1,"At least one image must be uploaded")});a.v6.extend({userId:n.z.number(),types:n.z.array(n.z.nativeEnum(c.yl)),privacy:n.z.array(n.z.nativeEnum(c.zq)),sort:n.z.nativeEnum(o.CI).default(i._G.collectionFilterDefaults.sort),ids:(0,d.Rs)({message:"ids should be a number array"}),modes:n.z.array(n.z.nativeEnum(c.KF))}).merge(a.xH).partial(),n.z.object({ids:n.z.array(n.z.number()).min(1)}),n.z.object({collectionId:n.z.coerce.number(),itemId:n.z.coerce.number()}),n.z.object({collectionItemId:n.z.coerce.number(),score:n.z.coerce.number().min(1).max(10)}),n.z.object({collectionItemId:n.z.number(),nsfwLevel:n.z.nativeEnum(o.Sh)}),n.z.object({collectionId:n.z.number(),authenticationCode:n.z.string()})},69519:function(e,t,r){"use strict";r.d(t,{cl:function(){return o}});var n=r(35818),i=r(1604);r(32760).dC.merge(i.z.object({limit:i.z.coerce.number().min(1).max(200).default(60),name:i.z.string().optional(),types:i.z.array(i.z.nativeEnum(n.c_)).optional()})),i.z.object({cosmeticId:i.z.number(),equippedToId:i.z.number(),claimKey:i.z.string().min(1),equippedToType:i.z.nativeEnum(n.iA)});let o=i.z.object({id:i.z.number(),claimKey:i.z.string()})},15782:function(e,t,r){"use strict";r.d(t,{Xf:function(){return i}});var n=r(1604);let i=n.z.object({id:n.z.number().optional(),name:n.z.string(),url:n.z.string().url().min(1,"You must select a file"),sizeKB:n.z.number(),metadata:n.z.object({}).passthrough().optional()});n.z.object({id:n.z.number().optional(),ids:n.z.array(n.z.number()).optional(),type:n.z.nativeEnum({Article:"Article",Bounty:"Bounty",BountyEntry:"BountyEntry"})})},10292:function(e,t,r){"use strict";r.d(t,{Ii:function(){return v},Il:function(){return g},d6:function(){return S},el:function(){return w},ys:function(){return y}});var n=r(27484),i=r.n(n),o=r(1604),a=r(58504),s=r(38498),l=r(32760),c=r(35818),u=r(92066),d=r(32957);let f=o.z.coerce.number().optional(),p=o.z.preprocess(e=>e||void 0,o.z.string().optional());o.z.enum(["Bounty","BountyEntry","User","Post","Article"]);let h=o.z.object({prompt:o.z.object({}).passthrough(),workflow:o.z.object({nodes:o.z.object({}).passthrough().array().optional()}).passthrough()}).partial(),m=o.z.object({source:o.z.object({name:o.z.string().optional(),homepage:o.z.string().url().optional()}).optional(),details:o.z.record(o.z.string(),o.z.union([o.z.string(),o.z.number(),o.z.boolean()])).optional(),createUrl:o.z.string().url().optional(),referenceUrl:o.z.string().url().optional()}),g=o.z.object({prompt:o.z.string().optional(),negativePrompt:o.z.string().optional(),cfgScale:o.z.coerce.number().optional(),steps:o.z.coerce.number().optional(),sampler:o.z.string().optional(),seed:o.z.coerce.number().optional(),clipSkip:o.z.coerce.number().optional()}),v=o.z.object({prompt:p,negativePrompt:p,cfgScale:f,steps:f,sampler:p,seed:f,hashes:o.z.record(o.z.string()).optional(),clipSkip:o.z.coerce.number().optional(),"Clip skip":o.z.coerce.number().optional(),comfy:o.z.union([o.z.string().optional(),h.optional()]).optional(),external:m.optional(),extra:o.z.object({remixOfId:o.z.number().optional()}).optional()}),y=v.partial().passthrough();v.extend({comfy:o.z.preprocess(e=>{if("string"!=typeof e)return e;try{let t=e.replace('"workflow": undefined','"workflow": {}');return t=t.replace("[NaN]","[]"),JSON.parse(t)}catch(e){return{}}},h.optional()),controlNets:o.z.string().array().optional(),software:o.z.coerce.string().optional(),civitaiResources:o.z.any().optional()}).passthrough();let b=o.z.object({age:o.z.number(),emotions:o.z.array(o.z.object({emotion:o.z.string(),score:o.z.number()})),gender:o.z.enum(["male","female","unknown"]),genderConfidence:o.z.number().optional().default(0),live:o.z.number(),real:o.z.number()});o.z.object({drawing:o.z.number(),hentai:o.z.number(),neutral:o.z.number(),porn:o.z.number(),sexy:o.z.number(),faces:o.z.array(b).optional()});let x=o.z.object({id:o.z.number().optional(),modelVersionId:o.z.number().optional(),name:o.z.string().optional(),detected:o.z.boolean().optional()}),w=o.z.object({id:o.z.number().optional(),name:o.z.string().nullish(),url:o.z.string().uuid("One of the files did not upload properly, please try again"),meta:o.z.preprocess(e=>"object"!=typeof e||e&&!Object.keys(e).length?null:e,y.nullish()),hash:o.z.string().nullish(),height:o.z.number().nullish(),width:o.z.number().nullish(),mimeType:o.z.string().optional(),sizeKB:o.z.number().optional(),postId:o.z.number().nullish(),modelVersionId:o.z.number().nullish(),type:o.z.nativeEnum(c.DD).default(c.DD.image),metadata:o.z.object({}).passthrough().optional(),externalDetailsUrl:o.z.string().url().optional(),toolIds:o.z.number().array().optional(),techniqueIds:o.z.number().array().optional(),index:o.z.number().optional()}),S=w.extend({meta:v.omit({comfy:!0}).nullish()});o.z.object({id:o.z.number(),name:o.z.string().optional(),url:o.z.string().url().or(o.z.string().uuid("One of the files did not upload properly, please try again").optional()).optional(),needsReview:o.z.string().nullish()}),o.z.object({ids:o.z.number().array(),needsReview:o.z.string().nullish(),reviewAction:o.z.enum(["delete","removeName","mistake"]).optional(),reviewType:o.z.enum(["minor","poi","reported","csam","blocked","tag","newUser","appeal"])}),o.z.object({modelVersionId:o.z.number()}),o.z.object({reviewId:o.z.number()}),o.z.object({id:o.z.number(),meta:o.z.preprocess(e=>"object"!=typeof e||e&&!Object.keys(e).length?null:e,y.nullish()),hideMeta:o.z.boolean().optional(),resources:o.z.array(x).optional()}),o.z.object({id:o.z.number(),url:o.z.string(),type:o.z.nativeEnum(c.DD).optional(),height:o.z.coerce.number().nullish(),width:o.z.coerce.number().nullish(),prompt:o.z.string().nullish()});let k=o.z.enum(["tags","count","cosmetics","report","meta","tagIds","profilePictures","metaSelect"]);l.mg.extend({baseModels:o.z.enum(s._G.baseModels).array().optional(),collectionId:o.z.number().optional(),collectionTagId:o.z.number().optional(),hideAutoResources:o.z.boolean().optional(),hideManualResources:o.z.boolean().optional(),followed:o.z.boolean().optional(),fromPlatform:o.z.coerce.boolean().optional(),hidden:o.z.boolean().optional(),limit:o.z.number().min(0).max(200).default(s._G.galleryFilterDefaults.limit),modelId:o.z.number().optional(),modelVersionId:o.z.number().optional(),notPublished:o.z.coerce.boolean().optional(),period:o.z.nativeEnum(c.Tz).default(s._G.galleryFilterDefaults.period),periodMode:l.XY,postId:o.z.number().optional(),prioritizedUserIds:o.z.array(o.z.number()).optional(),reactions:o.z.array(o.z.nativeEnum(c.BE)).optional(),scheduled:o.z.coerce.boolean().optional(),sort:o.z.nativeEnum(d.FA).default(s._G.galleryFilterDefaults.sort),tags:o.z.array(o.z.number()).optional(),techniques:o.z.number().array().optional(),tools:o.z.number().array().optional(),types:o.z.array(o.z.nativeEnum(c.DD)).optional(),useIndex:o.z.boolean().nullish(),userId:o.z.number().optional(),username:u.zc.usernameValidationSchema.optional(),withMeta:o.z.boolean().optional(),cursor:o.z.union([o.z.bigint(),o.z.number(),o.z.string(),o.z.date()]).transform(e=>"string"==typeof e&&i()(e,"YYYY-MM-DDTHH:mm:ss.SSS[Z]",!0).isValid()?new Date(e):e).optional(),excludedTagIds:o.z.array(o.z.number()).optional(),excludedUserIds:o.z.array(o.z.number()).optional(),generation:o.z.nativeEnum(c.uy).array().optional(),ids:o.z.array(o.z.number()).optional(),imageId:o.z.number().optional(),include:o.z.array(k).optional().default(["cosmetics"]),includeBaseModel:o.z.boolean().optional(),pending:o.z.boolean().optional(),postIds:o.z.number().array().optional(),reviewId:o.z.number().optional(),skip:o.z.number().optional(),withTags:o.z.boolean().optional(),remixOfId:o.z.number().optional(),remixesOnly:o.z.boolean().optional(),nonRemixesOnly:o.z.boolean().optional()}).transform(e=>(e.withTags&&(e.include||(e.include=[]),e.include.push("tags")),e.withMeta&&(e.include||(e.include=[]),e.include.push("meta")),e)),o.z.object({id:o.z.number(),withoutPost:o.z.boolean().optional()}),o.z.object({imageId:o.z.number(),resourceId:o.z.number()}),o.z.object({entities:o.z.array(o.z.object({entityType:o.z.union([o.z.nativeEnum(a.G),o.z.enum(["ModelVersion","Post"])]),entityId:o.z.number()}))}),o.z.object({limit:o.z.number().min(0).max(200).default(100),cursor:o.z.union([o.z.bigint(),o.z.number()]).optional(),needsReview:o.z.string().nullish(),tagReview:o.z.boolean().optional(),reportReview:o.z.boolean().optional(),tagIds:o.z.array(o.z.number()).optional()}),o.z.object({scans:o.z.record(o.z.string(),o.z.number()).default({}),retryCount:o.z.number().optional()}).passthrough(),o.z.object({id:o.z.number(),nsfwLevel:o.z.nativeEnum(d.Sh),status:o.z.nativeEnum(c.R8).optional()}),l.dC.extend({status:o.z.nativeEnum(c.R8).array().optional()}),o.z.object({limit:o.z.number(),cursor:o.z.string().optional()}),o.z.object({imageIds:o.z.array(o.z.number()).min(1)});let j=o.z.object({imageId:o.z.number(),toolId:o.z.number()});o.z.object({data:j.array()}),o.z.object({data:j.extend({notes:o.z.string().nullish()}).array()});let E=o.z.object({imageId:o.z.number(),techniqueId:o.z.number()});o.z.object({data:E.array()}),o.z.object({data:E.extend({notes:o.z.string().nullish()}).array()}),o.z.object({imageId:o.z.number(),frame:o.z.number().nullable(),customThumbnail:w.nullish(),postId:o.z.number().optional()}),o.z.object({id:o.z.number(),collectionId:o.z.number(),minor:o.z.boolean()})},91858:function(e,t,r){"use strict";r.d(t,{dg:function(){return p},iE:function(){return f}});var n=r(66781),i=r(1604),o=r(29020),a=r(38498),s=r(32760),l=r(35818);let c=i.z.object({version:i.z.literal(1).nullish(),start_time:i.z.string().nullish(),submittedAt:i.z.string().nullish(),end_time:i.z.string().nullish(),attempts:i.z.number().nullish(),jobId:i.z.string().nullish(),transactionId:i.z.string().nullish(),history:i.z.array(i.z.object({jobId:i.z.string().optional(),time:i.z.string(),status:i.z.nativeEnum(l.RE),message:i.z.string().nullish()})).nullish(),epochs:i.z.array(i.z.object({epoch_number:i.z.number(),model_url:i.z.string(),sample_images:i.z.array(i.z.object({image_url:i.z.string(),prompt:i.z.string()})).optional()})).nullish()}),u=i.z.object({version:i.z.literal(2),submittedAt:i.z.string(),startedAt:i.z.string().nullish(),completedAt:i.z.string().nullish(),workflowId:i.z.string(),transactionData:i.z.array(i.z.object({id:i.z.string().nullish(),amount:i.z.number(),accountType:i.z.nativeEnum(n.lG).nullish(),type:i.z.nativeEnum(n.iU)})),history:i.z.array(i.z.object({time:i.z.string(),status:i.z.nativeEnum(l.RE)})),epochs:i.z.array(i.z.object({epochNumber:i.z.number(),modelUrl:i.z.string(),modelSize:i.z.number(),sampleImages:i.z.array(i.z.string().url())})),sampleImagesPrompts:i.z.array(i.z.string()),jobId:i.z.string().optional()}),d=i.z.union([c,u]),f=i.z.object({format:i.z.enum(a._G.modelFileFormats).nullish(),size:i.z.enum(a._G.modelFileSizes).nullish(),fp:i.z.enum(a._G.modelFileFp).nullish(),labelType:i.z.enum(a._G.autoLabel.labelTypes).nullish(),ownRights:i.z.boolean().nullish(),shareDataset:i.z.boolean().nullish(),numImages:i.z.number().nullish(),numCaptions:i.z.number().nullish(),selectedEpochUrl:i.z.string().url().nullish(),trainingResults:d.nullish(),bountyId:i.z.number().nullish(),bountyEntryId:i.z.number().nullish()}),p=i.z.object({id:i.z.number().optional(),name:i.z.string(),url:i.z.string().url().min(1,"You must select a file"),sizeKB:i.z.number(),type:i.z.enum(a._G.modelFileTypes),format:i.z.enum(a._G.modelFileFormats).optional(),visibility:i.z.nativeEnum(l.pm).optional(),metadata:f.optional()}),h=i.z.object({name:i.z.string(),url:i.z.string().url().min(1,"You must select a file"),sizeKB:i.z.number(),type:i.z.enum(a._G.modelFileTypes),modelVersionId:i.z.number(),visibility:i.z.nativeEnum(l.pm).optional(),metadata:f.optional()}),m=i.z.object({id:i.z.number(),name:i.z.string().optional(),url:i.z.string().url().min(1,"You must select a file").optional(),sizeKB:i.z.number().optional(),type:i.z.enum(a._G.modelFileTypes).optional(),modelVersionId:i.z.number().optional(),visibility:i.z.nativeEnum(l.pm).optional(),metadata:f.optional()});i.z.union([h.extend({id:i.z.undefined()}),m]),s.v6.merge(o.L)},47838:function(e,t,r){"use strict";r.d(t,{A5:function(){return j},A6:function(){return C},CP:function(){return m},Gc:function(){return w},Mg:function(){return k},QL:function(){return N},X4:function(){return z},_V:function(){return g},iB:function(){return A},nx:function(){return y},oh:function(){return v},qS:function(){return S},t0:function(){return I},uf:function(){return T}});var n=r(57632),i=r(1604),o=r(12029),a=r(38498),s=r(32760),l=r(10292),c=r(91858),u=r(7792),d=r(35818),f=r(27943),p=r(27925);s.v6.extend({trainingStatus:i.z.nativeEnum(d.RE).optional()});let h=i.z.object({id:i.z.union([i.z.number(),i.z.string()]).optional(),name:i.z.string(),type:i.z.enum(["version","result","unknown"])});i.z.object({id:i.z.string().default((0,n.Z)()),type:i.z.enum(["sum","diff"]),modelA:h,modelB:h,modelC:h.optional(),multiplier:i.z.number()});let m=["sd_1_5","anime","semi","realistic"],g=["sdxl","pony","illustrious"],v=["sd3_medium","sd3_large"],y=["flux_dev"],b=i.z.string().refine(e=>/^civitai:\d+@\d+$/.test(null!=e?e:"")||(0,f.aj)(null!=e?e:"")),x=[...m,...g,...v,...y],w=["AdamW8Bit","Adafactor","Prodigy"],S=["lora"],k=["constant","cosine","cosine_with_restarts","linear"],j=["kohya","x-flux","rapid"],E=i.z.object({unetLR:i.z.number(),textEncoderLR:i.z.number(),optimizerType:i.z.enum(w),networkDim:i.z.number(),networkAlpha:i.z.number(),lrScheduler:i.z.enum(k),maxTrainEpochs:i.z.number(),numRepeats:i.z.number(),resolution:i.z.number(),loraType:i.z.enum(S),enableBucket:i.z.boolean(),keepTokens:i.z.number(),clipSkip:i.z.number().optional(),flipAugmentation:i.z.boolean().optional(),noiseOffset:i.z.number().optional(),lrSchedulerNumCycles:i.z.number(),trainBatchSize:i.z.number(),minSnrGamma:i.z.number(),optimizerArgs:i.z.string().optional(),shuffleCaption:i.z.boolean(),targetSteps:i.z.number(),engine:i.z.enum(j).optional().default("kohya")}),O=i.z.object({baseModel:i.z.union([i.z.enum(x),b]).optional(),baseModelType:i.z.enum(p.ok).optional(),type:i.z.enum(a._G.trainingModelTypes),params:E.optional(),samplePrompts:i.z.array(i.z.string()).optional(),staging:i.z.boolean().optional(),highPriority:i.z.boolean().optional()}),C=i.z.object({id:i.z.number().optional(),name:i.z.string().min(1,"Name cannot be empty."),baseModel:i.z.enum(a._G.baseModels),baseModelType:i.z.enum(a._G.baseModelTypes).nullish(),description:(0,u.T)({allowedTags:["div","strong","p","em","u","s","a","br","ul","ol","li","code","pre"],stripEmpty:!0}).nullish(),steps:i.z.number().min(0).nullish(),epochs:i.z.number().min(0).max(1e5).nullish(),images:i.z.array(l.el).min(1,"At least one example image must be uploaded").max(20,"You can only upload up to 20 images"),trainedWords:i.z.array(i.z.string()),trainingStatus:i.z.nativeEnum(d.RE).optional(),trainingDetails:O.optional(),files:i.z.array(c.dg)}),I=i.z.object({minStrength:i.z.number().nullish(),maxStrength:i.z.number().nullish(),strength:i.z.number().nullish()}),P=i.z.object({id:i.z.number().optional(),resourceId:i.z.number(),settings:I.optional()}),A=i.z.object({timeframe:i.z.number(),chargeForDownload:i.z.boolean().default(!1),downloadPrice:i.z.number().min(100).max(o.hw).optional(),chargeForGeneration:i.z.boolean().default(!1),generationPrice:i.z.number().min(50).optional(),generationTrialLimit:i.z.number().max(1e3).default(10),donationGoalEnabled:i.z.boolean().default(!1),donationGoal:i.z.number().min(o.Yz).max(o.hw).optional(),donationGoalId:i.z.number().optional(),originalPublishedAt:i.z.coerce.date().optional()}),T=A,z=i.z.object({modelId:i.z.number(),id:i.z.number().optional(),name:i.z.string().trim().min(1,"Name cannot be empty."),baseModel:i.z.enum(a._G.baseModels),baseModelType:i.z.enum(a._G.baseModelTypes).nullish(),description:(0,u.T)({allowedTags:["div","strong","p","em","u","s","a","br","ul","ol","li","code","pre"],stripEmpty:!0}).nullish(),steps:i.z.number().min(0).nullish(),epochs:i.z.number().min(0).max(1e5).nullish(),clipSkip:i.z.number().min(1).max(12).nullish(),vaeId:i.z.number().nullish(),trainedWords:i.z.array(i.z.string()).default([]),trainingStatus:i.z.nativeEnum(d.RE).nullish(),trainingDetails:O.nullish(),status:i.z.nativeEnum(d.GJ).optional(),requireAuth:i.z.boolean().optional(),monetization:i.z.object({id:i.z.number().nullish(),type:i.z.nativeEnum(d.uD).nullish(),unitAmount:i.z.number().nullish(),sponsorshipSettings:i.z.object({type:i.z.nativeEnum(d.JJ),unitAmount:i.z.number().min(0)}).nullish()}).nullish(),settings:I.nullish(),recommendedResources:i.z.array(P).optional(),templateId:i.z.number().optional(),bountyId:i.z.number().optional(),earlyAccessConfig:T.nullish(),earlyAccessGoalConfig:i.z.object({unitAmount:i.z.number()}).nullish(),uploadType:i.z.nativeEnum(d.Rr).optional(),usageControl:i.z.nativeEnum(d.j3).optional()});i.z.object({id:i.z.number(),withFiles:i.z.boolean().optional()});let N=i.z.object({id:i.z.number(),modelId:i.z.number().optional(),name:i.z.string().trim().min(1,"Name cannot be empty."),prompt:i.z.string().trim().min(1,"Prompt cannot be empty."),index:i.z.number().optional()});i.z.object({id:i.z.number(),modelId:i.z.number().optional(),name:i.z.string().trim().min(1,"Name cannot be empty.")}),i.z.object({id:i.z.number(),publishedAt:i.z.date().optional()}),i.z.object({type:i.z.nativeEnum(d.BY),query:i.z.string().optional(),baseModel:i.z.string().optional(),take:i.z.number().default(100)}),i.z.object({trainedWords:i.z.string().array().default([]),steps:i.z.number().optional(),epochs:i.z.number().optional(),baseModel:i.z.string(),clipSkip:i.z.number().optional(),vaeId:i.z.number().optional()}),i.z.object({}),i.z.object({}),i.z.object({}),i.z.object({timeframe:i.z.number().optional()}),i.z.object({timeframe:i.z.number().optional()}),i.z.object({modelVersionId:i.z.number(),type:i.z.enum(["download","generation"])})},32456:function(e,t,r){"use strict";r.d(t,{Fl:function(){return w},Wg:function(){return b}});var n=r(27484),i=r.n(n),o=r(10285),a=r.n(o),s=r(1604),l=r(38498),c=r(32957),u=r(76772),d=r(32760),f=r(47838),p=r(77375),h=r(7792),m=r(35818),g=r(27943),v=r(25291);i().extend(a());let y=s.z.object({allowNoCredit:s.z.boolean().optional(),allowCommercialUse:s.z.nativeEnum(m.fD).array().optional(),allowDerivatives:s.z.boolean().optional(),allowDifferentLicense:s.z.boolean().optional()});d.mg.merge(y).merge(d.xH).extend({limit:s.z.preprocess(e=>Number(e),s.z.number().min(0).max(100)).optional(),page:s.z.preprocess(e=>Number(e),s.z.number().min(1)).optional(),cursor:s.z.union([s.z.bigint(),s.z.number(),s.z.string(),s.z.date()]).transform(e=>"string"==typeof e&&i()(e,"YYYY-MM-DDTHH:mm:ss.SSS[Z]",!0).isValid()?new Date(e):e).optional(),query:s.z.string().optional(),tag:s.z.string().optional(),tagname:s.z.string().optional(),user:s.z.string().optional(),username:s.z.string().transform(e=>(0,g.Bm)(e)).optional(),types:s.z.union([s.z.nativeEnum(m.BY),s.z.nativeEnum(m.BY).array()]).optional().transform(e=>e?Array.isArray(e)?e:[e]:void 0).optional(),status:s.z.union([s.z.nativeEnum(m.GJ),s.z.nativeEnum(m.GJ).array()]).optional().transform(e=>e?Array.isArray(e)?e:[e]:void 0).optional(),checkpointType:s.z.nativeEnum(m.yz).optional(),baseModels:s.z.union([s.z.enum(l._G.baseModels),s.z.enum(l._G.baseModels).array()]).optional().transform(e=>{if(e)return Array.isArray(e)?e:[e]}),sort:s.z.nativeEnum(c.Qp).default(l._G.modelFilterDefaults.sort),period:s.z.nativeEnum(m.Tz).default(l._G.modelFilterDefaults.period),periodMode:d.XY,rating:s.z.preprocess(e=>Number(e),s.z.number()).transform(e=>Math.floor(e)).optional(),favorites:s.z.coerce.boolean().optional().default(!1),hidden:s.z.coerce.boolean().optional().default(!1),needsReview:s.z.coerce.boolean().optional(),earlyAccess:s.z.coerce.boolean().optional(),ids:(0,v.Rs)({message:"ids should be a number array"}).optional(),modelVersionIds:(0,v.Rs)({message:"modelVersionIds should be a number array"}).optional(),supportsGeneration:s.z.coerce.boolean().optional(),fromPlatform:s.z.coerce.boolean().optional(),followed:s.z.coerce.boolean().optional(),archived:s.z.coerce.boolean().optional(),collectionId:s.z.number().optional(),collectionItemStatus:s.z.array(s.z.nativeEnum(m.Xp)).optional(),fileFormats:s.z.enum(l._G.modelFileFormats).array().optional(),clubId:s.z.number().optional(),pending:s.z.boolean().optional(),collectionTagId:s.z.number().optional()}),y.extend({id:s.z.number().optional(),name:s.z.string().min(1,"Name cannot be empty."),description:(0,h.T)().nullish(),type:s.z.nativeEnum(m.BY),uploadType:s.z.nativeEnum(m.Rr),status:s.z.nativeEnum(m.GJ),checkpointType:s.z.nativeEnum(m.yz).nullish(),tagsOnModels:s.z.array(p.VY).nullish(),nsfw:s.z.boolean().optional(),poi:s.z.boolean().optional(),locked:s.z.boolean().optional(),modelVersions:s.z.array(f.A6).min(1,"At least one model version is required.")}),y.extend({modelId:s.z.number(),permissionDate:s.z.date().default(new Date)}),d.pZ.extend({permanently:s.z.boolean().optional()}),s.z.object({modelId:s.z.coerce.number(),modelVersionId:s.z.coerce.number().optional(),type:s.z.enum(l._G.modelFileTypes).optional(),format:s.z.enum(l._G.modelFileFormats).optional()});let b=s.z.object({users:s.z.number().array().optional(),tags:s.z.number().array().optional(),images:s.z.number().array().optional(),level:s.z.number().optional(),pinnedPosts:s.z.record(s.z.string(),s.z.number().array().max(l._G.modelGallery.maxPinnedPosts)).optional()}),x=s.z.object({hiddenUsers:s.z.object({id:s.z.number(),username:s.z.string().nullable()}).array(),hiddenTags:s.z.object({id:s.z.number(),name:s.z.string()}).array(),hiddenImages:s.z.number().array(),level:s.z.number().optional(),pinnedPosts:s.z.record(s.z.string(),s.z.number().array().max(l._G.modelGallery.maxPinnedPosts)).optional()}),w=y.extend({id:s.z.number().optional(),name:s.z.string().trim().min(1,"Name cannot be empty."),description:(0,h.T)().nullish(),type:s.z.nativeEnum(m.BY),uploadType:s.z.nativeEnum(m.Rr),status:s.z.nativeEnum(m.GJ),checkpointType:s.z.nativeEnum(m.yz).nullish(),tagsOnModels:s.z.array(p.VY).nullish(),poi:s.z.boolean().optional(),locked:s.z.boolean().optional(),templateId:s.z.number().optional(),bountyId:s.z.number().optional(),nsfw:s.z.boolean().optional(),lockedProperties:s.z.string().array().optional(),minor:s.z.boolean().default(!1).optional(),meta:s.z.object({showcaseCollectionId:s.z.number().nullish()}).passthrough().transform(e=>e).nullish()});s.z.object({id:s.z.number(),gallerySettings:x.nullable()}),s.z.object({id:s.z.number()}),s.z.object({id:s.z.number(),modelVersions:s.z.array(s.z.object({id:s.z.number(),name:s.z.string(),index:s.z.number().nullable()}))}),s.z.object({id:s.z.number(),versionIds:s.z.array(s.z.number()).optional(),publishedAt:s.z.date().optional()});let S=Object.keys(u.O);s.z.object({id:s.z.number(),reason:s.z.custom(e=>S.includes(e)).optional(),customMessage:s.z.string().optional()}),s.z.object({id:s.z.number(),locked:s.z.boolean()}),s.z.object({id:s.z.number(),mode:s.z.nativeEnum(m.Ce).nullable()}),s.z.object({id:s.z.number(),reason:s.z.string().optional()}),d.dC.extend({userId:s.z.number().optional()}),s.z.object({modelIds:s.z.array(s.z.number()),categoryId:s.z.number()}),s.z.object({query:s.z.string(),limit:s.z.number().default(5)}),d.mg.extend({fromId:s.z.number(),type:s.z.nativeEnum(m.Eg)}),s.z.object({fromId:s.z.number(),type:s.z.nativeEnum(m.Eg),associations:s.z.object({id:s.z.number().optional(),resourceId:s.z.number(),resourceType:s.z.enum(["model","article"])}).array()}),s.z.object({id:s.z.number(),excludeUnpublished:s.z.boolean().optional()}),s.z.object({type:s.z.nativeEnum(m.BY),checkpointType:s.z.nativeEnum(m.yz).optional()}),s.z.object({}),s.z.object({}),s.z.object({}),s.z.object({hashes:s.z.array(s.z.string())}),d.v6.extend({query:s.z.string().trim().optional(),userId:s.z.number()}),s.z.object({id:s.z.number(),versionId:s.z.number().nullish()}),s.z.object({id:s.z.number(),collectionId:s.z.number().nullable()}),s.z.object({id:s.z.coerce.number(),collectionName:s.z.string().optional()}),s.z.object({id:s.z.number(),name:s.z.string(),description:s.z.coerce.string(),poi:s.z.coerce.boolean(),nsfw:s.z.coerce.boolean(),minor:s.z.coerce.boolean()}),s.z.object({take:s.z.number().optional()})},9957:function(e,t,r){"use strict";r.d(t,{Bj:function(){return i},G6:function(){return f},Uo:function(){return j},XH:function(){return h},mC:function(){return p},mI:function(){return u},p6:function(){return S},v:function(){return d},yu:function(){return k}});var n,i,o=r(35818),a=r(1604),s=r(32760),l=r(38498);(n=i||(i={})).Model="model",n.Comment="comment",n.CommentV2="commentV2",n.Image="image",n.ResourceReview="resourceReview",n.Article="article",n.Post="post",n.User="reportedUser",n.Collection="collection",n.Bounty="bounty",n.BountyEntry="bountyEntry",n.Chat="chat";let c=a.z.object({comment:a.z.string().optional()}),u=c.extend({tags:a.z.string().array().optional()}),d=c.extend({name:a.z.string(),email:a.z.string().email(),phone:a.z.string().optional(),images:a.z.string().array(),establishInterest:a.z.boolean().optional()}),f=c.extend({violation:a.z.string()}),p=c.extend({email:a.z.string().email()}),h=c.extend({reason:a.z.string()}),m=a.z.object({type:a.z.nativeEnum(i),id:a.z.number(),details:c.default({})}),g=m.extend({reason:a.z.literal(o.wN.NSFW),details:u}),v=m.extend({reason:a.z.literal(o.wN.TOSViolation),details:f}),y=m.extend({reason:a.z.literal(o.wN.Ownership),details:d}),b=m.extend({reason:a.z.literal(o.wN.Claim),details:p}),x=m.extend({reason:a.z.literal(o.wN.AdminAttention),details:h}),w=m.extend({reason:a.z.literal(o.wN.CSAM)});a.z.discriminatedUnion("reason",[g,v,y,b,x,w]),a.z.object({id:a.z.number(),status:a.z.nativeEnum(o.R8)}),a.z.object({ids:a.z.number().array(),status:a.z.nativeEnum(o.R8)}),s.lt.extend({type:a.z.nativeEnum(i),filters:a.z.object({id:a.z.string(),value:a.z.unknown()}).array().optional(),sort:a.z.object({id:a.z.string(),desc:a.z.boolean()}).array().optional()}),a.z.object({type:a.z.nativeEnum(i),statuses:a.z.nativeEnum(o.R8).array()});let S={[o.R8.Unactioned]:"green",[o.R8.Actioned]:"red",[o.R8.Processing]:"orange",[o.R8.Pending]:"yellow"};a.z.object({id:a.z.number(),status:a.z.nativeEnum(o.R8),internalNotes:a.z.string().nullish()});let k=a.z.object({entityId:a.z.number(),entityType:a.z.nativeEnum(o.py),message:a.z.string().trim().min(1).max(l.TM)});a.z.object({userId:a.z.number().optional(),startDate:a.z.date().optional()}),a.z.object({entityId:a.z.number(),entityType:a.z.nativeEnum(o.py),userId:a.z.number()});let j=a.z.object({ids:a.z.number().array().min(1),entityType:a.z.nativeEnum(o.py),status:a.z.nativeEnum(o.F$),resolvedMessage:a.z.string().trim().max(l.TM).optional(),internalNotes:a.z.string().trim().optional()})},77375:function(e,t,r){"use strict";r.d(t,{VY:function(){return l}});var n=r(35818),i=r(1604),o=r(85208),a=r(32957),s=r(32760);i.z.object({name:i.z.string()});let l=i.z.object({id:i.z.number().optional(),name:i.z.string().trim().min(1,"Name cannot be empty.").toLowerCase(),isCategory:i.z.boolean().optional(),color:i.z.string().nullish()});s.lt.extend({withModels:i.z.preprocess(e=>"true"===e||!0===e,i.z.boolean().default(!1)).optional(),types:i.z.nativeEnum(n.Qy).array().optional(),entityType:i.z.nativeEnum(n.iB).array().optional(),modelId:i.z.number().optional(),excludedTagIds:i.z.number().array().optional(),unlisted:i.z.boolean().optional(),categories:i.z.boolean().optional(),sort:i.z.nativeEnum(a.t0).optional(),nsfwLevel:i.z.number().optional(),include:i.z.enum(["nsfwLevel","isCategory"]).array().optional(),moderation:i.z.boolean().optional()}),i.z.object({limit:i.z.number().optional(),entityType:i.z.nativeEnum(n.iB).array(),includeNsfw:i.z.boolean().optional(),excludedTagIds:i.z.number().array().optional(),unlisted:i.z.boolean().optional()}),i.z.object({type:o.R,id:i.z.number(),take:i.z.number().optional()}),i.z.object({type:o.R,ids:i.z.number().array(),nsfwLevel:i.z.number().optional()});let c=i.z.union([i.z.string().transform(e=>e.trim().toLowerCase()).array(),i.z.number().array()]);i.z.object({type:o.R,id:i.z.number(),tags:c,vote:i.z.number().min(-1,"Vote must be between -1 and 1").max(1,"Vote must be between -1 and 1")}),i.z.object({type:o.R,id:i.z.number(),tags:c}),i.z.object({tags:c,relationship:i.z.nativeEnum(n.N_).optional(),entityIds:i.z.number().array(),entityType:o.Ik}),i.z.object({tags:c}),i.z.object({entityIds:i.z.number().array(),entityType:o.Ik,disable:i.z.boolean()}),i.z.object({entityId:i.z.number(),entityType:i.z.enum(["model","image"])})},6915:function(e,t,r){"use strict";r.d(t,{k5:function(){return x},Hz:function(){return g},gV:function(){return w},bU:function(){return v},QA:function(){return y}});var n=r(1604),i=r(38498),o=r(32957),a=r(32760),s=r(35818);n.z.object({userIds:n.z.array(n.z.number())}),n.z.object({chatId:n.z.number(),userIds:n.z.array(n.z.number())}),n.z.object({chatMemberId:n.z.number(),isMuted:n.z.boolean().optional(),status:n.z.nativeEnum(s.sm).optional(),lastViewedMessageId:n.z.number().optional()}),n.z.object({chatId:n.z.number(),content:n.z.string().min(1).max(2e3),contentType:n.z.nativeEnum(s.Cb).optional().default("Markdown"),referenceMessageId:n.z.number().optional()}),n.z.object({messageId:n.z.number(),content:n.z.string().min(1)}),a.v6.merge(n.z.object({chatId:n.z.number(),direction:n.z.enum(["asc","desc"]).optional().default("desc"),limit:n.z.coerce.number().min(1).default(1e3)})),n.z.object({messageId:n.z.number()}),n.z.object({chatId:n.z.number(),userId:n.z.number(),isTyping:n.z.boolean()});let l=n.z.object({muteSounds:n.z.boolean().optional(),acknowledged:n.z.boolean().optional()});var c=r(32456),u=r(80050),d=r(54671),f=r(14619),p=r(92066),h=r(27943),m=r(25291);let g=n.z.enum(u.O);n.z.object({username:n.z.string(),id:(0,m.Cz)().optional()}).transform(e=>{let t=e.id?void 0:(0,h.Bm)(e.username);return(0,f.HO)({...e,username:t})});let v=p.zc.usernameValidationSchema.min(3,"Your username must be at least 3 characters long").max(25,"Your username must be at most 25 characters long").transform(e=>e.trim()),y=p.zc.usernameValidationSchema.transform(e=>e.trim());n.z.object({username:y.optional(),id:n.z.number().optional(),leaderboardId:n.z.string().optional()}),a.lt.extend({email:n.z.string(),ids:(0,m.Rs)(),include:(0,m.f7)(n.z.enum(["status","avatar"])).default([]),excludedUserIds:n.z.array(n.z.number()).optional(),contestBanned:n.z.boolean().optional()}).partial();let b=n.z.object({id:n.z.number().optional(),name:n.z.string().nullish(),url:n.z.string().url().or(n.z.string().uuid()),hash:n.z.string().nullish(),height:n.z.number().nullish(),width:n.z.number().nullish(),sizeKB:n.z.number().optional(),mimeType:n.z.string().optional(),metadata:n.z.object({}).passthrough().optional(),type:n.z.nativeEnum(s.DD).default(s.DD.image)}),x=n.z.array(n.z.string()).max(3);n.z.object({creatorCardStatsPreferences:x.optional()});let w=n.z.object({id:n.z.number(),username:v.optional(),email:n.z.string().email().optional(),image:n.z.string().nullish(),profilePicture:b.nullish(),badgeId:n.z.number().nullish(),nameplateId:n.z.number().nullish(),profileDecorationId:n.z.number().nullish(),profileBackgroundId:n.z.number().nullish(),autoplayGifs:n.z.boolean().optional(),filePreferences:n.z.object({format:n.z.enum(i._G.modelFileFormats).optional(),size:n.z.enum(i._G.modelFileSizes).optional(),fp:n.z.enum(i._G.modelFileFp).optional(),imageFormat:n.z.enum(i._G.imageFormats).optional()}).optional(),leaderboardShowcase:n.z.string().nullish(),userReferralCode:n.z.string().optional(),source:n.z.string().optional(),landingPage:n.z.string().optional()});n.z.object({showNsfw:n.z.boolean().optional(),blurNsfw:n.z.boolean().optional(),browsingLevel:n.z.number().min(0).max(d.ki).optional()}),n.z.object({modelId:n.z.number(),modelVersionId:n.z.number().optional(),setTo:n.z.boolean()}),n.z.object({modelId:n.z.number(),type:n.z.nativeEnum(s.f_).optional()}),n.z.object({targetUserId:n.z.number(),username:y.nullable().optional()}),n.z.object({type:n.z.nativeEnum(s.IH)}),n.z.object({tagId:n.z.number()}),n.z.object({tagIds:n.z.array(n.z.number())}),n.z.object({username:y}),n.z.object({id:n.z.number(),username:y.optional(),removeModels:n.z.boolean().optional()}),n.z.object({equipped:n.z.boolean().optional()}),n.z.object({type:n.z.nativeEnum(s.rm)}).extend({articleId:n.z.number()}),n.z.object({type:n.z.nativeEnum(s.BC)}).extend({bountyId:n.z.number()});let S=n.z.enum(["Regex","External"]);n.z.object({prompt:n.z.string().optional(),negativePrompt:n.z.string().optional(),source:S.optional()}),n.z.object({userReferralCode:n.z.string().min(3)}),n.z.object({newsletterDialogLastSeenAt:n.z.coerce.date().nullish(),features:n.z.record(n.z.boolean()).optional(),newsletterSubscriber:n.z.boolean().optional(),dismissedAlerts:n.z.array(n.z.string()).optional(),chat:l.optional(),airEmail:n.z.string().email().optional(),creatorsProgramCodeOfConductAccepted:n.z.boolean().optional(),cosmeticStoreLastViewed:n.z.coerce.date().nullish(),allowAds:n.z.boolean().optional(),disableHidden:n.z.boolean().optional(),hideDownloadsSince:n.z.number().optional(),gallerySettings:c.Wg.omit({pinnedPosts:!0,images:!0}).partial().optional()});let[k,...j]=u.am;n.z.object({feature:n.z.enum([k,...j]),value:n.z.boolean().optional()}),n.z.object({creatorsProgramCodeOfConductAccepted:n.z.boolean().optional(),cosmeticStoreLastViewed:n.z.date().optional(),allowAds:n.z.boolean().optional()}),n.z.object({alertId:n.z.string()}),n.z.discriminatedUnion("step",[n.z.object({step:n.z.literal(o.Af.TOS)}),n.z.object({step:n.z.literal(o.Af.Profile),username:v,email:n.z.string()}),n.z.object({step:n.z.literal(o.Af.BrowsingLevels)}),n.z.object({step:n.z.literal(o.Af.Buzz),userReferralCode:n.z.string().optional(),source:n.z.string().optional(),recaptchaToken:n.z.string()})]),n.z.object({id:n.z.number(),setTo:n.z.boolean()});let E=n.z.object({total:n.z.number(),models:n.z.number().optional(),articles:n.z.number().optional(),images:n.z.number().optional(),users:n.z.number().optional(),reportsActioned:n.z.number().optional(),reportsAgainst:n.z.number().optional()});n.z.object({firstImage:n.z.date().optional(),scores:E.optional(),banDetails:n.z.object({reasonCode:n.z.nativeEnum(o.dL).optional(),detailsInternal:n.z.string().optional(),detailsExternal:n.z.string().optional()}).optional(),contestBanDetails:n.z.object({bannedAt:n.z.date().optional(),detailsInternal:n.z.string().optional()}).optional()}),n.z.object({fingerprint:n.z.string()}),n.z.object({showNsfw:n.z.boolean().optional(),blurNsfw:n.z.boolean().optional(),browsingLevel:n.z.number().optional(),disableHidden:n.z.boolean().optional(),allowAds:n.z.boolean().optional(),autoplayGifs:n.z.boolean().optional()}),n.z.object({id:n.z.number(),reasonCode:n.z.nativeEnum(o.dL).optional(),detailsInternal:n.z.string().optional(),detailsExternal:n.z.string().optional(),type:n.z.enum(["universal","contest"]).default("universal").optional()})},7792:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(1604),i=r(28270);let o=e=>n.z.preprocess((t,r)=>{if(!t)return"";let o=String(t);try{return(0,i.Z6)(o,e)}catch(e){r.addIssue({code:n.z.ZodIssueCode.custom,message:e.message})}},n.z.string())},80050:function(e,t,r){"use strict";r.d(t,{am:function(){return m},BZ:function(){return v},Wu:function(){return c},t7:function(){return y},O:function(){return d}});var n=r(87099),i=(0,r(61061).Z)(function(e,t,r){return t=t.toLowerCase(),e+(r?(0,n.Z)(t):t)}),o=r(524),a=r(8346),s=r(27943),l=r(83454);let c={green:o.O.NEXT_PUBLIC_SERVER_DOMAIN_GREEN,blue:o.O.NEXT_PUBLIC_SERVER_DOMAIN_BLUE,red:o.O.NEXT_PUBLIC_SERVER_DOMAIN_RED},u=Object.keys(c),d=["free","founder","bronze","silver","gold"],f=["public","user","mod","member","granted",...d],p=["dev",...u,...f],h=function(e){let t={},r=function(){let e={};for(let[r,n]of Object.entries(l.env)){var t;if(!r.startsWith("NEXT_PUBLIC_FEATURE_FLAG_"))continue;let o=i(r.replace("NEXT_PUBLIC_FEATURE_FLAG_","")),a=[];for(let e of null!==(t=null==n?void 0:n.split(","))&&void 0!==t?t:[])p.includes(e)&&a.push(e);e[o]=a}return e}();for(let[n,i]of Object.entries(e)){Array.isArray(i)?t[n]={availability:i,toggleable:!1,displayName:(0,s.Gf)(n)}:t[n]=i;let e=r[n];e&&(t[n].availability=e)}return t}({earlyAccessModel:["public"],apiKeys:["public"],ambientCard:["public"],gallery:["public"],posts:["mod","member"],articles:["blue","red","public"],articleCreate:["public"],adminTags:["mod","granted"],civitaiLink:["mod","member"],stripe:["mod"],imageTraining:["user"],imageTrainingResults:["user"],sdxlGeneration:["public"],questions:["dev","mod"],imageGeneration:["public"],largerGenerationImages:{toggleable:!0,default:!1,displayName:"Larger Images in Generator",description:"Images displayed in the generator will be larger on small screens",availability:["public"]},enhancedSearch:["public"],alternateHome:["public"],collections:["public"],air:{toggleable:!0,default:!0,displayName:"AI Resource Identifier",description:"Show the Civitai AIR on resources for easy use within the Civitai Services API or Civitai Comfy Nodes.",availability:["user"]},profileCollections:["public"],imageSearch:["public"],buzz:["public"],recommenders:a.r8?["granted","dev","mod"]:["dev","mod"],assistant:{toggleable:!0,default:!0,displayName:"CivBot Assistant",description:"A helpful chat assistant that can answer questions about Stable Diffusion, Civitai, and more! We're still training it, so please report any issues you find!",availability:["user"]},bounties:["public"],newsroom:["public"],safety:["public"],csamReports:["granted"],appealReports:["granted"],reviewTrainingData:["granted"],clubs:["mod"],createClubs:["mod","granted"],moderateTags:["granted"],chat:{toggleable:!0,default:!0,displayName:"Chats",description:"Send and receive DMs from users across the site.",availability:["user"]},creatorsProgram:["mod","granted"],buzzWithdrawalTransfer:["granted"],vault:["user"],draftMode:["public"],membershipsV2:["public"],cosmeticShop:["public"],impersonation:["granted"],donationGoals:["public"],creatorComp:["public"],experimentalGen:["mod"],imageIndex:["public"],imageIndexFeed:["public"],isGreen:["public","green"],isBlue:["public","blue"],isRed:["public","red"],canViewNsfw:["public","blue","red"],canBuyBuzz:["public","green"],customPaymentProvider:["public"],adsEnabled:["public","blue"],paddleAdjustments:["granted"],announcements:["granted"],blocklists:["granted"],toolSearch:["public"],generationOnlyModels:["mod","granted","gold"]}),m=Object.keys(h),g=(e,t)=>{var r;let{user:n,req:i,host:o=null==i?void 0:i.headers.host}=t,{availability:s}=h[e],l=s.includes("dev")?a.r8:s.length>0,d=!0,p=s.filter(e=>u.includes(e));if(p.length&&o){if(!(d=Object.entries(c).filter(e=>{let[t,r]=e;return r&&p.includes(t)}).some(e=>{let[t,r]=e;return!!("blue"===t&&["stage.civitai.com","dev.civitai.com"].includes(o))||o===r})))return!1}else d=!0;let m=!!s.includes("granted")&&!!(null==n?void 0:null===(r=n.permissions)||void 0===r?void 0:r.includes(e)),g=s.filter(e=>f.includes(e)),v=0===g.length||g.includes("public");return!v&&0!==g.length&&n&&(g.includes("user")?v=!0:g.includes("mod")&&n.isModerator?v=!0:n.tier&&"free"!=n.tier&&(g.includes("member")?v=!0:g.includes(n.tier)&&(v=!0))),l&&d&&(m||v)},v=e=>Object.keys(h).reduce((t,r)=>(t[r]=g(r,e),t),{}),y=Object.entries(h).filter(e=>{let[,t]=e;return t.toggleable}).map(e=>{var t;let[r,n]=e;return{key:r,displayName:n.displayName,description:n.description,default:null===(t=n.default)||void 0===t||t}})},54671:function(e,t,r){"use strict";r.d(t,{A_:function(){return b},H_:function(){return y},JE:function(){return S},MI:function(){return k},My:function(){return h},NK:function(){return l},PP:function(){return d},Ql:function(){return s},Us:function(){return c},V:function(){return g},YL:function(){return p},_7:function(){return x},cR:function(){return j},eq:function(){return w},gY:function(){return m},ki:function(){return v},vU:function(){return u}});var n,i,o=r(32957),a=r(7379);function s(e){return a.v.instanceToArray(e)}function l(e){return a.v.arrayToInstance(e)}let c=[o.Sh.PG,o.Sh.PG13,o.Sh.R,o.Sh.X,o.Sh.XXX],u={0:"?",[o.Sh.PG]:"PG",[o.Sh.PG13]:"PG-13",[o.Sh.R]:"R",[o.Sh.X]:"X",[o.Sh.XXX]:"XXX",[o.Sh.Blocked]:"Blocked"},d={[o.Sh.PG]:"Safe for work. No naughty stuff",[o.Sh.PG13]:"Revealing clothing, violence, or light gore",[o.Sh.R]:"Adult themes and situations, partial nudity, graphic violence, or death",[o.Sh.X]:"Graphic nudity, adult objects, or settings",[o.Sh.XXX]:"Overtly sexual or disturbing graphic content"},f=[o.Sh.PG],p=l(f),h=l([o.Sh.PG,o.Sh.PG13]);function m(e){var t;return null!==(t=u[e])&&void 0!==t?t:"?"}let g=l([o.Sh.R,o.Sh.X,o.Sh.XXX,o.Sh.Blocked]),v=l([...c]);function y(e){return s(e).every(e=>f.includes(e))}function b(e){return 0!==e&&!a.v.intersects(e,g)}function x(e){return a.v.hasFlag(e,p)}function w(e){return a.v.intersects(e,h)}(n=i||(i={})).None="None",n.Soft="Soft",n.Mature="Mature",n.X="X",n.Blocked="Blocked",o.Sh.PG,l([o.Sh.PG,o.Sh.PG13]),l([o.Sh.PG,o.Sh.PG13,o.Sh.R]),l([o.Sh.PG,o.Sh.PG13,o.Sh.R,o.Sh.X,o.Sh.XXX]),o.Sh.Blocked,o.Sh.PG,o.Sh.PG13,o.Sh.R,o.Sh.X,o.Sh.XXX,o.Sh.Blocked;let S={0:{dark:{color:"gray",shade:5},light:{color:"gray",shade:3}},[o.Sh.PG]:{dark:{color:"gray",shade:5},light:{color:"gray",shade:3}},[o.Sh.PG13]:{dark:{color:"yellow",shade:5},light:{color:"yellow",shade:3}},[o.Sh.R]:{dark:{color:"red",shade:9},light:{color:"red",shade:6}},[o.Sh.X]:{dark:{color:"red",shade:9},light:{color:"red",shade:6}},[o.Sh.XXX]:{dark:{color:"red",shade:9},light:{color:"red",shade:6}},[o.Sh.Blocked]:{dark:{color:"red",shade:9},light:{color:"red",shade:6}}},k=[{title:"Hide anime",relatedTags:[{id:4,name:"anime"},{id:413,name:"manga"}]},{title:"Hide furry",relatedTags:[{id:5139,name:"anthro"},{id:5140,name:"furry"}]},{title:"Hide gore",relatedTags:[{id:1282,name:"gore"},{id:789,name:"body horror"}]},{title:"Hide political",relatedTags:[{id:2470,name:"political"}]}],j={showNsfw:!1,blurNsfw:!0,browsingLevel:p}},65057:function(e,t,r){"use strict";r.d(t,{cE:function(){return w},MR:function(){return H},Jg:function(){return U},Bu:function(){return $},P:function(){return L},Eo:function(){return F},LX:function(){return W},M2:function(){return Z},Qt:function(){return k},jr:function(){return A},Y:function(){return D},k_:function(){return O},Jx:function(){return B},RA:function(){return I},_l:function(){return q},zS:function(){return P},O5:function(){return C},Cg:function(){return S},R8:function(){return z},Wr:function(){return G},Lg:function(){return R},Fr:function(){return j},Uw:function(){return _},bv:function(){return T},qJ:function(){return E}});var n=r(38498),i=r(47540),o=r(73015),a=r(18552),s=r(66781),l=r(1604),c=r(40130),u=r(827);let d=l.ZP.object({engine:l.ZP.literal("minimax"),workflow:l.ZP.string(),model:l.ZP.nativeEnum(s.Mf).default(s.Mf.HAILOU).catch(s.Mf.HAILOU)}),f=u.XY.merge(d),p=u.yW.merge(d).extend({prompt:u.ys}),h=new c.V({subType:"txt2vid",engine:"minimax",schema:f,metadataDisplayProps:[]}),m=new c.V({subType:"img2vid",engine:"minimax",schema:p,metadataDisplayProps:[]}),g=u.XY.extend({engine:l.ZP.literal("mochi"),workflow:l.ZP.string(),seed:u.$r,enablePromptEnhancer:l.ZP.boolean().default(!0)}),v=new c.V({subType:"txt2vid",engine:"mochi",schema:g,metadataDisplayProps:[]}),y=[...o.WD,h,m,...i.DJ,v,...a.P2];var b=r(35818),x=r(88182);let w={GENERATION:"gen",IMAGE:"img",VIDEO:"vid",FAVORITE:"favorite",FOLDER:"folder",FEEDBACK:{LIKED:"feedback:liked",DISLIKED:"feedback:disliked"}};function S(e){let{width:t,height:r}=e,n=Math.min((t<8192?t:8192)/t,(r<8192?r:8192)/r);return{width:64*Math.ceil(t*n/64),height:64*Math.ceil(r*n/64)}}let k={unassigned:"yellow",preparing:"yellow",scheduled:"yellow",processing:"yellow",succeeded:"green",failed:"red",expired:"gray",canceled:"gray"},j=["unassigned","preparing","scheduled"];[...Object.values({civit_nsfw:{id:106916,triggerWord:"civit_nsfw",triggerType:"negative"},safe_neg:{id:250712,triggerWord:"safe_neg",triggerType:"negative"},safe_pos:{id:250708,triggerWord:"safe_pos",triggerType:"positive"}}),{id:391999,baseModelSetType:"SDXL",sanitize:()=>({steps:8,cfgScale:1,sampler:"Euler"})},{id:424706,baseModelSetType:"SD1",sanitize:()=>({steps:6,cfgScale:1,sampler:"LCM"})}].map(e=>e.id);let E={prompt:"",negativePrompt:void 0,seed:void 0,nsfw:!1,cfgScale:n.A_.defaultValues.cfgScale,remixSimilarity:1};function O(e,t){var r,i;return(null!=t||(t="SD1"),e&&null!==(i=null===(r=Object.entries(n.Uw).find(t=>{let[r,n]=t;return r===e||n.baseModels.includes(e)}))||void 0===r?void 0:r[0])&&void 0!==i)?i:t}function C(e){let t=O(e);return"SDXL"===t||"Pony"===t||"SDXLDistilled"===t||"Illustrious"===t}function I(e){return"Flux1"===O(e)}function P(e){let t=O(e);return"SD3"===t||"SD3_5M"===t}function A(e){let t=e.find(e=>"Checkpoint"===e.modelType);if(t)return O(t.baseModel);if(e.some(e=>"Pony"===O(e.baseModel)))return"Pony";if(e.some(e=>"SDXL"===O(e.baseModel)))return"SDXL";if(e.some(e=>"Flux1"===O(e.baseModel)))return"Flux1";if(e.some(e=>"Illustrious"===O(e.baseModel)))return"Illustrious";if(e.some(e=>"SD3"===O(e.baseModel)))return"SD3";if(e.some(e=>"SD3_5M"===O(e.baseModel)))return"SD3_5M";else return"SD1"}function T(e,t){for(let t of(e.sampler&&(e.sampler=n.A_.samplers.includes(e.sampler)?e.sampler:n.A_.defaultValues.sampler),Object.keys(n.A_.maxValues))){var r;e[t]&&(e[t]=Math.min(null!==(r=e[t])&&void 0!==r?r:0,n.A_.maxValues[t]))}return!e.aspectRatio&&e.width&&e.height&&(e.aspectRatio=N(e.width,e.height,e.baseModel),e.fluxUltraAspectRatio=function(e,t){let r=W.map(e=>e.width/e.height),n=(0,x.FX)(r,e/t),i=r.indexOf(n);return"".concat(null!=i?i:V)}(e.width,e.height)),C(e.baseModel)&&(e.clipSkip=2),t&&(e.steps&&(e.steps=Math.min(e.steps,t.steps)),e.quantity&&(e.quantity=Math.min(e.quantity,t.quantity))),e}function z(e,t){var r;let i="string"==typeof e?Number(e):e;return null!==(r=(0,n.g7)(t).aspectRatios[i])&&void 0!==r?r:n.Yp.SD1.aspectRatios[0]}let N=(e,t,r)=>{e=null!=e?e:"SDXL"===r?1024:512,t=null!=t?t:"SDXL"===r?1024:512;let i=(0,n.g7)(r).aspectRatios.map(e=>e.width/e.height);if(!i.length)return"0";let o=(0,x.FX)(i,e/t),a=i.indexOf(o);return"".concat(null!=a?a:0)};function R(e){var t,r,n,i,o,a,s,l,c,u;return{draft:null!==(a=null==e?void 0:null===(t=e.features)||void 0===t?void 0:t.includes("draft"))&&void 0!==a&&a,denoise:null!==(s=null==e?void 0:null===(r=e.features)||void 0===r?void 0:r.includes("denoise"))&&void 0!==s&&s,upscaleWidth:null!==(l=null==e?void 0:null===(n=e.features)||void 0===n?void 0:n.includes("upscale"))&&void 0!==l&&l,upscaleHeight:null!==(c=null==e?void 0:null===(i=e.features)||void 0===i?void 0:i.includes("upscale"))&&void 0!==c&&c,image:null!==(u=null==e?void 0:null===(o=e.features)||void 0===o?void 0:o.includes("image"))&&void 0!==u&&u}}function _(e,t){let r=R(t);for(let t in r)r[t]||delete e[t]}let M={SD1:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.SD1.baseModels]},{type:b.BY.TextualInversion,baseModels:[...n.Uw.SD1.baseModels]},{type:b.BY.LORA,baseModels:[...n.Uw.SD1.baseModels]},{type:b.BY.DoRA,baseModels:[...n.Uw.SD1.baseModels]},{type:b.BY.LoCon,baseModels:[...n.Uw.SD1.baseModels]},{type:b.BY.VAE,baseModels:[...n.Uw.SD1.baseModels]}],SDXL:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.SDXL.baseModels]},{type:b.BY.TextualInversion,baseModels:[...n.Uw.SDXL.baseModels,"SD 1.5"]},{type:b.BY.LORA,baseModels:[...n.Uw.SDXL.baseModels]},{type:b.BY.DoRA,baseModels:[...n.Uw.SDXL.baseModels]},{type:b.BY.LoCon,baseModels:[...n.Uw.SDXL.baseModels]},{type:b.BY.VAE,baseModels:[...n.Uw.SDXL.baseModels]}],Pony:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.Pony.baseModels]},{type:b.BY.TextualInversion,baseModels:[...n.Uw.Pony.baseModels,"SDXL 0.9","SDXL 1.0","SDXL 1.0 LCM","SD 1.5"]},{type:b.BY.LORA,baseModels:[...n.Uw.Pony.baseModels]},{type:b.BY.DoRA,baseModels:[...n.Uw.Pony.baseModels]},{type:b.BY.LoCon,baseModels:[...n.Uw.Pony.baseModels]},{type:b.BY.VAE,baseModels:[...n.Uw.SDXL.baseModels]}],Illustrious:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.Illustrious.baseModels]},{type:b.BY.TextualInversion,baseModels:[...n.Uw.Illustrious.baseModels,"SDXL 0.9","SDXL 1.0","SDXL 1.0 LCM","SD 1.5"]},{type:b.BY.LORA,baseModels:[...n.Uw.Illustrious.baseModels]},{type:b.BY.DoRA,baseModels:[...n.Uw.Illustrious.baseModels]},{type:b.BY.LoCon,baseModels:[...n.Uw.Illustrious.baseModels]},{type:b.BY.VAE,baseModels:[...n.Uw.SDXL.baseModels]}],Flux1:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.Flux1.baseModels]},{type:b.BY.LORA,baseModels:[...n.Uw.Flux1.baseModels]}],SD3:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.SD3.baseModels]},{type:b.BY.LORA,baseModels:[...n.Uw.SD3.baseModels]}],SD3_5M:[{type:b.BY.Checkpoint,baseModels:[...n.Uw.SD3_5M.baseModels]},{type:b.BY.LORA,baseModels:[...n.Uw.SD3_5M.baseModels]}]};function D(e){if(e in M)return M[e]}let L="urn:air:flux1:checkpoint:civitai:618692@691639",F="urn:air:flux1:checkpoint:civitai:618692@1088507",U=[{label:"Draft",value:"urn:air:flux1:checkpoint:civitai:618692@699279"},{label:"Standard",value:L},{label:"Pro",value:"urn:air:flux1:checkpoint:civitai:618692@699332"},{label:"Pro 1.1",value:"urn:air:flux1:checkpoint:civitai:618692@922358"},{label:"Ultra",value:F}];function B(e){let{modelType:t,baseModel:r,defaultType:n="SD1"}=e;return r?Object.entries(M).filter(e=>{var n,i;let[o,a]=e;return o===r||(null!==(i=null===(n=a.find(e=>e.type===t))||void 0===n?void 0:n.baseModels)&&void 0!==i?i:[]).includes(r)}).map(e=>{let[t]=e;return t}):[n]}let H={minimax:{label:"Hailuo by MiniMax",description:"",whatIf:[]},kling:{label:"Kling",description:"",whatIf:["mode","duration"]},lightricks:{label:"Lightricks",description:"",whatIf:["duration","cfgScale","steps"]},haiper:{label:"Haiper",description:"Generate hyper-realistic and stunning videos with Haiper's next-gen 2.0 model!",whatIf:["duration"]},mochi:{label:"Mochi",description:"Mochi 1 preview, by creators [https://www.genmo.ai](https://www.genmo.ai) is an open state-of-the-art video generation model with high-fidelity motion and strong prompt adherence in preliminary evaluation"}},Z=y,W=[{label:"Landscape - 21:9",width:3136,height:1344},{label:"Landscape - 16:9",width:2752,height:1536},{label:"Landscape - 4:3",width:2368,height:1792},{label:"Square - 1:1",width:2048,height:2048},{label:"Portrait - 3:4",width:1792,height:2368},{label:"Portrait - 9:16",width:1536,height:2752},{label:"Portrait - 9:21",width:1344,height:3136}],V=n.A_.defaultValues.fluxUltraAspectRatio,$=618692;function q(e){let{modelId:t,fluxMode:r}=e;return t===$&&r===F}function G(e){var t;return null!==(t=W[e])&&void 0!==t?t:W[V]}},7379:function(e,t,r){"use strict";r.d(t,{v:function(){return n},j:function(){return s}});class n{static hasFlag(e,t){return(e|t)===e}static intersection(e,t){return e&t}static intersects(e,t){return(e&t)!=0}static addFlag(e,t){return e|t}static removeFlag(e,t){return e&~t}static maxValue(e){return Math.max(...this.instanceToArray(e))}static toggleFlag(e,t){return this.hasFlag(e,t)?this.removeFlag(e,t):this.addFlag(e,t)}static enumToBitArray(e){return Object.keys(e).map(Number).filter(Boolean)}static instanceToArray(e){return this.possibleValues.filter(t=>this.hasFlag(e,t))}static arrayToInstance(e){return e.reduce((e,t)=>e+(this.possibleValues.includes(t)?t:0),0)}static diff(e,t){return t&~e}}n.possibleValues=[...Array(32)].map((e,t)=>Math.pow(2,t));var i=r(1604),o=r(25291);let a=i.z.object({disableHidden:(0,o.rK)().optional(),mode:i.z.enum(["SFW","NSFW","All"]).optional(),referrals:i.z.object({code:i.z.string().optional(),source:i.z.string().optional(),landingPage:i.z.string().optional(),loginRedirectReason:i.z.string().optional()}).default({})});function s(e){let t={disableHidden:null==e?void 0:e.disableHidden,mode:null==e?void 0:e.mode,referrals:{code:null==e?void 0:e.ref_code,source:null==e?void 0:e.ref_source,landingPage:null==e?void 0:e.ref_landing_page,loginRedirectReason:null==e?void 0:e.ref_login_redirect_reason}},r=a.safeParse(t);return r.success?r.data:a.parse({})}},35818:function(e,t,r){"use strict";r.d(t,{BC:function(){return K},BE:function(){return j},BY:function(){return s},CP:function(){return G},Cb:function(){return et},Ce:function(){return h},DD:function(){return C},ET:function(){return W},Eg:function(){return w},F:function(){return V},F$:function(){return es},FG:function(){return ea},G1:function(){return y},GJ:function(){return l},Hd:function(){return R},IH:function(){return z},JJ:function(){return g},KF:function(){return B},N_:function(){return A},OH:function(){return o},Qy:function(){return P},R8:function(){return k},RE:function(){return c},Rr:function(){return f},Sr:function(){return X},Tz:function(){return x},Un:function(){return a},Vd:function(){return er},Wx:function(){return Z},Xp:function(){return H},YV:function(){return $},a8:function(){return J},af:function(){return M},c_:function(){return N},eI:function(){return Q},fD:function(){return u},f_:function(){return m},gO:function(){return q},gY:function(){return L},hY:function(){return O},iA:function(){return _},iB:function(){return I},j3:function(){return p},m0:function(){return ei},o7:function(){return i},pj:function(){return Y},pm:function(){return b},py:function(){return en},qK:function(){return n},rm:function(){return D},sm:function(){return ee},uD:function(){return v},uy:function(){return E},wN:function(){return S},wp:function(){return eo},yl:function(){return U},yz:function(){return d},zq:function(){return F},zx:function(){return T}});let n={Requested:"Requested",Canceled:"Canceled",Rejected:"Rejected",Approved:"Approved",Reverted:"Reverted",Transferred:"Transferred",ExternallyResolved:"ExternallyResolved"},i={Stripe:"Stripe",Tipalti:"Tipalti"},o={Stripe:"Stripe",Paddle:"Paddle"},a={Sponsorship:"Sponsorship",Social:"Social",Other:"Other"},s={Checkpoint:"Checkpoint",TextualInversion:"TextualInversion",Hypernetwork:"Hypernetwork",AestheticGradient:"AestheticGradient",LORA:"LORA",LoCon:"LoCon",DoRA:"DoRA",Controlnet:"Controlnet",Upscaler:"Upscaler",MotionModule:"MotionModule",VAE:"VAE",Poses:"Poses",Wildcards:"Wildcards",Workflows:"Workflows",Detection:"Detection",Other:"Other"},l={Draft:"Draft",Training:"Training",Published:"Published",Scheduled:"Scheduled",Unpublished:"Unpublished",UnpublishedViolation:"UnpublishedViolation",GatherInterest:"GatherInterest",Deleted:"Deleted"},c={Pending:"Pending",Submitted:"Submitted",Paused:"Paused",Denied:"Denied",Processing:"Processing",InReview:"InReview",Failed:"Failed",Approved:"Approved"},u={None:"None",Image:"Image",RentCivit:"RentCivit",Rent:"Rent",Sell:"Sell"},d={Trained:"Trained",Merge:"Merge"},f={Created:"Created",Trained:"Trained"},p={Download:"Download",Generation:"Generation",InternalGeneration:"InternalGeneration"},h={Archived:"Archived",TakenDown:"TakenDown"},m={Favorite:"Favorite",Hide:"Hide",Mute:"Mute",Notify:"Notify"},g={FixedPrice:"FixedPrice",Bidding:"Bidding"},v={PaidAccess:"PaidAccess",PaidEarlyAccess:"PaidEarlyAccess",PaidGeneration:"PaidGeneration",CivitaiClubOnly:"CivitaiClubOnly",MySubscribersOnly:"MySubscribersOnly",Sponsored:"Sponsored"},y={Pending:"Pending",Success:"Success",Danger:"Danger",Error:"Error"},b={Sensitive:"Sensitive",Private:"Private",Public:"Public"},x={Day:"Day",Week:"Week",Month:"Month",Year:"Year",AllTime:"AllTime"},w={Suggested:"Suggested"},S={TOSViolation:"TOSViolation",NSFW:"NSFW",Ownership:"Ownership",AdminAttention:"AdminAttention",Claim:"Claim",CSAM:"CSAM"},k={Pending:"Pending",Processing:"Processing",Actioned:"Actioned",Unactioned:"Unactioned"},j={Like:"Like",Dislike:"Dislike",Laugh:"Laugh",Cry:"Cry",Heart:"Heart"},E={txt2img:"txt2img",txt2imgHiRes:"txt2imgHiRes",img2img:"img2img",inpainting:"inpainting"},O={Pending:"Pending",Scanned:"Scanned",Error:"Error",Blocked:"Blocked",NotFound:"NotFound",PendingManualAssignment:"PendingManualAssignment"},C={image:"image",video:"video",audio:"audio"},I={Model:"Model",Question:"Question",Image:"Image",Post:"Post",Tag:"Tag",Article:"Article",Bounty:"Bounty",Collection:"Collection"},P={UserGenerated:"UserGenerated",Label:"Label",Moderation:"Moderation",System:"System"},A={Parent:"Parent",Replace:"Replace",Append:"Append"},T={Read:"Read",Write:"Write",Generate:"Generate"},z={Hide:"Hide",Follow:"Follow",Allow:"Allow"},N={Badge:"Badge",NamePlate:"NamePlate",ContentDecoration:"ContentDecoration",ProfileDecoration:"ProfileDecoration",ProfileBackground:"ProfileBackground"},R={Trophy:"Trophy",Purchase:"Purchase",Event:"Event",Membership:"Membership",Claim:"Claim"},_={Model:"Model",Image:"Image",Article:"Article",Post:"Post"},M={Draft:"Draft",Published:"Published",Unpublished:"Unpublished"},D={Favorite:"Favorite",Hide:"Hide"},L={Private:"Private",Public:"Public",Review:"Review"},F={Private:"Private",Public:"Public",Unlisted:"Unlisted"},U={Model:"Model",Article:"Article",Post:"Post",Image:"Image"},B={Contest:"Contest",Bookmark:"Bookmark"},H={ACCEPTED:"ACCEPTED",REVIEW:"REVIEW",REJECTED:"REJECTED"},Z={VIEW:"VIEW",ADD:"ADD",ADD_REVIEW:"ADD_REVIEW",MANAGE:"MANAGE"},W={Collection:"Collection",Announcement:"Announcement",Leaderboard:"Leaderboard",Social:"Social",Event:"Event",CosmeticShop:"CosmeticShop"},V={USD:"USD",BUZZ:"BUZZ"},$={ModelCreation:"ModelCreation",LoraCreation:"LoraCreation",EmbedCreation:"EmbedCreation",DataSetCreation:"DataSetCreation",DataSetCaption:"DataSetCaption",ImageCreation:"ImageCreation",VideoCreation:"VideoCreation",Other:"Other"},q={Individual:"Individual",Split:"Split"},G={Open:"Open",BenefactorsOnly:"BenefactorsOnly"},K={Favorite:"Favorite",Track:"Track"},X={Image:"Image",TrainingData:"TrainingData"},J={Public:"Public",Unsearchable:"Unsearchable",Private:"Private",EarlyAccess:"EarlyAccess"},Y={Pending:"Pending",Approved:"Approved",Rejected:"Rejected"},Q={ManageMemberships:"ManageMemberships",ManageTiers:"ManageTiers",ManagePosts:"ManagePosts",ManageClub:"ManageClub",ManageResources:"ManageResources",ViewRevenue:"ViewRevenue",WithdrawRevenue:"WithdrawRevenue"},ee={Invited:"Invited",Joined:"Joined",Ignored:"Ignored",Left:"Left",Kicked:"Kicked"},et={Markdown:"Markdown",Image:"Image",Video:"Video",Audio:"Audio",Embed:"Embed"},er={SingleUse:"SingleUse",MultiUse:"MultiUse"},en={Image:"Image",Post:"Post",Article:"Article",Bounty:"Bounty",BountyEntry:"BountyEntry",ModelVersion:"ModelVersion",Model:"Model",Collection:"Collection"},ei={Pending:"Pending",Stored:"Stored",Failed:"Failed"},eo={Buzz:"Buzz",Membership:"Membership"},ea={Image:"Image",Video:"Video",MotionCapture:"MotionCapture",Upscalers:"Upscalers",Audio:"Audio",Compute:"Compute",GameEngines:"GameEngines",Editor:"Editor",LLM:"LLM"},es={Pending:"Pending",Approved:"Approved",Rejected:"Rejected"}},95448:function(e,t,r){"use strict";r.d(t,{EF:function(){return d},fK:function(){return u},kZ:function(){return f}});var n=r(84137),i=r(67294),o=r(73445),a=r(18753);let s=!!window.navigation,l="hist_keys",c=(0,o.Ue)()((0,a.n)(e=>({index:0,keys:[],setDefault:t=>{e(e=>{e.keys=[t]})},pushKey:t=>{e(e=>{e.keys=e.keys.slice(0,e.index+1).concat([t]),e.index=e.keys.length-1})},setKey:t=>{e(e=>{let r=e.keys.indexOf(t);r>-1?e.index=r:-1===r&&(e.keys=e.keys.slice(0,r).concat([t]),e.index=e.keys.length-1)})}})));function u(){let e=c(e=>e.keys),t=c(e=>e.pushKey),r=c(e=>e.setDefault),o=c(e=>e.setKey);return(0,i.useEffect)(()=>{sessionStorage.setItem(l,e.join(","))},[e]),(0,i.useEffect)(()=>{e.length||r(history.state.key)},[e,r]),(0,i.useEffect)(()=>{let e=history.pushState;return history.pushState=function(r,n,i){return t(r.key),e.apply(history,[r,n,i])},()=>{history.pushState=e}},[t]),(0,n.s)("popstate",e=>{e.state.key&&o(e.state.key)}),null}function d(){let e=c(e=>{var t;return null!==(t=e.index)&&void 0!==t?t:0});return s?navigation.currentEntry.index>0:e>0}let f=()=>{if(s)return navigation.currentEntry.index>0;{var e,t;let r=null!==(t=null===(e=sessionStorage.getItem(l))||void 0===e?void 0:e.split(","))&&void 0!==t?t:[],n=history.state.key;return r.indexOf(n)>0}}},72794:function(e,t,r){"use strict";r.d(t,{bQ:function(){return l},vK:function(){return c}});var n=r(11163),i=r.n(n),o=r(67294),a=r(73445),s=r(18753);let l=(0,a.Ue)()((0,s.n)((e,t)=>({handlers:[],register:r=>{let{name:n,message:i,predicate:o,event:a}=r;e(e=>{let r=t().handlers.findIndex(e=>e.name===n);-1===r?e.handlers.push({name:n,message:i,predicate:o,event:a}):(e.handlers[r].message=i,e.handlers[r].predicate=o)})},deregister:t=>{e(e=>{e.handlers=e.handlers.filter(e=>e.name!==t)})}}))),c=e=>{let{message:t="All unsaved changes will be lost. Are you sure you want to exit?"}=e,r=l(e=>e.handlers);return(0,o.useEffect)(()=>{let e=[...r].reverse();function n(r){var n;let i=e.filter(e=>"routeChangeStart"!==e.event).findIndex(e=>"function"==typeof e.predicate?e.predicate():e.predicate);if(-1!==i)return r.preventDefault(),r.returnValue=null!==(n=e[i].message)&&void 0!==n?n:t}function o(){var r;let n=e.filter(e=>"beforeunload"!==e.event).findIndex(e=>"function"==typeof e.predicate?e.predicate():e.predicate);if(-1!==n&&!window.confirm(null!==(r=e[n].message)&&void 0!==r?r:t))throw i().asPath!==window.location.pathname&&window.history.pushState("","",i().asPath),"routeChange aborted."}return e.length>0?(window.addEventListener("beforeunload",n),i().events.on("routeChangeStart",o)):(window.removeEventListener("beforeunload",n),i().events.off("routeChangeStart",o)),()=>{window.removeEventListener("beforeunload",n),i().events.off("routeChangeStart",o)}},[r,t]),null}},3153:function(e,t,r){"use strict";r.d(t,{Fd:function(){return w},Ft:function(){return p},KF:function(){return v},Pr:function(){return d},Py:function(){return S},Wg:function(){return y},ec:function(){return h},u2:function(){return b}});var n=r(73445),i=r(782),o=r(18753),a=r(17578),s=r(65057),l=r(99490),c=r(72456),u=r(48600);let d=(0,n.Ue)()((0,i.mW)((0,o.n)(e=>({counter:0,loading:!1,opened:!1,view:"generate",type:"image",open:async t=>{if(e(e=>{e.opened=!0,t&&(e.view="generate",e.loading=!0)}),t){let r=["audio","image","video"].includes(t.type);r&&b.setType(t.type);try{let n=await v(t);r&&x.setState({...n,resources:m(n.resources)});let{remixOf:i,...o}=n;e(e=>{e.data={...o,resources:m(o.resources),runType:"image"===t.type?"remix":"run"},e.loading=!1,e.counter++})}catch(t){throw e(e=>{e.loading=!1}),t}}},close:()=>e(e=>{e.opened=!1}),setView:t=>e(e=>{e.view=t}),setType:t=>{e(e=>{e.type=t})},setData:t=>{let{type:r,remixOf:n,workflow:i,sourceImage:o,engine:a,...s}=t;y.setState({type:r,workflow:i,sourceImage:o}),a&&y.setState({engine:a}),e(e=>{e.remixOf=n,e.data={...s,resources:m(s.resources),runType:"replay"},e.counter++,location.pathname.includes("generate")||(e.view="generate")})},clearData:()=>e(e=>{e.data=void 0,e.counter++})})),{name:"generation-store"})),f=d.getState(),p={open:f.open,close:f.close,setView:f.setView},h={setType:f.setType,setData:f.setData,clearData:f.clearData};function m(e){return e.map(e=>{let{substitute:t,...r}=e;return!r.canGenerate&&(null==t?void 0:t.canGenerate)?{...e,...t}:r})}let g={},v=async e=>{let t="default";if(g[t="modelVersions"===e.type?"".concat(e.type,"_").concat(Array.isArray(e.ids)?e.ids.join("_"):e.ids):"".concat(e.type,"_").concat(e.id)])return g[t];{let r=await fetch("/api/generation/data?".concat(l.QS.stringify(e)));if(!r.ok)throw Error(r.statusText);let n=await r.json();return g[t]=n,n}},y=(0,n.Ue)()((0,i.tJ)(e=>({type:"image"}),{name:"generation-form"})),b={setType:e=>y.setState({type:e}),setWorkflow:e=>{let t,r=e;if(e){let n=s.M2.find(t=>t.key===e);n?"engine"in n&&(t=n.engine):r=void 0}y.setState({workflow:r,engine:t})},setEngine:e=>y.setState({engine:e}),setsourceImage:e=>y.setState({sourceImage:e}),reset:()=>y.setState(e=>({type:e.type}),!0)},x=(0,n.Ue)()((0,i.tJ)(()=>({}),{name:"remixOf"}));function w(){var e;let t=(0,a.xJ)(),r=null!==(e=(null==t?void 0:t.isPaidMember)||(null==t?void 0:t.isModerator))&&void 0!==e&&e,{data:n,isLoading:i}=c.SX.generation.getGenerationEngines.useQuery(),o=s.M2.map(e=>{let t=null==n?void 0:n.find(t=>t.engine===e.engine);return t?{...e,...t}:null}).filter(u.$K),l=y(e=>e.sourceImage),d=Object.keys(s.MR).filter(e=>null==o?void 0:o.filter(e=>l?"img2vid"===e.subType:"txt2vid"===e.subType).some(t=>t.engine===e&&!t.disabled)).map(e=>({key:e,...s.MR[e]})).filter(e=>!e.memberOnly||r);return{data:o,availableEngines:d,isLoading:i}}function S(){var e;let{data:t}=w(),r=y(e=>e.engine),n=y(e=>e.sourceImage),i=t.filter(e=>{let{subType:t,type:r}=e;return"video"===r&&n?t.startsWith("img"):t.startsWith("txt")});return null!==(e=i.find(e=>e.engine===r))&&void 0!==e?e:i[0]}},58716:function(e,t,r){"use strict";r.d(t,{L:function(){return l},i:function(){return s}});var n=r(67294),i=r(73445),o=r(14619);let a=(0,i.Ue)(e=>({setImage:(t,r)=>e(e=>({[t]:{...e[t],...r}}))})),s={setImage:a.getState().setImage},l=e=>a((0,n.useCallback)(t=>{var r;let n=null!==(r=t[e.id])&&void 0!==r?r:{};return{...e,...(0,o.HO)(n)}},[e]))},62201:function(e,t,r){"use strict";r.d(t,{J:function(){return c}});var n=r(39096),i=r(57632),o=r(73445),a=r(18753),s=r(88182),l=r(72794);let c=(0,o.Ue)()((0,a.n)((e,t)=>{function r(t,r){e(e=>{let n=e.items.findIndex(e=>e.uuid===t);if(-1===n)throw Error("index out of bounds");e.items[n]={...e.items[n],...r}})}return{items:[],setItems:r=>{e(e=>{let n=t().items;e.items=r(n)})},clear:t=>{e(e=>{e.items=t?e.items.filter((0,n.Z)(t)):[],0===e.items.length&&p()})},getStatus:e=>{let r=e?t().items.filter(e):t().items;return{pending:r.filter(e=>"pending"===e.status).length,error:r.filter(e=>"error"===e.status).length,uploading:r.filter(e=>"uploading"===e.status).length,success:r.filter(e=>"success"===e.status).length,aborted:r.filter(e=>"aborted"===e.status).length}},updateMeta:(r,n)=>{e(e=>{let i=t().items.findIndex(e=>e.uuid===r);if(-1===i)throw Error("index out of bounds");let{meta:o}=e.items[i];o&&(e.items[i].meta=n(o))})},abort:e=>{let r=t().items.find(t=>t.uuid===e);null==r||r.abort()},upload:async(n,o)=>{var a,l;let{file:c,type:p,options:h,meta:m}=n;0===t().items.filter(e=>"uploading"===e.status).length&&f();let g=encodeURIComponent(c.name),v=null!==(l=null==h?void 0:null===(a=h.endpoint)||void 0===a?void 0:a.request)&&void 0!==l?l:{headers:{},body:{}},{size:y}=c,b={filename:g,type:p,size:y,...v.body},x={...v.headers,"Content-Type":"application/json"},w=await fetch("/api/upload",{method:"POST",headers:x,body:JSON.stringify(b)}),S=await w.json();if("error"in S)throw console.error(S.error),S.error;{let{bucket:n,key:a,uploadId:l,urls:f}=S,h=(0,i.Z)(),g=-1,v={...d,file:c,size:c.size?(0,s.qw)(c.size):0,uuid:h,meta:m,name:c.name},b=t().items.find((e,t)=>e.file===c&&(g=t,!0)),w={...v,...b};e(e=>{-1!==g?e.items[g]=w:e.items.push(v)});let k=Date.now(),j=0,E=e=>{let{loaded:t}=e,n=j+(null!=t?t:0);if(n){let e=n/((Date.now()-k)/1e3);r(w.uuid,{progress:y?n/y*100:0,uploaded:n,size:y,speed:e,timeRemaining:(y-n)/e,status:"uploading"})}},O=()=>fetch("/api/upload/abort",{method:"POST",headers:x,body:JSON.stringify({bucket:n,key:a,type:p,uploadId:l})}),C=f.length,I=(e,t)=>new Promise((n,i)=>{let o;let a=(t-1)*u,s=t===C?c.slice(a):c.slice(a,t*u),l=new XMLHttpRequest;l.upload.addEventListener("progress",E),l.upload.addEventListener("loadend",e=>{let{loaded:t}=e;j+=t}),l.addEventListener("loadend",()=>{4===l.readyState&&200===l.status&&(P.push({ETag:o,PartNumber:t}),n("success"))}),l.addEventListener("load",()=>{var e;o=null!==(e=l.getResponseHeader("ETag"))&&void 0!==e?e:""}),l.addEventListener("error",()=>i("error")),l.addEventListener("abort",()=>i("aborted")),l.open("PUT",e),l.setRequestHeader("Content-Type","application/octet-stream"),l.send(s);try{r(w.uuid,{abort:()=>{l&&l.abort()}})}catch(e){n("error")}}),P=[];for(let{url:e,partNumber:t}of f){let n="pending",i=0;for(;i<3&&"error"===(n=await I(e,t));)i++,await new Promise(e=>setTimeout(e,5e3*i));if("success"!==n){try{r(w.uuid,{status:n,progress:0,speed:0,timeRemaining:0,uploaded:0}),await O()}catch(e){console.error("Failed to abort upload"),console.error(e)}return}}if(!(await fetch("/api/upload/complete",{method:"POST",headers:x,body:JSON.stringify({bucket:n,key:a,type:p,uploadId:l,parts:P})}).catch(e=>(console.error("Failed to complete upload"),console.error(e),r(w.uuid,{status:"error",progress:0,speed:0,timeRemaining:0,uploaded:0}),{ok:!1}))).ok)return;r(w.uuid,{status:"success"});let A=f[0].url.split("?")[0],T=function(e,r){let{url:n,bucket:i,key:o}=r,a=t().items,s=a.findIndex(t=>t.uuid===e);if(-1===s)throw Error("index out of bounds");let l=a[s];return{url:n,bucket:i,key:o,name:l.name,size:l.size,meta:l.meta,uuid:l.uuid}}(w.uuid,{url:A,bucket:n,key:a});return null==o||o(T),T}}}})),u=104857600,d={progress:0,uploaded:0,size:0,speed:0,timeRemaining:0,status:"pending",abort:()=>void 0,meta:{}},f=()=>{let{handlers:e,register:t}=l.bQ.getState();-1===e.findIndex(e=>"file-upload"===e.name)&&t({name:"file-upload",message:"Files are still uploading. Upload progress will be lost",predicate:()=>c.getState().getStatus().uploading>0,event:"beforeunload"})},p=()=>{l.bQ.getState().deregister("file-upload")}},67946:function(e,t,r){"use strict";r.d(t,{$r:function(){return s},CD:function(){return d},Dr:function(){return v},Op:function(){return m},an:function(){return y},nv:function(){return f},qF:function(){return p},so:function(){return u},trainingStore:function(){return x},xb:function(){return g}});var n=r(1604),i=r(73445),o=r(18753),a=r(56141);let s={tag:{tags:{def:10,min:1,max:30},threshold:{def:.4,min:.3,max:.9}},caption:{temperature:{def:.5,min:0,max:1},maxNewTokens:{def:100,min:25,max:500}}},l="ignore",c=n.z.object({overwrite:n.z.enum(["ignore","append","overwrite"]).default(l)});c.extend({maxTags:n.z.number().int().min(s.tag.tags.min).max(s.tag.tags.max).default(s.tag.tags.def),threshold:n.z.number().min(s.tag.threshold.min).max(s.tag.threshold.max).default(s.tag.threshold.def),blacklist:n.z.string().default(""),prependTags:n.z.string().default(""),appendTags:n.z.string().default("")});let u=c.extend({temperature:n.z.number().min(s.caption.temperature.min).max(s.caption.temperature.max).default(s.caption.temperature.def),maxNewTokens:n.z.number().min(s.caption.maxNewTokens.min).max(s.caption.maxNewTokens.max).default(s.caption.maxNewTokens.def)}),d="sdxl",f="kohya",p="sdxl",h=a.MX.reduce((e,t)=>{var r,n,i,o,a,s,l,c;return{...e,[t.name]:null!==(c=null!==(l=null===(i=t.overrides)||void 0===i?void 0:null===(n=i[d])||void 0===n?void 0:null===(r=n.all)||void 0===r?void 0:r.default)&&void 0!==l?l:null===(s=t.overrides)||void 0===s?void 0:null===(a=s[d])||void 0===a?void 0:null===(o=a[f])||void 0===o?void 0:o.default)&&void 0!==c?c:t.default}},{}),m={id:1,base:d,baseType:p,samplePrompts:["","",""],params:{...h},staging:!1,highPriority:!1,buzzCost:0,hasIssue:!1},g={imageList:[],initialImageList:[],labelType:"tag",triggerWord:"",triggerWordInvalid:!1,ownRights:!1,shareDataset:!1,attested:{status:!1,error:""},initialLabelType:"tag",initialTriggerWord:"",initialOwnRights:!1,initialShareDataset:!1,autoLabeling:{url:null,isRunning:!1,total:0,successes:0,fails:[]},autoTagging:{overwrite:l,maxTags:s.tag.tags.def,threshold:s.tag.threshold.def,blacklist:"",prependTags:"",appendTags:""},autoCaptioning:{overwrite:l,temperature:s.caption.temperature.def,maxNewTokens:s.caption.maxNewTokens.def},runs:[{...m}]},v=e=>{var t,r;return"".concat(null!==(t=e.url.split("/").pop())&&void 0!==t?t:"unk",".").concat(null!==(r=e.type.split("/").pop())&&void 0!==r?r:"jpg")},y=(0,i.Ue)()((0,o.n)(e=>({updateImage:(t,r)=>{let{matcher:n,url:i,name:o,type:a,label:s,appendLabel:l,invalidLabel:c,source:u}=r;e(e=>{e[t]||(e[t]={...g}),e[t].imageList=e[t].imageList.map(r=>{if(v(r)===n){let n=r.label;return void 0!==s&&(n=l&&r.label.length>0?"caption"===e[t].labelType?"".concat(r.label,"\n").concat(s):"".concat(r.label,", ").concat(s):s),{url:null!=i?i:r.url,name:null!=o?o:r.name,type:null!=a?a:r.type,label:n,invalidLabel:null!=c?c:r.invalidLabel,source:null!=u?u:r.source}}return r})})},setImageList:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].imageList=r})},setInitialImageList:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].initialImageList=r})},setLabelType:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].labelType=r})},setTriggerWord:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].triggerWord=r})},setTriggerWordInvalid:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].triggerWordInvalid=r})},setOwnRights:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].ownRights=r})},setShareDataset:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].shareDataset=r})},setAttest:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].attested=r})},setInitialLabelType:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].initialLabelType=r})},setInitialTriggerWord:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].initialTriggerWord=r})},setInitialOwnRights:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].initialOwnRights=r})},setInitialShareDataset:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].initialShareDataset=r})},setAutoLabeling:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].autoLabeling={...e[t].autoLabeling,...r}})},setAutoTagging:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].autoTagging={...e[t].autoTagging,...r}})},setAutoCaptioning:(t,r)=>{e(e=>{e[t]||(e[t]={...g}),e[t].autoCaptioning={...e[t].autoCaptioning,...r}})},addRun:(t,r)=>{e(e=>{e[t]||(e[t]={...g});let n=Math.max(1,...e[t].runs.map(e=>e.id)),i={...null!=r?r:m,id:n+1};e[t].runs.push(i)})},removeRun:(t,r)=>{e(e=>{e[t]||(e[t]={...g});let n=e[t],i=n.runs.findIndex(e=>e.id===r);-1!==i&&n.runs.splice(i,1),0===n.runs.length&&e[t].runs.push(m)})},updateRun:(t,r,n)=>{e(e=>{e[t]||(e[t]={...g});let i=e[t].runs.find(e=>e.id===r);if(i){var o,a,s,l,c,u,d;i.base=null!==(o=n.base)&&void 0!==o?o:i.base,i.baseType=null!==(a=n.baseType)&&void 0!==a?a:i.baseType,i.customModel=null===n.customModel?void 0:n.customModel?n.customModel:i.customModel,i.samplePrompts=null!==(s=n.samplePrompts)&&void 0!==s?s:i.samplePrompts,i.highPriority=null!==(l=n.highPriority)&&void 0!==l?l:i.highPriority,i.staging=null!==(c=n.staging)&&void 0!==c?c:i.staging,i.buzzCost=null!==(u=n.buzzCost)&&void 0!==u?u:i.buzzCost,i.hasIssue=null!==(d=n.hasIssue)&&void 0!==d?d:i.hasIssue,i.params={...i.params,...n.params}}})}}))),b=y.getState(),x={updateImage:b.updateImage,setImageList:b.setImageList,setInitialImageList:b.setInitialImageList,setLabelType:b.setLabelType,setTriggerWord:b.setTriggerWord,setTriggerWordInvalid:b.setTriggerWordInvalid,setOwnRights:b.setOwnRights,setShareDataset:b.setShareDataset,setAttest:b.setAttest,setInitialLabelType:b.setInitialLabelType,setInitialTriggerWord:b.setInitialTriggerWord,setInitialOwnRights:b.setInitialOwnRights,setInitialShareDataset:b.setInitialShareDataset,setAutoLabeling:b.setAutoLabeling,setAutoTagging:b.setAutoTagging,setAutoCaptioning:b.setAutoCaptioning,addRun:b.addRun,removeRun:b.removeRun,updateRun:b.updateRun}},9242:function(e,t,r){"use strict";r.d(t,{sZ:function(){return o},R1:function(){return s},TV:function(){return d},uG:function(){return l},WY:function(){return u},aw:function(){return a}});var n=r(21124),i=r(35818);let o=e=>e[Math.floor(Math.random()*e.length)];function a(e){return new Intl.ListFormat("en",{style:"long",type:"conjunction"}).format(e)}function s(e,t){return t?(0,n.Z)(e,t):e.filter(function(e,t,r){return r.indexOf(e)===t})}function l(e,t){return e.sort(function(){for(var e=arguments.length,r=Array(e),n=0;no?1:0})}let c={[i.BY.Checkpoint]:0,[i.BY.LORA]:1,[i.BY.DoRA]:2,[i.BY.LoCon]:3,[i.BY.TextualInversion]:4,[i.BY.VAE]:5,[i.BY.Upscaler]:6,[i.BY.Controlnet]:7,[i.BY.Workflows]:8,[i.BY.Wildcards]:9,[i.BY.Poses]:10,[i.BY.MotionModule]:11,[i.BY.AestheticGradient]:12,[i.BY.Hypernetwork]:13,[i.BY.Detection]:14,[i.BY.Other]:15};function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].sort((e,t)=>{let r=e.modelType,n=t.modelType;return(r&&r in c?c[r]:Number.MAX_VALUE)-(n&&n in c?c[n]:Number.MAX_VALUE)})}function d(e){return e.sort(()=>Math.random()-.5)}},59743:function(e,t,r){"use strict";r.d(t,{M1:function(){return o},ir:function(){return i}});var n=r(43985);let i=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"all";return("all"===n&&(e>=t?n="width":t>=e&&(n="height")),"width"===n&&e>r)?{width:r,height:Math.round(t/e*r)}:"height"===n&&t>r?{width:Math.round(e/t*r),height:r}:{width:e,height:t}};function o(e,t,r){let o=i(t,r,64),a=document.createElement("canvas");a.width=o.width,a.height=o.height;let s=a.getContext("2d");s.drawImage(e,0,0,o.width,o.height);let l=s.getImageData(0,0,o.width,o.height);return(0,n.cv)(l.data,l.width,l.height,4,4)}},40627:function(e,t,r){"use strict";r.d(t,{U:function(){return n}});let n=e=>{var t;if(!e)return{url:void 0,notification:void 0,label:void 0};let r=e.user&&"a user"!==e.user?"/user/".concat(e.user):"",n="You received a tip of ".concat(e.amount," Buzz from ").concat(e.user?"@".concat(e.user):"a user");if(!e.entityId||!e.entityType)return{url:r,notification:"".concat(n,"!"),label:"User"};let{entityId:i,entityType:o}=e,a={default:{url:r,notification:"".concat(n,"!"),label:"User"},Model:{url:"/models/".concat(i),notification:"".concat(n," on one of your models!"),label:"Model"},Image:{url:"/images/".concat(i),notification:"".concat(n," on one of your images!"),label:"Image"},Comment:{url:r,notification:"".concat(n," on one of your comments!"),label:"Comment"},CommentV2:{url:r,notification:"".concat(n," on one of your comments!"),label:"Comment"},Article:{url:"/articles/".concat(i),notification:"".concat(n," on one of your articles!"),label:"Article"},Bounty:{url:"/bounties/".concat(i),label:"Bounty",notification:""}};return null!==(t=a[o])&&void 0!==t?t:a.default}},64980:function(e,t,r){"use strict";r.d(t,{F:function(){return s},d:function(){return a}});var n=r(47041),i=r(27484),o=r.n(i);function a(e,t,r){return(0,n.setCookie)(e,t,{expires:r||o()().add(1,"year").toDate()})}function s(e){e.forEach(e=>(0,n.deleteCookie)(e))}},36777:function(e,t,r){"use strict";r.d(t,{AS:function(){return w},Hc:function(){return f},JR:function(){return b},Ry:function(){return x},YI:function(){return p},YO:function(){return u},b7:function(){return v},fq:function(){return S},i4:function(){return m},iX:function(){return y},jt:function(){return d},l7:function(){return h},p6:function(){return c},xR:function(){return g}});var n=r(27484),i=r.n(n),o=r(37181),a=r.n(o),s=r(70178),l=r.n(s);function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMM D, YYYY",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r?i().utc(e).format(t):i()(e).format(t)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMM D, YYYY",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e)return c(e,t,r)}function d(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=t?"h:mma":"";return i()().isSame(e,"day")?i()(e).format(t?"h:mma":"MMM D"):i()().isSame(e,"week")?i()(e).format("dddd "+r):i()().isSame(e,"month")||i()().isSame(e,"year")?i()(e).format("MMM D "+r):i()(e).format("MMM D, YYYY "+r)}function f(e,t,r){return i()(e).add(t,r).toDate()}function p(e){return i()().isBefore(e)}function h(){for(var e,t,r=arguments.length,n=Array(r),o=0;o2&&void 0!==arguments[2]?arguments[2]:"day",n=[],i=e;for(;i<=t;)n.push(i),i=f(i,1,r);return n}function x(e){return new Date(new Date(e.valueOf()).toISOString().slice(0,-1))}function w(e){let t=i()(new Date(e,10,1)),r=(4-t.day()+7)%7;return t.add(r+21,"day").toDate()}function S(){return 11===i()().month()}},85625:function(e,t,r){"use strict";r.d(t,{Di:function(){return o},GY:function(){return a},Ot:function(){return i}});var n=r(67294);let i=e=>{let t;return r=>{t&&clearTimeout(t),t=setTimeout(r,e)}},o=e=>{let t=(0,n.useRef)();return(0,n.useEffect)(()=>()=>{t.current&&clearTimeout(t.current)},[]),(0,n.useCallback)(r=>{t.current&&clearTimeout(t.current),t.current=setTimeout(r,e)},[e])},a=e=>{let t={};return(r,n)=>{t[r]&&clearTimeout(t[r]),t[r]=setTimeout(()=>{n(),delete t[r]},e)}}},51111:function(e,t,r){"use strict";r.d(t,{HD:function(){return o},uq:function(){return a}});let n={huggingFace:["huggingface.co"],twitter:["twitter.com"],x:["x.com"],twitch:["twitch.tv"],reddit:["reddit.com"],youtube:["youtube.com"],facebook:["facebook.com"],instagram:["instagram.com"],buyMeACoffee:["buymeacoffee.com"],patreon:["patreon.com"],koFi:["ko-fi.com"],coindrop:["coindrop.to"],discord:["discord.gg","discord.com"],github:["github.com"],linktree:["linktr.ee"],deviantArt:["deviantart.com"],tumblr:["tumblr.com"],telegram:["t.me"],vk:["vk.com"],bilibili:["bilibili.com"],civitai:["civitai.com"],linkedin:["linkedin.com"]},i=Object.keys(n).concat(void 0);function o(e){var t;let{hostname:r}=new URL(e);return r=r.split(".").slice(-2).join("."),null===(t=Object.entries(n).find(e=>{let[t,n]=e;return n.includes(r)}))||void 0===t?void 0:t[0]}function a(e){return e.map(e=>{let t=o(e.url);return{...e,domain:t}}).sort((e,t)=>i.indexOf(e.domain)-i.indexOf(t.domain))}},49072:function(e,t,r){"use strict";r.d(t,{Hk:function(){return function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2?arguments[2]:void 0;return t(r).catch(o=>{if(r>0)return n?i(n).then(()=>e(t,r-1,n)):e(t,r-1);throw o})}},M_:function(){return n}});class n extends Error{constructor(e,t){super(e,t),this.name="AuthorizationError"}}async function i(e){return new Promise(t=>setTimeout(t,e))}},72688:function(e,t,r){"use strict";r.d(t,{v:function(){return n}});class n{on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),()=>this.off(e,t)}off(e,t){if(!this.callbacks[e])return;let r=this.callbacks[e].indexOf(t);this.callbacks[e].splice(r,1)}emit(e,t){let r=this.callbacks[e];r&&r.forEach(e=>e(t))}stop(){this.callbacks={}}constructor(){this.callbacks={}}}},79116:function(e,t,r){"use strict";r.d(t,{B:function(){return i}});var n=r(524);let i=async()=>n.O.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY?r.e(4465).then(r.bind(r,54465)).then(e=>{let{loadStripe:t}=e;return t(n.O.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY)}):null},28270:function(e,t,r){"use strict";r.d(t,{Mn:function(){return s},V9:function(){return u},Z6:function(){return c}});var n=r(91036),i=r.n(n),o=r(48600);let a=["p","strong","em","u","s","ul","ol","li","a","br","img","iframe","div","code","pre","span","h1","h2","h3","hr"],s={a:["rel","href","target"],img:["src","alt","width","height"],iframe:["src","width","height","allowfullscreen","autoplay","disablekbcontrols","enableiframeapi","endtime","ivloadpolicy","loop","modestbranding","origin","playlist","start"],div:["data-youtube-video","data-type"],span:["class","data-type","data-id","data-label","style"],"*":["id"]},l=["www.youtube.com","www.instagram.com","www.strawpoll.com"];function c(e,t){let{stripEmpty:r=!1,transformTags:n,...c}=null!=t?t:{};return i()(e,{allowedTags:a,allowedAttributes:s,exclusiveFilter:r?e=>"p"===e.tag&&!e.text.trim():void 0,allowedIframeHostnames:l,transformTags:{a:function(e,t){let{href:r,...n}=t,i=r.startsWith("http")?r:"http://".concat(r);return((0,o.K2)(i)?new URL(i).hostname:void 0)?{tagName:"a",attribs:{...n,href:r,rel:"ugc"}}:{tagName:"span",...n}},...n},...c})}function u(e){let{hexColor:t,colorScheme:r,threshold:n=.5}=e,i=(.299*parseInt((t=t.startsWith("#")?t.replace("#",""):t).substring(0,2),16)+.587*parseInt(t.substring(2,4),16)+.114*parseInt(t.substring(4),16))/255;return!!(0,o.hj)(i)&&("dark"===r?!(i>n):i>n)}},34163:function(e,t,r){"use strict";function n(e){try{return JSON.parse(e,(e,t)=>"string"==typeof t&&/^\d+n$/.test(t)?BigInt(t.slice(0,-1)):t)}catch(e){return null}}function i(e){return new Blob([JSON.stringify(e)]).size/1048576}r.d(t,{AX:function(){return i},xZ:function(){return n}})},94626:function(e,t,r){"use strict";r.d(t,{UD:function(){return a},Ur:function(){return i},ZM:function(){return o}});var n=r(99490);let i={"download-auth":"The creator of this asset requires you to be logged in to download it","report-content":"You need to be logged in to report this content","report-model":"You need to be logged in to report this model","report-review":"You need to be logged in to report this review","report-article":"You need to be logged in to report this article","report-user":"You need to be logged in to report this user","create-review":"You need to be logged in to add a review","upload-model":"You need to be logged in to upload a model","train-model":"You need to be logged in to train a model","notify-model":"You need to be logged in to get notifications for a model","create-comment":"You need to be logged in to add a comment","report-comment":"You need to be logged in to report this comment","confirm-membership":"You need to be logged in to confirm your membership","follow-user":"You need to be logged in to follow a user","follow-collection":"You need to be logged in to follow a collection","hide-content":"You need to be logged in to hide content","notify-version":"You need to be logged in to subscribe for notifications","discord-link":"Login with Discord to link your account","create-article":"You need to be logged in to create an article","favorite-article":"You need to be logged in to like an article","post-images":"You need to be logged in to post","add-to-collection":"You must be logged in to add this resource to a collection","create-bounty":"You need to be logged in to create a new bounty","perform-action":"You need to be logged in to perform this action","purchase-buzz":"You need to be logged in to purchase Buzz","image-gen":"You need to be logged in to generate","blur-toggle":"Displaying NSFW content requires you to be logged in","create-club":"You need to be logged in to create a club","join-club":"You need to be logged in to join a club","civitai-vault":"You need to be logged in to access your Civitai Vault","favorite-model":"You need to be logged in to favorite a model",rater:"You need to be logged in to play the rating game","switch-accounts":"Log into the account you wish to add",shop:"You need to be logged in to preview and purchase cosmetics"},o=["image-gen","train-model","blur-toggle"];function a(e){let{returnUrl:t,reason:r}=e;return"/login?".concat(n.QS.stringify({returnUrl:t,reason:r}))}},81447:function(e,t,r){"use strict";r.d(t,{D:function(){return i},Q:function(){return n}});let n={xs:576,sm:768,md:992,lg:1200,xl:1400},i={largerThan:(e,t)=>{let r="string"==typeof e?n[e]:e;return t?"@container ".concat(t," (width >= ").concat(r,"px)"):"@container (width >= ".concat(r,"px)")},smallerThan:(e,t)=>{let r="string"==typeof e?n[e]:e;return t?"@container ".concat(t," (width < ").concat(r,"px)"):"@container (width < ".concat(r,"px)")}}},5632:function(e,t,r){"use strict";r.d(t,{bf:function(){return d},n$:function(){return c},fn:function(){return p},Or:function(){return l},po:function(){return s},U6:function(){return m}});var n=r(72323),i=r(59743),o=r(8449),a=r(79444);let s=async e=>new Promise((t,r)=>{let n=new Image;n.crossOrigin="Anonymous",n.onload=()=>t(n),n.onerror=function(){for(var e=arguments.length,t=Array(e),n=0;n!0).catch(()=>!1)}let c=async e=>{let t=await s(e),r=t.width,n=t.height;return{width:r,height:n,hash:(0,i.M1)(t,r,n)}},u=async e=>{let t=URL.createObjectURL(e),r=await c(t),n=await (0,o.sd)(e);return{objectUrl:t,metadata:{size:e.size,...r},meta:n}},d=async(e,t)=>{let r=await (0,a.W)(e,t);return{blockedFor:(null==r?void 0:r.success)?void 0:null==r?void 0:r.blockedFor}},f=e=>e.mozHasAudio||!!e.webkitAudioDecodedByteCount||!!(e.audioTracks&&e.audioTracks.length),p=async e=>new Promise((t,r)=>{let n=document.createElement("video");n.onloadedmetadata=function(){n.currentTime=0},n.onseeked=function(){let e=n.videoWidth,r=n.videoHeight,o=f(n);t({width:e,height:r,hash:(0,i.M1)(n,e,r),duration:Math.round(1e3*n.duration)/1e3,audio:o})},n.onerror=function(){for(var e=arguments.length,t=Array(e),n=0;n{let t=URL.createObjectURL(e),r=await p(t);return{objectUrl:t,metadata:{size:e.size,...r}}};async function m(e){let t=n.oZ[e.type],r={name:e.name,mimeType:e.type};switch(t){case"image":let i=await u(e);return{type:t,...r,...i};case"video":let o=await h(e);return{type:t,...r,...o};default:throw Error("Unhandled file type: ".concat(e.name.split(".").pop()))}}},79444:function(e,t,r){"use strict";r.d(t,{W:function(){return b},CH:function(){return x},ik:function(){return L},a$:function(){return z},sr:function(){return S},QO:function(){return D},Rg:function(){return R}});var n=r(27943),i=r(45894),o=JSON.parse('["cave nigger","africoon","africoons","akata","akatas","beaner","beaners","beastial","beastiality","bestial","bestiality","browntown","chigger","chink","chinks","coon","coonass","coonasses","coons","darkie","darkies","daughter","dike","dog-fucker","dune coon","dune coons","dyke","gas chamber","gas chambers","gook","gooks","guinne","honkey","incest","incestuous","jail bait","jail-bait","jail.bait","jail_bait","jailbait","jap","japs","jejune","jew","jews","jigaboo","juvenile","kike","kikes","kkk","kraut","loli","loli-con","loli.con","loli_con","lolicon","lolis","lolita","mick","midget","midgets","mongoloid","n1g","n1gga","n1gger","nazi","nazis","necro","necrophilia","neonazi","neonazis","nig","niga","nigas","nigg3r","nigg4h","nigga","niggah","niggar","niggas","niggaz","nigger","niggers","niglet","niglets","nignog","nignogs","nigs","nonconsentual","nonconsensual","non consensual","non-consensual","paedophile","paki","pakis","pedobear","pedophile","porch monkey","porch monkeys","puberty","puerile","rag-head","raghead","ragheads","rape","raped","raping","rapist","rapists","retard","retarded","retards","rice nigger","rigor mortis","scat","scrawny","shit","shitter","shitting","shota","shota-con","shota.con","shota_con","shotacon","spic","spics","statutory rape","swastika","terrorist","third reich","towel head","towel heads","towelhead","towelheads","turk","turks","wetback","wetbacks","wigger","wiggers","wop","yigger"]'),a=JSON.parse('["upskirt","peeing","piss","hentai","genitalia","penis","anus","masturbate","ass","penetration","topless","bulge","fingering","nipples","cum","doggystyle","creampie","shirt lift","skirt lift","humping","crotch","dildo","oral","blow job","camel toe","foot job"]'),s=JSON.parse('["booty","twerk","netflix and chill","slide into dms","oiled","dtf","thot","naturist","bloomers","unmentionables","drawers","milf","quickie","strip tease","voyeur","one-night stand","cleft of venus","orgasm","ahegao","leotard","seductive","attractive","breasts*","cleavage","suggestive","tight clothes","skintight","pregnant","maternity","all fours","private","tiddy","arse","bisexual","lesbian","balls","flashing","homosexual","lubricant","arousal","shaft","surrogacy","saliva","juggalo","jugs","nsfw","xxx","slut","thongs?","open legs?","nudi?es","sexual","fap","nipple","strip","sex","sexed","fuck\\\\w*","pee","peed","pissing","pissed","poops?","pooping","peepee","sexual\\\\w*","pooped","poo","shit","shitting","defecate","defecating","defecated","defecation","touch[ing] [\\\\s|\\\\w]*self","\\\\w*nude\\\\w*","nudist","\\\\w*naked\\\\w*","undress","undressed","pubic","wearing nothing","without [\\\\s|\\\\w]* clothes","without [\\\\s|\\\\w]* clothing","no clothes","no clothing","clothing off","clothes off","off [\\\\s|\\\\w]* clothes","off [\\\\s|\\\\w]* clothing","dick","testicles","vagina","anal","missionary","erotic\\\\w*","jerks? [\\\\s|\\\\w]* off","jerking [\\\\s|\\\\w]* off","jacks? [\\\\s|\\\\w]* off","jacking [\\\\s|\\\\w]* off","[o|i]n bed","fetish","boobs*","butts*","no top","schlick","masturbation","view from below","microkini","\\\\w*bikini","underweard?","slingshot swimsuit","slingshot swimwear","lingerie","negligee","\\\\w*bondage","desnuda","undergarments?","cum\\\\w*","cunt","r-*18","sexy","sexi","cock","\\\\w*pussy\\\\w*","panties","bra","downshirt","shirtless","dress lift","showering","spread legs?","bukkake","breast feed\\\\w*","downblouse","tits*","hump","crotchless","aroused","tit fuck","foreskin","condom","fellatio","sucking","sucks?","suc","nipslip","groin","vaginal","sensual","porn","porno","pornography","privates","strips","teases?","teasing","torture","raped*","asshole","cunt","vulva","clitoris","girl and dog","interspecies","speedo","zoophilia","shlong","cunnilingus","facesitting","foreplay","hand job","labia","orgy","pegging","rimming","squirting","strap-on","threesome","vibrator","areola","abortion","boner","cervix","erection","genitals","horny","hymen","kink","labia","menses","menstruation","ovaries","perineum","phallic","puberty","rectum","sadomasochism","bdsm","semen","seminal","smegma","speculum","sperm","tampon","testes","uncircumcised","circumcised","virginity","virgin","fetish","crowning","milking","vore","knot (in sheath)","fallopian","uterus","fertilization","ovum","impregnation","knotting ","penetrating","molest","molested","molestation","mommy milkers?","grope","groping","tonguing","anal sex","ass fuck","ballsack","whore","prostitute","barely legal","bestiality","bollocks?","flaccid","breast job","tit job","futanari","paizuri ","brothel","dyke","fondle","incest","interracial","jizz","muff","sodomy","spunk","urinary","rating explicit","legs? up","spreads? [her|his|its]* legs?","underpants?","adult actress","pornstar","porn star","onlyfans"]'),l=JSON.parse('["loli","shota","slut","whore","lolicon","shotacon","puta","로리","男の子","slut","whore","m\xe4dchen","junge","shota","schlampe","hure","adolescente","chica","洛丽","青少年","女孩","婴儿","男孩","正太","儿童","贱人","妓女","洛丽控","正太控","ロリ","ティーン","女の子","赤ちゃん","ショタ","子供","ビッチ","売春婦","ロリコン","ショタコン","십대","소녀","아기","소년","쇼타","어린이","창녀","로리콘","쇼타콘","лоли","подросток","девочка","младенец","мальчик","шота","ребёнок","шлюха","проститутка","лоликон","шотакон"]'),c=JSON.parse('["cave nigger","africoon","africoons","akata","akatas","beaner","beaners","beastial","beastiality","bestial","bestiality","browntown","chigger","chink","chinks","coon","coonass","coonasses","coons","dike","dog-fucker","dune coon","dune coons","dyke","gas chamber","gas chambers","gook","gooks","guinne","honkey","incest","incestuous","jail bait","jail-bait","jail.bait","jail_bait","jailbait","jap","japs","jejune","jew","jews","jigaboo","kike","kikes","kkk","loli","lolii","loli-con","loli.con","loli_con","lolicon","lolis","lolita","mick","mongoloid","n1g","n1gga","n1gger","nazi","nazis","necro","necrophilia","negro","negros","neonazi","neonazis","nig","niga","nigas","nigg3r","nigg4h","nigga","niggah","niggar","niggas","niggaz","nigger","niggers","niglet","niglets","nignog","nignogs","nigs","paki","pakis","pedobear","pedophile","porch monkey","porch monkeys","puberty","pubescent","puerile","rag-head","raghead","ragheads","retard","retarded","retards","rice nigger","scat","scrawny","shit","shitter","shitting","shota","shota-con","shota.con","shota_con","shotacon","spic","spics","spook","spooks","swastika","terrorist","third reich","towel head","towel heads","towelhead","towelheads","turk","turks","wetback","wetbacks","wigger","wiggers","wop","yigger","\uD83D\uDC76","\uD83D\uDC7C","\uD83E\uDD31","\uD83D\uDC69‍\uD83C\uDF7C","\uD83D\uDC68‍\uD83C\uDF7C","\uD83E\uDDD1‍\uD83C\uDF7C","\uD83D\uDEBC","\uD83C\uDF7C","\uD83E\uDDD2"]'),u=JSON.parse('{"Dv":["young","younger","youngest","adolescence","jnr","jr","youth","youthful","yng","childish","neotenous","immatured?","infantile","scho+l","lit+le","lil","small","tiny","bairn","nipper","babyish","babylike","childlike","teenie","teeny","not mature","not old","disney","loli","shota","babe"],"uQ":["\\\\w*girl+\\\\w*","\\\\w*female\\\\w*","\\\\w*bo+y+\\\\w*","\\\\w*male\\\\w*","sister","daughter","brother","son"],"zy":["young looking","extremely young","mini girl","mini boy","kindergartens*","pubescent","pre pubescent","to*ddle?r","under ager","under age","under the legal age","under aged","under developed","under grown","un grown","very young","\\\\w*kg[0-9]+\\\\w*","\\\\w*infant\\\\w*","\\\\w*kindergartener\\\\w*","\\\\w*kindergarten\\\\w*","\\\\w*preschooler\\\\w*","\\\\w*preschool\\\\w*","pre k","elementary school?","elementary aged?","primary school?","middle school?","middle schooler","high school?","high schooler","\\\\d+(st|nd|rd|th)? grade","whippersnapper","\\\\w*newborn\\\\w*","\\\\w*tike\\\\w*","\\\\w*tyke\\\\w*","\\\\w*sprog\\\\w*","\\\\w*minor\\\\w*","\\\\w*toddle\\\\w*","\\\\w*tee+n\\\\w*","tean\\\\w*","twe[e|a]n\\\\w*","\\\\w*pre te[e|a]+n\\\\w*","\\\\w*adolescent\\\\w*","youth","stripling","\\\\w*youngster\\\\w*","\\\\w*youngling\\\\w*","\\\\w*kid","kid","\\\\w*kiddo\\\\w*","\\\\w*ba+b+ y\\\\w*","\\\\w*ba+bies\\\\w*","\\\\w*t[i|o]d+le*r\\\\w*","\\\\w*chi*ld\\\\w*","\\\\w*chi*ldren\\\\w*","\\\\w*juvenile","kiddy","kiddie","\\\\w*tot","\\\\w*urchin\\\\w*","\\\\w*l+oli+e?","l+oli[c|k]on","\\\\dshota","cub","one shota","shota","shota[c|k]on","プレティーン","ロリ"],"M5":["developed","adult body","mature body","mature"]}'),d=JSON.parse('["aaron paul","aaron rodgers","adam ant","adam baldwin","adam driver","adam lambert","adam levine","adam sandler","adam savage","adam schiff","adele","adrien brody","al franken","al gore","al green","al pacino","al roker","al sharpton","alan alda","alan arkin","alan jackson","alanis morissette","albert brooks","alec baldwin","alex jones","alex rodriguez","alex trebek","alfre woodard","ali macgraw","alice cooper","alicia keys","alicia silverstone","alison krauss","alyssa milano","amanda bynes","amanda peet","amanda seyfried","amber heard","america ferrera","amy adams","amy grant","amy klobuchar","amy poehler","amy schumer","ana de armas","anderson cooper","andie macdowell","andre agassi","andrea bocelli","andrea mitchell","andrew cuomo","andrew garfield","andrew lloyd webber","andy cohen","andy garcia","andy samberg","angela bassett","angela lansbury","angela merkel","angelina jolie","anita baker","anjelica huston","ann coulter","ann curry","ann margret","anna faris","anna kendrick","anna paquin","anne hathaway","anne murray","anne rice","annette bening","annie lennox","anthony anderson","anthony d weiner","anthony hopkins","anthony kennedy","antonio banderas","ariana grande","arlo guthrie","arnold schwarzenegger","arsenio hall","art garfunkel","ashanti","ashlee simpson","ashley judd","ashton kutcher","axl rose","barack obama","barbara eden","barbara mandrell","barbara walters","barbra streisand","barry bonds","barry manilow","barry sanders","beau bridges","belinda carlisle","ben affleck","ben carson","ben kingsley","ben roethlisberger","ben shapiro","ben stein","ben stiller","benedict cumberbatch","benicio del toro","benjamin bratt","bernadette peters","bernie sanders","beto o rourke","bette midler","betty white","beverly d angelo","beyonc\xe9","bill belichick","bill clinton","bill cosby","bill de blasio","bill engvall","bill gates","bill hader","bill maher","bill murray","bill nye","bill o reilly","bill pullman","bill russell","bill skarsg\xe5rd","billie eilish","billie jean king","billy bob thornton","billy crystal","billy dee williams","billy idol","billy joel","billy ocean","billy ray cyrus","billy zane","bjork","bjorn borg","blake lively","blake shelton","bo jackson","bob barker","bob costas","bob dole","bob dylan","bob eubanks","bob newhart","bob saget","bob schieffer","bob seger","bob uecker","bobby flay","bobby knight","bonnie hunt","bonnie raitt","bonnie tyler","boris johnson","boy george","boz scaggs","brad paisley","brad pitt","bradley cooper","brendan fraser","bret michaels","brett favre","brett kavanaugh","brian dennehy","brian williams","brian wilson","brie larson","brigitte bardot","brigitte nielsen","bristol palin","brit hume","britney spears","brooke shields","bruce dern","bruce springsteen","bruce willis","bruno mars","bryan adams","bryan cranston","bryant gumbel","burt bacharach","caitlyn jenner","cal ripken","cam newton","cameron diaz","candice bergen","carl lewis","carl reiner","carlos santana","carlos santana","carly rae jepsen","carly simon","carmen electra","carol burnett","carole king","caroline kennedy","carrie underwood","carrot top","carson daly","casey affleck","cat stevens","cate blanchett","catherine middleton","catherine o hara","catherine zeta jones","cedric the entertainer","cee lo green","celine dion","cesar millan","chadwick boseman","chaka khan","chance the rapper","channing tatum","charles barkley","charles schumer","charley pride","charlie rose","charlie sheen","charlize theron","cheech marin","chelsea clinton","chelsea handler","chelsea manning","cheryl tiegs","chevy chase","chris brown","chris christie","chris daughtry","chris elliott","chris evans","chris evert","chris hansen","chris hemsworth","chris isaak","chris matthews","chris noth","chris o donnell","chris pine","chris pratt","chris rock","chris tucker","chris wallace","christian bale","christian slater","christiane amanpour","christie brinkley","christina aguilera","christina applegate","christina ricci","christopher cross","christopher cuomo","christopher lloyd","christopher meloni","christopher plummer","christopher walken","chubby checker","chuck norris","chuck woolery","ciara","cicely tyson","cindy crawford","claire danes","clarence thomas","clay aiken","clint black","clint eastwood","clive owen","cloris leachman","cokie roberts","colin farrell","colin firth","colin kaepernick","colin powell","conan o brien","condoleezza rice","connie chung","connie francis","conor mcgregor","cory booker","courteney cox","courtney love","craig ferguson","craig t nelson","criss angel","cristiano ronaldo","crystal gayle","cuba gooding","cybill shepherd","cyndi lauper","cynthia nixon","dabney coleman","daisy ridley","dakota fanning","dakota johnson","dalai lama","dale earnhardt","damon wayans","damon wayans","dan aykroyd","dan marino","dan quayle","dan rather","dana carvey","dane cook","danica patrick","daniel craig","daniel dae kim","daniel day lewis","daniel radcliffe","danielle steel","danny bonaduce","danny devito","danny glover","danny trejo","darius rucker","daryl hannah","dave chappelle","dave grohl","dave ramsey","david attenborough","david beckham","david crosby","david duchovny","david h koch","david hasselhoff","david hyde pierce","david lee roth","david letterman","david ortiz","david petraeus","david schwimmer","david spade","dean cain","dean koontz","dean mcdermott","debbie gibson","debbie harry","debra messing","debra winger","dee snider","deion sanders","delta burke","demi lovato","demi moore","denise richards","dennis miller","dennis quaid","dennis rodman","denzel washington","derek jeter","diana ross","diane keaton","diane lane","diane sawyer","dianne feinstein","dick butkus","dick cavett","dick cheney","dick van dyke","dionne warwick","dj khaled","dolly parton","dolph lundgren","don cheadle","don henley","don imus","don johnson","don lemon","don mclean","donald rumsfeld","donald sutherland","donald trump","donald trump","donnie wahlberg","donny osmond","doris day","dr dre","drake","drew barrymore","drew brees","drew carey","drew scott","duchess of sussex","duke of sussex","dustin hoffman","dwayne johnson","dwight yoakam","dwyane wade","dylan mcdermott","ed asner","ed harris","ed helms","ed o neill","ed sheeran","eddie murphy","eddie van halen","edward james olmos","edward norton","eli manning","elijah cummings","elijah wood","eliot spitzer","elisabeth hasselbeck","elisabeth moss","elisabeth shue","elizabeth banks","elizabeth cheney","elizabeth dole","elizabeth hurley","elizabeth olsen","elizabeth warren","elle fanning","elle macpherson","ellen burstyn","ellen degeneres","ellen page","elliot page","elliott gould","elon musk","elton john","elvis costello","emeril lagasse","emilio estevez","emily blunt","emily deschanel","emily watson","eminem","emma roberts","emma stone","emma thompson","emma watson","emmanuel macron","emmitt smith","emmylou harris","engelbert humperdinck","enrique iglesias","eric clapton","eric holder","eric roberts","erik estrada","ethan hawke","eugene levy","eva longoria","eva marie saint","eva mendes","evan rachel wood","evander holyfield","ewan mcgregor","faith hill","faye dunaway","felicity huffman","fergie","fiona apple","flavor flav","floyd mayweather","forest whitaker","fran drescher","fran tarkenton","frances mcdormand","francis ford coppola","frankie avalon","fred savage","g gordon liddy","gabriel iglesias","gabrielle giffords","gabrielle union","gal gadot","garth brooks","gary busey","gary oldman","gary sinise","gavin newsom","gayle king","geena davis","gena rowlands","gene hackman","gene simmons","george clinton","george clooney","george foreman","george lopez","george lucas","george soros","george stephanopoulos","george strait","george takei","george w bush","geraldo rivera","gerard butler","g\xe9rard depardieu","gillian anderson","gina rodriguez","gisele b\xfcndchen","glenn beck","glenn close","gloria estefan","gloria gaynor","goldie hawn","gordon lightfoot","gordon ramsay","greg abbott","greg kinnear","greg mathis","greta van susteren","guy fieri","guy ritchie","gwen stefani","gwyneth paltrow","hakeem jeffries","hal holbrook","haley joel osment","halle berry","hank aaron","hank williams","harrison ford","harry belafonte","harry connick","harry reid","harvey keitel","hayden christensen","hayden panettiere","heather locklear","hector elizondo","heidi fleiss","heidi klum","helen hunt","helen mirren","helena bonham carter","henry cavill","henry kissinger","henry winkler","herman cain","herschel walker","hilary duff","hilary swank","hillary clinton","hoda kotb","holly hunter","howard stern","howie long","howie mandel","huey lewis","hugh grant","hugh jackman","hugh laurie","hulk hogan","ian mckellen","ice t","idris elba","iggy azalea","iggy pop","ilhan omar","isaiah washington","ivanka trump","j k rowling","j k simmons","ja rule","jack black","jack hanna","jack nicholson","jack nicklaus","jack osbourne","jackie chan","jackson browne","jacqueline bisset","jada pinkett smith","jaden smith","jake gyllenhaal","james brolin","james caan","james cameron","james caviezel","james comey","james corden","james cromwell","james earl jones","james franco","james marsden","james patterson","james spader","james taylor","james woods","jamie foxx","jamie lee curtis","jamie oliver","jane curtin","jane fonda","jane goodall","jane lynch","jane pauley","jane seymour","janeane garofalo","janet jackson","janet yellen","jared kushner","jared leto","jason aldean","jason alexander","jason bateman","jason momoa","jason segel","jason statham","jason sudeikis","jay leno","jay rockefeller","jay z","jean claude van damme","jeanine pirro","jeb bush","jeff beck","jeff bezos","jeff bridges","jeff daniels","jeff dunham","jeff foxworthy","jeff goldblum","jeff gordon","jeff sessions","jenna bush hager","jenna elfman","jenna ortega","jennifer aniston","jennifer connelly","jennifer coolidge","jennifer garner","jennifer grey","jennifer hudson","jennifer jason leigh","jennifer lawrence","jennifer lopez","jennifer love hewitt","jenny mccarthy","jeremy irons","jeremy renner","jerry lee lewis","jerry o connell","jerry rice","jerry seinfeld","jerry springer","jerry stiller","jesse eisenberg","jesse jackson","jesse james","jesse watters","jessica alba","jessica biel","jessica chastain","jessica lange","jessica simpson","jet li","jill biden","jillian michaels","jim bakker","jim belushi","jim bob duggar","jim brown","jim carrey","jim parsons","jimmy buffett","jimmy carter","jimmy fallon","jimmy kimmel","jimmy page","jimmy smits","jimmy swaggart","joan baez","joan cusack","joan jett","joan lunden","joanne woodward","joaquin phoenix","jodie foster","joe biden","joe brown","joe jonas","joe lieberman","joe manchin","joe mantegna","joe montana","joe namath","joe pesci","joe rogan","joe walsh","joel mchale","joel osteen","joey fatone","john amos","john astin","john bolton","john c reilly","john carpenter","john cena","john cleese","john cusack","john edwards","john elway","john fogerty","john goodman","john grisham","john kerry","john krasinski","john legend","john leguizamo","john lithgow","john madden","john malkovich","john mayer","john mcenroe","john mellencamp","john oliver","john qui\xf1ones","john ratzenberger","john roberts","john stamos","john tesh","john travolta","john turturro","johnny depp","johnny knoxville","johnny mathis","jon bon jovi","jon favreau","jon gosselin","jon hamm","jon lovitz","jon stewart","jon voight","jonah hill","joni mitchell","jordan peele","jordin sparks","jos\xe9 canseco","joseph gordon levitt","joseph p kennedy","josh brolin","josh duhamel","josh groban","josh hartnett","joy behar","judd hirsch","jude law","judi dench","judith light","judy sheindlin","julia louis dreyfus","julia roberts","julia stiles","julian castro","julianna margulies","julianne hough","julianne moore","julie andrews","julie chen","julie christie","juliette lewis","julio c\xe9sar ch\xe1vez","julio iglesias","julius erving","justin bieber","justin timberlake","justin trudeau","k d lang","kaley cuoco","kamala harris","kanye west","kareem abdul jabbar","karl malone","karl rove","kate beckinsale","kate bosworth","kate gosselin","kate hudson","kate jackson","kate middleton","kate upton","kate winslet","katey sagal","katherine heigl","kathie lee gifford","kathleen turner","kathy bates","kathy griffin","kathy ireland","katie couric","katie holmes","katy perry","keanu reeves","keegan michael key","keenen ivory wayans","keira knightley","keith olbermann","keith richards","keith urban","keke palmer","kelly clarkson","kelly osbourne","kelly ripa","kellyanne conway","kelsey grammer","ken griffey","ken starr","kendall jenner","kendrick lamar","kenny chesney","kenny g","kenny loggins","keri russell","kerry washington","kesha","kevin bacon","kevin costner","kevin durant","kevin hart","kevin james","kevin kline","kevin mccarthy","kevin smith","kevin spacey","khloe kardashian","kid rock","kiefer sutherland","kim basinger","kim cattrall","kim kardashian","kim novak","king charles","kirk cameron","kirk douglas","kirsten dunst","kirsten gillibrand","kirstie alley","kobe bryant","kourtney kardashian","kris jenner","kris kristofferson","kristen bell","kristen stewart","kristen wiig","kristi yamaguchi","kurt russell","kylie jenner","kyra sedgwick","lady gaga","lamar odom","lana del rey","lance armstrong","larry bird","larry david","larry holmes","larry king","larry the cable guy","laura bush","laura dern","laura ingraham","lauren graham","lauren hutton","laurence fishburne","laurie metcalf","lauryn hill","lea thompson","leah remini","leann rimes","lebron james","lee ann womack","leeza gibbons","lena dunham","lenny kravitz","leonardo dicaprio","lester holt","levar burton","liam hemsworth","liam neeson","liev schreiber","lil jon","lil kim","lil wayne","lily tomlin","linda hamilton","linda ronstadt","lindsay lohan","lindsey graham","lionel messi","lionel richie","lisa kudrow","lisa ling","lisa marie presley","little richard","liv tyler","liza minnelli","ll cool j","loni anderson","lorde","loretta lynch","loretta lynn","lou diamond phillips","lou dobbs","lou ferrigno","louie anderson","louis ck","louis gossett","lucy liu","ludacris","luke bryan","luke perry","luke wilson","lyle lovett","lynda carter","m night shyamalan","macaulay culkin","machine gun kelly","macy gray","madeleine albright","maggie smith","magic johnson","malcolm jamal warner","malcolm mcdowell","mandy moore","manny pacqui\xe1o","marc anthony","marco rubio","margot robbie","maria sharapova","mariah carey","marie osmond","marilyn manson","mario l\xf3pez","marisa tomei","mariska hargitay","mark cuban","mark hamill","mark harmon","mark mcgwire","mark ruffalo","mark wahlberg","mark zuckerberg","marlo thomas","marlon wayans","martha stewart","martin lawrence","martin scorsese","martin sheen","martin short","martina mcbride","martina navratilova","mary chapin carpenter","mary higgins clark","mary j blige","mary kate olsen","mary louise parker","mary steenburgen","matt damon","matt dillon","matt lauer","matt leblanc","matthew broderick","matthew mcconaughey","matthew perry","maury povich","maxine waters","maya rudolph","mayim bialik","meg ryan","megan fox","megan rapinoe","meghan markle","meghan mccain","meghan trainor","megyn kelly","mehmet oz","mel brooks","mel gibson","melania trump","melanie griffith","melissa etheridge","melissa joan hart","melissa mccarthy","meredith vieira","meryl streep","mia farrow","michael b jordan","michael bloomberg","michael bolton","michael bubl\xe9","michael c hall","michael caine","michael cera","michael chiklis","michael douglas","michael dukakis","michael flynn","michael irvin","michael j fox","michael jordan","michael keaton","michael moore","michael pe\xf1a","michael phelps","michael sheen","michael strahan","michael vick","michelle kwan","michelle obama","michelle pfeiffer","michelle rodriguez","michelle williams","michelle yeoh","mick jagger","mickey rourke","mike ditka","mike epps","mike huckabee","mike myers","mike pence","mike pompeo","mike rowe","mike sorrentino","mike tyson","mila kunis","miley cyrus","milla jovovich","millie bobby brown","mindy kaling","minnie driver","mira sorvino","miranda lambert","missy elliott","mitch mcconnell","mitt romney","molly ringwald","molly shannon","montel williams","morgan fairchild","morgan freeman","mr t","nancy grace","nancy pelosi","nancy sinatra","naomi campbell","naomi judd","naomi watts","natalie portman","nathan lane","ned beatty","neil degrasse tyson","neil diamond","neil gorsuch","neil patrick harris","neil sedaka","neil young","nelly furtado","nelly","neve campbell","newt gingrich","nick cannon","nick jonas","nick lachey","nick nolte","nicki minaj","nicolas cage","nicole kidman","nicole polizzi","nicole richie","nikki haley","nolan ryan","nora roberts","norah jones","norah o donnell","octavia spencer","odell beckham","oliver north","oliver stone","olivia de havilland","olivia munn","olivia newton john","olivia wilde","olympia dukakis","omar epps","oprah winfrey","orlando bloom","oscar de la hoya","owen wilson","ozzy osbourne","pamela anderson","paris hilton","pat benatar","pat buchanan","pat roberts","pat robertson","pat sajak","patricia arquette","patrick dempsey","patrick duffy","patrick ewing","patrick kennedy","patrick mahomes","patrick stewart","patti labelle","patton oswalt","paul anka","paul giamatti","paul hogan","paul mccarthy","paul mccartney","paul reubens","paul rudd","paul ryan","paul simon","paula abdul","paula deen","paula zahn","penelope cruz","perez hilton","pete rose","pete townshend","peter dinklage","peter fonda","peter frampton","peter gabriel","peyton manning","pharrell williams","phil donahue","phil mcgraw","phil mickelson","phil robertson","phylicia rashad","pierce brosnan","piers morgan","pl\xe1cido domingo","pope benedict","pope francis","portia de rossi","post malone","prince harry","prince of wales","princess of wales","priyanka chopra","queen elizabeth","queen latifah","quincy jones","r kelly","rachael ray","rachel maddow","rachel mcadams","rachel weisz","rami malek","rand paul","randy jackson","randy newman","randy quaid","randy travis","raquel welch","rashida jones","rashida tlaib","raven symon\xe9","ray liotta","ray romano","ray stevens","reba mcentire","rebel wilson","reese witherspoon","reggie bush","reggie jackson","reggie miller","regina hall","regina king","regis philbin","rene russo","renee zellweger","rhea perlman","ric flair","richard belzer","richard branson","richard dean anderson","richard dreyfuss","richard gere","richard petty","rick moranis","rick perry","rick santorum","rick scott","rick springfield","ricki lake","ricky gervais","ricky martin","ricky skaggs","rihanna","ringo starr","rob gronkowski","rob lowe","rob reiner","rob schneider","rob zombie","robert de niro","robert downey","robert duvall","robert patrick","robert pattinson","robert plant","robert redford","robert wagner","roberta flack","robin roberts","robin thicke","robin wright","rod stewart","roger clemens","roger federer","roger staubach","roman polański","ron desantis","ron howard","ron paul","ron perlman","ron reagan","ronda rousey","ronnie milsap","rosalynn carter","rosanne cash","rosario dawson","rosie o donnell","rosie perez","rowan atkinson","rudy giuliani","rupaul","rupert grint","rupert murdoch","rush limbaugh","russell brand","russell crowe","ruth bader ginsburg","ryan gosling","ryan reynolds","ryan seacrest","sacha baron cohen","sally field","sally jessy rapha\xebl","sally struthers","salma hayek","sam donaldson","sam elliott","sam neill","sam smith","sam waterston","sammy hagar","sammy sosa","samuel alito","samuel l jackson","sandra bullock","sandra day o connor","sandra oh","sandy koufax","sanjay gupta","sara gilbert","sarah huckabee sanders","sarah jessica parker","sarah mclachlan","sarah michelle gellar","sarah palin","sarah paulson","sarah silverman","savannah guthrie","scarlett johansson","scott baio","scott bakula","scott eastwood","scott hamilton","scottie pippen","sean astin","sean connery","sean hannity","sean penn","sean spicer","sebastian bach","selena gomez","selma blair","serena williams","seth green","seth macfarlane","seth meyers","seth rogen","shakira","shania twain","shaquille oneal","sharon osbourne","sharon stone","shaun white","shawn mendes","shawn wayans","sheena easton","shelley long","shemar moore","shepard smith","sheryl crow","shia labeouf","shirley jones","shirley maclaine","sidney poitier","sigourney weaver","simon cowell","sinbad","sinead o connor","sissy spacek","sofia coppola","sof\xeda vergara","sonia sotomayor","sophia loren","sophie turner","soulja boy","spike lee","stanley tucci","star jones","stefanie graf","stephen bannon","stephen colbert","stephen curry","stephen king","steve austin","steve buscemi","steve carell","steve forbes","steve martin","steve perry","steve wilkos","steve winwood","steven seagal","steven spielberg","steven tyler","stevie wonder","stockard channing","sugar ray leonard","susan boyle","susan collins","susan lucci","susan rice","susan sarandon","suzanne somers","suze orman","sylvester stallone","t pain","tanya tucker","tara reid","tatum oneal","taye diggs","taylor lautner","taylor swift","t\xe9a leoni","ted cruz","ted danson","ted koppel","ted nugent","teri hatcher","terrell owens","terrence howard","terry bradshaw","terry crews","the weeknd","tiffany haddish","tiger woods","tim allen","tim conway","tim curry","tim daly","tim mcgraw","tim robbins","tim roth","tim scott","tim tebow","timbaland","timothy dalton","timothy hutton","tina fey","tipper gore","tobey maguire","toby keith","tom arnold","tom berenger","tom bergeron","tom brady","tom brokaw","tom cruise","tom hanks","tom hardy","tom hiddleston","tom holland","tom jones","tom selleck","tom sizemore","tom skerritt","tommy chong","tommy lee jones","toni braxton","tony bennett","tony blair","tony danza","tony orlando","tony robbins","tony romo","tony shalhoub","tonya harding","tori spelling","trace adkins","tracey ullman","tracy morgan","trevor noah","trisha yearwood","troy aikman","tucker carlson","tulsi gabbard","ty pennington","tyler perry","tyra banks","uma thurman","usain bolt","usher","val kilmer","valerie bertinelli","valerie harper","vanessa hudgens","vanessa l williams","vanessa redgrave","vanilla ice","vanna white","venus williams","viggo mortensen","vin diesel","vince gill","vince mcmahon","vince vaughn","vincent d onofrio","viola davis","vivica a fox","vladimir putin","walter mondale","wanda sykes","warren beatty","warren buffett","wayne brady","wayne gretzky","wayne knight","weird al yankovic","wendy williams","wesley snipes","whoopi goldberg","wilford brimley","will arnett","will ferrell","will smith","willard scott","willem dafoe","william h macy","william hurt","william shatner","willie mays","willie nelson","winona ryder","wolf blitzer","wolfgang puck","woody allen","woody harrelson","wynonna judd","xi jinping","yo yo ma","yoko ono","yusuf islam","zac efron","zach braff","zach galifianakis","ziggy marley","zoe kravitz","zoe saldana","zooey deschanel"]'),f=JSON.parse('{"cum":["cum","semen","spunk","jizz","precum"],"penis":["dick","cock","penis","erection","uncircumcised","circumcised","testicles","cockslip","horsecock"],"vagina":["vagina","pussy","cunt","labia","vulva","clitoris","cervix","hymen","uterus"],"swimsuit":["swimsuit"],"adult toys":["dildo"],"bikini":["bikini"],"underwear":["panties","undies","underwear","thong","briefs","bondage outfit"],"anus":["anus","rectum","butt hole","ass hole"],"sexual activity":["pov missionary","vaginal penetration","vaginal fluid","pussy juice","blow job","hand job","tit job","tit fuck","fellatio","paizuri","intercourse","gangbang","ejaculation","ejaculating","penetrated","anal"],"breast press":["breast press"],"sexual situations":["ahegao","dildo","bondage outfit","bondage","condom"],"nudity":["genitalia","naked","nude","nudism"],"partial nudity":["topless"],"furry":["anthro","fursuit","e621","furaffinity","zoophilia"],"woman":["woman","women","1girl"],"man":["man","men","1boy"],"vore":["vore belly","enormous belly","hyper belly","giant belly","titanic belly","huge belly"]}');let p=[...new Set([...a,...s,...l])],h=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),m="\\%|\\~|\\\\$|\\.|-|\\(|\\)|\\[|\\]|\\{|\\}|:|\\|",g=e=>RegExp("(^|\\s|,|".concat(m,")").concat(h(e),"(\\s|,|$|").concat(m,")"),"mi"),v=c.map(e=>({word:e,regex:g(e)})),y=o.map(e=>({word:e,regex:g(e)})),b=(e,t)=>{if(!e)return{blockedFor:[],success:!0};let r=(0,i.b)(e.prompt);if(t){let{found:e,age:t}=C(r);if(e)return{blockedFor:["".concat(t," year old")],success:!1}}let n=(t?y:v).filter(t=>{let{regex:n}=t;return(null==e?void 0:e.prompt)&&n.test(r)}).map(e=>e.word);return{blockedFor:n,success:!n.length}},x=(e,t)=>{e=(0,i.b)(e),t=(0,i.b)(t);let{found:r,age:n}=C(e);if(r)return{blockedFor:["".concat(n," year old")],success:!1};let o=R({prompt:e,negativePrompt:t});if("minor"===o)return{blockedFor:["Inappropriate minor content"],success:!1};if("poi"===o)return{blockedFor:["Inappropriate real person content"],success:!1};for(let{word:t,regex:r}of y)if(r.test(e))return{blockedFor:[t],success:!1};return{blockedFor:[],success:!0}};a.map(e=>I(e)),l.map(e=>I(e));let w=[...new Set([...a,...l])].map(e=>I(e));function S(e){if(!e)return!1;let t=(0,i.b)(e);for(let e of w)if(e.test(t))return!0;return!1}let k=[{age:17,matches:["seven{teen}","sevn{teen}","sevem{teen}","seve{teen}","7{teen}","17"]},{age:16,matches:["six{teen}","sicks{teen}","sixe{teen}","6{teen}","16"]},{age:15,matches:["fif{teen}","fiv{teen}","five{teen}","fife{teen}","fivve{teen}","5{teen}","15"]},{age:14,matches:["four{teen}","for{teen}","fore{teen}","foure{teen}","4{teen}","14"]},{age:13,matches:["thir{teen}","3{teen}","ther{teen}","three{teen}","tree{teen}","thee{teen}","thre{teen}","thri{teen}","3{teen}","13"]},{age:12,matches:["twelve","twelv","twelf","2{teen}","twel","12"]},{age:11,matches:["eleven","eleve","elevn","1{teen}","elvn","11"]},{age:10,matches:["ten","tenn","tene","10"]},{age:9,matches:["nine","nien","nein","niene","9"]},{age:8,matches:["eight","eigt","eigh","8"]},{age:7,matches:["seven","sevn","sevem","seve","7"]},{age:6,matches:["six","sicks","sixe","6"]},{age:5,matches:["five","fiv","fife","fivve","5"]},{age:4,matches:["four","for","fore","foure","4"]},{age:3,matches:["three","thee","thre","thri","3"]},{age:2,matches:["two","2"]},{age:1,matches:["one","uno","1"]}],j={age:[],teen:["teen","ten","tein","tien","tn"],years:["y","yr","yrs","years","year","anos"],old:["o","old"]};for(let e of k){let t=new Set;for(let r of e.matches)if(r.includes("{teen}")){let e=r.replace("{teen}","").trim();for(let r of j.teen)t.add(e+r),t.add(e+" "+r)}else t.add(r);e.matches=Array.from(t)}j.age=k.flatMap(e=>e.matches);let E=Object.entries(j).reduce((e,t)=>{let[r,n]=t;return e[r]=n.join("|"),e},{}),O=["aged {age}","age {age}","age of {age}","{age} age","{age} {years} {old}","{age} {years}","{age}th birthday"].map(e=>{let t=e;for(let[e,r]of Object.entries(E))t=t.replace("{".concat(e,"}"),"(?<".concat(e,">").concat(r,")"));return RegExp(t="([^a-zA-Z0-9]+|^)0*"+(t=t.replace(/\s+/g,"[^a-zA-Z0-9]*"))+"([^a-zA-Z0-9]+|$)","i")});function C(e){let t;if(!e)return{found:!1,age:void 0};let r=!1;for(let a of O)if(a.test(e)){var n,i,o;let s=a.exec(e);r=!0;let l=null==s?void 0:null===(i=s.groups)||void 0===i?void 0:null===(n=i.age)||void 0===n?void 0:n.toLowerCase();t=null===(o=k.find(e=>e.matches.includes(null!=l?l:"")))||void 0===o?void 0:o.age;break}return{found:r,age:t}}function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e;return r=r.replace(/\s+/g,"[^a-zA-Z0-9]*"),e.includes("[")||(r=r.replace(/i/g,"[i|l|1]").replace(/o/g,"[o|0]").replace(/s/g,"[s|z]").replace(/e/g,"[e|3]")),t&&(r+="[s|z]*"),RegExp(r="([^a-zA-Z0-9]+|^)"+r+"([^a-zA-Z0-9]+|$)","i")}function P(e,t){let r=e.map(e=>({regex:I(e,null==t?void 0:t.pluralize),word:e}));function i(e){return(e=e.trim(),null==t?void 0:t.preprocessor)?t.preprocessor(e):e}return{inPrompt:function(e,n){for(let{regex:o,word:a}of(e=i(e),null!=n||(n=null==t?void 0:t.matcher),r)){if(n){let t=n(e,{regex:o,word:a});if(!1!==t)return t;continue}if(o.test(e))return a}return!1},highlight:function(e,t){let o=i(e);for(let{regex:i}of r)if(i.test(o)){let r=i.exec(o);if(!(0,n.RN)(null==r?void 0:r[0]))continue;e=function(e,t,r){if(!t||void 0===t.index)return e;let i=(0,n.RN)(t[0]);return e.substring(0,t.index)+e.substring(t.index).replace(i,r(i))}(o,r,t)}return e}}}let A=u.uQ.flatMap(e=>u.Dv.map(t=>t+"([\\s|\\w]*|[^\\w]+)"+e)),T={nsfw:P(p),young:{nouns:P(u.zy.concat(A),{pluralize:!0}),negativeNouns:P(u.M5,{pluralize:!0})},poi:P(d,{preprocessor:e=>e.replace(/[^\w\s\|\:\[\]]/g,"")}),tags:Object.entries(f).map(e=>{let[t,r]=e;return{tag:t,words:P(r)}})};function z(e){if(!e)return!1;let t=new Set;for(let r of T.tags)r.words.inPrompt(e)&&t.add(r.tag);return[...t]}function N(e){return!!e&&T.nsfw.inPrompt(e)}function R(e,t){var r,n;return!!(e.prompt&&(e.prompt=e.prompt.replace(/'|\.|\-/g,""),t||N(e.prompt)))&&(!function(e){let t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!e&&(r||(t=(e,t)=>!function(e,t){let{regex:r}=t,n=e.match(r);return!!n&&n.some(t=>{let r=e.lastIndexOf("[",e.indexOf(t)),n=e.indexOf("]",e.indexOf(t));if(!(-1!==r&&-1!==n&&re.trim().length>0).length>1,o=e.slice(r,n).split(":").filter(e=>e.trim().length>0).length>2;return i||o})}(e,t)&&!!t.regex.test(e)&&t.word),T.poi.inPrompt(e,t))}(e.prompt)?(r=e.prompt,n=e.negativePrompt,!!(r&&(C(r).found||T.young.nouns.inPrompt(r)||n&&T.young.negativeNouns.inPrompt(n)))&&"minor"):"poi")}let _={positive:[{color:"#7950F2",fn:M},{color:"#339AF0",fn:T.young.nouns.highlight},{color:"#38d9a9",fn:T.poi.highlight},{color:"#F03E3E",fn:function(e,t){for(let{regex:r}of y)if(r.test(e)){let i=r.exec(e),o=(0,n.RN)(null==i?void 0:i[0]);if(!o)continue;e=e.replace(o,t(o))}return e}},{color:"#FD7E14",fn:T.nsfw.highlight}],negative:[{color:"#339AF0",fn:T.young.negativeNouns.highlight}]};function M(e,t){for(let a of O)if(a.test(e)){var r,i,o;let s=a.exec(e),l=null==s?void 0:null===(i=s.groups)||void 0===i?void 0:null===(r=i.age)||void 0===r?void 0:r.toLowerCase();if(!(null===(o=k.find(e=>e.matches.includes(null!=l?l:"")))||void 0===o?void 0:o.age))continue;let c=(0,n.RN)(null==s?void 0:s[0]);if(!c)continue;e=e.replace(c,t(c))}return e}function D(e){let{prompt:t,negativePrompt:r}=e;if(!t)return t;for(let{fn:e,color:r}of _.positive)t=e(t,e=>'').concat(e,""));if(r){for(let{fn:e,color:t}of _.negative)r=e(r,e=>'').concat(e,""));t+='

Negative Prompt:
'.concat(r)}return t}function L(e){let{prompt:t,negativePrompt:r}=e;if(!t)return{};for(let{word:e}of(t=(0,i.b)(t),r=(0,i.b)(r),y))t=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=I(t).exec(e);if(!i||void 0===i.index)return e;let o=(0,n.RN)(i[0]);return e.substring(0,i.index)+e.substring(i.index).replace(o,r)}(t,e);return N(t)&&(t=M(t,()=>""),t=T.young.nouns.highlight(t,()=>""),r&&(r=T.young.negativeNouns.highlight(null!=r?r:"",()=>"")),t=T.poi.highlight(t,()=>"")),{prompt:t,negativePrompt:r}}},8449:function(e,t,r){"use strict";r.d(t,{qK:function(){return tI},m7:function(){return tA},sd:function(){return tC},b4:function(){return tP}});var n=r(48764).lW;function i(e,t,r){let n=[];for(let i=0;iString.fromCharCode(e)).join("")}function a(){for(let e=1;e(n||(n=!0,Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:r.apply(e),writable:!0})),e[t]),configurable:!0,enumerable:!0})}function l(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(e,t)=>e+String.fromCharCode(t),"")):void 0!==n?(n.from,n.from(e).toString("base64")):void 0}class c{constructor(e){if("object"!=typeof e||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE)throw Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}var u={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_WEBP:!0};function d(e){return e.map(e=>String.fromCharCode(e)).join("")}function f(e){if(e.length>=8){let t=d(e.slice(0,8));if("ASCII\0\0\0"===t)return d(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function p(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var h=function(e,t){if(18761===e.getUint16(t))return 18761;if(19789===e.getUint16(t))return 19789;throw Error("Illegal byte order value. Faulty image.")},m={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){let t=18761===e.getUint16(0);return 42===e.getUint16(2,t)}(e)},findTiffOffsets:function(){return u.USE_EXIF?{hasAppMarkers:!0,tiffHeaderOffset:0}:{}}},g={isJpegFile:function(e){return!!e&&e.byteLength>=2&&65496===e.getUint16(0)},findJpegOffsets:function(e){let t,r,n,o,a,s,l,c,d,f=2;for(;f+4+5<=e.byteLength;){var p,h,m,g,E,O,C;if(u.USE_FILE&&(p=f,65472===e.getUint16(p)))r=f+2;else if(u.USE_FILE&&(h=f,65474===e.getUint16(h)))n=f+2;else if(u.USE_JFIF&&function(e,t){let r=w.length;return 65504===e.getUint16(t)&&"JFIF"===i(e,t+4,r)&&0===e.getUint8(t+4+r)}(e,f))t=e.getUint16(f+2),o=f+2;else if(u.USE_EXIF&&function(e,t){let r=w.length;return 65505===e.getUint16(t)&&i(e,t+4,r)===w&&0===e.getUint8(t+4+r)}(e,f))t=e.getUint16(f+2),a=f+10;else{if(u.USE_XMP&&(g=e,E=f,65505===g.getUint16(E)&&i(g,E+4,S.length)===S))l||(l=[]),t=e.getUint16(f+2),l.push({dataOffset:f+33,length:t-31});else{if(u.USE_XMP&&(O=e,C=f,65505===O.getUint16(C)&&i(O,C+4,k.length)===k))l||(l=[]),t=e.getUint16(f+2),l.push({dataOffset:f+79,length:t-77});else if(u.USE_IPTC&&function(e,t){let r=j.length;return 65517===e.getUint16(t)&&i(e,t+4,r)===j&&0===e.getUint8(t+4+r)}(e,f))t=e.getUint16(f+2),s=f+18;else if(u.USE_ICC&&function(e,t){let r=v.length;return 65506===e.getUint16(t)&&i(e,t+4,r)===v}(e,f)){t=e.getUint16(f+2);let r=f+18,n=t-16,i=e.getUint8(f+y),o=e.getUint8(f+b);c||(c=[]),c.push({offset:r,length:n,chunkNumber:i,chunksTotal:o})}else if(u.USE_MPF&&function(e,t){let r=x.length;return 65506===e.getUint16(t)&&i(e,t+4,r)===x}(e,f))t=e.getUint16(f+2),d=f+8;else if(function(e,t){let r=e.getUint16(t);return r>=65504&&r<=65519||65534===r||65472===r||65474===r||65476===r||65499===r||65501===r||65498===r}(e,f))t=e.getUint16(f+2);else{if(m=f,65535===e.getUint16(m)){f++;continue}break}}}f+=2+t}return{hasAppMarkers:f>2,fileDataOffset:r||n,jfifDataOffset:o,tiffHeaderOffset:a,iptcDataOffset:s,xmpChunks:l,iccChunks:c,mpfDataOffset:d}}};let v="ICC_PROFILE\0",y=4+v.length,b=y+1,x="MPF\0",w="Exif",S="http://ns.adobe.com/xap/1.0/\0",k="http://ns.adobe.com/xmp/extension/\0",j="Photoshop 3.0";var E={isPngFile:function(e){return!!e&&i(e,0,O.length)===O},findPngOffsets:function(e){let t={hasAppMarkers:!1},r=O.length;for(;r+4+4<=e.byteLength;){if(u.USE_PNG_FILE&&"IHDR"===i(e,r+4,4))t.hasAppMarkers=!0,t.pngHeaderOffset=r+C;else{var n,o;if(u.USE_XMP&&"iTXt"===i(n=e,(o=r)+4,4)&&i(n,o+C,I.length)===I){let n=function(e,t){t+=C+I.length+1+1;let r=0;for(;r<2&&t=8&&"meta"===i(e,t+4,4))return{offset:t,length:r};t+=r}return{offset:void 0,length:0}}(e);if(void 0===t)return{hasAppMarkers:!1};let n=Math.min(t+r,e.byteLength),{exifItemOffset:o,ilocOffset:a,colrOffset:s}=function(e,t,r){let n={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};for(;t+4<=r&&(!n.ilocOffset||!n.exifItemOffset||!n.colrOffset);){let r=i(e,t,4);u.USE_EXIF&&"iloc"===r?n.ilocOffset=t:u.USE_EXIF&&"Exif"===r?n.exifItemOffset=t+-4:u.USE_ICC&&"colr"===r&&(n.colrOffset=t+-4),t++}return n}(e,t,n),l=function(e,t,r,n){if(!r||!t||t+2>n)return;let i=e.getUint16(t);for(r+=12;r+16<=n;){if(e.getUint16(r)===i){let t=e.getUint32(r+8);if(t+4<=e.byteLength){let r=e.getUint32(t)+4;return t+r}}r+=16}}(e,o,a,n),c=function(e,t,r){if(!t||t+12>r)return;let n=i(e,t+8,4);if("prof"===n||"rICC"===n)return[{offset:t+12,length:N(e,t)-12,chunkNumber:1,chunksTotal:1}]}(e,s,n);return{hasAppMarkers:void 0!==l||void 0!==c,tiffHeaderOffset:l,iccChunks:c}}return{hasAppMarkers:!1}}};function N(e,t){let r=e.getUint32(t);return 0===r?e.byteLength-t:1===r&&0===e.getUint32(t+8)?e.getUint32(t+12):r}var R={isWebpFile:function(e){let t="RIFF",r="WEBP";return!!e&&i(e,0,t.length)===t&&i(e,8,r.length)===r},findOffsets:function(e){let t,r,n;let o="Exif\0\0",a=12,s=!1;for(;a+8String.fromCharCode(e))},getByteAt:F,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,r){return e.getUint16(t,18761===r)},getLongAt:U,getRationalAt:function(e,t,r){return[U(e,t,r),U(e,t+4,r)]},getUndefinedAt:function(e,t){return F(e,t)},getSlongAt:B,getSrationalAt:function(e,t,r){return[B(e,t,r),B(e,t+4,r)]},getIfdPointerAt:function(e,t,r){return U(e,t,r)},typeSizes:M,tagTypes:D,getTypeSize:function(e){if(void 0===D[e])throw Error("No such type found.");return M[D[e]]}};function F(e,t){return e.getUint8(t)}function U(e,t,r){return e.getUint32(t,18761===r)}function B(e,t,r){return e.getInt32(t,18761===r)}var H={ApertureValue:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2),ColorSpace:e=>1===e?"sRGB":65535===e?"Uncalibrated":"Unknown",ComponentsConfiguration:e=>e.map(e=>49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0).join(""),Contrast:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",CustomRendered:e=>0===e?"Normal process":1===e?"Custom process":"Unknown",ExposureMode:e=>0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown",ExposureProgram(e){if(0===e)return"Undefined";if(1===e)return"Manual";if(2===e)return"Normal program";if(3===e)return"Aperture priority";if(4===e)return"Shutter priority";if(5===e)return"Creative program";if(6===e)return"Action program";else if(7===e)return"Portrait mode";else if(8===e)return"Landscape mode";else if(9===e)return"Bulb";return"Unknown"},ExposureTime:e=>e[0]>=e[1]?`${Math.round(e[0]/e[1])}`:0!==e[0]?`1/${Math.round(e[1]/e[0])}`:`0/${e[1]}`,FNumber:e=>`f/${e[0]/e[1]}`,FocalLength:e=>e[0]/e[1]+" mm",FocalPlaneResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",LightSource:e=>{if(1===e)return"Daylight";if(2===e)return"Fluorescent";if(3===e)return"Tungsten (incandescent light)";if(4===e)return"Flash";if(9===e)return"Fine weather";if(10===e)return"Cloudy weather";if(11===e)return"Shade";else if(12===e)return"Daylight fluorescent (D 5700 – 7100K)";else if(13===e)return"Day white fluorescent (N 4600 – 5400K)";else if(14===e)return"Cool white fluorescent (W 3900 – 4500K)";else if(15===e)return"White fluorescent (WW 3200 – 3700K)";else if(17===e)return"Standard light A";else if(18===e)return"Standard light B";else if(19===e)return"Standard light C";else if(20===e)return"D55";else if(21===e)return"D65";else if(22===e)return"D75";else if(23===e)return"D50";else if(24===e)return"ISO studio tungsten";else if(255===e)return"Other light source";return"Unknown"},MeteringMode(e){if(1===e)return"Average";if(2===e)return"CenterWeightedAverage";if(3===e)return"Spot";if(4===e)return"MultiSpot";if(5===e)return"Pattern";if(6===e)return"Partial";if(255===e)return"Other";return"Unknown"},ResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",Saturation:e=>0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown",SceneCaptureType:e=>0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown",Sharpness:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",ShutterSpeedValue(e){let t=Math.pow(2,e[0]/e[1]);return t<=1?`${Math.round(1/t)}`:`1/${Math.round(t)}`},WhiteBalance:e=>0===e?"Auto white balance":1===e?"Manual white balance":"Unknown",XResolution:e=>""+Math.round(e[0]/e[1]),YResolution:e=>""+Math.round(e[0]/e[1])};let Z=a({},{11:"ProcessingSoftware",254:{name:"SubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[e]||"Unknown"},255:{name:"OldSubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[e]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:e=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[e]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:e=>({1:"Normal",2:"Reversed"})[e]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:e=>1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:H.XResolution},283:{name:"YResolution",description:H.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:e=>""+Math.round(e[0]/e[1])},287:{name:"YPosition",description:e=>""+Math.round(e[0]/e[1])},290:{name:"GrayResponseUnit",description:e=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[e]||"Unknown"},296:{name:"ResolutionUnit",description:H.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:e=>e.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:e=>e.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:e=>({1:"CMYK",2:"Not CMYK"})[e]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:e=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[e]||"Unknown"},339:{name:"SampleFormat",description:e=>{let t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map(e=>t[e]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:e=>e.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:e=>1===e?"centered":2===e?"co-sited":"undefined "+e},532:{name:"ReferenceBlackWhite",description:e=>e.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:e=>e.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:e=>({0:"Unsafe",1:"Safe"})[e]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:H.LightSource},50779:{name:"CalibrationIlluminant2",description:H.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:e=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[e]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:e=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[e]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:e=>({0:"Linear",1:"sRGB"})[e]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:e=>({0:"Linear",1:"sRGB"})[e]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:e=>({0:"Auto",1:"None"})[e]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"},{33434:{name:"ExposureTime",description:H.ExposureTime},33437:{name:"FNumber",description:H.FNumber},34850:{name:"ExposureProgram",description:H.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:e=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[e]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:e=>d(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:H.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:H.ShutterSpeedValue},37378:{name:"ApertureValue",description:H.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},37382:{name:"SubjectDistance",description:e=>e[0]/e[1]+" m"},37383:{name:"MeteringMode",description:H.MeteringMode},37384:{name:"LightSource",description:H.LightSource},37385:{name:"Flash",description:e=>{if(0===e)return"Flash did not fire";if(1===e)return"Flash fired";if(5===e)return"Strobe return light not detected";if(7===e)return"Strobe return light detected";if(9===e)return"Flash fired, compulsory flash mode";if(13===e)return"Flash fired, compulsory flash mode, return light not detected";if(15===e)return"Flash fired, compulsory flash mode, return light detected";else if(16===e)return"Flash did not fire, compulsory flash mode";else if(24===e)return"Flash did not fire, auto mode";else if(25===e)return"Flash fired, auto mode";else if(29===e)return"Flash fired, auto mode, return light not detected";else if(31===e)return"Flash fired, auto mode, return light detected";else if(32===e)return"No flash function";else if(65===e)return"Flash fired, red-eye reduction mode";else if(69===e)return"Flash fired, red-eye reduction mode, return light not detected";else if(71===e)return"Flash fired, red-eye reduction mode, return light detected";else if(73===e)return"Flash fired, compulsory flash mode, red-eye reduction mode";else if(77===e)return"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected";else if(79===e)return"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected";else if(89===e)return"Flash fired, auto mode, red-eye reduction mode";else if(93===e)return"Flash fired, auto mode, return light not detected, red-eye reduction mode";else if(95===e)return"Flash fired, auto mode, return light detected, red-eye reduction mode";return"Unknown"}},37386:{name:"FocalLength",description:H.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:e=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[e]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:e=>2===e.length?`Location; X: ${e[0]}, Y: ${e[1]}`:3===e.length?`Circle; X: ${e[0]}, Y: ${e[1]}, diameter: ${e[2]}`:4===e.length?`Rectangle; X: ${e[0]}, Y: ${e[1]}, width: ${e[2]}, height: ${e[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:f},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37888:{name:"AmbientTemperature",description:e=>e[0]/e[1]+" \xb0C"},37889:{name:"Humidity",description:e=>e[0]/e[1]+" %"},37890:{name:"Pressure",description:e=>e[0]/e[1]+" hPa"},37891:{name:"WaterDepth",description:e=>e[0]/e[1]+" m"},37892:{name:"Acceleration",description:e=>e[0]/e[1]+" mGal"},37893:{name:"CameraElevationAngle",description:e=>e[0]/e[1]+" \xb0"},40960:{name:"FlashpixVersion",description:e=>e.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:H.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:H.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([e,t])=>`X: ${e}, Y: ${t}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:e=>{if(1===e)return"Undefined";if(2===e)return"One-chip color area sensor";if(3===e)return"Two-chip color area sensor";if(4===e)return"Three-chip color area sensor";if(5===e)return"Color sequential area sensor";if(7===e)return"Trilinear sensor";if(8===e)return"Color sequential linear sensor";return"Unknown"}},41728:{name:"FileSource",description:e=>3===e?"DSC":"Unknown"},41729:{name:"SceneType",description:e=>1===e?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:H.CustomRendered},41986:{name:"ExposureMode",description:H.ExposureMode},41987:{name:"WhiteBalance",description:H.WhiteBalance},41988:{name:"DigitalZoomRatio",description:e=>0===e[0]?"Digital zoom was not used":""+e[0]/e[1]},41989:{name:"FocalLengthIn35mmFilm",description:e=>0===e?"Unknown":e},41990:{name:"SceneCaptureType",description:H.SceneCaptureType},41991:{name:"GainControl",description:e=>0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"},41992:{name:"Contrast",description:H.Contrast},41993:{name:"Saturation",description:H.Saturation},41994:{name:"Sharpness",description:H.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:e=>1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:e=>{let t=`${e[0][0]/e[0][1]}-${e[1][0]/e[1][1]} mm`;return 0===e[3][1]?`${t} f/?`:`${t} f/${1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:e=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[e]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"});var W={"0th":Z,exif:Z,gps:{0:{name:"GPSVersionID",description:e=>2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:e=>{let t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:p},3:{name:"GPSLongitudeRef",description:e=>{let t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:p},5:{name:"GPSAltitudeRef",description:e=>0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:e=>e[0]/e[1]+" m"},7:{name:"GPSTimeStamp",description:e=>e.map(([e,t])=>{let r=e/t;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:e=>{let t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:e=>{let t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:e=>{let t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:e=>{let t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:e=>{let t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:e=>{let t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:e=>{let t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},23:{name:"GPSDestBearingRef",description:e=>{let t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:e=>{let t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:f},28:{name:"GPSAreaInformation",description:f},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},interoperability:{1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>d(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},mpf:u.USE_MPF?{45056:{name:"MPFVersion",description:e=>d(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"}:{}};let V="Exif IFD Pointer",$="GPS Info IFD Pointer",q="Interoperability IFD Pointer",G={1:L.getByteAt,2:L.getAsciiAt,3:L.getShortAt,4:L.getLongAt,5:L.getRationalAt,7:L.getUndefinedAt,9:L.getSlongAt,10:L.getSrationalAt,13:L.getIfdPointerAt};var K={read:function(e,t,r){var n,i,o;let s=h(e,t),l=Y(e,"0th",t,X(e,t,s),s,r);return void 0!==(o=l=void 0!==(i=l=void 0!==(n=l)[V]?a(n,Y(e,"exif",t,t+n[V].value,s,r)):n)[$]?a(i,Y(e,"gps",t,t+i[$].value,s,r)):i)[q]?a(o,Y(e,"interoperability",t,t+o[q].value,s,r)):o},readMpf:function(e,t,r){let n=h(e,t),i=Y(e,"mpf",t,X(e,t,n),n,r);return function(e,t,r,n){if(!r.MPEntry)return r;let i=[];for(let o=0;o>31&1,e>>30&1,e>>29&1],r=[];return t[0]&&r.push("Dependent Parent Image"),t[1]&&r.push("Dependent Child Image"),t[2]&&r.push("Representative Image"),{value:t,description:r.join(", ")||"None"}}(a),i[o].ImageFormat=function(e){let t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}(a),i[o].ImageType=function(e){let t=16777215&e;return{value:t,description:({196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"})[t]||"Unknown"}}(a);let c=J(r.MPEntry.value,16*o+4,L.getTypeSize("LONG"),n);i[o].ImageSize={value:c,description:""+c};let u=0===o?0:J(r.MPEntry.value,16*o+8,L.getTypeSize("LONG"),n)+t;i[o].ImageOffset={value:u,description:""+u};let d=J(r.MPEntry.value,16*o+12,L.getTypeSize("SHORT"),n);i[o].DependentImage1EntryNumber={value:d,description:""+d};let f=J(r.MPEntry.value,16*o+14,L.getTypeSize("SHORT"),n);i[o].DependentImage2EntryNumber={value:f,description:""+f},i[o].image=e.buffer.slice(u,u+c),s(i[o],"base64",function(){return l(this.image)})}return r.Images=i,r}(e,t,i,n)}};function X(e,t,r){return t+L.getLongAt(e,t+4,r)}function J(e,t,r,n){if(18761===n){let n=0;for(let i=0;ie.byteLength);a++){let a=function(e,t,r,n,i,o){let a;let s=L.getTypeSize("SHORT"),l=s+L.getTypeSize("SHORT"),c=l+L.getTypeSize("LONG"),u=L.getShortAt(e,n,i),d=L.getShortAt(e,n+s,i),f=L.getLongAt(e,n+l,i);if(void 0===L.typeSizes[d]||!o&&void 0===W[t][u])return;if(L.typeSizes[d]*f<=L.getTypeSize("LONG"))a=Q(e,n+c,d,f,i);else{let t=L.getLongAt(e,n+c,i);a=r+t+L.typeSizes[d]*f<=e.byteLength?Q(e,r+t,d,f,i,33723===u):""}d===L.tagTypes.ASCII&&(a=function(e){try{return e.map(e=>decodeURIComponent(escape(e)))}catch(t){return e}}(a=function(e){let t=[],r=0;for(let n=0;nr)return;let n=L.getByteAt(e,t+7);return{value:n,description:""+n}}(e,t,r);return{"Bits Per Sample":function(e,t,r){if(3>r)return;let n=L.getByteAt(e,t+2);return{value:n,description:""+n}}(e,t,r),"Image Height":function(e,t,r){if(5>r)return;let n=L.getShortAt(e,t+3);return{value:n,description:`${n}px`}}(e,t,r),"Image Width":function(e,t,r){if(7>r)return;let n=L.getShortAt(e,t+5);return{value:n,description:`${n}px`}}(e,t,r),"Color Components":n,Subsampling:n&&function(e,t,r,n){if(8+3*r>n)return;let i=[];for(let n=0;n1?function(e){let t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map(e=>t[e[0]]).join("")}(i)+function(e){let t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}(i):""}}(e,t,n.value,r)}}},er={read:function(e,t){let r=L.getShortAt(e,t),n=function(e,t,r){if(15>r)return;let n=L.getByteAt(e,t+14);return{value:n,description:`${n}px`}}(e,t,r),i=function(e,t,r){if(16>r)return;let n=L.getByteAt(e,t+15);return{value:n,description:`${n}px`}}(e,t,r),o={"JFIF Version":function(e,t,r){if(9>r)return;let n=L.getByteAt(e,t+7),i=L.getByteAt(e,t+7+1);return{value:256*n+i,description:n+"."+i}}(e,t,r),"Resolution Unit":function(e,t,r){if(10>r)return;let n=L.getByteAt(e,t+9);return{value:n,description:0===n?"None":1===n?"inches":2===n?"cm":"Unknown"}}(e,t,r),XResolution:function(e,t,r){if(12>r)return;let n=L.getShortAt(e,t+10);return{value:n,description:""+n}}(e,t,r),YResolution:function(e,t,r){if(14>r)return;let n=L.getShortAt(e,t+12);return{value:n,description:""+n}}(e,t,r),"JFIF Thumbnail Width":n,"JFIF Thumbnail Height":i};if(void 0!==n&&void 0!==i){let a=function(e,t,r,n){if(0!==r&&!(16+r>n))return{value:e.buffer.slice(t+16,t+16+r),description:"<24-bit RGB pixel data>"}}(e,t,3*n.value*i.value,r);a&&(o["JFIF Thumbnail"]=a)}for(let e in o)void 0===o[e]&&delete o[e];return o}},en={iptc:{256:{name:"Model Version",description:e=>((e[0]<<8)+e[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:e=>((e[0]<<8)+e[1]).toString()},278:{name:"File Format Version",description:e=>((e[0]<<8)+e[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:ei},336:{name:"Time Sent",description:eo},346:{name:"Coded Character Set",description:ea,encoding_name:ea},356:"UNO",376:{name:"ARM Identifier",description:e=>((e[0]<<8)+e[1]).toString()},378:{name:"ARM Version",description:e=>((e[0]<<8)+e[1]).toString()},512:{name:"Record Version",description:e=>((e[0]<<8)+e[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:e=>"01"===d(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{let t=d(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:e=>{let t=d(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:ei},572:{name:"Time Created",description:eo},574:{name:"Digital Creation Date",description:ei},575:{name:"Digital Creation Time",description:eo},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{let t=d(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:e=>e},642:"Image Type",643:{name:"Image Orientation",description:e=>{let t=d(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{let t=d(e),r=t.charAt(0),n=t.charAt(1),i="";return("1"===r?i+="Mono":"2"===r&&(i+="Stereo"),"A"===n?i+=", actuality":"C"===n?i+=", question and answer session":"M"===n?i+=", music, transmitted by itself":"Q"===n?i+=", response to a question":"R"===n?i+=", raw sound":"S"===n?i+=", scener":"V"===n?i+=", voicer":"W"===n&&(i+=", wrap"),""!==i)?i:t}},663:{name:"Audio Sampling Rate",description:e=>parseInt(d(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{let t=parseInt(d(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{let t=d(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:e=>2===e.length?"ObjectData Preview File Format":"Record 2 destination",description:e=>{if(2===e.length){let t=(e[0]<<8)+e[1];if(0===t)return"No ObjectData";if(1===t)return"IPTC-NAA Digital Newsphoto Parameter Record";if(2===t)return"IPTC7901 Recommended Message Format";if(3===t)return"Tagged Image File Format (Adobe/Aldus Image data)";else if(4===t)return"Illustrator (Adobe Graphics data)";else if(5===t)return"AppleSingle (Apple Computer Inc)";else if(6===t)return"NAA 89-3 (ANPA 1312)";else if(7===t)return"MacBinary II";else if(8===t)return"IPTC Unstructured Character Oriented File Format (UCOFF)";else if(9===t)return"United Press International ANPA 1312 variant";else if(10===t)return"United Press International Down-Load Message";else if(11===t)return"JPEG File Interchange (JFIF)";else if(12===t)return"Photo-CD Image-Pac (Eastman Kodak)";else if(13===t)return"Microsoft Bit Mapped Graphics File [*.BMP]";else if(14===t)return"Digital Audio File [*.WAV] (Microsoft & Creative Labs)";else if(15===t)return"Audio plus Moving Video [*.AVI] (Microsoft)";else if(16===t)return"PC DOS/Windows Executable Files [*.COM][*.EXE]";else if(17===t)return"Compressed Binary File [*.ZIP] (PKWare Inc)";else if(18===t)return"Audio Interchange File Format AIFF (Apple Computer Inc)";else if(19===t)return"RIFF Wave (Microsoft Corporation)";else if(20===t)return"Freehand (Macromedia/Aldus)";else if(21===t)return'Hypertext Markup Language "HTML" (The Internet Society)';else if(22===t)return"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC";else if(23===t)return"MPEG 2 Audio Layer 3, ISO/IEC";else if(24===t)return"Portable Document File (*.PDF) Adobe";else if(25===t)return"News Industry Text Format (NITF)";else if(26===t)return"Tape Archive (*.TAR)";else if(27===t)return"Tidningarnas Telegrambyr\xe5 NITF version (TTNITF DTD)";else if(28===t)return"Ritzaus Bureau NITF version (RBNITF DTD)";else if(29===t)return"Corel Draw [*.CDR]";return`Unknown format ${t}`}return d(e)}},713:{name:"ObjectData Preview File Format Version",description:(e,t)=>{let r={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},n=d(e);if(t["ObjectData Preview File Format"]){let e=d(t["ObjectData Preview File Format"].value);if(r[e]&&r[e][n])return r[e][n]}return n}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:e=>e[0].toString()},1812:{name:"Max Subfile Size",description:e=>{let t=0;for(let r=0;r{let t=0;for(let r=0;r{let t=0;for(let r=0;r=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function eo(e){let t=d(e),r=t;return t.length>=6&&(r=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(r+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),r}function ea(e){let t=d(e);if("\x1b%G"===t)return"UTF-8";if("\x1b%5"===t)return"Windows-1252";if("\x1b%/G"===t)return"UTF-8 Level 1";if("\x1b%/H"===t)return"UTF-8 Level 2";if("\x1b%/I"===t)return"UTF-8 Level 3";if("\x1b/A"===t)return"ISO-8859-1";if("\x1b/B"===t)return"ISO-8859-2";else if("\x1b/C"===t)return"ISO-8859-3";else if("\x1b/D"===t)return"ISO-8859-4";else if("\x1b/@"===t)return"ISO-8859-5";else if("\x1b/G"===t)return"ISO-8859-6";else if("\x1b/F"===t)return"ISO-8859-7";else if("\x1b/H"===t)return"ISO-8859-8";return"Unknown"}var es=function(){if("undefined"!=typeof TextDecoder)return TextDecoder},el={decode:function(e,t){let r=es();if(void 0!==r&&void 0!==e)try{return new r(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map(e=>String.fromCharCode(e)).join(""))}},ec={read:function(e,t,r){try{if(Array.isArray(e))return eu(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,r);let{naaBlock:n,dataOffset:i}=function(e,t){for(;t+12<=e.byteLength;){let r=function(e,t){if(943868237!==e.getUint32(t,!1))throw Error("Not an IPTC resource block.");return{type:e.getUint16(t+4),size:e.getUint16(t+10)}}(e,t);if(1028===r.type)return{naaBlock:r,dataOffset:t+12};t+=12+r.size+(r.size%2!=0?1:0)}throw Error("No IPTC NAA resource block.")}(e,t);return eu(e,n,i,r)}catch(e){return{}}}};function eu(e,t,r,n){let i;let o={},a=r+t.size;for(;r"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e,"tiff:ResolutionUnit":e=>H.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>ef(H.XResolution,e),"tiff:YResolution":e=>ef(H.YResolution,e),"exif:ApertureValue":e=>ef(H.ApertureValue,e),"exif:GPSLatitude":eh,"exif:GPSLongitude":eh,"exif:FNumber":e=>ef(H.FNumber,e),"exif:FocalLength":e=>ef(H.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>H.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>H.ColorSpace("0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)),"exif:ComponentsConfiguration"(e,t){if(/^\d, \d, \d, \d$/.test(t)){let e=t.split(", ").map(e=>e.charCodeAt(0));return H.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>H.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>H.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>H.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>H.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>ep(e)?H.ExposureTime(e.split("/").map(e=>parseInt(e,10))):e,"exif:MeteringMode":e=>H.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>H.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>H.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>H.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>ef(H.ShutterSpeedValue,e),"exif:WhiteBalance":e=>H.WhiteBalance(parseInt(e,10))};function ef(e,t){return ep(t)?e(t.split("/")):t}function ep(e){return/^-?\d+\/-?\d+$/.test(e)}function eh(e){let[t,r]=e.split(",");if(void 0!==t&&void 0!==r){let e=parseFloat(t),n=parseFloat(r),i=r.charAt(r.length-1);if(!Number.isNaN(e)&&!Number.isNaN(n))return""+(e+n/60)+i}return e}var em=function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{return new(require("@xmldom/xmldom")).DOMParser({errorHandler:{error:()=>{throw Error("Faulty XML")}}})}catch(e){return}},eg={read:function(e,t){let r={};if("string"==typeof e)return ey(r,e),r;let[n,i]=function(e,t){if(0===t.length)return[];let r=[ev(e,t.slice(0,1))];return t.length>1&&r.push(ev(e,t.slice(1))),r}(e,t),o=ey(r,n);if(i){let n=ey(r,i);o||n||(delete r._raw,ey(r,ev(e,t)))}return r}};function ev(e,t){let r=new Uint8Array(t.reduce((e,t)=>e+t.length,0)),n=0;for(let i=0;i).+$/,"$1"),"application/xml");if("parsererror"===n.documentElement.nodeName)throw Error(n.documentElement.textContent);return{doc:n,raw:r}}(t);e._raw=(e._raw||"")+n;let o=function e(t){for(let r=0;r{if(t.nodeName&&"#text"!==t.nodeName){let n={attributes:function(e){let t={};for(let r=0;r{a(t,ex(e.attributes)),"object"==typeof e.value&&a(t,ej(e.value))})}return t}function ex(e){let t={};for(let r in e)"rdf:parseType"===r||ew(r)||(t[eS(r)]={value:e[r],attributes:{},description:ek(e[r],r)});return t}function ew(e){return"xmlns"===e.split(":")[0]}function eS(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function ek(e,t){if(Array.isArray(e)){let r=e.map(e=>void 0!==e.value?ek(e.value):ek(e)).join(", ");return t&&"function"==typeof ed[t]?ed[t](e,r):r}if("object"==typeof e)return function(e){let t=[];for(let r in e)t.push(`${"CiAdrCity"===r?"CreatorCity":"CiAdrCtry"===r?"CreatorCountry":"CiAdrExtadr"===r?"CreatorAddress":"CiAdrPcode"===r?"CreatorPostalCode":"CiAdrRegion"===r?"CreatorRegion":"CiEmailWork"===r?"CreatorWorkEmail":"CiTelWork"===r?"CreatorWorkPhone":"CiUrlWork"===r?"CreatorWorkUrl":r}: ${ek(e[r].value)}`);return t.join("; ")}(e);try{if(t&&"function"==typeof ed[t])return ed[t](e);return decodeURIComponent(escape(e))}catch(t){return e}}function ej(e){let t={};for(let i in e){var r,n;ew(i)||(t[eS(i)]=(r=e[i],n=i,eE(r)?eO(r,n):eI(r)?eP(r,n):eA(r)?eT(r,n):void 0!==ez(r.value)?function(e,t){let r=ez(e.value).value["rdf:li"],n=eC(e),i=[];return void 0===r?r=[]:Array.isArray(r)||(r=[r]),r.forEach(e=>{i.push(eE(e)?eO(e):eI(e)?eP(e).value:eA(e)?eT(e).value:eN(e))}),{value:i,attributes:n,description:ek(i,t)}}(r,n):eN(r,n)))}return t}function eE(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function eO(e,t){var r;let n=eC(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),a(n,eC(e),function(e){let t={};for(let r in e.value)"rdf:value"===r||ew(r)||(t[eS(r)]=e.value[r].value);return t}(e));let i=eR((r=e).value["rdf:value"])||r.value["rdf:value"].value;return{value:i,attributes:n,description:ek(i,t)}}function eC(e){let t={};for(let r in e.attributes)"rdf:parseType"===r||"rdf:resource"===r||ew(r)||(t[eS(r)]=e.attributes[r]);return t}function eI(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function eP(e,t){let r={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(a(r.value,ex(e.value["rdf:Description"].attributes)),a(r.attributes,eC(e)),e=e.value["rdf:Description"]),a(r.value,ej(e.value)),r.description=ek(r.value,t),r}function eA(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function eT(e,t){let r=ex(e.attributes);return{value:r,attributes:{},description:ek(r,t)}}function ez(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function eN(e,t){let r=eR(e)||eb(e.value);return{value:r,attributes:eC(e),description:ek(r,t)}}function eR(e){return e.attributes&&e.attributes["rdf:resource"]}let e_={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},eM={4:{name:"Preferred CMM type",value:(e,t)=>i(e,t,4),description:e=>null!==e?eD(e):""},8:{name:"Profile Version",value:(e,t)=>e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)},12:{name:"Profile/Device class",value:(e,t)=>i(e,t,4),description:e=>{switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:(e,t)=>i(e,t,4)},20:{name:"Connection Space",value:(e,t)=>i(e,t,4)},24:{name:"ICC Profile Date",value:(e,t)=>(function(e,t){let r=e.getUint16(t),n=e.getUint16(t+2)-1,i=e.getUint16(t+4);return new Date(Date.UTC(r,n,i,e.getUint16(t+6),e.getUint16(t+8),e.getUint16(t+10)))})(e,t).toISOString()},36:{name:"ICC Signature",value:(e,t)=>{var r;return r=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(r))}},40:{name:"Primary Platform",value:(e,t)=>i(e,t,4),description:e=>eD(e)},48:{name:"Device Manufacturer",value:(e,t)=>i(e,t,4),description:e=>eD(e)},52:{name:"Device Model Number",value:(e,t)=>i(e,t,4)},64:{name:"Rendering Intent",value:(e,t)=>e.getUint32(t),description:e=>{switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:(e,t)=>i(e,t,4)}};function eD(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var eL={read:function(e,t){try{let r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r),a=0,s=Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer;for(let e=1;e<=t.length;e++){let r=t.find(t=>t.chunkNumber===e);if(!r)throw Error(`ICC chunk ${e} not found`);let i=s.slice(r.offset,r.offset+r.length),o=new Uint8Array(i);n.set(o,a),a+=o.length}return function(e){let t=e.buffer,r=e.getUint32();if(e.byteLength!==r)throw Error("ICC profile length not matching");if(e.length<84)throw Error("ICC profile too short");let n={},a=Object.keys(eM);for(let t=0;tt.length)break;let u=i(e,a,4);if("desc"===u){let i=e.getUint32(a+8);if(i>s)return n;eU(n,r,eF(t.slice(a+12,a+i+11)))}else if("mluc"===u){let t=e.getUint32(a+8),s=e.getUint32(a+12),l=a+16,c=[];for(let r=0;re.byteLength)return;let r=L.getLongAt(e,t);return{value:r,description:`${r}px`}}(e,t),"Image Height":function(e,t){if(t+4+4>e.byteLength)return;let r=L.getLongAt(e,t+4);return{value:r,description:`${r}px`}}(e,t),"Bit Depth":function(e,t){if(t+8+1>e.byteLength)return;let r=L.getByteAt(e,t+8);return{value:r,description:`${r}`}}(e,t),"Color Type":function(e,t){if(t+9+1>e.byteLength)return;let r=L.getByteAt(e,t+9);return{value:r,description:({0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"})[r]||"Unknown"}}(e,t),Compression:function(e,t){if(t+10+1>e.byteLength)return;let r=L.getByteAt(e,t+10);return{value:r,description:0===r?"Deflate/Inflate":"Unknown"}}(e,t),Filter:function(e,t){if(t+11+1>e.byteLength)return;let r=L.getByteAt(e,t+11);return{value:r,description:0===r?"Adaptive":"Unknown"}}(e,t),Interlace:function(e,t){if(t+12+1>e.byteLength)return;let r=L.getByteAt(e,t+12);return{value:r,description:({0:"Noninterlaced",1:"Adam7 Interlace"})[r]||"Unknown"}}(e,t)}}},eH={read:function(e,t){return t.reduce((t,{offset:r,length:n,type:i})=>{let{name:a,value:s,description:l}=function(e,t,r,n){let i=[],a=[],s=[],l=[],c=eZ;for(let o=0;o=0&&(r.headers={range:`bytes=0-${t-1}`}),fetch(e,r).then(e=>e.arrayBuffer())}(e,t):function(e,{length:t}={}){return new Promise((r,n)=>{let i={};Number.isInteger(t)&&t>=0&&(i.headers={range:`bytes=0-${t-1}`}),(/^https:\/\//.test(e)?require("https").get:require("http").get)(e,i,e=>{if(e.statusCode>=200&&e.statusCode<=299){let t=[];e.on("data",e=>t.push(e1.from(e))),e.on("error",e=>n(e)),e.on("end",()=>r(e1.concat(t)))}else n(`Could not fetch file: ${e.statusCode} ${e.statusMessage}`),e.resume()}).on("error",e=>n(e))})}(e,t):/^data:[^;,]*(;base64)?,/.test(e)?Promise.resolve(function(e){let t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),e=>e.charCodeAt(0)).buffer;if(void 0===n)return;return n.from,n.from(t,"base64")}let r=decodeURIComponent(t);return void 0!==n?(n.from,n.from(r)):Uint8Array.from(r,e=>e.charCodeAt(0)).buffer}(e)):function(e,{length:t}={}){return new Promise((r,n)=>{let i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(o,a)=>{o?n(o):i.stat(e,(o,s)=>{if(o)n(o);else{let o=Math.min(s.size,void 0!==t?t:s.size),l=e1.alloc(o);i.read(a,{buffer:l,length:o},t=>{t?n(t):i.close(a,t=>{t&&console.warn(`Could not close file ${e}:`,t),r(l)})})}})})})}(e,t)})(e,t).then(e=>e5(e,t)):"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File?new Promise((t,r)=>{let n=new FileReader;n.onload=e=>t(e.target.result),n.onerror=()=>r(n.error),n.readAsArrayBuffer(e)}).then(e=>e5(e,t)):e5(e,t)}};function e5(e,t){return function(e){try{return e1.isBuffer(e)}catch(e){return!1}}(e)&&(e=new Uint8Array(e).buffer),function(e,{expanded:t=!1,includeUnknown:r=!1}={expanded:!1,includeUnknown:!1}){let n=!1,i={},{fileDataOffset:s,jfifDataOffset:l,tiffHeaderOffset:c,iptcDataOffset:d,xmpChunks:f,iccChunks:h,mpfDataOffset:m,pngHeaderOffset:g,pngTextChunks:v,pngChunkOffsets:y}=_(e);if(u.USE_JPEG&&u.USE_FILE&&void 0!==s){n=!0;let r=et.read(e,s);t?i.file=r:i=a({},i,r)}if(u.USE_JPEG&&u.USE_JFIF&&void 0!==l){n=!0;let r=er.read(e,l);t?i.jfif=r:i=a({},i,r)}if(u.USE_EXIF&&void 0!==c){n=!0;let s=K.read(e,c,r);if(s.Thumbnail&&(i.Thumbnail=s.Thumbnail,delete s.Thumbnail),t?(i.exif=s,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=p(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=p(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(i)):i=a({},i,s),u.USE_TIFF&&u.USE_IPTC&&s["IPTC-NAA"]&&!(void 0!==d)){let e=ec.read(s["IPTC-NAA"].value,0,r);t?i.iptc=e:i=a({},i,e)}if(u.USE_TIFF&&u.USE_XMP&&s.ApplicationNotes&&!e4(f)){let e=eg.read(o(s.ApplicationNotes.value));t?i.xmp=e:(delete e._raw,i=a({},i,e))}if(u.USE_TIFF&&u.USE_ICC&&s.ICC_Profile&&!e3(h)){let e=eL.read(s.ICC_Profile.value,[{offset:0,length:s.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?i.icc=e:i=a({},i,e)}}if(u.USE_JPEG&&u.USE_IPTC&&void 0!==d){n=!0;let o=ec.read(e,d,r);t?i.iptc=o:i=a({},i,o)}if(u.USE_XMP&&e4(f)){n=!0;let r=eg.read(e,f);t?i.xmp=r:(delete r._raw,i=a({},i,r))}if((u.USE_JPEG||u.USE_WEBP)&&u.USE_ICC&&e3(h)){n=!0;let r=eL.read(e,h);t?i.icc=r:i=a({},i,r)}if(u.USE_MPF&&void 0!==m){n=!0;let o=K.readMpf(e,m,r);t?i.mpf=o:i=a({},i,o)}if(u.USE_PNG&&u.USE_PNG_FILE&&void 0!==g){n=!0;let r=eB.read(e,g);t?(i.png=i.png?a({},i.png,r):r,i.pngFile=r):i=a({},i,r)}if(u.USE_PNG&&void 0!==v){n=!0;let r=eH.read(e,v);t?(i.png=i.png?a({},i.png,r):r,i.pngText=r):i=a({},i,r)}if(u.USE_PNG&&void 0!==y){n=!0;let r=eG.read(e,y);t?i.png=i.png?a({},i.png,r):r:i=a({},i,r)}let b=(u.USE_JPEG||u.USE_WEBP)&&u.USE_EXIF&&u.USE_THUMBNAIL&&eY.get(e,i.Thumbnail,c);if(b?(n=!0,i.Thumbnail=b):delete i.Thumbnail,!n)throw new e0.MetadataMissingError;return i}(function(e){try{return new DataView(e)}catch(t){return new c(e)}}(e),t)}function e4(e){return Array.isArray(e)&&e.length>0}function e3(e){return Array.isArray(e)&&e.length>0}var e6=r(57632),e8=r(10292);let e7=new Uint8Array([85,78,73,67,79,68,69,0]),e9=new TextDecoder("utf-16le");function te(e){let t=function(e){let t=new Uint8Array(e.length);for(let r=0;r/g,tu=/([a-zA-Z0-9_\.]+)\(([a-zA-Z0-9]+)\)/,td=new Map([["Seed","seed"],["CFG scale","cfgScale"],["Sampler","sampler"],["Steps","steps"],["Clip skip","clipSkip"]]),tf=e=>{var t;return null!==(t=td.get(e.trim()))&&void 0!==t?t:e.trim()},tp=new Map(Array.from(td,e=>e.reverse())),th=["hashes","civitaiResources","scheduler","vaes","additionalResources","comfy","upscalers","models","controlNets","denoise","other","external"],tm={canParse(e){let t=null;return(null==e?void 0:e.parameters)?t=e.parameters:(null==e?void 0:e.userComment)&&(t=te(e.userComment)),!!t&&(e.generationDetails=t,t.includes("Steps: "))},parse(e){var t,r,n,i,o,a;let s={},l=e.generationDetails;if(!l)return s;let c=l.split("\n").filter(e=>""!==e.trim());for(let e of tl){let t=c.findIndex(t=>t.startsWith(e));if(-1!==t)for(c.splice(t,1);te.startsWith("Steps: ")))||void 0===t?void 0:t.replace(/\,\s*$/,"");for(let e of(u&&c.splice(c.indexOf(u),1),ts))(null==u?void 0:u.includes(e))&&(u=u.split(e)[0]);let d=null==u?void 0:null===(r=u.match(ti))||void 0===r?void 0:r[1];d&&u&&(s.hashes=JSON.parse(d),u=u.replace(ti,""));let f=null==u?void 0:null===(n=u.match(to))||void 0===n?void 0:n[1];if(f&&u){for(let e of(s.civitaiResources=JSON.parse(f),s.civitaiResources)){if(delete e.modelName,delete e.versionName,!e.air)continue;let{version:t,type:r}=(0,tn.Nl)(e.air);e.modelVersionId=t,e.type=r,delete e.air}u=u.replace(to,"")}let p=null==u?void 0:null===(i=u.match(ta))||void 0===i?void 0:i[1];if(p&&u){let e=JSON.parse(p);0!==Object.keys(e).length&&(s.extra=e),u=u.replace(ta,"")}for(let[e,t]of Object.entries(function e(t){let r={};if(!t)return r;let n="",i="",o=!1,a=!1;for(let l=0;le.trim());s.prompt=h,s.negativePrompt=m.join(" ").trim();let g=[...h.matchAll(tc)].map(e=>{let[,t,r,n]=e;return{type:t,name:r,weight:parseFloat(n)}});if(s["Lora hashes"]){for(let[e,t]of(s.hashes||(s.hashes={}),Object.entries(s["Lora hashes"]))){s.hashes["lora:".concat(e)]=t;let r=g.find(t=>t.name===e);r?r.hash=t:g.push({type:"lora",name:e,hash:t})}delete s["Lora hashes"]}if(s["VAE hash"]&&(s.hashes||(s.hashes={}),s.hashes.vae=s["VAE hash"],delete s["VAE hash"]),s.Model&&s["Model hash"]&&(s.hashes||(s.hashes={}),s.hashes.model||(s.hashes.model=s["Model hash"]),g.push({type:"model",name:s.Model,hash:s["Model hash"]})),s.Hypernet&&s["Hypernet strength"]&&g.push({type:"hypernet",name:s.Hypernet,weight:parseFloat(s["Hypernet strength"])}),"True"===s["AddNet Enabled"]){let e=1;for(;;){let t=s["AddNet Model ".concat(e)];if(!t)break;let[,r,n]=null!==(a=t.match(tu))&&void 0!==a?a:[];g.push({type:s["AddNet Module ".concat(e)].toLowerCase(),name:r,hash:n,weight:parseFloat(s["AddNet Weight ".concat(e)])}),e++}}return s.resources=g,s},encode(e){let{prompt:t,negativePrompt:r,resources:n,steps:i,...o}=e,a=[t];r&&a.push("Negative prompt: ".concat(r));let s=[];for(let[e,t]of(i&&s.push("Steps: ".concat(i)),Object.entries(o))){var l;let r=null!==(l=tp.get(e))&&void 0!==l?l:e;th.includes(r)||s.push("".concat(r,": ").concat(t))}return s.length>0&&a.push(s.join(", ")),a.join("\n")}};var tg=r(38498);function tv(e,t){for(let[r,n]of e)if(n.includes(t))return r}var ty=r(34163);let tb=["ckpt_airs","lora_airs","embedding_airs"];function tx(e){var t,r,n,i,o,a,s;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"positive";if("ControlNetApply"===e.class_type||"FluxGuidance"===e.class_type)return tx(e.inputs.conditioning,l);if((null===(t=e.inputs)||void 0===t?void 0:t.populated_text)&&(e.inputs.text=e.inputs.populated_text),null===(r=e.inputs)||void 0===r?void 0:r.text){if("string"==typeof e.inputs.text)return e.inputs.text;if(void 0!==e.inputs.text.class_type)return tx(e.inputs.text,l)}return(null===(n=e.inputs)||void 0===n?void 0:n.text_g)?(null===(o=e.inputs)||void 0===o?void 0:o.text_l)&&(null===(a=e.inputs)||void 0===a?void 0:a.text_l)!==(null===(s=e.inputs)||void 0===s?void 0:s.text_g)?"".concat(e.inputs.text_g,", ").concat(e.inputs.text_l):e.inputs.text_g:(null===(i=e.inputs)||void 0===i?void 0:i["text_".concat(l)])?e.inputs["text_".concat(l)]:""}function tw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["Value"];if("number"==typeof e)return e;for(let r of t)if(void 0!==e.inputs[r])return e.inputs[r];return 0}var tS=r(48600),tk=r(5632),tj=r(35818),tE=r(2807);let tO={automatic:tm,swarmui:{canParse:e=>!!(e.generationDetails&&e.generationDetails.includes("sui_image_params")),parse:e=>{var t;let r=null===(t=JSON.parse(e.generationDetails.replace(/\[NaN\]/g,"[]").replace(/NaN/g,"0").replace(/\[Infinity\]/g,"[]")))||void 0===t?void 0:t.sui_image_params;tr("nodeJson",r);let n={prompt:r.prompt,negativePrompt:r.negativeprompt,cfgScale:r.cfgscale,steps:r.steps,seed:r.seed,width:r.width,height:r.height,sampler:r.sampler,scheduler:r.scheduler,version:r.swarmVersion,Model:r.model};return function(e){let t;let r=e.sampler;e.originalSampler=e.sampler,"karras"==e.scheduler&&(t=tv(tg.Tt,r+"_karras")),t||(t=tv(tg.Tt,r)),t&&(e.sampler=t)}(n),n},encode:e=>{var t;return JSON.stringify({sui_image_params:{prompt:e.prompt,negativeprompt:e.negativePrompt,cfgscale:e.cfgScale,steps:e.steps,seed:e.seed,width:e.width,height:e.height,aspectratio:"custom",sampler:null!==(t=e.originalSampler)&&void 0!==t?t:e.sampler,scheduler:e.scheduler,model:e.Model,swarmVersion:e.version}})}},comfy:{canParse:e=>{var t,r,n;if(e.prompt||e.workflow)return!0;if(null==e?void 0:null===(r=e.Model)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.startsWith("prompt:")){let t=e.Model[0].replace(/^prompt:/,"");if(e.prompt=t,e.workflow=t,e.userComment){let t=te(e.userComment);try{e.extraMetadata=null===(n=JSON.parse(t))||void 0===n?void 0:n.extraMetadata,"string"==typeof e.extraMetadata&&(e.extraMetadata=JSON.parse(e.extraMetadata))}catch(e){}}return!0}let i=null;if((null==e?void 0:e.parameters)?i=e.parameters:(null==e?void 0:e.userComment)&&(i=te(e.userComment)),i)try{let t=JSON.parse(i),{extra:r,extraMetadata:n,...o}=t;if("string"==typeof n)try{e.extraMetadata=JSON.parse(n)}catch(e){}return t.extra&&(e.prompt=JSON.stringify(o),e.workflow=i),!0}catch(e){}return!1},parse:e=>{var t,r,n,i,o,a;let s=JSON.parse(e.prompt.replace(/\[NaN\]/g,"[]").replace(/NaN/g,"0").replace(/\[Infinity\]/g,"[]"));tr("nodeJson",s);let l=[],c=[],u=[],d=[],f=[],p=[],h=Object.values(s);for(let e of h){for(let[t,r]of Object.entries(e.inputs))Array.isArray(r)&&(e.inputs[t]=s[r[0]]);if("KSamplerAdvanced"==e.class_type){let t={...e.inputs};t.steps=tw(t.steps),t.cfg=tw(t.cfg),l.push(t)}if("KSampler"==e.class_type&&l.push(e.inputs),"KSampler (Efficient)"==e.class_type&&l.push(e.inputs),["LoraLoader","LoraLoaderModelOnly"].includes(e.class_type)){let t=e.inputs.strength_model;if(t<.001&&t>-.001)continue;p.push({name:e.inputs.lora_name,type:"lora",strength:t,strengthClip:e.inputs.strength_clip})}"CheckpointLoaderSimple"==e.class_type&&c.push(e.inputs.ckpt_name),"UpscaleModelLoader"==e.class_type&&u.push(e.inputs.model_name),"VAELoader"==e.class_type&&d.push(e.inputs.vae_name),"ControlNetLoader"==e.class_type&&f.push(e.inputs.control_net_name)}let m=h.find(e=>"SamplerCustomAdvanced"==e.class_type),g=e.workflow?JSON.parse(e.workflow):void 0,v=[],y=[],b=(null==g?void 0:null===(r=g.extra)||void 0===r?void 0:null===(t=r.airs)||void 0===t?void 0:t.length)>0;if(null==g?void 0:g.extra)for(let e of tb){let t=g.extra[e];if(t)for(let e of t){let[t,r]=e.split("@");r?v.push(parseInt(r)):t&&y.push(parseInt(t))}}let x={models:c,upscalers:u,vaes:d,additionalResources:p,controlNets:f,versionIds:v,modelIds:y,comfy:b?void 0:'{"prompt": '.concat(e.prompt,', "workflow": ').concat(e.workflow,"}")};if(e.extraMetadata&&"object"==typeof e.extraMetadata&&e.extraMetadata.prompt){let{prompt:t,negativePrompt:r,cfgScale:n,steps:i,seed:o,sampler:a,denoise:s,workflowId:l,resources:c,...u}=e.extraMetadata;x.prompt=t,x.negativePrompt=r,x.cfgScale=n,x.steps=i,x.seed=o,x.sampler=a,x.denoise=s,x.workflow=l,x.civitaiResources=c.map(e=>(e.strength&&(e.weight=e.strength,delete e.strength),e)),u&&(x.extra=u)}else if(m){let e=m.inputs.noise;(null==e?void 0:e.class_type)==="RandomNoise"&&(x.seed=e.inputs.noise_seed);let t=m.inputs.sampler;(null==t?void 0:t.class_type)==="KSamplerSelect"?x.sampler=t.inputs.sampler_name:(null==t?void 0:t.class_type)==="ODESamplerSelect"&&(x.sampler=t.inputs.solver);let r=m.inputs.guider;t:if((null==r?void 0:r.class_type)==="BasicGuider"){let e;let t=r.inputs.conditioning;if((null==t?void 0:t.class_type)==="CLIPTextEncode"?e=t:(null==t?void 0:t.class_type)==="FluxGuidance"&&(e=t.inputs.conditioning,x.cfgScale=t.inputs.guidance),(null==e?void 0:e.class_type)!=="CLIPTextEncode")break t;if("string"==typeof e.inputs.text){x.prompt=e.inputs.text;break t}let n=e.inputs.text;(null==n?void 0:n.class_type)==="ImpactWildcardProcessor"?x.prompt=n.inputs.populated_text:(null==n?void 0:n.class_type)==="String Literal"&&(x.prompt=n.inputs.string)}let n=m.inputs.sigmas;(null==n?void 0:n.class_type)==="BasicScheduler"&&(x.steps=n.inputs.steps,x.scheduler=n.inputs.scheduler,x.denoise=n.inputs.denoise);let i=m.inputs.latent_image;(null==i?void 0:i.class_type)==="EmptyLatentImage"&&(x.width=tw(i.inputs.width,["int"]),x.height=tw(i.inputs.height,["int"]))}else{let t=null!==(n=l.find(e=>"EmptyLatentImage"==e.latent_image.class_type))&&void 0!==n?n:l[0];x.prompt=tx(t.positive,"positive"),x.negativePrompt=tx(t.negative,"negative"),x.cfgScale=t.cfg,x.steps=t.steps,x.seed=tw(null!==(i=t.seed)&&void 0!==i?i:t.noise_seed,["Value","seed"]),x.sampler=t.sampler_name,x.scheduler=t.scheduler,x.denoise=t.denoise,x.width=t.latent_image.inputs.width,x.height=t.latent_image.inputs.height,e.extraMetadata&&(x.extra=e.extraMetadata)}let w=[...c,...u,...d,...p.map(e=>e.name)].filter(e=>e.startsWith("urn:air:"));if(w.length>0&&(g.extra={airs:w},b=!0),b)for(let e of(null!==(o=x.civitaiResources)&&void 0!==o||(x.civitaiResources=[]),g.extra.airs)){let{version:t,type:r}=(0,tn.Nl)(e),n={modelVersionId:t,type:r},i=null===(a=p.find(t=>t.name===e))||void 0===a?void 0:a.strength;i&&(n.weight=i),x.civitaiResources.push(n)}return function(e){let t;let r=e.sampler;"karras"==e.scheduler&&(t=tv(tg.Tt,r+"_karras")),t||(t=tv(tg.Tt,r)),t&&(e.sampler=t);let n=e.models;n&&n.length>0&&(e.Model=n[0].replace(/\.[^/.]+$/,""))}(x),x},encode:e=>{let t="string"==typeof e.comfy?(0,ty.xZ)(e.comfy):e.comfy;return t&&t.workflow?JSON.stringify(t.workflow):""}},rfooocus:{canParse(e){var t;return null==e?void 0:null===(t=e.parameters)||void 0===t?void 0:t.includes('"software": "RuinedFooocus"')},parse:e=>{let{Prompt:t,Negative:r,cfg:n,steps:i,seed:o,scheduler:a,denoise:s,width:l,height:c,base_model_hash:u,software:d,...f}=JSON.parse(e.parameters),p={prompt:t,negativePrompt:r,cfgScale:n,steps:i,seed:o,sampler:f.sampler_name,denoise:s,width:l,height:c,Model:f.base_model_name.split(".").slice(0,-1).join("."),"Model hash":u,software:d,other:f};return console.log(p),"simple"!==a&&(p.scheduler=a),function(e){let t;let r=e.sampler;"karras"==e.scheduler&&(t=tv(tg.Tt,r+"_karras")),t||(t=tv(tg.Tt,r)),t&&(e.sampler=t)}(p),p},encode:e=>{var t,r;return JSON.stringify({Prompt:e.prompt,Negative:e.negativePrompt,cfg:e.cfgScale,steps:e.steps,seed:e.seed,scheduler:null!==(t=e.scheduler)&&void 0!==t?t:"simple",denoise:e.denoise,width:e.width,height:e.height,base_model_hash:e["Model hash"],software:e.software,...null!==(r=e.other)&&void 0!==r?r:{}})}}};async function tC(e){try{let r=await e2.load(e,{includeUnknown:!0});delete r.MakerNote;let n=Object.entries(r).reduce((e,t)=>{let[r,n]=t;return e[r]=n.value,e},{});n.UserComment&&(n.userComment=Int32Array.from(n.UserComment)),tr("exif",n);let i={};try{var t;let{parse:e}=null!==(t=Object.values(tO).find(e=>e.canParse(n)))&&void 0!==t?t:{};e&&(i=e(n))}catch(e){console.error("Error parsing metadata",e)}let o=e8.ys.safeParse(i);return o.success?o.data:{}}catch(e){return{}}}function tI(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"automatic";return null===(t=tO[r])||void 0===t?void 0:t.encode(e)}let tP=e=>tm.parse({generationDetails:e}),tA=async e=>{let t=await (0,tk.U6)(e),{blockedFor:r}=await (0,tk.bf)(t.type===tj.DD.image?t.meta:void 0,!1);if("video"===t.type){let{metadata:e}=t;try{if(e.duration&&e.duration>tg._G.mediaUpload.maxVideoDurationSeconds)throw Error("Video duration cannot be longer than ".concat(tg._G.mediaUpload.maxVideoDurationSeconds," seconds. Please trim your video and try again."));if(e.width>tg._G.mediaUpload.maxVideoDimension||e.height>tg._G.mediaUpload.maxVideoDimension)throw Error("Images cannot be larger than ".concat(tg._G.mediaUpload.maxVideoDimension,"px from either side. Please resize your image or video and try again."))}catch(e){return(0,tE.s9)({error:e}),null}}if("image"===t.type&&t.meta.comfy){let{comfy:e}=t.meta,r=(0,ty.AX)(e)>1;try{if(r)throw Error("Comfy metadata is too large. Please consider updating your workflow")}catch(e){return(0,tE.s9)({title:"Unable to parse image metadata",error:e}),null}}let{height:n,width:i,hash:o}=t.metadata;return{file:e,uuid:(0,e6.Z)(),status:r?"blocked":"uploading",message:null==r?void 0:r.filter(tS.$K).join(", "),height:n,width:i,hash:o,...t,url:t.objectUrl}}},45894:function(e,t,r){"use strict";r.d(t,{b:function(){return o}});let n=!1,i={decode:e=>e};function o(e){if(!e)return"";let t=e;return e.includes("&")&&(t=(n||(n=!0,r.e(6492).then(r.t.bind(r,86492,23)).then(e=>{i.decode=e.decode})),i).decode(e)),t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}},2807:function(e,t,r){"use strict";r.d(t,{JW:function(){return v},LX:function(){return g},mZ:function(){return b},qA:function(){return y},s9:function(){return m},zj:function(){return x}});var n=r(85893),i=r(71232),o=r(5044),a=r(95117),s=r(67841),l=r(9585),c=r(38710),u=r(63208),d=r(29488),f=r(74943),p=r(83425),h=r(35744);function m(e){let{error:t,reason:r,title:i,autoClose:o=3e3}=e,a=Array.isArray(t)?(0,n.jsx)("ul",{children:t.map((e,t)=>(0,n.jsx)("li",{children:e.message},t))}):null!=r?r:t.message;(0,l.c0)({icon:(0,n.jsx)(c.Z,{size:18}),color:"red",message:a,title:i,autoClose:o})}function g(e){let{message:t,title:r,autoClose:i=3e3}=e;(0,l.c0)({icon:(0,n.jsx)(u.Z,{size:18}),color:"teal",message:t,title:r,autoClose:i})}function v(e){let{message:t,title:r,autoClose:i=3e3}=e;(0,l.c0)({icon:(0,n.jsx)(d.Z,{size:18}),color:"orange",message:t,title:r,autoClose:i})}function y(e){let{message:t,title:r,autoClose:i=3e3}=e;(0,l.c0)({icon:(0,n.jsx)(f.Z,{size:18}),color:"blue",message:t,title:r,autoClose:i})}function b(e){var t;let{message:r,title:s,...c}=e;(0,l.c0)({color:"yellow.4",message:(0,n.jsxs)(i.Z,{spacing:4,noWrap:!0,children:[(0,n.jsx)(o.k,{color:null!==(t=c.color)&&void 0!==t?t:"yellow.4",variant:"transparent",children:(0,n.jsx)(p.Z,{size:18,fill:"currentColor"})}),r]}),title:(0,n.jsx)(a.x,{className:"hide-mobile",inherit:!0,children:s}),...c})}function x(e){let{onRetryClick:t}=e;(0,l.c0)({icon:(0,n.jsx)(h.Z,{size:18}),color:"yellow",title:"Captcha token expired",message:(0,n.jsxs)("div",{children:[(0,n.jsx)(a.x,{inherit:!0,children:"Your token expired, click the button below to reset your token"}),(0,n.jsx)(s.z,{size:"sm",variant:"subtle",onClick:t,children:"Reset"})]})})}},88182:function(e,t,r){"use strict";r.d(t,{FX:function(){return m},IP:function(){return c},LU:function(){return y},UD:function(){return h},XF:function(){return f},Y5:function(){return b},ZC:function(){return u},dm:function(){return d},f4:function(){return a},op:function(){return v},pT:function(){return g},qw:function(){return o},td:function(){return s},x6:function(){return p},xF:function(){return l}});var n=r(38498),i=r(35818);function o(e){return e/1024}let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return s(1024*e,t)};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(e<=0)return"0 Bytes";let r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(t))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return parseFloat(e.toFixed(t))}function c(e){let t=e%100;return t>=11&&t<=13?e+"th":e+(["th","st","nd","rd"][e%10]||"th")}function u(e){let t,r;if(0===e)return"0 seconds";let n=[{name:"year",limit:31536e3,in_seconds:31536e3},{name:"month",limit:2592e3,in_seconds:2592e3},{name:"week",limit:604800,in_seconds:604800},{name:"day",limit:86400,in_seconds:86400},{name:"hour",limit:3600,in_seconds:3600},{name:"minute",limit:60,in_seconds:60},{name:"second",limit:1,in_seconds:1}],i="";for(let o=0;o=1&&(i+=" "+r+" "+t.name+(r>1?"s":""),e-=r*t.in_seconds);return i.trim()}function d(e,t){if(!e)return"0";let{decimals:r,floor:n}=null!=t?t:{decimals:1},i=["","k","m","b","t"],o=0;for(;e>=1e3&&oe.reduce((e,r)=>Math.abs(r-t){if(t||p(e),t===i.F.BUZZ)return p(e);let[n,o]=(e/100).toFixed(2).split(".");return!r||(null==r?void 0:r.decimals)||"00"!==o?"".concat(p(n),".").concat(o):"".concat(p(n))},v=(e,t)=>{t||(t=n._G.buzz.platformFeeRate);let r=Math.round(e/n._G.buzz.buzzDollarRatio*100),i=Math.round(t/1e4*r);return{dollarAmount:r,platformFee:i,payoutAmount:r-i}},y=e=>{if(0===e)return"0:00";let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.round(e%60),i=t>0?String(t).padStart(2,"0"):"",o=i||0===r?String(r).padStart(2,"0"):String(r);return[i,o,String(n).padStart(2,"0")].filter(Boolean).join(":")};function b(e){if(e<1)return 0;if((e&e-1)==0)return e;let t=1;for(;t<=e;)t<<=1;return t>>1}},14619:function(e,t,r){"use strict";r.d(t,{r$:function(){return y},HO:function(){return v}});var n=r(55176),i=r(39096),o=r(60857),a=r(59835),s=r(69095),l=r(60240),c=r(62146),u=r(90017),d=r(45645),f=function(e,t,r,n){if(!(0,u.Z)(e))return e;t=(0,l.Z)(t,e);for(var i=-1,o=t.length,a=o-1,f=e;null!=f&&++inull==e||(0,g.Z)(e)&&!e.length,m(e,(0,i.Z)((0,n.Z)(t)))}function y(e,t){let r=[],n=Symbol("micropatch-delete");for(let i of t){if(!i.path||0===i.path.length)continue;let t=e,o=i.path.length,a=i.path[o-1],s=i.path[o-2];for(let e=0;e{void 0!==s?t[s]=t[s].filter(e=>e!==n):e=e.filter(e=>e!==n)})):delete t[a]}}return r.forEach(e=>e()),e}},99490:function(e,t,r){"use strict";r.d(t,{QS:function(){return i}});var n=r(17563);class i{static stringify(e,t){return(0,n.stringify)(e,{skipEmptyString:!0,skipNull:!0,sort:!1,...t})}static parse(e,t){return(0,n.parse)(e,{parseBooleans:!0,parseNumbers:!0,sort:!1,...t})}static stringifyUrl(e){let{url:t,query:r,...i}=e;return(0,n.stringifyUrl)({url:t,query:r},{skipEmptyString:!0,skipNull:!0,sort:!1,...i})}}},73679:function(e,t,r){"use strict";r.d(t,{D:function(){return i},y:function(){return o}});var n=r(48600);function i(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?e:void 0}function o(e){let t=Array.isArray(e)?e.map(i):"string"==typeof e||"number"==typeof e?[i(e)]:void 0;return t?t.filter(n.$K):void 0}},92066:function(e,t,r){"use strict";r.d(t,{zc:function(){return o}});var n=r(1604);let i=n.z.string().url().refine(e=>(null==e?void 0:e.startsWith("http://"))||(null==e?void 0:e.startsWith("https://")),"Must be a valid URL"),o={safeUrl:i,booleanString:n.z.preprocess(e=>!0===e||"true"===e,n.z.boolean()),numberString:n.z.preprocess(e=>e?Number(e):void 0,n.z.number()),usernameValidationSchema:n.z.string().regex(/^[A-Za-z0-9_]*$/,'The "username" field can only contain letters, numbers, and _.')}},27943:function(e,t,r){"use strict";r.d(t,{RA:function(){return b},KJ:function(){return T},W7:function(){return R},Gf:function(){return m},mD:function(){return x},Qm:function(){return g},wm:function(){return _},UF:function(){return p},Ld:function(){return O},aj:function(){return A},Nl:function(){return I},RQ:function(){return P},Bm:function(){return k},av:function(){return S},vY:function(){return w},Yt:function(){return d},$C:function(){return N},Qs:function(){return j},Mh:function(){return M},RN:function(){return C},nU:function(){return E}});let n=RegExp("^(?:urn:)?(?:air:)?(?:(?[a-zA-Z0-9_\\-\\/]+):)?(?:(?[a-zA-Z0-9_\\-\\/]+):)?(?[a-zA-Z0-9_\\-\\/]+):(?[a-zA-Z0-9_\\-\\/]+)(?:@(?[a-zA-Z0-9_\\-]+))?(?:\\.(?[a-zA-Z0-9_\\-]+))?$","i");class i{static parse(e){let t=n.exec(e);if(!t)throw Error("Invalid identifier: ".concat(e));return t.groups}static parseSafe(e){let t=e.match(n);return null==t?void 0:t.groups}static isAir(e){return n.test(e)}static stringify(e){let{ecosystem:t,type:r,source:n,id:i,version:o,format:a}=e;return"urn:air:".concat(t,":").concat(r,":").concat(n,":").concat(i).concat(o?"@".concat(o):"").concat(a?":".concat(a):"")}}var o=r(31304),a=r.n(o),s=r(38498),l=r(35818),c=JSON.parse('["https://artstation.com","https://arxiv.org","https://buymeacoffee.com","https://catbox.moe","https://civitai.com","https://colab.research.google.com","https://danbooru.donmai.us","https://deviantart.com","https://discord.gg","https://drive.google.com","https://facebook.com","https://fanbox.cc","https://fantasy.ai","https://gelbooru.com","https://gist.github.com","https://gitgud.io","https://github.com","https://hastebin.com","https://huggingface.co","https://i.imgur.com","https://imagecache.civitai.com","https://imgur.com","https://instagram.com","https://ko-fi.com","https://mega.nz","https://pastebin.com","https://patreon.com","https://piratediffusion.com","https://reddit.com","https://rentry.org","https://seek.art","https://sinkin.ai","https://streamable.com","https://t.me","https://tinypic.host","https://tumblr.com","https://twitter.com","https://upscale.wiki","https://www.deviantart.com","https://www.pixiv.net","https://www.sdcompendium.com","https://yodayo.com","https://youtube.com"]');function u(e){return new URL(e).hostname.split(".").slice(-2).join(".")}function d(e,t){return e.trim().split((null==t?void 0:t.splitNumbers)?/([A-Z][a-z]+|[0-9]+)/:/([A-Z][a-z]+)/).map(e=>e.trim()).filter(Boolean).join(" ")}r(48764).lW;let f={usd:["$",100],aud:["$",100],cad:["$",100],eur:["€",100],gbp:["\xa3",100],jpy:["\xa5",1],krw:["₩",1]};function p(e,t){var r;let[n,i]=null!==(r=f[t.toLowerCase()])&&void 0!==r?r:["$",100],o="00"!==(e/i).toFixed(2).split(".")[1];return n+(e/i).toLocaleString(void 0,{minimumFractionDigits:o?2:0})}let h={LoCon:"LyCORIS",LORA:"LoRA",DoRA:"DoRA",scheduler:"Sampler",TextualInversion:"Embedding",MotionModule:"Motion",BenefactorsOnly:"Supporters Only",ModelVersion:"Model Version",ClubMembership:"Club Membership",Redeemable:"Redeemed Code","PixArt E":"PixArt Σ","PixArt a":"PixArt α",ProfileDecoration:"Avatar Decoration",CogVideoX:"CogVideoX",minimax:"Hailou by MiniMax"};function m(e,t){var r,n,i;let{splitNumbers:o=!0}=null!=t?t:{};return e?null!==(i=null!==(n=null==t?void 0:null===(r=t.overwrites)||void 0===r?void 0:r[e])&&void 0!==n?n:h[e])&&void 0!==i?i:d(e,{splitNumbers:o}):""}function g(e){var t,r;return null===(r=e.match(/(^\S\S?|\b\S)?/g))||void 0===r?void 0:null===(t=r.join("").match(/(^\S|\S$)?/g))||void 0===t?void 0:t.join("").toUpperCase()}let v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",y=v.length;function b(e){let t="";for(let r=0;r>>0)+2)}function w(e){return a()(e,{lower:!0,strict:!0})}function S(e){return e?e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():""}function k(e){return e?e.replace(" ","_").replace(/[^a-zA-Z0-9_]/g,"").toLowerCase():""}function j(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()}let E=e=>{let t=u(e);return c.map(u).includes(t)};function O(e){let t=0;for(let r=0,n=e.length;r{let[,t]=e;return t.baseModels.includes(c)}))||void 0===t?void 0:t[0])&&void 0!==a?a:"multi",m=null!==(l=z[u])&&void 0!==l?l:"unknown";return null===(o=i.stringify({ecosystem:h.toLowerCase(),type:m,source:p,id:String(d),version:String(f)}))||void 0===o?void 0:null===(n=o.replace("pony","sdxl"))||void 0===n?void 0:null===(r=n.replace("illustrious","sdxl"))||void 0===r?void 0:r.replace("sd3_5m","sd3")}function R(e){var t,r;return e&&null!==(r=null===(t=Object.values(s.Uw).find(t=>t.baseModels.includes(e)))||void 0===t?void 0:t.name)&&void 0!==r?r:"Stable Diffusion"}function _(){return Math.random().toString(36).substring(2,11)}function M(e){return e.split(/[^a-zA-Z0-9]+/).map(e=>isNaN(parseInt(e[0]))?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.toUpperCase()).join(" ")}},27925:function(e,t,r){"use strict";r.d(t,{Cr:function(){return d},Oy:function(){return l},Q_:function(){return f},WA:function(){return h},_5:function(){return u},gR:function(){return p},o:function(){return c},ok:function(){return s}});var n=r(32957),i=r(72323),o=r(27943),a=r(48600);let s=["sd15","sdxl","sd35","flux"],l={sd_1_5:{label:"Standard",pretty:"SD 1.5",type:"sd15",description:"Useful for all purposes.",air:"urn:air:sd1:checkpoint:civitai:127227@139180",baseModel:"SD 1.5"},anime:{label:"Anime",pretty:"Anime",type:"sd15",description:"Results will have an anime aesthetic.",air:"urn:air:sd1:checkpoint:civitai:84586@89927",baseModel:"SD 1.5"},semi:{label:"Semi-realistic",pretty:"Semi Real",type:"sd15",description:"Results will be a blend of anime and realism.",air:"urn:air:sd1:checkpoint:civitai:4384@128713",baseModel:"SD 1.5"},realistic:{label:"Realistic",pretty:"Realistic",type:"sd15",description:"Results will be extremely realistic.",air:"urn:air:sd1:checkpoint:civitai:81458@132760",baseModel:"SD 1.5"},sdxl:{label:"Standard",pretty:"SDXL",type:"sdxl",description:"Useful for all purposes, and uses SDXL.",air:"urn:air:sdxl:checkpoint:civitai:101055@128078",baseModel:"SDXL 1.0"},pony:{label:"Pony",pretty:"Pony",type:"sdxl",description:"Tailored to visuals of various anthro, feral, or humanoid species.",air:"urn:air:sdxl:checkpoint:civitai:257749@290640",baseModel:"Pony"},illustrious:{label:"Illustrious",pretty:"Illustrious",type:"sdxl",description:"Optimized for illustration and animation.",air:"urn:air:sdxl:checkpoint:civitai:795765@889818",baseModel:"Illustrious"},sd3_medium:{label:"Medium",pretty:"SD 3.5 M",type:"sd35",description:"Designed for a balance of quality and efficiency.",air:"urn:air:sd3:checkpoint:civitai:896953@1003708",baseModel:"SD 3.5 Medium"},sd3_large:{label:"Large",pretty:"SD 3.5 L",type:"sd35",description:"Designed for high-quality images across diverse styles.",air:"urn:air:sd3:checkpoint:civitai:878387@983309",baseModel:"SD 3.5 Large"},flux_dev:{label:"Dev",pretty:"Flux",type:"flux",description:"High-quality images and accurate text.",air:"urn:air:flux1:checkpoint:civitai:618692@691639",baseModel:"Flux.1 D"}},c=5;async function u(e,t){return(await Promise.all(Object.entries(e.files).map(async e=>{let[r,n]=e;if(n.dir||r.startsWith("__MACOSX/")||r.endsWith(".DS_STORE"))return;let a=(0,o.mD)(r),s=(0,i.nr)(a);if(i.d1.includes(s))return t({imgBlob:await n.async("blob"),filename:r,fileExt:a})}))).filter(a.$K)}let d=(e,t)=>"flux"===e&&"rapid"===t,f=(e,t)=>"flux"!==e&&"rapid"===t,p={getModel:e=>e in l?l[e].air:e,getPriority:e=>e?n.x3.High:n.x3.Normal,getEngine:e=>"rapid"===e?n.bG.Rapid:"x-flux"===e?n.bG["X-Flux"]:n.bG.Kohya},h={amt:0,bannerId:"9-13-24",endDate:"2024-09-28 00:00:00",message:"Flux-Dev Rapid Training"}},72456:function(e,t,r){"use strict";r.d(t,{bV:function(){return eB},Eh:function(){return eD},SX:function(){return eU}});var n,i=r(32161),o=r(30819),a=r(30081),s=r(72379),l=r(89643);class c extends l.F{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||o._,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=(0,i.oE)(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(i.ZT).catch(i.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,i.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,n,o,a;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);let l=(0,i.G9)(),c={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(l)return this.abortSignalConsumed=!0,l.signal}})};u(c);let d={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(c)):Promise.reject("Missing queryFn")};u(d),null==(r=this.options.behavior)||r.onFetch(d),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=d.fetchOptions)?void 0:n.meta))&&this.dispatch({type:"fetch",meta:null==(a=d.fetchOptions)?void 0:a.meta});let f=e=>{if((0,s.DV)(e)&&e.silent||this.dispatch({type:"error",error:e}),!(0,s.DV)(e)){var t,r,n,i;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,s.Mz)({fn:d.fetchFn,abort:null==l?void 0:l.abort.bind(l),onSuccess:e=>{var t,r,n,i;if(void 0===e){f(Error("undefined"));return}this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var r,n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:(0,s.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(n=e.dataUpdatedAt)?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if((0,s.DV)(i)&&i.revert&&this.revertState)return{...this.revertState};return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),a.V.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}var u=r(33989);class d extends u.l{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var n;let o=t.queryKey,a=null!=(n=t.queryHash)?n:(0,i.Rm)(o,t),s=this.get(a);return s||(s=new c({cache:this,logger:e.getLogger(),queryKey:o,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){a.V.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=(0,i.I6)(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>(0,i._x)(r,e))}findAll(e,t){let[r]=(0,i.I6)(e,t);return Object.keys(r).length>0?this.queries.filter(e=>(0,i._x)(r,e)):this.queries}notify(e){a.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.V.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){a.V.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}var f=r(89886);class p extends u.l{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let n=new f.m({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(n),n}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){a.V.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>(0,i.X7)(e,t))}findAll(e){return this.mutations.filter(t=>(0,i.X7)(e,t))}notify(e){a.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>e.state.isPaused);return a.V.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(i.ZT)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}var h=r(15761),m=r(96474),g=r(9499);class v{constructor(e={}){this.queryCache=e.queryCache||new d,this.mutationCache=e.mutationCache||new p,this.logger=e.logger||o._,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=h.j.subscribe(()=>{h.j.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=m.N.subscribe(()=>{m.N.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=(0,i.I6)(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let n=(0,i._v)(e,t,r),o=this.getQueryData(n.queryKey);return o?Promise.resolve(o):this.fetchQuery(n)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.queryCache.find(e),o=null==n?void 0:n.state.data,a=(0,i.SE)(t,o);if(void 0===a)return;let s=(0,i._v)(e),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return a.V.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=(0,i.I6)(e,t),n=this.queryCache;a.V.batch(()=>{n.findAll(r).forEach(e=>{n.remove(e)})})}resetQueries(e,t,r){let[n,o]=(0,i.I6)(e,t,r),s=this.queryCache,l={type:"active",...n};return a.V.batch(()=>(s.findAll(n).forEach(e=>{e.reset()}),this.refetchQueries(l,o)))}cancelQueries(e,t,r){let[n,o={}]=(0,i.I6)(e,t,r);return void 0===o.revert&&(o.revert=!0),Promise.all(a.V.batch(()=>this.queryCache.findAll(n).map(e=>e.cancel(o)))).then(i.ZT).catch(i.ZT)}invalidateQueries(e,t,r){let[n,o]=(0,i.I6)(e,t,r);return a.V.batch(()=>{var e,t;if(this.queryCache.findAll(n).forEach(e=>{e.invalidate()}),"none"===n.refetchType)return Promise.resolve();let r={...n,type:null!=(e=null!=(t=n.refetchType)?t:n.type)?e:"active"};return this.refetchQueries(r,o)})}refetchQueries(e,t,r){let[n,o]=(0,i.I6)(e,t,r),s=Promise.all(a.V.batch(()=>this.queryCache.findAll(n).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:n.refetchPage}})}))).then(i.ZT);return null!=o&&o.throwOnError||(s=s.catch(i.ZT)),s}fetchQuery(e,t,r){let n=(0,i._v)(e,t,r),o=this.defaultQueryOptions(n);void 0===o.retry&&(o.retry=!1);let a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(i.ZT).catch(i.ZT)}fetchInfiniteQuery(e,t,r){let n=(0,i._v)(e,t,r);return n.behavior=(0,g.Gm)(),this.fetchQuery(n)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(i.ZT).catch(i.ZT)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>(0,i.yF)(e)===(0,i.yF)(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>(0,i.to)(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>(0,i.yF)(e)===(0,i.yF)(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>(0,i.to)(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,i.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}var y=r(67072),b=r(85945),x=r(67294);function w(e){return e.state.isPaused}function S(e){return"success"===e.state.status}let k=({children:e,options:t,state:r})=>(!function(e,t={}){let r=(0,b.NL)({context:t.context}),n=x.useRef(t);n.current=t,x.useMemo(()=>{e&&function(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),i=e.getQueryCache(),o=t.mutations||[],a=t.queries||[];o.forEach(t=>{var i;n.build(e,{...null==r?void 0:null==(i=r.defaultOptions)?void 0:i.mutations,mutationKey:t.mutationKey},t.state)}),a.forEach(t=>{var n;let o=i.get(t.queryHash),a={...t.state,fetchStatus:"idle"};if(o){o.state.dataUpdatedAte.queryClient??new v(e.queryClientConfig);var C=r(98104);function I(e){let t=e.state.error;if(t instanceof Error&&"TRPCClientError"===t.name){let r={message:t.message,data:t.data,shape:t.shape};return{...e,state:{...e.state,error:r}}}return e}var P=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)},e.prototype.getByKey=function(e){return this.keyToValue.get(e)},e.prototype.getByValue=function(e){return this.valueToKey.get(e)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),A=function(){function e(e){this.generateIdentifier=e,this.kv=new P}return e.prototype.register=function(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},e.prototype.getValue=function(e){return this.kv.getByKey(e)},e}(),T=(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),z=new(function(e){function t(){var t=e.call(this,function(e){return e.name})||this;return t.classToAllowedProps=new Map,t}return T(t,e),t.prototype.register=function(t,r){"object"==typeof r?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),e.prototype.register.call(this,t,r.identifier)):e.prototype.register.call(this,t,r)},t.prototype.getAllowedProps=function(e){return this.classToAllowedProps.get(e)},t}(A)),N=new A(function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""}),R=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function _(e,t){Object.entries(e).forEach(function(e){var r=R(e,2),n=r[0];return t(r[1],n)})}function M(e,t){return -1!==e.indexOf(t)}function D(e,t){for(var r=0;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},H=function(e,t){for(var r=0,n=t.length,i=e.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},eo=function(e,t){for(var r=0,n=t.length,i=e.length;r0?"Infinity":"-Infinity"},Number),ea(function(e){return 0===e&&1/e==-1/0},"number",function(){return"-0"},Number)];function el(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var ec=el(function(e){return!!J(e)&&!!N.getIdentifier(e)},function(e){return["symbol",N.getIdentifier(e)]},function(e){return e.description},function(e,t){var r=N.getValue(t[1]);if(!r)throw Error("Trying to deserialize unknown symbol");return r}),eu=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),ed=el(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},function(e){return["typed-array",e.constructor.name]},function(e){return eo([],ei(e))},function(e,t){var r=eu[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function ef(e){return null!=e&&!!e.constructor&&!!z.getIdentifier(e.constructor)}var ep=el(ef,function(e){return["class",z.getIdentifier(e.constructor)]},function(e){var t=z.getAllowedProps(e.constructor);if(!t)return en({},e);var r={};return t.forEach(function(t){r[t]=e[t]}),r},function(e,t){var r=z.getValue(t[1]);if(!r)throw Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),eh=el(function(e){return!!U(e)},function(e){return["custom",U(e).name]},function(e){return U(e).serialize(e)},function(e,t){var r=L[t[1]];if(!r)throw Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),em=[ep,ec,eh,ed],eg=function(e){var t=D(em,function(t){return t.isApplicable(e)});if(t)return{value:t.transform(e),type:t.annotation(e)};var r=D(es,function(t){return t.isApplicable(e)});if(r)return{value:r.transform(e),type:r.annotation}},ev={};es.forEach(function(e){ev[e.annotation]=e});var ey=function(e,t){if(G(t))switch(t[0]){case"symbol":return ec.untransform(e,t);case"class":return ep.untransform(e,t);case"custom":return eh.untransform(e,t);case"typed-array":return ed.untransform(e,t);default:throw Error("Unknown transformation: "+t)}else{var r=ev[t];if(!r)throw Error("Unknown transformation: "+t);return r.untransform(e)}},eb=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function ex(e){if(M(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(M(e,"prototype"))throw Error("prototype is not allowed as a property");if(M(e,"constructor"))throw Error("constructor is not allowed as a property")}var ew=function(e,t,r){if(ex(t),0===t.length)return r(e);for(var n=e,i=0;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},ek=function(e,t){for(var r=0,n=t.length,i=e.length;re(t,r)):!function(e){if("Object"!==eE(e))return!1;let t=Object.getPrototypeOf(e);return t.constructor===Object&&t===Object.prototype}(t)?t:[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)].reduce((n,i)=>{if(eO(r.props)&&!r.props.includes(i))return n;let o=e(t[i],r);return!function(e,t,r,n,i){let o=({}).propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===o&&(e[t]=r),i&&"nonenumerable"===o&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}(n,i,o,t,r.nonenumerable),n},{})}(r);return(null==n?void 0:n.values)&&(t=i,function e(t,r,n){if(void 0===n&&(n=[]),t){if(!G(t)){_(t,function(t,i){return e(t,r,ek(ek([],eS(n)),eS(er(i))))});return}var i=eS(t,2),o=i[0],a=i[1];a&&_(a,function(t,i){e(t,r,ek(ek([],eS(n)),eS(er(i))))}),r(o,n)}}(n.values,function(e,r){t=ew(t,r,function(t){return ey(t,e)})}),i=t),(null==n?void 0:n.referentialEqualities)&&(i=function(e,t){function r(t,r){var n,i,o=(n=e,ex(i=er(r)),i.forEach(function(e){n=n[e]}),n);t.map(er).forEach(function(t){e=ew(e,t,function(){return o})})}if(G(t)){var n=eS(t,2),i=n[0],o=n[1];i.forEach(function(t){e=ew(e,er(t),function(){return e})}),o&&_(o,r)}else _(t,r);return e}(i,n.referentialEqualities)),i},eA={stringify:function(e){return JSON.stringify(eI(e))},parse:function(e){return eP(JSON.parse(e))},serialize:eI,deserialize:eP,registerClass:function(e,t){return z.register(e,t)},registerSymbol:function(e,t){return N.register(e,t)},registerCustom:function(e,t){return F(eC({name:t},e))},allowErrorProps:function(){for(var e=[],t=0;te=>{let{next:t,op:r}=e,n=window.isAuthed,i=(0,eR.HO)({authed:n||void 0}),o={...r.input,...i};return t({...r,input:o})};function eF(){var e;let t=null!==(e=window.localStorage.getItem("fingerprint"))&&void 0!==e?e:"";return{...eM,"x-fingerprint":t?JSON.parse(t):void 0}}let eU=function(e){let t=(0,E.c)(e),n=function(e){let{config:t}=e;return n=>{let i=(0,j.x3)(e),o=r=>{let[o]=(0,x.useState)(()=>{if(r.trpc)return r.trpc;let n=t({}),o=O(n),a=i.createClient(n);return{abortOnUnmount:n.abortOnUnmount,queryClient:o,trpcClient:a,ssrState:!!e.ssr&&"mounting",ssrContext:null}}),{queryClient:a,trpcClient:s,ssrState:l,ssrContext:c}=o,u=i.useDehydratedState(s,r.pageProps?.trpcState);return x.createElement(i.Provider,{abortOnUnmount:o.abortOnUnmount??!1,client:s,queryClient:a,ssrState:l,ssrContext:c},x.createElement(b.aH,{client:a},x.createElement(k,{state:u},x.createElement(n,Object.assign({},r)))))};(n.getInitialProps??e.ssr)&&(o.getInitialProps=async i=>{let o=async()=>{if("function"==typeof e.ssr){if("undefined"!=typeof window)return!1;try{return await e.ssr({ctx:i.ctx})}catch(e){return!1}}return e.ssr},a=await o(),s=i.AppTree,l=!!i.Component,c=l?i.ctx:i,u={};if(n.getInitialProps){let e=await n.getInitialProps(i);u={...l?e.pageProps??{}:e,...u}}let d=e=>l?{pageProps:e}:e;if("undefined"!=typeof window||!a)return d(u);let f=t({ctx:c}),p=(0,j.BJ)(f),h=O(f),m={pageProps:u,trpc:{config:f,trpcClient:p,queryClient:h,ssrState:"prepass",ssrContext:c}},g=await r.e(9774).then(r.t.bind(r,22404,19));for(;g.renderToString((0,x.createElement)(s,m)),h.isFetching();)await new Promise(e=>{let t=h.getQueryCache().subscribe(r=>{r?.query.getObserversCount()===0&&(e(),t())})});let v=function(e,t={}){let r=[],n=[];if(!1!==t.dehydrateMutations){let n=t.shouldDehydrateMutation||w;e.getMutationCache().getAll().forEach(e=>{n(e)&&r.push({mutationKey:e.options.mutationKey,state:e.state})})}if(!1!==t.dehydrateQueries){let r=t.shouldDehydrateQuery||S;e.getQueryCache().getAll().forEach(e=>{r(e)&&n.push({state:e.state,queryKey:e.queryKey,queryHash:e.queryHash})})}return{mutations:r,queries:n}}(h,{shouldDehydrateQuery:e=>!("idle"===e.state.fetchStatus&&"loading"===e.state.status)}),y={...v,queries:v.queries.map(I),mutations:v.mutations.map(I)};u.trpcState=p.runtime.combinedTransformer.output.serialize(y);let b=d(u);if("responseMeta"in e){let t=e.responseMeta?.({ctx:c,clientErrors:[...v.queries,...v.mutations].map(e=>e.state.error).flatMap(e=>e instanceof Error&&"TRPCClientError"===e.name?[e]:[])})??{};for(let[e,r]of Object.entries(t.headers??{}))"string"==typeof r&&c.res?.setHeader(e,r);t.status&&c.res&&(c.res.statusCode=t.status)}return b});let a=n.displayName??n.name??"Component";return o.displayName=`withTRPC(${a})`,o}}(e);return(0,C.yh)(e=>"useContext"===e||"useUtils"===e?()=>{let e=t.useUtils();return(0,x.useMemo)(()=>(0,E.a)(e),[e])}:"useQueries"===e?t.useQueries:"withTRPC"===e?n:(0,E.b)(e,t))}({config:()=>({queryClient:eD,transformer:eA,links:[eL,(0,y.gb)({enabled:e=>eT.r8&&ez.O.NEXT_PUBLIC_LOG_TRPC||"down"===e.direction&&e.result instanceof Error}),(0,y.u_)({condition:e=>"query"!==e.type||!0===e.context.skipBatch,true:(0,y.ch)({url:e_,headers:eF}),false:(0,y.ch)({url:e_,headers:eF})})]}),ssr:!1}),eB=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"There was an error while performing your request";try{let r=JSON.parse(e.message);(0,eN.s9)({title:t,error:r})}catch(r){(0,eN.s9)({title:t,error:Error(e.message)})}}},48600:function(e,t,r){"use strict";function n(e){return null!=e}function i(e){return!1===isNaN(Number(e))}function o(e){try{let t=new URL(e);if("javascript:"===t.protocol)return!1;return!0}catch(e){return!1}}function a(e,t){return{key:e,value:t}}r.d(t,{$K:function(){return n},K2:function(){return o},_x:function(){return a},hj:function(){return i}})},25291:function(e,t,r){"use strict";r.d(t,{Cz:function(){return a},Ef:function(){return l},H0:function(){return p},HZ:function(){return g},RV:function(){return s},Rs:function(){return f},W7:function(){return c},XZ:function(){return v},f7:function(){return d},o8:function(){return u},rK:function(){return h},sn:function(){return m}});var n=r(1604),i=r(28270),o=r(73679);function a(e){return n.z.preprocess(e=>(0,o.D)(e),null!=e?e:n.z.number())}function s(e){return n.z.preprocess(e=>(0,o.y)(e),null!=e?e:n.z.number().array())}function l(){return n.z.preprocess(e=>{if("string"==typeof e){let t={};return e.split(",").forEach(e=>{let[r,n]=e.split(":");t[r]=null!=n?n:r}),t}return e},n.z.record(n.z.string()))}function c(e){return Array.isArray(e)||"string"!=typeof e?(null!=e?e:[]).map(String):e.split(",").map(e=>e.trim())}function u(){return n.z.preprocess(c,n.z.array(n.z.string()))}function d(e){return n.z.preprocess(c,n.z.array(e))}function f(e){return n.z.preprocess(e=>c(e).map(o.D),n.z.array(n.z.number()))}function p(){return n.z.preprocess(e=>{if(e&&("string"==typeof e||"number"==typeof e))return new Date(e)},n.z.date().optional())}function h(){return n.z.preprocess(e=>"string"==typeof e?"true"===e:"number"==typeof e?1===e:"boolean"==typeof e?e:void 0,n.z.boolean())}function m(e){return n.z.preprocess((t,r)=>{if(t)try{let r=String(t),n=(0,i.Z6)(r,e);if(0===n.length)return null;return n}catch(e){r.addIssue({code:n.z.ZodIssueCode.custom,message:e.message})}},n.z.string().nullish())}function g(e){let[t,...r]=Object.keys(e);return n.z.enum([t,...r])}function v(e){return n.z.custom(t=>e.includes(t))}},46673:function(e){e.exports={root:"Burger_root__0ZjJO",burger:"Burger_burger__oacyO"}},22103:function(e){e.exports={content:"AspectRatioImageCard_content__IGj_A",image:"AspectRatioImageCard_image__1xNTQ",inView:"AspectRatioImageCard_inView__UwqN_",linkOrClick:"AspectRatioImageCard_linkOrClick__d_K_4",top:"AspectRatioImageCard_top__JUBpc",footer:"AspectRatioImageCard_footer__FOU7a",header:"AspectRatioImageCard_header__Mmd__",gradient:"AspectRatioImageCard_gradient__NApn_",chip:"AspectRatioImageCard_chip__Ht5bv"}},88473:function(e){e.exports={light:"CosmeticLights_light__Bsu6g",red:"CosmeticLights_red__B0AgU",green:"CosmeticLights_green__mLmRu",blue:"CosmeticLights_blue__JfUiw",yellow:"CosmeticLights_yellow__xgHhY","brightness-100":"CosmeticLights_brightness-100__OaySp","flicker-100":"CosmeticLights_flicker-100__UcHl7","brightness-75":"CosmeticLights_brightness-75__A1sPl","flicker-75":"CosmeticLights_flicker-75__b_KbQ","brightness-50":"CosmeticLights_brightness-50__xBhRX","flicker-50":"CosmeticLights_flicker-50__BEQxs","brightness-25":"CosmeticLights_brightness-25__7rR0x","flicker-25":"CosmeticLights_flicker-25__YSqal"}},26769:function(e){e.exports={image:"EdgeImage_image__iH4_q",loadError:"EdgeImage_loadError__2xPd8",fadeIn:"EdgeImage_fadeIn__3cojs"}},53722:function(e){e.exports={indicator:"OnsiteIndicatore_indicator__0_Pxj",remix:"OnsiteIndicatore_remix__l6jqm"}},42956:function(e){e.exports={root:"ImageGuard_root__I2zH8",red:"ImageGuard_red__fOCqH"}},1396:function(e){e.exports={logo:"Logo_logo__5xyYV",svg:"Logo_svg__0CcnB",c:"Logo_c__5WyIP",ivit:"Logo_ivit__SHcJ3",accent:"Logo_accent__l3oG0",ai:"Logo_ai__HJ7wY",flyOver:"Logo_flyOver__9JjqA",liveNow:"Logo_liveNow__p9O6E",christmas:"Logo_christmas__YzSP5",hat:"Logo_hat__9NNFq",deer:"Logo_deer__3KGYX",prance:"Logo_prance__d9Qqm",peekOutDeer:"Logo_peekOutDeer__WFFSE",nose:"Logo_nose__SRCTr",glow:"Logo_glow__VVZge",twinkle:"Logo_twinkle__jgHh0",halloween:"Logo_halloween__ZtZDt",peekOut:"Logo_peekOut__sb6je",stpatty:"Logo_stpatty__i9E77",pride:"Logo_pride__hBnV1"}},14549:function(e){e.exports={sidebar:"ResizeableSidebar_sidebar__4diku",resizer:"ResizeableSidebar_resizer__p48VS",content:"ResizeableSidebar_content__PfNTD",left:"ResizeableSidebar_left__nk1Ld",right:"ResizeableSidebar_right__9FLVC"}},72535:function(e){e.exports={label:"ToolFiltersDropdown_label__cZmXo"}},14237:function(e){e.exports={wrapper:"CosmeticWrapper_wrapper__kH8WX",border:"CosmeticWrapper_border__GnCwn",cssFrame:"CosmeticWrapper_cssFrame__Lrn6N",texture:"CosmeticWrapper_texture__cRC58",glow:"CosmeticWrapper_glow__KJ57U"}},41516:function(e){e.exports={username:"UserAvatarSimple_username__1HunV"}},10316:function(e){e.exports={vimeoWrapper:"VimeoEmbed_vimeoWrapper__B_7LR"}},48199:function(){},11987:function(e,t,r){!function(){var t={452:function(e){"use strict";e.exports=r(97334)}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab="//";var o={};!function(){var e,t=(e=i(452))&&"object"==typeof e&&"default"in e?e.default:e,r=/https?|ftp|gopher|file/;function n(e){"string"==typeof e&&(e=v(e));var n,i,o,a,s,l,c,u,d,f=(i=(n=e).auth,o=n.hostname,a=n.protocol||"",s=n.pathname||"",l=n.hash||"",c=n.query||"",u=!1,i=i?encodeURIComponent(i).replace(/%3A/i,":")+"@":"",n.host?u=i+n.host:o&&(u=i+(~o.indexOf(":")?"["+o+"]":o),n.port&&(u+=":"+n.port)),c&&"object"==typeof c&&(c=t.encode(c)),d=n.search||c&&"?"+c||"",a&&":"!==a.substr(-1)&&(a+=":"),n.slashes||(!a||r.test(a))&&!1!==u?(u="//"+(u||""),s&&"/"!==s[0]&&(s="/"+s)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),{protocol:a,host:u,pathname:s=s.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:l});return""+f.protocol+f.host+f.pathname+f.search+f.hash}var a="http://",s=a+"w.w",l=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,c=/https?|ftp|gopher|file/;function u(e,t){var r="string"==typeof e?v(e):e;e="object"==typeof e?n(e):e;var i=v(t),o="";r.protocol&&!r.slashes&&(o=r.protocol,e=e.replace(r.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&i.protocol&&(o="",i.slashes||(o=i.protocol,t=t.replace(i.protocol,"")));var u=e.match(l);u&&!i.protocol&&(e=e.substr((o=u[1]+(u[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var d=new URL(e,s+"/"),f=new URL(t,d).toString().replace(s,""),p=i.protocol||r.protocol;return p+=r.slashes||i.slashes?"//":"",!o&&p?f=f.replace(a,p):o&&(f=f.replace(a,"")),c.test(f)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==f.slice(-1)||(f=f.slice(0,-1)),o&&(f=o+("/"===f[0]?f.substr(1):f)),f}function d(){}d.prototype.parse=v,d.prototype.format=n,d.prototype.resolve=u,d.prototype.resolveObject=u;var f=/^https?|ftp|gopher|file/,p=/^(.*?)([#?].*)/,h=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,m=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function v(e,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),e&&"object"==typeof e&&e instanceof d)return e;var o=(e=e.trim()).match(p);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),g.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(h),l=m.test(e),c="";a&&(f.test(a[1])||(c=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(l=!1,f.test(a[1])?(c=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(c=a[1],e="/"+a[3]));var u,v=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),y=v&&v[1],b=new d,x="",w="";try{u=new URL(e)}catch(t){x=t,c||i||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(w="/",e=e.substr(1));try{u=new URL(e,s)}catch(e){return b.protocol=c,b.href=c,b}}b.slashes=l&&!w,b.host="w.w"===u.host?"":u.host,b.hostname="w.w"===u.hostname?"":u.hostname.replace(/(\[|\])/g,""),b.protocol=x?c||null:u.protocol,b.search=u.search.replace(/\\/g,"%5C"),b.hash=u.hash.replace(/\\/g,"%5C");var S=e.split("#");!b.search&&~S[0].indexOf("?")&&(b.search="?"),b.hash||""!==S[1]||(b.hash="#"),b.query=r?t.decode(u.search.substr(1)):b.search.substr(1),b.pathname=w+(a?u.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):u.pathname),"about:"===b.protocol&&"blank"===b.pathname&&(b.protocol="",b.pathname=""),x&&"/"!==e[0]&&(b.pathname=b.pathname.substr(1)),c&&!f.test(c)&&"/"!==e.slice(-1)&&"/"===b.pathname&&(b.pathname=""),b.path=b.pathname+b.search,b.auth=[u.username,u.password].map(decodeURIComponent).filter(Boolean).join(":"),b.port=u.port,y&&!b.host.endsWith(y)&&(b.host+=y,b.port=y.slice(1)),b.href=w?""+b.pathname+b.search+b.hash:n(b);var k=/^(file)/.test(b.href)?["host","hostname"]:[];return Object.keys(b).forEach(function(e){~k.indexOf(e)||(b[e]=b[e]||null)}),b}o.parse=v,o.format=n,o.resolve=u,o.resolveObject=function(e,t){return v(u(e,t))},o.Url=d}(),e.exports=o}()},77663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l=[],c=!1,u=-1;function d(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u1)for(var r=1;r0&&l>s&&(l=s);for(var c=0;c=0?(u=h.substr(0,m),d=h.substr(m+1)):(u=h,d=""),f=decodeURIComponent(u),p=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(o,f))?t(o[f])?o[f].push(p):o[f]=[o[f],p]:o[f]=p}return o};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,a,s){return(o=o||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var s=encodeURIComponent(t(i))+a;return r(e[i])?n(e[i],function(e){return s+encodeURIComponent(t(e))}).join(o):s+encodeURIComponent(t(e[i]))}).join(o):s?encodeURIComponent(t(s))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n=l)return g;n=r(d),i=[],","===n.slice(-1)?(n=n.replace(f,""),v()):function(){for(r(c),o="",a="in descriptor";;){if(s=e.charAt(m),"in descriptor"===a){if(t(s))o&&(i.push(o),o="",a="after descriptor");else if(","===s){m+=1,o&&i.push(o),v();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&i.push(o),v();return}else o+=s}else if("in parens"===a){if(")"===s)o+=s,a="in descriptor";else if(""===s){i.push(o),v();return}else o+=s}else if("after descriptor"===a){if(t(s));else if(""===s){v();return}else a="in descriptor",m-=1}m+=1}}()}function v(){var t,r,o,a,s,l,c,u,d,f=!1,m={};for(a=0;ae[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>e.root().toProxy();if("nodes"===t)return e.nodes.map(e=>e.toProxy());if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(let t of e=e.slice(0))t.parent&&t.parent.removeChild(t,"ignore");else if("root"===e.type&&"document"!==this.type)for(let t of e=e.nodes.slice(0))t.parent&&t.parent.removeChild(t,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new o(e)];else if(e.text)e=[new u(e)];else throw Error("Unknown node type in node creation");return e.map(e=>(e[l]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&function e(t){if(t[s]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}f.registerParse=e=>{n=e},f.registerRule=e=>{i=e},f.registerAtRule=e=>{o=e},f.registerRoot=e=>{a=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,a.prototype),e[l]=!0,e.nodes&&e.nodes.forEach(e=>{f.rebuild(e)})}},42671:function(e,t,r){"use strict";let n=r(74241),i=r(22868);class o extends Error{constructor(e,t,r,n,i,a){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),a&&(this.plugin=a),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){let t,r;if(!this.source)return"";let o=this.source;null==e&&(e=n.isColorSupported),i&&e&&(o=i(o));let a=o.split(/\r?\n/),s=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(e){let{bold:e,gray:i,red:o}=n.createColors(!0);t=t=>e(o(t)),r=e=>i(e)}else t=r=e=>e;return a.slice(s,l).map((e,n)=>{let i=s+1+n,o=" "+(" "+i).slice(-c)+" | ";if(i===this.line){let n=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(o)+e+"\n "+n+t("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},94258:function(e,t,r){"use strict";let n=r(65631);class i extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},26461:function(e,t,r){"use strict";let n,i;let o=r(21019);class a extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new i,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a},50250:function(e,t,r){"use strict";let n=r(94258),i=r(47981),o=r(69932),a=r(41353),s=r(5995),l=r(41025),c=r(31675);function u(e,t){if(Array.isArray(e))return e.map(e=>u(e));let{inputs:r,...d}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:i.prototype}),t.push(r)}if(d.nodes&&(d.nodes=e.nodes.map(e=>u(e,t))),d.source){let{inputId:e,...r}=d.source;d.source=r,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new l(d);if("decl"===d.type)return new n(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new o(d);if("atrule"===d.type)return new a(d);throw Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5995:function(e,t,r){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:i}=r(70209),{fileURLToPath:o,pathToFileURL:a}=r(11987),{isAbsolute:s,resolve:l}=r(99830),{nanoid:c}=r(62961),u=r(22868),d=r(42671),f=r(47981),p=Symbol("fromOffsetCache"),h=!!(n&&i),m=!!(l&&s);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=l(t.from)),m&&h){let e=new f(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,o,s;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);o=e.line,s=e.col}else o=n.line,s=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let l=this.origin(t,r,o,s);return(i=l?new d(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new d(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:s,line:o},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(a&&(i.input.url=a(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[p])r=this[p];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let n=0,i=e.length;n=t)n=r.length-1;else{let t,i=r.length-2;for(;n>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){let i,l;if(!this.map)return!1;let c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof r&&(i=c.originalPositionFor({column:n,line:r})),l=s(u.source)?a(u.source):new URL(u.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(o)d.file=o(l);else throw Error("file: protocol is not available in this PostCSS build")}let f=c.sourceContentFor(u.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=g,g.default=g,u&&u.registerInput&&u.registerInput(g)},21186:function(e,t,r){"use strict";let{isClean:n,my:i}=r(65513),o=r(48505),a=r(67088),s=r(21019),l=r(26461);r(72448);let c=r(83632),u=r(66939),d=r(41025),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=f[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function v(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[n]=!1,e.nodes&&e.nodes.forEach(e=>y(e)),e}let b={};class x{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"==typeof t&&null!==t&&("root"===t.type||"document"===t.type))n=y(t);else if(t instanceof x||t instanceof c)n=y(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[i]&&s.rebuild(n)}this.result=new c(e,n,r),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!p[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[r]){if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(m(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(m(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new o(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit){if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex{e[n]||this.walkSync(e)});else{let r=this.listeners[t];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}x.registerPostcss=e=>{b=e},e.exports=x,x.default=x,d.registerLazyResult(x),l.registerLazyResult(x)},54715:function(e){"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n"," "]),split(e,t,r){let n=[],i="",o=!1,a=0,s=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:s?r===l&&(s=!1):'"'===r||"'"===r?(s=!0,l=r):"("===r?a+=1:")"===r?a>0&&(a-=1):0===a&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};e.exports=t,t.default=t},48505:function(e,t,r){"use strict";var n=r(48764).lW;let{SourceMapConsumer:i,SourceMapGenerator:o}=r(70209),{dirname:a,relative:s,resolve:l,sep:c}=r(99830),{pathToFileURL:u}=r(11987),d=r(5995),f=!!(i&&o),p=!!(a&&l&&s&&c);class h{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||a(e.file);!1===this.mapOpts.sourcesContent?(t=new i(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}}generate(){if(this.clearAnnotation(),p&&f&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,t;this.css="",this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,n=1,i="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,s,l)=>{if(this.css+=o,s&&"end"!==l&&(a.generated.line=r,a.generated.column=n-1,s.source&&s.source.start?(a.source=this.sourcePath(s),a.original.line=s.source.start.line,a.original.column=s.source.start.column-1):(a.source=i,a.original.line=1,a.original.column=0),this.map.addMapping(a)),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,s&&"start"!==l){let e=s.parent||{raws:{}};(!("decl"===s.type||"atrule"===s.type&&!s.nodes)||s!==e.last||e.raws.semicolon)&&(s.source&&s.source.end?(a.source=this.sourcePath(s),a.original.line=s.source.end.line,a.original.column=s.source.end.column-1,a.generated.line=r,a.generated.column=n-2):(a.source=i,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=n-1),this.map.addMapping(a))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?a(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=a(l(r,this.mapOpts.annotation)));let n=s(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return n?n.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(u){let t=u(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===c&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}e.exports=h},47647:function(e,t,r){"use strict";let n=r(48505),i=r(67088);r(72448);let o=r(66939),a=r(83632);class s{constructor(e,t,r){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new a(this._processor,o,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});let l=new n(i,o,this._opts,t);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=o(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},65631:function(e,t,r){"use strict";let{isClean:n,my:i}=r(65513),o=r(42671),a=r(1062),s=r(67088);class l{constructor(e={}){for(let t in this.raws={},this[n]=!1,this[i]=!0,e)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let o=t[i],a=typeof o;"parent"===i&&"object"===a?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(t=>e(t,n)):("object"===a&&null!==o&&(o=e(o)),n[i]=o)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=l,l.default=l},66939:function(e,t,r){"use strict";let n=r(21019),i=r(68867),o=r(5995);function a(e,t){let r=new i(new o(e,t));try{r.parse()}catch(e){throw e}return r.root}e.exports=a,a.default=a,n.registerParse(a)},68867:function(e,t,r){"use strict";let n=r(94258),i=r(83852),o=r(69932),a=r(41353),s=r(41025),l=r(31675),c={empty:!0,space:!0};class u{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,i=new a;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),o&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,o]of e.entries()){if("("===(t=o[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(o)}r=o}return!1}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=i(this.input)}decl(e,t){let r,i,o=new n;this.init(o,e[0][2]);let a=e[e.length-1];for(";"===a[0]&&(this.semicolon=!0,e.pop()),o.source.end=this.getPosition(a[3]||a[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),o.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),o.raws.before+=e.shift()[1];for(o.source.start=this.getPosition(e[0][2]),o.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;o.prop+=e.shift()[1]}for(o.raws.between="";e.length;){if(":"===(r=e.shift())[0]){o.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),o.raws.between+=r[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let s=[];for(;e.length&&("space"===(i=e[0][0])||"comment"===i);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(o.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=s.map(e=>e[1]).join(""),s=[]),this.raw(o,"value",s.concat(e),t),o.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(r=l[0],s.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(a&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length){if(";"===r){if(n){this.decl(s,a);return}break}if("{"===r){this.rule(s);return}if("}"===r){this.tokenizer.back(s.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,o,a,s;let l=r.length,u="",d=!0;for(let e=0;ee+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n(r||(r=o()),r)}),o.process=function(e,t,r){return S([o(r)]).process(e,t)},o},S.stringify=c,S.parse=v,S.fromJSON=u,S.list=y,S.comment=e=>new p(e),S.atRule=e=>new h(e),S.decl=e=>new o(e),S.rule=e=>new b(e),S.root=e=>new x(e),S.document=e=>new d(e),S.CssSyntaxError=i,S.Declaration=o,S.Container=s,S.Processor=l,S.Document=d,S.Comment=p,S.Warning=f,S.AtRule=h,S.Result=m,S.Input=g,S.Rule=b,S.Root=x,S.Node=w,a.registerPostcss(S),e.exports=S,S.default=S},47981:function(e,t,r){"use strict";var n=r(48764).lW;let{SourceMapConsumer:i,SourceMapGenerator:o}=r(70209),{existsSync:a,readFileSync:s}=r(14777),{dirname:l,join:c}=r(99830);class u{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=l(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),n?n.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=l(e),a(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r.toString());return e}}else if(t instanceof i)return o.fromSourceMap(t).toString();else if(t instanceof o)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=c(l(e),t)),this.loadFile(t)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=u,u.default=u},71723:function(e,t,r){"use strict";let n=r(47647),i=r(21186),o=r(26461),a=r(41025);class s{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new i(this,e,t):new n(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),o.registerProcessor(s)},83632:function(e,t,r){"use strict";let n=r(11728);class i{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}e.exports=i,i.default=i},41025:function(e,t,r){"use strict";let n,i;let o=r(21019);class a extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new n(new i,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{i=e},e.exports=a,a.default=a,o.registerRoot(a)},31675:function(e,t,r){"use strict";let n=r(21019),i=r(54715);class o extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=o,o.default=o,n.registerRule(o)},1062:function(e){"use strict";let t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class r{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(void 0!==(i=e.raws[r]))return!1})}return void 0===i&&(i=t[n]),a.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=r,r.default=r},67088:function(e,t,r){"use strict";let n=r(1062);function i(e,t){new n(t).stringify(e)}e.exports=i,i.default=i},65513:function(e){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},83852:function(e){"use strict";let t=/[\t\n\f\r "#'()/;[\\\]{}]/g,r=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,i=/[\da-f]/i;e.exports=function(e,o={}){let a,s,l,c,u,d,f,p,h,m,g=e.css.valueOf(),v=o.ignoreErrors,y=g.length,b=0,x=[],w=[];function S(t){throw e.error("Unclosed "+t,b)}return{back:function(e){w.push(e)},endOfFile:function(){return 0===w.length&&b>=y},nextToken:function(e){if(w.length)return w.pop();if(b>=y)return;let o=!!e&&e.ignoreUnclosed;switch(a=g.charCodeAt(b)){case 10:case 32:case 9:case 13:case 12:s=b;do s+=1,a=g.charCodeAt(s);while(32===a||10===a||9===a||13===a||12===a);m=["space",g.slice(b,s)],b=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(a);m=[e,e,b];break}case 40:if(p=x.length?x.pop()[1]:"",h=g.charCodeAt(b+1),"url"===p&&39!==h&&34!==h&&32!==h&&10!==h&&9!==h&&12!==h&&13!==h){s=b;do{if(d=!1,-1===(s=g.indexOf(")",s+1))){if(v||o){s=b;break}S("bracket")}for(f=s;92===g.charCodeAt(f-1);)f-=1,d=!d}while(d);m=["brackets",g.slice(b,s+1),b,s],b=s}else s=g.indexOf(")",b+1),c=g.slice(b,s+1),-1===s||n.test(c)?m=["(","(",b]:(m=["brackets",c,b,s],b=s);break;case 39:case 34:l=39===a?"'":'"',s=b;do{if(d=!1,-1===(s=g.indexOf(l,s+1))){if(v||o){s=b+1;break}S("string")}for(f=s;92===g.charCodeAt(f-1);)f-=1,d=!d}while(d);m=["string",g.slice(b,s+1),b,s],b=s;break;case 64:t.lastIndex=b+1,t.test(g),s=0===t.lastIndex?g.length-1:t.lastIndex-2,m=["at-word",g.slice(b,s+1),b,s],b=s;break;case 92:for(s=b,u=!0;92===g.charCodeAt(s+1);)s+=1,u=!u;if(a=g.charCodeAt(s+1),u&&47!==a&&32!==a&&10!==a&&9!==a&&13!==a&&12!==a&&(s+=1,i.test(g.charAt(s)))){for(;i.test(g.charAt(s+1));)s+=1;32===g.charCodeAt(s+1)&&(s+=1)}m=["word",g.slice(b,s+1),b,s],b=s;break;default:47===a&&42===g.charCodeAt(b+1)?(0===(s=g.indexOf("*/",b+2)+1)&&(v||o?s=g.length:S("comment")),m=["comment",g.slice(b,s+1),b,s]):(r.lastIndex=b+1,r.test(g),s=0===r.lastIndex?g.length-1:r.lastIndex-2,m=["word",g.slice(b,s+1),b,s],x.push(m)),b=s}return b++,m},position:function(){return b}}}},72448:function(e){"use strict";let t={};e.exports=function(e){!t[e]&&(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},11728:function(e){"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},92703:function(e,t,r){"use strict";var n=r(50414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},45697:function(e,t,r){e.exports=r(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},17563:function(e,t,r){"use strict";let n=r(70610),i=r(44020),o=r(80500),a=r(92806),s=e=>null==e,l=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function d(e,t){return t.decode?i(e):e}function f(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function p(e){let t=(e=f(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){n[e]=r;return}void 0===n[e]&&(n[e]={}),n[e][t[1]]=r};case"bracket":return(e,r,n)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"colon-list-separator":return(e,r,n)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&d(r,e).includes(e.arrayFormatSeparator);r=o?d(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i){n[t]=r?d(r,e):r;return}let o=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===n[t]){n[t]=o;return}n[t]=[].concat(n[t],o)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:d(a,t),r(d(e,t),a,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=h(r[e],t);else n[e]=h(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&s(e[r])||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[",i,"]"].join("")]:[...r,[u(t,e),"[",u(i,e),"]=",u(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length)?[[u(r,e),t,u(i,e)].join("")]:[[n,u(i,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,u(t,e)]:[...r,[u(t,e),"=",u(n,e)].join("")]}}(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(r=>{let i=e[r];return void 0===i?"":null===i?u(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":i.reduce(n(r),[]).join("&"):u(r,t)+"="+u(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[l]:!0},r);let n=f(e.url).split("?")[0]||"",i=t.extract(e.url),o=Object.assign(t.parse(i,{sort:!1}),e.query),a=t.stringify(o,r);a&&(a=`?${a}`);let s=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(s=`#${r[l]?u(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${a}${s}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[l]:!1},n);let{url:i,query:o,fragmentIdentifier:s}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(o,r),fragmentIdentifier:s},n)},t.exclude=(e,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},19787:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},20707:function(e,t,r){"use strict";var n=r(55413),i=r(65768),o=r(19787);e.exports={formats:o,parse:i,stringify:n}},65768:function(e,t,r){"use strict";var n=r(50340),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t){var r={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,c),d=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var d=0;r.depth>0&&null!==(s=a.exec(o))&&d0?S.join(",")||null:void 0}];else if(s(d))w=d;else{var I=Object.keys(S);w=f?I.sort(f):I}for(var P=0;P0?g+p:""}},50340:function(e,t,r){"use strict";var n=r(19787),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)){l+=s.charAt(c);continue}if(u<128){l+=a[u];continue}if(u<2048){l+=a[192|u>>6]+a[128|63&u];continue}if(u<55296||u>=57344){l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u];continue}c+=1,l+=a[240|(u=65536+((1023&u)<<10|1023&s.charCodeAt(c)))>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u]}return l},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n-1?e.split(","):e},l=function(e,t){var r={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,c),d=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var d=0;r.depth>0&&null!==(s=a.exec(o))&&d0?S.join(",")||null:void 0}];else if(s(d))w=d;else{var I=Object.keys(S);w=f?I.sort(f):I}for(var P=0;P0?g+p:""}},45766:function(e,t,r){"use strict";var n=r(72046),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)){l+=s.charAt(c);continue}if(u<128){l+=a[u];continue}if(u<2048){l+=a[192|u>>6]+a[128|63&u];continue}if(u<55296||u>=57344){l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u];continue}c+=1,l+=a[240|(u=65536+((1023&u)<<10|1023&s.charCodeAt(c)))>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u]}return l},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n0&&l>0&&!n(e[s-1],t[l-1],r.add(String(s-1))).length)u=o(s-1,l-1);else{var d=[];if(s>0){var f=o(s-1,l);d.push(a(f,{op:"remove",index:s-1}))}if(l>0){var p=o(s,l-1),h={op:"add",index:s-1,value:t[l-1]};d.push(a(p,h))}if(s>0&&l>0){var m=o(s-1,l-1),g={op:"replace",index:s-1,original:e[s-1],value:t[l-1]};d.push(a(m,g))}u=d.sort(function(e,t){return e.cost-t.cost})[0]}i[c]=u}return u})(o,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if("add"===t.op){var s=t.index+1+a,l=s=r.parent.length)return new l(t.path)}else if(void 0===r.value)return new l(t.path);return r.parent[r.key]=(0,a.clone)(t.value),null}function m(e,t){var r=o.Pointer.fromJSON(t.from).evaluate(e);if(void 0===r.value)return new l(t.from);var n=o.Pointer.fromJSON(t.path).evaluate(e);return void 0===n.parent?new l(t.path):(d(r.parent,r.key),u(n.parent,n.key,r.value),null)}function g(e,t){var r=o.Pointer.fromJSON(t.from).evaluate(e);if(void 0===r.value)return new l(t.from);var n=o.Pointer.fromJSON(t.path).evaluate(e);return void 0===n.parent?new l(t.path):(u(n.parent,n.key,(0,a.clone)(r.value)),null)}function v(e,t){var r=o.Pointer.fromJSON(t.path).evaluate(e);return(0,s.diffAny)(r.value,t.value,new o.Pointer).length?new c(r.value,t.value):null}t.TestError=c,t.add=f,t.remove=p,t.replace=h,t.move=m,t.copy=g,t.test=v;var y=function(e){function t(t){var r=e.call(this,"Invalid operation: ".concat(t.op))||this;return r.operation=t,r.name="InvalidOperationError",r}return i(t,e),t}(Error);t.InvalidOperationError=y,t.apply=function(e,t){switch(t.op){case"add":return f(e,t);case"remove":return p(e,t);case"replace":return h(e,t);case"move":return m(e,t);case"copy":return g(e,t);case"test":return v(e,t)}return new y(t)}},38424:function(e,t){"use strict";function r(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function n(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty(t,"__esModule",{value:!0}),t.Pointer=void 0;var i=function(){function e(e){void 0===e&&(e=[""]),this.tokens=e}return e.fromJSON=function(t){var n=t.split("/").map(r);if(""!==n[0])throw Error("Invalid JSON Pointer: ".concat(t));return new e(n)},e.prototype.toString=function(){return this.tokens.map(n).join("/")},e.prototype.evaluate=function(e){for(var t=null,r="",n=e,i=1,o=this.tokens.length;i]+$/;function m(e,t,r){let v,y,b,x,w,S,k,j,E;if(null==e)return"";"number"==typeof e&&(e=e.toString());let O="",C="";function I(e,t){let r=this;this.tag=e,this.attribs=t||{},this.tagPosition=O.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(w.length){let e=w[w.length-1];e.text+=r.text}},this.updateParentNodeMediaChildren=function(){w.length&&c.includes(this.tag)&&w[w.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},g,t.parser);let P=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach(function(e){P(e)&&!t.allowVulnerableTags&&console.warn(` + +⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently +vulnerable to XSS attacks. Please remove it from \`allowedTags\`. +Or, to disable this warning, add the \`allowVulnerableTags\` option +and ensure you are accounting for this risk. + +`)});let A=t.nonTextTags||["script","style","textarea","option"];t.allowedAttributes&&(v={},y={},d(t.allowedAttributes,function(e,t){v[t]=[];let r=[];e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):v[t].push(e)}),r.length&&(y[t]=RegExp("^("+r.join("|")+")$"))}));let T={},z={},N={};d(t.allowedClasses,function(e,t){v&&(f(v,t)||(v[t]=[]),v[t].push("class")),T[t]=[],N[t]=[];let r=[];e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?N[t].push(e):T[t].push(e)}),r.length&&(z[t]=RegExp("^("+r.join("|")+")$"))});let R={};d(t.transformTags,function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=m.simpleTransform(e)),"*"===t?b=r:R[t]=r});let _=!1;D();let M=new n.Parser({onopentag:function(e,r){let n;if(t.enforceHtmlBoundary&&"html"===e&&D(),j){E++;return}let i=new I(e,r);w.push(i);let c=!1,u=!!i.text;if(f(R,e)&&(n=R[e](e,r),i.attribs=r=n.attribs,void 0!==n.text&&(i.innerText=n.text),e!==n.tagName&&(i.name=e=n.tagName,k[x]=n.tagName)),b&&(n=b(e,r),i.attribs=r=n.attribs,e!==n.tagName&&(i.name=e=n.tagName,k[x]=n.tagName)),(!P(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(let t in e)if(f(e,t))return!1;return!0}(S)||null!=t.nestingLimit&&x>=t.nestingLimit)&&(c=!0,S[x]=!0,"discard"===t.disallowedTagsMode&&-1!==A.indexOf(e)&&(j=!0,E=1),S[x]=!0),x++,c){if("discard"===t.disallowedTagsMode)return;C=O,O=""}O+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(i.innerText=""),(!v||f(v,e)||v["*"])&&d(r,function(r,n){if(!h.test(n)){delete i.attribs[n];return}let c=!1;if(!v||f(v,e)&&-1!==v[e].indexOf(n)||v["*"]&&-1!==v["*"].indexOf(n)||f(y,e)&&y[e].test(n)||y["*"]&&y["*"].test(n))c=!0;else if(v&&v[e]){for(let t of v[e])if(o(t)&&t.name&&t.name===n){c=!0;let e="";if(!0===t.multiple)for(let n of r.split(" "))-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n);else t.values.indexOf(r)>=0&&(e=r);r=e}}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(n)&&F(e,r)){delete i.attribs[n];return}if("script"===e&&"src"===n){let e=!0;try{let n=U(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){let r=(t.allowedScriptHostnames||[]).find(function(e){return e===n.url.hostname}),i=(t.allowedScriptDomains||[]).find(function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)});e=r||i}}catch(t){e=!1}if(!e){delete i.attribs[n];return}}if("iframe"===e&&"src"===n){let e=!0;try{let n=U(r);if(n.isRelativeUrl)e=f(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){let r=(t.allowedIframeHostnames||[]).find(function(e){return e===n.url.hostname}),i=(t.allowedIframeDomains||[]).find(function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)});e=r||i}}catch(t){e=!1}if(!e){delete i.attribs[n];return}}if("srcset"===n)try{let e=s(r);if(e.forEach(function(e){F("srcset",e.url)&&(e.evil=!0)}),(e=p(e,function(e){return!e.evil})).length)r=p(e,function(e){return!e.evil}).map(function(e){if(!e.url)throw Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", "),i.attribs[n]=r;else{delete i.attribs[n];return}}catch(e){delete i.attribs[n];return}if("class"===n){let t=T[e],o=T["*"],s=z[e],l=N[e],c=[s,z["*"]].concat(l).filter(function(e){return e});if(!(r=t&&o?B(r,a(t,o),c):B(r,t||o,c)).length){delete i.attribs[n];return}}if("style"===n){if(t.parseStyleAttributes)try{let o=l(e+" {"+r+"}");if(r=(function(e,t){let r;if(!t)return e;let n=e.nodes[0];return(r=t[n.selector]&&t["*"]?a(t[n.selector],t["*"]):t[n.selector]||t["*"])&&(e.nodes[0].nodes=n.nodes.reduce(function(e,t){return f(r,t.prop)&&r[t.prop].some(function(e){return e.test(t.value)})&&e.push(t),e},[])),e})(o,t.allowedStyles).nodes[0].nodes.reduce(function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e},[]).join(";"),0===r.length){delete i.attribs[n];return}}catch(t){console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete i.attribs[n];return}else if(t.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}O+=" "+n,r&&r.length&&(O+='="'+L(r,!0)+'"')}else delete i.attribs[n]}),-1!==t.selfClosing.indexOf(e)?O+=" />":(O+=">",!i.innerText||u||t.textFilter||(O+=L(i.innerText),_=!0)),c&&(O=C+L(O),C="")},ontext:function(e){let r;if(j)return;let n=w[w.length-1];if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"===t.disallowedTagsMode&&("script"===r||"style"===r))O+=e;else{let n=L(e,!1);t.textFilter&&!_?O+=t.textFilter(n,r):_||(O+=n)}if(w.length){let t=w[w.length-1];t.text+=e}},onclosetag:function(e,r){if(j){if(--E)return;j=!1}let n=w.pop();if(!n)return;if(n.tag!==e){w.push(n);return}j=!!t.enforceHtmlBoundary&&"html"===e;let i=S[--x];if(i){if(delete S[x],"discard"===t.disallowedTagsMode){n.updateParentNodeText();return}C=O,O=""}if(k[x]&&(e=k[x],delete k[x]),t.exclusiveFilter&&t.exclusiveFilter(n)){O=O.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!P(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){i&&(O=C,C="");return}O+="",i&&(O=C+L(O),C=""),_=!1}},t.parser);return M.write(e),M.end(),O;function D(){O="",x=0,w=[],S={},k={},j=!1,E=0}function L(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,""")),e}function F(e,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){let e=r.indexOf("",e+4);if(-1===t)break;r=r.substring(0,e)+r.substring(t+3)}let n=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;let i=n[1].toLowerCase();return f(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function U(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;let r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}function B(e,t,r){return t?(e=e.split(/\s+/)).filter(function(e){return -1!==t.indexOf(e)||r.some(function(t){return t.test(e)})}).join(" "):e}}let g={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},m.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,i){let o;if(r)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},31304:function(e){var t;t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),t=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","∑":"soma","\xa3":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function r(r,n){if("string"!=typeof r)throw Error("slugify: string argument expected");var i=t[(n="string"==typeof n?{replacement:n}:n||{}).locale]||{},o=void 0===n.replacement?"-":n.replacement,a=void 0===n.trim||n.trim,s=r.normalize().split("").reduce(function(t,r){var a=i[r];return void 0===a&&(a=e[r]),void 0===a&&(a=r),a===o&&(a=" "),t+a.replace(n.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return n.strict&&(s=s.replace(/[^A-Za-z0-9\s]/g,"")),a&&(s=s.trim()),s=s.replace(/\s+/g,o),n.lower&&(s=s.toLowerCase()),s}return r.extend=function(t){Object.assign(e,t)},r},e.exports=t(),e.exports.default=t()},80500:function(e){"use strict";e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},70610:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},5174:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=null;if(!e||"string"!=typeof e)return r;var n=(0,i.default)(e),o="function"==typeof t;return n.forEach(function(e){if("declaration"===e.type){var n=e.property,i=e.value;o?t(n,i,e):i&&((r=r||{})[n]=i)}}),r};var i=n(r(40757))},40757:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g;function c(e){return e?e.replace(l,""):""}e.exports=function(e,l){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];l=l||{};var u=1,d=1;function f(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(n),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=l.source}h.prototype.content=e;var m=[];function g(t){var r=Error(l.source+":"+u+":"+d+": "+t);if(r.reason=t,r.filename=l.source,r.line=u,r.column=d,r.source=e,l.silent)m.push(r);else throw r}function v(t){var r=t.exec(e);if(r){var n=r[0];return f(n),e=e.slice(n.length),r}}function y(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return g("End of comment missing");var n=e.slice(2,r-2);return d+=2,f(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}return v(n),function(){var e,r=[];for(y(r);e=function(){var e=p(),r=v(i);if(r){if(b(),!v(o))return g("property missing ':'");var n=v(a),l=e({type:"declaration",property:c(r[0].replace(t,"")),value:n?c(n[0].replace(t,"")):""});return v(s),l}}();)!1!==e&&(r.push(e),y(r));return r}()}},86257:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=t.GoogleMapsEmbed=t.GoogleAnalytics=void 0;var n=r(53494);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return n.GoogleAnalytics}});var i=r(34248);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return i.GoogleMapsEmbed}});var o=r(92239);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return o.YouTubeEmbed}})},53494:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let o=i(r(89426)),a=r(17058);t.GoogleAnalytics=e=>{var t=n(e,[]);return(0,a.formatData)(o.default,t)}},34248:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let o=i(r(27395)),a=r(17058);t.GoogleMapsEmbed=e=>{var t=n(e,[]);return(0,a.formatData)(o.default,t)}},92239:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let o=i(r(88420)),a=r(17058);t.YouTubeEmbed=e=>{var t=n(e,[]);return(0,a.formatData)(o.default,t)}},17058:function(e,t){"use strict";function r(e,t,r=!1){return t?Object.keys(e).filter(e=>r?!t.includes(e):t.includes(e)).reduce((t,r)=>(t[r]=e[r],t),{}):{}}function n(e,t,r,n){let i=n&&Object.keys(n).length>0?new URL(Object.values(n)[0],e):new URL(e);return t&&r&&t.forEach(e=>{r[e]&&i.searchParams.set(e,r[e])}),i.toString()}function i(e,t,r,i,o){var a;if(!t)return`<${e}>`;let s=(null===(a=t.src)||void 0===a?void 0:a.url)?Object.assign(Object.assign({},t),{src:n(t.src.url,t.src.params,i,o)}):t,l=Object.keys(Object.assign(Object.assign({},s),r)).reduce((e,t)=>{let n=null==r?void 0:r[t],i=s[t],o=null!=n?n:i,a=!0===o?t:`${t}="${o}"`;return o?e+` ${a}`:e},"");return`<${e}${l}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=n,t.createHtml=i,t.formatData=function(e,t){var o,a,s,l,c;let u=r(t,null===(o=e.scripts)||void 0===o?void 0:o.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[])),d=r(t,null===(s=null===(a=e.html)||void 0===a?void 0:a.attributes.src)||void 0===s?void 0:s.params),f=r(t,[null===(c=null===(l=e.html)||void 0===l?void 0:l.attributes.src)||void 0===c?void 0:c.slugParam]),p=r(t,[...Object.keys(u),...Object.keys(d),...Object.keys(f)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,p,d,f):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:n(e.url,e.params,u)})):null})}},50579:function(e,t){"use strict";let r=e=>{try{return new e}catch(t){let e={};return{set(t,r){e[t]=r},get:t=>e[t]}}},n=e=>{let t,n,i,o;let a=e.length,s=r(e[0]),l=1===a;return a<3?{g:e=>void 0===(t=s.get(e[0]))||l?t:t.get(e[1]),s:(i,o)=>(l?s.set(i[0],o):void 0===(t=s.get(i[0]))?((n=r(e[1])).set(i[1],o),s.set(i[0],n)):t.set(i[1],o),o)}:{g:e=>{for(i=0,o=s;i{for(i=0,o=s;i{let r;let{g:i,s:o}=n(e);return function(){return void 0===(r=i(arguments))?o(arguments,t.apply(null,arguments)):r}}},60619:function(e,t,r){"use strict";var n=r(67294);function i(){return(i=Object.assign||function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(a,["id","volume","playbackRate","soundEnabled","interrupt","onload"]),v=n.useRef(null),y=n.useRef(!1),b=n.useState(null),x=b[0],w=b[1],S=n.useState(null),k=S[0],j=S[1],E=function(){"function"==typeof m&&m.call(this),y.current&&w(1e3*this.duration()),j(this)};o=function(){return r.e(1766).then(r.t.bind(r,41766,23)).then(function(t){if(!y.current){var r;v.current=null!==(r=t.Howl)&&void 0!==r?r:t.default.Howl,y.current=!0,new v.current(i({src:Array.isArray(e)?e:[e],volume:l,rate:u,onload:E},g))}}),function(){y.current=!1}},(0,n.useEffect)(o,[]),n.useEffect(function(){v.current&&k&&j(new v.current(i({src:Array.isArray(e)?e:[e],volume:l,onload:E},g)))},[JSON.stringify(e)]),n.useEffect(function(){k&&(k.volume(l),k.rate(u))},[l,u]);var O=n.useCallback(function(e){void 0===e&&(e={}),k&&(f||e.forceSoundEnabled)&&(h&&k.stop(),e.playbackRate&&k.rate(e.playbackRate),k.play(e.id))},[k,f,h]),C=n.useCallback(function(e){k&&k.stop(e)},[k]),I=n.useCallback(function(e){k&&k.pause(e)},[k]);return[O,{sound:k,stop:C,pause:I,duration:x}]}},53250:function(e,t,r){"use strict";var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,u=n[1];return s(function(){i.value=r,i.getSnapshot=t,c(i)&&u({inst:i})},[e,r,t]),a(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},50139:function(e,t,r){"use strict";var n=r(67294),i=r(61688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=n.useRef,l=n.useEffect,c=n.useMemo,u=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=a(e,(d=c(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(a=e,s=r)}var a,s,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,i]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},61688:function(e,t,r){"use strict";e.exports=r(53250)},52798:function(e,t,r){"use strict";e.exports=r(50139)},57632:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return s}});var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));var s=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(s)}},22868:function(){},14777:function(){},99830:function(){},70209:function(){},73897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},27424:function(e,t,r){var n=r(85372),i=r(68872),o=r(86116),a=r(12218);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},95036:function(e,t,r){var n=r(18698).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},64062:function(e,t,r){var n=r(18698).default,i=r(95036);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},18698:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116:function(e,t,r){var n=r(73897);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}},e.exports.__esModule=!0,e.exports.default=e.exports},33496:function(e,t,r){var n=r(73808),i=r(6015),o=r(46035),a=r(3515);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},64687:function(e,t,r){var n=r(17061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},62961:function(e){e.exports={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}},87462:function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}r.d(t,{Z:function(){return n}})},88301:function(e,t,r){"use strict";function n(e){return e.split("-")[1]}function i(e){return"y"===e?"height":"width"}function o(e){return e.split("-")[0]}function a(e){return["top","bottom"].includes(o(e))?"x":"y"}function s(e,t,r){let s,{reference:l,floating:c}=e,u=l.x+l.width/2-c.width/2,d=l.y+l.height/2-c.height/2,f=a(t),p=i(f),h=l[p]/2-c[p]/2,m="x"===f;switch(o(t)){case"top":s={x:u,y:l.y-c.height};break;case"bottom":s={x:u,y:l.y+l.height};break;case"right":s={x:l.x+l.width,y:d};break;case"left":s={x:l.x-c.width,y:d};break;default:s={x:l.x,y:l.y}}switch(n(t)){case"start":s[f]-=h*(r&&m?-1:1);break;case"end":s[f]+=h*(r&&m?-1:1)}return s}r.d(t,{JB:function(){return u},Qo:function(){return w},RR:function(){return b},US:function(){return d},cv:function(){return S},dp:function(){return O},dr:function(){return E},oo:function(){return l},uY:function(){return j},x7:function(){return h}});let l=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,l=o.filter(Boolean),c=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=s(u,n,c),p=n,h={},m=0;for(let r=0;r({name:"arrow",options:e,async fn(t){let{element:r,padding:o=0}=e||{},{x:s,y:l,placement:u,rects:d,platform:h,elements:m}=t;if(null==r)return{};let g=c(o),v={x:s,y:l},y=a(u),b=i(y),x=await h.getDimensions(r),w="y"===y,S=w?"top":"left",k=w?"bottom":"right",j=w?"clientHeight":"clientWidth",E=d.reference[b]+d.reference[y]-v[y]-d.floating[b],O=v[y]-d.reference[y],C=await (null==h.getOffsetParent?void 0:h.getOffsetParent(r)),I=C?C[j]:0;I&&await (null==h.isElement?void 0:h.isElement(C))||(I=m.floating[j]||d.floating[b]);let P=g[S],A=I-x[b]-g[k],T=I/2-x[b]/2+(E/2-O/2),z=p(P,f(T,A)),N=null!=n(u)&&T!=z&&d.reference[b]/2-(Te.concat(t,t+"-start",t+"-end"),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function g(e){return e.replace(/left|right|bottom|top/g,e=>m[e])}let v={start:"end",end:"start"};function y(e){return e.replace(/start|end/g,e=>v[e])}let b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,s,l,c;let{placement:u,middlewareData:f,rects:p,initialPlacement:h,platform:m,elements:v}=t,{mainAxis:b=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:j=!0,...E}=e,O=o(u),C=o(h)===h,I=await (null==m.isRTL?void 0:m.isRTL(v.floating)),P=w||(C||!j?[g(h)]:function(e){let t=g(e);return[y(e),t,y(t)]}(h));w||"none"===k||P.push(...function(e,t,r,i){let a=n(e),s=function(e,t,r){let n=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(o(e),"start"===r,i);return a&&(s=s.map(e=>e+"-"+a),t&&(s=s.concat(s.map(y)))),s}(h,j,k,I));let A=[h,...P],T=await d(t,E),z=[],N=(null==(r=f.flip)?void 0:r.overflows)||[];if(b&&z.push(T[O]),x){let{main:e,cross:t}=function(e,t,r){void 0===r&&(r=!1);let o=n(e),s=a(e),l=i(s),c="x"===s?o===(r?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=g(c)),{main:c,cross:g(c)}}(u,p,I);z.push(T[e],T[t])}if(N=[...N,{placement:u,overflows:z}],!z.every(e=>e<=0)){let e=((null==(s=f.flip)?void 0:s.index)||0)+1,t=A[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let r=null==(l=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:l.placement;if(!r)switch(S){case"bestFit":{let e=null==(c=N.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:c[0];e&&(r=e);break}case"initialPlacement":r=h}if(u!==r)return{reset:{placement:r}}}return{}}}};function x(e){let t=f(...e.map(e=>e.left)),r=f(...e.map(e=>e.top));return{x:t,y:r,width:p(...e.map(e=>e.right))-t,height:p(...e.map(e=>e.bottom))-r}}let w=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:s,strategy:l}=t,{padding:d=2,x:h,y:m}=e,g=Array.from(await (null==s.getClientRects?void 0:s.getClientRects(n.reference))||[]),v=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),r=[],n=null;for(let e=0;en.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(e=>u(x(e)))}(g),y=u(x(g)),b=c(d),w=await s.getElementRects({reference:{getBoundingClientRect:function(){if(2===v.length&&v[0].left>v[1].right&&null!=h&&null!=m)return v.find(e=>h>e.left-b.left&&he.top-b.top&&m=2){if("x"===a(r)){let e=v[0],t=v[v.length-1],n="top"===o(r),i=e.top,a=t.bottom,s=n?e.left:t.left,l=n?e.right:t.right;return{top:i,bottom:a,left:s,right:l,width:l-s,height:a-i,x:s,y:i}}let e="left"===o(r),t=p(...v.map(e=>e.right)),n=f(...v.map(e=>e.left)),i=v.filter(r=>e?r.left===n:r.right===t),s=i[0].top,l=i[i.length-1].bottom;return{top:s,bottom:l,left:n,right:t,width:t-n,height:l-s,x:n,y:s}}return y}},floating:n.floating,strategy:l});return i.reference.x!==w.reference.x||i.reference.y!==w.reference.y||i.reference.width!==w.reference.width||i.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},S=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:r,y:i}=t,s=await async function(e,t){let{placement:r,platform:i,elements:s}=e,l=await (null==i.isRTL?void 0:i.isRTL(s.floating)),c=o(r),u=n(r),d="x"===a(r),f=["left","top"].includes(c)?-1:1,p=l&&d?-1:1,h="function"==typeof t?t(e):t,{mainAxis:m,crossAxis:g,alignmentAxis:v}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return u&&"number"==typeof v&&(g="end"===u?-1*v:v),d?{x:g*p,y:m*f}:{x:m*f,y:g*p}}(t,e);return{x:r+s.x,y:i+s.y,data:s}}}};function k(e){return"x"===e?"y":"x"}let j=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...u}=e,h={x:r,y:n},m=await d(t,u),g=a(o(i)),v=k(g),y=h[g],b=h[v];if(s){let e="y"===g?"bottom":"right";y=p(y+m["y"===g?"top":"left"],f(y,y-m[e]))}if(l){let e="y"===v?"bottom":"right";b=p(b+m["y"===v?"top":"left"],f(b,b-m[e]))}let x=c.fn({...t,[g]:y,[v]:b});return{...x,data:{x:x.x-r,y:x.y-n}}}}},E=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=e,f={x:r,y:n},p=a(i),h=k(p),m=f[p],g=f[h],v="function"==typeof c?c(t):c,y="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){let e="y"===p?"height":"width",t=s.reference[p]-s.floating[e]+y.mainAxis,r=s.reference[p]+s.reference[e]-y.mainAxis;mr&&(m=r)}if(d){var b,x;let e="y"===p?"width":"height",t=["top","left"].includes(o(i)),r=s.reference[h]-s.floating[e]+(t&&(null==(b=l.offset)?void 0:b[h])||0)+(t?0:y.crossAxis),n=s.reference[h]+s.reference[e]+(t?0:(null==(x=l.offset)?void 0:x[h])||0)-(t?y.crossAxis:0);gn&&(g=n)}return{[p]:m,[h]:g}}}},O=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let r,i;let{placement:s,rects:l,platform:c,elements:u}=t,{apply:h=()=>{},...m}=e,g=await d(t,m),v=o(s),y=n(s),b="x"===a(s),{width:x,height:w}=l.floating;"top"===v||"bottom"===v?(r=v,i=y===(await (null==c.isRTL?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(i=v,r="end"===y?"top":"bottom");let S=w-g[r],k=x-g[i],j=!t.middlewareData.shift,E=S,O=k;if(b){let e=x-g.left-g.right;O=y||j?f(k,e):e}else{let e=w-g.top-g.bottom;E=y||j?f(S,e):e}if(j&&!y){let e=p(g.left,0),t=p(g.right,0),r=p(g.top,0),n=p(g.bottom,0);b?O=x-2*(0!==e||0!==t?e+t:p(g.left,g.right)):E=w-2*(0!==r||0!==n?r+n:p(g.top,g.bottom))}await h({...t,availableWidth:O,availableHeight:E});let C=await c.getDimensions(u.floating);return x!==C.width||w!==C.height?{reset:{rects:!0}}:{}}}}},55863:function(e,t,r){"use strict";let n;r.d(t,{Kx:function(){return P},Me:function(){return R},oo:function(){return _}});var i=r(88301);function o(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function a(e){return o(e).getComputedStyle(e)}function s(e){return e instanceof o(e).Node}function l(e){return s(e)?(e.nodeName||"").toLowerCase():""}function c(){if(n)return n;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?n=e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function u(e){return e instanceof o(e).HTMLElement}function d(e){return e instanceof o(e).Element}function f(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function p(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=a(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function h(e){let t=/firefox/i.test(c()),r=a(e),n=r.backdropFilter||r.WebkitBackdropFilter;return"none"!==r.transform||"none"!==r.perspective||!!n&&"none"!==n||t&&"filter"===r.willChange||t&&!!r.filter&&"none"!==r.filter||["transform","perspective"].some(e=>r.willChange.includes(e))||["paint","layout","strict","content"].some(e=>{let t=r.contain;return null!=t&&t.includes(e)})}function m(){return/^((?!chrome|android).)*safari/i.test(c())}function g(e){return["html","body","#document"].includes(l(e))}let v=Math.min,y=Math.max,b=Math.round;function x(e){let t=a(e),r=parseFloat(t.width),n=parseFloat(t.height),i=u(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,l=b(r)!==o||b(n)!==s;return l&&(r=o,n=s),{width:r,height:n,fallback:l}}function w(e){return d(e)?e:e.contextElement}let S={x:1,y:1};function k(e){let t=w(e);if(!u(t))return S;let r=t.getBoundingClientRect(),{width:n,height:i,fallback:o}=x(t),a=(o?b(r.width):r.width)/n,s=(o?b(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function j(e,t,r,n){var a,s;void 0===t&&(t=!1),void 0===r&&(r=!1);let l=e.getBoundingClientRect(),c=w(e),u=S;t&&(n?d(n)&&(u=k(n)):u=k(e));let f=c?o(c):window,p=m()&&r,h=(l.left+(p&&(null==(a=f.visualViewport)?void 0:a.offsetLeft)||0))/u.x,g=(l.top+(p&&(null==(s=f.visualViewport)?void 0:s.offsetTop)||0))/u.y,v=l.width/u.x,y=l.height/u.y;if(c){let e=o(c),t=n&&d(n)?o(n):n,r=e.frameElement;for(;r&&n&&t!==e;){let e=k(r),t=r.getBoundingClientRect(),n=getComputedStyle(r);t.x+=(r.clientLeft+parseFloat(n.paddingLeft))*e.x,t.y+=(r.clientTop+parseFloat(n.paddingTop))*e.y,h*=e.x,g*=e.y,v*=e.x,y*=e.y,h+=t.x,g+=t.y,r=o(r).frameElement}}return(0,i.JB)({width:v,height:y,x:h,y:g})}function E(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function O(e){return d(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function C(e){return j(E(e)).left+O(e).scrollLeft}function I(e){if("html"===l(e))return e;let t=e.assignedSlot||e.parentNode||f(e)&&e.host||E(e);return f(t)?t.host:t}function P(e,t){var r;void 0===t&&(t=[]);let n=function e(t){let r=I(t);return g(r)?r.ownerDocument.body:u(r)&&p(r)?r:e(r)}(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),a=o(n);return i?t.concat(a,a.visualViewport||[],p(n)?n:[]):t.concat(n,P(n))}function A(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=o(e),n=E(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,l=0,c=0;if(i){a=i.width,s=i.height;let e=m();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:l,y:c}}(e,r);else if("document"===t)n=function(e){let t=E(e),r=O(e),n=e.ownerDocument.body,i=y(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=y(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+C(e),l=-r.scrollTop;return"rtl"===a(n).direction&&(s+=y(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:l}}(E(e));else if(d(t))n=function(e,t){let r=j(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=u(e)?k(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{let r={...t};if(m()){var s,l;let t=o(e);r.x-=(null==(s=t.visualViewport)?void 0:s.offsetLeft)||0,r.y-=(null==(l=t.visualViewport)?void 0:l.offsetTop)||0}n=r}return(0,i.JB)(n)}function T(e,t){return u(e)&&"fixed"!==a(e).position?t?t(e):e.offsetParent:null}function z(e,t){let r=o(e);if(!u(e))return r;let n=T(e,t);for(;n&&["table","td","th"].includes(l(n))&&"static"===a(n).position;)n=T(n,t);return n&&("html"===l(n)||"body"===l(n)&&"static"===a(n).position&&!h(n))?r:n||function(e){let t=I(e);for(;u(t)&&!g(t);){if(h(t))return t;t=I(t)}return null}(e)||r}let N={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[..."clippingAncestors"===r?function(e,t){let r=t.get(e);if(r)return r;let n=P(e).filter(e=>d(e)&&"body"!==l(e)),i=null,o="fixed"===a(e).position,s=o?I(e):e;for(;d(s)&&!g(s);){let e=a(s),t=h(s);"fixed"===e.position&&(i=null),(o?t||i:t||"static"!==e.position||!i||!["absolute","fixed"].includes(i.position))?i=e:n=n.filter(e=>e!==s),s=I(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=o[0],c=o.reduce((e,r)=>{let n=A(t,r,i);return e.top=y(n.top,e.top),e.right=v(n.right,e.right),e.bottom=v(n.bottom,e.bottom),e.left=y(n.left,e.left),e},A(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e,i=u(r),o=E(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&"fixed"!==n)&&(("body"!==l(r)||p(o))&&(a=O(r)),u(r))){let e=j(r);s=k(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}},isElement:d,getDimensions:function(e){return x(e)},getOffsetParent:z,getDocumentElement:E,getScale:k,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e,i=this.getOffsetParent||z,o=this.getDimensions;return{reference:function(e,t,r){let n=u(t),i=E(t),o=j(e,!0,"fixed"===r,t),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(n||!n&&"fixed"!==r){if(("body"!==l(t)||p(i))&&(a=O(t)),u(t)){let e=j(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=C(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,await i(r),n),floating:{x:0,y:0,...await o(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===a(e).direction};function R(e,t,r,n){void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=i&&!s,c=l||o?[...d(e)?P(e):e.contextElement?P(e.contextElement):[],...P(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),d(e)&&!s&&f.observe(e),d(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let p=s?j(e):null;return s&&function t(){let n=j(e);p&&(n.x!==p.x||n.y!==p.y||n.width!==p.width||n.height!==p.height)&&r(),p=n,u=requestAnimationFrame(t)}(),r(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(u)}}let _=(e,t,r)=>{let n=new Map,o={platform:N,...r},a={...o.platform,_c:n};return(0,i.oo)(e,t,{...o,platform:a})}},56312:function(e,t,r){"use strict";r.d(t,{F:function(){return l}});var n=r(87536),i=function(e,t,r){if(e&&"reportValidity"in e){var i=(0,n.U2)(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},o=function(e,t){var r=function(r){var n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?i(n.ref,r,e):n.refs&&n.refs.forEach(function(t){return i(t,r,e)})};for(var n in t.fields)r(n)},a=function(e,t){t.shouldUseNativeValidation&&o(e,t);var r={};for(var i in e){var a=(0,n.U2)(t.fields,i);(0,n.t8)(r,i,Object.assign(e[i],{ref:a&&a.ref}))}return r},s=function(e,t){for(var r={};e.length;){var i=e[0],o=i.code,a=i.message,s=i.path.join(".");if(!r[s]){if("unionErrors"in i){var l=i.unionErrors[0].errors[0];r[s]={message:l.message,type:l.code}}else r[s]={message:a,type:o}}if("unionErrors"in i&&i.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=r[s].types,u=c&&c[i.code];r[s]=(0,n.KN)(s,t,r,o,u?[].concat(u,i.message):i.message)}e.shift()}return r},l=function(e,t,r){return void 0===r&&(r={}),function(n,i,l){try{return Promise.resolve(function(i,a){try{var s=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](n,t)).then(function(e){return l.shouldUseNativeValidation&&o({},l),{errors:{},values:r.rawValues?n:e}})}catch(e){return a(e)}return s&&s.then?s.then(void 0,a):s}(0,function(e){return{values:{},errors:e.isEmpty?{}:a(s(e.errors,!l.shouldUseNativeValidation&&"all"===l.criteriaMode),l)}}))}catch(e){return Promise.reject(e)}}}},40597:function(e,t,r){"use strict";r.d(t,{ZP:function(){return i}});let n="SharedWorker"in globalThis;class i{ActualWorker;constructor(e,t){this.ActualWorker=n?new SharedWorker(e,t):new Worker(e,t)}get onmessage(){return n?this.ActualWorker?.port.onmessage:this.ActualWorker.onmessage}set onmessage(e){n?this.ActualWorker.port.onmessage=e:this.ActualWorker.onmessage=e}get onmessageerror(){return n?this.ActualWorker?.port.onmessageerror:this.ActualWorker.onmessageerror}set onmessageerror(e){n?this.ActualWorker.port.onmessageerror=e:this.ActualWorker.onmessageerror=e}start(){if(n)return this.ActualWorker?.port.start()}postMessage(e,t){return n?this.ActualWorker?.port.postMessage(e,t):this.ActualWorker.postMessage(e,t)}terminate(){return n?this.ActualWorker?.port.close():this.ActualWorker.terminate()}close(){return this.terminate()}get port(){return n?this.ActualWorker.port:this.ActualWorker}get onerror(){return this.ActualWorker.onerror}set onerror(e){this.ActualWorker.onerror=e}addEventListener(e,t,r){return n&&"error"!==e?this.ActualWorker?.port.addEventListener(e,t,r):this.ActualWorker.addEventListener(e,t,r)}removeEventListener(e,t,r){return n&&"error"!==e?this.ActualWorker?.port.removeEventListener(e,t,r):this.ActualWorker.removeEventListener(e,t,r)}dispatchEvent(e){return this.ActualWorker.dispatchEvent(e)}}},99718:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return a},hkdf:function(){return a}});let n=()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;throw Error("unable to locate global object")};var i=async(e,t,r,i,o)=>{let{crypto:{subtle:a}}=n();return new Uint8Array(await a.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:i},await a.importKey("raw",t,"HKDF",!1,["deriveBits"]),o<<3))};function o(e,t){if("string"==typeof e)return new TextEncoder().encode(e);if(!(e instanceof Uint8Array))throw TypeError(`"${t}"" must be an instance of Uint8Array or a string`);return e}async function a(e,t,r,n,a){return i(function(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw TypeError('unsupported "digest" value')}}(e),function(e){let t=o(e,"ikm");if(!t.byteLength)throw TypeError('"ikm" must be at least one byte in length');return t}(t),o(r,"salt"),function(e){let t=o(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}(n),function(e,t){if("number"!=typeof e||!Number.isInteger(e)||e<1)throw TypeError('"keylen" must be a positive integer');if(e>255*(parseInt(t.substr(3),10)>>3||20))throw TypeError('"keylen" too large');return e}(a,e))}},2459:function(e,t,r){"use strict";r.d(t,{F:function(){return o}});var n=r(14840),i=r(67294);function o(e={}){let{autoFocus:t=!1,isTextInput:r,within:o}=e,a=(0,i.useRef)({isFocused:!1,isFocusVisible:t||(0,n.E)()}),[s,l]=(0,i.useState)(!1),[c,u]=(0,i.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),d=(0,i.useCallback)(()=>u(a.current.isFocused&&a.current.isFocusVisible),[]),f=(0,i.useCallback)(e=>{a.current.isFocused=e,l(e),d()},[d]);(0,n.mG)(e=>{a.current.isFocusVisible=e,d()},[],{isTextInput:r});let{focusProps:p}=(0,n.KK)({isDisabled:o,onFocusChange:f}),{focusWithinProps:h}=(0,n.L_)({isDisabled:!o,onFocusWithinChange:f});return{isFocused:s,isFocusVisible:c,focusProps:o?h:p}}},14840:function(e,t,r){"use strict";r.d(t,{E:function(){return S},KK:function(){return l},mG:function(){return k},L_:function(){return j},XI:function(){return A}});var n=r(67294);let i="undefined"!=typeof document?n.useLayoutEffect:()=>{};new WeakMap,n.createContext(null).displayName="PressResponderContext";let o=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);class a{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function s(e){let t=(0,n.useRef)({isFocused:!1,observer:null});i(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let r=function(e){let t=(0,n.useRef)(null);return i(()=>{t.current=e},[e]),(0,n.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}(t=>{null==e||e(t)});return(0,n.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target;n.addEventListener("focusout",e=>{t.current.isFocused=!1,n.disabled&&r(new a("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer.disconnect();let e=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function l(e){let{isDisabled:t,onFocus:r,onBlur:i,onFocusChange:o}=e,a=(0,n.useCallback)(e=>{if(e.target===e.currentTarget)return i&&i(e),o&&o(!1),!0},[i,o]),l=s(a),c=(0,n.useCallback)(e=>{e.target===e.currentTarget&&document.activeElement===e.target&&(r&&r(e),o&&o(!0),l(e))},[o,r,l]);return{focusProps:{onFocus:!t&&(r||o||i)?c:void 0,onBlur:!t&&(i||o)?a:void 0}}}let c=null,u=new Set,d=!1,f=!1,p=!1,h={Tab:!0,Escape:!0};function m(e,t){for(let r of u)r(e,t)}function g(e){var t,r;f=!0,e.metaKey||(t=/^Mac/i,!("undefined"!=typeof window&&null!=window.navigator&&t.test((null===(r=window.navigator.userAgentData)||void 0===r?void 0:r.platform)||window.navigator.platform))&&e.altKey)||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(c="keyboard",m("keyboard",e))}function v(e){c="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(f=!0,m("pointer",e))}function y(e){var t,r;(0===e.mozInputSource&&e.isTrusted?0:(t=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(r=window.navigator.userAgentData)||void 0===r?void 0:r.brands.some(e=>t.test(e.brand)))||t.test(window.navigator.userAgent))&&e.pointerType)?"click"!==e.type||1!==e.buttons:0!==e.detail||e.pointerType)||(f=!0,c="virtual")}function b(e){e.target!==window&&e.target!==document&&(f||p||(c="virtual",m("virtual",e)),f=!1,p=!1)}function x(){f=!1,p=!0}function w(){if("undefined"==typeof window||d)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){f=!0,e.apply(this,arguments)},document.addEventListener("keydown",g,!0),document.addEventListener("keyup",g,!0),document.addEventListener("click",y,!0),window.addEventListener("focus",b,!0),window.addEventListener("blur",x,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",v,!0),document.addEventListener("pointermove",v,!0),document.addEventListener("pointerup",v,!0)):(document.addEventListener("mousedown",v,!0),document.addEventListener("mousemove",v,!0),document.addEventListener("mouseup",v,!0)),d=!0}function S(){return"pointer"!==c}function k(e,t,r){w(),(0,n.useEffect)(()=>{let t=(t,n)=>{(!((null==r?void 0:r.isTextInput)&&"keyboard"===t&&n instanceof KeyboardEvent)||h[n.key])&&e(S())};return u.add(t),()=>{u.delete(t)}},t)}function j(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:i,onFocusWithinChange:o}=e,a=(0,n.useRef)({isFocusWithin:!1}),l=(0,n.useCallback)(e=>{a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,r&&r(e),o&&o(!1))},[r,o,a]),c=s(l),u=(0,n.useCallback)(e=>{a.current.isFocusWithin||document.activeElement!==e.target||(i&&i(e),o&&o(!0),a.current.isFocusWithin=!0,c(e))},[i,o,c]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:u,onBlur:l}}}"undefined"!=typeof document&&("loading"!==document.readyState?w():document.addEventListener("DOMContentLoaded",w));let E=!1,O=0;function C(){E=!0,setTimeout(()=>{E=!1},50)}function I(e){"touch"===e.pointerType&&C()}function P(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",I):document.addEventListener("touchend",C),O++,()=>{--O>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",I):document.removeEventListener("touchend",C))}}function A(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:i,isDisabled:o}=e,[a,s]=(0,n.useState)(!1),l=(0,n.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,n.useEffect)(P,[]);let{hoverProps:c,triggerHoverEnd:u}=(0,n.useMemo)(()=>{let e=(e,n)=>{if(l.pointerType=n,o||"touch"===n||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let i=e.currentTarget;l.target=i,t&&t({type:"hoverstart",target:i,pointerType:n}),r&&r(!0),s(!0)},n=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let n=e.currentTarget;i&&i({type:"hoverend",target:n,pointerType:t}),r&&r(!1),s(!1)},a={};return"undefined"!=typeof PointerEvent?(a.onPointerEnter=t=>{E&&"mouse"===t.pointerType||e(t,t.pointerType)},a.onPointerLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,e.pointerType)}):(a.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},a.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||E||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},a.onMouseLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,"mouse")}),{hoverProps:a,triggerHoverEnd:n}},[t,r,i,o,l]);return(0,n.useEffect)(()=>{o&&u({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:c,isHovered:a}}},15761:function(e,t,r){"use strict";r.d(t,{j:function(){return a}});var n=r(33989),i=r(32161);class o extends n.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}let a=new o},9499:function(e,t,r){"use strict";function n(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,a,s,l;let c;let u=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,d=null==(n=e.fetchOptions)?void 0:null==(a=n.meta)?void 0:a.fetchMore,f=null==d?void 0:d.pageParam,p=(null==d?void 0:d.direction)==="forward",h=(null==d?void 0:d.direction)==="backward",m=(null==(s=e.state.data)?void 0:s.pages)||[],g=(null==(l=e.state.data)?void 0:l.pageParams)||[],v=g,y=!1,b=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?y=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{y=!0}),e.signal}})},x=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),w=(e,t,r,n)=>(v=n?[t,...v]:[...v,t],n?[r,...e]:[...e,r]),S=(t,r,n,i)=>{if(y)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);let o={queryKey:e.queryKey,pageParam:n,meta:e.options.meta};return b(o),Promise.resolve(x(o)).then(e=>w(t,n,e,i))};if(m.length){if(p){let t=void 0!==f,r=t?f:i(e.options,m);c=S(m,t,r)}else if(h){let t=void 0!==f,r=t?f:o(e.options,m);c=S(m,t,r,!0)}else{v=[];let t=void 0===e.options.getNextPageParam;c=!u||!m[0]||u(m[0],0,m)?S([],t,g[0]):Promise.resolve(w([],g[0],m[0]));for(let r=1;r{if(!u||!m[r]||u(m[r],r,m)){let o=t?g[r]:i(e.options,n);return S(n,t,o)}return Promise.resolve(w(n,g[r],m[r]))})}}else c=S([]);return c.then(e=>({pages:e,pageParams:v}))}}}}function i(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function o(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function a(e,t){if(e.getNextPageParam&&Array.isArray(t)){let r=i(e,t);return null!=r&&!1!==r}}function s(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){let r=o(e,t);return null!=r&&!1!==r}}r.d(t,{Gm:function(){return n},Qy:function(){return a},ZF:function(){return s}})},30819:function(e,t,r){"use strict";r.d(t,{_:function(){return n}});let n=console},89886:function(e,t,r){"use strict";r.d(t,{R:function(){return l},m:function(){return s}});var n=r(30819),i=r(30081),o=r(89643),a=r(72379);class s extends o.F{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||n._,this.observers=[],this.state=e.state||l(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,r,n,i,o,s,l,c,u,d,f,p,h,m,g,v,y,b,x;let w="loading"===this.state.status;try{if(!w){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(c=(u=this.mutationCache.config).onMutate)?void 0:c.call(u,this.state.variables,this));let e=await (null==(d=(f=this.options).onMutate)?void 0:d.call(f,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let p=await (()=>{var e;return this.retryer=(0,a.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,p,this.state.variables,this.state.context,this)),await (null==(r=(n=this.options).onSuccess)?void 0:r.call(n,p,this.state.variables,this.state.context)),await (null==(i=(o=this.mutationCache.config).onSettled)?void 0:i.call(o,p,null,this.state.variables,this.state.context,this)),await (null==(s=(l=this.options).onSettled)?void 0:s.call(l,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(e){try{throw await (null==(p=(h=this.mutationCache.config).onError)?void 0:p.call(h,e,this.state.variables,this.state.context,this)),await (null==(m=(g=this.options).onError)?void 0:m.call(g,e,this.state.variables,this.state.context)),await (null==(v=(y=this.mutationCache.config).onSettled)?void 0:v.call(y,void 0,e,this.state.variables,this.state.context,this)),await (null==(b=(x=this.options).onSettled)?void 0:b.call(x,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,a.Kw)(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),i.V.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}},30081:function(e,t,r){"use strict";r.d(t,{V:function(){return i}});var n=r(32161);let i=function(){let e=[],t=0,r=e=>{e()},i=e=>{e()},o=i=>{t?e.push(i):(0,n.A4)(()=>{r(i)})},a=()=>{let t=e;e=[],t.length&&(0,n.A4)(()=>{i(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||a()}return r},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{i=e}}}()},96474:function(e,t,r){"use strict";r.d(t,{N:function(){return a}});var n=r(33989),i=r(32161);class o extends n.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}}let a=new o},89643:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(32161);class i{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:n.sk?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}},72379:function(e,t,r){"use strict";r.d(t,{DV:function(){return c},Kw:function(){return s},Mz:function(){return u}});var n=r(15761),i=r(96474),o=r(32161);function a(e){return Math.min(1e3*2**e,3e4)}function s(e){return(null!=e?e:"online")!=="online"||i.N.isOnline()}class l{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function c(e){return e instanceof l}function u(e){let t,r,c,u=!1,d=0,f=!1,p=new Promise((e,t)=>{r=e,c=t}),h=()=>!n.j.isFocused()||"always"!==e.networkMode&&!i.N.isOnline(),m=n=>{f||(f=!0,null==e.onSuccess||e.onSuccess(n),null==t||t(),r(n))},g=r=>{f||(f=!0,null==e.onError||e.onError(r),null==t||t(),c(r))},v=()=>new Promise(r=>{t=e=>{let t=f||!h();return t&&r(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,f||null==e.onContinue||e.onContinue()}),y=()=>{let t;if(!f){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{var r,n;if(f)return;let i=null!=(r=e.retry)?r:3,s=null!=(n=e.retryDelay)?n:a,l="function"==typeof s?s(d,t):s,c=!0===i||"number"==typeof i&&d{if(h())return v()}).then(()=>{u?g(t):y()})})}};return s(e.networkMode)?y():v().then(y),{promise:p,cancel:t=>{f||(g(new l(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?p:Promise.resolve(),cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},33989:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});class n{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(t=>t!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}},32161:function(e,t,r){"use strict";r.d(t,{A4:function(){return O},G9:function(){return C},Gh:function(){return E},I6:function(){return f},Kp:function(){return c},PN:function(){return a},Rc:function(){return l},Rm:function(){return g},SE:function(){return o},VS:function(){return x},X7:function(){return m},ZT:function(){return i},_v:function(){return u},_x:function(){return h},cb:function(){return p},e5:function(){return s},lV:function(){return d},oE:function(){return I},sk:function(){return n},to:function(){return y},yF:function(){return v}});let n="undefined"==typeof window||"Deno"in window;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function s(e,t){return e.filter(e=>-1===t.indexOf(e))}function l(e,t,r){let n=e.slice(0);return n[t]=r,n}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t,r){return j(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function d(e,t,r){return j(e)?"function"==typeof t?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function f(e,t,r){return j(e)?[{...t,queryKey:e},r]:[e||{},t]}function p(e,t,r){return j(e)?[{...t,mutationKey:e},r]:[e||{},t]}function h(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(j(a)){if(n){if(t.queryHash!==g(a,t.options))return!1}else{if(!b(t.queryKey,a))return!1}}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(void 0===i||i===t.state.fetchStatus)&&(!o||!!o(t))}function m(e,t){let{exact:r,fetching:n,predicate:i,mutationKey:o}=e;if(j(o)){if(!t.options.mutationKey)return!1;if(r){if(v(t.options.mutationKey)!==v(o))return!1}else{if(!b(t.options.mutationKey,o))return!1}}return("boolean"!=typeof n||"loading"===t.state.status===n)&&(!i||!!i(t))}function g(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){return JSON.stringify(e,(e,t)=>S(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function y(e,t){return b(e,t)}function b(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!b(e[r],t[r]))}function x(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function S(e){if(!k(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(k(r)&&r.hasOwnProperty("isPrototypeOf"))}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function j(e){return Array.isArray(e)}function E(e){return new Promise(t=>{setTimeout(t,e)})}function O(e){E(0).then(e)}function C(){if("function"==typeof AbortController)return new AbortController}function I(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=w(t)&&w(r);if(n||S(t)&&S(r)){let i=n?t.length:Object.keys(t).length,o=n?r:Object.keys(r),a=o.length,s=n?[]:{},l=0;for(let i=0;i{let t=n.useContext(a(e,n.useContext(o)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},l=({client:e,children:t,context:r,contextSharing:i=!1})=>{n.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let s=a(r,i);return n.createElement(o.Provider,{value:!r&&i},n.createElement(s.Provider,{value:e},t))}},464:function(e,t,r){"use strict";r.d(t,{$:function(){return n}});let n=r(61688).useSyncExternalStore},67072:function(e,t,r){"use strict";function n(e){let t={subscribe(t){let r=null,n=!1,i=!1,o=!1;function a(){if(null===r){o=!0;return}!i&&(i=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){n||t.next?.(e)},error(e){n||(n=!0,t.error?.(e),a())},complete(){n||(n=!0,t.complete?.(),a())}}),o&&a(),{unsubscribe:a}},pipe:(...e)=>(0===e.length?function(e){return e}:1===e.length?e[0]:function(t){return e.reduce((e,t)=>t(e),t)})(t)};return t}r.d(t,{BJ:function(){return T},Bm:function(){return R},ch:function(){return O},gb:function(){return P},u_:function(){return s}});class i extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,i.prototype)}}function o(e){return n(t=>(function t(r=0,n=e.op){let i=e.links[r];if(!i)throw Error("No more links to execute - did you forget to add an ending link?");return i({op:n,next:e=>t(r+1,e)})})().subscribe(t))}function a(e){return Array.isArray(e)?e:[e]}function s(e){return t=>{let r=a(e.true).map(e=>e(t)),i=a(e.false).map(e=>e(t));return t=>n(n=>{let a=e.condition(t.op)?r:i;return o({op:t.op,links:a}).subscribe(n)})}}var l=r(98104);function c(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}class u extends Error{constructor(){super("Unable to transform response from server")}}function d(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.transformer.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.transformer.deserialize(e.result.data)}}}}(e,t)}catch(e){throw new u}if(!r.ok&&(!c(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!c(r.result))throw new u;return r}class f extends Error{static from(e,t={}){return e instanceof f||e instanceof Error&&"TRPCClientError"===e.name?(t.meta&&(e.meta={...e.meta,...t.meta}),e):c(e)&&c(e.error)&&"number"==typeof e.error.code&&"string"==typeof e.error.message?new f(e.error.message,{...t,result:e}):e instanceof Error?new f(e.message,{...t,cause:(0,l.sZ)(e)}):new f("Unknown error",{...t,cause:e})}constructor(e,t){let r=t?.cause;super(e,{cause:r}),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,f.prototype)}}let p=e=>"function"==typeof e;function h(e){var t;return{url:e.url.toString().replace(/\/$/,""),fetch:e.fetch,AbortController:(t=e.AbortController)?t:"undefined"!=typeof window&&window.AbortController?window.AbortController:"undefined"!=typeof globalThis&&globalThis.AbortController?globalThis.AbortController:null}}let m={query:"GET",mutation:"POST"};function g(e){return"input"in e?e.runtime.transformer.serialize(e.input):function(e){let t={};for(let r=0;re.runtime.transformer.serialize(t)))}let v=e=>{let t=e.url+"/"+e.path,r=[];if("inputs"in e&&r.push("batch=1"),"query"===e.type){let t=g(e);void 0!==t&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(t+="?"+r.join("&")),t},y=e=>{if("query"===e.type)return;let t=g(e);return void 0!==t?JSON.stringify(t):void 0},b=e=>w({...e,contentTypeHeader:"application/json",getUrl:v,getBody:y});async function x(e,t){let r=e.getUrl(e),n=e.getBody(e),{type:i}=e,o=await e.headers();if("subscription"===i)throw Error("Subscriptions should use wsLink");let a={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.batchModeHeader?{"trpc-batch-mode":e.batchModeHeader}:{},...o};return(function(e){if(e)return e;if("undefined"!=typeof window&&p(window.fetch))return window.fetch;if("undefined"!=typeof globalThis&&p(globalThis.fetch))return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(r,{method:m[i],signal:t?.signal,body:n,headers:a})}function w(e){let t=e.AbortController?new e.AbortController:null,r={},n=!1;return{promise:new Promise((i,o)=>{x(e,t).then(e=>(r.response=e,n=!0,e.json())).then(e=>{r.responseJSON=e,i({json:e,meta:r})}).catch(e=>{n=!0,o(f.from(e,{meta:r}))})}),cancel:()=>{n||t?.abort()}}}let S=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function k(e){let t=null,r=null,n=()=>{clearTimeout(r),r=null,t=null};function i(){let r=function(t){let r=[[]],n=0;for(;;){let i=t[n];if(!i)break;let o=r[r.length-1];if(i.aborted){i.reject?.(Error("Aborted")),n++;continue}if(e.validate(o.concat(i).map(e=>e.key))){o.push(i),n++;continue}if(0===o.length){i.reject?.(Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let t of(n(),r)){if(!t.length)continue;let r={items:t,cancel:S};for(let e of t)e.batch=r;let n=(e,t)=>{let n=r.items[e];n.resolve?.(t),n.batch=null,n.reject=null,n.resolve=null},{promise:i,cancel:o}=e.fetch(r.items.map(e=>e.key),n);r.cancel=o,i.then(e=>{for(let t=0;t{for(let t of r.items)t.reject?.(e),t.batch=null})}}return{load:function(e){let n={aborted:!1,key:e,batch:null,resolve:S,reject:S},o=new Promise((e,r)=>{n.reject=r,n.resolve=e,t||(t=[]),t.push(n)});return r||(r=setTimeout(i)),{promise:o,cancel:()=>{n.aborted=!0,n.batch?.items.every(e=>e.aborted)&&(n.batch.cancel(),n.batch=null)}}}}}function j(e){return function(t){let r=h(t),i=t.maxURLLength??1/0;return o=>{let a=n=>({validate:e=>{if(i===1/0)return!0;let t=e.map(e=>e.path).join(","),a=e.map(e=>e.input);return v({...r,runtime:o,type:n,path:t,inputs:a}).length<=i},fetch:e({...r,runtime:o,type:n,opts:t})}),s=k(a("query")),l=k(a("mutation")),c={query:s,subscription:k(a("subscription")),mutation:l};return({op:e})=>n(t=>{let r;let{promise:n,cancel:i}=c[e.type].load(e);return n.then(e=>{r=e;let n=d(e.json,o);if(!n.ok){t.error(f.from(n.error,{meta:e.meta}));return}t.next({context:e.meta,result:n.result}),t.complete()}).catch(e=>{t.error(f.from(e,{meta:r?.meta}))}),()=>{i()}})}}}function E(e){return t=>{let r=h(t);return i=>({op:o})=>n(n=>{let a;let{path:s,input:l,type:c}=o,{promise:u,cancel:p}=e.requester({...r,runtime:i,type:c,path:s,input:l,headers:()=>t.headers?"function"==typeof t.headers?t.headers({op:o}):t.headers:{}});return u.then(e=>{a=e.meta;let t=d(e.json,i);if(!t.ok){n.error(f.from(t.error,{meta:a}));return}n.next({context:e.meta,result:t.result}),n.complete()}).catch(e=>{n.error(f.from(e,{meta:a}))}),()=>{p()}})}}j(e=>t=>{let r=t.map(e=>e.path).join(","),n=t.map(e=>e.input),{promise:i,cancel:o}=b({...e,path:r,inputs:n,headers:()=>e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:t}):e.opts.headers:{}});return{promise:i.then(e=>(Array.isArray(e.json)?e.json:t.map(()=>e.json)).map(t=>({meta:e.meta,json:t}))),cancel:o}});let O=E({requester:b}),C={css:{query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},ansi:{regular:{query:["\x1b[30;46m","\x1b[97;46m"],mutation:["\x1b[30;45m","\x1b[97;45m"],subscription:["\x1b[30;42m","\x1b[97;42m"]},bold:{query:["\x1b[1;30;46m","\x1b[1;97;46m"],mutation:["\x1b[1;30;45m","\x1b[1;97;45m"],subscription:["\x1b[1;30;42m","\x1b[1;97;42m"]}}},I=({c:e=console,colorMode:t="css"})=>r=>{let n=r.input,i="undefined"!=typeof FormData&&n instanceof FormData?Object.fromEntries(n):n,{parts:o,args:a}=function(e){let{direction:t,type:r,path:n,id:i,input:o}=e,a=[],s=[];if("ansi"===e.colorMode){let[o,l]=C.ansi.regular[r],[c,u]=C.ansi.bold[r];return a.push("up"===t?o:l,"up"===t?">>":"<<",r,"up"===t?c:u,`#${i}`,n,"\x1b[0m"),"up"===t?s.push({input:e.input}):s.push({input:e.input,result:"result"in e.result?e.result.result:e.result,elapsedMs:e.elapsedMs}),{parts:a,args:s}}let[l,c]=C.css[r],u=` + background-color: #${"up"===t?l:c}; + color: ${"up"===t?"black":"white"}; + padding: 2px; + `;return a.push("%c","up"===t?">>":"<<",r,`#${i}`,`%c${n}%c`,"%O"),s.push(u,`${u}; font-weight: bold;`,`${u}; font-weight: normal;`),"up"===t?s.push({input:o,context:e.context}):s.push({input:o,result:e.result,elapsedMs:e.elapsedMs,context:e.context}),{parts:a,args:s}}({...r,colorMode:t,input:i});e["down"===r.direction&&r.result&&(r.result instanceof Error||"error"in r.result.result)?"error":"log"].apply(null,[o.join(" ")].concat(a))};function P(e={}){let{enabled:t=()=>!0}=e,r=e.colorMode??("undefined"==typeof window?"ansi":"css"),{logger:i=I({c:e.console,colorMode:r})}=e;return()=>({op:e,next:r})=>n(n=>{var o;t({...e,direction:"up"})&&i({...e,direction:"up"});let a=Date.now();function s(r){let n=Date.now()-a;t({...e,direction:"down",result:r})&&i({...e,direction:"down",elapsedMs:n,result:r})}return r(e).pipe((o={next(e){s(e)},error(e){s(e)}},e=>({subscribe:t=>e.subscribe({next(e){o.next?.(e),t.next?.(e)},error(e){o.error?.(e),t.error?.(e)},complete(){o.complete?.(),t.complete?.()}})}))).subscribe(n)})}class A{$request({type:e,input:t,path:r,context:n={}}){return o({links:this.links,op:{id:++this.requestId,type:e,path:r,input:t,context:n}}).pipe(e=>{let t=0,r=null,n=[];return{subscribe:i=>(t++,n.push(i),r||(r=e.subscribe({next(e){for(let t of n)t.next?.(e)},error(e){for(let t of n)t.error?.(e)},complete(){for(let e of n)e.complete?.()}})),{unsubscribe(){t--,function(){if(0===t&&r){let e=r;r=null,e.unsubscribe()}}();let e=n.findIndex(e=>e===i);e>-1&&n.splice(e,1)}})}})}requestAsPromise(e){var t;let r;let{promise:n,abort:o}=(t=this.$request(e),{promise:new Promise((e,n)=>{let o=!1;function a(){o||(o=!0,n(new i("This operation was aborted.")),s.unsubscribe())}let s=t.subscribe({next(t){o=!0,e(t),a()},error(e){o=!0,n(e),a()},complete(){o=!0,a()}});r=a}),abort:r});return new Promise((t,r)=>{e.signal?.addEventListener("abort",o),n.then(e=>{t(e.result.data)}).catch(e=>{r(f.from(e))})})}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r?.context}).subscribe({next(e){"started"===e.result.type?r.onStarted?.():"stopped"===e.result.type?r.onStopped?.():r.onData?.(e.result.data)},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){this.requestId=0;let t=(()=>{let t=e.transformer;return t?"input"in t?e.transformer:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}})();this.runtime={transformer:{serialize:e=>t.input.serialize(e),deserialize:e=>t.output.deserialize(e)},combinedTransformer:t},this.links=e.links.map(e=>e(this.runtime))}}function T(e){return new A(e)}let z={query:"query",mutate:"mutation",subscribe:"subscription"},N=e=>z[e];function R(e){return(0,l.yh)(t=>e.hasOwnProperty(t)?e[t]:"__untypedClient"===t?e:(0,l.IX)(({path:r,args:n})=>{let i=[t,...r],o=N(i.pop()),a=i.join(".");return e[o](a,...n)}))}async function _(e){let t=e.parse??JSON.parse;await M(e.readableStream,r=>{if(e.signal?.aborted||!r||"}"===r)return;let n=r.indexOf(":"),i=r.substring(2,n-1),o=r.substring(n+1);e.onSingle(Number(i),t(o))},e.textDecoder)}async function M(e,t,r){let n="",i=e=>{let i=r.decode(e).split("\n");if(1===i.length)n+=i[0];else if(i.length>1){t(n+i[0]);for(let e=1;e{e.on("data",i),e.on("end",t)}),t(n)}async function D(e,t){let r=e.getReader(),n=await r.read();for(;!n.done;)t(n.value),n=await r.read()}let L=(e,t)=>{let r=e.AbortController?new e.AbortController:null;return{cancel:()=>r?.abort(),promise:x({...e,contentTypeHeader:"application/json",batchModeHeader:"stream",getUrl:v,getBody:y},r).then(async n=>{if(!n.body)throw Error("Received response without body");let i={response:n};return _({readableStream:n.body,onSingle:t,parse:e=>({json:JSON.parse(e),meta:i}),signal:r?.signal,textDecoder:e.textDecoder})})}};j(e=>{let t=function(e){if(e)return e;if("undefined"!=typeof window&&window.TextDecoder)return new window.TextDecoder;if("undefined"!=typeof globalThis&&globalThis.TextDecoder)return new globalThis.TextDecoder;throw Error("No TextDecoder implementation found")}(e.opts.textDecoder);return(r,n)=>{let i=r.map(e=>e.path).join(","),o=r.map(e=>e.input),{cancel:a,promise:s}=L({...e,textDecoder:t,path:i,inputs:o,headers:()=>e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:r}):e.opts.headers:{}},(e,t)=>{n(e,t)});return{promise:s.then(()=>[]),cancel:a}}});let F=e=>{if("input"in e){if(!(e.input instanceof FormData))throw Error("Input is not FormData");return e.input}};E({requester:e=>{if("mutation"!==e.type)throw Error("We only handle mutations with formdata");return w({...e,getUrl:()=>`${e.url}/${e.path}`,getBody:F})}})},63392:function(e,t,r){"use strict";let n;r.d(t,{a:function(){return W},b:function(){return B},c:function(){return q},g:function(){return U}});var i=r(98104);function o(e,t){let[r,n]=Array.isArray(e)?e:[e],i="string"!=typeof r||""===r?[]:r.split(".");return n||t&&"any"!==t?[i,{...void 0!==n&&{input:n},...t&&"any"!==t&&{type:t}}]:i.length?[i]:[]}var a=r(67072),s=r(32161),l=r(30081),c=r(15761),u=r(33989),d=r(72379);class f extends u.l{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.length&&(this.currentQuery.addObserver(this),p(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),(0,s.VS)(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let i=this.hasListeners();i&&m(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let o=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(s.ZT)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),s.sk||this.currentResult.isStale||!(0,s.PN)(this.options.staleTime))return;let e=(0,s.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!s.sk&&!1!==this.options.enabled&&(0,s.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||c.j.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r;let n=this.currentQuery,i=this.options,o=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,c=e!==n,u=c?e.state:this.currentQueryInitialState,f=c?this.currentResult:this.previousQueryResult,{state:h}=e,{dataUpdatedAt:v,error:y,errorUpdatedAt:b,fetchStatus:x,status:w}=h,S=!1,k=!1;if(t._optimisticResults){let r=this.hasListeners(),o=!r&&p(e,t),a=r&&m(e,n,t,i);(o||a)&&(x=(0,d.Kw)(e.options.networkMode)?"fetching":"paused",v||(w="loading")),"isRestoring"===t._optimisticResults&&(x="idle")}if(t.keepPreviousData&&!h.dataUpdatedAt&&null!=f&&f.isSuccess&&"error"!==w)r=f.data,v=f.dataUpdatedAt,w=f.status,S=!0;else if(t.select&&void 0!==h.data){if(o&&h.data===(null==a?void 0:a.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(h.data),r=(0,s.oE)(null==o?void 0:o.data,r,t),this.selectResult=r,this.selectError=null}catch(e){this.selectError=e}}else r=h.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===w){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==l?void 0:l.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(w="success",r=(0,s.oE)(null==o?void 0:o.data,e,t),k=!0)}this.selectError&&(y=this.selectError,r=this.selectResult,b=Date.now(),w="error");let j="fetching"===x,E="loading"===w,O="error"===w;return{status:w,fetchStatus:x,isLoading:E,isSuccess:"success"===w,isError:O,isInitialLoading:E&&j,data:r,dataUpdatedAt:v,error:y,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:j,isRefetching:j&&!E,isLoadingError:O&&0===h.dataUpdatedAt,isPaused:"paused"===x,isPlaceholderData:k,isPreviousData:S,isRefetchError:O&&0!==h.dataUpdatedAt,isStale:g(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,s.VS)(r,t))return;this.currentResult=r;let n={cache:!0};(null==e?void 0:e.listeners)!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;let r=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(e=>this.currentResult[e]!==t[e]&&r.has(e))})()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||(0,d.DV)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){l.V.batch(()=>{var t,r,n,i,o,a,s,l;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(n=(i=this.options).onSettled)||n.call(i,this.currentResult.data,null)):e.onError&&(null==(o=(a=this.options).onError)||o.call(a,this.currentResult.error),null==(s=(l=this.options).onSettled)||s.call(l,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function p(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==t.enabled){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&g(e,t)}return!1}function m(e,t,r,n){return!1!==r.enabled&&(e!==t||!1===n.enabled)&&(!r.suspense||"error"!==e.state.status)&&g(e,r)}function g(e,t){return e.isStaleByTime(t.staleTime)}var v=r(67294),y=r(464);let b=v.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),x=()=>v.useContext(b);var w=r(85945);let S=v.createContext(!1),k=()=>v.useContext(S);function j(e,t){return"function"==typeof e?e(...t):!!e}S.Provider;let E=(e,t)=>{(e.suspense||e.useErrorBoundary)&&!t.isReset()&&(e.retryOnMount=!1)},O=e=>{v.useEffect(()=>{e.clearReset()},[e])},C=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&j(r,[e.error,n]),I=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},P=(e,t)=>e.isLoading&&e.isFetching&&!t,A=(e,t,r)=>(null==e?void 0:e.suspense)&&P(t,r),T=(e,t,r)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{r.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)});function z(e,t){let r=(0,w.NL)({context:e.context}),n=k(),i=x(),o=r.defaultQueryOptions(e);o._optimisticResults=n?"isRestoring":"optimistic",o.onError&&(o.onError=l.V.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=l.V.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=l.V.batchCalls(o.onSettled)),I(o),E(o,i),O(i);let[a]=v.useState(()=>new t(r,o)),s=a.getOptimisticResult(o);if((0,y.$)(v.useCallback(e=>n?()=>void 0:a.subscribe(l.V.batchCalls(e)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),v.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),A(o,s,n))throw T(o,a,i);if(C({result:s,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return o.notifyOnChangeProps?s:a.trackResult(s)}var N=r(89886);class R extends u.l{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let r=this.options;this.options=this.client.defaultMutationOptions(e),(0,s.VS)(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:(0,N.R)(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){l.V.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,r,n,i,o,a,s,l;e.onSuccess?(null==(t=(r=this.mutateOptions).onSuccess)||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(n=(i=this.mutateOptions).onSettled)||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(o=(a=this.mutateOptions).onError)||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(s=(l=this.mutateOptions).onSettled)||s.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)})})}}function _(){}var M=r(9499);class D extends f{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,M.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,M.Gm)(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var r,n,i,o,a,s;let{state:l}=e,c=super.createResult(e,t),{isFetching:u,isRefetching:d}=c,f=u&&(null==(r=l.fetchMeta)?void 0:null==(n=r.fetchMore)?void 0:n.direction)==="forward",p=u&&(null==(i=l.fetchMeta)?void 0:null==(o=i.fetchMore)?void 0:o.direction)==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,M.Qy)(t,null==(a=l.data)?void 0:a.pages),hasPreviousPage:(0,M.ZF)(t,null==(s=l.data)?void 0:s.pages),isFetchingNextPage:f,isFetchingPreviousPage:p,isRefetching:d&&!f&&!p}}}class L extends u.l{constructor(e,t){super(),this.client=e,this.queries=[],this.result=[],this.observers=[],this.observersMap={},t&&this.setQueries(t)}onSubscribe(){1===this.listeners.length&&this.observers.forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})})}onUnsubscribe(){this.listeners.length||this.destroy()}destroy(){this.listeners=[],this.observers.forEach(e=>{e.destroy()})}setQueries(e,t){this.queries=e,l.V.batch(()=>{let e=this.observers,r=this.findMatchingObservers(this.queries);r.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,t));let n=r.map(e=>e.observer),i=Object.fromEntries(n.map(e=>[e.options.queryHash,e])),o=n.map(e=>e.getCurrentResult()),a=n.some((t,r)=>t!==e[r]);(e.length!==n.length||a)&&(this.observers=n,this.observersMap=i,this.result=o,this.hasListeners()&&((0,s.e5)(e,n).forEach(e=>{e.destroy()}),(0,s.e5)(n,e).forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(e=>e.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(e){return this.findMatchingObservers(e).map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions))}findMatchingObservers(e){let t=this.observers,r=new Map(t.map(e=>[e.options.queryHash,e])),n=e.map(e=>this.client.defaultQueryOptions(e)),i=n.flatMap(e=>{let t=r.get(e.queryHash);return null!=t?[{defaultedQueryOptions:e,observer:t}]:[]}),o=new Set(i.map(e=>e.defaultedQueryOptions.queryHash)),a=n.filter(e=>!o.has(e.queryHash)),s=new Set(i.map(e=>e.observer)),l=t.filter(e=>!s.has(e)),c=e=>{let t=this.client.defaultQueryOptions(e),r=this.observersMap[t.queryHash];return null!=r?r:new f(this.client,t)},u=a.map((e,t)=>{if(e.keepPreviousData){let r=l[t];if(void 0!==r)return{defaultedQueryOptions:e,observer:r}}return{defaultedQueryOptions:e,observer:c(e)}});return i.concat(u).sort((e,t)=>n.indexOf(e.defaultedQueryOptions)-n.indexOf(t.defaultedQueryOptions))}onUpdate(e,t){let r=this.observers.indexOf(e);-1!==r&&(this.result=(0,s.Rc)(this.result,r,t),this.notify())}notify(){l.V.batch(()=>{this.listeners.forEach(e=>{e(this.result)})})}}function F(e,t){return e.length?void 0===t?[e]:[e,t]:[]}function U(...e){let[t,r,n]=e;return o(F(t._def().path.join("."),r),n??"any")}function B(e,t){return(0,i.IX)(r=>{let n=r.args,i=[e,...r.path],a=i.pop(),s=i.join(".");if("useMutation"===a)return t[a](s,...n);let[l,...c]=n,u=F(s,l);if("getQueryKey"===a)return o(u,c[0]??"any");if("_def"===a)return{path:i};if(a.startsWith("useSuspense")){let e=c[0]||{},r=t["useSuspenseQuery"===a?"useQuery":"useInfiniteQuery"](u,{...e,suspense:!0,enabled:!0});return[r.data,r]}return t[a](u,...c)})}let H=["client","ssrContext","ssrState","abortOnUnmount"],Z=(0,v.createContext)(null);function W(e){return(0,i.yh)(t=>"client"===t?(0,a.Bm)(e.client):H.includes(t)?e[t]:(0,i.IX)(({path:r,args:n})=>{let i=[t,...r],o=i.pop(),a=i.join("."),{queryKey:s,rest:l,updater:c}=(e=>{if(["setData","setInfiniteData"].includes(e)){let[e,t,...r]=n;return{queryKey:F(a,e),updater:t,rest:r}}let[t,...r]=n;return{queryKey:F(a,t),rest:r}})(o);return({fetch:()=>e.fetchQuery(s,...l),fetchInfinite:()=>e.fetchInfiniteQuery(s,...l),prefetch:()=>e.prefetchQuery(s,...l),prefetchInfinite:()=>e.prefetchInfiniteQuery(s,...l),ensureData:()=>e.ensureQueryData(s,...l),invalidate:()=>e.invalidateQueries(s,...l),reset:()=>e.resetQueries(s,...l),refetch:()=>e.refetchQueries(s,...l),cancel:()=>e.cancelQuery(s,...l),setData:()=>{e.setQueryData(s,c,...l)},setInfiniteData:()=>{e.setInfiniteQueryData(s,c,...l)},getData:()=>e.getQueryData(s),getInfiniteData:()=>e.getInfiniteQueryData(s)})[o]()}))}function V(e,t){let[r,n]=e;return[r,n,t?.trpc]}function $(e){let t=(0,v.useRef)(e);return t.current.path=e.path,t.current}function q(e){return function(e){let t=(e?.overrides??e?.unstable_overrides)?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??Z,n=e?.reactQueryContext;function c(){return v.useContext(r)}function u(e,t,r){let{queryClient:n,ssrState:i}=c();return i&&"mounted"!==i&&n.getQueryCache().find(o(e,t))?.state.status==="error"?{retryOnMount:!1,...r}:r}return{Provider:e=>{let{abortOnUnmount:t=!1,client:n,queryClient:i,ssrContext:a}=e,[s,l]=(0,v.useState)(e.ssrState??!1);return(0,v.useEffect)(()=>{l(e=>!!e&&"mounted")},[]),v.createElement(r.Provider,{value:{abortOnUnmount:t,queryClient:i,client:n,ssrContext:a??null,ssrState:s,fetchQuery:(0,v.useCallback)((e,t)=>i.fetchQuery({...t,queryKey:o(e,"query"),queryFn:()=>n.query(...V(e,t))}),[n,i]),fetchInfiniteQuery:(0,v.useCallback)((e,t)=>i.fetchInfiniteQuery({...t,queryKey:o(e,"infinite"),queryFn:({pageParam:r})=>{let[i,o]=e,a={...o,cursor:r};return n.query(...V([i,a],t))}}),[n,i]),prefetchQuery:(0,v.useCallback)((e,t)=>i.prefetchQuery({...t,queryKey:o(e,"query"),queryFn:()=>n.query(...V(e,t))}),[n,i]),prefetchInfiniteQuery:(0,v.useCallback)((e,t)=>i.prefetchInfiniteQuery({...t,queryKey:o(e,"infinite"),queryFn:({pageParam:r})=>{let[i,o]=e,a={...o,cursor:r};return n.query(...V([i,a],t))}}),[n,i]),ensureQueryData:(0,v.useCallback)((e,t)=>i.ensureQueryData({...t,queryKey:o(e,"query"),queryFn:()=>n.query(...V(e,t))}),[n,i]),invalidateQueries:(0,v.useCallback)((e,t,r)=>i.invalidateQueries({...t,queryKey:o(e,"any")},r),[i]),resetQueries:(0,v.useCallback)((...e)=>{let[t,r,n]=e;return i.resetQueries({...r,queryKey:o(t,"any")},n)},[i]),refetchQueries:(0,v.useCallback)((...e)=>{let[t,r,n]=e;return i.refetchQueries({...r,queryKey:o(t,"any")},n)},[i]),cancelQuery:(0,v.useCallback)(e=>i.cancelQueries({queryKey:o(e,"any")}),[i]),setQueryData:(0,v.useCallback)((...e)=>{let[t,...r]=e;return i.setQueryData(o(t,"query"),...r)},[i]),getQueryData:(0,v.useCallback)((...e)=>{let[t,...r]=e;return i.getQueryData(o(t,"query"),...r)},[i]),setInfiniteQueryData:(0,v.useCallback)((...e)=>{let[t,...r]=e;return i.setQueryData(o(t,"infinite"),...r)},[i]),getInfiniteQueryData:(0,v.useCallback)((...e)=>{let[t,...r]=e;return i.getQueryData(o(t,"infinite"),...r)},[i])}},e.children)},createClient:e=>(0,a.BJ)(e),useContext:c,useUtils:c,useQuery:function(t,r){var i;let a=c();if(!a)throw Error("Unable to retrieve application context. Did you forget to wrap your App inside `withTRPC` HoC?");let{abortOnUnmount:l,client:d,ssrState:p,queryClient:h,prefetchQuery:m}=a,g=h.getQueryDefaults(o(t,"query"));"undefined"!=typeof window||"prepass"!==p||r?.trpc?.ssr===!1||(r?.enabled??g?.enabled)===!1||h.getQueryCache().find(o(t,"query"))||m(t,r);let v=u(t,"query",{...g,...r}),y=r?.trpc?.abortOnUnmount??e?.abortOnUnmount??l,b=(i={...v,queryKey:o(t,"query"),queryFn:e=>{let r={...v,trpc:{...v?.trpc,...y?{signal:e.signal}:{}}};return d.query(...V(t,r))},context:n},z((0,s._v)(i,void 0,void 0),f));return b.trpc=$({path:t[0]}),b},useQueries:(e,t)=>{let{ssrState:r,queryClient:n,prefetchQuery:a,client:s}=c(),u=e((0,i.IX)(e=>{let t=e.path.join("."),[r,n]=e.args;return{queryKey:F(t,r),queryFn:()=>s.query(t,r,n?.trpc),...n}}));if("undefined"==typeof window&&"prepass"===r)for(let e of u)e.trpc?.ssr===!1||n.getQueryCache().find(o(e.queryKey,"query"))||a(e.queryKey,e);return function({queries:e,context:t}){let r=(0,w.NL)({context:t}),n=k(),i=x(),o=v.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=n?"isRestoring":"optimistic",t}),[e,r,n]);o.forEach(e=>{I(e),E(e,i)}),O(i);let[a]=v.useState(()=>new L(r,o)),s=a.getOptimisticResult(o);(0,y.$)(v.useCallback(e=>n?()=>void 0:a.subscribe(l.V.batchCalls(e)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),v.useEffect(()=>{a.setQueries(o,{listeners:!1})},[o,a]);let c=s.some((e,t)=>A(o[t],e,n))?s.flatMap((e,t)=>{let r=o[t],s=a.getObservers()[t];if(r&&s){if(A(r,e,n))return T(r,s,i);P(e,n)&&T(r,s,i)}return[]}):[];if(c.length>0)throw Promise.all(c);let u=a.getQueries(),d=s.find((e,t)=>{var r,n;return C({result:e,errorResetBoundary:i,useErrorBoundary:null!=(r=null==(n=o[t])?void 0:n.useErrorBoundary)&&r,query:u[t]})});if(null!=d&&d.error)throw d.error;return s}({queries:u.map(e=>({...e,queryKey:o(e.queryKey,"query")})),context:t})},useMutation:function(e,r){let{client:i}=c(),o=(0,w.NL)({context:n}),a=Array.isArray(e)?e[0]:e,u=o.getMutationDefaults([a.split(".")]),d=function(e,t,r){let n=(0,s.lV)(e,void 0,void 0),i=(0,w.NL)({context:n.context}),[o]=v.useState(()=>new R(i,n));v.useEffect(()=>{o.setOptions(n)},[o,n]);let a=(0,y.$)(v.useCallback(e=>o.subscribe(l.V.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=v.useCallback((e,t)=>{o.mutate(e,t).catch(_)},[o]);if(a.error&&j(o.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:c,mutateAsync:a.mutate}}({...r,mutationKey:[a.split(".")],mutationFn:e=>i.mutation(...V([a,e],r)),context:n,onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??u?.onSuccess?.(...e),queryClient:o,meta:r?.meta??u?.meta??{}})});return d.trpc=$({path:a}),d},useSubscription:function(e,t){let r=t?.enabled??!0,n=(0,s.yF)(e),{client:i}=c(),o=(0,v.useRef)(t);o.current=t,(0,v.useEffect)(()=>{if(!r)return;let[t,n]=e,a=!1,s=i.subscription(t,n??void 0,{onStarted:()=>{a||o.current.onStarted?.()},onData:e=>{a||o.current.onData(e)},onError:e=>{a||o.current.onError?.(e)}});return()=>{a=!0,s.unsubscribe()}},[n,r])},useDehydratedState:(e,t)=>(0,v.useMemo)(()=>t?e.runtime.transformer.deserialize(t):t,[t,e]),useInfiniteQuery:function(e,t){var r;let[i,a]=e,{client:l,ssrState:d,prefetchInfiniteQuery:f,queryClient:p,abortOnUnmount:h}=c(),m=p.getQueryDefaults(o(e,"infinite"));"undefined"!=typeof window||"prepass"!==d||t?.trpc?.ssr===!1||(t?.enabled??m?.enabled)===!1||p.getQueryCache().find(o(e,"infinite"))||f(e,{...m,...t});let g=u(e,"infinite",{...m,...t}),v=t?.trpc?.abortOnUnmount??h,y=(r={...g,queryKey:o(e,"infinite"),queryFn:e=>{let r={...g,trpc:{...g?.trpc,...v?{signal:e.signal}:{}}},n={...a??{},cursor:e.pageParam??t?.initialCursor};return l.query(...V([i,n],r))},context:n},z((0,s._v)(r,void 0,void 0),D));return y.trpc=$({path:i}),y}}}(e)}},16058:function(e,t,r){"use strict";r.d(t,{BJ:function(){return n.BJ},Ol:function(){return i.g},x3:function(){return s}});var n=r(67072),i=r(63392),o=r(98104),a=r(67294);function s(e){let t=(0,i.c)(e),r=(0,o.yh)(e=>"useContext"===e||"useUtils"===e?()=>{let e=t.useUtils();return(0,a.useMemo)(()=>(0,i.a)(e),[e])}:t.hasOwnProperty(e)?t[e]:(0,i.b)(e,t));return{...t,proxy:r}}},98104:function(e,t,r){"use strict";function n(e){let t=Object.create(null);for(let r in e)t[e[r]]=r;return t}r.d(t,{yh:function(){return s},IX:function(){return a},sZ:function(){return c}});let i={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};n(i),n(i);let o=()=>{},a=e=>(function e(t,r){return new Proxy(o,{get(n,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i])},apply(e,n,i){let o="apply"===r[r.length-1];return t({args:o?i.length>=2?i[1]:[]:i,path:o?r.slice(0,-1):r})}})})(e,[]),s=e=>new Proxy(o,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}});class l extends Error{}function c(e){if(e instanceof Error)return e;let t=typeof e;if("undefined"!==t&&"function"!==t&&null!==e){if("object"!==t)return Error(String(e));if(e&&!Array.isArray(e)&&"object"==typeof e){let t=new l;for(let r in e)t[r]=e[r];return t}}}},52835:function(e,t,r){"use strict";r.d(t,{ZP:function(){return f}});let n="object"==typeof self?self:globalThis,i=(e,t)=>{let r=(t,r)=>(e.set(r,t),t),i=o=>{if(e.has(o))return e.get(o);let[a,s]=t[o];switch(a){case 0:case -1:return r(s,o);case 1:{let e=r([],o);for(let t of s)e.push(i(t));return e}case 2:{let e=r({},o);for(let[t,r]of s)e[i(t)]=i(r);return e}case 3:return r(new Date(s),o);case 4:{let{source:e,flags:t}=s;return r(new RegExp(e,t),o)}case 5:{let e=r(new Map,o);for(let[t,r]of s)e.set(i(t),i(r));return e}case 6:{let e=r(new Set,o);for(let t of s)e.add(i(t));return e}case 7:{let{name:e,message:t}=s;return r(new n[e](t),o)}case 8:return r(BigInt(s),o);case"BigInt":return r(Object(BigInt(s)),o)}return r(new n[a](s),o)};return i},o=e=>i(new Map,e)(0),{toString:a}={},{keys:s}=Object,l=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let r=a.call(e).slice(8,-1);switch(r){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},c=([e,t])=>0===e&&("function"===t||"symbol"===t),u=(e,t,r,n)=>{let i=(e,t)=>{let i=n.push(e)-1;return r.set(t,i),i},o=n=>{if(r.has(n))return r.get(n);let[a,u]=l(n);switch(a){case 0:{let t=n;switch(u){case"bigint":a=8,t=n.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+u);t=null;break;case"undefined":return i([-1],n)}return i([a,t],n)}case 1:{if(u)return i([u,[...n]],n);let e=[],t=i([a,e],n);for(let t of n)e.push(o(t));return t}case 2:{if(u)switch(u){case"BigInt":return i([u,n.toString()],n);case"Boolean":case"Number":case"String":return i([u,n.valueOf()],n)}if(t&&"toJSON"in n)return o(n.toJSON());let r=[],d=i([a,r],n);for(let t of s(n))(e||!c(l(n[t])))&&r.push([o(t),o(n[t])]);return d}case 3:return i([a,n.toISOString()],n);case 4:{let{source:e,flags:t}=n;return i([a,{source:e,flags:t}],n)}case 5:{let t=[],r=i([a,t],n);for(let[r,i]of n)(e||!(c(l(r))||c(l(i))))&&t.push([o(r),o(i)]);return r}case 6:{let t=[],r=i([a,t],n);for(let r of n)(e||!c(l(r)))&&t.push(o(r));return r}}let{message:d}=n;return i([a,{name:u,message:d}],n)};return o},d=(e,{json:t,lossy:r}={})=>{let n=[];return u(!(t||r),!!t,new Map,n)(e),n};var f="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?o(d(e,t)):structuredClone(e):(e,t)=>o(d(e,t))},90512:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="",i=arguments.length;r1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:u(e)?2:d(e)?3:0}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function u(e){return M&&e instanceof Map}function d(e){return D&&e instanceof Set}function f(e){return e.o||e.t}function p(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=W(e);delete t[B];for(var r=Z(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=m),Object.freeze(e),t&&a(e,function(e,t){return h(t,!0)},!0)),e}function m(){n(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=V[e];return t||n(18,e),t}function y(e,t){t&&(v("Patches"),e.u=[],e.s=[],e.v=t)}function b(e){x(e),e.p.forEach(S),e.p=null}function x(e){e===R&&(R=e.l)}function w(e){return R={p:[],l:R,h:e,m:!0,_:0}}function S(e){var t=e[B];0===t.i||1===t.i?t.j():t.g=!0}function k(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.O||v("ES5").S(t,e,i),i?(r[B].P&&(b(t),n(4)),o(e)&&(e=j(t,e),t.l||O(t,e)),t.u&&v("Patches").M(r[B].t,e,t.u,t.s)):e=j(t,r,[]),b(t),t.u&&t.v(t.u,t.s),e!==F?e:void 0}function j(e,t,r){if(g(t))return t;var n=t[B];if(!n)return a(t,function(i,o){return E(e,n,t,i,o,r)},!0),t;if(n.A!==e)return t;if(!n.P)return O(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=p(n.k):n.o,o=i,s=!1;3===n.i&&(o=new Set(i),i.clear(),s=!0),a(o,function(t,o){return E(e,n,i,t,o,r,s)}),O(e,i,!1),r&&e.u&&v("Patches").N(n,r,e.u,e.s)}return n.o}function E(e,t,r,n,a,s,u){if(i(a)){var d=j(e,a,s&&t&&3!==t.i&&!l(t.R,n)?s.concat(n):void 0);if(c(r,n,d),!i(d))return;e.m=!1}else u&&r.add(a);if(o(a)&&!g(a)){if(!e.h.D&&e._<1)return;j(e,a),t&&t.A.l||O(e,a)}}function O(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&h(t,r)}function C(e,t){var r=e[B];return(r?f(r):e)[t]}function I(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function P(e){e.P||(e.P=!0,e.l&&P(e.l))}function A(e){e.o||(e.o=p(e.t))}function T(e,t,r){var n,i,o,a,s,l,c,f=u(t)?v("MapSet").F(t,r):d(t)?v("MapSet").T(t,r):e.O?(o=i={i:(n=Array.isArray(t))?1:0,A:r?r.A:R,P:!1,I:!1,R:{},l:r,t:t,k:null,o:null,j:null,C:!1},a=$,n&&(o=[i],a=q),l=(s=Proxy.revocable(o,a)).revoke,c=s.proxy,i.k=c,i.j=l,c):v("ES5").J(t,r);return(r?r.A:R).p.push(f),f}function z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return p(e)}r.d(t,{Uy:function(){return K}});var N,R,_="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),M="undefined"!=typeof Map,D="undefined"!=typeof Set,L="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,F=_?Symbol.for("immer-nothing"):((N={})["immer-nothing"]=!0,N),U=_?Symbol.for("immer-draftable"):"__$immer_draftable",B=_?Symbol.for("immer-state"):"__$immer_state",H=""+Object.prototype.constructor,Z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,W=Object.getOwnPropertyDescriptors||function(e){var t={};return Z(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},V={},$={get:function(e,t){if(t===B)return e;var r,n,i=f(e);if(!l(i,t))return(n=I(i,t))?"value"in n?n.value:null===(r=n.get)||void 0===r?void 0:r.call(e.k):void 0;var a=i[t];return e.I||!o(a)?a:a===C(e.t,t)?(A(e),e.o[t]=T(e.A.h,a,e)):a},has:function(e,t){return t in f(e)},ownKeys:function(e){return Reflect.ownKeys(f(e))},set:function(e,t,r){var n=I(f(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=C(f(e),t),o=null==i?void 0:i[B];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if((r===i?0!==r||1/r==1/i:r!=r&&i!=i)&&(void 0!==r||l(e.t,t)))return!0;A(e),P(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==C(e.t,t)||t in e.t?(e.R[t]=!1,A(e),P(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=f(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},q={};a($,function(e,t){q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),q.deleteProperty=function(e,t){return q.set.call(this,e,t,void 0)},q.set=function(e,t,r){return $.set.call(this,e[0],t,r,e[0])};var G=new(function(){function e(e){var t=this;this.O=L,this.D=!0,this.produce=function(e,r,i){if("function"==typeof e&&"function"!=typeof r){var a,s=r;return r=e,function(e){var n=this;void 0===e&&(e=s);for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a1?n-1:0),o=1;o=0;r--){var r,n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=v("Patches").$;return i(e)?o(e,t):this.produce(e,function(e){return o(e,t)})},e}()),K=G.produce;G.produceWithPatches.bind(G),G.setAutoFreeze.bind(G),G.setUseProxies.bind(G),G.applyPatches.bind(G),G.createDraft.bind(G),G.finishDraft.bind(G),t.ZP=K},62136:function(e,t,r){"use strict";r.r(t),r.d(t,{CompactEncrypt:function(){return tf},CompactSign:function(){return tm},EmbeddedJWK:function(){return tj},EncryptJWT:function(){return tx},FlattenedEncrypt:function(){return e3},FlattenedSign:function(){return th},GeneralEncrypt:function(){return e8},GeneralSign:function(){return tv},SignJWT:function(){return tb},UnsecuredJWT:function(){return tN},base64url:function(){return i},calculateJwkThumbprint:function(){return tS},calculateJwkThumbprintUri:function(){return tk},compactDecrypt:function(){return eJ},compactVerify:function(){return tr},createLocalJWKSet:function(){return tP},createRemoteJWKSet:function(){return tz},decodeJwt:function(){return tD},decodeProtectedHeader:function(){return tM},errors:function(){return n},exportJWK:function(){return e2},exportPKCS8:function(){return e1},exportSPKI:function(){return e0},flattenedDecrypt:function(){return eX},flattenedVerify:function(){return tt},generalDecrypt:function(){return eY},generalVerify:function(){return tn},generateKeyPair:function(){return tB},generateSecret:function(){return tH},importJWK:function(){return eL},importPKCS8:function(){return eD},importSPKI:function(){return e_},importX509:function(){return eM},jwtDecrypt:function(){return td},jwtVerify:function(){return tu}});var n={};r.r(n),r.d(n,{JOSEAlgNotAllowed:function(){return k},JOSEError:function(){return x},JOSENotSupported:function(){return j},JWEDecryptionFailed:function(){return E},JWEInvalid:function(){return O},JWKInvalid:function(){return P},JWKSInvalid:function(){return A},JWKSMultipleMatchingKeys:function(){return z},JWKSNoMatchingKey:function(){return T},JWKSTimeout:function(){return N},JWSInvalid:function(){return C},JWSSignatureVerificationFailed:function(){return R},JWTClaimValidationFailed:function(){return w},JWTExpired:function(){return S},JWTInvalid:function(){return I}});var i={};r.r(i),r.d(i,{decode:function(){return t_},encode:function(){return tR}});var o=crypto;let a=e=>e instanceof CryptoKey,s=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await o.subtle.digest(r,t))},l=new TextEncoder,c=new TextDecoder;function u(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;return e.forEach(e=>{t.set(e,r),r+=e.length}),t}function d(e,t,r){if(t<0||t>=4294967296)throw RangeError(`value must be >= 0 and <= ${4294967296-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function f(e){let t=new Uint8Array(8);return d(t,Math.floor(e/4294967296),0),d(t,e%4294967296,4),t}function p(e){let t=new Uint8Array(4);return d(t,e),t}function h(e){return u(p(e.length),e)}async function m(e,t,r){let n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n);for(let t=0;t>3)}let g=e=>{let t=e;"string"==typeof t&&(t=l.encode(t));let r=[];for(let e=0;eg(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),y=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e{let t=e;t instanceof Uint8Array&&(t=c.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return y(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}};class x extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class w extends x{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}}class S extends x{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}}class k extends x{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class j extends x{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class E extends x{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class O extends x{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class C extends x{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class I extends x{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class P extends x{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class A extends x{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class T extends x{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class z extends x{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class N extends x{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class R extends x{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}var _=o.getRandomValues.bind(o);function M(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new j(`Unsupported JWE Algorithm: ${e}`)}}var D=e=>_(new Uint8Array(M(e)>>3)),L=(e,t)=>{if(t.length<<3!==M(e))throw new O("Invalid Initialization Vector length")},F=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new O(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},U=(e,t)=>{if(!(e instanceof Uint8Array))throw TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw TypeError("Second argument must be a buffer");if(e.length!==t.length)throw TypeError("Input buffers must have the same length");let r=e.length,n=0,i=-1;for(;++ie.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function $(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!Z(e.algorithm,"AES-GCM"))throw H("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw H(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!Z(e.algorithm,"AES-KW"))throw H("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw H(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw H("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!Z(e.algorithm,"PBKDF2"))throw H("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!Z(e.algorithm,"RSA-OAEP"))throw H("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(W(e.algorithm.hash)!==r)throw H(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}V(e,r)}function q(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var G=(e,...t)=>q("Key must be ",e,...t);function K(e,t,...r){return q(`Key for the ${e} algorithm must be `,t,...r)}var X=e=>a(e);let J=["CryptoKey"];async function Y(e,t,r,n,i,a){let s,l;if(!(t instanceof Uint8Array))throw TypeError(G(t,"Uint8Array"));let c=parseInt(e.slice(1,4),10),d=await o.subtle.importKey("raw",t.subarray(c>>3),"AES-CBC",!1,["decrypt"]),p=await o.subtle.importKey("raw",t.subarray(0,c>>3),{hash:`SHA-${c<<1}`,name:"HMAC"},!1,["sign"]),h=u(a,n,r,f(a.length<<3)),m=new Uint8Array((await o.subtle.sign("HMAC",p,h)).slice(0,c>>3));try{s=U(i,m)}catch(e){}if(!s)throw new E;try{l=new Uint8Array(await o.subtle.decrypt({iv:n,name:"AES-CBC"},d,r))}catch(e){}if(!l)throw new E;return l}async function Q(e,t,r,n,i,a){let s;t instanceof Uint8Array?s=await o.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):($(t,e,"decrypt"),s=t);try{return new Uint8Array(await o.subtle.decrypt({additionalData:a,iv:n,name:"AES-GCM",tagLength:128},s,u(r,i)))}catch(e){throw new E}}let ee=async(e,t,r,n,i,o)=>{if(!a(t)&&!(t instanceof Uint8Array))throw TypeError(G(t,...J,"Uint8Array"));switch(L(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&F(t,parseInt(e.slice(-3),10)),Y(e,t,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&F(t,parseInt(e.slice(1,4),10)),Q(e,t,r,n,i,o);default:throw new j("Unsupported JWE Content Encryption Algorithm")}},et=async()=>{throw new j('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},er=async()=>{throw new j('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')};var en=(...e)=>{let t;let r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0};function ei(e){if(!("object"==typeof e&&null!==e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var eo=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ea(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function es(e,t,r){if(a(e))return $(e,t,r),e;if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(G(e,...J,"Uint8Array"))}let el=async(e,t,r)=>{let n=await es(t,e,"wrapKey");ea(n,e);let i=await o.subtle.importKey("raw",r,...eo);return new Uint8Array(await o.subtle.wrapKey("raw",i,n,"AES-KW"))},ec=async(e,t,r)=>{let n=await es(t,e,"unwrapKey");ea(n,e);let i=await o.subtle.unwrapKey("raw",r,n,"AES-KW",...eo);return new Uint8Array(await o.subtle.exportKey("raw",i))};async function eu(e,t,r,n,i=new Uint8Array(0),s=new Uint8Array(0)){let c;if(!a(e))throw TypeError(G(e,...J));if($(e,"ECDH"),!a(t))throw TypeError(G(t,...J));$(t,"ECDH","deriveBits");let d=u(h(l.encode(r)),h(i),h(s),p(n));return c="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,m(new Uint8Array(await o.subtle.deriveBits({name:e.algorithm.name,public:e},t,c)),n,d)}async function ed(e){if(!a(e))throw TypeError(G(e,...J));return o.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function ef(e){if(!a(e))throw TypeError(G(e,...J));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function ep(e,t,r,n){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new O("PBES2 Salt Input must be 8 or more octets")}(e);let i=u(l.encode(t),new Uint8Array([0]),e),s=parseInt(t.slice(13,16),10),c={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},d=await function(e,t){if(e instanceof Uint8Array)return o.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(a(e))return $(e,t,"deriveBits","deriveKey"),e;throw TypeError(G(e,...J,"Uint8Array"))}(n,t);if(d.usages.includes("deriveBits"))return new Uint8Array(await o.subtle.deriveBits(c,d,s));if(d.usages.includes("deriveKey"))return o.subtle.deriveKey(c,d,{length:s,name:"AES-KW"},!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let eh=async(e,t,r,n=2048,i=_(new Uint8Array(16)))=>{let o=await ep(i,e,n,t);return{encryptedKey:await el(e.slice(-6),o,r),p2c:n,p2s:v(i)}},em=async(e,t,r,n,i)=>{let o=await ep(i,e,n,t);return ec(e.slice(-6),o,r)};function eg(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new j(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}var ev=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};let ey=async(e,t,r)=>{if(!a(t))throw TypeError(G(t,...J));if($(t,e,"encrypt","wrapKey"),ev(e,t),t.usages.includes("encrypt"))return new Uint8Array(await o.subtle.encrypt(eg(e),t,r));if(t.usages.includes("wrapKey")){let n=await o.subtle.importKey("raw",r,...eo);return new Uint8Array(await o.subtle.wrapKey("raw",n,t,eg(e)))}throw TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},eb=async(e,t,r)=>{if(!a(t))throw TypeError(G(t,...J));if($(t,e,"decrypt","unwrapKey"),ev(e,t),t.usages.includes("decrypt"))return new Uint8Array(await o.subtle.decrypt(eg(e),t,r));if(t.usages.includes("unwrapKey")){let n=await o.subtle.unwrapKey("raw",r,t,eg(e),...eo);return new Uint8Array(await o.subtle.exportKey("raw",n))}throw TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function ex(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new j(`Unsupported JWE Algorithm: ${e}`)}}var ew=e=>_(new Uint8Array(ex(e)>>3)),eS=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join("\n");return`-----BEGIN ${t}----- +${r} +-----END ${t}-----`};let ek=async(e,t,r)=>{if(!a(r))throw TypeError(G(r,...J));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eS(g(new Uint8Array(await o.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},ej=e=>ek("public","spki",e),eE=e=>ek("private","pkcs8",e),eO=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let n=e.indexOf(t[0],r);if(-1===n)return!1;let i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||eO(e,t,n+1))},eC=e=>{switch(!0){case eO(e,[42,134,72,206,61,3,1,7]):return"P-256";case eO(e,[43,129,4,0,34]):return"P-384";case eO(e,[43,129,4,0,35]):return"P-521";case eO(e,[43,101,110]):return"X25519";case eO(e,[43,101,111]):return"X448";case eO(e,[43,101,112]):return"Ed25519";case eO(e,[43,101,113]):return"Ed448";default:throw new j("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},eI=async(e,t,r,n,i)=>{var a,s;let l,c;let u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),d="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":l={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},c=d?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":l={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},c=d?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":l={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},c=d?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":l={name:"ECDSA",namedCurve:"P-256"},c=d?["verify"]:["sign"];break;case"ES384":l={name:"ECDSA",namedCurve:"P-384"},c=d?["verify"]:["sign"];break;case"ES512":l={name:"ECDSA",namedCurve:"P-521"},c=d?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let e=eC(u);l=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=d?[]:["deriveBits"];break}case"EdDSA":l={name:eC(u)},c=d?["verify"]:["sign"];break;default:throw new j('Invalid or unsupported "alg" (Algorithm) value')}try{return await o.subtle.importKey(t,u,l,null!==(a=null==i?void 0:i.extractable)&&void 0!==a&&a,c)}catch(e){if("Ed25519"===l.name&&(null==e?void 0:e.name)==="NotSupportedError"&&B())return l={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},await o.subtle.importKey(t,u,l,null!==(s=null==i?void 0:i.extractable)&&void 0!==s&&s,c);throw e}},eP=(e,t,r)=>eI(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),eA=(e,t,r)=>eI(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function eT(e){let t=[],r=0;for(;r=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw TypeError("invalid indefinite form length");n++}let r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}else{let r=127&e[t];t++,n=0;for(let i=0;i{let n;try{n=eS(function(e){let t=eT(eT(ez(e).contents)[0].contents);return g(t[160===t[0].raw[0]?6:5].raw)}(y(e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""))),"PUBLIC KEY")}catch(e){throw TypeError("failed to parse the X.509 certificate",{cause:e})}return eA(n,t,r)},eR=async e=>{var t,r;if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new j(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new j('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return o.subtle.importKey("raw",b(e.k),...a);let s={...e};delete s.alg,delete s.use;try{return await o.subtle.importKey("jwk",s,...a)}catch(e){if("Ed25519"===n.name&&(null==e?void 0:e.name)==="NotSupportedError"&&B())return a[0]={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},await o.subtle.importKey("jwk",s,...a);throw e}};async function e_(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return eA(e,t,r)}async function eM(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');return eN(e,t,r)}async function eD(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return eP(e,t,r)}async function eL(e,t,r){var n;if(!ei(e))throw TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=r||(r=!0!==e.ext),r)return eR({...e,alg:t,ext:null!==(n=e.ext)&&void 0!==n&&n});return b(e.k);case"RSA":if(void 0!==e.oth)throw new j('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return eR({...e,alg:t});default:throw new j('Unsupported "kty" (Key Type) Parameter value')}}let eF=(e,t)=>{if(!(t instanceof Uint8Array)){if(!X(t))throw TypeError(K(e,t,...J,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${J.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},eU=(e,t,r)=>{if(!X(t))throw TypeError(K(e,t,...J));if("secret"===t.type)throw TypeError(`${J.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${J.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${J.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${J.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${J.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)};var eB=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?eF(e,t):eU(e,t,r)};async function eH(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(G(r,"Uint8Array"));let a=parseInt(e.slice(1,4),10),s=await o.subtle.importKey("raw",r.subarray(a>>3),"AES-CBC",!1,["encrypt"]),l=await o.subtle.importKey("raw",r.subarray(0,a>>3),{hash:`SHA-${a<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await o.subtle.encrypt({iv:n,name:"AES-CBC"},s,t)),d=u(i,n,c,f(i.length<<3));return{ciphertext:c,tag:new Uint8Array((await o.subtle.sign("HMAC",l,d)).slice(0,a>>3))}}async function eZ(e,t,r,n,i){let a;r instanceof Uint8Array?a=await o.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):($(r,e,"encrypt"),a=r);let s=new Uint8Array(await o.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},a,t)),l=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:l}}let eW=async(e,t,r,n,i)=>{if(!a(r)&&!(r instanceof Uint8Array))throw TypeError(G(r,...J,"Uint8Array"));switch(L(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&F(r,parseInt(e.slice(-3),10)),eH(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&F(r,parseInt(e.slice(1,4),10)),eZ(e,t,r,n,i);default:throw new j("Unsupported JWE Content Encryption Algorithm")}};async function eV(e,t,r,n){let i=e.slice(0,7);n||(n=D(i));let{ciphertext:o,tag:a}=await eW(i,r,t,n,new Uint8Array(0));return{encryptedKey:o,iv:v(n),tag:v(a)}}async function e$(e,t,r,n,i){return ee(e.slice(0,7),t,r,n,i,new Uint8Array(0))}async function eq(e,t,r,n,i){switch(eB(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new O("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,o;if(!ei(n.epk))throw new O('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!ef(t))throw new j("ECDH with the provided key is not allowed or not supported by your javascript runtime");let a=await eL(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new O('JOSE Header "apu" (Agreement PartyUInfo) invalid');i=b(n.apu)}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new O('JOSE Header "apv" (Agreement PartyVInfo) invalid');o=b(n.apv)}let s=await eu(a,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?ex(n.enc):parseInt(e.slice(-5,-2),10),i,o);if("ECDH-ES"===e)return s;if(void 0===r)throw new O("JWE Encrypted Key missing");return ec(e.slice(-6),s,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new O("JWE Encrypted Key missing");return eb(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new O("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new O('JOSE Header "p2c" (PBES2 Count) missing or invalid');let o=(null==i?void 0:i.maxPBES2Count)||1e4;if(n.p2c>o)throw new O('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new O('JOSE Header "p2s" (PBES2 Salt) missing or invalid');return em(e,t,r,n.p2c,b(n.p2s))}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new O("JWE Encrypted Key missing");return ec(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":if(void 0===r)throw new O("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new O('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new O('JOSE Header "tag" (Authentication Tag) missing or invalid');return e$(e,t,r,b(n.iv),b(n.tag));default:throw new j('Invalid or unsupported "alg" (JWE Algorithm) header value')}}var eG=function(e,t,r,n,i){let o;if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new j(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)},eK=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function eX(e,t,r){var n;let i,o,a,s;if(!ei(e))throw new O("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new O("JOSE Header missing");if("string"!=typeof e.iv)throw new O("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new O("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new O("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new O("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new O("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new O("JWE AAD incorrect type");if(void 0!==e.header&&!ei(e.header))throw new O("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!ei(e.unprotected))throw new O("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=b(e.protected);i=JSON.parse(c.decode(t))}catch(e){throw new O("JWE Protected Header is invalid")}if(!en(i,e.header,e.unprotected))throw new O("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let d={...i,...e.header,...e.unprotected};if(eG(O,new Map,null==r?void 0:r.crit,i,d),void 0!==d.zip){if(!i||!i.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==d.zip)throw new j('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:f,enc:p}=d;if("string"!=typeof f||!f)throw new O("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof p||!p)throw new O("missing JWE Encryption Algorithm (enc) in JWE Header");let h=r&&eK("keyManagementAlgorithms",r.keyManagementAlgorithms),m=r&&eK("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(h&&!h.has(f))throw new k('"alg" (Algorithm) Header Parameter not allowed');if(m&&!m.has(p))throw new k('"enc" (Encryption Algorithm) Header Parameter not allowed');void 0!==e.encrypted_key&&(o=b(e.encrypted_key));let g=!1;"function"==typeof t&&(t=await t(i,e),g=!0);try{a=await eq(f,t,o,d,r)}catch(e){if(e instanceof TypeError||e instanceof O||e instanceof j)throw e;a=ew(p)}let v=b(e.iv),y=b(e.tag),x=l.encode(null!==(n=e.protected)&&void 0!==n?n:"");s=void 0!==e.aad?u(x,l.encode("."),l.encode(e.aad)):x;let w=await ee(p,a,b(e.ciphertext),v,y,s);"DEF"===d.zip&&(w=await ((null==r?void 0:r.inflateRaw)||et)(w));let S={plaintext:w};return(void 0!==e.protected&&(S.protectedHeader=i),void 0!==e.aad&&(S.additionalAuthenticatedData=b(e.aad)),void 0!==e.unprotected&&(S.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(S.unprotectedHeader=e.header),g)?{...S,key:t}:S}async function eJ(e,t,r){if(e instanceof Uint8Array&&(e=c.decode(e)),"string"!=typeof e)throw new O("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:s,length:l}=e.split(".");if(5!==l)throw new O("Invalid Compact JWE");let u=await eX({ciphertext:a,iv:o||void 0,protected:n||void 0,tag:s||void 0,encrypted_key:i||void 0},t,r),d={plaintext:u.plaintext,protectedHeader:u.protectedHeader};return"function"==typeof t?{...d,key:u.key}:d}async function eY(e,t,r){if(!ei(e))throw new O("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(ei))throw new O("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new O("JWE Recipients has no members");for(let n of e.recipients)try{return await eX({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new E}let eQ=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:v(e)};if(!a(e))throw TypeError(G(e,...J,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...s}=await o.subtle.exportKey("jwk",e);return s};async function e0(e){return ej(e)}async function e1(e){return eE(e)}async function e2(e){return eQ(e)}async function e5(e,t,r,n,i={}){let o,a,s;switch(eB(e,r,"encrypt"),e){case"dir":s=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!ef(r))throw new j("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:l,apv:c}=i,{epk:u}=i;u||(u=(await ed(r)).privateKey);let{x:d,y:f,crv:p,kty:h}=await e2(u),m=await eu(r,u,"ECDH-ES"===e?t:e,"ECDH-ES"===e?ex(t):parseInt(e.slice(-5,-2),10),l,c);if(a={epk:{x:d,crv:p,kty:h}},"EC"===h&&(a.epk.y=f),l&&(a.apu=v(l)),c&&(a.apv=v(c)),"ECDH-ES"===e){s=m;break}s=n||ew(t);let g=e.slice(-6);o=await el(g,m,s);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s=n||ew(t),o=await ey(e,r,s);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{s=n||ew(t);let{p2c:l,p2s:c}=i;({encryptedKey:o,...a}=await eh(e,r,s,l,c));break}case"A128KW":case"A192KW":case"A256KW":s=n||ew(t),o=await el(e,r,s);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{s=n||ew(t);let{iv:l}=i;({encryptedKey:o,...a}=await eV(e,r,s,l));break}default:throw new j('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:s,encryptedKey:o,parameters:a}}let e4=Symbol();class e3{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){let r,n,i,o,a,s,d;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new O("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!en(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new O("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let f={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(eG(O,new Map,null==t?void 0:t.crit,this._protectedHeader,f),void 0!==f.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new O('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==f.zip)throw new j('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:p,enc:h}=f;if("string"!=typeof p||!p)throw new O('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof h||!h)throw new O('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===p){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===p&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let i;({cek:n,encryptedKey:r,parameters:i}=await e5(p,h,e,this._cek,this._keyManagementParameters)),i&&(t&&e4 in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...i}:this.setUnprotectedHeader(i):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...i}:this.setProtectedHeader(i))}if(this._iv||(this._iv=D(h)),o=this._protectedHeader?l.encode(v(JSON.stringify(this._protectedHeader))):l.encode(""),this._aad?(a=v(this._aad),i=u(o,l.encode("."),l.encode(a))):i=o,"DEF"===f.zip){let e=await ((null==t?void 0:t.deflateRaw)||er)(this._plaintext);({ciphertext:s,tag:d}=await eW(h,e,n,this._iv,i))}else({ciphertext:s,tag:d}=await eW(h,this._plaintext,n,this._iv,i));let m={ciphertext:v(s),iv:v(this._iv),tag:v(d)};return r&&(m.encrypted_key=v(r)),a&&(m.aad=a),this._protectedHeader&&(m.protected=c.decode(o)),this._sharedUnprotectedHeader&&(m.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(m.header=this._unprotectedHeader),m}}class e6{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class e8{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){let r=new e6(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,n;let i;if(!this._recipients.length)throw new O("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){let[t]=this._recipients,r=await new e3(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e}),n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(n.aad=r.aad),r.protected&&(n.protected=r.protected),r.unprotected&&(n.unprotected=r.unprotected),r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key),r.header&&(n.recipients[0].header=r.header),n}for(let e=0;e>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":if(B()&&"NODE-ED25519"===t.name)return{name:"NODE-ED25519",namedCurve:"NODE-ED25519"};return{name:t.name};default:throw new j(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function e9(e,t,r){if(a(t))return!function(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Z(e.algorithm,"HMAC"))throw H("HMAC");let r=parseInt(t.slice(2),10);if(W(e.algorithm.hash)!==r)throw H(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Z(e.algorithm,"RSASSA-PKCS1-v1_5"))throw H("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(W(e.algorithm.hash)!==r)throw H(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Z(e.algorithm,"RSA-PSS"))throw H("RSA-PSS");let r=parseInt(t.slice(2),10);if(W(e.algorithm.hash)!==r)throw H(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name){if(B()){if(Z(e.algorithm,"NODE-ED25519"))break;throw H("Ed25519, Ed448, or NODE-ED25519")}throw H("Ed25519 or Ed448")}break;case"ES256":case"ES384":case"ES512":{if(!Z(e.algorithm,"ECDSA"))throw H("ECDSA");let r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw H(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}V(e,r)}(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(G(t,...J));return o.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(G(t,...J,"Uint8Array"))}let te=async(e,t,r,n)=>{let i=await e9(e,t,"verify");ev(e,i);let a=e7(e,i.algorithm);try{return await o.subtle.verify(a,i,r,n)}catch(e){return!1}};async function tt(e,t,r){var n;if(!ei(e))throw new C("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new C('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new C("JWS Protected Header incorrect type");if(void 0===e.payload)throw new C("JWS Payload missing");if("string"!=typeof e.signature)throw new C("JWS Signature missing or incorrect type");if(void 0!==e.header&&!ei(e.header))throw new C("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{let t=b(e.protected);i=JSON.parse(c.decode(t))}catch(e){throw new C("JWS Protected Header is invalid")}if(!en(i,e.header))throw new C("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let o={...i,...e.header},a=eG(C,new Map([["b64",!0]]),null==r?void 0:r.crit,i,o),s=!0;if(a.has("b64")&&"boolean"!=typeof(s=i.b64))throw new C('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:d}=o;if("string"!=typeof d||!d)throw new C('JWS "alg" (Algorithm) Header Parameter missing or invalid');let f=r&&eK("algorithms",r.algorithms);if(f&&!f.has(d))throw new k('"alg" (Algorithm) Header Parameter not allowed');if(s){if("string"!=typeof e.payload)throw new C("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new C("JWS Payload must be a string or an Uint8Array instance");let p=!1;"function"==typeof t&&(t=await t(i,e),p=!0),eB(d,t,"verify");let h=u(l.encode(null!==(n=e.protected)&&void 0!==n?n:""),l.encode("."),"string"==typeof e.payload?l.encode(e.payload):e.payload),m=b(e.signature);if(!await te(d,t,m,h))throw new R;let g={payload:s?b(e.payload):"string"==typeof e.payload?l.encode(e.payload):e.payload};return(void 0!==e.protected&&(g.protectedHeader=i),void 0!==e.header&&(g.unprotectedHeader=e.header),p)?{...g,key:t}:g}async function tr(e,t,r){if(e instanceof Uint8Array&&(e=c.decode(e)),"string"!=typeof e)throw new C("Compact JWS must be a string or Uint8Array");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a)throw new C("Invalid Compact JWS");let s=await tt({payload:i,protected:n,signature:o},t,r),l={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...l,key:s.key}:l}async function tn(e,t,r){if(!ei(e))throw new C("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(ei))throw new C("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await tt({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch(e){}throw new R}var ti=e=>Math.floor(e.getTime()/1e3);let to=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;var ta=e=>{let t=to.exec(e);if(!t)throw TypeError("Invalid time period format");let r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*r);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*r);case"day":case"days":case"d":return Math.round(86400*r);case"week":case"weeks":case"w":return Math.round(604800*r);default:return Math.round(31557600*r)}};let ts=e=>e.toLowerCase().replace(/^application\//,""),tl=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));var tc=(e,t,r={})=>{let n,i;let{typ:o}=r;if(o&&("string"!=typeof e.typ||ts(e.typ)!==ts(o)))throw new w('unexpected "typ" JWT header value',"typ","check_failed");try{n=JSON.parse(c.decode(t))}catch(e){}if(!ei(n))throw new I("JWT Claims Set must be a top-level JSON object");let{requiredClaims:a=[],issuer:s,subject:l,audience:u,maxTokenAge:d}=r;for(let e of(void 0!==d&&a.push("iat"),void 0!==u&&a.push("aud"),void 0!==l&&a.push("sub"),void 0!==s&&a.push("iss"),new Set(a.reverse())))if(!(e in n))throw new w(`missing required "${e}" claim`,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new w('unexpected "iss" claim value',"iss","check_failed");if(l&&n.sub!==l)throw new w('unexpected "sub" claim value',"sub","check_failed");if(u&&!tl(n.aud,"string"==typeof u?[u]:u))throw new w('unexpected "aud" claim value',"aud","check_failed");switch(typeof r.clockTolerance){case"string":i=ta(r.clockTolerance);break;case"number":i=r.clockTolerance;break;case"undefined":i=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:f}=r,p=ti(f||new Date);if((void 0!==n.iat||d)&&"number"!=typeof n.iat)throw new w('"iat" claim must be a number',"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new w('"nbf" claim must be a number',"nbf","invalid");if(n.nbf>p+i)throw new w('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new w('"exp" claim must be a number',"exp","invalid");if(n.exp<=p-i)throw new S('"exp" claim timestamp check failed',"exp","check_failed")}if(d){let e=p-n.iat;if(e-i>("number"==typeof d?d:ta(d)))throw new S('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-i)throw new w('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return n};async function tu(e,t,r){var n;let i=await tr(e,t,r);if((null===(n=i.protectedHeader.crit)||void 0===n?void 0:n.includes("b64"))&&!1===i.protectedHeader.b64)throw new I("JWTs MUST NOT use unencoded payload");let o={payload:tc(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...o,key:i.key}:o}async function td(e,t,r){let n=await eJ(e,t,r),i=tc(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new w('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new w('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new w('replicated "aud" claim header parameter mismatch',"aud","mismatch");let a={payload:i,protectedHeader:o};return"function"==typeof t?{...a,key:n.key}:a}class tf{constructor(e){this._flattened=new e3(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}let tp=async(e,t,r)=>{let n=await e9(e,t,"sign");return ev(e,n),new Uint8Array(await o.subtle.sign(e7(e,n.algorithm),n,r))};class th{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let r;if(!this._protectedHeader&&!this._unprotectedHeader)throw new C("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!en(this._protectedHeader,this._unprotectedHeader))throw new C("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},i=eG(C,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,n),o=!0;if(i.has("b64")&&"boolean"!=typeof(o=this._protectedHeader.b64))throw new C('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;if("string"!=typeof a||!a)throw new C('JWS "alg" (Algorithm) Header Parameter missing or invalid');eB(a,e,"sign");let s=this._payload;o&&(s=l.encode(v(s)));let d=u(r=this._protectedHeader?l.encode(v(JSON.stringify(this._protectedHeader))):l.encode(""),l.encode("."),s),f={signature:v(await tp(a,e,d)),payload:""};return o&&(f.payload=c.decode(s)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=c.decode(r)),f}}class tm{constructor(e){this._flattened=new th(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let r=await this._flattened.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class tg{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class tv{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){let r=new tg(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new C("at least one signature must be added");let e={signatures:[],payload:""};for(let t=0;t{if("string"!=typeof e||!e)throw new P(`${t} missing or invalid`)};async function tS(e,t){let r;if(!ei(e))throw TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(e.kty){case"EC":tw(e.crv,'"crv" (Curve) Parameter'),tw(e.x,'"x" (X Coordinate) Parameter'),tw(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":tw(e.crv,'"crv" (Subtype of Key Pair) Parameter'),tw(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":tw(e.e,'"e" (Exponent) Parameter'),tw(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":tw(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new j('"kty" (Key Type) Parameter missing or unsupported')}let n=l.encode(JSON.stringify(r));return v(await s(t,n))}async function tk(e,t){null!=t||(t="sha256");let r=await tS(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function tj(e,t){let r={...e,...null==t?void 0:t.header};if(!ei(r.jwk))throw new C('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eL({...r.jwk,ext:!0},r.alg,!0);if(n instanceof Uint8Array||"public"!==n.type)throw new C('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function tE(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(tO)}function tO(e){return ei(e)}class tC{constructor(e){if(this._cached=new WeakMap,!tE(e))throw new A("JSON Web Key Set malformed");this._jwks="function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}async getKey(e,t){let{alg:r,kid:n}={...e,...null==t?void 0:t.header},i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new j('Unsupported "alg" value for a JSON Web Key Set')}}(r),o=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t}),{0:a,length:s}=o;if(0===s)throw new T;if(1!==s){let e=new z,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(let e of o)try{yield await tI(t,e,r)}catch(e){continue}},e}return tI(this._cached,a,r)}}async function tI(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await eL({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new A("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function tP(e){let t=new tC(e);return async function(e,r){return t.getKey(e,r)}}let tA=async(e,t,r)=>{let n,i;let o=!1;"function"==typeof AbortController&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},t));let a=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(e=>{if(o)throw new N;throw e});if(void 0!==i&&clearTimeout(i),200!==a.status)throw new x("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch(e){throw new x("Failed to parse the JSON Web Key Set HTTP response as JSON")}};class tT extends tC{constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now(){if(!tE(e))throw new A("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}function tz(e,t){let r=new tT(e,t);return async function(e,t){return r.getKey(e,t)}}class tN extends ty{encode(){let e=v(JSON.stringify({alg:"none"})),t=v(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){let r;if("string"!=typeof e)throw new I("Unsecured JWT must be a string");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a||""!==o)throw new I("Invalid Unsecured JWT");try{if(r=JSON.parse(c.decode(b(n))),"none"!==r.alg)throw Error()}catch(e){throw new I("Invalid Unsecured JWT")}return{payload:tc(r,b(i),t),header:r}}}let tR=v,t_=b;function tM(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e){if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header")}try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(c.decode(t_(t)));if(!ei(e))throw Error();return e}catch(e){throw TypeError("Invalid Token or Protected Header formatting")}}function tD(e){let t,r;if("string"!=typeof e)throw new I("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new I("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new I("Invalid JWT");if(!n)throw new I("JWTs must contain a payload");try{t=t_(n)}catch(e){throw new I("Failed to parse the base64url encoded payload")}try{r=JSON.parse(c.decode(t))}catch(e){throw new I("Failed to parse the decoded payload as JSON")}if(!ei(r))throw new I("Invalid JWT Claims Set");return r}async function tL(e,t){var r;let n,i,a;switch(e){case"HS256":case"HS384":case"HS512":n=parseInt(e.slice(-3),10),i={name:"HMAC",hash:`SHA-${n}`,length:n},a=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return _(new Uint8Array((n=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:n=parseInt(e.slice(1,4),10)},a=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:n=parseInt(e.slice(1,4),10)},a=["encrypt","decrypt"];break;default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return o.subtle.generateKey(i,null!==(r=null==t?void 0:t.extractable)&&void 0!==r&&r,a)}function tF(e){var t;let r=null!==(t=null==e?void 0:e.modulusLength)&&void 0!==t?t:2048;if("number"!=typeof r||r<2048)throw new j("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function tU(e,t){var r,n,i,a;let s,l;switch(e){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:tF(t)},l=["sign","verify"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:tF(t)},l=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:tF(t)},l=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},l=["sign","verify"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},l=["sign","verify"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},l=["sign","verify"];break;case"EdDSA":l=["sign","verify"];let c=null!==(r=null==t?void 0:t.crv)&&void 0!==r?r:"Ed25519";switch(c){case"Ed25519":case"Ed448":s={name:c};break;default:throw new j("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{l=["deriveKey","deriveBits"];let e=null!==(n=null==t?void 0:t.crv)&&void 0!==n?n:"P-256";switch(e){case"P-256":case"P-384":case"P-521":s={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":s={name:e};break;default:throw new j("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new j('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}try{return await o.subtle.generateKey(s,null!==(i=null==t?void 0:t.extractable)&&void 0!==i&&i,l)}catch(e){if("Ed25519"===s.name&&(null==e?void 0:e.name)==="NotSupportedError"&&B())return s={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},await o.subtle.generateKey(s,null!==(a=null==t?void 0:t.extractable)&&void 0!==a&&a,l);throw e}}async function tB(e,t){return tU(e,t)}async function tH(e,t){return tL(e,t)}},27962:function(e,t,r){"use strict";r.d(t,{B:function(){return i}});let n={};function i(e,t){let r=t||n;return o(e,"boolean"!=typeof r.includeImageAlt||r.includeImageAlt,"boolean"!=typeof r.includeHtml||r.includeHtml)}function o(e,t,r){if(e&&"object"==typeof e){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a(e.children,t,r)}return Array.isArray(e)?a(e,t,r):""}function a(e,t,r){let n=[],i=-1;for(;++i-1&&e.test(String.fromCharCode(t))}}p(/\p{P}|\p{S}/u),p(/\s/)},42962:function(e,t,r){"use strict";function n(e){return -2===e||-1===e||32===e}function i(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function o(e,t,r,i){let o=i?i-1:Number.POSITIVE_INFINITY,a=0;return function(i){return n(i)?(e.enter(r),function i(s){return n(s)&&a++o?0:o+t:t>o?o:t,r=r>0?r:0,n.length<1e4)(i=Array.from(n)).unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a0?(n(e,e.length,0,t),e):t}r.d(t,{V:function(){return i},d:function(){return n}})},98788:function(e,t,r){"use strict";r.d(t,{r:function(){return a}}),o(/[A-Za-z]/),o(/[\dA-Za-z]/),o(/[#-'*+\--9=?A-Z^-~]/),o(/\d/),o(/[\dA-Fa-f]/),o(/[!-/:-@[-`{-~]/);let n=o(/\p{P}|\p{S}/u),i=o(/\s/);function o(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function a(e){return null===e||null!==e&&(e<0||32===e)||i(e)?1:n(e)?2:void 0}},4663:function(e,t,r){"use strict";r.d(t,{W:function(){return o}});var n=r(21905);let i={}.hasOwnProperty;function o(e){let t={},r=-1;for(;++rArray.isArray(e)},4214:function(e,t,r){"use strict";r.d(t,{X:function(){return s}});var n=r(85893),i=r(67294),o=r(46387),a=r(32838);function s({children:e,features:t,strict:r=!1}){let[,s]=(0,i.useState)(!l(t)),c=(0,i.useRef)(void 0);if(!l(t)){let{renderer:e,...r}=t;c.current=e,(0,a.K)(r)}return(0,i.useEffect)(()=>{l(t)&&t().then(({renderer:e,...t})=>{(0,a.K)(t),c.current=e,s(!0)})},[]),(0,n.jsx)(o.u.Provider,{value:{renderer:c.current,strict:r},children:e})}function l(e){return"function"==typeof e}},46387:function(e,t,r){"use strict";r.d(t,{u:function(){return n}});let n=(0,r(67294).createContext)({strict:!1})},74499:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(72216);let i=["read","resolveKeyframes","update","preRender","render","postRender"];function o(e,t){let r=!1,o=!0,a={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,l=i.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,i=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(a)}let l={schedule:(e,i=!1,a=!1)=>{let s=a&&n?t:r;return i&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(a=e,n){i=!0;return}n=!0,[t,r]=[r,t],r.clear(),t.forEach(s),n=!1,i&&(i=!1,l.process(e))}};return l}(s),e),{}),{read:c,resolveKeyframes:u,update:d,preRender:f,render:p,postRender:h}=l,m=()=>{let i=n.c.useManualTiming?a.timestamp:performance.now();r=!1,a.delta=o?1e3/60:Math.max(Math.min(i-a.timestamp,40),1),a.timestamp=i,a.isProcessing=!0,c.process(a),u.process(a),d.process(a),f.process(a),p.process(a),h.process(a),a.isProcessing=!1,r&&t&&(o=!1,e(m))},g=()=>{r=!0,o=!0,a.isProcessing||e(m)};return{schedule:i.reduce((e,t)=>{let n=l[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;tn[e].some(e=>!!t[e])}},32838:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(17427);function i(e){for(let t in e)n.featureDefinitions[t]={...n.featureDefinitions[t],...e[t]}}},90033:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});let n={};var i=r(21093);function o(e,{layout:t,layoutId:r}){return i.G.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!n[e]||"opacity"===e)}},43320:function(e,t,r){"use strict";r.d(t,{yK:function(){return V}});var n,i=r(85893),o=r(67294);let a=(0,o.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),s=(0,o.createContext)({}),l=(0,o.createContext)(null);var c=r(28269);let u=c.j?o.useLayoutEffect:o.useEffect;var d=r(46387),f=r(80949);let{schedule:p,cancel:h}=(0,r(74499).Z)(queueMicrotask,!1);function m(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let g=(0,o.createContext)({});var v=r(94355),y=r(87602);function b(e){return Array.isArray(e)?e.join(" "):e}var x=r(32838);let w=(0,o.createContext)({}),S=Symbol.for("motionComponentSymbol");var k=r(17427),j=r(30477),E=r(4058),O=r(30909),C=r(80488),I=r(2145),P=r(90815),A=r(65896);let T=e=>(t,r)=>{let n=(0,o.useContext)(s),i=(0,o.useContext)(l),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){let a={latestValues:function(e,t,r,n){let i={},o=n(e,{});for(let e in o)i[e]=function(e){let t=(0,A.i)(e)?e.get():e;return(0,P.p)(t)?t.toValue():t}(o[e]);let{initial:a,animate:s}=e,l=(0,y.G)(e),c=(0,y.M)(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!r&&!1===r.initial,d=(u=u||!1===a)?s:a;if(d&&"boolean"!=typeof d&&!(0,C.H)(d)){let t=Array.isArray(d)?d:[d];for(let r=0;rr(n,e,a)),a})(e,t,n,i);return r?a():function(e){let t=(0,o.useRef)(null);return null===t.current&&(t.current=e()),t.current}(a)},z=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),N=()=>({...z(),attrs:{}});var R=r(70858),_=r(42781),M=r(46961);let D={useVisualState:T({scrapeMotionValuesFromProps:O.U,createRenderState:N,onMount:(e,t,{renderState:r,latestValues:n})=>{M.Wi.read(()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}}),M.Wi.render(()=>{(0,R.i)(r,n,(0,_.a)(t.tagName),e.transformTemplate),(0,E.K)(t,r)})}})},L={useVisualState:T({scrapeMotionValuesFromProps:r(32e3).U,createRenderState:z})};var F=r(90033),U=r(75314);function B(e,t,r){for(let n in t)(0,A.i)(t[n])||(0,F.j)(n,r)||(e[n]=t[n])}let H=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Z(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||H.has(e)}let W=e=>!Z(e);try{(n=require("@emotion/is-prop-valid").default)&&(W=e=>e.startsWith("on")?!Z(e):n(e))}catch(e){}let V=function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:h}){e&&(0,x.K)(e);let j=(0,o.forwardRef)(function(e,x){var S;let j;let E={...(0,o.useContext)(a),...e,layoutId:function({layoutId:e}){let t=(0,o.useContext)(w).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:O}=E,C=function(e){let{initial:t,animate:r}=function(e,t){if((0,y.G)(e)){let{initial:t,animate:r}=e;return{initial:!1===t||(0,v.$)(t)?t:void 0,animate:(0,v.$)(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,o.useContext)(s));return(0,o.useMemo)(()=>({initial:t,animate:r}),[b(t),b(r)])}(e),I=n(e,O);if(!O&&c.j){(0,o.useContext)(d.u).strict;let e=function(e){let{drag:t,layout:r}=k.featureDefinitions;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(E);j=e.MeasureLayout,C.visualElement=function(e,t,r,n,i){var c,h;let{visualElement:v}=(0,o.useContext)(s),y=(0,o.useContext)(d.u),b=(0,o.useContext)(l),x=(0,o.useContext)(a).reducedMotion,w=(0,o.useRef)();n=n||y.renderer,!w.current&&n&&(w.current=n(e,{visualState:t,parent:v,props:r,presenceContext:b,blockInitialAnimation:!!b&&!1===b.initial,reducedMotionConfig:x}));let S=w.current,k=(0,o.useContext)(g);S&&!S.projection&&i&&("html"===S.type||"svg"===S.type)&&function(e,t,r,n){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&m(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}(w.current,r,i,k);let j=(0,o.useRef)(!1);(0,o.useInsertionEffect)(()=>{S&&j.current&&S.update(r,b)});let E=r[f.M],O=(0,o.useRef)(!!E&&!(null===(c=window.MotionHandoffIsComplete)||void 0===c?void 0:c.call(window,E))&&(null===(h=window.MotionHasOptimisedAnimation)||void 0===h?void 0:h.call(window,E)));return u(()=>{S&&(j.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),p.render(S.render),O.current&&S.animationState&&S.animationState.animateChanges())}),(0,o.useEffect)(()=>{S&&(!O.current&&S.animationState&&S.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,E)}),O.current=!1))}),S}(h,I,E,t,e.ProjectionNode)}return(0,i.jsxs)(s.Provider,{value:C,children:[j&&C.visualElement?(0,i.jsx)(j,{visualElement:C.visualElement,...E}):null,r(h,e,(S=C.visualElement,(0,o.useCallback)(e=>{e&&I.mount&&I.mount(e),S&&(e?S.mount(e):S.unmount()),x&&("function"==typeof x?x(e):m(x)&&(x.current=e))},[S])),I,O,C.visualElement)]})});return j[S]=h,j}({...(0,j.q)("div")?D:L,preloadedFeatures:void 0,useRender:function(e=!1){return(t,r,n,{latestValues:i},a)=>{let s=((0,j.q)(t)?function(e,t,r,n){let i=(0,o.useMemo)(()=>{let r=N();return(0,R.i)(r,t,(0,_.a)(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};B(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let r={},n=function(e,t){let r=e.style||{},n={};return B(n,r,e),Object.assign(n,function({transformTemplate:e},t){return(0,o.useMemo)(()=>{let r=z();return(0,U.r)(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r})(r,i,a,t),l=function(e,t,r){let n={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(W(i)||!0===r&&Z(i)||!t&&!Z(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),c=t!==o.Fragment?{...l,...s,ref:n}:{},{children:u}=r,d=(0,o.useMemo)(()=>(0,A.i)(u)?u.get():u,[u]);return(0,o.createElement)(t,{...c,children:d})}}(t),createVisualElement:void 0,Component:"div"})}(0)},53246:function(e,t,r){"use strict";r.d(t,{D:function(){return n}});let n=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase()},74910:function(e,t,r){"use strict";r.d(t,{f:function(){return i},t:function(){return a}});let n=e=>t=>"string"==typeof t&&t.startsWith(e),i=n("--"),o=n("var(--"),a=e=>!!o(e)&&s.test(e.split("/*")[0].trim()),s=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu},30477:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});let n=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function i(e){if("string"!=typeof e||e.includes("-"));else if(n.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}},66998:function(e,t,r){"use strict";r.d(t,{j:function(){return l}});var n=r(27464),i=r(17353);let o={borderWidth:i.px,borderTopWidth:i.px,borderRightWidth:i.px,borderBottomWidth:i.px,borderLeftWidth:i.px,borderRadius:i.px,radius:i.px,borderTopLeftRadius:i.px,borderTopRightRadius:i.px,borderBottomRightRadius:i.px,borderBottomLeftRadius:i.px,width:i.px,maxWidth:i.px,height:i.px,maxHeight:i.px,top:i.px,right:i.px,bottom:i.px,left:i.px,padding:i.px,paddingTop:i.px,paddingRight:i.px,paddingBottom:i.px,paddingLeft:i.px,margin:i.px,marginTop:i.px,marginRight:i.px,marginBottom:i.px,marginLeft:i.px,backgroundPositionX:i.px,backgroundPositionY:i.px},a={rotate:i.RW,rotateX:i.RW,rotateY:i.RW,rotateZ:i.RW,scale:n.bA,scaleX:n.bA,scaleY:n.bA,scaleZ:n.bA,skew:i.RW,skewX:i.RW,skewY:i.RW,distance:i.px,translateX:i.px,translateY:i.px,translateZ:i.px,x:i.px,y:i.px,z:i.px,perspective:i.px,transformPerspective:i.px,opacity:n.Fq,originX:i.$C,originY:i.$C,originZ:i.px},s={...n.Rx,transform:Math.round},l={...o,...a,zIndex:s,size:i.px,fillOpacity:n.Fq,strokeOpacity:n.Fq,numOctaves:s}},75314:function(e,t,r){"use strict";r.d(t,{r:function(){return c}});var n=r(21093);let i=(e,t)=>t&&"number"==typeof e?t.transform(e):e;var o=r(66998);let a={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},s=n._.length;var l=r(74910);function c(e,t,r){let{style:c,vars:u,transformOrigin:d}=e,f=!1,p=!1;for(let e in t){let r=t[e];if(n.G.has(e)){f=!0;continue}if((0,l.f)(e)){u[e]=r;continue}{let t=i(r,o.j[e]);e.startsWith("origin")?(p=!0,d[e]=t):c[e]=t}}if(!t.transform&&(f||r?c.transform=function(e,t,r){let l="",c=!0;for(let u=0;u"string"==typeof e&&"svg"===e.toLowerCase()},4058:function(e,t,r){"use strict";r.d(t,{K:function(){return a}});var n=r(53246),i=r(49907),o=r(27827);function a(e,t,r,a){for(let r in(0,i.N)(e,t,void 0,a),t.attrs)e.setAttribute(o.s.has(r)?r:(0,n.D)(r),t.attrs[r])}},30909:function(e,t,r){"use strict";r.d(t,{U:function(){return a}});var n=r(65896),i=r(32e3),o=r(21093);function a(e,t,r){let a=(0,i.U)(e,t,r);for(let r in e)((0,n.i)(e[r])||(0,n.i)(t[r]))&&(a[-1!==o._.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return a}},87602:function(e,t,r){"use strict";r.d(t,{G:function(){return a},M:function(){return s}});var n=r(80488),i=r(94355),o=r(77871);function a(e){return(0,n.H)(e.animate)||o.V.some(t=>(0,i.$)(e[t]))}function s(e){return!!(a(e)||e.variants)}},94355:function(e,t,r){"use strict";function n(e){return"string"==typeof e||Array.isArray(e)}r.d(t,{$:function(){return n}})},2145:function(e,t,r){"use strict";function n(e){let t=[{},{}];return null==e||e.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function i(e,t,r,i){if("function"==typeof t){let[o,a]=n(i);t=t(void 0!==r?r:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[o,a]=n(i);t=t(void 0!==r?r:e.custom,o,a)}return t}r.d(t,{o:function(){return i}})},77871:function(e,t,r){"use strict";r.d(t,{V:function(){return i},e:function(){return n}});let n=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...n]},72216:function(e,t,r){"use strict";r.d(t,{c:function(){return n}});let n={skipAnimations:!1,useManualTiming:!1}},3043:function(e,t,r){"use strict";r.d(t,{u:function(){return n}});let n=(e,t,r)=>r>t?t:re},90815:function(e,t,r){"use strict";r.d(t,{Y:function(){return o},p:function(){return i}});var n=r(16181);let i=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),o=e=>(0,n.C)(e)?e[e.length-1]||0:e},27464:function(e,t,r){"use strict";r.d(t,{Fq:function(){return o},Rx:function(){return i},bA:function(){return a}});var n=r(3043);let i={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},o={...i,transform:e=>(0,n.u)(0,1,e)},a={...i,default:1}},17353:function(e,t,r){"use strict";r.d(t,{$C:function(){return c},RW:function(){return i},aQ:function(){return o},px:function(){return a},vh:function(){return s},vw:function(){return l}});let n=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),i=n("deg"),o=n("%"),a=n("px"),s=n("vh"),l=n("vw"),c={...o,parse:e=>o.parse(e)/100,transform:e=>o.transform(100*e)}},65896:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n=e=>!!(e&&e.getVelocity)},91389:function(e,t,r){"use strict";r.d(t,{dk:function(){return f},fw:function(){return d},zH:function(){return u}});var n=r(67294),i=r(57350),o=r(45366),a=r(43666),s=r(71327),l=r(49824);let c=(0,n.createContext)(null);function u(){var e,t;return null!=(t=null==(e=(0,n.useContext)(c))?void 0:e.value)?t:void 0}function d(){let[e,t]=(0,n.useState)([]);return[e.length>0?e.join(" "):void 0,(0,n.useMemo)(()=>function(e){let r=(0,i.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),o=(0,n.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return n.createElement(c.Provider,{value:o},e.children)},[t])]}c.displayName="DescriptionContext";let f=Object.assign((0,l.yV)(function(e,t){let r=(0,n.useId)(),i=(0,s.B)(),{id:u="headlessui-description-".concat(r),...d}=e,f=function e(){let t=(0,n.useContext)(c);if(null===t){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),p=(0,a.T)(t);(0,o.e)(()=>f.register(u),[u,f.register]);let h=i||!1,m=(0,n.useMemo)(()=>({...f.slot,disabled:h}),[f.slot,h]),g={ref:p,...f.props,id:u};return(0,l.L6)()({ourProps:g,theirProps:d,slot:m,defaultTag:"p",name:f.name||"Description"})}),{})},29490:function(e,t,r){"use strict";let n;r.d(t,{R:function(){return i}});var i=((n=i||{}).Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n)},43123:function(e,t,r){"use strict";r.d(t,{__:function(){return p},bE:function(){return f},wp:function(){return d}});var n=r(67294),i=r(57350),o=r(45366),a=r(43666),s=r(71327),l=r(21221),c=r(49824);let u=(0,n.createContext)(null);function d(e){var t,r,i;let o=null!=(r=null==(t=(0,n.useContext)(u))?void 0:t.value)?r:void 0;return(null!=(i=null==e?void 0:e.length)?i:0)>0?[o,...e].filter(Boolean).join(" "):o}function f(){let{inherit:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d(),[r,o]=(0,n.useState)([]),a=e?[t,...r].filter(Boolean):r;return[a.length>0?a.join(" "):void 0,(0,n.useMemo)(()=>function(e){let t=(0,i.z)(e=>(o(t=>[...t,e]),()=>o(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),r=(0,n.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return n.createElement(u.Provider,{value:r},e.children)},[o])]}u.displayName="LabelContext";let p=Object.assign((0,c.yV)(function(e,t){var r;let d=(0,n.useId)(),f=function e(){let t=(0,n.useContext)(u);if(null===t){let t=Error("You used a