1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[1101],{4141:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(9950),a=r(7119),s=r(9927),i=r(874),l=(r(2078),r(2924)),c=r(4414);function o(e){var t;let{roomId:r,participantId:o,onClose:d}=e;const[u,p]=(0,n.useState)(null),[m,h]=(0,n.useState)(0),f=(0,n.useRef)(0);(0,n.useEffect)((()=>{const e=++f.current;return p(null),s.S.getParticipantProfile(r,o).then((t=>{e===f.current&&p({roomId:r,participantId:o,profile:t})}),(t=>{e===f.current&&p({roomId:r,participantId:o,error:(0,i.KP)(t)})})),()=>{f.current+=1}}),[r,o,m]);const v=(null===u||void 0===u?void 0:u.roomId)===r&&(null===u||void 0===u?void 0:u.participantId)===o?u:null,x=null===v||void 0===v?void 0:v.profile,g=f.current;return(0,a.createPortal)((0,c.jsx)(i.X,{title:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb",onClose:()=>{f.current+=1,d()},children:(0,c.jsx)("div",{className:"talk-participant-profile",children:null!==v&&void 0!==v&&v.error?(0,c.jsx)(i.FT,{onRetry:()=>h((e=>e+1)),children:v.error}):x?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"talk-participant-profile-avatar",children:(0,c.jsx)(i.Yq,{name:x.name,avatarUrl:x.avatarUrl},`${x.id}:${x.avatarUrl}`)}),(0,c.jsx)("h3",{className:"talk-participant-profile-name",children:x.name}),x.isAdminBlocked&&(0,c.jsx)("p",{className:"talk-hint",children:"\u904b\u55b6\u306b\u3088\u308a\u5229\u7528\u505c\u6b62\u4e2d\u306e\u305f\u3081\u3001\u8fd4\u4fe1\u3067\u304d\u307e\u305b\u3093\u3002"}),(0,c.jsx)("p",{className:"talk-participant-profile-description",children:null!==(t=x.description)&&void 0!==t&&t.trim()?x.description:"\u307e\u3060\u7d39\u4ecb\u6587\u304c\u3042\u308a\u307e\u305b\u3093\u3002"}),x.profileId&&(0,c.jsx)(l.A,{profile:x,onChange:e=>{g===f.current&&p({roomId:r,participantId:o,profile:e})}})]}):(0,c.jsx)("p",{className:"talk-muted",role:"status",children:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u2026"})})}),document.body)}},9275:(e,t,r)=>{r.d(t,{A:()=>j});var n=r(9950),a=r(9541),s=r(9927),i=r(8429),l=r(4009),c=r(5940),o=r(1702),d=r(4414);const u="https://img.talelynx.ai/logo/working2.webp",p=e=>e?/^https?:\/\//i.test(e)?e:`${"https://talelynx.ai".trim().replace(/\/$/,"")}/${e.replace(/^\//,"")}`:u;function m(e){var t;let{profile:r,onDetails:n,disabled:a=!1,unavailable:s}=e;return(0,d.jsx)("article",{className:"talk-profile-discover-card",children:(0,d.jsxs)("button",{type:"button",className:"talk-profile-discover-open",disabled:a,onClick:()=>n(r),"aria-label":`${r.name}\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u8a73\u7d30`,children:[(0,d.jsxs)("span",{className:"talk-profile-discover-image",children:[(0,d.jsx)("img",{src:p(r.avatarUrl),alt:"",loading:(0,o.l)(),onError:e=>{e.currentTarget.src!==u?e.currentTarget.src=u:e.currentTarget.style.visibility="hidden"}}),(0,d.jsxs)("span",{className:"talk-profile-discover-badges",children:["public"!==r.visibility&&(0,d.jsx)("span",{children:"\u975e\u516c\u958b"}),r.isAdult&&(0,d.jsx)("span",{children:"R18"}),s&&(0,d.jsx)("span",{children:s})]})]}),(0,d.jsxs)("span",{className:"talk-profile-discover-body",children:[(0,d.jsx)("strong",{className:"talk-profile-discover-name",children:r.name}),(0,d.jsx)("span",{children:(0,d.jsx)(c.A,{target:r.usageTarget||"all"})}),(0,d.jsx)("span",{className:"talk-profile-discover-description",children:r.description||"\u307e\u3060\u7d39\u4ecb\u6587\u304c\u3042\u308a\u307e\u305b\u3093\u3002"}),(null===(t=r.tags)||void 0===t?void 0:t.length)>0&&(0,d.jsx)("span",{className:"talk-profile-discover-tags",children:r.tags.slice(0,3).map((e=>(0,d.jsxs)("span",{children:["#",e]},e)))}),(0,d.jsx)("span",{className:"talk-profile-discover-creator",children:r.creatorName?`\u4f5c\u6210\u8005\uff1a${r.creatorName}`:r.isOwner?"\u30de\u30a4\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb":""})]})]})})}var h=r(6472),f=r(874),v=r(1573);const x=[["public","\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb"],["favorites","\u304a\u6c17\u306b\u5165\u308a"],["mine","\u30de\u30a4\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb"]],g=(e,t)=>String(e)===String(t);function k(e){let{room:t,sharedCharacterId:r,onClose:c,onInvited:o,usageTargetFilter:u,excludeUnspecified:p=!1}=e;
1const k=(0,i.Zp)(),[j,b]=(0,n.useState)("public"),y=(0,n.useMemo)((()=>"public"===j&&["male","female"].includes(u)?{usageTarget:u,excludeUnspecified:p}:{}),[j,u,p]),[S,N]=(0,n.useState)(""),[I,C]=(0,n.useState)(""),[$,w]=(0,n.useState)([]),[A,E]=(0,n.useState)({hasMore:!1,nextOffset:0}),[R,U]=(0,n.useState)(!1),[T,P]=(0,n.useState)(""),[D,F]=(0,n.useState)(0),[L,O]=(0,n.useState)(r||null),[K,Y]=(0,n.useState)(!r),[B,M]=(0,n.useState)(null),[q,_]=(0,n.useState)(""),[H,X]=(0,n.useState)(!1),G=(0,n.useRef)(0),J=(0,n.useRef)(null),V=(0,n.useRef)(!1),z=(0,n.useRef)(!0),Z=(0,n.useRef)(j);Z.current=j;const Q=(0,n.useId)(),W=(0,n.useRef)({}),ee=!1!==t.allowInvites,te=(t.participants||[]).filter((e=>!1!==e.isActive)),re=e=>ee?te.some((t=>g(t.characterId,e)))?"\u53c2\u52a0\u4e2d\u3067\u3059":te.length>=a.tY?`\u30e1\u30f3\u30d0\u30fc\u304c${a.tY}\u4eba\u53c2\u52a0\u4e2d\u3067\u3059`:"":"\u3053\u306e\u4f5c\u54c1\u306f\u30e1\u30f3\u30d0\u30fc\u56fa\u5b9a\u3067\u3059";(0,n.useEffect)((()=>(z.current=!0,()=>{z.current=!1,G.current+=1})),[]),(0,n.useEffect)((()=>{r&&(O(r),_(""))}),[r]),(0,n.useEffect)((()=>{if(!ee||!K)return;const e=++G.current;return J.current=null,U(!0),P(""),w([]),E({hasMore:!1,nextOffset:0}),s.S.listCharacters({scope:j,q:I,...y}).then((t=>{e===G.current&&(w(t.data),E(t))})).catch((t=>{e===G.current&&P((0,f.KP)(t))})).finally((()=>{e===G.current&&U(!1)})),()=>{G.current+=1}}),[j,I,D,ee,K,y]);const ne=e=>{b(e),N(""),C("")};return B?(0,d.jsx)(h.A,{character:B,onClose:()=>M(null),onSaved:e=>{M(null),b("mine"),N(""),C(""),F((e=>e+1)),O((null===e||void 0===e?void 0:e.id)||null),_(""),Y(!0)}},B.id||"new"):L&&ee?(0,d.jsx)(l.DE,{characterId:L,onClose:()=>{O(null),_(""),Y(!0)},displayOnly:!0,busy:H,onReport:e=>{if(V.current||H||e.isOwner||e.isAdminBlocked||"public"!==e.visibility)return;const t=new URLSearchParams({template:"report",category:"other",title:`\u300c${e.name}\u300d\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306b\u5bfe\u3059\u308b\u5831\u544a`,content:`\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u540d: ${e.name}\n\u30d7\u30ed\u30d5\u30a3\u30fc\u30ebID: ${e.id}\n\u4f5c\u6210\u8005: ${e.creatorName||"\u5236\u4f5c\u8005"}\n\n\u5831\u544a\u7406\u7531: \n(\u4e0d\u9069\u5207\u306a\u30b3\u30f3\u30c6\u30f3\u30c4\u3001\u8457\u4f5c\u6a29\u4fb5\u5bb3\u3001\u305d\u306e\u4ed6\u306e\u7406\u7531\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8a18\u5165\u3057\u3066\u304f\u3060\u3055\u3044)\n\n`});k(`/inquiries/new?${t.toString()}`)},onFavoriteChange:e=>{z.current&&(G.current+=1,w((t=>t.map((t=>g(t.id,e.id)?{...t,...e}:t)).filter((e=>"favorites"!==Z.current||e.isFavorited)))),F((e=>e+1)))},selectionError:q,selectionHint:re(L),selectionDisabled:Boolean(re(L)),onSelect:async e=>{if(!(V.current||e.isAdminBlocked||re(e.id))){V.current=!0,X(!0),_("");try{const r=await s.S.inviteCharacter(t.id,e.id);z.current&&o(r)}catch(r){z.current&&_((0,f.KP)(r))}finally{V.current=!1,z.current&&X(!1)}}},selectionLabel:"\u62db\u5f85\u3059\u308b",onEdit:"mine"===j?e=>M(e):void 0},L):(0,d.jsx)(f.X,{title:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u304b\u3089\u62db\u5f85",onClose:c,onBack:c,backLabel:"\u30e1\u30f3\u30d0\u30fc\u4e00\u89a7\u306b\u623b\u308b",children:(0,d.jsx)("div",{className:"talk-form talk-invite-content",children:ee?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"talk-invite-tabs",role:"tablist","aria-label":"\u62db\u5f85\u3059\u308b\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306e\u8868\u793a\u7bc4\u56f2",children:x.map((e=>{let[t,r]=e;return(0,d.jsx)("button",{type:"button",role:"tab",id:`${Q}-${t}`,"aria-controls":`${Q}-panel`,tabIndex:j===t?0:-1,ref:e=>{W.current[t]=e},"aria-selected":j===t,onClick:()=>ne(t),onKeyDown:e=>{var r;if(!["ArrowLeft","ArrowRight","Home","End"].includes(e.key))return;e.preventDefault();const n=x.findIndex((e=>{let[r]=e;return r===t})),a="Home"===e.key?0:"End"===e.key?x.length-1:(n+("ArrowRight"===e.key?1:-1)+x.length)%x.length,s=x[a][0];ne(s),null===(r=W.current[s])||void 0===r||r.focus()},children:r},t)}))}),(0,d.jsxs)("div",{id:`${Q}-panel`,role:"tabpanel","aria-labelledby":`${Q}-${j}`,className:"talk-invite-panel",children:["public"===j&&(0,d.jsxs)("p",{className:"talk-hint",children:["\u8868\u793a\u5bfe\u8c61\uff1a",(0,v.VY)(u,p)]}),(0,d.jsxs)("form",{className:"talk-search",onSubmit:e=>{e.preventDefault(),e.stopPropagation(),C(S.trim())},children:[(0,d.jsx)("input",{type:"search","aria-label":"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u691c\u7d22",placeholder:"\u540d\u524d\u30fb\u7d39\u4ecb\u6587\u30fb\u30bf\u30b0\u3067\u63a2\u3059",maxLength:100,value:S,onChange:e=>N(e.target.value)}),(0,d.jsx)("button",{type:"submit",className:"talk-button talk-secondary",children:"\u691c\u7d22"})]}),"mine"===j&&(0,d.jsx)("button",{type:"button",className:"talk-button talk-secondary",onClick:()=>{O(null),M({})},children:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u767b\u9332"}),te.length>=a.tY&&(0,d.jsx)("p",{className:"talk-hint",children:"\u73fe\u5728\u306f\u6e80\u54e1\u3067\u3059\u3002\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u304c\u3001\u62db\u5f85\u3059\u308b\u306b\u306f\u5148\u306b\u30e1\u30f3\u30d0\u30fc\u3092\u5916\u3057\u3066\u304f\u3060\u3055\u3044\u3002"}),(0,d.jsx)(f.FT,{onRetry:()=>F((e=>e+1)),children:T}),(0,d.jsx)("div",{className:"talk-profile-discover-grid",children:$.map((e=>(0,d.jsx)(m,{profile:e,onDetails:e=>{O(e.id),_("")},unavailable:te.some((t=>g(t.characterId,e.id)))?"\u53c2\u52a0\u4e2d":void 0},e.id)))}),R&&(0,d.jsx)("p",{className:"talk-muted",role:"status",children:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u2026"}),!R&&!T&&!$.length&&(0,d.jsx)("p",{className:"talk-muted",children:"favorites"===j?"\u304a\u6c17\u306b\u5165\u308a\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306e\u8a73\u7d30\u304b\u3089\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002":"mine"===j?"\u81ea\u5206\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002\u691c\u7d22\u6761\u4ef6\u3092\u5909\u3048\u308b\u304b\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u767b\u9332\u3057\u3066\u304f\u3060\u3055\u3044\u3002":"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002"}),A.hasMore&&(0,d.jsx)("button",{type:"button",className:"talk-button talk-secondary talk-load-more",disabled:R,onClick:async()=>{const e=G.current;if(!R&&J.current!==e&&A.hasMore){J.current=e,U(!0),P("");try{const t=await s.S.listCharacters({scope:j,q:I,offset:A.nextOffset,...y});if(e!==G.current)return;w((e=>[...e,...t.data.filter((t=>!e.some((e=>g(e.id,t.id)))))])),E(t)}catch(t){e===G.current&&P((0,f.KP)(t))}finally{J.current===e&&(J.current=null),e===G.current&&U(!1)}}},children:"\u3082\u3063\u3068\u898b\u308b"})]})]}):(0,d.jsx)("p",{className:"talk-muted",children:"\u3053\u306e\u4f5c\u54c1\u3067\u306f\u5236\u4f5c\u6642\u306e\u30e1\u30f3\u30d0\u30fc\u3067\u4f1a\u8a71\u3057\u307e\u3059\u3002"})})})}function j(e){let{room:t,sharedCharacterId:r,onClose:i,onUpdated:l,usageTargetFilter:c,excludeUnspecified:o}=e;
1const u=!1!==t.allowInvites,[p,m]=(0,n.useState)(Boolean(r)&&u),[h,v]=(0,n.useState)(!1),[x,g]=(0,n.useState)(""),j=(0,n.useRef)(!1),b=(0,n.useRef)(!0),y=(0,n.useRef)(t.id);y.current=t.id;const S=(t.participants||[]).filter((e=>!1!==e.isActive));(0,n.useEffect)((()=>(b.current=!0,()=>{b.current=!1})),[]),(0,n.useEffect)((()=>{r&&u&&m(!0)}),[r,u]);return p&&u?(0,d.jsx)(k,{room:t,usageTargetFilter:c,excludeUnspecified:o,sharedCharacterId:r,onClose:()=>m(!1),onInvited:e=>{l(e),m(!1)}},t.id):(0,d.jsx)(f.X,{title:"\u30eb\u30fc\u30e0\u306e\u30e1\u30f3\u30d0\u30fc",onClose:i,busy:h,children:(0,d.jsxs)("div",{className:"talk-form",children:[(0,d.jsx)(f.FT,{children:x}),(0,d.jsx)("div",{className:"talk-members-list",children:S.map((e=>{var r;return(0,d.jsxs)("div",{className:"talk-member",children:[(0,d.jsx)(f.Yq,{name:e.name,avatarUrl:e.avatarUrl}),(0,d.jsxs)("div",{children:[(0,d.jsx)("strong",{children:e.name}),e.isAdminBlocked&&(0,d.jsx)("p",{className:"talk-hint",children:"\u904b\u55b6\u306b\u3088\u308a\u5229\u7528\u505c\u6b62\u4e2d\u306e\u305f\u3081\u3001\u8fd4\u4fe1\u3067\u304d\u307e\u305b\u3093\u3002"}),(null===(r=e.description)||void 0===r?void 0:r.trim())&&(0,d.jsx)("p",{className:"talk-hint whitespace-pre-wrap",children:e.description})]}),(0,d.jsx)("button",{type:"button",className:"talk-text-button","aria-label":`${e.name}\u3092\u30eb\u30fc\u30e0\u304b\u3089\u5916\u3059`,disabled:h||!u||S.length<=1,onClick:()=>(async e=>{if(j.current||!u||S.length<=1)return;j.current=!0,v(!0),g("");const r=t.id;try{const t=await s.S.removeParticipant(r,e.id);b.current&&y.current===r&&l(t)}catch(n){b.current&&y.current===r&&g((0,f.KP)(n))}finally{j.current=!1,b.current&&v(!1)}})(e),children:"\u5916\u3059"})]},e.id)}))}),(0,d.jsx)("p",{className:"talk-hint",children:"\u53c2\u52a0\u8005\u3092\u5916\u3057\u3066\u3082\u3001\u3053\u308c\u307e\u3067\u306e\u4f1a\u8a71\u306f\u6b8b\u308a\u307e\u3059\u3002\u30eb\u30fc\u30e0\u306b\u306f\u6700\u4f4e 1 \u4eba\u304c\u5fc5\u8981\u3067\u3059\u3002"}),u?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"talk-section-heading",children:[(0,d.jsxs)("span",{className:"talk-badge",children:[S.length," / ",a.tY," \u4eba"]}),(0,d.jsx)("button",{type:"button",className:"talk-button talk-primary",disabled:h,onClick:()=>m(!0),children:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u304b\u3089\u62db\u5f85"})]}),S.length>=a.tY&&(0,d.jsxs)("p",{className:"talk-muted",children:["\u6700\u5927 ",a.tY," \u4eba\u304c\u53c2\u52a0\u3067\u304d\u307e\u3059\u3002\u5165\u308c\u66ff\u3048\u308b\u306b\u306f\u5148\u306b\u30e1\u30f3\u30d0\u30fc\u3092\u5916\u3057\u3066\u304f\u3060\u3055\u3044\u3002"]})]}):(0,d.jsx)("p",{className:"talk-muted",children:"\u3053\u306e\u4f5c\u54c1\u3067\u306f\u5236\u4f5c\u6642\u306e\u30e1\u30f3\u30d0\u30fc\u3067\u4f1a\u8a71\u3057\u307e\u3059\u3002"})]})})}},5447:(e,t,r)=>{r.d(t,{Me:()=>i,SA:()=>o,ko:()=>n,nX:()=>d,pG:()=>c,wE:()=>s,xH:()=>l,zO:()=>a});const n=(e,t)=>`talelynx:talk:pending:${e}:${t}`;function a(e){try{const t=JSON.parse(sessionStorage.getItem(e)||"null");if(t&&"string"===typeof t.requestId&&"string"===typeof t.text&&"boolean"===typeof t.continueConversation)return t}catch{}return null}function s(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch{throw new Error("\u9001\u4fe1\u306e\u72b6\u614b\u3092\u4fdd\u5b58\u3067\u304d\u307e\u305b\u3093\u3002\u30d6\u30e9\u30a6\u30b6\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002")}}function i(e){try{sessionStorage.removeItem(e)}catch{}}function l(){if("function"===typeof crypto.randomUUID)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function c(e,t){const r=new Set(e.map((e=>String(e.id))));return[...e,...t.filter((e=>!r.has(String(e.id))&&(r.add(String(e.id)),!0)))].sort(((e,t)=>{const r=String(e.id),n=String(t.id);return/^\d+$/.test(r)&&/^\d+$/.test(n)?r.length-n.length||(r<n?-1:r>n?1:0):0}))}function o(e){var t,r,n,a,s;return!!["TALK_TURN_REPLACED","TALK_REGENERATE_STALE","TALK_PROFILE_BLOCKED"].includes(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.code)||(!1===(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.turnPersisted)||[400,401,403,404,422].includes(null===e||void 0===e||null===(s=e.response)||void 0===s?void 0:s.status))}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=new Set((arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map(String)),n=new Map(t.map((e=>[String(e.id),e])));return c(e.filter((e=>!r.has(String(e.id)))).map((e=>n.get(String(e.id))||e)),t)}}}]);
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.