PageSourceSearch

https://socialpopcornapp.com/_next/static/chunks/7156-c73f9861b336f4f4.js

js socialpopcornapp.com collected 2026-10-02 01:44:47 UTC 20,744 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7156],{7156:function(e,a,r){r.d(a,{W:function(){return v},Z:function(){return w}});var s=r(5893),i=r(645),t=r.n(i),n=r(7294),l=r(1664),o=r.n(l),d=r(250),c=r(339),f=r(204);function b(e){if(e<=0)return 0;let a="undefined"!=typeof globalThis?globalThis.crypto:null;if(null==a?void 0:a.getRandomValues){let r=new Uint32Array(1);return a.getRandomValues(r),r[0]%e}return Math.floor(Math.random()*e)}var x=r(5640),m=r(7392);function p(e){let{label:a,hint:r,required:i,children:n,className:l=""}=e;return(0,s.jsxs)("label",{className:"jsx-141474a87c6dbd7d "+"field ".concat(l),children:[(0,s.jsxs)("span",{className:"jsx-141474a87c6dbd7d fieldLabel",children:[a,i?(0,s.jsx)("span",{className:"jsx-141474a87c6dbd7d req",children:" *"}):null]}),n,r?(0,s.jsx)("span",{className:"jsx-141474a87c6dbd7d hint",children:r}):null,(0,s.jsx)(t(),{id:"141474a87c6dbd7d",children:".field.jsx-141474a87c6dbd7d{display:grid;gap:.4rem;font-size:.92rem;font-weight:700;color:#1e293b}.fieldLabel.jsx-141474a87c6dbd7d{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:.15rem}.req.jsx-141474a87c6dbd7d{color:#dc2626}.field.jsx-141474a87c6dbd7d input,.field.jsx-141474a87c6dbd7d select,.field.jsx-141474a87c6dbd7d textarea{font:inherit;font-weight:500;border:1px solid#cbd5e1;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:.7rem .85rem;color:#0f172a;background:#fff;width:100%}.hint.jsx-141474a87c6dbd7d{font-size:.78rem;font-weight:500;color:#64748b}"})]})}function u(e){let{title:a,children:r}=e;return(0,s.jsxs)("section",{className:"jsx-d53ac7ef0d97bf1 section",children:[(0,s.jsx)("h3",{className:"jsx-d53ac7ef0d97bf1",children:a}),(0,s.jsx)("div",{className:"jsx-d53ac7ef0d97bf1 sectionBody",children:r}),(0,s.jsx)(t(),{id:"d53ac7ef0d97bf1",children:".section.jsx-d53ac7ef0d97bf1{display:grid;gap:.85rem}.section.jsx-d53ac7ef0d97bf1 h3.jsx-d53ac7ef0d97bf1{margin:0;font-size:1rem;font-weight:800;color:#0f172a;padding-bottom:.55rem;border-bottom:1px solid#e2e8f0}.sectionBody.jsx-d53ac7ef0d97bf1{display:grid;gap:.85rem}"})]})}function g(){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}function j(){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M9.9 4.24A10.94 10.94 0 0 1 12 4c6.5 0 10 7 10 7a18.5 18.5 0 0 1-2.16 3.19M6.61 6.61A18.5 18.5 0 0 0 2 12s3.5 7 10 7a10.94 10.94 0 0 0 5.39-1.43M1 1l22 22",strokeLinecap:"round",strokeLinejoin:"round"})})}function h(e){let{value:a,onChange:r,placeholder:i,required:l}=e,[o,d]=(0,n.useState)(!1);return(0,s.jsxs)("div",{className:"jsx-abc7cc7d47df7fac passwordInputWrap",children:[(0,s.jsx)("input",{type:o?"text":"password",value:a,onChange:r,placeholder:i,required:l,autoComplete:"new-password",className:"jsx-abc7cc7d47df7fac"}),(0,s.jsx)("button",{type:"button",onClick:()=>d(e=>!e),"aria-label":o?"Hide password":"Show password",title:o?"Hide password":"Show password",className:"jsx-abc7cc7d47df7fac toggleVisBtn",children:o?(0,s.jsx)(j,{}):(0,s.jsx)(g,{})}),(0,s.jsx)(t(),{id:"abc7cc7d47df7fac",children:".passwordInputWrap.jsx-abc7cc7d47df7fac{position:relative;width:100%}.passwordInputWrap.jsx-abc7cc7d47df7fac input{width:100%;padding-right:2.65rem}.toggleVisBtn.jsx-abc7cc7d47df7fac{position:absolute;top:50%;right:.45rem;-webkit-transform:translatey(-50%);-moz-transform:translatey(-50%);-ms-transform:translatey(-50%);-o-transform:translatey(-50%);transform:translatey(-50%);width:2rem;height:2rem;padding:0;border:none;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;background:transparent;color:#64748b;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;cursor:pointer}.toggleVisBtn.jsx-abc7cc7d47df7fac:hover{color:#1d4fb3;background:#eef4ff}.toggleVisBtn.jsx-abc7cc7d47df7fac svg{width:1.05rem;height:1.05rem}"})]})}function w(e){let{mode:a="add",form:r,setForm:i,onSubmit:l,saving:x,error:g}
1=e,j=(0,n.useRef)(null),[w,v]=(0,n.useState)(!1),[k,y]=(0,n.useState)(!1),N=e=>i(a=>({...a,...e})),_=()=>{let e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,a="ABCDEFGHJKLMNPQRSTUVWXYZ",r="abcdefghjkmnpqrstuvwxyz",s="23456789",i="!@#$%^&*-_=+",t=a+r+s+i,n=e=>e[b(e.length)],l=[n(a),n(r),n(s),n(i)];for(;l.length<e;)l.push(n(t));for(let e=l.length-1;e>0;e-=1){let a=b(e+1);[l[e],l[a]]=[l[a],l[e]]}return l.join("")}(16);N({password:e,confirm_password:e,change_password:!0})},C=async e=>{var a,r;let s=null===(a=e.target.files)||void 0===a?void 0:a[0];if(s){y(!0);try{let e=new FormData;e.append("file",s);let a=await fetch("/api/media",{method:"POST",body:e}),i=await a.json();if(!a.ok)throw Error(i.error||"Upload failed");let t=(null===(r=i.items)||void 0===r?void 0:r[0])||i.item;if(!(null==t?void 0:t.url))throw Error("Upload failed");N({profile_picture:(0,m.w6)(t.url)})}catch(e){alert(e.message)}finally{y(!1),e.target.value=""}}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z,{show:k,message:"Uploading image..."}),(0,s.jsxs)("form",{onSubmit:l,className:"jsx-b951f3752e0362f9 userForm",children:["add"===a?(0,s.jsx)(u,{title:"Personal Information",children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 grid2",children:[(0,s.jsx)(p,{label:"First Name",children:(0,s.jsx)("input",{value:r.first_name,onChange:e=>N({first_name:e.target.value}),placeholder:"First name",className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Last Name",children:(0,s.jsx)("input",{value:r.last_name,onChange:e=>N({last_name:e.target.value}),placeholder:"Last name",className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Username",required:!0,children:(0,s.jsx)("input",{value:r.username,onChange:e=>N({username:e.target.value}),placeholder:"username",required:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Email",required:!0,children:(0,s.jsx)("input",{type:"email",value:r.email,onChange:e=>N({email:e.target.value}),placeholder:"[email protected]",required:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Password",required:!0,children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 passwordRow",children:[(0,s.jsx)(h,{value:r.password,onChange:e=>N({password:e.target.value}),placeholder:"Strong password",required:!0}),(0,s.jsx)("button",{type:"button",onClick:_,className:"jsx-b951f3752e0362f9 genBtn",children:"Generate Password"})]})}),(0,s.jsx)(p,{label:"Confirm Password",required:!0,children:(0,s.jsx)(h,{value:r.confirm_password,onChange:e=>N({confirm_password:e.target.value}),placeholder:"Confirm password",required:!0})}),(0,s.jsx)(p,{label:"Role",children:(0,s.jsx)("input",{value:f.s_,readOnly:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsxs)("fieldset",{className:"jsx-b951f3752e0362f9 statusField",children:[(0,s.jsx)("legend",{className:"jsx-b951f3752e0362f9",children:"Status"}),(0,s.jsx)("div",{className:"jsx-b951f3752e0362f9 radioRow",children:f.xY.map(e=>(0,s.jsxs)("label",{className:"jsx-b951f3752e0362f9 radioOption",children:[(0,s.jsx)("input",{type:"radio",name:"user_status",value:e.value,checked:r.status===e.value,onChange:()=>N({status:e.value}),className:"jsx-b951f3752e0362f9"}),e.label]},e.value))})]}),(0,s.jsx)(p,{label:"Profile Picture",className:"full",children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 profileRow",children:[(0,s.jsx)("div",{className:"jsx-b951f3752e0362f9 avatarPreview",children:r.profile_picture?(0,s.jsx)("img",{src:(0,m.y2)(r.profile_picture),alt:"Profile preview",className:"jsx-b951f3752e0362f9"}):(0,s.jsx)("span",{className:"jsx-b951f3752e0362f9",children:"No image"})}),(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 profileActions",children:[(0,s.jsx)("input",{ref:j,type:"file",accept:"image/*",hidden:!0,onChange:C,className:"jsx-b951f3752e0362f9"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.click()},disabled:k,className:"jsx-b951f3752e0362f9 secondaryBtn",children:k?"Uploading...":"Upload Image"}),(0,s.jsx)("button",{type:"button",onClick:()=>v(!0),className:"jsx-b951f3752e0362f9 secondaryBtn",children:"Media Library"}),r.profile_picture?(0,s.jsx)("button",{type:"button",onClick:()=>N({profile_picture:""}),className:"jsx-b951f3752e0362f9 linkBtn",children:"Remove"}):null]})]})}),(0,s.jsx)(p,{label:"Bio",className:"full",children:(0,s.jsx)("textarea",{value:r.bio,onChange:e=>N({bio:e.target.value}),rows:4,placeholder:"Short bio about this user",className:"jsx-b951f3752e0362f9"})})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u,{title:"Profile",children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 grid2",children:[(0,s.jsx)(p,{label:"Profile Picture",className:"full",children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 profileRow",children:[(0,s.jsx)("div",{className:"jsx-b951f3752e0362f9 avatarPreview",children:r.profile_picture?(0,s.jsx)("img",{src:(0,m.y2)(r.profile_picture),alt:"Profile preview",className:"jsx-b951f3752e0362f9"}):(0,s.jsx)("span",{className:"jsx-b951f3752e0362f9",children:"No image"})}),(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 profileActions",children:[(0,s.jsx)("input",{ref:j,type:"file",accept:"image/*",hidden:!0,onChange:C,className:"jsx-b951f3752e0362f9"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.click()},disabled:k,className:"jsx-b951f3752e0362f9 secondaryBtn",children:k?"Uploading...":"Upload Image"}),(0,s.jsx)("button",{type:"button",onClick:()=>v(!0),className:"jsx-b951f3752e0362f9 secondaryBtn",children:"Media Library"})]})]})}),(0,s.jsx)(p,{label:"First Name",children:(0,s.jsx)("input",{value:r.first_name,onChange:e=>N({first_name:e.target.value}),className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Last Name",children:(0,s.jsx)("input",{value:r.last_name,onChange:e=>N({last_name:e.target.value}),className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Username",required:!0,children:(0,s.jsx)("input",{value:r.username,onChange:e=>N({username:e.target.value}),required:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Email",required:!0,children:(0,s.jsx)("input",{type:"email",value:r.email,onChange:e=>N({email:e.target.value}),required:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Bio",className:"full",children:(0,s.jsx)("textarea",{value:r.bio,onChange:e=>N({bio:e.target.value}),rows:4,className:"jsx-b951f3752e0362f9"})})]})}),(0,s.jsx)(u,{title:"Account",children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 grid2",children:[(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 full passwordBlock",children:[(0,s.jsxs)("label",{className:"jsx-b951f3752e0362f9 checkRow",children:[(0,s.jsx)("input",{type:"checkbox",checked:r.change_password,onChange:e=>N({change_password:e.target.checked,password:e.target.checked?r.password:"",confirm_password:e.target.checked?r.confirm_password:""}),className:"jsx-b951f3752e0362f9"}),"Change Password"]}),r.change_password?(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 passwordFields",children:[(0,s.jsx)(p,{label:"New Password",required:!0,children:(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 passwordRow",children:[(0,s.jsx)(h,{value:r.password,onChange:e=>N({password:e.target.value}),placeholder:"New strong password",required:!0}),(0,s.jsx)("button",{type:"button",onClick:_,className:"jsx-b951f3752e0362f9 genBtn",children:"Generate Password"})]})}),(0,s.jsx)(p,{label:"Confirm Password",required:!0,children:(0,s.jsx)(h,{value:r.confirm_password,onChange:e=>N({confirm_password:e.target.value}),placeholder:"Confirm password",required:!0})})]}):null]}),(0,s.jsx)(p,{label:"Role",children:(0,s.jsx)("input",{value:f.s_,readOnly:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Status",children:(0,s.jsx)("select",{value:r.status,onChange:e=>N({status:e.target.value}),className:"jsx-b951f3752e0362f9",children:f.xY.map(e=>(0,s.jsx)("option",{value:e.value,className:"jsx-b951f3752e0362f9",children:e.label},e.value))})}),(0,s.jsx)(p,{label:"Last Login",children:(0,s.jsx)("input",{value:(0,f.OS)(r.last_login_at),readOnly:!0,className:"jsx-b951f3752e0362f9"})}),(0,s.jsx)(p,{label:"Created",children:(0,s.jsx)("input",{value:(0,f.OS)(r.created_at),readOnly:!0,className:"jsx-b951f3752e0362f9"})})]})})]}),g?(0,s.jsx)("div",{className:"jsx-b951f3752e0362f9 notice error",children:g}):null,(0,s.jsxs)("div",{className:"jsx-b951f3752e0362f9 formActions",children:[(0,s.jsx)(o(),{href:"/admin/users",className:"cancelBtn",children:"Cancel"}),(0,s.jsx)("button",{type:"submit",disabled:x,className:"jsx-b951f3752e0362f9 submitBtn",children:x?"Saving...":"edit"===a?"Update User":"Create User"})]})]}),(0,s.jsx)(c.Z,{open:w,onClose:()=>v(!1),onSelect:e=>{N({profile_picture:(0,m.w6)(e)}),v(!1)}
1,title:"Choose profile picture"}),(0,s.jsx)(t(),{id:"2a3a8ef357457218",children:"a.cancelBtn,a.cancelBtn:visited{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:.75rem 1.15rem;-webkit-border-radius:999px;-moz-border-radius:999px;border-radius:999px;background:#e2e8f0;color:#0f172a!important;font-weight:800;text-decoration:none!important}"}),(0,s.jsx)(t(),{id:"3a6175cacaa07bd5",children:".userForm.jsx-b951f3752e0362f9{display:grid;gap:1.25rem}.grid2.jsx-b951f3752e0362f9{display:grid;grid-template-columns:1fr 1fr;gap:.85rem 1rem;-webkit-box-align:start;-webkit-align-items:start;-moz-box-align:start;-ms-flex-align:start;align-items:start}.full.jsx-b951f3752e0362f9{grid-column:1/-1}.passwordRow.jsx-b951f3752e0362f9{display:grid;grid-template-columns:1fr auto;gap:.55rem;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.genBtn.jsx-b951f3752e0362f9{border:1px solid#93c5fd;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;background:#eef4ff;color:#1d4fb3;font:inherit;font-weight:700;padding:.68rem .9rem;cursor:pointer;white-space:nowrap}.statusField.jsx-b951f3752e0362f9{border:1px solid#cbd5e1;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;padding:.75rem .95rem .85rem;margin:0}.statusField.jsx-b951f3752e0362f9 legend.jsx-b951f3752e0362f9{padding:0 .25rem;font-size:.92rem;font-weight:700;color:#1e293b}.radioRow.jsx-b951f3752e0362f9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;gap:1rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.radioOption.jsx-b951f3752e0362f9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:.45rem;font-weight:600;color:#334155}.radioOption.jsx-b951f3752e0362f9 input.jsx-b951f3752e0362f9{width:auto;margin:0}.profileRow.jsx-b951f3752e0362f9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;gap:1rem;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.avatarPreview.jsx-b951f3752e0362f9{width:84px;height:84px;-webkit-border-radius:999px;-moz-border-radius:999px;border-radius:999px;overflow:hidden;border:1px solid#cbd5e1;background:#f8fafc;display:grid;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center;place-items:center;color:#94a3b8;font-size:.78rem;font-weight:600}.avatarPreview.jsx-b951f3752e0362f9 img.jsx-b951f3752e0362f9{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.profileActions.jsx-b951f3752e0362f9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;gap:.55rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.secondaryBtn.jsx-b951f3752e0362f9{border:1px solid#cbd5e1;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;background:#fff;color:#334155;font:inherit;font-weight:700;padding:.62rem .9rem;cursor:pointer}.linkBtn.jsx-b951f3752e0362f9{border:none;background:transparent;color:#be123c;font:inherit;font-weight:700;cursor:pointer}.passwordBlock.jsx-b951f3752e0362f9{display:grid;gap:.75rem}.passwordFields.jsx-b951f3752e0362f9{display:grid;grid-template-columns:1fr 1fr;gap:.85rem 1rem;-webkit-box-align:start;-webkit-align-items:start;-moz-box-align:start;-ms-flex-align:start;align-items:start}.checkRow.jsx-b951f3752e0362f9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:.45rem;font-weight:700;color:#334155}.checkRow.jsx-b951f3752e0362f9 input.jsx-b951f3752e0362f9{width:auto;margin:0}.notice.error.jsx-b951f3752e0362f9{-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;padding:.75rem 1rem;background:#fff1f2;color:#be123c;border:1px solid#fecdd3;font-weight:600}.formActions.jsx-b951f3752e0362f9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;
1-webkit-justify-content:flex-end;-moz-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:.75rem;padding-top:.85rem;border-top:1px solid#eef2f7;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.submitBtn.jsx-b951f3752e0362f9{border:none;-webkit-border-radius:999px;-moz-border-radius:999px;border-radius:999px;padding:.8rem 1.4rem;background:-webkit-linear-gradient(315deg,#2563eb 0%,#1d4fb3 100%);background:-moz-linear-gradient(315deg,#2563eb 0%,#1d4fb3 100%);background:-o-linear-gradient(315deg,#2563eb 0%,#1d4fb3 100%);background:linear-gradient(135deg,#2563eb 0%,#1d4fb3 100%);color:#fff;font-weight:800;cursor:pointer}.submitBtn.jsx-b951f3752e0362f9:disabled{opacity:.7;cursor:wait}@media(max-width:760px){.grid2.jsx-b951f3752e0362f9{grid-template-columns:1fr}.passwordFields.jsx-b951f3752e0362f9{grid-template-columns:1fr}}"})]})}function v(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"add";return(0,x.Vo)(e,{mode:a})}},5640:function(e,a,r){r.d(a,{Vo:function(){return l},fl:function(){return t},jc:function(){return n}});var s=r(204),i=r(7392);let t={first_name:"",last_name:"",username:"",email:"",password:"",confirm_password:"",role:s.N1,status:"active",profile_picture:"",bio:""};function n(e){return{first_name:e.first_name||"",last_name:e.last_name||"",username:e.username||"",email:e.email||"",password:"",confirm_password:"",change_password:!1,role:(0,s.VA)(e.role),status:e.status||"active",profile_picture:(0,i.AD)(e.profile_picture),bio:e.bio||"",last_login_at:e.last_login_at||null,created_at:e.created_at||null}}function l(e){let{mode:a="add"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={first_name:String(e.first_name||"").trim(),last_name:String(e.last_name||"").trim(),username:String(e.username||"").trim(),email:String(e.email||"").trim(),role:(0,s.VA)(e.role),status:e.status||"active",profile_picture:(0,i.AD)(e.profile_picture),bio:String(e.bio||"").trim()};return("add"===a||e.change_password)&&(r.password=String(e.password||""),r.confirm_password=String(e.confirm_password||"")),"edit"===a&&(r.change_password=!!e.change_password),r}s.N1},204:function(e,a,r){r.d(a,{N1:function(){return s},OS:function(){return l},VA:function(){return n},b3:function(){return o},s_:function(){return i},xY:function(){return t},xq:function(){return d}});let s="administrator",i="Administrator",t=[{value:"active",label:"Active"},{value:"inactive",label:"Inactive"}];function n(){return s}function l(e){if(!e)return"—";let a=new Date(e);return Number.isNaN(a.getTime())?"—":a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function o(e){return[null==e?void 0:e.first_name,null==e?void 0:e.last_name].filter(Boolean).join(" ").trim()||(null==e?void 0:e.username)||"User"}function d(e){return i}}}]);

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.