PageSourceSearch

https://cdn.archidekt.com/_next/static/chunks/2943-2c0e14668b7d60d1.js

js archidekt.com collected 2026-10-03 21:39:54 UTC 40,790 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2943],{1979:e=>{e.exports={container:"deckTagSettings_container__v3EsM",blurb:"deckTagSettings_blurb__Ydnh9",dropContainer:"deckTagSettings_dropContainer__XxisJ",row:"deckTagSettings_row__cOkqY",removeButton:"deckTagSettings_removeButton__YVpDw",removeSpinner:"deckTagSettings_removeSpinner__CS94p",dragHandle:"deckTagSettings_dragHandle__GzYf5",selector:"deckTagSettings_selector__OlVCH"}},7487:e=>{e.exports={controls:"qrViewer_controls__6pAiQ",container:"qrViewer_container___cdd6",card:"qrViewer_card__F_4Fm",titleBox:"qrViewer_titleBox__z_8zc",art:"qrViewer_art__sglc1",tags:"qrViewer_tags__a1NAo",dimText:"qrViewer_dimText__JMSk7"}},10228:e=>{e.exports={link:"globalColorTags_link__bI2u2",none:"globalColorTags_none__0ToP5"}},22663:e=>{e.exports={container:"playgroupForm_container__kGZyl",logo:"playgroupForm_logo__1_Ecl",logoName:"playgroupForm_logoName__7XvDY",controls:"playgroupForm_controls__o2vfn",input:"playgroupForm_input__gsNAE",link:"playgroupForm_link__DJ7_w"}},24765:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(75038);a(76430);var o=a(67574),s=a(49502),n=a(701),l=a(35308),c=a(32071);let i=({children:e,options:t,backend:a,delayTouchStart:i=0,touchSlop:d=0})=>{let u={backends:[]};return c.Ay.getIsFirefox()&&u.backends.push({id:"html5",backend:l.t2,transition:s.v8,preview:!1}),u.backends.push({id:"touch",backend:n.qi,options:{enableMouseEvents:!0,touchSlop:5},transition:s.lr}),(0,r.jsx)(o.Q,{context:window,backend:a||s.U2,options:t||u,children:e})}},26705:e=>{e.exports={container:"categories_container__kwk_f",controls:"categories_controls__7LCgE",categoryDeleteList:"categories_categoryDeleteList__brhwM"}},28657:e=>{e.exports={recommendedTags:"deckTagRecommendation_recommendedTags__W95oe",header:"deckTagRecommendation_header__OSoa7",blurb:"deckTagRecommendation_blurb__UGoGo",tags:"deckTagRecommendation_tags__iWXtz"}},32177:e=>{e.exports={flex:"colorTagSettings_flex__Jnw3y",controls:"colorTagSettings_controls__RlQJI",editorControls:"colorTagSettings_editorControls__5XN8t",list:"colorTagSettings_list__yTQ49",dropdown:"colorTagSettings_dropdown__Zq_oZ",container:"colorTagSettings_container__KH9By",colorTag:"colorTagSettings_colorTag__tUyz0",colorCell:"colorTagSettings_colorCell__3CfHM",editorPicker:"colorTagSettings_editorPicker__2xbdX"}},34087:e=>{e.exports={container:"deckSettingsOverlay_container___HHtb",tabs:"deckSettingsOverlay_tabs__qraPM",tabButton:"deckSettingsOverlay_tabButton___wg36",playgroupHeader:"deckSettingsOverlay_playgroupHeader__SXaif"}},44092:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,o:()=>g});var r=a(75038);a(76430);var o=a(15918),s=a(4444),n=a(47777),l=a(82185),c=a(98279),i=a(58916),d=a.n(i);let u=()=>{let e=(0,l.GV)(e=>e.active.modals.cloneModal),[t]=(0,l.zU)(c.zM),a=()=>t({modalName:"cloneModal",flag:!1});return(0,r.jsx)(s.A,{open:e,onClose:a,className:d().container,children:(0,r.jsx)(g,{onDeckCloned:a})})},g=({onDeckCloned:e})=>{let[{tbUser:t}]=(0,o.A)(["tbUser"]),a=(0,l.GV)(e=>e.deck.name),s=(0,l.GV)(e=>e.deck.id),c=(0,l.GV)(e=>e.deck.format),i=(0,l.GV)(e=>e.deck.cardPackage);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h3",{children:["Clone ",(i?"Package":"Deck").toLocaleLowerCase()]}),""===t?(0,r.jsx)("p",{children:"You must be logged in to use this feature"}):(0,r.jsx)(n.A,{openInNewTab:!0,copyId:s,copyName:a,copyFormat:c,onCreate:e,createDeckWithCards:!s})]})}},44693:e=>{e.exports={flex:"bannerButton_flex__MGVcG",container:"bannerButton_container__Mn0dV",groups:"bannerButton_groups__eySSm",scrollContainer:"bannerButton_scrollContainer__baAyy",reverseOnMobile:"bannerButton_reverseOnMobile__mhtz5",deckControls:"bannerButton_deckControls__utrSU",button:"bannerButton_button__qmzLx",hideOnMobile:"bannerButton_hideOnMobile__7vmjf"}},48706:(e,t,a)=>{"use strict";a.d(t,{G:()=>s});var r=a(15918),o=a(82185);let s=()=>{let[{tbId:e}]=(0,r.A)(["tbId"]),t=(0,o.GV)(e=>e.deck.id),a=(0,o.GV)(e=>e.deck.ownerid),s=(0,o.GV)(e=>e.deck.snapshotMeta);return!t||!s&&`${a}`==`${e}`}},49383:(e,t,a)=>{"use strict";a.d(t,{p8:()=>D,cj:()=>T});var r=a(75038),o=a(76430),s=a(14645),n=a.n(s),l=a(82185),c=a(85785),i=a(98279),d=a(65718),u=a(68835),g=a(92910),h=a(53492),m=a(69433),p=a(21159),k=a(49435),x=a(7487),_=a.n(x);let b=({link:e,onCloseQrViewer:t})=>{let[a,s]=(0,o.useState)("qr-only"),n=(0,o.useRef)(null),c=(0,l.GV)(e=>e.deck.name),i=(0,l.GV)(e=>e.deck.featured),g=(0,l.GV)(e=>e.deck.customFeatured),x=(0,l.GV)(e=>e.deck.deckTags);return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:_().controls,children:(0,r.jsx)(u.A,{icon:"arrow left",onClick:()=>t(),children:"Back to options"})}),(0,r.jsxs)("div",{className:_().container,children:["qr-only"===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.QRCode,{ref:n,size:256,value:e,logoImage:"/images/logo.svg",logoWidth:64,logoHeight:64,logoPadding:4,qrStyle:"dots",removeQrC
1odeBehindLogo:!0,style:{background:"white",padding:"0.5rem",borderRadius:8}}),(0,r.jsx)(u.A,{onClick:()=>{m.A.signalEvent("Downloaded QR Code only");try{n.current?.download("png",`${(0,d.Tv)(c)}_qr_only.png`)}catch(e){p.A.create(`Unable to generate file: ${e}`,"QR Code generator","error")}},children:"Download QR Code"})]}),"card"===a&&(0,r.jsxs)("div",{className:_().card,children:[(0,r.jsx)("div",{className:_().titleBox,children:c}),(0,r.jsx)("div",{className:_().art,children:(0,r.jsx)(k.A,{src:g||i,alt:"Deck featured preview"})}),(0,r.jsxs)("div",{className:_().tags,children:[x.map(e=>e.name).join(", "),!x.length&&(0,r.jsx)("span",{className:_().dimText,children:"No deck tags"})]}),(0,r.jsx)(h.QRCode,{ref:n,size:100,value:e,logoImage:"/images/logo.svg",logoWidth:25,logoHeight:25,logoPadding:2,qrStyle:"dots",removeQrCodeBehindLogo:!0,style:{background:"white",borderRadius:8}})]})]})]})};var j=a(56771),y=a(40120),v=a(7648),f=a(4444);a(44693);var A=a(57413);A.Ay.div.withConfig({componentId:"sc-61db6dc4-0"})(["display:flex;flex-direction:column;gap:0.5rem;"]),A.Ay.button.withConfig({componentId:"sc-61db6dc4-1"})(["background-color:transparent;color:#ff992d;padding:0;border:none;&:hover:enabled,&:focus{cursor:pointer;}"]);let C=A.Ay.div.withConfig({componentId:"sc-61db6dc4-2"})(["margin-bottom:1rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;"]);var S=a(80283),w=a.n(S);let T=()=>{let e=(0,l.GV)(e=>e.active.modals.shareDeck),[t]=(0,l.zU)(i.zM);return(0,r.jsx)(f.A,{open:e,onClose:()=>t({modalName:"shareDeck",flag:!1}),className:w().container,children:(0,r.jsx)(D,{})})},D=()=>{let e,t,a,s,i=(0,l.GV)(e=>e.deck.sorting),h=(0,l.GV)(e=>e.deck.stack),m=(0,l.GV)(e=>e.deck.id),p=(0,l.GV)(e=>e.deck.name),[k,x]=(0,o.useState)(!1),[_,f]=(0,o.useState)(!1),[A,S]=(0,o.useState)(),[T,D]=(0,o.useState)(),N=(e=(0,d.cR)(m,p),t=`${window.origin}${e}`,a=n()(c.fv)[A],s=n()(c.Le)[T],(a||s)&&(t+="?"),a&&(t+=`sort=${a.toLowerCase()}&`),s&&(t+=`stack=${s.toLowerCase()}`),t);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h3",{children:"Share Menu"}),_&&(0,r.jsx)(b,{link:N,onCloseQrViewer:()=>f(!1)}),!_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:w().copyFiled,children:[(0,r.jsx)(j.A,{disabled:!0,value:N}),(0,r.jsx)(u.A,{color:k?"green":"blue",onClick:()=>{navigator.clipboard.writeText(N),x(!0),setTimeout(()=>x(!1),3e3)},children:k?"Copied":"Copy"})]}),(0,r.jsxs)("div",{className:w().row,children:[(0,r.jsx)(u.A,{icon:"qrcode",onClick:()=>f(!0),children:"View link as QR Code"}),(0,r.jsx)(g.A,{href:`/decks/image/${m}`,about:"_blank",children:(0,r.jsx)(u.A,{icon:"image outline",children:"Generate deck image"})})]}),(0,r.jsx)("h3",{children:"Link Options"}),(0,r.jsx)("p",{children:"To specify how others see your deck, select custom sorting and stacking options. This will change the link generated above."}),(0,r.jsx)(C,{children:(0,r.jsx)(u.A,{onClick:()=>{S(i),D(h)},children:"Apply Current Settings"})}),(0,r.jsx)(v.A,{inlineHeader:!0,header:(0,r.jsxs)(r.Fragment,{children:["Sorting Options ",(0,r.jsx)(y.A,{name:"sort amount down"})]}),value:A,placeholder:"Alphabetical, CMC, Colors, etc",options:[{label:"None",onClick:()=>S(null)},{type:"spacer"},...Object.keys(c.Zl).map(e=>({label:e,id:`${c.Zl[e]}`,onClick:()=>S(c.Zl[e])})).filter(e=>!c.PD.includes(e.id))]}),(0,r.jsx)("label",{}),(0,r.jsx)(v.A,{inlineHeader:!0,header:(0,r.jsxs)(r.Fragment,{children:["Stacking Options ",(0,r.jsx)(y.A,{name:"clone outline"})]}),value:T,placeholder:"Alphabetical, CMC, Colors, etc",options:[{label:"None",onClick:()=>D(null)},{type:"spacer"},...Object.keys(c.p2).map(e=>({label:e,id:`${c.p2[e]}`,onClick:()=>D(c.p2[e])}))]})]})]})}},50413:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var r=a(75038),o=a(76430),s=a(48706),n=a(82185),l=a(6016),c=a(41944),i=a(21159),d=a(51911),u=a(84919),g=a(68835),h=a(65293),m=a(75499),p=a.n(m),k=a(40120);let x=({onDescriptionChange:e,onDescriptionSaved:t,allowHeightExpansion:a=!1,editorClassName:m="",description:x=""})=>{let _=(0,n.GV)(e=>e.deck.id),b=(0,s.G)(),j=(0,n.GV)(e=>!e.deck.id),y=(0,n.GV)(e=>e.deck.hasPrimer),v=(0,n.GV)(e=>e.deck.deckTags),[f]=(0,n.zU)(l.XI),A=(e,t)=>
1e>=1&&t>200,[C,S]=(0,o.useState)(y),[w,T]=(0,o.useState)(!1),[D,N]=(0,o.useState)(0),[G,V]=(0,o.useState)(A(v.length,D)),[F,P]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{V(A(v.length,D))},[D,v]),(0,r.jsx)(r.Fragment,{children:b&&(0,r.jsxs)("div",{className:p().description,children:[j?"Not available in Sandbox mode.":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{editorClassname:`${w?"":p().limitHeight} ${m}`,value:x,placeholder:"What's the win con...",onChange:t=>{e&&e(t)},onTextChange:e=>{N(e.split(/\s+/).length)},autofocus:!0}),(0,r.jsxs)("div",{className:p().meta,children:[(0,r.jsxs)("button",{disabled:!a,onClick:()=>T(!w),className:a?void 0:p().hide,children:[(0,r.jsx)(k.A,{name:w?"arrow circle up":"arrow circle down"}),w?"Shrink":"Expand"," text area"]}),(0,r.jsxs)("div",{className:p().descriptionLength,children:["Word count: ",D]})]})]}),(0,r.jsx)("div",{children:(0,r.jsx)(h.A,{disabled:j,checked:C,onClick:()=>S(!C),header:"Deck has primer",className:p().largeFancyBox,description:"Mark this description as a primer, which explains how your deck works and why you've chosen these cards in detail. Doing so affects how other users view your deck.",detailedDescription:(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Allows deck to be found when searching for primers"}),(0,r.jsx)("li",{children:"All deck links show that this deck has a primer"}),(0,r.jsx)("li",{children:'Forces the deck page to load with "pinned description" enabled'})]})})}),(0,r.jsx)(g.A,{color:"green",className:p().save,onClick:()=>{let e={description:x,hasPrimer:C};return P(!0),c.A.update(_,e).then(()=>{f(e),d.A.send(e,"DECK_PATCH_SUCCEEDED"),i.A.create("Description updated","Deck Settings","success"),t&&t(x)}).catch(e=>i.A.create(e,"Deck Settings","error")).finally(()=>P(!1))},icon:"save outline",disabled:j||F||C&&!G,children:"Save changes"}),C&&!G&&(0,r.jsxs)("div",{className:`${p().primerReqs} ${p().red}`,children:[(0,r.jsx)("h5",{children:"Writing a primer? Try hitting these benchmarks"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[200," or more words"]}),(0,r.jsxs)("li",{children:[1," or more deck tags set"]})]})]})]})})}},51803:e=>{e.exports={list:"categoryTemplateDeckSettings_list__hC1U0",controls:"categoryTemplateDeckSettings_controls__JQnnf",checkBox:"categoryTemplateDeckSettings_checkBox__cbt5f",loadingColumn:"categoryTemplateDeckSettings_loadingColumn___42Nj",link:"categoryTemplateDeckSettings_link__lkpz7"}},53304:(e,t,a)=>{"use strict";a.d(t,{y:()=>r});let r=e=>new Promise(t=>setTimeout(t,e))},58383:e=>{e.exports={flex:"collaborators_flex__OP9wh",controls:"collaborators_controls__jy4AH",formControls:"collaborators_formControls__Xz4DZ",container:"collaborators_container__cHpCa",avatar:"collaborators_avatar__F8y0_",userRow:"collaborators_userRow__1eYln",followingRow:"collaborators_followingRow__kqwKR",userInfo:"collaborators_userInfo__Bg3Hc",rowControls:"collaborators_rowControls__9Dj6b",row:"collaborators_row__CUFAy",metaInfo:"collaborators_metaInfo__xYmFd",search:"collaborators_search__43WyJ",link:"collaborators_link__vp_XS",loadMore:"collaborators_loadMore__uUw8C",table:"collaborators_table__ktMyR"}},58916:e=>{e.exports={container:"copyDeck_container__ieovw"}},67007:e=>{e.exports={container:"rootSettings_container__wc3om",controls:"rootSettings_controls__hbOuv",flags:"rootSettings_flags__uj4mZ",bracketDropdown:"rootSettings_bracketDropdown__mpGha",description:"rootSettings_description__N_Y_g"}},67560:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(75038),o=a(85785),s=a(62982);let n=({value:e,placeholder:t,onChange:a,header:n})=>(0,r.jsx)(s.A,{placeholder:t||"Formats",header:n,options:Object.keys(o.yi).map(e=>({label:e,value:o.yi[e]})),onChange:a,value:e})},73143:e=>{e.exports={container:"featuredDeckImage_container__DGery"}},75499:e=>{e.exports={formContainer:"description_formContainer__SvCmg",description:"description_description__l_LhK",descriptionLength:"description_descriptionLength__PTRpa",readOnly:"description_readOnly__AGEH9",limitHeight:"description_limitHeight__9dqJz",meta:"description_meta___sUXq",hide:"description_hide__WcaI2",largeFancyBox:"description_largeFancyBox__d5Ibm",primerReqs:"description_primerReqs__0ZR0u",red:"description_red__vvgYu",green:"description_green__QGb8B",save:"description_save__UHvty"}},80283:e=>{e.exports={container:"share_container__s3IWN",row:"share_row__LJkFH",copyFiled:"share_copyFiled__AFxTb"}},81170:(e,t,a)=>{"use strict";a.d(t,{I:()=>eO,A:()=>eq});var r=a(75038),o=a(76430),s=a(48706),n=a(82185),l=a(98279),c=a(6016),i=a(4444),d=a(97930),u=a(98381),g=a(85785),h=a(78516),m=a(41944),p=a(21159),k=a(51911),x=a(68835),_=a(90922),b=a(30898);let j=()=>(0,r.jsxs)(b.A,{children:[(0,r.jsxs)("p",{children:["This represents the intended ",(0,r.jsx)("b",{children:"game"})," type of a deck (Paper, MTGO or Arena)."]}),(0,r.jsx)("p",{children:"Currently this only effects the collection flags for the owner of the deck. If you own the deck and set the game type, on the cards in the deck and in search, you will only see collection flags from the collection of the set game type. (ie: If you set the game type to Paper, you will only see collection flags from your paper collection)."}),(0,r.jsx)("p",{children:(0,r.jsx)("b",{children:"This change requires a page refresh to take effect on the collection flags."})})]});
1var y=a(67560),v=a(65293),f=a(40120),A=a(11060),C=a(14918),S=a(56771),w=a(7648),T=a(36601),D=a(73143),N=a.n(D),G=a(6126),V=a(57146);let F=({})=>{let e=(0,n.GV)(e=>e.deck.id);(0,n.GV)(e=>e.deck.featured);let t=(0,n.GV)(e=>e.deck.customFeatured),[a]=(0,n.zU)(c.XI),[s,l]=(0,o.useState)(!1);return(0,r.jsxs)("div",{className:N().container,children:[(0,r.jsx)("label",{children:"Featured image"}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{onClick:()=>{let t={customFeatured:""};l(!0),m.A.update(e,t).then(e=>a(t)).catch(T.A.createToast).finally(()=>l(!1))},children:s?"Changing deck image...":"Autoselect deck image"}),(0,r.jsx)("p",{children:"You currently have a custom featured image set for this deck. If you'd like to revert to the automatic selection, hit the button above."})]}),!t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(G.Ay,{fetchCard:!0,onSelect:t=>{let r={customFeatured:(0,V.Vq)(t.setCode,t.uid,!1)};l(!0),m.A.update(e,r).then(e=>a(r)).catch(T.A.createToast).finally(()=>{setTimeout(()=>l(!1),1e3)})},placeholder:"Atraxa, Praetors' Voice"}),(0,r.jsx)("p",{children:"We are currently selecting a featured card image from your deck automatically. If you'd like to set it yourself, open a card menu and hit the 'Set Deck Image' button or search for a card above."})]})]})};var P=a(67007),U=a.n(P);let $=({onDeckUpdated:e})=>{let t=(0,u.useRouter)(),a=(0,n.GV)(e=>e.deck.format),l=(0,n.GV)(e=>e.deck.game),i=(0,n.GV)(e=>e.deck.edhBracket),d=(0,n.GV)(e=>e.deck.id),b=(0,n.GV)(e=>e.deck.name),T=(0,n.GV)(e=>e.deck.cardPackage),D=(0,n.GV)(e=>e.deck.private),N=(0,n.GV)(e=>e.deck.unlisted),G=(0,n.GV)(e=>e.deck.theorycrafted),V=(0,n.GV)(e=>!e.deck.id),P=(0,s.G)(),$=(0,n.GV)(h.mi),[E]=(0,n.zU)(c.XI),[L,R]=(0,o.useState)(!1),[I,B]=(0,o.useState)(l),[H,M]=(0,o.useState)(b),[q,O]=(0,o.useState)(a),[z,Y]=(0,o.useState)(i),[Q,W]=(0,o.useState)(D),[Z,X]=(0,o.useState)(N),[J,K]=(0,o.useState)(G),[ee,et]=(0,o.useState)(`${T?.keywords||""}`),[ea,er]=(0,o.useState)(!1),[eo,es]=(0,o.useState)(T?.intendedFormats||[]),[en,el]=(0,o.useState)(T?.budget||null),ec=T?"Card Package":"Deck",ei=async t=>{t.preventDefault();let a={name:H,deckFormat:q,edhBracket:q===g.uB.EDH?z:null,private:Q,unlisted:Z,theorycrafted:J,game:I||null};return er(!0),m.A.update(d,a).then(t=>(e&&e(t),T&&T.id)?m.A.updatePackage(T.id,{...T,keywords:ee,intendedFormats:eo,budget:en}):Promise.resolve()).then(()=>{E(a),k.A.send(a,"DECK_PATCH_SUCCEEDED"),p.A.create("Deck updated","Deck Settings","success")}).catch(e=>p.A.create(e,"Deck Settings","error")).finally(()=>er(!1))},ed=async()=>m.A.deleteDeck(d).then(()=>t.push("/")).catch(e=>p.A.create(e,"Deck Settings"));return(0,r.jsxs)(r.Fragment,{children:[P&&(0,r.jsxs)("form",{className:U().container,onSubmit:ei,children:[(0,r.jsx)(S.A,{header:`${ec} Name`,value:H,disabled:V,onChange:M}),!T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.A,{header:"Format",inlineHeader:!0,value:q,disabled:V,options:Object.keys(g.yi).map(e=>({label:e,id:`${g.yi[e]}`,onClick:()=>O(g.yi[e])}))}),q===g.uB.EDH&&(0,r.jsx)(A.A,{className:U().bracketDropdown,includeDisclaimer:!0,header:(0,r.jsxs)(r.Fragment,{children:["Commander Bracket (Estimated Bracket: ",g.P_[$],") ",(0,r.jsx)(C.Ay,{})]}),value:z,onChange:e=>Y(e),overrideUnsetLabel:"Unset"}),(0,r.jsx)(w.A,{inlineHeader:!0,header:(0,r.jsxs)(r.Fragment,{children:["Game Type ",(0,r.jsx)(j,{})]}),value:I||0,disabled:V,options:[{label:"Any",id:"0",onClick:()=>B(null)},...Object.keys(g.$p).map(e=>({label:e,id:`${g.$p[e]}`,onClick:()=>B(g.$p[e])}))]})]}),!!T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{inlineHeader:!0,header:"Keywords",value:ee,onChange:et}),(0,r.jsx)(y.A,{header:"Intended Formats",value:eo,placeholder:"Not all packages have intended formats",onChange:es}),(0,r.jsx)(w.A,{inlineHeader:!0,header:"Estimated budget",placeholder:"Estimated package budget",options:[{id:"1",onClick:()=>el(1),label:"$"},{id:"2",onClick:()=>el(2),label:"$$"},{id:"3",onClick:()=>el(3),label:"$$$"},{id:"4",onClick:()=>el(4),label:"$$$$"}],value:en??void 0})]}),(0,r.jsx)(F,{}),(0,r.jsxs)("div",{className:U().flags,children:[(0,r.jsx)(v.A,{disabled:V,checked:Q,onClick:()=>W(!Q),header:"Private",description:`The ${ec} is only visible to you`}),(0,r.jsx)(v.A,{disabled:V,checked:Z,onClick:()=>
1X(!Z),header:"Unlisted",description:`The ${ec} is viewable with a direct link, but not shown in lists like search, folders, or your user page (for other users)`}),!T&&(0,r.jsx)(v.A,{disabled:V,checked:J,onClick:()=>K(!J),header:"Theorycrafted",description:'The deck is not included by default in "In decks" view'})]}),(0,r.jsxs)("div",{className:U().controls,children:[(0,r.jsxs)(x.A,{disabled:V||ea,type:"button",color:"red",onClick:()=>R(!0),children:[(0,r.jsx)(f.A,{name:"trash alternate outline"}),"Delete ",ec]}),(0,r.jsxs)(x.A,{disabled:V||ea,type:"submit",color:"green",children:[(0,r.jsx)(f.A,{name:"save outline"}),"Save Changes"]})]})]}),(0,r.jsx)(_.A,{delayEnabledTime:3e3,header:`Delete ${ec}`,message:`Are you sure you want to delete this ${ec}?`,buttonText:`Delete "${H}"`,loadingMessage:`Deleting "${H}"...`,open:L,onClose:()=>R(!1),onDelete:ed})]})};var E=a(31869),L=a(2477),R=a(47303),I=a(92910),B=a(75249),H=a(51202),M=a(10228),q=a.n(M);let O=()=>{let e=(0,n.GV)(e=>e.active.globalColorTags),t=(0,n.GV)(e=>e.deck.colorLabels),[a,s]=(0,n.zU)(l.iY,c.RP),[i,d]=(0,o.useState)(!0);(0,o.useEffect)(()=>{R.A.list().then(e=>a({globalColorTags:e})).catch(()=>p.A.create("Unable to load global color tags","Deck page","error")).finally(()=>d(!1))},[]);let u=(e||[]).filter(e=>!t.some(t=>t.name===e.name&&t.color===e.color));return(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"Color tag templates"}),(0,r.jsxs)("p",{children:["You can manage your Color Tag Templates in your"," ",(0,r.jsx)(I.A,{className:q().link,href:"/accountSettings/color-tag-templates",children:"Account Settings"}),". To add these color tags to cards, use the color tag dropdown in the card options, or the corner quantity of a card."]}),i&&(0,r.jsx)(B.A,{}),null!==e&&0===u.length&&(0,r.jsx)("div",{className:q().none,children:"You have no unused color tag templates"}),null!==e&&(0,r.jsx)(H.A,{tags:u,onAddToDeck:e=>s({colorLabels:[...t,{name:e.name,color:e.color}]})})]})};var z=a(37217),Y=a(32177),Q=a.n(Y);let W=()=>{let[e,t]=(0,o.useState)(!1),[a]=(0,n.dN)(E.D),s=(0,n.GV)(e=>e.deck.colorLabels),l=(0,n.GV)(e=>e.deck.cardMap);return(0,r.jsxs)("div",{className:Q().container,children:[(0,r.jsx)("h4",{children:"Deck color tags"}),(0,r.jsx)(H.A,{usedOnDeckPage:!0,noEditOnDefaults:!0,tags:s,onSetAll:({name:e})=>{let t=s.find(t=>t.name===e)||g.o5.colorLabel;L.A.save(Object.values(l).map(e=>({...e,colorLabel:t})))},onEdited:({name:e,color:t})=>{let r={name:e,color:t},o=Object.values(l).filter(t=>t.colorLabel.name===e),n=s.map(t=>t.name===e?r:t),c=o.map(e=>({...e,colorLabel:r}));L.A.save(c).then(()=>{a({colorLabels:n})})},onRemovedFromDeck:({name:e})=>{let t=Object.values(l).filter(t=>t.colorLabel.name===e).map(e=>({...e,colorLabel:g.o5.colorLabel}));L.A.save(t).then(()=>{a({colorLabels:s.filter(t=>t.name!==e)})})}}),(0,r.jsx)("div",{className:Q().controls,children:(0,r.jsxs)(x.A,{color:"green",onClick:()=>t(!0),children:[(0,r.jsx)(f.A,{name:"add"})," New color tag"]})}),(0,r.jsx)(z.A,{open:e,onClose:()=>t(!1),onEdit:e=>a({colorLabels:[...s,{name:e.name,color:e.color}]})}),(0,r.jsx)(O,{})]})};var Z=a(25730),X=a(34131),J=a(44619),K=a(15918),ee=a(51803),et=a.n(ee);let ea=()=>{let[e,t]=(0,o.useState)(!0),[a,s]=(0,o.useState)([]),[l,i]=(0,o.useState)(null),[{tbId:d}]=(0,K.A)(["tbId"]),u=(0,n.GV)(e=>e.deck.categories),[g]=(0,n.zU)(c.RP);(0,o.useEffect)(()=>{Z.A.listTemplates(d).then(s).catch(i).finally(()=>t(!1))},[]);let h=null,m=a.reduce((e,t)=>(u[t.name]||e.push(t),e),[]);return m.length||(h=(0,r.jsx)("div",{children:"All Category Templates are already being used in this deck"})),m.length&&(h=(0,r.jsx)(X.A,{categories:m,onTemplateAdd:e=>Z.A.create(e).then(e=>{let t={...u};t[e.name]=e,g({categories:t})}).catch(e=>p.A.create(e))})),a.length||(h=(0,r.jsx)("div",{children:"You have no Category Templates"})),e&&(h=(0,r.jsx)(B.A,{})),l&&(h=(0,r.jsx)("div",{children:"Unable to load category templates"})),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{children:"Category Templates"}),(0,r.jsxs)("p",{children:["You can manage your Category Templates in your"," ",(0,r.jsx)(I.A,{className:et().link,href:"/accountSettings/category-templates",children:"Account Settings"})]}),h]})};var er=a(26705),eo=a.n(er);let es=()=>{let[e,t]=(0,o.useState)(!1),[a,s]=(0,o.useState)(null),[l,i]=(0,o.useState)(null),[d,u]=(0,o.useState)(!1),m=(0,n.GV)(e=>e.deck.categories),b=(0,n.GV)(h.dc),j=(0,n.GV)(h.qs),y=b.filter(e=>!j[e.name]),[v]=(0,n.zU)(c.RP);return(0,r.jsxs)("div",{className:eo().container,children:[(0,r.jsx)("b",{children:"* A category must have no cards in it to be deleted"}),(0,r.jsx)(X.A,{categories:b,onDelete:s,onEdit:i}),(0,r.jsxs)("div",{className:eo().controls,children:[(0,r.jsx)(x.A,{icon:"trash alternate outline",color:"red",onClick:()=>u(!0),disabled:!y.length,children:"Delete unused categories"}),(0,r.jsx)(x.A,{icon:"circle-plus",onClick:()=>t(!0),color:"green",children:"Create Category"})]}),(0,r.jsx)(ea,{}),(0,r.jsx)(_.A,{header:"Delete category",message:`Are you sure you want to delete the category "${a?.name}"?`,buttonText:`Delete "${a?.name}"`,open:!!a,onDelete:()=>{let e;return e=a||(0,g.F3)(),Z.A.remove(e.id).then(()=>{let t={...m};delete t[e.name],v({categories:t}),k.A.send({categories:t},"SET_DECK_STATE")}).catch(()=>p.A.create("Failed to delete category","Deck settings","error"))},onClose:()=>s(null)}),(0,r.jsx)(_.A,{header:"Delete empty categories",open:d,onClose:()=>u(!1),message:(0,r.jsx)(en,{unusedCategories:y}),buttonText:"Delete unused categories",loadingMessage:"Deleting categories...",onDelete:()=>Promise.all(y.map(e=>Z.A.remove(e.id))).then(()=>{let e={...m};
1y.forEach(t=>{delete e[t.name]}),v({categories:e})}).catch(()=>p.A.create("Failed to delete one or more categories. Data could be in a weird state since we are not sure which categories were removed. We recommend refreshing the page.","Deck settings","error"))}),(0,r.jsx)(J.A,{category:l||(0,g.F3)(),open:!!l,onClose:()=>i(null),onSave:()=>i(null)}),(0,r.jsx)(J.A,{open:e,onClose:()=>t(!1),onSave:()=>t(!1)})]})},en=({unusedCategories:e})=>(0,r.jsxs)("div",{children:[`Are you sure you want to delete all (${e.length}) categories that are not being used by any card? This action cannot be undone.`,(0,r.jsxs)("div",{className:eo().categoryDeleteList,children:[(0,r.jsx)("p",{children:"Categories to be deleted"}),(0,r.jsx)("ul",{children:e.map(e=>(0,r.jsx)("li",{children:e.name},e.name))})]})]});var el=a(3957);let ec=function(e,t){return T.A.post(`/api/decks/${e}/editors/`,{user:t})};var ei=a(57809),ed=a(49435),eu=a(69133),eg=a(72770),eh=a(58383),em=a.n(eh);let ep=()=>{let[e,t]=(0,o.useState)(!0),[a,s]=(0,o.useState)(null),[l,c]=(0,o.useState)([]),[i,d]=(0,o.useState)([]),[u,g]=(0,o.useState)("null"),[h,m]=(0,o.useState)(!1),[k,_]=(0,o.useState)(null),[{tbId:b}]=(0,K.A)(["tbId"]),j=(0,n.GV)(e=>e.deck.id);(0,o.useEffect)(()=>{var e;(e=j,T.A.get(`/api/decks/${e}/editors/`)).then(e=>c(e.results)).catch(s),el.A.following(b).then(e=>{e.results&&(d([...e.results]),g(e.next))}).catch(e=>console.error(e)).finally(()=>t(!1))},[]);let y=e=>(e?.preventDefault(),k)?(t(!0),ec(j,k?.id).then(e=>{_(null),m(!1),c([...l,e])}).catch(s).finally(()=>t(!1))):p.A.create("Missing selected user","Deck Settings","error"),v=e=>c(l.filter(t=>t.id!==e)),f=e=>c([...l,e]);if(a)return(0,r.jsx)("div",{children:a});let A=i.filter(e=>!l.some(t=>e.id===t.user.id));return(0,r.jsxs)("div",{className:em().container,children:[(0,r.jsx)("p",{children:"This feature allows users to share their decks with others and update them in real time together. Setting someone as a collaborator grants them privileges to make any changes to the deck that an owner could outside of anything found in the Main Settings (above)."}),(0,r.jsxs)("p",{children:["Have any feedback?"," ",(0,r.jsx)("a",{className:em().link,href:"https://archidekt.com/forum/thread/3552530",rel:"noopener noreferrer",target:"_blank",children:"Leave those comments here"}),"."]}),!h&&(0,r.jsx)("div",{className:em().controls,children:(0,r.jsx)(x.A,{color:"blue",onClick:()=>m(!0),children:"Add new Collaborator"})}),e&&(0,r.jsx)(B.A,{}),h&&(0,r.jsxs)("form",{onSubmit:y,children:[(0,r.jsx)(ei.A,{triggerClassName:em().search,value:k,onSelected:_}),(0,r.jsxs)("div",{className:em().formControls,children:[(0,r.jsx)(x.A,{type:"button",color:"red",onClick:()=>m(!1),children:"Cancel"}),(0,r.jsx)(x.A,{type:"button",color:"green",onClick:()=>y(),children:"Add Collaborator"})]})]}),(0,r.jsxs)("div",{className:em().table,children:[l.map((e,t)=>(0,r.jsx)(ek,{collaborator:e,removeCollaborator:v},t)),!e&&!l.length&&(0,r.jsx)("i",{children:"No collaborators set for this deck"})]}),!!i.length&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:"Users you follow"}),(0,r.jsx)("div",{className:em().table,children:A.map((e,t)=>(0,r.jsx)(ex,{user:e,deckId:j,addCollaborator:f},t))}),u&&(0,r.jsx)("div",{className:em().loadMore,children:(0,r.jsx)("button",{onClick:()=>{u&&el.A.following(b,u||void 0).then(e=>{e.results&&(d([...i,...e.results]),g(e.next))}).catch(e=>console.error(e))},children:"Load more"})})]})]})},ek=({collaborator:e,removeCollaborator:t})=>{let[a,s]=(0,o.useState)(!1);return(0,r.jsxs)("div",{className:em().userRow,children:[(0,r.jsxs)("div",{className:em().userInfo,children:[(0,r.jsx)(ed.A,{className:em().avatar,src:e.user.avatar,alt:`${e.user.username} avatar`}),(0,r.jsx)("b",{children:e.user.username})]}),(0,r.jsxs)("div",{className:em().rowControls,children:[(0,r.jsxs)("div",{className:em().metaInfo,children:["Added by ",e.createdBy.username," ",(0,eg._)(e.createdAt)," ago"]}),(0,r.jsx)(x.A,{onClick:()=>{var a,r;return a=e.id,s(!0),(r=a,T.A.delete(`/api/decks/editors/${r}/`,void 0,!0)).then(()=>t(a)).catch(()=>p.A.create("Unable to remove collaborator","Deck Settings","error")).finally(()=>{s(!1)})},disabled:a,color:"red",children:a?(0,r.jsx)(eu.A,{size:"xSmall"}):(0,r.jsx)(f.A,{name:"close"})})]})]})},ex=({user:e,deckId:t,addCollaborator:a})=>{let[s,n]=(0,o.useState)(!1);return(0,r.jsxs)("div",{className:em().followingRow,children:[(0,r.jsxs)("div",{className:em().userInfo,children:[(0,r.jsx)(ed.A,{className:em().avatar,src:e.avatar,alt:`${e.username} avatar`}),(0,r.jsx)("b",{children:e.username})]}),(0,r.jsx)("div",{className:em().rowControls,children:(0,r.jsxs)(x.A,{onClick:()=>(n(!0),ec(t,e.id).then(e=>{a(e)}).catch().finally(()=>{n(!1)})),disabled:s,color:"green",children:[s?(0,r.jsx)(eu.A,{size:"xSmall"}):(0,r.jsx)(f.A,{name:"check"})," Add collaborator"]})})]})};var e_=a(46354),eb=a(93275),ej=a(51960);let ey={Spellslinger:25,"Custom cards":1},ev={"-1/-1 counter":"-1/-1 Counters","\\+1/\\+1 counter":"+1/+1 Counters","activated abilities":"Activated Abilities",attacks:"Attack Triggers","as a copy of":"Clones",dungeon:"Dungeon",initiative:"Dungeon","{E}":"Energy","additional combat":"Extra Combats","extra turn":"Extra Turns",poison:"Infect",monarch:"Monarch",token:"Tokens",graveyard:"Graveyard","deals .* damage":"Burn","gain .* life":"Lifegain"};var ef=a(28657),eA=a.n(ef);
1let eC=({alreadySelectedTags:e,onTagAdded:t})=>{let[a,s]=(0,o.useState)({}),l=(()=>{let[e,t]=(0,o.useState)([]),[a,r]=(0,o.useState)([]);if(!(0,h.b8)())return[];let s=(0,n.GV)(h.kn),l=(0,n.GV)(h.Sm),c=[...l,...s];return(0,o.useEffect)(()=>{eb.A.list().then(e=>t(e))},[]),(0,o.useEffect)(()=>{let t={},a=[],o=(e,a)=>t[e]=t[e]?t[e]+a:t[e]=a;for(let e of c){e.customCard&&o("Custom cards",e.qty);let t=e.back?[...e.back.superTypes||[],...e.back.types||[],...e.back.subTypes||[],...e.back.keywords||[]]:[];for(let a of[...e.superTypes,...e.types,...e.subTypes,...e.keywords,...t])if(!["Island","Mountain","Forest","Swamp","Plains"].includes(a)){if(["Instant","Sorcery"].includes(a)){o("Spellslinger",e.qty);continue}o(a,e.qty)}}for(let e of c){let a=e.front?e.front.text+e.back?.text:e.text;for(let t of Object.keys(ev)){let r=new RegExp(t);a.match(r)&&o(ev[t],e.qty)}for(let r of Object.keys(t))!e.keywords.includes(r)&&a.includes(r)&&o(r,e.qty)}for(let r of Object.keys(t).filter(e=>{let a=ey[e]||18;return t[e]>=a}))for(let t of e)(t.aliases.split(" ").includes(r.toLowerCase())||t.name.toLowerCase()===r.toLowerCase())&&a.push([r,t]);a.sort(([e,t],[a,r])=>t.name>r.name?1:-1),r(a)},[e,l,s]),a})(),c=l.filter(([t,a])=>!e[a.name]);return 0===l.length?null:(0,r.jsxs)("div",{className:eA().recommendedTags,children:[(0,r.jsx)("p",{className:eA().blurb,children:"Based on the cards in your deck, we think these tags might fit. These recommendations aren't the only tags that might be relevant to your deck. Click any you wish to apply, or type below to search for tags you feel are more accurate."}),c.map(([e,o],n)=>(0,r.jsxs)("div",{className:eA().tags,children:[(0,r.jsxs)(b.A,{children:["Deck contains at least 18 cards containing the word"," ","Spellslinger"===e?"instant or sorcery":e.toLowerCase()," in the type line or text box."]}),(0,r.jsxs)("button",{onClick:()=>{var e,r;return e=o.id||0,r=o.name,void(s({...a,[r]:!0}),t(e,r).finally(()=>{s({...a,[r]:!1})}))},disabled:a[o.name],children:[(0,r.jsx)(f.A,{name:"plus"}),o.name]})]},`${o.name}${n}`))]})};var eS=a(1979),ew=a.n(eS);let eT=({})=>{let[e,t]=(0,o.useState)({count:0,next:null,previous:null,results:[]}),[a,s]=(0,o.useState)(!0),[l,i]=(0,o.useState)({}),d=(0,n.GV)(e=>e.deck.id),[u]=(0,n.zU)(c.RP),g=t=>{let a=eD(null,e.results.length,e.results);return s(!0),eb.A.createDeckRelation(d,t,a).then(()=>h()).catch(()=>p.A.create("Unable to add deck tag")).finally(()=>s(!1))},h=()=>eb.A.getTags(d).then(e=>(t(e),u({deckTags:e.results}),e)).catch(()=>p.A.create("Unable to fetch deck tags")).finally(()=>s(!1));(0,o.useEffect)(()=>{h()},[]);let m=e.results.reduce((e,t)=>({...e,[t.name||""]:!0}),{});return(0,r.jsxs)("div",{className:ew().container,children:[(0,r.jsxs)("p",{className:ew().blurb,children:["Deck tags are created and managed by the Archidekt team so they can be made to be searchable. If you can't find a tag that you feel should be present, feel free to reach out either on"," ",(0,r.jsx)("a",{href:"https://discord.gg/GyAAANU8uJ",target:"_blank",rel:"noopener noreferrer",children:"discord"})," ","or our"," ",(0,r.jsx)(I.A,{href:"/forum/General/Development",target:"_blank",rel:"noopener noreferrer",children:"forums"}),". You can browse the full list of available decks tags on the"," ",(0,r.jsx)(I.A,{href:"/tags",target:"_blank",rel:"noopener noreferrer",children:"tags"})," ","page."]}),(0,r.jsx)(eC,{alreadySelectedTags:m,onTagAdded:g}),(0,r.jsx)(ej.A,{clearValueOnSelection:!0,className:ew().selector,disabled:e.count>9,onSelect:g,disabledOptions:m}),!a&&!e.results.length&&(0,r.jsx)("div",{children:"No tags"}),!!e.results.length&&(0,r.jsx)(e_.JY,{onDragEnd:a=>{if(!a.destination)return;let r=((e,t,a)=>{let r=Array.from(e),[o]=r.splice(t,1);return r.splice(a,0,o),r})(e.results,a.source.index,a.destination.index);t({...e,results:r});let o=eD(a.source.index,a.destination.index,e.results),s=e.results[a.source.index];eb.A.updateDeckRelation({...s,position:o}).then(h)},children:(0,r.jsx)(e_.gL,{droppableId:"deck-tags",children:t=>(0,r.jsx)("div",{...t.droppableProps,ref:t.innerRef,className:ew().dropContainer,children:e.results.map((e,t)=>(0,r.jsx)(e_.sx,{draggableId:`${e.id}`,index:t,children:(t,a)=>(0,r.jsxs)("div",{ref:t.innerRef,className:ew().row,...t.dragHandleProps,...t.draggableProps,children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("div",{className:ew().dragHandle,children:(0,r.jsx)(f.A,{name:"bars"})}),(0,r.jsx)("label",{children:e.name})]}),!a.isDragging&&(0,r.jsx)(r.Fragment,{children:l[`${e.id}`||"0"]?(0,r.jsx)(eu.A,{size:"tiny"}):(0,r.jsx)("button",{className:ew().removeButton,onClick:()=>(e=>{if(e)return i({...l,[e]:!0}),eb.A.removeDeckRelation(e).then(()=>h()).catch(()=>p.A.create("Unable to delete tag")).finally(()=>i({...l,[e]:!1}))})(e.id),children:(0,r.jsx)(f.A,{name:"trash alternate outline"})})})]},e.id)},e.id))})})}),a&&(0,r.jsx)(B.A,{})]})},eD=(e,t,a)=>null!==e||a.length?null===e&&a.length||t===a.length-1?eG(eF(a[a.length-1].position)):0===t?eG(eF(a[0].position),!0):eN(a[t-1].position,a[t].position):"M-500000",eN=(e,t)=>{let a=eF(e),r=eF(t),o=r.number>a.number?r.number-a.number:1e4-a.number;return eV({letter:a.letter,number:Math.floor(a.number+o/2)})},eG=(e,t=!1)=>{let{letter:a,number:r}=e;return r+1e4<1e6&&!t?eV({...e,number:r+1e4}):r-1e4>0&&t?eV({...e,number:r-1e4}):r+1e4>999999&&!t&&"Z"!==a?eV({letter:eP(a),number:0}):r-1e4<1&&t&&"A"!==a?eV({letter:eP(a,!0),number:9e5}):r+1e4>999999&&!t&&"Z"===a?eV({letter:eP(a),number:0}):r-1e4<1&&t&&"A"===a?eV({letter:eP(a,!0),number:9e3}):t?"A-000000":"Z-999999"},eV=e=>`${e.letter}-${e.number}`,eF=e=>
1{let[t,a]=e.split("-");return{letter:t[0]??"M",number:Number(a)??5e5}},eP=(e,t)=>{let a=e.toLocaleUpperCase();return"0"===a&&t?"0":"9"!==a||t?"A"===a&&t?"9":"Z"!==a||t?String.fromCharCode(a.charCodeAt(0)+(t?-1:1)):"Z":"A"},eU="https://playgroup.gg/api/public/v1/",e$=async e=>{let t=e.split("/decks/")[1]?.split("-")[0];return t?T.A.get(`${eU}/decks/${t}.json`,void 0,!0):Promise.reject("Unexpected Playgroup.gg deck URL")};var eE=a(22663),eL=a.n(eE);let eR=()=>{let e=(0,n.GV)(e=>e.deck.id),t=(0,n.GV)(e=>e.deck.playgroupDeckUrl),[a]=(0,n.zU)(c.RP),[s,l]=(0,o.useState)(t||""),[i,d]=(0,o.useState)(!1),u=async()=>{if(d(!0),!s)return m.A.update(e,{playgroupDeckUrl:""}).then(()=>p.A.create("Playgroup.gg URL removed","Deck service","success")).catch(()=>p.A.create("Failed to update Playgroup.gg deck URL","Deck service","error")).finally(()=>d(!1));try{await e$(s)}catch{return d(!1),p.A.create("Invalid Playgroup.gg deck URL or the deck is private on Playgroup.gg","Deck service","error")}return m.A.update(e,{playgroupDeckUrl:s}).then(()=>{p.A.create("Playgroup.gg deck URL updated","Deck service","success"),a({playgroupDeckUrl:s})}).catch(()=>p.A.create("Failed to update Playgroup.gg deck URL","Deck service","error")).finally(()=>d(!1))},g=(0,r.jsx)(I.A,{href:"https://playgroup.gg",target:"_blank",className:eL().link,children:"Playgroup.gg"});return(0,r.jsxs)("div",{className:eL().container,children:[(0,r.jsx)("div",{className:eL().controls,children:(0,r.jsxs)("div",{className:eL().logo,children:[(0,r.jsxs)("div",{className:eL().logoName,children:[(0,r.jsx)("span",{children:"Playgroup.gg"}),(0,r.jsx)("span",{children:"EDH Tracker"})]}),(0,r.jsx)(ed.A,{src:"/images/playgroup_gg.svg",title:"Playgroup.gg",alt:"playgroup dot gg"})]})}),(0,r.jsxs)("p",{children:[g," is third party EDH deck stat tracking software. Use it to keep track of your EDH game wins, losses, and more. Check out all of the features on ",g,". Linking your deck will allow you to see the power level for this deck in the deck info at the top of the deck page as well as offer a convenient link to your deck on your Playgroup.gg account."]}),(0,r.jsxs)("p",{children:["The deck on Playgroup.gg must be public for this to work. If you don't have a Playgroup.gg account, you can create one"," ",(0,r.jsx)(I.A,{className:eL().link,href:"https://playgroup.gg/users/sign_up",target:"_blank",children:"here"}),"."]}),(0,r.jsx)(S.A,{header:"Playgroup.gg deck URL",placeholder:"https://playgroup.gg/decks/75110-squirrels-and-tokens",containerClassName:eL().input,value:s,onChange:l,disabled:i}),(0,r.jsx)("div",{className:eL().controls,onClick:u,children:(0,r.jsx)(x.A,{color:"green",disabled:!1,icon:"save outline",children:"Save Playgroup.gg deck URL"})})]})};var eI=a(50413),eB=a(34087),eH=a.n(eB);let eM=["deckSettings","collaborators","colorTags","categories","playgroupForm","deckTags","featuredDeckImage","description"],eq=()=>{let e=(0,n.GV)(e=>e.active.modals),t=(0,n.GV)(e=>e.deck.description),[a,s]=(0,o.useState)(t),[d,u]=(0,o.useState)(!1),[g,h]=(0,o.useState)(!1),[m,p]=(0,n.zU)(l.iY,c.RP),k=()=>{m({modals:eM.reduce((e,t)=>({...e,[t]:!1}),{})}),h(!1),s(t)};return(0,o.useEffect)(()=>{let a=eM.some(t=>e[t]);s(t),u(a)},[e]),(0,r.jsx)(i.A,{open:d,onClose:()=>{if(a!==t)return h(!0);k()},className:eH().container,id:"deck-settings",children:(0,r.jsx)(eO,{description:a,onDeckSaved:e=>{p({game:e.game,edhBracket:e.edhBracket})},onDeleteDeck:k,onDescriptionEdited:s,unsavedWarning:g,setUnsavedWarning:h})})},eO=({onDeleteDeck:e,description:t,unsavedWarning:a,onDescriptionEdited:l,setUnsavedWarning:c,onDeckSaved:i})=>{let u=(0,n.GV)(e=>e.active.modals),g=(0,s.G)(),h=(0,n.GV)(e=>e.deck.id),[m,p]=(0,o.useState)("deckSettings");return(0,o.useEffect)(()=>{let e=eM.find(e=>u[e]);e&&p(e)},[u]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:eH().tabs,optionsClassName:eH().tabButton,options:[{label:"Main Settings",onClick:()=>p("deckSettings"),selected:"deckSettings"===m,disabled:!g,className:"deckSettings"===m?eH().activeTab:""},{icon:void 0,label:"Description",onClick:()=>p("description"),selected:"description"===m,className:"description"===m?eH().activeTab:"",disabled:!h},{icon:void 0,label:"Collaborators",onClick:()=>p("collaborators"),selected:"collaborators"===m,className:"collaborators"===m?eH().activeTab:"",disabled:!h},{icon:void 0,label:"Color tags",onClick:()=>p("colorTags"),selected:"colorTags"===m,className:"colorTags"===m?eH().activeTab:""},{icon:void 0,label:"Categories",onClick:()=>p("categories"),selected:"categories"===m,className:"categories"===m?eH().activeTab:""},{icon:void 0,label:"Deck tags",onClick:()=>p("deckTags"),selected:"deckTags"===m,className:"deckTags"===m?eH().activeTab:"",disabled:!h},{icon:void 0,label:(0,r.jsx)("span",{className:eH().playgroupHeader,children:"Power level"}),onClick:()=>p("playgroupForm"),selected:"playgroupForm"===m,className:"playgroupForm"===m?eH().activeTab:""}]}),"deckSettings"===m&&g&&(0,r.jsx)($,{onDeckUpdated:i},h),"collaborators"===m&&(0,r.jsx)(ep,{}),"deckTags"===m&&(0,r.jsx)(eT,{}),"colorTags"===m&&(0,r.jsx)(W,{}),"categories"===m&&(0,r.jsx)(es,{}),"playgroupForm"===m&&(0,r.jsx)(eR,{}),"description"===m&&(0,r.jsx)(eI.A,{description:t,onDescriptionChange:e=>{l&&l(e)},allowHeightExpansion:!0}),(0,r.jsx)(_.A,{open:!!a,onClose:()=>c&&c(!1),buttonText:"Close without saving",header:"Unsaved description changes",onConfirm:e,message:"You have unsaved changes to the description. Are you sure you want to close without saving?"})]})}}}]);
2//# sourceMappingURL=2943-2c0e14668b7d60d1.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.