PageSourceSearch

https://www.hachiroku.ai/_next/static/chunks/1870.d516aaad64a97033.js

js hachiroku.ai collected 2026-10-05 13:35:12 UTC 17,483 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1870],{2260:(e,t,r)=>{r.d(t,{E:()=>o});var s=r(23798),a=r(47934);r(21462);var n=r(94775);let l=(0,a.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-normal transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,...a}=e;return(0,s.jsx)("div",{className:(0,n.cn)(l({variant:r}),t),...a})}},4033:(e,t,r)=>{r.d(t,{p:()=>l});var s=r(23798),a=r(21462),n=r(94775);let l=a.forwardRef((e,t)=>{let{className:r,type:a,...l}=e;return(0,s.jsx)("input",{type:a,className:(0,n.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-[16px] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...l})});l.displayName="Input"},6381:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});let s="hachiroku.ai",a=new Set(["assets.hachiroku.ai","assets.momoiro.ai"]);var n=r(22964);let l="maitetsu"===(n.env.BRAND||"maitetsu").toLowerCase()?"hachiroku.ai":"momoiro.ai",o="https://assets.".concat(l),i="".concat(o,"/cdn-cgi/image"),d="https://".concat(l),c=(n.env.NEXT_PUBLIC_ASSET_ORIGIN||n.env.ASSET_ORIGIN||d).replace(/\/$/,""),u=e=>{let t=["".concat(o,"/"),"//assets.".concat(l,"/")].find(t=>e.startsWith(t));return t?e.slice(t.length):e};function f(e){let{src:t,width:r,quality:n}=e;if(/^\/?api\/cards\/locked-preview(?:[?#]|$)/.test(t))return t.startsWith("/")?t:"/".concat(t);let o=function(e,t){if(t.toLowerCase()!==s)return null;let r=e.startsWith("//")?"https:".concat(e):e;if(!/^https?:\/\//i.test(r))return null;try{let e=new URL(r);if("assets.momoiro.ai"!==e.hostname.toLowerCase()||!e.pathname.startsWith("/ugc/"))return null;return e.protocol="https:",e.port="",e.toString()}catch(e){return null}}(t,l);if(o)return o;let d=["width=".concat(r)];n&&d.push("quality=".concat(n)),d.push("f=auto");let f=d.join(",");return"".concat(i,"/").concat(f,"/").concat((e=>{let t,r=function(e,t){if(t.toLowerCase()!==s)return null;let r=e.startsWith("//")?"https:".concat(e):e;if(!/^https?:\/\//i.test(r))return null;try{let e=new URL(r);if(!a.has(e.hostname.toLowerCase())||!e.pathname.startsWith("/ugc/"))return null;return"".concat(e.pathname.replace(/^\/+/,"")).concat(e.search)}catch(e){return null}}(e,l);if(r)return r;if((t=e).startsWith("http://")||t.startsWith("https://")||t.startsWith("//")||t.startsWith("data:"))return u(e);let n=e.startsWith("/")?e.slice(1):e;return u("".concat(c,"/").concat(n))})(t))}},13114:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var s=r(23798),a=r(11307),n=r(52841),l=r(4033),o=r(39067),i=r(63045),d=r(61984),c=r(20117),u=r(50489),f=r(70576),m=r(14160),p=r(83995),h=r.n(p),x=r(21462),g=r(73215),y=r(15104),j=r(17464),v=r(2260);let b=j.Ik({category:j.Yj().min(1,{message:"カテゴリを選択してください"}),replyTo:j.Yj().email({message:"有効なメールアドレスを入力してください"}).optional(),content:j.Yj().min(1,{message:"お問い合わせ内容を入力してください"}),screenshots:j.YO(j.Nl(File)).optional().refine(e=>!e||0x2800000>=e.reduce((e,t)=>e+t.size,0),{message:"ファイルサイズの合計が40MB以下である必要があります"}),name:j.Yj()});function w(){let[e,t]=(0,x.useState)(!1),[r,p]=(0,x.useState)([]),[j,w]=(0,x.useState)([]),[N,C]=(0,x.useState)(null),R=(0,u.md)(d.d3),I=(0,g.mN)({resolver:(0,c.u)(b),defaultValues:{category:"bug",content:"",replyTo:(null==R?void 0:R.email)||"",name:(null==R?void 0:R.name)||"",screenshots:[]}});async function k(e){t(!0);try{var r;let t=new FormData;if(t.append("category",e.category),e.replyTo&&t.append("replyTo",e.replyTo),e.name&&t.append("name",e.name),t.append("content",e.content),t.append("gameUserId",(null==R?void 0:R.id)||""),t.append("userAgent",navigator.userAgent),(null==(r=e.screenshots)?void 0:r.length)&&e.screenshots.forEac
1h(e=>{t.append("screenshots",e)}),!(await fetch("/api/contact",{method:"POST",body:t})).ok)throw Error("送信に失敗しました");(0,y.oR)("お問い合わせを受け付けました"),E()}catch(e){console.error("Error:",e),(0,y.oR)("エラーが発生しました。もう一度お試しください。")}finally{t(!1)}}let E=()=>{I.reset(),p([]),w([]),document.getElementById("screenshot")&&(document.getElementById("screenshot").value="")},A=e=>{let t=Array.from(e.target.files||[]);p(t),I.setValue("screenshots",t.length>0?t:void 0),Promise.all(t.map(e=>new Promise(t=>{let r=new FileReader;r.onload=()=>t(r.result),r.readAsDataURL(e)}))).then(w)};return(0,s.jsx)(n.lV,{...I,children:(0,s.jsxs)("form",{onSubmit:I.handleSubmit(k),className:"space-y-4",children:[(0,s.jsx)(n.zB,{control:I.control,name:"category",render:e=>{let{field:t}=e;return(0,s.jsxs)(n.eI,{children:[(0,s.jsxs)(n.lR,{children:["問い合わせジャンル ",(0,s.jsx)(v.E,{children:"必須"})]}),(0,s.jsxs)(o.l6,{onValueChange:t.onChange,defaultValue:"bug",children:[(0,s.jsx)(n.MJ,{children:(0,s.jsx)(o.bq,{children:(0,s.jsx)(o.yv,{placeholder:"カテゴリを選択"})})}),(0,s.jsxs)(o.gC,{className:"font-nitalagoRuika",children:[(0,s.jsx)(o.eb,{value:"bug",children:"不具合報告"}),(0,s.jsx)(o.eb,{value:"feature",children:"ご要望"}),(0,s.jsx)(o.eb,{value:"feedback",children:"フィードバック"}),(0,s.jsx)(o.eb,{value:"other",children:"その他"})]})]}),(0,s.jsx)(n.C5,{})]})}}),(0,s.jsx)(n.zB,{control:I.control,name:"content",render:e=>{let{field:t}=e;return(0,s.jsxs)(n.eI,{children:[(0,s.jsxs)(n.lR,{children:["お問い合わせ内容 ",(0,s.jsx)(v.E,{children:"必須"})]}),(0,s.jsx)(n.MJ,{children:(0,s.jsx)(i.T,{placeholder:"お問い合わせ内容を入力してください",...t})}),(0,s.jsx)(n.C5,{})]})}}),(0,s.jsx)(n.zB,{control:I.control,name:"screenshots",render:e=>{let{field:{onChange:t,value:o,...i}}=e;return(0,s.jsxs)(n.eI,{children:[(0,s.jsxs)(n.lR,{children:["問題が発生している画面のスクリーンショット"," ",(0,s.jsx)(v.E,{variant:"secondary",children:"任意"})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:j.map((e,t)=>(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(h(),{src:e,alt:"プレビュー ".concat(t+1),width:100,height:75,className:"h-48 w-auto rounded-md"}),(0,s.jsx)(a.$,{variant:"destructive",className:"absolute -right-1 -top-1",size:"icon",onClick:()=>{p(e=>{let r=e.filter((e,r)=>r!==t);return I.setValue("screenshots",r),r}),w(e=>e.filter((e,r)=>r!==t))},title:"削除",children:(0,s.jsx)(f.A,{})})]},t))}),(0,s.jsx)(n.MJ,{children:(0,s.jsx)(l.p,{id:"screenshot",type:"file",accept:"image/*",onChange:A,multiple:!0,...i},r.length)}),(0,s.jsx)(n.Rr,{children:"40MB以下の画像ファイルを選択してください"}),(0,s.jsx)(n.C5,{})]})}}),(0,s.jsx)(n.zB,{control:I.control,name:"replyTo",render:e=>{let{field:t}=e;return(0,s.jsxs)(n.eI,{children:[(0,s.jsx)(n.lR,{children:"返信用メールアドレス"}),(0,s.jsx)(n.MJ,{children:(0,s.jsx)(l.p,{type:"email",placeholder:"[email protected]",...t})}),(0,s.jsx)(n.Rr,{children:"お問い合わせに関する返信を受け取るためのメールアドレス"}),(0,s.jsx)(n.C5,{})]})}}),(0,s.jsx)(n.zB,{control:I.control,name:"name",render:e=>{let{field:t}=e;return(0,s.jsxs)(n.eI,{children:[(0,s.jsx)(n.lR,{children:"お名前"}),(0,s.jsx)(n.MJ,{children:(0,s.jsx)(l.p,{type:"text",placeholder:"",...t})}),(0,s.jsx)(n.C5,{})]})}}),(null==R?void 0:R.publicId)&&(0,s.jsxs)(n.eI,{children:[(0,s.jsx)(n.lR,{children:"ユーザーID"}),(0,s.jsx)(n.MJ,{children:(0,s.jsx)(l.p,{type:"email",placeholder:null==R?void 0:R.publicId,disabled:!0})})]}),(0,s.jsx)(a.$,{type:"submit",disabled:e||!I.formState.isValid,children:e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.A,{className:"mr-2 animate-spin"}),"送信中..."]}):"送信"})]})})}},14160:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(59735).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},20117:(e,t,r)=>{r.d(t,{u:()=>i});var s=r(73215);let a=(e,t,r)=>{if(e&&"reportValidity"in e){let a=(0,s.Jt)(r,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},n=(e,t)=>{for(let r in t.fields){let s=t.fields[r];s&&s.ref&&"reportValidity"in s.ref?a(s.ref,r,e):s.refs&&s.refs.forEac
1h(t=>a(t,r,e))}},l=(e,t)=>e.some(e=>e.startsWith(t+"."));var o=function(e,t){for(var r={};e.length;){var a=e[0],n=a.code,l=a.message,o=a.path.join(".");if(!r[o])if("unionErrors"in a){var i=a.unionErrors[0].errors[0];r[o]={message:i.message,type:i.code}}else r[o]={message:l,type:n};if("unionErrors"in a&&a.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var d=r[o].types,c=d&&d[a.code];r[o]=(0,s.Gb)(o,t,r,n,c?[].concat(c,a.message):a.message)}e.shift()}return r},i=function(e,t,r){return void 0===r&&(r={}),function(a,i,d){try{return Promise.resolve(function(s,l){try{var o=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](a,t)).then(function(e){return d.shouldUseNativeValidation&&n({},d),{errors:{},values:r.raw?a:e}})}catch(e){return l(e)}return o&&o.then?o.then(void 0,l):o}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:((e,t)=>{t.shouldUseNativeValidation&&n(e,t);let r={};for(let a in e){let n=(0,s.Jt)(t.fields,a),o=Object.assign(e[a]||{},{ref:n&&n.ref});if(l(t.names||Object.keys(e),a)){let e=Object.assign({},(0,s.Jt)(r,a));(0,s.hZ)(e,"root",o),(0,s.hZ)(r,a,e)}else(0,s.hZ)(r,a,o)}return r})(o(e.errors,!d.shouldUseNativeValidation&&"all"===d.criteriaMode),d)};throw e}))}catch(e){return Promise.reject(e)}}}},39067:(e,t,r)=>{r.d(t,{bq:()=>m,eb:()=>g,gC:()=>x,l6:()=>c,s3:()=>u,yv:()=>f});var s=r(23798),a=r(21462),n=r(75824),l=r(63688),o=r(62525),i=r(42262),d=r(94775);let c=n.bL,u=n.YJ,f=n.WT,m=a.forwardRef((e,t)=>{let{className:r,children:a,...o}=e;return(0,s.jsxs)(n.l9,{ref:t,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...o,children:[a,(0,s.jsx)(n.In,{asChild:!0,children:(0,s.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=n.l9.displayName;let p=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)(n.PP,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",r),...a,children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})});p.displayName=n.PP.displayName;let h=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)(n.wn,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",r),...a,children:(0,s.jsx)(l.A,{className:"h-4 w-4"})})});h.displayName=n.wn.displayName;let x=a.forwardRef((e,t)=>{let{className:r,children:a,position:l="popper",...o}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsxs)(n.UC,{ref:t,className:(0,d.cn)("relative z-[80] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:l,...o,children:[(0,s.jsx)(p,{}),(0,s.jsx)(n.LM,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,s.jsx)(h,{})]})})});x.displayName=n.UC.displayName,a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)(n.JU,{ref:t,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",r),...a})}).displayName=n.JU.displayName;let g=a.forwardRef((e,t)=>{let{className:r,children:a,...l}=e;return(0,s.jsxs)(n.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(i.A,{className:"h-4 w-4"})})}),(0,s.jsx)(n.p4,{children:a})]})});g.displayName=n.q7.displayName,a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)(n.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",r),...a})}).displayName=n.wv.displayName},50489:(e,t,r)=>{r.d(t,{Xr:()=>m,fp:()=>p,md:()=>f});var s=r(21462),a=r(85029);let n=(0,s.createContext)(void 0),l=e=>{let t=(0,s.useContext)(n);return(null==e?void 0:e.store)||t||(0,a.zp)()},o=e=>"function"==typeof(null==e?void 0:e.then),i=e=>{e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})},d=s.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw i(e),e}),c=new WeakMap,u=e=>{let t=c.get(e);return t||(t=new Promise((r,s)=>{let a=e,n=e=>t=>{a===e&&r(t)},l=e=>t=>{a===e&&s(t)},i=e=>{"onCancel"in e&&"function"==typeof e.onCancel&&e.onCancel(s=>{if(s===e)throw Error("[Bug] p is not updated even after cancelation");o(s)?(c.set(s,t),a=s,s.then(n(s),l(s)),i(s)):r(s)})};e.then(n(e),l(e)),i(e)}),c.set(e,t)),t};function f(e,t){let r=l(t),[[a,n,c],f]=(0,s.useReducer)(t=>{let s=r.get(e);return Object.is(t[0],s)&&t[1]===r&&t[2]===e?t:[s,r,e]},void 0,()=>[r.get(e),r,e]),m=a;(n!==r||c!==e)&&(f(),m=r.get(e));let p=null==t?void 0:t.delay;return((0,s.useEffect)(()=>{let t=r.sub(e,()=>{if("number"==typeof p){let t=r.get(e);o(t)&&i(u(t)),setTimeout(f,p);return}f()});return f(),t},[r,e,p]),(0,s.useDebugValue)(m),o(m))?d(u(m)):m}function m(e,t){let r=l(t);return(0,s.useCallback)((...t)=>{if(!("write"in e))throw Error("not writable atom");return r.set(e,...t)},[r,e])}function p(e,t){return[f(e,t),m(e,t)]}},52841:(e,t,r)=>{r.d(t,{C5:()=>y,MJ:()=>x,Rr:()=>g,eI:()=>p,lR:()=>h,lV:()=>d,zB:()=>u});var s=r(23798),a=r(21462),n=r(20242),l=r(73215),o=r(94775),i=r(84819);let d=l.Op,c=a.createContext({}),u=e=>{let{...t}=e;return(0,s.jsx)(c.Provider,{value:{name:t.name},children:(0,s.jsx)(l.xI,{...t})})},f=()=>{let e=a.useContext(c),t=a.useContext(m),{getFieldState:r,formState:s}=(0,l.xW)(),n=r(e.name,s);if(!e)throw Error("useFormField should be used within <FormField>");let{id:o}=t;return{id:o,name:e.name,formItemId:"".concat(o,"-form-item"),formDescriptionId:"".concat(o,"-form-item-description"),formMessageId:"".concat(o,"-form-item-message"),...n}},m=a.createContext({}),p=a.forwardRef((e,t)=>
1{let{className:r,...n}=e,l=a.useId();return(0,s.jsx)(m.Provider,{value:{id:l},children:(0,s.jsx)("div",{ref:t,className:(0,o.cn)("space-y-2",r),...n})})});p.displayName="FormItem";let h=a.forwardRef((e,t)=>{let{className:r,...a}=e,{error:n,formItemId:l}=f();return(0,s.jsx)(i.J,{ref:t,className:(0,o.cn)(n&&"text-destructive",r),htmlFor:l,...a})});h.displayName="FormLabel";let x=a.forwardRef((e,t)=>{let{...r}=e,{error:a,formItemId:l,formDescriptionId:o,formMessageId:i}=f();return(0,s.jsx)(n.DX,{ref:t,id:l,"aria-describedby":a?"".concat(o," ").concat(i):"".concat(o),"aria-invalid":!!a,...r})});x.displayName="FormControl";let g=a.forwardRef((e,t)=>{let{className:r,...a}=e,{formDescriptionId:n}=f();return(0,s.jsx)("p",{ref:t,id:n,className:(0,o.cn)("text-sm text-muted-foreground",r),...a})});g.displayName="FormDescription";let y=a.forwardRef((e,t)=>{let{className:r,children:a,...n}=e,{error:l,formMessageId:i}=f(),d=l?String(null==l?void 0:l.message):a;return d?(0,s.jsx)("p",{ref:t,id:i,className:(0,o.cn)("text-sm font-medium text-destructive",r),...n,children:d}):null});y.displayName="FormMessage"},63045:(e,t,r)=>{r.d(t,{T:()=>l});var s=r(23798),a=r(21462),n=r(94775);let l=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...a})});l.displayName="Textarea"},70576:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(59735).A)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]])},84819:(e,t,r)=>{r.d(t,{J:()=>d});var s=r(23798),a=r(94452),n=r(47934),l=r(21462),o=r(94775);let i=(0,n.F)("text-sm font-medium  peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=l.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)(a.b,{ref:t,className:(0,o.cn)(i(),r),...n})});d.displayName=a.b.displayName}}]);

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.