1(this["webpackJsonpsqwid-client"]=this["webpackJsonpsqwid-client"]||[]).push([[32],{1508:function(e,t,r){"use strict";r.r(t);var i=r(13),n=r(38),a=r(1200),o=r(1483),c=r(1094),s=r(948),d=r(935),l=r(924),m=r(1030),h=r(423),b=r.n(h),j=r(214),p=r(968),g=r(422),u=r(496),v=r(12);const x=n.b.div` 2 width: 70%; 3 margin: 0 auto; 4 ${g.a.md` 5 width: 100%; 6 `} 7 ul { 8 list-style-position: inside; 9 } 10 h1, 11 h2 { 12 margin: 0.75rem 0; 13 } 14 h1 { 15 font-size: 2rem; 16 font-weight: 800; 17 margin-bottom: 2rem; 18 } 19 p, 20 ul { 21 color: var(--app-container-text-primary-hover); 22 } 23 a { 24 text-decoration: none; 25 transition: color 0.1s ease; 26 &:link { 27 color: var(--app-theme-primary); 28 } 29 &:hover { 30 color: var(--app-theme-primary-disabled); 31 } 32 &:visited { 33 color: var(--app-theme-primary); 34 } 35 } 36`,w=n.b.div` 37 display: flex; 38 flex-direction: row; 39 align-items: center; 40 width: 100%; 41 padding: 0.675rem; 42 background-color: var(--app-container-bg-primary); 43 border-radius: 0.25rem; 44 &:not(last-child) { 45 margin-bottom: 0.5rem; 46 } 47`,f=n.b.div` 48 display: flex; 49 flex-direction: row; 50 align-items: center; 51 width: 100%; 52 padding: 0.675rem; 53 border: solid 0.2rem var(--app-container-bg-primary); 54 border-radius: 0.5rem 0.5rem 0 0; 55 font-weight: 700 !important; 56 &:not(last-child) { 57 margin-bottom: 0.5rem; 58 } 59`,O=n.b.li` 60 /* display: flex; 61 align-items: center; 62 flex-direction: row; 63 justify-content: space-evenly; */ 64 // background-color: var(--app-theme-primary-disabled); 65 margin: 0.5rem 0; 66 flex: 1; 67 display: grid; 68 grid-template-columns: repeat(3, 1fr); 69`,y=n.b.div` 70 width: 3rem; 71 height: 3rem; 72 background-color: var(--app-theme-primary); 73 margin-right: 0.5rem; 74 background: url(${e=>e.url}) no-repeat center; 75 background-size: cover; 76 border-radius: 0.25rem; 77`,k=n.b.div` 78 font-weight: 800; 79 width: 30rem; 80 ${g.a.md` 81 width: 100%; 82 `} 83`,I=n.b.div` 84 color: var(--app-text); 85 text-align: center; 86`,S=n.b.div` 87 color: var(--app-text); 88 font-weight: 800; 89`,D=n.b.div` 90 background-color: var(--app-container-bg-secondary); 91 width: 2rem; 92 height: 2rem; 93 margin: 0.25rem; 94 cursor: pointer; 95 &:hover { 96 background-color: hsl(236, 10%, 20%); 97 } 98 justify-content: center; 99 align-items: center; 100 display: flex; 101 border-radius: 0.25rem; 102`,z=n.b.div` 103 display: flex; 104 flex-direction: row; 105 justify-content: space-between; 106 align-items: center; 107 width: 100%; 108 padding: 0.5rem 0; 109`,C=n.b.div` 110 display: flex; 111 flex-direction: row; 112 align-items: center; 113 width: 100%; 114 padding: 0.5rem 0; 115 flex: 0; 116`,M=n.b.div` 117 background-color: var(--app-theme-primary-disabled); 118 /* height: 2.5rem; */ 119 /* width: 2.5rem; */ 120 margin: 0.25rem; 121 &:last-child { 122 margin-right: 0; 123 } 124 cursor: pointer; 125 padding: 0.5rem 0.75rem; 126 &:hover { 127 background-color: var(--app-theme-primary); 128 } 129 border-radius: 0.25rem; 130 svg { 131 height: 1rem; 132 width: 1rem; 133 } 134 align-items: center; 135 display: flex; 136 justify-content: center; 137 gap: 0.25rem; 138 font-weight: 700; 139`,A=n.b.div` 140 svg { 141 height: 1.5rem; 142 width: 1.5rem; 143 fill: currentColor; 144 color: var(--app-container-text-primary-hover); 145 } 146 margin: 0.25rem; 147 margin-right: 1rem; 148 cursor: move; 149 cursor: grab; 150 display: grid; 151 place-items: center; 152 &:active { 153 cursor: grabbing; 154 svg { 155 color: white; 156 } 157 } 158`,L=e=>Object(v.jsx)(A,{...e,children:Object(v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:Object(v.jsx)("path",{"fill-rule":"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z","clip-rule":"evenodd"})})});function $(e){var t,r,i,n,a,s,m;const{attributes:h,listeners:b,setNodeRef:j,transform:p,transition:g}=Object(o.d)({id:e.id}),u={transform:c.a.Transform.toString(p),transition:g};return Object(v.jsxs)(w,{ref:j,style:u,...h,children:[Object(v.jsx)(L,{...b}),Object(v.jsx)(y,{title:"Preview",url:null!=(t=e.itemData)&&t.meta?Object(d.a)(null==(r=e.itemData)||null==(i=r.meta)?void 0:i.image):""}),Object(v.jsxs)(O,{children:[Object(v.jsx)(I,{children:e.id}),Object(v.jsx)(l.b,{to:`/collectible/${null==(n=e.itemData)?void 0:n.positionId}`,children:Object(v.jsx)(k,{children:(null==(a=e.itemData)||null==(s=a.meta)?void 0:s.name)||"Missing Item"})}),Object(v.jsx)(S,{children:(e=>{switch(e){case 1:return"Sale";case 2:return"Auction";case 3:return"Raffle";case 4:return"Loan";default:return"Unknown"}})(null==(m=e.itemData)?void 0:m.state)})]}),Object(v.jsx)(D,{onClick:()=>{e.removeItem(e.id)},children:Object(v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
158currentColor",height:"24",width:"24",children:Object(v.jsx)("path",{d:"m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"})})})]})}var B=()=>{const[e,t]=Object(i.useState)([]),[r,n]=Object(i.useState)([]),[c,d]=Object(i.useState)(!1),l=Object(a.n)(Object(a.m)(a.d),Object(a.m)(a.c,{coordinateGetter:o.c})),{showErrorModal:h}=Object(u.c)();function g(e){t(t=>t.filter(t=>t!==e))}return Object(i.useEffect)(()=>{(async()=>{const e=await Object(s.v)();t(e.map(e=>e.positionId)),n(e)})()},[]),Object(v.jsxs)(v.Fragment,{children:[Object(v.jsxs)(x,{children:[Object(v.jsxs)(z,{children:[Object(v.jsx)("h1",{children:"Featured Dashboard"}),Object(v.jsxs)(C,{children:[Object(v.jsxs)(M,{onClick:()=>{d(!0)},children:["Add"," ",Object(v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",children:Object(v.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z"})})]}),Object(v.jsxs)(M,{onClick:async function(){var t;const r=null==(t=JSON.parse(localStorage.getItem("auth")))?void 0:t.auth.address;let i=r?JSON.parse(localStorage.getItem("tokens")).find(e=>e.address===r):null;try{await b.a.post(`${Object(j.a)()}/edit/featured`,{ids:e},{headers:{Authorization:`Bearer ${i.token}`,"Content-Type":"application/json"}}),Object(p.a)("Featured items saved")}catch(n){h(n.toString())}},children:["Save"," ",Object(v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",children:Object(v.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"})})]})]})]}),Object(v.jsxs)(f,{children:[Object(v.jsx)("div",{style:{width:"6rem",paddingLeft:"2.75rem"},children:"Image"}),Object(v.jsxs)(O,{children:[Object(v.jsx)(I,{children:"Position ID"}),Object(v.jsx)(k,{children:"Title"}),Object(v.jsx)(S,{children:"Type"})]}),Object(v.jsx)("div",{style:{width:"2rem",height:"2rem",margin:"0.25rem"}})]}),Object(v.jsx)(a.a,{sensors:l,collisionDetection:a.e,onDragEnd:function(e){const{active:r,over:i}=e;r.id!==i.id&&t(e=>{const t=e.indexOf(r.id),n=e.indexOf(i.id);return Object(o.b)(e,t,n)})},children:Object(v.jsx)(o.a,{items:e,strategy:o.e,children:e.map(e=>Object(v.jsx)($,{id:e,removeItem:g,itemData:r.find(t=>t.positionId===e)},e))})})]}),Object(v.jsx)(m.a,{isActive:c,setIsActive:d,addItemInfo:function(r){-1===e.indexOf(r.positionId)&&(n(e=>[...e,r]),t(e=>[...e,r.positionId]))}})]})},J=r(985);t.default=()=>Object(v.jsx)(J.a,{children:Object(v.jsx)(B,{})})}}]); 159//# sourceMappingURL=32.5dbeb532.chunk.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.