1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8928],{78928:function(e,i,s){s.d(i,{l:function(){return T}});var l=s(73292),n=s(76341),a=s(67462),t=s(85893),d=s(53816),c=s(53252),r=s(57922),o=s(87918),m=s(72882),h=s(7906),u=s(53184),x=s(295),p=s(69368),j=s(59455),f=s(69596),v=s(85754),I=s(34403),b=s(48528),Z=s(65908),N=s(67037),y=s(98732),g=s(41256),S=s(17928),_=s(67294),k=function(e){var i=e.collectionName,s=e.schemaName,l=e.schemaTemplates,n=e.setSchemaTemplates,a=e.templateFilter,d=e.children,c=(0,y._)((0,_.useState)(!1),2),o=c[0],m=c[1];return(0,t.jsxs)("div",{className:"mb-5 border border-zinc-400 dark:!border-paperl bg-zinc-300 dark:!bg-paper rounded-md shadow-xl p-5",children:[(0,t.jsxs)("div",{className:"flex cursor-pointer hover:text-primary",onClick:function(){(0,v.jb)(i,s,l,n,a),m(!o)},children:[(0,t.jsx)("div",{className:"my-auto",children:o?(0,t.jsx)(g.Z,{color:"primary"}):(0,t.jsx)(S.Z,{color:"primary"})}),(0,t.jsx)("div",{className:"my-auto ml-5 font-bold text-xl",children:s})]}),(0,t.jsx)(r.Z,{in:o,children:(0,t.jsx)("div",{className:"mt-5",children:d})})]})},C=function(e){var i,s=e.collectionName,m=e.checkedTemplateIds,h=e.template,u=e.checkedAssetIds,x=e.templateAssets,p=e.setCheckedAssetIds,j=e.maxClaimable,v=e.t,I=e.assetIdsToIgnore,b=void 0===I?[]:I,N=e.assetsInThisPool;return(0,t.jsx)(d.Z,{children:(0,t.jsx)(c.Z,{style:{paddingBottom:0,paddingTop:0},colSpan:7,children:(0,t.jsx)(r.Z,{in:m.has(h.id),children:(0,t.jsxs)("div",{className:"ml-10 mb-15",children:[(0,t.jsxs)("div",{className:"my-5 text-lg",children:["Asset IDs of schema '",h.schema,"' -"," ",h.id in u&&u[h.id].size?u[h.id].size:0," ","assets selected",(null==N?void 0:N.length)>0?", "+(null===(i=x[h.id])||void 0===i?void 0:i.filter(function(e){return N.includes(e.id)}).length)+" already in pool":null]}),(0,t.jsxs)("div",{className:"flex flex-wrap mb-5",children:[x&&x[h.id]&&x[h.id].length>0?x[h.id].map(function(e){return b&&b.length>0&&b.includes(e.id)?null:(0,t.jsx)("div",{className:"m-1 font-light",children:(0,t.jsx)(o.Z,{label:0!==parseInt(e.mint)?"#"+e.mint:"id: "+e.id,color:N.includes(e.id)||u[h.id]&&u[h.id].has(e.id)?"primary":"default",disabled:N.includes(e.id),onClick:function(){if(h.id in u&&u[h.id].has(e.id)){var i=new Set(u[h.id]);i.delete(e.id),p((0,a._)((0,n._)({},u),(0,l._)({},h.id,i)))}else if(h.id in u&&!u[h.id].has(e.id)){var s=new Set(u[h.id]);s.add(e.id),p((0,a._)((0,n._)({},u),(0,l._)({},h.id,s)))}else h.id in u||p((0,a._)((0,n._)({},u),(0,l._)({},h.id,new Set([e.id]))))}})})}):(0,t.jsx)("div",{className:"my-auto",children:v("editor.no_assets_available")}),(0,t.jsx)("div",{className:"m-1",children:(0,t.jsx)(f.Z,{href:"/creator/".concat(s,"/nftcreator/").concat(h.schema,"/").concat(h.id),external:!0,children:(0,t.jsx)(o.Z,{label:"Mint more Assets to Contract...",clickable:!0})})})]}),(0,t.jsxs)("div",{className:"mb-5 flex flex-wrap",children:[(0,t.jsx)(Z.h,{className:"mx-2 my-auto",disabled:!x||!x[h.id],onClick:function(){var e=[];x[h.id].filter(function(e){return!b.includes(e.id)}).map(function(i){return e.push(i.id)}),p((0,a._)((0,n._)({},u),(0,l._)({},h.id,new Set(e))))},children:"Select All"}),(0,t.jsx)(Z.h,{className:"mx-2 my-auto",disabled:!x||!x[h.id],onClick:function(){p((0,a._)((0,n._)({},u),(0,l._)({},h.id,new Set([]))))},children:"Deselect All"}),(0,t.jsx)(Z.h,{className:"mx-2 my-auto",onClick:function(){for(var e=[],i=0;i<Math.min(parseInt(j-x[h.id].filter(function(e){return N.includes(e.id)}).length),x[h.id].filter(function(e){return!b.includes(e.id)}).length);i++)e.push(x[h.id].filter(function(e){return!b.includes(e.id)})[i].id);e=e.filter(function(e){return!N.includes(e)}),p((0,a._)((0,n._)({},u),(0,l._)({},h.id,new Set(e))))},disabled:!x||!x[h.id]||0===parseInt(j)||parseInt(j)>0&&x[h.id]&&parseInt(j)>x[h.id].length,children:"Select Max Claimable #"})]})]})})})})},T=function(e){var i=e.collectionName,s=e.isAssetLevel,l=e.schemas,n=e.schemaTemplates,a=e.setSchemaTemplates,r=e.checkedTemplateIds,o=e.handleTemplateChecked,Z=e.templateAssets,y=e.checkedAssetIds,g=e.setCheckedAssetIds,S=e.maxClaimable,_=e.t,T=e.ignoreRemainingCount,A=void 0!==T&&T,w=e.templateFilter,z=void 0===w?null:w,D=e.assetIdsToIgnore,M=void 0===D?[]:D,F=e.assetsInThisPool;return(0,t.jsxs)(N.J,{expandable:!0,title:"Select the Templates to be included in Your Drop",error:(0,v.hI)(_,s,y,r,S,F,z),id:"DropSelectTemplatesEditor",children:[(0,t.jsxs)(b.C,{condition:s&&S>0,severity:"warning",autoVerticalMargin:!1,className:"mb-5",children:["Please select ",(0,t.jsx)("b",{children:S})," assets per template"]}),l.map(function(e){return(0,t.jsx)(k,{collectionName:i,schemaName:e,sc
1hemaTemplates:n,setSchemaTemplates:a,templateFilter:z,children:n[e]?(0,t.jsx)(m.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(u.Z,{children:(0,t.jsxs)(d.Z,{children:[(0,t.jsx)(c.Z,{children:"ID"}),(0,t.jsx)(c.Z,{children:"Name"}),(0,t.jsx)(c.Z,{children:"Rarity"}),(0,t.jsx)(c.Z,{align:"center",children:"Image"}),(0,t.jsx)(c.Z,{children:"Issued / Total Available"}),(0,t.jsx)(c.Z,{children:"Remaining"}),(0,t.jsx)(c.Z,{children:"Include in Drop?"})]})}),(0,t.jsx)(x.Z,{children:n[e]&&n[e].sort(function(e,i){return i.id-e.id}).map(function(l){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.Z,{children:[(0,t.jsx)(c.Z,{children:l.id}),(0,t.jsx)(c.Z,{children:l.name}),(0,t.jsx)(c.Z,{children:l.rarity?l.rarity:"n/a"}),(0,t.jsx)(c.Z,{children:l.image||l.video?(0,t.jsx)(I.Z,{src:j.JS.replaceAll("{collection}",i).replaceAll("{hash}",l.video?l.video:l.image).replaceAll("{size}","240"),imgClassName:"max-h-24 max-w-min"}):"n/a"}),(0,t.jsxs)(c.Z,{children:[l.issuedSupply," ","/"," ",0===l.maxSupply?"Infinite":l.maxSupply]}),(0,t.jsx)(c.Z,{children:0===l.maxSupply?"Infinite":l.maxSupply-l.issuedSupply}),(0,t.jsx)(c.Z,{children:(0,t.jsx)(p.Z,{disabled:!A&&!s&&l.maxSupply>0&&l.issuedSupply>=l.maxSupply,onChange:function(i){o(i,l.id,e)}})})]}),s?(0,t.jsx)(C,{collectionName:i,checkedTemplateIds:r,template:l,checkedAssetIds:y,templateAssets:Z,setCheckedAssetIds:g,maxClaimable:S,t:_,assetIdsToIgnore:M,assetsInThisPool:F}):null]})})})]})}):(0,t.jsxs)("div",{className:"italic",children:["No Templates present in schema ",e]})},"schema_"+e)}),(0,t.jsx)(b.C,{condition:null!==(0,v.hI)(_,s,y,r,S,F,z),severity:"error",children:(0,v.hI)(_,s,y,r,S,F,z)}),(0,t.jsx)(b.C,{condition:r.size>0,severity:"info",title:"Selected Templates",autoVerticalMargin:!1,className:"mt-10 mb-5",children:Array.from(r).map(function(e){return(0,t.jsx)(f.Z,{href:"/template/".concat(e),external:!0,children:(0,t.jsx)("span",{className:"text-primary font-mono hover:underline",children:e})})})})]})}}}]); 2//# sourceMappingURL=8928-1e520d0cfbcd2be1.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.