PageSourceSearch

https://suwaripocket.com/_next/static/immutable/chunks/1tn7ejfd0nv80.js

js suwaripocket.com collected 2026-10-09 23:09:13 UTC 13,790 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,735201,e=>{"use strict";var t=e.i(151039),r=e.i(719918),a=e.i(850330),s=e.i(940491),i=e.i(672259),o=e.i(63270),n=e.i(970065),l=e.i(698511),c=e.i(176428),d=e.i(739128),u=e.i(287204),m=e.i(263518),h=e.i(107453),x=e.i(535416),p=e.i(534862),g=e.i(905097),f=e.i(531457),y=e.i(633520),b=e.i(73891);function C(e,o){let n=[];if((e.limited||o?.categories?.limited)&&n.push((0,t.jsx)(r.Lock,{className:"w-3 h-3 text-gray-700",strokeWidth:2},"limited")),e.isSponsor&&n.push((0,t.jsx)(i.Zap,{className:"w-3 h-3",style:{color:"#f7b400"},strokeWidth:2,fill:"#f7b400"},"sponsor")),e.isFirst&&n.push((0,t.jsx)(a.MapPinCheckInside,{className:"w-3 h-3 text-violet-600",strokeWidth:2},"first")),e.hasCommented&&n.push((0,t.jsx)(s.WandSparkles,{className:"w-3 h-3 text-yellow-600",strokeWidth:2},"comment")),e.userGetCount>=3){var l;let{colorClass:r,Icon:a}=5e3===(l=e.userGetCount)?{colorClass:"text-black",Icon:m.Shield}:3e3===l?{colorClass:"text-yellow-500",Icon:m.Shield}:2e3===l?{colorClass:"text-amber-700",Icon:m.Shield}:1e3===l?{colorClass:"text-gray-500",Icon:m.Shield}:800===l?{colorClass:"text-black",Icon:h.Trophy}:500===l?{colorClass:"text-yellow-500",Icon:h.Trophy}:200===l?{colorClass:"text-amber-700",Icon:h.Trophy}:100===l?{colorClass:"text-gray-500",Icon:h.Trophy}:50===l?{colorClass:"text-yellow-500",Icon:u.Flag}:20===l?{colorClass:"text-amber-700",Icon:u.Flag}:10===l?{colorClass:"text-violet-600",Icon:u.Flag}:3===l?{colorClass:"text-gray-500",Icon:u.Flag}:{};a&&n.push((0,t.jsx)(a,{className:`w-3 h-3 ${r}`,strokeWidth:2},"count"))}return n}e.s(["buildBadgeItems",0,C,"default",0,function({card:e,postDetail:r,onClick:a,className:s,locale:i="ja"}){let u,m=(0,y.useTranslations)("Cards.BenchCard"),h=`https://img.suwaripocket.com/content/post/${r.postId}/main/`,w=(0,f.getImageBaseName)(r.benchcardImg),{prefectures:N,isLoading:T}=(0,c.usePrefectures)(),v=r.tags?.[0]?.name??"",A=r.categories?.star?.map(e=>(0,p.convertStarSlugToDisplay)(e.name)).join("")??"―",I=r.categories?.use?.[0]?.name??"―",j=C(e,r);return(0,t.jsxs)(n.Card,{onClick:a,className:(0,b.cn)("relative bg-neutral-100 px-3 py-4 rounded-xl shadow-sm w-full max-w-[16rem] gap-1",s),children:[(0,t.jsx)("div",{className:"absolute -top-[1px] -left-[1px] z-10",children:(0,t.jsx)("div",{className:`${!T&&N.length>0?(0,d.getBadgeColor)(r.lat,r.lng,N):"bg-gray-400"} text-white text-xs font-semibold px-2 py-1 rounded-tl-xl shadow-sm`,children:v})}),(0,t.jsxs)("div",{className:"absolute top-1 right-4 flex flex-col items-end gap-1",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500 font-medium leading-tight",children:["No.",r.cardData.cardNo]}),j.length>0&&(0,t.jsx)("div",{className:`flex items-center justify-end bg-white border border-gray rounded py-0.5 px-1.5 shadow-sm ${j.length>1?"gap-1":""}`,children:j})]}),(0,t.jsx)("h3",{className:"mt-8 mb-3 text-center text-base font-semibold text-gray-900 truncate px-2",children:(0,p.extractCardTitle)(r.title,i)}),(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("img",{src:w&&!r.benchcardImg.includes("public")?`${h}${w}-350.avif`:r.categories?.use?.some(e=>e.name?.includes("屋内"))?l.DEFAULT_POST_INDOOR:l.DEFAULT_POST_OUTDOOR,alt:r.title,width:230,height:150,className:"bench-card-image w-full aspect-[3/2] object-cover rounded-md",sizes:"(max-width: 768px) 100vw, 350px"})}),(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,t.jsxs)(o.Avatar,{className:"w-10 h-10",src:e.userImg?(0,g.getAvatarImg)(e.userId.toString(),e.userImg,"96x96"):void 0,children:[e.userImg?(0,t.jsx)(o.AvatarImage,{src:e.userImg?(0,g.getAvatarImg)(e.userId.toString(),e.userImg,"96x96"):(0,l.getDefaultAvatarUrl)("96x96"),alt:e.userName,unoptimized:!0,onError:e=>{e.target.style.display="none"}}):null,(0,t.jsx)(o.AvatarFallback,{className:"bg-gray-200 text-black text-sm flex items-center justify-center",children:e.userName?.slice(0,2)||"??"})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-sm text-gray-800",children:e.userName}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:m("visited",{date:(0,x.formatDateOnly)(e.date)})})]})]}),(0,t.jsx)("h4",{className:"text-center text-sm font-bold text-gray-700",children:"DATA"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-1 gap-y-3 bg-white px-2 py-4 rounded-lg text-[10px] text-black font-medium",children:[(0,t.jsxs)("div",{className:"truncate",children:[m("rating"),":",A]}
1),(0,t.jsxs)("div",{className:"truncate",children:[m("place"),":",null!==(u=(0,p.extractWalkingMinutes)(r.stationWalk))?m("walkingTime",{minutes:u}):"―"]}),(0,t.jsxs)("div",{className:"truncate",children:[m("type"),":",r.seatType||"―"]}),(0,t.jsxs)("div",{className:"truncate",children:[m("usage"),":",I]})]})]})}],735201)},176428,739128,e=>{"use strict";var t=e.i(667110);let r=async()=>{let e=await fetch("https://img.suwaripocket.com/public/map/json/prefectures_data.json",{cache:"force-cache"});if(!e.ok)throw Error(`R2からのデータ取得に失敗: ${e.status} ${e.statusText}`);let t=await e.text();if(!t)throw Error("R2からのデータ取得に失敗: 空のレスポンス");let r=JSON.parse(t);return(r.wpq7_prefectures_data||r||[]).map(e=>{let t={code:e.code,name:e.name,geometry:null};return e.id&&(t.id=e.id),e.name_en&&(t.name_en=e.name_en),t.geometry="string"==typeof e.geometry?JSON.parse(e.geometry):e.geometry,e.properties&&(t.properties="string"==typeof e.properties?JSON.parse(e.properties):e.properties),t}).sort((e,t)=>(parseInt(e.code.replace("pref_",""),10)||0)-(parseInt(t.code.replace("pref_",""),10)||0))};e.s(["usePrefectures",0,function(){let{data:e,error:a,isLoading:s,mutate:i}=(0,t.default)("prefectures-from-r2-cdn",r,{revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:31536e6});return{prefectures:e||[],isLoading:s,isError:a,mutate:i}}],176428);let a=(3+8881784197001252e-31)*11102230246251565e-32;function s(e,t,r,a,s){let i,o,n,l,c=t[0],d=a[0],u=0,m=0;d>c==d>-c?(i=c,c=t[++u]):(i=d,d=a[++m]);let h=0;if(u<e&&m<r)for(d>c==d>-c?(o=c+i,n=i-(o-c),c=t[++u]):(o=d+i,n=i-(o-d),d=a[++m]),i=o,0!==n&&(s[h++]=n);u<e&&m<r;)d>c==d>-c?(l=(o=i+c)-i,n=i-(o-l)+(c-l),c=t[++u]):(l=(o=i+d)-i,n=i-(o-l)+(d-l),d=a[++m]),i=o,0!==n&&(s[h++]=n);for(;u<e;)l=(o=i+c)-i,n=i-(o-l)+(c-l),c=t[++u],i=o,0!==n&&(s[h++]=n);for(;m<r;)l=(o=i+d)-i,n=i-(o-l)+(d-l),d=a[++m],i=o,0!==n&&(s[h++]=n);return(0!==i||0===h)&&(s[h++]=i),h}function i(e){return new Float64Array(e)}let o=(3+17763568394002505e-31)*11102230246251565e-32,n=(2+13322676295501878e-31)*11102230246251565e-32,l=(9+7105427357601002e-30)*11102230246251565e-32*11102230246251565e-32,c=i(4),d=i(8),u=i(12),m=i(16),h=i(4);function x(e,t,r={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw Error("coordinates must contain numbers");return function(e,t,r={}){let a={type:"Feature"};return(0===r.id||r.id)&&(a.id=r.id),r.bbox&&(a.bbox=r.bbox),a.properties=t||{},a.geometry=e,a}({type:"Point",coordinates:e},t,r)}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(8),i(8),i(8),i(4),i(8),i(8),i(16),i(12),i(192),i(192),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(8),i(8),i(8),i(8),i(8),i(8),i(8),i(8),i(8),i(4),i(4),i(4),i(8),i(16),i(16),i(16),i(32),i(32),i(48),i(64),i(1152),i(1152),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(4),i(24),i(24),i(24),i(24),i(24),i(24),i(24),i(24),i(24),i(24),i(1152),i(1152),i(1152),i(1152),i(1152),i(2304),i(2304),i(3456),i(5760),i(8),i(8),i(8),i(16),i(24),i(48),i(48),i(96),i(192),i(384),i(384),i(384),i(768),i(96),i(96),i(96),i(1152);var g=function(e,t,r={}){if(!e)throw Error("point is required");if(!t)throw Error("polygon is required");
1let i=function(e){if(!e)throw Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return[...e.geometry.coordinates];if("Point"===e.type)return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw Error("coord must be GeoJSON Point or an Array of numbers")}(e),x="Feature"===t.type?t.geometry:t,p=x.type,g=t.bbox,f=x.coordinates;if(g&&!1==(y=i,(b=g)[0]<=y[0]&&b[1]<=y[1]&&b[2]>=y[0]&&b[3]>=y[1]))return!1;"Polygon"===p&&(f=[f]);for(var y,b,C=0;C<f.length;++C){let e=function(e,t){var r,i,x,p,g,f,y,b,C,w=0,N=e[0],T=e[1],v=t.length;for(r=0;r<v;r++){i=0;var A=t[r],I=A.length-1;if((b=A[0])[0]!==A[I][0]&&b[1]!==A[I][1])throw Error("First and last coordinates in a ring must be the same");for(p=b[0]-N,g=b[1]-T;i<I;i++){if(f=(C=A[i+1])[0]-N,y=C[1]-T,0===g&&0===y){if(f<=0&&p>=0||p<=0&&f>=0)return 0}else if(y>=0&&g<=0||y<=0&&g>=0){if(0===(x=function(e,t,r,i){let x=(t-0)*(r-0),p=(e-0)*(i-0),g=x-p,f=Math.abs(x+p);return Math.abs(g)>=o*f?g:-function(e,t,r,i,o){let x,p,g,f,y,b,C,w,N,T,v,A,I,j,k,E,O,S,M=e-0,R=r-0,_=t-0,F=i-0;j=M*F,C=(b=0x8000001*M)-(b-M),w=M-C,N=(b=0x8000001*F)-(b-F),k=w*(T=F-N)-(j-C*N-w*N-C*T),E=_*R,C=(b=0x8000001*_)-(b-_),w=_-C,N=(b=0x8000001*R)-(b-R),v=k-(O=w*(T=R-N)-(E-C*N-w*N-C*T)),y=k-v,c[0]=k-(v+y)+(y-O),y=(A=j+v)-j,v=(I=j-(A-y)+(v-y))-E,y=I-v,c[1]=I-(v+y)+(y-E),y=(S=A+v)-A,c[2]=A-(S-y)+(v-y),c[3]=S;let P=function(e){let t=e[0];for(let r=1;r<4;r++)t+=e[r];return t}(c),z=n*o;if(P>=z||-P>=z||(y=e-M,x=e-(M+y)+(y-0),y=r-R,g=r-(R+y)+(y-0),y=t-_,p=t-(_+y)+(y-0),y=i-F,f=i-(F+y)+(y-0),0===x&&0===p&&0===g&&0===f)||(z=l*o+a*Math.abs(P),(P+=M*f+F*x-(_*g+R*p))>=z||-P>=z))return P;j=x*F,C=(b=0x8000001*x)-(b-x),w=x-C,N=(b=0x8000001*F)-(b-F),k=w*(T=F-N)-(j-C*N-w*N-C*T),E=p*R,C=(b=0x8000001*p)-(b-p),w=p-C,N=(b=0x8000001*R)-(b-R),v=k-(O=w*(T=R-N)-(E-C*N-w*N-C*T)),y=k-v,h[0]=k-(v+y)+(y-O),y=(A=j+v)-j,v=(I=j-(A-y)+(v-y))-E,y=I-v,h[1]=I-(v+y)+(y-E),y=(S=A+v)-A,h[2]=A-(S-y)+(v-y),h[3]=S;let U=s(4,c,4,h,d);j=M*f,C=(b=0x8000001*M)-(b-M),w=M-C,N=(b=0x8000001*f)-(b-f),k=w*(T=f-N)-(j-C*N-w*N-C*T),E=_*g,C=(b=0x8000001*_)-(b-_),w=_-C,N=(b=0x8000001*g)-(b-g),v=k-(O=w*(T=g-N)-(E-C*N-w*N-C*T)),y=k-v,h[0]=k-(v+y)+(y-O),y=(A=j+v)-j,v=(I=j-(A-y)+(v-y))-E,y=I-v,h[1]=I-(v+y)+(y-E),y=(S=A+v)-A,h[2]=A-(S-y)+(v-y),h[3]=S;let B=s(U,d,4,h,u);j=x*f,C=(b=0x8000001*x)-(b-x),w=x-C,N=(b=0x8000001*f)-(b-f),k=w*(T=f-N)-(j-C*N-w*N-C*T),E=p*g,C=(b=0x8000001*p)-(b-p),w=p-C,N=(b=0x8000001*g)-(b-g),v=k-(O=w*(T=g-N)-(E-C*N-w*N-C*T)),y=k-v,h[0]=k-(v+y)+(y-O),y=(A=j+v)-j,v=(I=j-(A-y)+(v-y))-E,y=I-v,h[1]=I-(v+y)+(y-E),y=(S=A+v)-A,h[2]=A-(S-y)+(v-y),h[3]=S;let L=s(B,u,4,h,m);return m[L-1]}(e,t,r,i,f)}(p,f,g,y)))return 0;(x>0&&y>0&&g<=0||x<0&&y<=0&&g>0)&&w++}
1b=C,g=y,p=f}}return w%2!=0}(i,f[C]);if(0===e&&!r.ignoreBoundary||e)return!0}return!1},f=e.i(805412),y=e.i(97458),b=e.i(387670);function C(e){return f.AREA_COLOR[e]||"bg-gray-400"}function w(e,t,r){let a=x([t,e]);for(let e of r)if(g(a,e.geometry)){let t=e.name;return f.PREFECTURE_TO_AREA[t]||"その他"}return"その他"}class N{tileMap=new Map;initialized=!1;zoom=8;constructor(e){this.buildIndex(e)}buildIndex(e){if(!this.initialized){for(let t of e){let e=t.geometry?.bbox;if(!e&&t.geometry&&(e=this.calculateBBox(t.geometry)),!e){this.addGlobalCandidate(t);continue}let[r,a,s,i]=e,o=(0,y.latLonToTile)(a,r,this.zoom),n=(0,y.latLonToTile)(i,s,this.zoom),l=Math.min(o.x,n.x),c=Math.max(o.x,n.x),d=Math.min(o.y,n.y),u=Math.max(o.y,n.y);for(let e=l;e<=c;e++)for(let r=d;r<=u;r++){let a=`${e}/${r}`;this.tileMap.has(a)||this.tileMap.set(a,[]),this.tileMap.get(a)?.push(t)}}this.initialized=!0}}calculateBBox(e){let t=1/0,r=1/0,a=-1/0,s=-1/0,i=e=>{if("number"==typeof e[0]){let[i,o]=e;i<t&&(t=i),i>a&&(a=i),o<r&&(r=o),o>s&&(s=o)}else e.forEach(i)};return(e.coordinates&&i(e.coordinates),t===1/0)?null:[t,r,a,s]}globalCandidates=[];addGlobalCandidate(e){this.globalCandidates.push(e)}getCandidates(e,t){let r=(0,y.latLonToTile)(e,t,this.zoom),a=`${r.x}/${r.y}`,s=this.tileMap.get(a)||[];return Array.from(new Set([...this.globalCandidates,...s]))}}e.s(["AreaIndexer",0,N,"getAreaByLatLng",0,w,"getAreaColor",0,C,"getAreaFromIndexer",0,function(e,t,r){let a=r.getCandidates(e,t),s=x([t,e]);for(let e of a)if(g(s,e.geometry)){let t=e.name;return f.PREFECTURE_TO_AREA[t]||"その他"}return"その他"},"getAreaOrder",0,function(e){let t=f.AREA_ORDER.indexOf(e);return -1!==t?t+1:999},"getBadgeColor",0,function(e,t,r){return C(w(e,t,r))},"getCountryInfo",0,function(e){let t=(e||"ja").toLowerCase();if(b.COUNTRY_SETTINGS[t])return b.COUNTRY_SETTINGS[t];if(t.includes("zh")||t.includes("tw"))return b.COUNTRY_SETTINGS.tw;let r=(e||"OTH").toUpperCase();return r.length>3&&(r=r.substring(0,3)),{name:r,color:b.DEFAULT_COUNTRY_COLOR}}],739128)},850330,e=>{"use strict";let t=(0,e.i(655256).default)("map-pin-check-inside",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]]);e.s(["MapPinCheckInside",0,t],850330)},263518,e=>{"use strict";let t=(0,e.i(655256).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,t],263518)},107453,e=>{"use strict";let t=(0,e.i(655256).default)("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"}],["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"}]]);e.s(["Trophy",0,t],107453)}]);

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.