hive-react-kit 1.8.3 → 1.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1401,7 +1401,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
1401
1401
  ${Nr}`),Ht&&(je+=`
1402
1402
  ${Ht}`),et&&(je+=`
1403
1403
 
1404
- ${et}`),je=mB(je),je},[Ct,Nr,Ht,et]),Me=T.useMemo(()=>{const je=O8(Ct),tt=O8(et),Ut=new Set,Wt=[];for(const Gt of[...je,...tt]){const ir=`${Gt.lat.toFixed(6)}|${Gt.lng.toFixed(6)}`;Ut.has(ir)||(Ut.add(ir),Wt.push(Gt))}return Wt},[Ct,et]),At=T.useMemo(()=>{if(!Ht)return null;const je=Ht.match(/[?&]v=([^&\s/?#]+)\/([^&\s/?#]+)/);return je?{author:je[1],permlink:je[2]}:null},[Ht]),mr=T.useMemo(()=>{if(!fn.trim()||!bi)return"";try{let je=bi(fn);const tt=!!At,Ut=Wt=>{if(tt)return"";const Gt=Wt.indexOf("/");if(Gt<1)return"";const ir=Wt.slice(0,Gt),Vr=Wt.slice(Gt+1);return`<div class="threeSpeakEmbed" data-author="${ir}" data-permlink="${Vr}"></div>`};return je=je.replace(/<iframe\s[^>]*src="https:\/\/(?:play\.)?3speak\.tv\/embed\?v=([^"&]+\/[^"&]+)[^"]*"[^>]*>(?:<\/iframe>)?/gi,(Wt,Gt)=>Ut(Gt)),je=je.replace(/<a\s[^>]*href="https:\/\/(?:play\.)?3speak\.tv\/embed\?v=([^"&]+\/[^"&]+)[^"]*"[^>]*>[^<]*<\/a>/gi,(Wt,Gt)=>Ut(Gt)),je=je.replace(/<iframe\s[^>]*src="(https:\/\/audio\.3speak\.tv\/play\?[^"]*)"[^>]*>(?:<\/iframe>)?/gi,(Wt,Gt)=>{let ir=Gt;return ir.includes("mode=minimal")||(ir+="&mode=minimal"),ir.includes("iframe=1")||(ir+="&iframe=1"),`<div class="audioWrapper"><iframe src="${ir}" scrolling="no" frameborder="0" allow="autoplay"></iframe></div>`}),je=je.replace(/<img\s([^>]*?)alt="([^"]+)"([^>]*?)\/?\s*>/gi,(Wt,Gt,ir,Vr)=>`<figure class="hive-img-figure">${`<img ${Gt}alt="${ir}"${Vr}>`}<figcaption>${ir}</figcaption></figure>`),je}catch{return""}},[fn,bi,At]),Ir=T.useRef(null);T.useEffect(()=>{const je=Ir.current;if(!je)return;const tt=Ut=>{const Wt=Ut.target;if(Wt.tagName!=="IMG"||Wt.dataset.fallbackAttempted)return;Wt.dataset.fallbackAttempted="true";const Gt=Wt.getAttribute("src")||"",ir=[/^https:\/\/images\.hive\.blog\/\d+x\d+\//,/^https:\/\/images\.hive\.blog\/DQm[^/]*\//,/^https:\/\/images\.ecency\.com\/\d+x\d+\//,/^https:\/\/ipfs\.io\/ipfs\//,/^https:\/\/ipfs\.3speak\.tv\/ipfs\//];for(const Lr of ir)if(Lr.test(Gt)){const Va=Gt.replace(Lr,"");if(Va.startsWith("http")){Wt.src=Va;return}}Wt.style.display="none";const Vr=Wt.closest("figure")?.querySelector("figcaption");Vr&&(Vr.style.display="none")};return je.addEventListener("error",tt,!0),()=>je.removeEventListener("error",tt,!0)},[mr]),T.useLayoutEffect(()=>{const je=Ir.current;if(!je)return;const tt=!!At,Ut=Vr=>{if(!Vr)return null;const Lr=Vr.match(/[?&]v=([^&\s/?#]+)\/([^&\s/?#]+)/i);return Lr?{author:Lr[1],permlink:Lr[2]}:null},Wt=Vr=>Vr?/https?:\/\/(?:play\.)?3speak\.tv\/(?:embed|watch)\?/i.test(Vr):!1,Gt=[];if(je.querySelectorAll('.threeSpeakEmbed:not([data-mounted="1"])').forEach(Vr=>{if(tt){Vr.remove();return}const{author:Lr,permlink:Va}=Vr.dataset;Lr&&Va&&Gt.push({el:Vr,author:Lr,permlink:Va})}),je.querySelectorAll("iframe").forEach(Vr=>{const Lr=Vr.getAttribute("src");if(!Wt(Lr))return;if(tt){Vr.remove();return}const Va=Ut(Lr);if(!Va)return;const qn=document.createElement("div");qn.className="threeSpeakEmbed",qn.dataset.author=Va.author,qn.dataset.permlink=Va.permlink,Vr.replaceWith(qn),Gt.push({el:qn,...Va})}),je.querySelectorAll("a").forEach(Vr=>{const Lr=Vr.getAttribute("href");if(!Wt(Lr))return;if(tt){Vr.remove();return}const Va=Ut(Lr);if(!Va)return;const qn=document.createElement("div");qn.className="threeSpeakEmbed",qn.dataset.author=Va.author,qn.dataset.permlink=Va.permlink,Vr.replaceWith(qn),Gt.push({el:qn,...Va})}),Gt.length===0)return;const ir=[];return Gt.forEach(({el:Vr,author:Lr,permlink:Va})=>{Vr.dataset.mounted="1";const qn=sC.createRoot(Vr);qn.render(t.jsx(bm,{author:Lr,permlink:Va,hideThumbnail:!0})),ir.push(qn)}),()=>{queueMicrotask(()=>{ir.forEach(Vr=>{try{Vr.unmount()}catch{}})})}},[mr,At]),T.useEffect(()=>{const je=Ir.current;if(!je)return;const tt=Ut=>{if(Ut.defaultPrevented||Ut.button!==0||Ut.metaKey||Ut.ctrlKey||Ut.shiftKey||Ut.altKey)return;const Wt=Ut.target?.closest("a");if(!Wt)return;const Gt=Wt.getAttribute("href");if(!Gt)return;const ir=Cg(Gt);if(ir){if(ir.kind==="post"&&oe){Ut.preventDefault(),oe(ir.author,ir.permlink);return}if(ir.kind==="user"&&Pe){Ut.preventDefault(),Pe(ir.author);return}}/^https?:\/\//i.test(Gt)&&(Ut.preventDefault(),window.open(Gt,"_blank","noopener,noreferrer"))};return je.addEventListener("click",tt),()=>je.removeEventListener("click",tt)},[mr,oe,Pe]);const wa=T.useMemo(()=>fn.trim().split(/\s+/).filter(Boolean).length,[fn]),$n=Math.max(1,Math.round(wa/220)),[ls,xi]=T.useState(!1),[yu,Pi]=T.useState(null),hs=T.useRef(b);T.useEffect(()=>{if(!pe||ls){pe||xi(!0);return}try{const je=localStorage.getItem(pe);if(je){const tt=JSON.parse(je);if(typeof tt.title=="string"&&br(tt.title),typeof tt.description=="string"&&yt(tt.description),typeof tt.body=="string"&&bt(tt.body),Array.isArray(tt.userTags)){const Ut=new Set,Wt=[],Gt=ir=>{const Vr=ir.trim().toLowerCase();!Vr||Ut.has(Vr)||ee.includes(Vr)||(Ut.add(Vr),Wt.push(Vr))};for(const ir of m??[])Gt(ir);for(const ir of tt.userTags)Gt(ir);we(Wt)}tt.reward&&aa(tt.reward),Array.isArray(tt.beneficiaries)&&wt(tt.beneficiaries),tt.audioEmbedUrl!==void 0&&$r(tt.audioEmbedUrl),typeof tt.audioDuration=="number"&&Qe(tt.audioDuration),tt.videoEmbedUrl!==void 0&&kt(tt.videoEmbedUrl),tt.videoUploadUrl!==void 0&&nr(tt.videoUploadUrl),tt.videoAspectRatio!==void 0&&Ue(tt.videoAspectRatio),tt.pollData!==void 0&&It(tt.pollData)}}catch{}xi(!0)},[pe]),T.useEffect(()=>{if(!pe||!ls)return;const je=!Nt.trim()&&!_t.trim()&&!Ct.trim()&&ie.length===0&&!Nr&&!Ht&&!Zt&&$e.length===0,tt=setTimeout(()=>{try{if(je)localStorage.removeItem(pe),Pi(null);else{const Ut={title:Nt,description:_t,body:Ct,userTags:ie,reward:jr,beneficiaries:$e,audioEmbedUrl:Nr,audioDuration:sa,videoEmbedUrl:Ht,videoUploadUrl:Mt,videoAspectRatio:ke,pollData:Zt};localStorage.setItem(pe,JSON.stringify(Ut)),Pi(Date.now())}}catch{}},500);return()=>clearTimeout(tt)},[pe,ls,Nt,_t,Ct,ie,jr,$e,Nr,sa,Ht,Mt,ke,Zt]);const he=T.useCallback(()=>{if(pe)try{localStorage.removeItem(pe)}catch{}br(""),yt(""),bt(""),we([]),We(""),aa(y),wt(vu(hs.current,[])),$r(null),Qe(0),He&&URL.revokeObjectURL(He),kt(null),nr(null),Ue(null),st(null),Er(null),ha(!1),It(null),Kr([]),Pi(null)},[pe,y,He]),ft=T.useCallback(()=>{he()},[he]),vt=Nt.trim().length>0&&Ct.trim().length>0&&!Tr&&(!Ee||!!Zt),St=!!(Nt.trim()||_t.trim()||Ct.trim()),ot=T.useCallback(async()=>{if(vt){xr(!0);try{const je={title:Nt.trim(),description:_t.trim().slice(0,fm),body:fn.trim(),tags:Dt,reward:jr,beneficiaries:vu($e,Xr),poll:Zt,audioEmbedUrl:Nr,videoEmbedUrl:Ht,videoUploadUrl:Mt,videoAspectRatio:ke,videoUploadDetails:hr,hasVideo:!!hr,isNsfw:yr,reblog:cr?$t:!1,appId:$&&$.length>0?la:void 0};if(await Promise.resolve(a(je))===!1)return;he()}catch(je){console.error("[ParentPostComposer] submit error:",je)}finally{xr(!1)}}},[vt,Nt,_t,fn,Dt,jr,$e,mn,Zt,Nr,Ht,Mt,ke,hr,yr,a,he,$t,cr]),Kt={title:Nt.trim(),description:_t.trim().slice(0,fm),body:Ct,tags:Dt,beneficiaries:vu($e,Xr)},ta=T.useCallback(async()=>{if(!(!q||Aa)){Ta(!0);try{await Promise.resolve(q({title:Nt.trim(),description:_t.trim().slice(0,fm),body:Ct,tags:Dt,beneficiaries:vu($e,Xr)})),he(),o?.()}catch(je){console.error("[ParentPostComposer] save draft error:",je)}finally{Ta(!1)}}},[q,Aa,Nt,_t,Ct,Dt,$e,Xr,he,o]),pa=T.useCallback(async(je,tt)=>{if(Y){Pa(!0);try{await Promise.resolve(Y(je,tt))}finally{Pa(!1)}}},[Y]),_a=T.useCallback(async je=>{if(X){Pa(!0);try{await Promise.resolve(X(je))}finally{Pa(!1)}}},[X]),Sa=T.useCallback(je=>{br(je.title||""),yt(je.description||""),bt(je.body||"");const tt=(je.tags||[]).map(Wt=>typeof Wt=="string"?Wt.trim().toLowerCase():"").filter(Wt=>!!Wt&&!ee.includes(Wt));we(tt),We("");const Ut=Array.isArray(je.beneficiaries)?je.beneficiaries:[];wt(vu(Ut,Xr)),Z?.(je)},[ee,Xr,Z]),Rn=()=>{$r(null),Qe(0)},ms=()=>{He&&URL.revokeObjectURL(He),kt(null),nr(null),Ue(null),st(null),Er(null),ha(!1)},da="p-2 rounded-lg hover:bg-[var(--hrk-bg-surface-raised)] text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-text-primary)] transition-colors disabled:opacity-50";return t.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--hrk-bg-surface-sunken)] text-white",children:[t.jsx("header",{className:"shrink-0 border-b border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface-sunken)]",style:Ge?{paddingTop:"env(safe-area-inset-top, 0px)"}:void 0,children:t.jsxs("div",{className:"mx-auto flex max-w-screen-2xl items-center gap-2 sm:gap-3 px-3 sm:px-6 py-2.5",children:[t.jsx("button",{type:"button",onClick:o,disabled:sr,className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--hrk-text-tertiary)] hover:bg-[var(--hrk-bg-surface)] hover:text-[var(--hrk-text-primary)] disabled:opacity-50 shrink-0","aria-label":"Back",children:t.jsx(W.ArrowLeft,{className:"h-5 w-5"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h1",{className:"text-sm sm:text-base font-semibold text-white truncate",children:Fe}),t.jsxs("p",{className:"text-[11px] text-[var(--hrk-text-tertiary)] truncate flex items-center gap-2",children:[l&&t.jsxs("span",{children:["Posting as @",l]}),pe&&yu&&t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":!0,className:"text-[var(--hrk-text-tertiary)]",children:"•"}),t.jsxs("span",{className:"inline-flex items-center gap-1 text-[var(--hrk-success)]",children:[t.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--hrk-success)]"}),"Draft saved"]}),t.jsx("button",{type:"button",onClick:ft,className:"text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-danger)] underline-offset-2 hover:underline",children:"Clear"})]})]})]}),l&&t.jsx(F4,{account:l,size:32,className:"hidden sm:block"}),q&&t.jsxs("button",{type:"button",onClick:()=>{ta()},disabled:Aa||Tr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] px-2.5 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-hover)] disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:"Save as draft","aria-label":"Save as draft",children:[Aa?t.jsx("span",{className:"h-3.5 w-3.5 rounded-full border-2 border-current border-t-transparent animate-spin"}):t.jsx(W.Save,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"hidden sm:inline",children:Aa?"Saving…":"Save draft"})]}),F!==void 0&&t.jsxs("div",{className:"relative shrink-0",children:[t.jsxs("button",{type:"button",onClick:()=>xn(je=>!je),disabled:Tr,"aria-haspopup":"menu","aria-expanded":pr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] px-2.5 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-hover)] disabled:opacity-40 disabled:cursor-not-allowed",title:"Load or save post templates","aria-label":"Templates",children:[t.jsx(W.FileText,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"hidden sm:inline",children:"Templates"}),t.jsx(W.ChevronDown,{className:`h-3 w-3 transition-transform ${pr?"rotate-180":""}`})]}),pr&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>xn(!1),"aria-hidden":"true"}),t.jsxs("div",{role:"menu",className:"absolute right-0 z-50 mt-1 w-52 overflow-hidden rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] py-1 shadow-xl",children:[t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{xn(!1),ya("list"),dn(!0)},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-hover)]",children:[t.jsx(W.FolderOpen,{className:"h-3.5 w-3.5 text-[var(--hrk-brand)]"}),t.jsx("span",{children:"Load a template"})]}),t.jsxs("button",{type:"button",role:"menuitem",disabled:!St,onClick:()=>{xn(!1),ya("save"),dn(!0)},title:St?"Save the current post as a template":"Write something first to save a template",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:[t.jsx(W.Save,{className:"h-3.5 w-3.5 text-[var(--hrk-brand)]"}),t.jsx("span",{children:"Save as template"})]})]})]})]}),t.jsx("button",{type:"button",onClick:ot,disabled:!vt,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--hrk-brand)] px-3 sm:px-4 py-1.5 sm:py-2 text-sm font-semibold text-white hover:bg-[var(--hrk-brand-active)] disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:Tr?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"h-3.5 w-3.5 rounded-full border-2 border-white border-t-transparent animate-spin"}),t.jsx("span",{children:hr?"Saving…":"Posting…"})]}):t.jsxs(t.Fragment,{children:[t.jsx(W.Send,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:hr?Re:ye})]})})]})}),$&&$.length>0&&t.jsx("div",{className:"shrink-0 border-b border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface-sunken)] px-4 py-2",children:t.jsxs("div",{className:"mx-auto flex max-w-screen-2xl flex-wrap items-center gap-2",children:[t.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-[var(--hrk-text-tertiary)]",children:"Publish to"}),t.jsx("div",{className:"inline-flex flex-wrap gap-1.5",children:$.map(je=>{const tt=la===je.id;return t.jsxs("button",{type:"button",onClick:()=>Zr(je.id),"aria-pressed":tt,className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${tt?"border-[var(--hrk-brand)] bg-[var(--hrk-brand)] text-white":"border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-brand)]/60"}`,children:[je.avatarUrl&&t.jsx("img",{src:je.avatarUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-full object-cover"}),je.label]},je.id)})})]})}),(xa||Ve)&&t.jsx("div",{className:"shrink-0 border-b border-[var(--hrk-warning)]/40 bg-[var(--hrk-warning-soft)] px-4 py-1.5 text-center",children:t.jsx("span",{className:"text-xs font-medium text-[var(--hrk-warning)] animate-pulse",children:ct})}),t.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto lg:overflow-hidden",children:t.jsxs("div",{className:"mx-auto max-w-screen-2xl flex flex-col lg:flex-row lg:h-full",children:[t.jsxs("section",{className:"relative flex flex-col border-b lg:border-b-0 lg:border-r border-[var(--hrk-border-subtle)] lg:flex-1 lg:min-h-0 lg:overflow-y-auto",onDragEnter:Os,onDragLeave:fs,onDragOver:to,onDrop:Rs,children:[jt&&wr&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center border-2 border-dashed border-[var(--hrk-info)] bg-[var(--hrk-info-soft)]",children:t.jsx("div",{className:"rounded-[10px] bg-[var(--hrk-bg-surface-sunken)] px-4 py-2 text-sm text-[var(--hrk-info)] shadow-lg",children:"Drop image to upload"})}),Xt&&!Ft&&t.jsxs("button",{type:"button",onClick:()=>Ot(!0),className:"sticky top-0 z-10 flex items-center gap-3 border-b border-[var(--hrk-info)]/30 bg-[var(--hrk-bg-app)] px-3 sm:px-6 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-surface)]",children:[t.jsxs("span",{className:"flex items-center gap-2 shrink-0 text-[var(--hrk-info)]",children:[t.jsx("span",{className:"h-2 w-2 rounded-full bg-[var(--hrk-info)] animate-pulse"}),"Uploading video"]}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("div",{className:"h-1.5 w-full rounded-full bg-[var(--hrk-bg-surface-raised)]/70 overflow-hidden",children:t.jsx("div",{className:"h-full rounded-full bg-[var(--hrk-info)] transition-all duration-300",style:{width:`${Xt.percentage}%`}})})}),t.jsxs("span",{className:"shrink-0 tabular-nums text-blue-200",children:[Xt.percentage.toFixed(0),"%"]}),t.jsx("span",{className:"shrink-0 text-[var(--hrk-text-tertiary)] underline-offset-2 hover:underline",children:"Show"})]}),t.jsxs("div",{className:"px-3 sm:px-6 py-4 space-y-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1",children:Jt}),cr&&t.jsxs("div",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-[var(--hrk-text-secondary)]",children:[t.jsxs("span",{children:[Dr,":"]}),t.jsx("button",{type:"button",role:"switch","aria-checked":$t,"aria-label":`${Dr} ${$t?"on":"off"}`,onClick:je=>{je.preventDefault(),je.stopPropagation(),Ar(tt=>!tt)},disabled:sr,className:`relative inline-flex h-5 w-9 cursor-pointer items-center rounded-full transition-colors ${$t?"bg-[var(--hrk-info)]":"bg-[var(--hrk-bg-hover)]"} disabled:cursor-not-allowed disabled:opacity-50`,children:t.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ${$t?"translate-x-4":"translate-x-0.5"}`})}),t.jsx("span",{className:`font-medium ${$t?"text-[var(--hrk-info)]":"text-[var(--hrk-text-tertiary)]"}`,children:$t?"yes":"no"})]})]}),t.jsx("input",{type:"text",value:Nt,onChange:je=>br(je.target.value.slice(0,hB)),placeholder:"Title",disabled:sr,className:"w-full bg-transparent text-2xl sm:text-3xl font-semibold text-white placeholder-[var(--hrk-text-tertiary)] outline-none border-b border-[var(--hrk-border-subtle)] pb-2 focus:border-[var(--hrk-info)] transition-colors"}),dr,t.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 border-b border-[var(--hrk-border-subtle)] pb-2",children:[t.jsx("button",{type:"button",onClick:()=>yn("**","**"),className:da,title:"Bold",disabled:sr,children:t.jsx(W.Bold,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>yn("*","*"),className:da,title:"Italic",disabled:sr,children:t.jsx(W.Italic,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>yn("[","](url)"),className:da,title:"Link",disabled:sr,children:t.jsx(W.Link,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:Xa,className:da,title:"Code block",disabled:sr,children:t.jsx(W.Code,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:_s,className:da,title:"Mention",disabled:sr,children:t.jsx(W.AtSign,{className:"h-4 w-4"})}),t.jsx("div",{className:"w-px h-5 bg-[var(--hrk-bg-surface-raised)] mx-1"}),wr&&t.jsx(Jk,{onImageUploaded:je=>qa(`![Image](${je})
1404
+ ${et}`),je=mB(je),je},[Ct,Nr,Ht,et]),Me=T.useMemo(()=>{const je=O8(Ct),tt=O8(et),Ut=new Set,Wt=[];for(const Gt of[...je,...tt]){const ir=`${Gt.lat.toFixed(6)}|${Gt.lng.toFixed(6)}`;Ut.has(ir)||(Ut.add(ir),Wt.push(Gt))}return Wt},[Ct,et]),At=T.useMemo(()=>{if(!Ht)return null;const je=Ht.match(/[?&]v=([^&\s/?#]+)\/([^&\s/?#]+)/);return je?{author:je[1],permlink:je[2]}:null},[Ht]),mr=T.useMemo(()=>{if(!fn.trim()||!bi)return"";try{let je=bi(fn);const tt=!!At,Ut=Wt=>{if(tt)return"";const Gt=Wt.indexOf("/");if(Gt<1)return"";const ir=Wt.slice(0,Gt),Vr=Wt.slice(Gt+1);return`<div class="threeSpeakEmbed" data-author="${ir}" data-permlink="${Vr}"></div>`};return je=je.replace(/<iframe\s[^>]*src="https:\/\/(?:play\.)?3speak\.tv\/embed\?v=([^"&]+\/[^"&]+)[^"]*"[^>]*>(?:<\/iframe>)?/gi,(Wt,Gt)=>Ut(Gt)),je=je.replace(/<a\s[^>]*href="https:\/\/(?:play\.)?3speak\.tv\/embed\?v=([^"&]+\/[^"&]+)[^"]*"[^>]*>[^<]*<\/a>/gi,(Wt,Gt)=>Ut(Gt)),je=je.replace(/<iframe\s[^>]*src="(https:\/\/audio\.3speak\.tv\/play\?[^"]*)"[^>]*>(?:<\/iframe>)?/gi,(Wt,Gt)=>{let ir=Gt;return ir.includes("mode=minimal")||(ir+="&mode=minimal"),ir.includes("iframe=1")||(ir+="&iframe=1"),`<div class="audioWrapper"><iframe src="${ir}" scrolling="no" frameborder="0" allow="autoplay"></iframe></div>`}),je=je.replace(/<img\s([^>]*?)alt="([^"]+)"([^>]*?)\/?\s*>/gi,(Wt,Gt,ir,Vr)=>`<figure class="hive-img-figure">${`<img ${Gt}alt="${ir}"${Vr}>`}<figcaption>${ir}</figcaption></figure>`),je}catch{return""}},[fn,bi,At]),Ir=T.useRef(null);T.useEffect(()=>{const je=Ir.current;if(!je)return;const tt=Ut=>{const Wt=Ut.target;if(Wt.tagName!=="IMG"||Wt.dataset.fallbackAttempted)return;Wt.dataset.fallbackAttempted="true";const Gt=Wt.getAttribute("src")||"",ir=[/^https:\/\/images\.hive\.blog\/\d+x\d+\//,/^https:\/\/images\.hive\.blog\/DQm[^/]*\//,/^https:\/\/images\.ecency\.com\/\d+x\d+\//,/^https:\/\/ipfs\.io\/ipfs\//,/^https:\/\/ipfs\.3speak\.tv\/ipfs\//];for(const Lr of ir)if(Lr.test(Gt)){const Va=Gt.replace(Lr,"");if(Va.startsWith("http")){Wt.src=Va;return}}Wt.style.display="none";const Vr=Wt.closest("figure")?.querySelector("figcaption");Vr&&(Vr.style.display="none")};return je.addEventListener("error",tt,!0),()=>je.removeEventListener("error",tt,!0)},[mr]),T.useLayoutEffect(()=>{const je=Ir.current;if(!je)return;const tt=!!At,Ut=Vr=>{if(!Vr)return null;const Lr=Vr.match(/[?&]v=([^&\s/?#]+)\/([^&\s/?#]+)/i);return Lr?{author:Lr[1],permlink:Lr[2]}:null},Wt=Vr=>Vr?/https?:\/\/(?:play\.)?3speak\.tv\/(?:embed|watch)\?/i.test(Vr):!1,Gt=[];if(je.querySelectorAll('.threeSpeakEmbed:not([data-mounted="1"])').forEach(Vr=>{if(tt){Vr.remove();return}const{author:Lr,permlink:Va}=Vr.dataset;Lr&&Va&&Gt.push({el:Vr,author:Lr,permlink:Va})}),je.querySelectorAll("iframe").forEach(Vr=>{const Lr=Vr.getAttribute("src");if(!Wt(Lr))return;if(tt){Vr.remove();return}const Va=Ut(Lr);if(!Va)return;const qn=document.createElement("div");qn.className="threeSpeakEmbed",qn.dataset.author=Va.author,qn.dataset.permlink=Va.permlink,Vr.replaceWith(qn),Gt.push({el:qn,...Va})}),je.querySelectorAll("a").forEach(Vr=>{const Lr=Vr.getAttribute("href");if(!Wt(Lr))return;if(tt){Vr.remove();return}const Va=Ut(Lr);if(!Va)return;const qn=document.createElement("div");qn.className="threeSpeakEmbed",qn.dataset.author=Va.author,qn.dataset.permlink=Va.permlink,Vr.replaceWith(qn),Gt.push({el:qn,...Va})}),Gt.length===0)return;const ir=[];return Gt.forEach(({el:Vr,author:Lr,permlink:Va})=>{Vr.dataset.mounted="1";const qn=sC.createRoot(Vr);qn.render(t.jsx(bm,{author:Lr,permlink:Va,hideThumbnail:!0})),ir.push(qn)}),()=>{queueMicrotask(()=>{ir.forEach(Vr=>{try{Vr.unmount()}catch{}})})}},[mr,At]),T.useEffect(()=>{const je=Ir.current;if(!je)return;const tt=Ut=>{if(Ut.defaultPrevented||Ut.button!==0||Ut.metaKey||Ut.ctrlKey||Ut.shiftKey||Ut.altKey)return;const Wt=Ut.target?.closest("a");if(!Wt)return;const Gt=Wt.getAttribute("href");if(!Gt)return;const ir=Cg(Gt);if(ir){if(ir.kind==="post"&&oe){Ut.preventDefault(),oe(ir.author,ir.permlink);return}if(ir.kind==="user"&&Pe){Ut.preventDefault(),Pe(ir.author);return}}/^https?:\/\//i.test(Gt)&&(Ut.preventDefault(),window.open(Gt,"_blank","noopener,noreferrer"))};return je.addEventListener("click",tt),()=>je.removeEventListener("click",tt)},[mr,oe,Pe]);const wa=T.useMemo(()=>fn.trim().split(/\s+/).filter(Boolean).length,[fn]),$n=Math.max(1,Math.round(wa/220)),[ls,xi]=T.useState(!1),[yu,Pi]=T.useState(null),hs=T.useRef(b);T.useEffect(()=>{if(!pe||ls){pe||xi(!0);return}try{const je=localStorage.getItem(pe);if(je){const tt=JSON.parse(je);if(typeof tt.title=="string"&&br(tt.title),typeof tt.description=="string"&&yt(tt.description),typeof tt.body=="string"&&bt(tt.body),Array.isArray(tt.userTags)){const Ut=new Set,Wt=[],Gt=ir=>{const Vr=ir.trim().toLowerCase();!Vr||Ut.has(Vr)||ee.includes(Vr)||(Ut.add(Vr),Wt.push(Vr))};for(const ir of m??[])Gt(ir);for(const ir of tt.userTags)Gt(ir);we(Wt)}tt.reward&&aa(tt.reward),Array.isArray(tt.beneficiaries)&&wt(tt.beneficiaries),tt.audioEmbedUrl!==void 0&&$r(tt.audioEmbedUrl),typeof tt.audioDuration=="number"&&Qe(tt.audioDuration),tt.videoEmbedUrl!==void 0&&kt(tt.videoEmbedUrl),tt.videoUploadUrl!==void 0&&nr(tt.videoUploadUrl),tt.videoAspectRatio!==void 0&&Ue(tt.videoAspectRatio),tt.pollData!==void 0&&It(tt.pollData)}}catch{}xi(!0)},[pe]),T.useEffect(()=>{if(!pe||!ls)return;const je=!Nt.trim()&&!_t.trim()&&!Ct.trim()&&ie.length===0&&!Nr&&!Ht&&!Zt&&$e.length===0,tt=setTimeout(()=>{try{if(je)localStorage.removeItem(pe),Pi(null);else{const Ut={title:Nt,description:_t,body:Ct,userTags:ie,reward:jr,beneficiaries:$e,audioEmbedUrl:Nr,audioDuration:sa,videoEmbedUrl:Ht,videoUploadUrl:Mt,videoAspectRatio:ke,pollData:Zt};localStorage.setItem(pe,JSON.stringify(Ut)),Pi(Date.now())}}catch{}},500);return()=>clearTimeout(tt)},[pe,ls,Nt,_t,Ct,ie,jr,$e,Nr,sa,Ht,Mt,ke,Zt]);const he=T.useCallback(()=>{if(pe)try{localStorage.removeItem(pe)}catch{}br(""),yt(""),bt(""),we([]),We(""),aa(y),wt(vu(hs.current,[])),$r(null),Qe(0),He&&URL.revokeObjectURL(He),kt(null),nr(null),Ue(null),st(null),Er(null),ha(!1),It(null),Kr([]),Pi(null)},[pe,y,He]),ft=T.useCallback(()=>{he()},[he]),vt=Nt.trim().length>0&&Ct.trim().length>0&&!Tr&&(!Ee||!!Zt),St=!!(Nt.trim()||_t.trim()||Ct.trim()),ot=T.useCallback(async()=>{if(vt){xr(!0);try{const je={title:Nt.trim(),description:_t.trim().slice(0,fm),body:fn.trim(),tags:Dt,reward:jr,beneficiaries:vu($e,Xr),poll:Zt,audioEmbedUrl:Nr,videoEmbedUrl:Ht,videoUploadUrl:Mt,videoAspectRatio:ke,videoUploadDetails:hr,hasVideo:!!hr,isNsfw:yr,reblog:cr?$t:!1,appId:$&&$.length>0?la:void 0};if(await Promise.resolve(a(je))===!1)return;he()}catch(je){console.error("[ParentPostComposer] submit error:",je)}finally{xr(!1)}}},[vt,Nt,_t,fn,Dt,jr,$e,mn,Zt,Nr,Ht,Mt,ke,hr,yr,a,he,$t,cr]),Kt={title:Nt.trim(),description:_t.trim().slice(0,fm),body:Ct,tags:Dt,beneficiaries:vu($e,Xr)},ta=T.useCallback(async()=>{if(!(!q||Aa)){Ta(!0);try{await Promise.resolve(q({title:Nt.trim(),description:_t.trim().slice(0,fm),body:Ct,tags:Dt,beneficiaries:vu($e,Xr)})),he(),o?.()}catch(je){console.error("[ParentPostComposer] save draft error:",je)}finally{Ta(!1)}}},[q,Aa,Nt,_t,Ct,Dt,$e,Xr,he,o]),pa=T.useCallback(async(je,tt)=>{if(Y){Pa(!0);try{await Promise.resolve(Y(je,tt))}finally{Pa(!1)}}},[Y]),_a=T.useCallback(async je=>{if(X){Pa(!0);try{await Promise.resolve(X(je))}finally{Pa(!1)}}},[X]),Sa=T.useCallback(je=>{br(je.title||""),yt(je.description||""),bt(je.body||"");const tt=(je.tags||[]).map(Wt=>typeof Wt=="string"?Wt.trim().toLowerCase():"").filter(Wt=>!!Wt&&!ee.includes(Wt));we(tt),We("");const Ut=Array.isArray(je.beneficiaries)?je.beneficiaries:[];wt(vu(Ut,Xr)),Z?.(je)},[ee,Xr,Z]),Rn=()=>{$r(null),Qe(0)},ms=()=>{He&&URL.revokeObjectURL(He),kt(null),nr(null),Ue(null),st(null),Er(null),ha(!1)},da="p-2 rounded-lg hover:bg-[var(--hrk-bg-surface-raised)] text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-text-primary)] transition-colors disabled:opacity-50";return t.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--hrk-bg-surface-sunken)] text-white",children:[t.jsx("header",{className:"shrink-0 border-b border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface-sunken)]",style:Ge?{paddingTop:"env(safe-area-inset-top, 0px)"}:void 0,children:t.jsxs("div",{className:"mx-auto flex max-w-screen-2xl items-center gap-2 sm:gap-3 px-3 sm:px-6 py-2.5",children:[t.jsx("button",{type:"button",onClick:o,disabled:sr,className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--hrk-text-tertiary)] hover:bg-[var(--hrk-bg-surface)] hover:text-[var(--hrk-text-primary)] disabled:opacity-50 shrink-0","aria-label":"Back",children:t.jsx(W.ArrowLeft,{className:"h-5 w-5"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h1",{className:"text-sm sm:text-base font-semibold text-white truncate",children:Fe}),t.jsxs("p",{className:"text-[11px] text-[var(--hrk-text-tertiary)] truncate flex items-center gap-2",children:[l&&t.jsxs("span",{children:["Posting as @",l]}),pe&&yu&&t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":!0,className:"text-[var(--hrk-text-tertiary)]",children:"•"}),t.jsxs("span",{className:"inline-flex items-center gap-1 text-[var(--hrk-success)]",children:[t.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--hrk-success)]"}),"Draft saved"]}),t.jsx("button",{type:"button",onClick:ft,className:"text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-danger)] underline-offset-2 hover:underline",children:"Clear"})]})]})]}),l&&t.jsx(F4,{account:l,size:32,className:"hidden sm:block"}),q&&t.jsxs("button",{type:"button",onClick:()=>{ta()},disabled:Aa||Tr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] px-2.5 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-hover)] disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:"Save as draft","aria-label":"Save as draft",children:[Aa?t.jsx("span",{className:"h-3.5 w-3.5 rounded-full border-2 border-current border-t-transparent animate-spin"}):t.jsx(W.Save,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"hidden sm:inline",children:Aa?"Saving…":"Save draft"})]}),F!==void 0&&t.jsxs("div",{className:"relative shrink-0",children:[t.jsxs("button",{type:"button",onClick:()=>xn(je=>!je),disabled:Tr,"aria-haspopup":"menu","aria-expanded":pr,className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] px-2.5 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-hover)] disabled:opacity-40 disabled:cursor-not-allowed",title:"Load or save post templates","aria-label":"Templates",children:[t.jsx(W.FileText,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"hidden sm:inline",children:"Templates"}),t.jsx(W.ChevronDown,{className:`h-3 w-3 transition-transform ${pr?"rotate-180":""}`})]}),pr&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>xn(!1),"aria-hidden":"true"}),t.jsxs("div",{role:"menu",className:"absolute right-0 z-50 mt-1 w-52 overflow-hidden rounded-lg border border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface-raised)] py-1 shadow-xl",children:[t.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{xn(!1),ya("list"),dn(!0)},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-hover)]",children:[t.jsx(W.FolderOpen,{className:"h-3.5 w-3.5 text-[var(--hrk-brand)]"}),t.jsx("span",{children:"Load a template"})]}),t.jsxs("button",{type:"button",role:"menuitem",disabled:!St,onClick:()=>{xn(!1),ya("save"),dn(!0)},title:St?"Save the current post as a template":"Write something first to save a template",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:[t.jsx(W.Save,{className:"h-3.5 w-3.5 text-[var(--hrk-brand)]"}),t.jsx("span",{children:"Save as template"})]})]})]})]}),t.jsx("button",{type:"button",onClick:ot,disabled:!vt,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--hrk-brand)] px-3 sm:px-4 py-1.5 sm:py-2 text-sm font-semibold text-white hover:bg-[var(--hrk-brand-active)] disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:Tr?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"h-3.5 w-3.5 rounded-full border-2 border-white border-t-transparent animate-spin"}),t.jsx("span",{children:hr?"Saving…":"Posting…"})]}):t.jsxs(t.Fragment,{children:[t.jsx(W.Send,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:hr?Re:ye})]})})]})}),$&&$.length>0&&t.jsx("div",{className:"shrink-0 border-b border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface-sunken)] px-4 py-2",children:t.jsxs("div",{className:"mx-auto flex max-w-screen-2xl flex-wrap items-center gap-2",children:[t.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-[var(--hrk-text-tertiary)]",children:"Publish to"}),t.jsx("div",{className:"inline-flex flex-wrap gap-1.5",children:$.map(je=>{const tt=la===je.id;return t.jsxs("button",{type:"button",onClick:()=>Zr(je.id),"aria-pressed":tt,title:je.label,className:`inline-flex items-center gap-1.5 rounded-full border transition-colors ${tt?"border-[var(--hrk-brand)] bg-[var(--hrk-brand)] text-white px-2.5 py-1 text-xs font-medium":"border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-brand)]/60 p-1.5"}`,children:[je.avatarUrl&&t.jsx("img",{src:je.avatarUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-full object-cover"}),tt&&je.label]},je.id)})})]})}),(xa||Ve)&&t.jsx("div",{className:"shrink-0 border-b border-[var(--hrk-warning)]/40 bg-[var(--hrk-warning-soft)] px-4 py-1.5 text-center",children:t.jsx("span",{className:"text-xs font-medium text-[var(--hrk-warning)] animate-pulse",children:ct})}),t.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto lg:overflow-hidden",children:t.jsxs("div",{className:"mx-auto max-w-screen-2xl flex flex-col lg:flex-row lg:h-full",children:[t.jsxs("section",{className:"relative flex flex-col border-b lg:border-b-0 lg:border-r border-[var(--hrk-border-subtle)] lg:flex-1 lg:min-h-0 lg:overflow-y-auto",onDragEnter:Os,onDragLeave:fs,onDragOver:to,onDrop:Rs,children:[jt&&wr&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center border-2 border-dashed border-[var(--hrk-info)] bg-[var(--hrk-info-soft)]",children:t.jsx("div",{className:"rounded-[10px] bg-[var(--hrk-bg-surface-sunken)] px-4 py-2 text-sm text-[var(--hrk-info)] shadow-lg",children:"Drop image to upload"})}),Xt&&!Ft&&t.jsxs("button",{type:"button",onClick:()=>Ot(!0),className:"sticky top-0 z-10 flex items-center gap-3 border-b border-[var(--hrk-info)]/30 bg-[var(--hrk-bg-app)] px-3 sm:px-6 py-2 text-left text-xs text-[var(--hrk-text-primary)] transition-colors hover:bg-[var(--hrk-bg-surface)]",children:[t.jsxs("span",{className:"flex items-center gap-2 shrink-0 text-[var(--hrk-info)]",children:[t.jsx("span",{className:"h-2 w-2 rounded-full bg-[var(--hrk-info)] animate-pulse"}),"Uploading video"]}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("div",{className:"h-1.5 w-full rounded-full bg-[var(--hrk-bg-surface-raised)]/70 overflow-hidden",children:t.jsx("div",{className:"h-full rounded-full bg-[var(--hrk-info)] transition-all duration-300",style:{width:`${Xt.percentage}%`}})})}),t.jsxs("span",{className:"shrink-0 tabular-nums text-blue-200",children:[Xt.percentage.toFixed(0),"%"]}),t.jsx("span",{className:"shrink-0 text-[var(--hrk-text-tertiary)] underline-offset-2 hover:underline",children:"Show"})]}),t.jsxs("div",{className:"px-3 sm:px-6 py-4 space-y-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1",children:Jt}),cr&&t.jsxs("div",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-[var(--hrk-text-secondary)]",children:[t.jsxs("span",{children:[Dr,":"]}),t.jsx("button",{type:"button",role:"switch","aria-checked":$t,"aria-label":`${Dr} ${$t?"on":"off"}`,onClick:je=>{je.preventDefault(),je.stopPropagation(),Ar(tt=>!tt)},disabled:sr,className:`relative inline-flex h-5 w-9 cursor-pointer items-center rounded-full transition-colors ${$t?"bg-[var(--hrk-info)]":"bg-[var(--hrk-bg-hover)]"} disabled:cursor-not-allowed disabled:opacity-50`,children:t.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ${$t?"translate-x-4":"translate-x-0.5"}`})}),t.jsx("span",{className:`font-medium ${$t?"text-[var(--hrk-info)]":"text-[var(--hrk-text-tertiary)]"}`,children:$t?"yes":"no"})]})]}),t.jsx("input",{type:"text",value:Nt,onChange:je=>br(je.target.value.slice(0,hB)),placeholder:"Title",disabled:sr,className:"w-full bg-transparent text-2xl sm:text-3xl font-semibold text-white placeholder-[var(--hrk-text-tertiary)] outline-none border-b border-[var(--hrk-border-subtle)] pb-2 focus:border-[var(--hrk-info)] transition-colors"}),dr,t.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 border-b border-[var(--hrk-border-subtle)] pb-2",children:[t.jsx("button",{type:"button",onClick:()=>yn("**","**"),className:da,title:"Bold",disabled:sr,children:t.jsx(W.Bold,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>yn("*","*"),className:da,title:"Italic",disabled:sr,children:t.jsx(W.Italic,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>yn("[","](url)"),className:da,title:"Link",disabled:sr,children:t.jsx(W.Link,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:Xa,className:da,title:"Code block",disabled:sr,children:t.jsx(W.Code,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:_s,className:da,title:"Mention",disabled:sr,children:t.jsx(W.AtSign,{className:"h-4 w-4"})}),t.jsx("div",{className:"w-px h-5 bg-[var(--hrk-bg-surface-raised)] mx-1"}),wr&&t.jsx(Jk,{onImageUploaded:je=>qa(`![Image](${je})
1405
1405
  `),ecencyToken:v,onSignMessage:N,signingUsername:D,onSigningStateChange:Ya,walletApprovalLabel:ct,disabled:sr}),!J&&z&&t.jsx(Qk,{onAudioUploaded:(je,tt)=>{$r(je),Qe(tt)},username:l,threeSpeakApiKey:z,disabled:sr||!!Nr}),!G&&t.jsx("button",{type:"button",onClick:()=>Ka(!0),className:da,title:"Emoji",disabled:sr,children:t.jsx(W.Smile,{className:"h-4 w-4"})}),!de&&M&&t.jsx("button",{type:"button",onClick:()=>Qr(!0),className:`${da} text-xs font-bold px-2`,title:"GIF",disabled:sr,children:"GIF"}),!ce&&E&&t.jsx("button",{type:"button",onClick:()=>Ma(!0),className:da,title:"Insert YouTube video",disabled:sr,children:t.jsx("span",{className:"inline-flex h-4 w-[22px] items-center justify-center rounded-sm bg-[#ff0000]",children:t.jsx(W.Play,{className:"h-2.5 w-2.5 fill-white text-white"})})}),!be&&(v||N&&D)&&t.jsx("button",{type:"button",onClick:()=>ja(!0),className:`${da} text-xs font-bold px-2`,title:"Meme",disabled:sr,children:"MEME"}),!xe&&(v||N&&D)&&(()=>{const je=Gv(Yn),tt=bn.length>=je;return t.jsx("button",{type:"button",onClick:()=>Pr(!0),className:da,title:tt?`DecentMemes limit reached (${bn.length}/${je} per post)`:`DecentMemes (${bn.length}/${je})`,disabled:sr||tt,children:t.jsx("img",{src:"https://decentmemes.com/svg/DM.svg",alt:"DecentMemes",className:"h-4 w-4",draggable:!1})})})(),!te&&P&&En.length>0&&t.jsx("button",{type:"button",onClick:()=>jn(!0),className:da,title:"Insert template",disabled:sr,children:t.jsx(W.FileText,{className:"h-4 w-4"})}),!ne&&t.jsx("button",{type:"button",onClick:()=>Ga(!0),className:`${da} ${Zt?"text-[var(--hrk-info)]":""}`,title:Zt?"Edit poll":"Create poll",disabled:sr,children:t.jsx(W.BarChart3,{className:"h-4 w-4"})}),t.jsx("div",{className:"w-px h-5 bg-[var(--hrk-bg-surface-raised)] mx-1"}),!ge&&t.jsxs("span",{className:"text-xs text-[var(--hrk-text-tertiary)] ml-1 hidden sm:inline",children:[Dt.length,"/",x]}),!_e&&t.jsx("button",{ref:_r,type:"button",onClick:Or,className:`${da} ${jr!=="default"?"text-[var(--hrk-info)]":""}`,title:`Rewards: ${Fv[jr]}`,disabled:sr,children:t.jsx(W.Coins,{className:"h-4 w-4"})}),!Ce&&t.jsx("button",{type:"button",onClick:()=>xt(!0),className:`${da} ${$e.length>0?"text-[var(--hrk-info)]":""}`,title:$e.length>0?`Beneficiaries (${$e.length})`:"Add beneficiaries",disabled:sr,children:t.jsx(W.Users,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>Zn(!0),className:da,title:"What does each button do?",children:t.jsx(W.HelpCircle,{className:"h-4 w-4"})})]}),Nr&&t.jsxs("div",{className:"rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] overflow-hidden",children:[t.jsx("div",{className:"relative",style:{height:"60px",overflow:"hidden"},children:t.jsx("iframe",{src:Nr,title:"Audio preview",className:"w-full border-0 absolute top-0 left-0",style:{height:"200px"},allow:"autoplay; encrypted-media",loading:"lazy"})}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-[var(--hrk-border-subtle)] px-3 py-1.5",children:[t.jsxs("span",{className:"flex-1 truncate text-xs text-[var(--hrk-text-tertiary)]",children:["Audio attached",sa>0&&` (${Math.floor(sa/60)}:${String(sa%60).padStart(2,"0")})`]}),t.jsx("button",{type:"button",onClick:Rn,className:"shrink-0 rounded p-1.5 text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-danger)] hover:bg-[var(--hrk-bg-surface-raised)]",title:"Remove audio",children:t.jsx(W.X,{className:"h-4 w-4"})})]})]}),(Ht||hr)&&t.jsxs("div",{className:"rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] overflow-hidden",children:[He?t.jsx("video",{src:He,controls:!0,playsInline:!0,preload:"metadata",className:"w-full",style:{maxHeight:"240px"}}):t.jsx("div",{className:"h-20 flex items-center justify-center text-[var(--hrk-text-tertiary)] text-xs",children:"Video attached"}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-[var(--hrk-border-subtle)] px-3 py-1.5",children:[t.jsx("span",{className:"flex-1 truncate text-xs text-[var(--hrk-text-tertiary)]",children:hr?t.jsxs(t.Fragment,{children:[hr.originalFilename," ·"," ",(hr.fileSize/(1024*1024)).toFixed(1)," MB",hr.videoDuration>0&&t.jsxs(t.Fragment,{children:[" · ",Math.floor(hr.videoDuration/60),":",String(hr.videoDuration%60).padStart(2,"0")]})]}):"Video attached"}),t.jsx("button",{type:"button",onClick:ms,className:"shrink-0 rounded p-1 text-[var(--hrk-text-tertiary)] hover:text-[var(--hrk-danger)]",title:"Remove video",children:t.jsx(W.X,{className:"h-3.5 w-3.5"})})]}),t.jsxs("label",{className:"flex items-start gap-2 border-t border-[var(--hrk-border-subtle)] px-3 py-2 text-xs text-[var(--hrk-text-secondary)] cursor-pointer hover:bg-[var(--hrk-bg-surface)]/40",children:[t.jsx("input",{type:"checkbox",checked:yr,onChange:je=>ha(je.target.checked),className:"mt-0.5 h-3.5 w-3.5 rounded border-[var(--hrk-border-default)] bg-[var(--hrk-bg-app)] text-[var(--hrk-brand)] focus:ring-[var(--hrk-brand)]"}),t.jsxs("span",{children:["Mark this video as ",t.jsx("span",{className:"text-[var(--hrk-danger)] font-medium",children:"NSFW"}),t.jsx("span",{className:"block text-[10px] text-[var(--hrk-text-tertiary)]",children:"Hidden behind a content warning on 3Speak."})]})]})]}),Ee&&!Zt&&t.jsxs("button",{type:"button",onClick:()=>Ga(!0),className:"w-full flex items-center justify-between gap-2 rounded-lg border border-[var(--hrk-warning)]/40 bg-[var(--hrk-warning-soft)] px-3 py-2 text-left text-xs text-[var(--hrk-warning)] hover:bg-[var(--hrk-warning-soft)]",children:[t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(W.BarChart3,{className:"h-4 w-4 shrink-0"}),"A poll is required for this post — tap to add one."]}),t.jsx("span",{className:"rounded bg-[var(--hrk-warning-soft)] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide",children:"Required"})]}),Zt&&t.jsx("div",{className:"rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] overflow-hidden",children:t.jsxs("div",{className:"px-3 py-2",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[t.jsx(W.BarChart3,{className:"h-3.5 w-3.5 shrink-0 text-[var(--hrk-info)]"}),t.jsx("span",{className:"flex-1 truncate text-xs font-medium text-white",children:Zt.question}),t.jsx("button",{type:"button",onClick:()=>Ga(!0),className:"shrink-0 rounded p-0.5 text-[var(--hrk-text-tertiary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-text-primary)]",title:"Edit poll",children:t.jsx(W.Code,{className:"h-3.5 w-3.5"})}),t.jsx("button",{type:"button",onClick:()=>It(null),className:"shrink-0 rounded p-0.5 text-[var(--hrk-text-tertiary)] hover:bg-[var(--hrk-bg-surface-raised)] hover:text-[var(--hrk-danger)]",title:"Remove poll",children:t.jsx(W.X,{className:"h-3.5 w-3.5"})})]}),Zt.description&&t.jsx("p",{className:"mb-1.5 text-[11px] text-[var(--hrk-text-tertiary)] italic line-clamp-2",children:Zt.description}),t.jsx("div",{className:"flex flex-wrap gap-1",children:Zt.choices.map((je,tt)=>t.jsx("span",{className:"rounded-full bg-[var(--hrk-bg-surface-raised)] px-2 py-0.5 text-xs text-[var(--hrk-text-secondary)]",children:je},tt))}),(Zt.preferred_interpretation||Zt.community_restricted||Zt.max_choices_voted>1)&&t.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5 text-[10px]",children:[Zt.preferred_interpretation&&t.jsx("span",{className:"rounded bg-[var(--hrk-info)]/15 px-1.5 py-0.5 text-[var(--hrk-info)]",children:Zt.preferred_interpretation.replace(/_/g," ")}),Zt.max_choices_voted>1&&t.jsxs("span",{className:"rounded bg-[var(--hrk-success-soft)] px-1.5 py-0.5 text-[var(--hrk-success)]",children:["multi-choice ×",Zt.max_choices_voted]}),Zt.community_restricted&&t.jsx("span",{className:"rounded bg-[var(--hrk-warning-soft)] px-1.5 py-0.5 text-[var(--hrk-warning)]",children:"community-restricted"})]})]})}),t.jsxs("div",{className:"relative",children:[Qt&&t.jsxs("div",{className:"absolute inset-0 z-10 bg-[var(--hrk-bg-app)]/80 rounded-lg flex flex-col items-center justify-center gap-3 p-4 text-center",children:[xa?t.jsx("span",{className:"text-sm text-[var(--hrk-warning)] animate-pulse",children:ct}):t.jsxs("div",{className:"flex items-center gap-2 text-[var(--hrk-info)] text-sm",children:[t.jsx("span",{className:"h-4 w-4 border-2 border-blue-400 border-t-transparent rounded-full animate-spin"}),"Uploading image..."]}),t.jsx("button",{type:"button",onClick:Vs,className:"px-3 py-1 rounded border border-[var(--hrk-border-default)] text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface)] text-xs",children:"Cancel"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("textarea",{ref:Gr,value:Ct,onChange:je=>{bt(je.target.value),Jr.onValueChange(je.target.value,je.target.selectionStart??je.target.value.length)},onKeyUp:je=>{const tt=je.currentTarget;Jr.onValueChange(tt.value,tt.selectionStart??tt.value.length)},onClick:je=>{const tt=je.currentTarget;Jr.onValueChange(tt.value,tt.selectionStart??tt.value.length)},onBlur:()=>{window.setTimeout(()=>Jr.dismiss(),100)},onKeyDown:je=>{if(Jr.onKeyDown(je)&&(je.key==="Enter"||je.key==="Tab")){const tt=Jr.apply();tt&&(bt(tt.value),requestAnimationFrame(()=>{const Ut=Gr.current;Ut&&(Ut.focus(),Ut.setSelectionRange(tt.caret,tt.caret))}))}},onPaste:Hn,placeholder:wr?`Write your post in Markdown…
1406
1406
  (Paste or drag & drop images)`:"Write your post in Markdown…",disabled:sr,rows:20,className:"block w-full h-[480px] sm:h-[560px] lg:h-[640px] p-3 border border-[var(--hrk-border-subtle)] rounded-lg resize-none focus:ring-2 focus:ring-[var(--hrk-info)] focus:border-[var(--hrk-info)] bg-[var(--hrk-bg-surface)] text-white placeholder-[var(--hrk-text-tertiary)] disabled:opacity-50 text-sm font-mono leading-relaxed overflow-y-auto"}),Jr.active&&t.jsx("div",{className:"absolute z-30",style:fT(Gr.current,Jr.match?.end??0),children:t.jsx(hT,{candidates:Jr.candidates,highlightedIndex:Jr.highlightedIndex,onHover:Jr.setHighlightedIndex,onSelect:je=>{const tt=Jr.apply(je);tt&&(bt(tt.value),requestAnimationFrame(()=>{const Ut=Gr.current;Ut&&(Ut.focus(),Ut.setSelectionRange(tt.caret,tt.caret))}))}})})]})]}),!ge&&t.jsxs("div",{className:"rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-app)]/40 p-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2 text-xs text-[var(--hrk-text-tertiary)]",children:[t.jsx(W.Tag,{className:"h-3.5 w-3.5 text-[var(--hrk-text-tertiary)]"}),t.jsx("span",{className:"font-semibold uppercase tracking-wide",children:"Tags"}),t.jsxs("span",{className:"ml-auto",children:[Dt.length," / ",x]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-1 mb-2",children:[ee.map(je=>t.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[var(--hrk-bg-surface-raised)]/70 px-2 py-0.5 text-[11px] text-[var(--hrk-text-primary)]",title:"Default tag — cannot be removed",children:[t.jsx(W.Lock,{className:"h-2.5 w-2.5 text-[var(--hrk-text-tertiary)]"}),je]},`locked-${je}`)),ie.map(je=>t.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[var(--hrk-brand)]/20 px-2 py-0.5 text-[11px] text-blue-200",children:[je,t.jsx("button",{type:"button",onClick:()=>Hr(je),className:"rounded-full p-0.5 text-blue-200 hover:bg-[var(--hrk-brand)]/40 hover:text-[var(--hrk-text-primary)]",disabled:sr,"aria-label":`Remove ${je}`,children:t.jsx(W.X,{className:"h-2.5 w-2.5"})})]},`user-${je}`))]}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("input",{type:"text",value:Ne,onChange:je=>{const tt=je.target.value;if(/[,\s]/.test(tt)){const Ut=tt.split(/[,\s]+/),Wt=Ut.pop()??"";Ut.forEach(Gt=>Gt&&Mr(Gt)),We(Wt);return}We(tt)},onKeyDown:je=>{je.key==="Enter"&&(je.preventDefault(),Mr(Ne),We(""))},placeholder:rr>0?"Add tags (space, comma or Enter)":"Max tags reached",disabled:rr===0||sr,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:"flex-1 rounded border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] px-2 py-1 text-xs text-[var(--hrk-text-primary)] placeholder-[var(--hrk-text-tertiary)] outline-none focus:border-[var(--hrk-info)] disabled:opacity-50"}),t.jsx("button",{type:"button",onClick:()=>{Mr(Ne),We("")},disabled:rr===0||!Ne.trim()||sr,className:"rounded border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-surface)] px-3 py-1 text-xs text-[var(--hrk-text-primary)] hover:bg-[var(--hrk-bg-surface-raised)] disabled:opacity-50",children:"Add"})]})]}),t.jsxs("div",{children:[t.jsx("textarea",{value:_t,onChange:je=>yt(je.target.value.slice(0,fm)),placeholder:"Short description (shown in feeds, max 120 chars)",rows:2,disabled:sr,className:"w-full bg-transparent text-sm text-[var(--hrk-text-primary)] placeholder-[var(--hrk-text-tertiary)] outline-none border-b border-[var(--hrk-border-subtle)] py-2 focus:border-[var(--hrk-info)] transition-colors resize-none"}),t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs("span",{className:`text-[11px] ${_t.length>=fm?"text-[var(--hrk-danger)]":_t.length>fm*.85?"text-[var(--hrk-warning)]":"text-[var(--hrk-text-tertiary)]"}`,children:[_t.length," / ",fm]})})]}),!Ce&&$e.length>0&&t.jsxs("div",{className:"rounded-lg border border-[var(--hrk-border-subtle)] bg-[var(--hrk-bg-app)]/40 p-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2 text-xs text-[var(--hrk-text-tertiary)]",children:[t.jsx(W.Users,{className:"h-3.5 w-3.5 text-[var(--hrk-text-tertiary)]"}),t.jsx("span",{className:"font-semibold uppercase tracking-wide",children:"Beneficiaries"}),t.jsx("button",{type:"button",onClick:()=>xt(!0),className:"ml-auto rounded border border-[var(--hrk-border-subtle)] px-2 py-0.5 text-[11px] text-[var(--hrk-text-secondary)] hover:bg-[var(--hrk-bg-surface)] hover:text-[var(--hrk-info)]",disabled:sr,children:"Edit"})]}),t.jsx("div",{className:"flex flex-wrap items-center gap-1",children:$e.map(je=>{const tt=Xn.includes(je.account),Ut=ve[je.account]??`Auto-attached @${je.account}`;return t.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full pl-0.5 pr-2 py-0.5 text-[11px] ${tt?"bg-[var(--hrk-warning-soft)] text-[var(--hrk-warning)] border border-[var(--hrk-warning)]/40":"bg-[var(--hrk-brand)]/20 text-blue-200 border border-[var(--hrk-info)]/30"}`,title:tt?Ut:void 0,children:[t.jsx(F4,{account:je.account,size:16}),tt&&t.jsx(W.Lock,{className:"h-2.5 w-2.5"}),"@",je.account,t.jsxs("span",{className:"opacity-80",children:[je.weight,"%"]})]},`bene-${je.account}`)})})]})]})]}),t.jsx("section",{className:"bg-[var(--hrk-bg-surface-sunken)] lg:flex-1 lg:min-h-0 lg:overflow-y-auto",children:t.jsxs("div",{className:"px-3 sm:px-6 py-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] uppercase tracking-wide text-[var(--hrk-text-tertiary)]",children:[t.jsx(W.Check,{className:"h-3 w-3 text-[var(--hrk-success)]"}),"Live preview"]}),t.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-[var(--hrk-text-tertiary)]",children:[t.jsxs("span",{className:"rounded-md border border-[var(--hrk-border-subtle)] px-2 py-0.5",children:[$n," min read"]}),t.jsxs("span",{className:"rounded-md border border-[var(--hrk-border-subtle)] px-2 py-0.5",children:[wa," words"]})]})]}),t.jsx("h2",{className:"text-2xl sm:text-3xl font-semibold text-white leading-tight",children:Nt.trim()||"Untitled post"}),_t.trim()&&t.jsx("p",{className:"mt-2 text-sm text-[var(--hrk-text-tertiary)] italic",children:_t.trim()}),l&&t.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-[var(--hrk-text-tertiary)]",children:[t.jsx(F4,{account:l,size:20}),t.jsxs("span",{children:["@",l]}),Dt.length>0&&t.jsxs("span",{className:"ml-auto flex flex-wrap gap-1 justify-end",children:[Dt.slice(0,5).map(je=>t.jsxs("span",{className:"rounded-full bg-[var(--hrk-info-soft)] text-[var(--hrk-info)] px-2 py-0.5 text-[10px]",children:["#",je]},`prev-tag-${je}`)),Dt.length>5&&t.jsxs("span",{className:"text-[10px] text-[var(--hrk-text-tertiary)]",children:["+",Dt.length-5]})]})]}),t.jsxs("div",{className:"mt-4 border-t border-[var(--hrk-border-subtle)] pt-4",children:[At&&t.jsx("div",{className:"flex justify-center pb-3",children:t.jsx(bm,{author:At.author,permlink:At.permlink,hideThumbnail:!0})}),!At&&hr?.isV2&&He&&t.jsx("div",{className:"flex justify-center pb-3",children:t.jsx("video",{src:He,controls:!0,playsInline:!0,preload:"metadata",className:"w-full max-w-xl rounded-lg bg-black",style:{maxHeight:"360px"}})}),t.jsxs("div",{className:"pb-6",children:[mr?t.jsx(Eh,{ref:Ir,className:"hive-post-body",html:mr}):t.jsx("p",{className:"text-[var(--hrk-text-tertiary)] text-sm italic",children:"Your post preview will appear here as you type. Markdown, images, audio and video embeds all render live."}),Me.length>0&&t.jsx("div",{className:"mt-4 flex flex-col gap-3",children:Me.map((je,tt)=>t.jsx(bj,{lat:je.lat,lng:je.lng,description:je.description,height:320},`${je.lat.toFixed(6)}|${je.lng.toFixed(6)}|${tt}`))})]})]})]})})]})}),t.jsx(Kk,{isOpen:On,onClose:()=>Qr(!1),onSelectGif:je=>{qa(`![GIF](${je})`),Qr(!1)},giphyApiKey:M}),t.jsx(ej,{isOpen:kn,onClose:()=>Ma(!1),onSelectVideo:je=>{qa(`
1407
1407
  ${je}
package/dist/index.esm.js CHANGED
@@ -78273,7 +78273,8 @@ ${tt}`), Ne = tj(Ne), Ne;
78273
78273
  type: "button",
78274
78274
  onClick: () => Qr(Ne.id),
78275
78275
  "aria-pressed": rt,
78276
- className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${rt ? "border-[var(--hrk-brand)] bg-[var(--hrk-brand)] text-white" : "border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-brand)]/60"}`,
78276
+ title: Ne.label,
78277
+ className: `inline-flex items-center gap-1.5 rounded-full border transition-colors ${rt ? "border-[var(--hrk-brand)] bg-[var(--hrk-brand)] text-white px-2.5 py-1 text-xs font-medium" : "border-[var(--hrk-border-default)] bg-[var(--hrk-bg-surface)] text-[var(--hrk-text-secondary)] hover:border-[var(--hrk-brand)]/60 p-1.5"}`,
78277
78278
  children: [
78278
78279
  Ne.avatarUrl && /* @__PURE__ */ n(
78279
78280
  "img",
@@ -78283,7 +78284,7 @@ ${tt}`), Ne = tj(Ne), Ne;
78283
78284
  className: "h-4 w-4 shrink-0 rounded-full object-cover"
78284
78285
  }
78285
78286
  ),
78286
- Ne.label
78287
+ rt && Ne.label
78287
78288
  ]
78288
78289
  },
78289
78290
  Ne.id
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "1.8.3",
4
+ "version": "1.8.5",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",