{"version":3,"file":"OzmoTutorialBlock.rQL_KsKd.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/GOg5bdO5qdYVDSxfAKyh/sik77lk2xEqWJVw0j2Q5/OzmoTutorialBlock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition,useEffect,useRef,useState}from\"react\";let ozmoTargetCounter=0;function createUniqueTargetId(){ozmoTargetCounter+=1;const randomPart=typeof globalThis!==\"undefined\"&&\"crypto\"in globalThis?globalThis.crypto.randomUUID().replace(/-/g,\"\"):`${Date.now()}-${Math.random().toString(36).slice(2)}`;return`ozmo-tutorial-${randomPart}-${ozmoTargetCounter}`;}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 980\n * @framerIntrinsicHeight 1100\n */export default function OzmoTutorialBlock(props){const{title,deviceId=\"iphone-16\",topicId=\"feature_new_features-ios-27-new-features\",version=\"27.0.0\",style}=props;const containerRef=useRef(null);const targetIdRef=useRef(\"\");const[hasError,setHasError]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const targetElement=containerRef.current;if(!targetElement)return;if(!targetIdRef.current){targetIdRef.current=createUniqueTargetId();}targetElement.id=targetIdRef.current;const targetId=targetIdRef.current;let currentScript=null;let cancelled=false;targetElement.innerHTML=\"\";startTransition(()=>{setHasError(false);});const runInit=()=>new Promise((resolve,reject)=>{if(cancelled){resolve();return;}const script=document.createElement(\"script\");currentScript=script;script.src=\"https://content.sds.modeaondemand.com/portal/loader.min.js\";script.async=true;script.setAttribute(\"data-target\",targetId);script.setAttribute(\"data-api-key\",\"7f6c695cc28254d9477ea8f4a83a268d8ed8eab0\");script.setAttribute(\"data-embedded\",\"true\");script.setAttribute(\"data-internal-navigation\",\"true\");script.setAttribute(\"data-locale\",\"en-us\");script.setAttribute(\"data-use-detailed-header\",\"false\");script.setAttribute(\"data-use-top-header\",\"false\");script.setAttribute(\"data-use-scroll-restoration\",\"false\");script.setAttribute(\"data-set-page-title\",\"false\");script.setAttribute(\"data-use-cookie-notice\",\"false\");script.setAttribute(\"data-back-link\",\"https://ozmo.com/\");script.setAttribute(\"data-device-id\",deviceId);script.setAttribute(\"data-version\",version);const trimmedTopicId=topicId?.trim()??\"\";if(trimmedTopicId.length>0){script.setAttribute(\"data-answer-id\",trimmedTopicId);}const timeoutId=window.setTimeout(()=>{reject(new Error(\"Ozmo tutorial loader timed out\"));},12e3);script.onload=()=>{window.clearTimeout(timeoutId);resolve();};script.onerror=()=>{window.clearTimeout(timeoutId);reject(new Error(\"Ozmo tutorial loader failed to load\"));};targetElement.appendChild(script);});const enqueue=()=>{const previousQueue=window.__ozmoTutorialQueue??Promise.resolve();const nextQueue=previousQueue.catch(()=>undefined).then(()=>runInit());window.__ozmoTutorialQueue=nextQueue.catch(()=>undefined);return nextQueue;};enqueue().catch(()=>{if(!cancelled){startTransition(()=>{setHasError(true);});}});return()=>{cancelled=true;if(currentScript?.parentNode===targetElement){targetElement.removeChild(currentScript);}targetElement.innerHTML=\"\";};},[deviceId,topicId,version]);return /*#__PURE__*/_jsxs(\"section\",{\"aria-label\":title?.trim()?title:\"Ozmo tutorial\",style:{position:\"relative\",width:\"100%\",maxWidth:\"980px\",minHeight:\"1100px\",margin:\"0 auto\",background:\"transparent\",...style},children:[/*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",minHeight:\"1100px\"}}),hasError?/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:\"12px\",border:\"1px solid #EEEEEE\",borderRadius:\"8px\",background:\"#FFFFFF\",color:\"#000000\",padding:\"12px\",fontSize:\"13px\",lineHeight:1.4,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",pointerEvents:\"none\"},children:\"Tutorial unavailable right now. Please refresh the page or try again shortly.\"}):null]});}addPropertyControls(OzmoTutorialBlock,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"\",placeholder:\"Optional\"},deviceId:{type:ControlType.String,title:\"Device ID\",defaultValue:\"iphone-16\"},topicId:{type:ControlType.String,title:\"Topic ID\",defaultValue:\"feature_new_features-ios-27-new-features\",placeholder:\"Optional\"},version:{type:ControlType.String,title:\"Version\",defaultValue:\"27.0.0\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"OzmoTutorialBlock\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"980\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"1100\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OzmoTutorialBlock.map"],"mappings":"oNAAkM,SAAS,GAAsB,CAAqM,MAApM,IAAmB,EAAuL,iBAApK,OAAO,WAAa,KAAa,WAAW,WAAW,WAAW,OAAO,WAAW,CAAC,CAAC,QAAQ,KAAK,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAsC,GAAG,GAAoB,CAK5d,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,YAAY,UAAQ,2CAA2C,UAAQ,SAAS,SAAO,EAAY,EAAaA,EAAO,IAAI,EAAQ,EAAYA,EAAO,EAAE,EAAO,CAAC,EAAS,GAAaC,EAAS,EAAK,EAAwsE,OAAtsE,MAAc,CAAC,GAAU,IAAS,QAAa,OAAO,SAAW,IAAY,OAAO,IAAM,EAAc,EAAa,QAAQ,GAAG,CAAC,EAAc,OAAO,AAAyB,EAAY,UAAQ,EAAqB,EAAG,EAAc,GAAG,EAAY,QAAQ,IAAM,EAAS,EAAY,QAAY,EAAc,KAAS,EAAU,GAAM,EAAc,UAAU,GAAG,MAAoB,CAAC,EAAY,EAAK,CA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