1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[272],{63:(e,t,s)=>{"use strict";var a=s(7260);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},420:(e,t,s)=>{"use strict";function a(e){if(!e)return null;if(/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)(\?.*)?$/i.test(e))return e;let t=e.match(/commons\.wikimedia\.org\/wiki\/Special:FilePath\/(.+)$/);return t&&decodeURIComponent(t[1]),e}s.d(t,{mn:()=>a})},549:(e,t,s)=>{"use strict";s.d(t,{n:()=>u});var a=s(9776),r=s(2115),i=s(4049),n=s(8445),o=s(4268),l=s(8559),c=class extends n.Q{#e;#t=void 0;#s;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.EN)(t.mutationKey)!==(0,i.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onSubscribe(){1===this.listeners.size&&this.#s&&(this.#s.addObserver(this),this.#r())}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#i()}mutate(e,t){return this.#a=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#r(){let e=this.#s?.state??(0,l.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){o.jG.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,s,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,s,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function u(e,t){let s=(0,a.jE)(t),[n]=r.useState(()=>new c(s,e));r.useEffect(()=>{n.setOptions(e)},[n,e]);let l=r.useSyncExternalStore(r.useCallback(e=>n.subscribe(o.jG.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),u=r.useCallback(function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];n.mutate(t[0],t[1]).catch(i.lQ)},[n]);if(l.error&&(0,i.GU)(n.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}},1873:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},2305:(e,t,s)=>{Promise.resolve().then(s.bind(s,6127))},3209:(e,t,s)=>{"use strict";s.d(t,{Wu:()=>c,ZB:()=>l,Zp:()=>n,aR:()=>o});var a=s(5155),r=s(2115),i=s(5016);let n=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...r})});n.displayName="Card";let o=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",s),...r})});o.displayName="CardHeader";let l=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("h3",{ref:t,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",s),...r})});l.displayName="CardTitle",r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("p",{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})}
1).displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("p-6 pt-0",s),...r})});c.displayName="CardContent",r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",s),...r})}).displayName="CardFooter"},5563:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},6127:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var a=s(5155),r=s(2115),i=s(2619),n=s.n(i),o=s(6613),l=s(1873),c=s(6651),u=s(9347),d=s(7937),m=s(8955),h=s(1567),x=s(2454),p=s(7621),f=s(6995),g=s(7003),b=s(3209),v=s(420),y=s(7840);let j=Array.from({length:21},(e,t)=>2005+t).reverse();function w(){var e;let t=(0,m.c)("rank"),s=(0,m.c)("common"),i=(0,h.Ym)(),w=[{value:"",label:t("all")},{value:"overall",label:t("overall")},{value:"food",label:t("food")},{value:"scenery",label:t("scenery")}],[N,k]=(0,r.useState)(2024),[C,P]=(0,r.useState)(""),[R,M]=(0,r.useState)(""),[B,S]=(0,r.useState)(""),[A,O]=(0,r.useState)(""),[E,F]=(0,r.useState)(20),L=(0,r.useRef)(null);(0,r.useEffect)(()=>(L.current&&clearTimeout(L.current),L.current=setTimeout(()=>O(B),400),()=>{L.current&&clearTimeout(L.current)}),[B]);let T=(0,r.useMemo)(()=>Object.fromEntries(w.map(e=>[e.value,e.label])),[w]),{data:q}=(0,f.y)(),{data:K,isLoading:G,error:I}=(e={year:N,limit:E,category:C||void 0,prefecture:R||void 0,stationName:A||void 0},(0,x.I)({queryKey:["rankings",e],queryFn:async()=>(await p.F.get("/stations/rankings",{params:{year:e.year,limit:e.limit||100,offset:e.offset||0,...e.category&&{category:e.category},...e.prefecture&&{prefecture:e.prefecture},...e.stationName&&{stationName:e.stationName}}})).data,staleTime:6e5}));return(0,a.jsx)("div",{className:"min-h-screen bg-lightBlue pt-16 sm:pt-20 pb-8 sm:pb-12",children:(0,a.jsx)("div",{className:"mx-auto origin-top scale-[0.55] sm:scale-[0.65] lg:scale-[0.72]",children:(0,a.jsxs)("div",{className:"container mx-auto px-3 sm:px-4 lg:px-6 max-w-6xl",children:[(0,a.jsx)("div",{className:"mb-4 sm:mb-10",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4 mb-1 sm:mb-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 sm:w-16 sm:h-16 bg-sakura rounded-lg sm:rounded-xl flex items-center justify-center shadow-sm flex-shrink-0",children:(0,a.jsx)(o.A,{className:"w-5 h-5 sm:w-8 sm:h-8 text-white"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"text-xl sm:text-4xl font-bold text-darkBlue truncate",children:t("pageTitle")}),(0,a.jsx)("p",{className:"text-xs sm:text-base text-mediumBlue mt-0.5 sm:mt-1",children:t("pageSubtitle")})]})]})}),(0,a.jsx)("div",{className:"mb-4 sm:mb-8 bg-white rounded-lg p-3 sm:p-5 border-2 border-mediumLightBlue shadow-sm",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:flex sm:flex-row gap-2 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-darkBlue mb-1.5",children:t("yearLabel")}),(0,a.jsx)("select",{value:N,onChange:e=>k(Number(e.target.value)),className:"w-full px-3 py-2 text-sm rounded-lg border border-mediumLightBlue bg-white text-gray-900 focus:outline-none focus:ring-2 focus:ring-sakura focus:border-sakura",children:j.map(e=>(0,a.jsxs)("option",{value:e,children:[e,t("yearSuffix")]},e))})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-darkBlue mb-1.5",children:t("categoryLabel")}),(0,a.jsx)("select",{value:C,onChange:e=>P(e.target.value),className:"w-full px-3 py-2 text-sm rounded-lg border border-mediumLightBlue bg-white text-gray-900 focus:outline-none focus:ring-2 focus:ring-sakura focus:border-sakura",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("label",{className:"block text-xs font-medium text-darkBlue mb-1.5",children:[(0,a.jsx)(l.A,{className:"w-3 h-3 inline mr-1"}),t("prefectureLabel")]}),(0,a.jsxs)("select",{value:R,onChange:e=>M(e.target.value),className:"w-full px-3 py-2 text-sm rounded-lg border border-mediumLightBlue bg-white text-gray-900 focus:outline-none focus:ring-2 focus:ring-sakura focus:border-sakura",children:[(0,a.jsx)("option",{value:"",children:t("all")}),null==q?void 0:q.data.map(e=>(0,a.jsxs)("option",{value:e.code,children:[e.name," ",e.nameEn?"(".concat(e.nameEn,")"):""]},e.code))]})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("label",{className:"block text-xs font-medium text-darkBlue mb-1.5",children:[(0,a.jsx)(c.A,{className:"w-3 h-3 inline mr-1"}),t("stationSearchLabel")]}),(0,a.jsx)("input",{type:"text",value:B,onChange:e=>S(e.target.value),placeholder:t("stationSearchPlaceholder"),className:"w-full px-3 py-2 text-sm rounded-lg border border-mediumLightBlue bg-white text-gray-900 focus:outline-none focus:ring-2 focus:ring-sakura focus:border-sakura"})]})]})}),G&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-sakura"}),(0,a.jsx)("p",{className:"mt-4 text-gray-600",children:s("loading")})]}),I&&(0,a.jsx)(b.Zp,{className:"p-6 bg-red-50 border-red-200 text-red-800",children:(0,a.jsxs)("p",{children:[s("error"),": ",I instanceof Error?I.message:"Unknown error"]})}),K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 sm:mb-6 pb-3 sm:pb-4 border-b-2 border-mediumLightBlue",children:(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-mediumBlue",children:[(0,a.jsx)("span",{className:"font-bold text-darkBlue",children:t("resultsCount",{total:K.total})}),K.year&&(0,a.jsxs)("span",{className:"ml-2",children:["(",K.year,t("yearSuffix"),")"]})]})}),(0,a.jsx)("div",{className:"space-y-0 bg-white rounded-lg border-2 border-mediumLightBlue overflow-hidden shadow-sm",children:K.data.map((e,s)=>(0,a.jsx)("div",{className:"border-b border-lightBlue last:border-0 hover:bg-lightBlue transition-colors group",children:(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-6 py-3 px-3 sm:py-5 sm:px-6",children:[(0,a.jsxs)(n(),{href:"/".concat(i,"/stations/").concat(e.station.id),className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-6 flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center gap-2 sm:gap-4 flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex-shrink-0 w-10 h-10 sm:w-12 sm:h-12 flex items-center justify-center",children:(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 sm:w-12 sm:h-12 rounded-lg font-bold text-base sm:text-xl ".concat(1===e.rank?"bg-yellow-400 text-yellow-900":e.rank<=3?"bg-sakura text-white":e.rank<=10?"bg-mediumBlue text-white":"bg-gray-200 text-gray-700"),children:e.rank})}),e.station.imageUrl&&(0,a.jsx)("div",{className:"flex-shrink-0 w-12 h-12 sm:w-20 sm:h-20 rounded-lg overflow-hidden bg-gray-100 border border-mediumLightBlue",children:(0,a.jsx)("img",{src:(0,v.mn)(e.station.imageUrl)||"",alt:e.station.name,className:"w-full h-full object-cover",onError:e=>{e.target.style.display="none"}})})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-1 sm:mb-1.5",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm sm:text-lg font-bold text-darkBlue group-hover:text-sakura transition-colors mb-0.5 line-clamp-2 sm:line-clamp-none",children:e.station.name}),e.station.nameEn&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-mediumBlue mb-1 sm:mb-2 truncate",children:e.station.nameEn})]}),e.score&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5 sm:gap-1 text-sakuraDark flex-shrink-0",children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 fill-current"}),(0,a.jsx)("span",{className:"font-semibold text-xs sm:text-sm",children:e.score.toFixed(1)})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 sm:gap-3 text-xs text-mediumBlue",children:[e.station.prefecture&&(0,a.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,a.jsx)(l.A,{className:"w-3 h-3 flex-shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.station.prefecture.name})]}),e.category&&(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-mediumLightBlue rounded text-darkBlue text-[11px] sm:text-xs",children:T[e.category]||e.category}),(0,a.jsxs)("span",{children:[e.year,t("yearSuffix")]})]})]}),(0,a.jsx)("div",{className:"flex-shrink-0 text-mediumBlue group-hover:text-sakura transition-colors",children:(0,a.jsx)(d.A,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),(0,a.jsx)("div",{className:"flex-shrink-0 pl-14 sm:pl-0",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(y.Q,{stationId:e.station.id,stationName:e.station.name,variant:"compact"})})]})},"".concat(e.station.id,"-").concat(e.year,"-").concat(e.rank)))}),K&&K.total>K.data.length&&(0,a.jsxs)("div",{className:"mt-8 pt-6 border-t-2 border-mediumLightBlue text-center",children:[(0,a.jsx)("p",{className:"text-sm text-mediumBlue mb-4",children:t("showingRange",{start:1,end:K.data.length,total:K.total})}),(0,a.jsx)(g.$,{onClick:()=>F(e=>Math.min(e+20,K.total)),className:"rounded-xl bg-sakura hover:bg-sakuraHover text-white shadow-cute hover:shadow-warm transition-all px-6 py-2.5 text-sm font-medium",disabled:K.data.length>=K.total,children:t("loadMore",{remaining:K.total-K.data.length})})]})]}),K&&0===K.data.length&&(0,a.jsxs)("div",{className:"py-16 sm:py-20 text-center",children:[(0,a.jsx)(o.A,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),(0,a.jsx)("p",{className:"text-gray-500 text-sm sm:text-base",children:t("noResults")})]})]})})})}},6613:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}
1],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]])},6651:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},6995:(e,t,s)=>{"use strict";s.d(t,{y:()=>i});var a=s(2454),r=s(7621);function i(){return(0,a.I)({queryKey:["prefectures"],queryFn:async()=>(await r.F.get("/ref-data/prefectures")).data,staleTime:864e5,gcTime:6048e5})}},7840:(e,t,s)=>{"use strict";s.d(t,{Q:()=>d});var a=s(5155),r=s(9347),i=s(5563),n=s(1873),o=s(7003),l=s(8955),c=s(4171),u=s(2115);function d(e){let{stationId:t,stationName:s,variant:d="default"}=e,m=(0,l.c)("stationActions"),[h,x]=(0,u.useState)(!1),{data:p=!1,isLoading:f}=(0,c._O)(t),g=(0,c.Cu)(),b=(0,c.fF)(),v=async()=>{try{await g.mutateAsync(t)}catch(e){console.error("Failed to toggle favorite:",e)}},y=async()=>{try{await b.mutateAsync(t),x(!0)}catch(e){console.error("Failed to mark as visited:",e)}};return"compact"===d?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(o.$,{onClick:v,disabled:f||g.isPending,size:"sm",variant:p?"default":"outline",className:"rounded-lg text-xs border-2 transition-all ".concat(p?"bg-sakura hover:bg-sakuraHover text-white border-sakura":"border-blue-200 text-gray-700 hover:bg-momo hover:border-sakura"),title:m(p?"removeFavorite":"addFavorite"),children:[(0,a.jsx)(r.A,{className:"w-3.5 h-3.5 mr-1 ".concat(p?"fill-current":"")}),m("favorite")]}),(0,a.jsxs)(o.$,{onClick:y,disabled:h||b.isPending,size:"sm",variant:h?"default":"outline",className:"rounded-lg text-xs border-2 transition-all ".concat(h?"bg-mediumBlue hover:bg-darkBlue text-white border-mediumBlue":"border-blue-200 text-gray-700 hover:bg-momo hover:border-sakura"),title:m("markVisited"),children:[(0,a.jsx)(i.A,{className:"w-3.5 h-3.5 mr-1"}),m("visited")]})]}):(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsxs)(o.$,{onClick:v,disabled:f||g.isPending,variant:p?"default":"outline",className:"rounded-xl border-2 transition-all ".concat(p?"bg-sakura hover:bg-sakuraHover text-white border-sakura shadow-cute":"border-blue-200 text-gray-700 hover:bg-momo hover:border-sakura"),children:[(0,a.jsx)(r.A,{className:"w-4 h-4 mr-2 ".concat(p?"fill-current":"")}),m(g.isPending?"processing":p?"removeFavorite":"addFavorite")]}),(0,a.jsx)(o.$,{onClick:y,disabled:h||b.isPending,variant:h?"default":"outline",className:"rounded-xl border-2 transition-all ".concat(h?"bg-mediumBlue hover:bg-darkBlue text-white border-mediumBlue shadow-cute":"border-blue-200 text-gray-700 hover:bg-momo hover:border-sakura"),children:h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{className:"w-4 h-4 mr-2"}),m("visited")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.A,{className:"w-4 h-4 mr-2"}),m(b.isPending?"recording":"markVisited")]})})]})}},7937:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8559:(e,t,s)=>{"use strict";s.d(t,{$:()=>o,s:()=>n});var a=s(4268),r=s(3049),i=s(2162),n=class extends i.k{#e;#n;#o;#l;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#o=e.mutationCache,this.#n=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#o.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#o.remove(this))}continue(){return this.#l?.continue()??("pending"===this.state.status?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#c({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},a=this.#l=(0,r.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#c({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#c({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#o.canRun(this)}
1),i="pending"===this.state.status,n=!a.canStart();try{if(i)t();else{this.#c({type:"pending",variables:e,isPaused:n}),this.#o.config.onMutate&&await this.#o.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#c({type:"pending",context:t,variables:e,isPaused:n})}let r=await a.start();return await this.#o.config.onSuccess?.(r,e,this.state.context,this,s),await this.options.onSuccess?.(r,e,this.state.context,s),await this.#o.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,e,this.state.context,s),this.#c({type:"success",data:r}),r}catch(t){try{await this.#o.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#o.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#c({type:"error",error:t}),t}finally{this.#l===a&&(this.#l=void 0),this.#o.runNext(this)}}#c(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),a.jG.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)}),this.#o.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},9347:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5105).A)("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]])}},e=>{e.O(0,[401,871,619,849,441,255,358],()=>e(e.s=2305)),_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.