PageSourceSearch

https://otoku.ai/assets/days-CghU91yj.js

js otoku.ai collected 2026-10-05 13:36:32 UTC 5,577 bytes, 1 lines download raw bytes

1import{i as e}from"./site-B3er0Zc6.js";import{A as t,C as n,D as r,Dt as i,k as a,m as o,p as s}from"./data-DFVmY6UK.js";import{dt as c,pt as l}from"./catalog-B1G_EEqJ.js";function u(e){let t=new Map;for(let n of a())for(let r of c(n.id,e)){let e=t.get(r.program.id)??{...r,stores:[]};e.stores.push({slug:n.slug,name:n.name}),t.set(r.program.id,e)}return[...t.values()].sort((e,t)=>Number(t.today)-Number(e.today)||(e.next[0]??`9999`).localeCompare(t.next[0]??`9999`))}var d=`日月火水木金土`,f=e=>`${Number(e.slice(5,7))}/${Number(e.slice(8,10))}`,p=e=>d[new Date(`${e}T00:00:00Z`).getUTCDay()],m=(e,t)=>new Date(Date.parse(`${e}T00:00:00Z`)+t*864e5).toISOString().slice(0,10);function h(e){let n=s.programValues.find(t=>t.programId===e.id);if(n?.type===`pct_off`&&n.pctBp)return`${t(n.pctBp)}OFF`;if(n?.type===`yen_off`&&n.amountYen)return`${n.amountYen.toLocaleString()}円引き`;let r=Math.max(0,...o.programCardRates.filter(t=>t.programId===e.id).map(e=>e.bonusBp??0));return r>0?`+${t(r)}`:e.schedule?.value}function g(e){let t=l(e)??e.schedule?.pay;if(t)return t;let n=[...new Set(o.programCardRates.filter(t=>t.programId===e.id).map(e=>o.cardProducts.find(t=>t.id===e.productId)?.name).filter(e=>!!e))];return n.length?n.join(`・`):void 0}var _=(e,t)=>
1{let n=e;return(!n.validFrom||n.validFrom<=t)&&(!n.validTo||n.validTo>=t)};function v(t=e()){return u(t).map(e=>{let t=e.program,i=g(t);return{...e,rule:e.label.replace(/([\s\S]*)$/,``),shortName:t.name.replace(/([^()]*)$/,``).trim(),value:h(t),pay:i,needs:t.requires.map(e=>r(e)).filter(e=>!!e&&!(i&&e.productId&&i.includes(e.label.split(`(`)[0]))).map(e=>e.label),categoryIds:[...new Set(e.stores.map(e=>n(e.slug)?.categoryId).filter(e=>!!e))]}})}function y(e,t){let n=o.ownedOptions.filter(e=>t.has(e.id)),r=new Set(n.map(e=>e.productId).filter(Boolean)),i=[];e.requires.length&&i.push(e.requires.every(e=>t.has(e)));let a=e.payWith;a&&(a.productIds?.length||a.issuerOrgIds?.length||a.ownedIds?.length)&&i.push(!!a.productIds?.some(e=>r.has(e))||!!a.issuerOrgIds?.some(e=>o.cardProducts.some(t=>t.issuerOrgId===e&&r.has(t.id)))||!!a.ownedIds?.some(e=>t.has(e)));let s=o.programCardRates.filter(t=>t.programId===e.id);if(s.length&&i.push(s.some(e=>n.some(t=>t.productId===e.productId&&t.mode===e.mode))),i.length)return i.every(Boolean);let c=e.schedule?.pay??``;if(c.startsWith(`どなたでも`))return!0;let l=e.ownerKind===`payment_service`?b[e.ownerOrgId??``]:void 0;if(l)return t.has(l);if(/WAON POINTで/.test(c))return t.has(`waon-point-card`)}var b={"docomo-fg":`d-barai`,"paypay-corp":`paypay`,kddi:`au-pay`,"au-fs":`au-pay`},x=(e,t)=>e.filter(e=>e.program.schedule&&i(e.program.schedule,t)&&_(e.program,t));function S(t,n=e(),r=14){return Array.from({length:r},(e,r)=>{let i=m(n,r);return{date:i,items:x(t,i)}})}function C(e){let t=new Map;for(let n of e)t.set(n.rule,[...t.get(n.rule)??[],n]);return[...t.entries()].map(([e,t])=>({rule:e,items:t,next:t[0]?.next??[]})).sort((e,t)=>(e.next[0]??`9999`).localeCompare(t.next[0]??`9999`))}var w=(e,t)=>!!e.dayDigits?.includes(t)||!!e.daysOfMonth?.some(e=>e%10===t),T=e=>e.stores.map(e=>e.name).join(`・`);function E(e){let t=T(e),n=e.shortName;for(let r of[t,e.stores[0]?.name??``])if(r&&n.startsWith(r)){n=n.slice(r.length);break}return n.replace(/^の?\s*/,``)||e.shortName}function D(e){return`${T(e)}の${E(e)}(${[e.value&&(e.pay?`${e.pay}で${e.value}`:e.value),e.program.requiresEntry?`事前の登録が必要`:``].filter(Boolean).join(`・`)})`}function O(t,n=e()){let r=[],i=x(t,n),a=S(t,n,62).find(e=>e.items.length&&e.date!==n);r.push({q:`今日はどこがおトクな日?`,a:i.length?`今日(${f(n)}・${p(n)}曜)は、${i.map(D).join(`、`)}です。`:`載っているお店では、今日(${f(n)})のおトクな日はありません。${a?`次は${f(a.date)}(${p(a.date)})の${a.items.map(D).join(`、`)}です。`:``}`});let o=(e,n)=>{let i=t.filter(t=>t.program.schedule&&w(t.program.schedule,e));i.length&&r.push({q:n,a:`${i.map(e=>`${e.rule}:${D(e)}`).join(`。`)}。`})};o(5,`5のつく日(5日・15日・25日)はどこでおトク?`),o(0,`0のつく日(10日・20日・30日)におトクなのは?`),o(8,`8のつく日(8日・18日・28日)はどこがおトク?`);let s=t.filter(e=>e.program.name.includes(`感謝デー`));s.length&&r.push({q:`感謝デーは何日?`,a:`${s.map(e=>`${e.shortName}は${e.rule}。${e.program.schedule?.short??``}`).join(``)}`});let c=t.filter(e=>e.program.schedule?.weekdays?.some(e=>e===0||e===5||e===6));c.length&&r.push({q:`週末(金・土・日曜)におトクな日は?`,a:`${c.map(e=>`${e.rule}:${D(e)}`).join(`。`)}。`});let l=t.filter(e=>e.program.requiresEntry);return l.length&&r.push({q:`おトクな日にエントリーは必要?`,a:`${l.map(e=>e.shortName).join(`・`)}は、事前のエントリーが必要です(開催日ごと・月ごとなど、特典によって違います)。${t.length-l.length>0?`${t.filter(e=>!e.program.requiresEntry).map(e=>e.shortName).join(`・`)}は、決まった払い方で払えばエントリーは要りません。`:``}`}),r.push({q:`載っている日付は予想ですか?`,a:`予想ではありません。各社が公式に発表しているくり返しのルール(毎月20日・30日など)から計算しています。公式が「この日は開催しない」と告知した日は外しています。発表前の特別な開催日は載せていません。`}),r}export{v as a,S as c,p as d,y as i,f as l,O as n,T as o,C as r,E as s,m as t,x as u};

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.