"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[125],{40396:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(85893);n(67294);var l=n(73625),r=n(95631);function o(e){let{children:t,title:n,rightColumn:r,large:o=!1,warning:x=!1,verticallyCentered:f=!1,showIcon:p=!0,iconLineHeight:h=15,iconSize:v=15,className:m}=e;return(0,i.jsxs)(a,{warning:x,large:o,className:m,children:[r&&(0,i.jsx)(c,{children:r}),void 0!==n&&(0,i.jsxs)(s,{children:[p&&(0,i.jsx)(u,{verticallyCentered:f,iconLineHeight:h,iconSize:v,children:(0,i.jsx)("pixiv-icon",{name:"16/Info"})}),(0,i.jsx)("span",{children:n})]}),void 0===n&&p?(0,i.jsxs)(d,{children:[(0,i.jsx)(u,{verticallyCentered:f,iconLineHeight:h,iconSize:v,children:(0,i.jsx)(l.JO,{name:"16/Info",className:"text-text3"})}),(0,i.jsx)("div",{children:t})]}):t]})}let a=r.ZP.aside.withConfig({componentId:"sc-54a05690-0"})(["padding:",";margin:",";max-width:",";border-radius:8px;background:",";color:",";line-height:1.25;"],e=>{let{large:t}=e;return t?"24px":"16px"},e=>{let{large:t}=e;return t?"24px auto":"8px 0"},e=>{let{large:t}=e;return t?"740px":"none"},e=>{let{warning:t,theme:n}=e;return t?"#ffe7e4":n.color.surface3},e=>{let{warning:t,theme:n}=e;return t?"#ff2b00":n.color.text2}),s=r.ZP.h2.withConfig({componentId:"sc-54a05690-1"})(["display:flex;align-items:center;color:#666;font-size:12px;font-weight:bold;margin-bottom:8px;line-height:1;margin-top:0;"]),c=r.ZP.div.withConfig({componentId:"sc-54a05690-2"})(["float:right;"]),d=r.ZP.div.withConfig({componentId:"sc-54a05690-3"})(["display:flex;& > div{flex:1 0;}"]),u=r.ZP.span.withConfig({componentId:"sc-54a05690-4"})(["flex:none;align-self:flex-start;width:","px;height:","px;margin:",";padding-top:","px;padding-bottom:","px;"],e=>{let{iconSize:t}=e;return t},e=>{let{iconLineHeight:t}=e;return t},e=>{let{verticallyCentered:t}=e;return t?"auto 4px auto 0":"0 4px 0 0"},e=>{let{iconLineHeight:t,iconSize:n}=e;return Math.max(t-n,0)/2},e=>{let{iconLineHeight:t,iconSize:n}=e;return Math.max(t-n,0)/2})},93358:function(e,t,n){var i=n(85893);n(67294);let l=e=>{let{size:t,color:n}=e;return(0,i.jsx)("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 9.25147H5.20094C5.89698 9.25147 6.46123 8.67646 6.46123 7.96719C6.46123 7.25791 5.89698 6.68292 5.20094 6.68292H1V0.856188C1 0.383333 1.37617 0 1.84019 0C1.97654 0 2.11085 0.0338168 2.23151 0.0985318L15.551 7.24226C15.9616 7.46248 16.1193 7.9802 15.9031 8.39871C15.824 8.5518 15.7012 8.67697 15.551 8.75754L2.23151 15.9013C1.82088 16.1215 1.31281 15.9608 1.09669 15.5424C1.03319 15.4195 1 15.2825 1 15.1437V9.25147Z",fill:n})})};t.Z=l,l.defaultProps={size:16,color:"black"}},28984:function(e,t,n){n.d(t,{X:function(){return r}});var i=n(67294),l=n(39980);function r(e,t,n,r,o){var a;let s=(0,i.useCallback)((e,t)=>void 0===r?e===t:r(e,t),[r]),c=(0,i.useCallback)(n=>{let{value:i}=n;return!s(e,i)&&t(i)},[s,t,e]),d=(0,i.useRef)([...n]);(0,i.useEffect)(()=>{d.current=[...n]},[n]);let u=d.current.find(t=>s(e,t.value));if(void 0!==u)return[u,c,d.current];if(void 0!==o){let t=o(e),n=d.current.find(e=>s(t.value,e.value));return void 0===n?(d.current.push(t),[t,c,d.current]):[n,c,d.current]}return[null!==(a=(0,l.Y)(n))&&void 0!==a?a:null,c,d.current]}},97334:function(e,t,n){n.d(t,{NB:function(){return C},N_:function(){return g},ZP:function(){return m},zl:function(){return v}});var i=n(85893),l=n(67294),r=n(73625),o=n(95631),a=n(80282),s=n(63933),c=n(55693),d=n(17578),u=n(8062),x=n(32237),f=n(10677),p=n(61449);let h=l.createContext(void 0);function v(){return[(0,l.useContext)(h),h.Provider]}function m(e){let{menuItems:t,modalTitle:n="",openMenuToUpperDirection:o,variant:x,children:f,position:p,onOpen:h,className:m,bottomDrawerForMobile:g=!1}=e,[C]=v(),k=(0,l.useCallback)(e=>(0,i.jsx)(i.Fragment,{children:t.map((t,n)=>{if("separater"===t.type)return(0,i.jsx)(y,{},"separater-".concat(n));let l={primary:t.label,key:t.id,onClick:async()=>{t.disabled||(t.onClick&&await t.onClick(),e())},disabled:t.disabled,gtmClass:t.gtmClass};return t.link?(0,i.jsx)(c.Um,{link:t.link,...l}):(0,i.jsx)(c.ZP,{...l})})}),[t]),X=(0,l.useRef)(null),[Z,I,S]=(0,u.BF)(X,(0,l.useCallback)(e=>(0,i.jsx)(c._X.Provider,{value:{padding:16},children:(0,i.jsx)(P,{children:k(e)})}),[k]),{direction:o?"up":"down",closeOnScroll:!0,delayWhenClosedOnScroll:50,scrollerRef:C,position:p}),_=(0,l.useCallback)(()=>{I(!1)},[I]),N=(0,l.useMemo)(()=>k(_),[k,_]),z=(0,d.Gz)(),D=(0,l.useMemo)(()=>z&&g,[g,z]),q=()=>{S||null==h||h(),I("toggle")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(j,{ref:X,"aria-current":S,className:m,children:["NoHover"===x?(0,i.jsx)(b,{onClick:q,children:null!=f?f:(0,i.jsx)(s.Z,{})}):(0,i.jsx)(r.hU,{icon:"24/Dot",variant:x,onClick:q,isActive:S}),!D&&Z]}),D&&(0,i.jsx)(a.y,{isOpen:S,isDismissable:!0,bottomSheet:!0,onClose:_,title:n,noPaddingBottom:!0,children:(0,i.jsx)(w,{children:N})})]})}let g=o.ZP.div.withConfig({componentId:"sc-3cef5929-0"})([""]),C=o.ZP.div.withConfig({componentId:"sc-3cef5929-1"})(["","{opacity:0;transition:opacity 0.2s;&[aria-current='true']{opacity:1;}}&:hover ","{opacity:1;}"],g,g),b=(0,o.ZP)(p.X).withConfig({componentId:"sc-3cef5929-2"})(["","{opacity:0.32;}",""],f.t,(0,x.r)(e=>[e.font.text3.hover.press])),j=(0,o.ZP)(g).withConfig({componentId:"sc-3cef5929-3"})(["position:relative;"]),P=o.ZP.div.withConfig({componentId:"sc-3cef5929-4"})(["padding-top:8px;padding-bottom:8px;width:max-content;min-width:","px;"],160),w=o.ZP.div.withConfig({componentId:"sc-3cef5929-5"})(["",";"],(0,x.r)(e=>[e.margin.top(16).bottom(40)])),y=o.ZP.div.withConfig({componentId:"sc-3cef5929-6"})(["padding:8px;&::before{content:'';display:block;",";margin-top:-1px;}"],(0,x.r)(e=>[e.border.default.top]))},65088:function(e,t,n){n.d(t,{Z:function(){return k}});var i,l,r=n(85893),o=n(67294),a=n(73625),s=n(91619),c=n(80282),d=n(40396),u=n(93358),x=n(2262);function f(e){let{iconType:t,mainMessage:n,subMessage:i,buttons:l,children:o,...s}=e;return(0,r.jsx)(c.y,{...s,size:"S",title:"",isDismissable:!0,children:(0,r.jsxs)("div",{className:"text-center px-24",children:[t&&(0,r.jsxs)("div",{className:"text-text3 mb-12",children:["error"===t&&(0,r.jsx)(x.Z,{size:48}),"send"===t&&(0,r.jsx)(u.Z,{size:48,color:"currentColor"})]}),(0,r.jsx)("div",{className:"text-16 font-bold text-text1",children:n}),i&&(0,r.jsx)("div",{className:"text-14 text-text2 mt-32",children:i}),(0,r.jsx)("div",{className:"mt-36 space-y-8",children:null==l?void 0:l.map((e,t)=>{let{label:n,...i}=e;return(0,r.jsx)(a.zx,{...i,fullWidth:!0,children:n},t)})})]})})}var p=n(14607);function h(e){let{show:t,message:n,subMessage:i,onClose:l}=e,[a]=(0,p.$G)([p.XP.Cg.ns,p.XP.qB.ns]),s=(0,o.useMemo)(()=>[{label:a(p.XP.Cg.LI.L),variant:"Default",onClick:l}],[l,a]);return(0,r.jsx)(f,{isOpen:t,mainMessage:void 0===n?a(p.XP.qB.Ff1):n,subMessage:i,iconType:"send",onClose:l,buttons:s})}var v=n(17578);async function m(e,t){return e.get("/ajax/provided_info/:type",{type:t.type})}async function g(e,t){var n,i,l,r,o,a;return e.post("/ajax/provided_info/:type/:id",{type:t.type,id:t.targetId},{code:t.code,url:null!==(n=t.url)&&void 0!==n?n:"",detail:null!==(i=t.detail)&&void 0!==i?i:"",send_page_path:null!==(l=t.sendPagePath)&&void 0!==l?l:"",emoji_work_type:null!==(r=t.emojiWorkType)&&void 0!==r?r:"",emoji_work_id:null!==(o=t.emojiWorkId)&&void 0!==o?o:"",work_type:null!==(a=t.workType)&&void 0!==a?a:""})}var C=n(25300),b=n(28984);let j=e=>/^https?:\/\/.+/u.test(e)&&!e.startsWith(location.origin+location.pathname+location.search),P=(e,t)=>{var n,i;let[l,r]=(0,o.useState)(t.selectable_codes[0]),a=t.field_settings[l].fields,[s,c,d,u,x]=y(!!(null===(n=a.url)||void 0===n?void 0:n.required),j),[f,p,h,v,m]=y(!!(null===(i=a.detail)||void 0===i?void 0:i.required)),g=(0,o.useMemo)(()=>t.selectable_codes.map(e=>({label:t.field_settings[e].label,value:e})),[t]),[C,P]=(0,b.X)(l,r,g);if((0,o.useEffect)(()=>{r(t.selectable_codes[0]),d(),h()},[e,t]),(0,o.useEffect)(()=>{d(s),h(f)},[l]),null===C)throw Error();return{code:[C,P,g],url:[s,c,u&&x],detail:[f,p,v&&m],fieldsSetting:a,submitDisabled:a.url&&u||a.detail&&v}},w=(e,t)=>{let n=(0,s.mb)(),[i,l]=(0,o.useState)();return(0,o.useEffect)(()=>{if(!t||i)return;let r=!1;return(async()=>{let t=await m(n,{type:e});r||l(t)})(),()=>{r=!0}},[n,e,t]),i},y=(e,t)=>{let[n,i]=(0,o.useState)(""),[l,r]=(0,o.useState)(!1),[a,s]=(0,o.useState)(!1),c=(0,o.useCallback)(n=>{i(n),s(!0),(e?0===n.length||t&&!t(n):n.length>0&&t&&!t(n))?r(!0):r(!1)},[e,t]),d=(0,o.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";c(e),s(!1)},[c]);return[n,c,d,l,a]};function k(e){let{show:t,type:n,targetId:i,onClose:l,emojiWorkId:a,emojiWorkType:d,workType:u}=e,x=(0,s.mb)(),[f]=(0,p.$G)([p.XP.aD.ns,p.XP.Cg.ns,p.XP.qB.ns]),m=w(n,t),C=(0,v.Gz)(),b=(0,o.useMemo)(()=>C?"full":void 0,[C]),[j,P]=(0,o.useState)(null),y=(0,o.useCallback)(async e=>{let t=location.pathname;P(0),await g(x,{type:n,targetId:i,sendPagePath:t,...e}).then(()=>{P(1)}).catch(()=>{P(null)})},[x,i,n]),k=(0,o.useCallback)(()=>{l(),P(null)},[l]);return m?1===j?(0,r.jsx)(h,{show:t,message:f(p.XP.qB.Ff1),onClose:k}):(0,r.jsx)(c.y,{isOpen:t,title:f(p.XP.aD.p4.cI),onClose:k,size:"M",isDismissable:!0,bottomSheet:b,children:(0,r.jsx)(X,{show:t,type:n,setting:m,onSubmit:y,inSubmitting:0===j,onClose:k,emojiWorkId:a,emojiWorkType:d,workType:u})}):null}function X(e){let{show:t,onSubmit:n,inSubmitting:i,onClose:l,setting:o,type:s,emojiWorkId:c,emojiWorkType:u,workType:x}=e,[f]=(0,p.$G)([p.XP.aD.ns,p.XP.Cg.ns,p.XP.ZT.ns,p.XP.qB.ns]),{code:[h,v,m],url:[g,b,j],detail:[w,y,k],fieldsSetting:X,submitDisabled:Z}=P(t,o);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"px-24 flex flex-col gap-24",children:[(0,r.jsx)(a.ud,{showLabel:!0,label:f(p.XP.aD.cI.Sg),value:h.value.toString(),onChange:e=>v(m.find(t=>t.value.toString()===e)),children:m.map(e=>(0,r.jsx)(a.Xi,{value:e.value.toString(),children:e.label},e.value))}),X.url&&(0,r.jsx)(a.nv,{label:f(p.XP.aD.cI.s0),required:X.url.required,requiredText:"*".concat(f(p.XP.Cg.cr.C)),showLabel:!0,value:g,onChange:b,invalid:j,disabled:i,placeholder:f(p.XP.aD.cI.Jp),maxLength:1e3,assistiveText:j?f(p.XP.aD.cI.Uf.t):void 0}),X.detail&&(0,r.jsx)(a.Kx,{label:f(p.XP.aD.cI.aR),showLabel:!0,showCount:!0,required:X.detail.required,requiredText:"*".concat(f(p.XP.Cg.cr.C)),value:w,onChange:y,invalid:k,disabled:i,placeholder:f(p.XP.aD.cI.Yd),maxLength:3e3,rows:5,assistiveText:k?f(p.XP.aD.cI.Uf.o):void 0}),(s===C.C9.Illust||s===C.C9.Novel||s===C.C9.NovelSeries)&&(0,r.jsx)(d.Z,{title:f(p.XP.ZT.w3.Sw),children:f(p.XP.ZT.w3.YP)})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-8 px-24 mt-40",children:[(0,r.jsx)(a.zx,{variant:"Primary",onClick:()=>{Z||n({code:h.value,url:g,detail:w,emojiWorkId:c,emojiWorkType:u,workType:x})},disabled:Z||i,fullWidth:!0,children:f(p.XP.qB.sMH)}),(0,r.jsx)(a.zx,{onClick:l,fullWidth:!0,children:f(p.XP.Cg.LI.a)})]})]})}(i=l||(l={}))[i.Submitting=0]="Submitting",i[i.Submitted=1]="Submitted"},2262:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(85893);n(67294);var l=n(92604);function r(e){let{size:t=24}=e;return(0,i.jsx)(l.Z,{viewBoxSize:24,size:t,currentColor:!0,path:"M10,6 C10,4.8954305 10.8954305,4 12,4 C13.1045695,4 14,4.8954305 14,6 L14,12.5\nC14,13.6045695 13.1045695,14.5 12,14.5 C10.8954305,14.5 10,13.6045695 10,12.5 L10,6 Z M12,20\nC10.7573593,20 9.75,18.9926407 9.75,17.75 C9.75,16.5073593 10.7573593,15.5 12,15.5\nC13.2426407,15.5 14.25,16.5073593 14.25,17.75 C14.25,18.9926407 13.2426407,20 12,20 Z",transform:""})}}}]);