{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/0Z6h18HRiRLYJQUsKLNH/K7cyRMZFYvjrXPED0H2T/CookieHelper.js", "ssg:https://framerusercontent.com/modules/Bfa5okr8o9yfOR80SYOu/b4mrGaz1vp7YH46Wpr9d/RestAPI.js", "ssg:https://framerusercontent.com/modules/fN0R6fsZjgouRe6eP7w0/1yMYxs9xXidj9THXfW05/BtnFunc.js", "ssg:https://framer.com/m/framer/store.js@^1.0.0", "ssg:https://framerusercontent.com/modules/NL9dE0KFreILKrxLuKLU/4yPjXM8TybgiArmrPhV5/Func.js"],
  "sourcesContent": ["import*as GlobalStr from\"https://framerusercontent.com/modules/4iyxnBseOb1MSiSEnhRF/W0jBoXTvMN8JigwZuiR7/Str.js\";export const createCookie=(key,value)=>{// \uD604\uC7AC \uC2DC\uAC04\uC73C\uB85C\uBD80\uD130 1\uC2DC\uAC04 \uB3D9\uC548 \uC720\uD6A8\nconst currentTime=new Date;const expirationTime=new Date(currentTime.getTime()+60*60*24*1e3);const expirationUTCString=expirationTime.toUTCString();document.cookie=`${key}=${value}; expires=${expirationUTCString}; path=/`;};export const getCookies=name=>{const cookies=document.cookie.split(\";\");for(let cookie of cookies){const[cookieName,cookieValue]=cookie.trim().split(\"=\");if(cookieName===name){return cookieValue;}}if(window.location.href.includes(\"tftas.com\")){deleteCookie(\"csrftoken\");deleteCookie(\"sessionid\");deleteCookie(\"token\");deleteCookie(\"userId\");window.location.href=`${GlobalStr.loginPage}?reason=no ${name}`;}};export function deleteCookie(cookieName){// \uD604\uC7AC \uC2DC\uAC04\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4.\nvar now=new Date;// \uD604\uC7AC \uC2DC\uAC04 \uC774\uC804\uC73C\uB85C \uB9CC\uB8CC \uB0A0\uC9DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\nnow.setFullYear(now.getFullYear()-1);// \uCFE0\uD0A4 \uB9CC\uB8CC\uB97C \uC124\uC815\uD558\uC5EC \uCFE0\uD0A4\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4.\ndocument.cookie=cookieName+\"=;expires=\"+now.toUTCString()+\"; domain=.tftas.com; path=/\";}\nexport const __FramerMetadata__ = {\"exports\":{\"createCookie\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCookies\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"deleteCookie\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CookieHelper.map", "import*as CookieHelper from\"https://framerusercontent.com/modules/0Z6h18HRiRLYJQUsKLNH/K7cyRMZFYvjrXPED0H2T/CookieHelper.js\";const maxCallFB=5;let callFB=0;// headers: new Headers()\n// body: jsonString\nexport async function RestAPI(url,method,headers,body){try{if(headers===undefined||headers==null){headers=new Headers;}let options={method:method,headers:headers};// \uBC14\uB514\uAC12\uC774 \uC788\uC73C\uBA74 \uCD94\uAC00\nif(body!==undefined){options[\"body\"]=body;}const response=await fetch(url,options).then(response=>response.json().then(json=>{if(url==\"https://bpwjhfydhg.execute-api.ap-northeast-2.amazonaws.com/v1/api/log_collector\"){return\"\";}else{return JSON.stringify(json);}})).catch(err=>{sendLogToFluentBit(`RestAPI.tsx Error\nEndpoint: ${url}${body?`\nBody: ${body}`:null}\nError: ${err}`);console.error(err);});return response;}catch(err){sendLogToFluentBit(`RestAPI.tsx Error\nEndpoint: ${url}${body?`\nBody: ${body}`:null}\nError: ${err}`);console.error(\"Error fetching data:\",err);return\"\";}}function sendLogToFluentBit(err){if(callFB>=maxCallFB){console.error(\"Fluent Bit\uC5D0 \uB85C\uADF8\uB97C \uC804\uC1A1\uD558\uC9C0 \uBABB \uD558\uC600\uC2B5\uB2C8\uB2E4.\");callFB=0;return;}callFB++;const headers=new Headers;headers.append(\"user-id\",CookieHelper.getCookies(\"userId\"));headers.append(\"Content-Type\",\"application/json\");const bodyString=`{\n                    \"message\": \"Error: ${err}\"\n                }`;RestAPI(\"https://bpwjhfydhg.execute-api.ap-northeast-2.amazonaws.com/v1/api/log_collector\",\"POST\",headers,bodyString).then(result=>{let jsonResult=JSON.parse(result);if(jsonResult.status_code==200){console.log(`Success: (${jsonResult.status_code}) ${jsonResult.message}`);}else{console.log(`Error: (${jsonResult.status_code}) ${jsonResult.message}`);}}).catch(e=>{console.error(e);sendLogToFluentBit(`RestAPI.tsx Error\nEndpoint: Fluent Bit\nError: ${err}`);});}\nexport const __FramerMetadata__ = {\"exports\":{\"RestAPI\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}", "import{jsx as _jsx}from\"react/jsx-runtime\";import{useState}from\"react\";import*as CookieHelper from\"https://framerusercontent.com/modules/0Z6h18HRiRLYJQUsKLNH/K7cyRMZFYvjrXPED0H2T/CookieHelper.js\";import{RestAPI}from\"https://framerusercontent.com/modules/Bfa5okr8o9yfOR80SYOu/b4mrGaz1vp7YH46Wpr9d/RestAPI.js\";export function onCreateProject(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{btnClick(\"openCreateProjectBtn\");// window.open(\n//     \"https://api.tftas.com/projects/create\",\n//     \"_blank\"\n// ) // \uC0C8 \uD0ED\n// window.location.href = \"https://api.tftas.com/projects\"\n}});};}const btnClick=id=>{const button=document.getElementById(id);if(button){// \uBC84\uD2BC\uC774 \uC874\uC7AC\uD560 \uACBD\uC6B0 \uD074\uB9AD\uD569\uB2C8\uB2E4.\nbutton.click();}};export function refreshDataLabeling(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{btnClick(\"refreshDataLabelingBtn\");}});};}export function refreshDeployModel(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{btnClick(\"refreshDeployModel\");}});};}export function refreshModelLearning(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{btnClick(\"refreshModelLearning\");}});};}export function refreshData(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{window.location.reload();}});};}export function logout(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const headers=new Headers;headers.append(\"Content-Type\",\"application/json\");headers.append(\"user-id\",CookieHelper.getCookies(\"userId\"));headers.append(\"token\",CookieHelper.getCookies(\"token\"));RestAPI(\"https://bpwjhfydhg.execute-api.ap-northeast-2.amazonaws.com/v1/api/user/logout\",\"POST\",headers).then(result=>{let jsonResult=JSON.parse(result);if(jsonResult.status_code==200){console.log(`Success: (${jsonResult.status_code}) ${jsonResult.message}`);CookieHelper.deleteCookie(\"csrftoken\");CookieHelper.deleteCookie(\"sessionid\");CookieHelper.deleteCookie(\"token\");CookieHelper.deleteCookie(\"userId\");window.location.href=\"/\";}else{console.log(`Error: (${jsonResult.status_code}) ${jsonResult.message}`);CookieHelper.deleteCookie(\"csrftoken\");CookieHelper.deleteCookie(\"sessionid\");CookieHelper.deleteCookie(\"token\");CookieHelper.deleteCookie(\"userId\");window.location.href=\"/\";}}).catch(e=>{console.log(`Error: (${e}`);});}});};}export function resginBtn(Component){return props=>{const[store,setStore]=useState();const onConfirm=()=>{const headers=new Headers;headers.append(\"user-id\",CookieHelper.getCookies(\"userId\"));RestAPI(\"https://bpwjhfydhg.execute-api.ap-northeast-2.amazonaws.com/v1/api/user/delete\",\"POST\",headers).then(result=>{let jsonResult=JSON.parse(result);if(jsonResult.status_code==200){console.log(`Success: (${jsonResult.status_code}) ${jsonResult.message}`);window.location.href=\"/\";}else{console.log(`Error: (${jsonResult.status_code}) ${jsonResult.message}`);}}).catch(e=>console.log(e));};return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"logout\":{\"type\":\"reactHoc\",\"name\":\"logout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"refreshModelLearning\":{\"type\":\"reactHoc\",\"name\":\"refreshModelLearning\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"refreshDataLabeling\":{\"type\":\"reactHoc\",\"name\":\"refreshDataLabeling\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"refreshDeployModel\":{\"type\":\"reactHoc\",\"name\":\"refreshDeployModel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"onCreateProject\":{\"type\":\"reactHoc\",\"name\":\"onCreateProject\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resginBtn\":{\"type\":\"reactHoc\",\"name\":\"resginBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"refreshData\":{\"type\":\"reactHoc\",\"name\":\"refreshData\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}", "import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map", "import*as CookieHelper from\"https://framerusercontent.com/modules/0Z6h18HRiRLYJQUsKLNH/K7cyRMZFYvjrXPED0H2T/CookieHelper.js\";import*as GlobalStr from\"https://framerusercontent.com/modules/4iyxnBseOb1MSiSEnhRF/W0jBoXTvMN8JigwZuiR7/Str.js\";export function resetToLogin(origin){CookieHelper.deleteCookie(\"token\");CookieHelper.deleteCookie(\"userId\");console.log(`${window.location.href.includes(\"tftas.com\")} CurURL: ${window.location.href}`);if(window.location.href.includes(\"tftas.com\")){window.location.href=`${GlobalStr.loginPage}?origin=${origin} API failed`;}}\nexport const __FramerMetadata__ = {\"exports\":{\"resetToLogin\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "yJAAwH,IAAMA,EAAa,CAACC,EAAIC,IAAQ,CACxJ,IAAMC,EAAY,IAAI,KAA6EC,EAAnD,IAAI,KAAKD,EAAY,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,EAA2C,YAAY,EAAE,SAAS,OAAO,GAAGF,CAAG,IAAIC,CAAK,aAAaE,CAAmB,UAAW,EAAeC,EAAWC,GAAM,CAAC,IAAMC,EAAQ,SAAS,OAAO,MAAM,GAAG,EAAE,QAAQC,KAAUD,EAAQ,CAAC,GAAK,CAACE,EAAWC,CAAW,EAAEF,EAAO,KAAK,EAAE,MAAM,GAAG,EAAE,GAAGC,IAAaH,EAAM,OAAOI,CAAa,CAAIC,EAAO,SAAS,KAAK,SAAS,WAAW,IAAGC,EAAa,WAAW,EAAEA,EAAa,WAAW,EAAEA,EAAa,OAAO,EAAEA,EAAa,QAAQ,EAAED,EAAO,SAAS,KAAK,GAAaE,CAAS,cAAcP,CAAI,GAAI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AS,CCfuM,SAASM,EAAaC,EAAO,CAAcC,EAAa,OAAO,EAAeA,EAAa,QAAQ,EAAE,QAAQ,IAAI,GAAGC,EAAO,SAAS,KAAK,SAAS,WAAW,CAAC,YAAYA,EAAO,SAAS,IAAI,EAAE,EAAKA,EAAO,SAAS,KAAK,SAAS,WAAW,IAAGA,EAAO,SAAS,KAAK,GAAaC,CAAS,WAAWH,CAAM,cAAe",
  "names": ["createCookie", "key", "value", "currentTime", "expirationUTCString", "getCookies", "name", "cookies", "cookie", "cookieName", "cookieValue", "window", "deleteCookie", "loginPage", "now", "maxCallFB", "callFB", "RestAPI", "url", "method", "headers", "body", "options", "response", "json", "err", "sendLogToFluentBit", "getCookies", "bodyString", "result", "jsonResult", "e", "onCreateProject", "Component", "props", "p", "btnClick", "id", "button", "refreshDeployModel", "Component", "props", "p", "btnClick", "refreshModelLearning", "logout", "Component", "props", "p", "headers", "getCookies", "RestAPI", "result", "jsonResult", "deleteCookie", "window", "e", "createStore", "state1", "dataStore", "Data", "setDataStore", "newState", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "resetToLogin", "origin", "deleteCookie", "window", "loginPage"]
}
