{"version":3,"file":"FilterStack.DvtyCXpX.mjs","names":["React.useContext","React.useMemo","React.Fragment","useRef","React.useId","Image","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/LJLeSB1O7v1nyqOR749o/gRKbOOOcXfnjpdt7wKx9/ZvLRiCMsk.js","https:/framerusercontent.com/modules/ndrpvxlcIBMPmTUUxxYS/cF8PUOwXEZtieKomcnGK/FilterStack.js"],"sourcesContent":["// Generated by Framer (6aa4fc0)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,cx,getLoadingLazyAtYPosition,Image,Link,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const serializationHash=\"framer-E2e0N\";const variantClassNames={m8s6pQUBF:\"framer-v-1hq2r0h\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const transformTemplate1=(_,t)=>`translateY(-50%) ${t}`;const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({defaultVariant:\"m8s6pQUBF\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsxs(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-1hq2r0h\",className,classNames),\"data-framer-name\":\"Variant 1\",layoutDependency:layoutDependency,layoutId:\"m8s6pQUBF\",ref:refBinding,style:{...style},children:[/*#__PURE__*/_jsx(motion.div,{className:\"framer-4p69yf\",\"data-framer-name\":\"top-line\",layoutDependency:layoutDependency,layoutId:\"ym9O8zbwN\",style:{backgroundColor:\"rgb(0, 187, 255)\"}}),/*#__PURE__*/_jsxs(motion.div,{className:\"framer-yub9l8\",\"data-framer-name\":\"content\",layoutDependency:layoutDependency,layoutId:\"U0Spczfjz\",children:[/*#__PURE__*/_jsx(Link,{href:{webPageId:\"e7dHFRLI2\"},motionChild:true,nodeId:\"dDrAGwFjR\",openInNewTab:false,scopeId:\"ZvLRiCMsk\",children:/*#__PURE__*/_jsx(Image,{as:\"a\",background:{alt:\"\",fit:\"fit\",loading:getLoadingLazyAtYPosition((componentViewport?.y||0)+0+(((componentViewport?.height||68)-0-(6+Math.max(0,((componentViewport?.height||68)-0-6)/1)*1+0))/2+6+0)+(0+(Math.max(0,((componentViewport?.height||68)-0-6)/1)*1-0-41)/2)),pixelHeight:50,pixelWidth:200,positionX:\"center\",positionY:\"center\",src:\"https://framerusercontent.com/images/CbNOwR5VfBnMNjMnkNd5eDeDT4.png\"},className:\"framer-151mr41 framer-2mxkj5\",\"data-framer-name\":\"logo\",layoutDependency:layoutDependency,layoutId:\"dDrAGwFjR\"})}),/*#__PURE__*/_jsx(motion.div,{className:\"framer-1jkbvfh\",\"data-framer-name\":\"content-right\",layoutDependency:layoutDependency,layoutId:\"S7F7f0MQF\",transformTemplate:transformTemplate1})]})]})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-E2e0N.framer-2mxkj5, .framer-E2e0N .framer-2mxkj5 { display: block; }\",\".framer-E2e0N.framer-1hq2r0h { align-content: center; align-items: center; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0px; height: 68px; justify-content: center; overflow: hidden; padding: 0px; position: relative; width: 390px; }\",\".framer-E2e0N .framer-4p69yf { flex: none; height: 6px; position: relative; width: 100%; }\",\".framer-E2e0N .framer-yub9l8 { align-content: center; align-items: center; display: flex; flex: 1 0 0px; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: 1px; justify-content: center; padding: 0px; position: relative; width: 100%; }\",\".framer-E2e0N .framer-151mr41 { align-content: center; align-items: center; display: flex; flex: none; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: 41px; justify-content: center; overflow: hidden; padding: 0px; position: relative; text-decoration: none; width: 200px; }\",\".framer-E2e0N .framer-1jkbvfh { align-content: center; align-items: center; display: flex; flex: none; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: min-content; justify-content: center; min-height: 31px; min-width: 100px; overflow: hidden; padding: 0px; position: absolute; right: 12px; top: 50%; width: min-content; z-index: 1; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 68\n * @framerIntrinsicWidth 390\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerZvLRiCMsk=withCSS(Component,css,\"framer-E2e0N\");export default FramerZvLRiCMsk;FramerZvLRiCMsk.displayName=\"header 2\";FramerZvLRiCMsk.defaultProps={height:68,width:390};addFonts(FramerZvLRiCMsk,[{explicitInter:true,fonts:[]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerZvLRiCMsk\",\"slots\":[],\"annotations\":{\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"390\",\"framerImmutableVariables\":\"true\",\"framerAutoSizeImages\":\"true\",\"framerIntrinsicHeight\":\"68\",\"framerComponentViewportWidth\":\"true\",\"framerDisplayContentsDiv\":\"false\",\"framerColorSyntax\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ZvLRiCMsk.map","/* ------------------------------------------------------------------\n   FilterStack – 親 Stack 用オーバーライド\n   ---------------------------------------------------------------\n   ✔ 子フレームの aria-label から\n       keys=キー1,キー2;order=N\n     をパースして初期ソート & 絞り込み\n   ✔ URL クエリ\n       /result?keys=キー1,キー2\n     を読み取り AND 条件でフィルタ\n   使い方\n   1. 子フレームに aria-label をセット\n        aria-label=\"keys=低資金派,初心者向け;order=1\"\n   2. 親 Stack にこの FilterStack をアタッチ\n------------------------------------------------------------------ */\"use client\";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function FilterStack(Component){return props=>{/* ---------- SSR スキップ ------------------------------ */if(typeof window===\"undefined\")return /*#__PURE__*/_jsx(Component,{...props});/* ---------- URL → アクティブキー --------------------- */const[activeKeys,setActiveKeys]=useState(new Set);useEffect(()=>{const qs=new URLSearchParams(window.location.search);const keys=qs.get(\"keys\")?.split(\",\").map(k=>k.trim()).filter(Boolean)??[];setActiveKeys(new Set(keys));},[]);/* ---------- DOM 反映 -------------------------------- */useEffect(()=>{const layer=document.querySelector(`.${props.className}`);if(!layer)return;const cards=Array.from(layer.children);/* aria-label → { order, keys[] } 抽出 */const parse=(label=\"\")=>{const order=parseInt(label.match(/order=([0-9]+)/)?.[1]||\"0\",10);const keys=label.match(/keys=([^;]+)/)?.[1].split(\",\").map(k=>k.trim())||[];return{order,keys};};/* 1) order 昇順ソート */cards.sort((a,b)=>parse(a.getAttribute(\"aria-label\")).order-parse(b.getAttribute(\"aria-label\")).order);/* 2) keys フィルタ */cards.forEach(card=>{const{keys}=parse(card.getAttribute(\"aria-label\"));const show=activeKeys.size===0||Array.from(activeKeys).every(k=>keys.includes(k));card.classList.toggle(\"hidden\",!show);});/* 3) 並べ替え後に再配置 */cards.forEach(card=>layer.appendChild(card));},[activeKeys,props.className]);/* ---------- render ---------------------------------- */return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    .${props.className} .hidden { display: none; }\n                `})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"FilterStack\":{\"type\":\"reactHoc\",\"name\":\"FilterStack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FilterStack.map"],"mappings":"gZACyD,IAAgI,IAAkE,IAA4B,CAAgC,EAAkB,eAAqB,EAAkB,CAAC,UAAU,mBAAmB,CAA8L,EAAY,CAAC,OAAO,GAAG,MAAM,EAAE,SAAS,GAAG,KAAK,SAAS,CAAO,GAAoB,EAAE,IAAI,oBAAoB,IAAU,GAAY,CAAC,QAAM,cAAY,CAAC,IAAM,EAAOA,EAAiB,EAAoB,CAAO,EAAW,GAAO,EAAO,WAAiB,EAAaC,OAAmB,CAAC,GAAG,EAAO,aAAW,EAAE,CAAC,KAAK,UAAU,EAAW,CAAC,CAAC,CAAC,OAAoB,EAAK,EAAoB,SAAS,CAAC,MAAM,EAAsB,WAAS,CAAC,EAAS,EAAS,EAAO,OAAOC,EAAe,CAAO,GAAU,CAAC,S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