PageSourceSearch

https://oshinoko-community.com/_next/static/chunks/pages/auth/native-41d71d6b0535697e.js

js oshinoko-community.com collected 2026-10-07 21:30:29 UTC 8,540 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="476ee55b-0e81-4dab-abe3-593b8fe129ff",e._sentryDebugIdIdentifier="sentry-dbid-476ee55b-0e81-4dab-abe3-593b8fe129ff")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50896],{3845:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>b,default:()=>w,resolveCustomTokenHeader:()=>j});var n=r(79532),i=r(38507),u=r(70532),a=r(66419),o=r(65696),l=r(93570),s=r(45615),c=r(78181);let f=({error:e,onRetry:t})=>{let{t:r}=(0,u.A)("pages/auth");if(e){let i=r("auth"===e?"認証エラー":"ページを開けませんでした"),u=r("auth"===e?"認証に失敗しました":"通信状態を確認して、もう一度お試しください");return(0,n.jsx)("div",{className:"flex min-h-screen items-center justify-center p-16 text-center",children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{role:"alert",children:[(0,n.jsx)(l.o,{variant:"headingXl",className:"mb-16",component:"h2",children:i}),(0,n.jsx)(l.o,{variant:"bodyMd",className:"text-dangerous",children:u})]}),(0,n.jsx)("div",{className:"mt-24 flex justify-center",children:(0,n.jsx)(s.$,{variant:"primary",onClick:t,rounded:!0,children:r("再読み込み")})})]})})}return(0,n.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:(0,n.jsx)(c.k,{})})};var d=r(69296),h=r(85381),p=r(79817),y=r(21688);let v=e=>{let t=window.location.hash;return!t||"#"===t||e.includes("#")?e:`${e}${t}`},g=e=>"object"==typeof e&&null!==e&&"code"in e?String(e.code):void 0,m=(e,t,r)=>({location:t,redirectPath:r,code:g(e),message:e instanceof Error?e.message:String(e)});var b=!0;let j=e=>{let t=Array.isArray(e)?e.join(","):e;if(!t)return{customToken:null,wasNormalized:!1,rawLength:0};let r=Array.isArray(e)&&e.length>1||t.includes(","),n=t.split(",",1)[0].trim();return n?{customToken:n,wasNormalized:r,rawLength:t.length}:{customToken:null,wasNormalized:r,rawLength:t.length}};function w({customToken:e,redirect:t,wasTokenNormalized:r=!1}){let{t:l}=(0,u.A)("pages/auth"),s=(0,a.useRouter)(),[c,b]=(0,o.useState)(null),j=(0,p.SP)(),w=(0,o.useRef)(!1),x=(0,o.useRef)(null),A=(0,o.useRef)(null);return(0,o.useEffect)(()=>()=>{null!==x.current&&window.clearTimeout(x.current)},[]),(0,o.useEffect)(()=>{let n=!1;return(async()=>{let u=v(t);if(!c&&j){if(e){if(A.current?.token!==e){let t=(async()=>(0,i.p)((0,h.x)(),e))().then(()=>"success",t=>(y.v.error({error:t,extra:{...m(t,"NativeAuthPage.authenticate",u),headerLength:String(e.length),headerSegments:String(e.split(".").length),headerWasNormalized:String(r),...(e=>{try{let t=e.split(".")[1];if(!t)return{headerClaimsDecodeFailure:"no-payload-segment"};let r=t.replaceAll("-","+").replaceAll("_","/"),n=r+"=".repeat((4-r.length%4)%4),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||Array.isArray(i))return{headerClaimsDecodeFailure:"payload-not-object"};let u="number"==typeof i.iat?i.iat:void 0,a="number"==typeof i.exp?i.exp:void 0;if(void 0===u&&void 0===a)return{headerClaimsDecodeFailure:"timing-claims-missing"};let o=Math.floor(Date.now()/1e3);return{headerAgeSeconds:void 0===u?void 0:String(o-u),headerExpiresInSeconds:void 0===a?void 0:String(a-o)}}catch{return{headerClaimsDecodeFailure:"decode-failed"}}})(e)}},!0),"auth/invalid-custom-token"===g(t)?"invalid-token":"retryable-error"));A.current={token:e,promise:t}}let t=await A.current.promise;if(n)return;if("retryable-error"===t){A.current?.token===e&&(A.current=null),b("auth");return}}try{await s.replace(u)}catch(e){if(n||(y.v.error({error:e,extra:m(e,"NativeAuthPage.navigate",u)},!0),w.current))return;w.current=!0,window.location.href=u,x.current=window.setTimeout(()=>{b("navigation")},3e3)}}})(),()=>{n=!0}},[e,t,s,c,j,r]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{title:l("認証")}),(0,n.jsx)(f,{error:c,onRetry:()=>{if("navigation"===c){window.location.href=v(t);return}b(null)}})]})}},8043:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});let{actions:n}=r(63171).A,i=n},12910:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;
1if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(u=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,u[i]))return!1;for(i=n;0!=i--;){var n,i,u,a=u[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},36104:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/native",function(){return r(3845)}])},56190:(e,t,r)=>{"use strict";r.d(t,{UI:()=>u});var n="NOT_FOUND",i=function(e,t){return e===t};function u(e,t){var r,u,a="object"==typeof t?t:{equalityCheck:t},o=a.equalityCheck,l=a.maxSize,s=void 0===l?1:l,c=a.resultEqualityCheck,f=(r=void 0===o?i:o,function(e,t){if(null===e||null===t||e.length!==t.length)return!1;for(var n=e.length,i=0;i<n;i++)if(!r(e[i],t[i]))return!1;return!0}),d=1===s?{get:function(e){return u&&f(u.key,e)?u.value:n},put:function(e,t){u={key:e,value:t}},getEntries:function(){return u?[u]:[]},clear:function(){u=void 0}}:function(e,t){var r=[];function i(e){var i=r.findIndex(function(r){return t(e,r.key)});if(i>-1){var u=r[i];return i>0&&(r.splice(i,1),r.unshift(u)),u.value}return n}return{get:i,put:function(t,u){i(t)===n&&(r.unshift({key:t,value:u}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(s,f);function h(){var t=d.get(arguments);if(t===n){if(t=e.apply(null,arguments),c){var r=d.getEntries().find(function(e){return c(e.value,t)});r&&(t=r.value)}d.put(arguments,t)}return t}return h.clearCache=function(){return d.clear()},h}},69296:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(79532),i=r(69387);let u=({title:e,hiddenOnDesktop:t=!1})=>(0,n.jsx)("h1",{className:(0,i.A)("sr-only",t&&"lg:hidden"),children:e})},78181:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(79532),i=r(23760),u=r(70532);let a=(0,r(65696).memo)(({...e})=>{let{t}=(0,u.A)("shared");return(0,n.jsx)("div",{className:"flex size-full items-center justify-center",children:(0,n.jsx)(i.P,{color:"accent",size:"small","aria-label":e["aria-label"]||t("読み込み中"),...e})})});a.displayName="LoadingSpinner"},79817:(e,t,r)=>{"use strict";r.d(t,{SP:()=>g,DB:()=>v,GH:()=>b,Jd:()=>m,wS:()=>y});var n=r(12910),i=r.n(n),u=r(65696),a=r.t(u,2),o=r(75695),l=r(92983),s=r(56190);let c=(0,l.Ad)(s.UI,i()),f=()=>c(e=>e.authState.user,e=>e);var d=r(8043);let{useMemo:h,useCallback:p}=a,y=()=>{let e=h(()=>(0,l.Mz)(f(),e=>e?.uid),[]);return(0,o.d4)(e)},v=()=>{let e=h(()=>(0,l.Mz)(e=>e.authState,({status:e,user:t})=>"pendding"===e?void 0:!t?.isAnonymous&&!!t?.uid),[]);return(0,o.d4)(e)},g=()=>{let e=h(()=>(0,l.Mz)(e=>e.authState.isChanged,e=>e),[]);return(0,o.d4)(e)},m=()=>{let e=h(()=>f(),[]);return(0,o.d4)(e,i())},b=()=>{let e=(0,o.wA)();return p(t=>{e(d.A.setUser({user:t}))},[e])}},92983:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t,n=arguments.length,i=Array(n),u=0;u<n;u++)i[u]=arguments[u];var a=0,o={memoizeOptions:void 0},l=i.pop();if("object"==typeof l&&(o=l,l=i.pop()),"function"!=typeof l)throw Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var s=o.memoizeOptions,c=void 0===s?r:s,f=Array.isArray(c)?c:[c],d=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e}))throw Error("createSelector expects all input-selectors to be functions, but received the following types: ["+t.map(function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e}).join(", ")+"]");return t}(i),h=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(f)),p=e(function(){for(var e=[],r=d.length,n=0;n<r;n++)e.push(d[n].apply(null,arguments));return t=h.apply(null,e)});return Object.assign(p,{resultFunc:l,memoizedResultFunc:h,dependencies:d,lastResult:function(){return t},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),p}}r.d(t,{Ad:()=>n,Mz:()=>i});var i=n(r(56190).UI)}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=36104)),_N_E=e.O()}]);

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.