{"version":3,"file":"shared-lib.TeirslFE.mjs","names":["React.useRef","React.useState","_Fragment","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","init_npm_react_dom_18_3_1","l","_e","Ha","p","c","init_jsx_runtime","ce","de","init_framer_DymZktPS","RenderTarget","ControlType","addPropertyControls","SwitchCursor","props","ref","isCanvas","mounted","setMounted","reduce","st","x","y","tx","ty","inside","raf","frame","look","t","el","q","move","e","leave","down","up","loop","css","size","fill","stroke","init_SwitchCursor"],"sources":["https:/framerusercontent.com/modules/xxzoGfhO7aaiZU11axZW/KuTBKS5wi2WE8mBzkKiJ/SwitchCursor.js"],"sourcesContent":["// @ts-nocheck\n// SwitchCursor — 全ページ共通の丸いカーソル（黄色・チャコールの縁・直径28px）\n// - 少し遅れてついてくる。リンク・ボタンの上で少し大きく、押すと縮む\n// - マウスなど細かく指せる端末だけ。タッチ端末・動きを減らす設定では何もしない（減らす設定では遅れなしで追従）\n// - data-cursor=\"q\" の上（FV の当たりのロゴマーク）では、少し大きくなって丸の中に「？」が出る\n// - Framer のキャンバス上では、ふつうのカーソルを消さずに見本の丸だけ表示する\n// 置き方：各ページ（またはページ共通のレイアウト）に1つ置く。カーソル本体は body の直下に出るので、置き場所・大きさは見た目に影響しない（キャンバス上の見本だけ 28px）\n// 作成：Cowork（2026-10-27、試作「SWITCH トップ試作」から移植）\n// 更新：Cowork（2026-10-28、「？」の表示）\n// 更新：Cowork（2026-10-28 午後、マウスが止まっていても下のものが変われば合わせる。\n//       FV でマスがカーソルの真下で開いてロゴが出たとき・/play でカードをめくったときに、丸の大きさ・「？」が古いままだったため）\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 28\n * @framerIntrinsicHeight 28\n */export default function SwitchCursor(props){const{size=28,fill=\"#FFE100\",stroke=\"#363633\"}=props;const ref=React.useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[mounted,setMounted]=React.useState(false);React.useEffect(()=>setMounted(true),[]);React.useEffect(()=>{if(isCanvas||!mounted)return;if(!window.matchMedia(\"(pointer:fine)\").matches)return;const c=ref.current;if(!c)return;const reduce=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;// ふつうのカーソルを隠す\nconst st=document.createElement(\"style\");st.textContent=\"@media (pointer:fine){html,body,body *{cursor:none!important}}\";document.head.appendChild(st);let x=-100,y=-100,tx=-100,ty=-100,inside=false,raf=0,frame=0;const look=el=>{const t=el&&el.closest&&el.closest(\"a,button,[role=button],[data-hot],[data-cursor=q]\");const q=el&&el.closest&&el.closest(\"[data-cursor=q]\");c.classList.toggle(\"hot\",!!t);c.classList.toggle(\"q\",!!q);};const move=e=>{if(e.pointerType===\"touch\")return;if(!inside){inside=true;x=tx=e.clientX;y=ty=e.clientY;c.classList.add(\"show\");}tx=e.clientX;ty=e.clientY;look(e.target);};const leave=()=>{inside=false;c.classList.remove(\"show\",\"press\",\"hot\",\"q\");};const down=()=>c.classList.add(\"press\");const up=()=>c.classList.remove(\"press\");document.addEventListener(\"pointermove\",move,{passive:true});document.documentElement.addEventListener(\"mouseleave\",leave);document.addEventListener(\"pointerdown\",down);window.addEventListener(\"pointerup\",up);const loop=()=>{x+=(tx-x)*(reduce?1:.3);y+=(ty-y)*(reduce?1:.3);c.style.transform=`translate(${x}px,${y}px)`;// マウスが止まっていても、約0.1秒ごとに真下のものを確かめ直す\nif(inside&&++frame%6===0)look(document.elementFromPoint(tx,ty));raf=requestAnimationFrame(loop);};loop();return()=>{cancelAnimationFrame(raf);document.removeEventListener(\"pointermove\",move);document.documentElement.removeEventListener(\"mouseleave\",leave);document.removeEventListener(\"pointerdown\",down);window.removeEventListener(\"pointerup\",up);st.remove();};},[isCanvas,mounted]);const css=`\n.scur{position:fixed;left:0;top:0;width:${size}px;height:${size}px;margin:${-size/2}px 0 0 ${-size/2}px;pointer-events:none;z-index:2147483000;opacity:0;transform:translate(-100px,-100px);transition:opacity .2s ease}\n.scur i{position:absolute;inset:0;border-radius:50%;background:${fill};border:2px solid ${stroke};box-sizing:border-box;transition:transform .18s cubic-bezier(.3,1.6,.5,1)}\n.scur.show{opacity:1}\n.scur.press i{transform:scale(.72)}\n.scur.hot i{transform:scale(1.45)}\n.scur.hot.press i{transform:scale(1)}\n.scur b{position:absolute;inset:0;display:grid;place-items:center;font:400 ${Math.round(size*.6)}px/1 \"WDXL Lubrifont JP N\",sans-serif;color:${stroke};opacity:0;transform:scale(.4) rotate(-20deg);transition:opacity .15s ease,transform .3s cubic-bezier(.3,1.7,.5,1)}\n.scur.q b{opacity:1;transform:none}\n.scur.q i{transform:scale(1.6)}\n.scur.q.press i{transform:scale(1.2)}\n`;if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,borderRadius:\"50%\",background:fill,border:`2px solid ${stroke}`,boxSizing:\"border-box\"}});}if(!mounted)return null;// 部品の置き場所に関係なく、画面の左上を基準に動かすため body に出す\nreturn /*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:css}),/*#__PURE__*/_jsx(\"div\",{ref:ref,className:\"scur\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"i\",{children:/*#__PURE__*/_jsx(\"b\",{children:\"?\"})})})]}),document.body);}addPropertyControls(SwitchCursor,{size:{type:ControlType.Number,title:\"直径\",min:12,max:60,step:1,defaultValue:28},fill:{type:ControlType.Color,title:\"塗り\",defaultValue:\"#FFE100\"},stroke:{type:ControlType.Color,title:\"縁\",defaultValue:\"#363633\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SwitchCursor\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\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