{"version":3,"file":"SharedFormCode.CRLBLMZr.mjs","names":[],"sources":["https:/framerusercontent.com/modules/MVzz2HKOSVPXKxZqPZdW/YpgjMrjs07OJc6jTFbm7/SharedFormCode.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType}from\"framer\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";export const useFormStore=createStore({});export const SUPABASE_KEY=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1ocndkdnNpdHJ6Y3pybmV1YXhnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDkxNjgyNzgsImV4cCI6MjAyNDc0NDI3OH0.4Pyysu1vMhnd1k1hbOSZ2lcx7hr1iH6MgX7fyTScYmU\";export function FormIcon(props){var _icon_image;const{icon,style}=props;if(!icon){return null;}return[/*#__PURE__*/_jsx(\"div\",{className:\"form-icon\",style:{width:icon.size,height:icon.size,opacity:icon.opacity,color:icon.color||props.fontColor,backgroundImage:icon.type==\"image\"&&`url(${(_icon_image=icon.image)===null||_icon_image===void 0?void 0:_icon_image.src})`,backgroundSize:\"cover\",backgroundPosition:\"center\",pointerEvents:\"none\",...style},dangerouslySetInnerHTML:icon.type==\"svg\"?{__html:icon.svg.replace(/width=\"(\\d+)\"/,`width=\"${icon.size}\"`).replace(/height=\"(\\d+)\"/,`width=\"${icon.size}\"`)}:undefined}),(icon===null||icon===void 0?void 0:icon.type)==\"svg\"&&/*#__PURE__*/_jsx(\"style\",{children:`.form-icon svg { display: block; }`})];}export const iconPropertyControls={type:ControlType.Object,optional:true,controls:{position:{type:ControlType.Enum,defaultValue:\"left\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],displaySegmentedControl:true},gap:{type:ControlType.Number,defaultValue:12,min:0,step:1},type:{type:ControlType.Enum,defaultValue:\"svg\",options:[\"svg\",\"image\"],optionTitles:[\"SVG\",\"Image\"],displaySegmentedControl:true},svg:{type:ControlType.String,placeholder:\"<svg></svg>\",displayTextArea:true,title:\"SVG\",hidden:props=>props.type!=\"svg\"},image:{type:ControlType.ResponsiveImage,hidden:props=>props.type!=\"image\"},color:{type:ControlType.Color,optional:true,hidden:props=>props.type!=\"svg\"},size:{type:ControlType.Number,defaultValue:24,min:1,step:1},opacity:{type:ControlType.Number,defaultValue:1,min:0,max:1,step:.01}}};export const shadowPropertyControls={type:ControlType.Object,optional:true,controls:{color:{type:ControlType.Color,defaultValue:\"rgba(0, 0, 0, 0.25)\"},x:{type:ControlType.Number,defaultValue:0,displayStepper:true},y:{type:ControlType.Number,defaultValue:2,displayStepper:true},blur:{type:ControlType.Number,defaultValue:4,min:0,displayStepper:true},spread:{type:ControlType.Number,defaultValue:0,displayStepper:true}}};class FramerFormsSDK{fetchPresignedURL(file){var _file_name;return fetch(`https://api.framerforms.com/s3/signed-url`,{method:\"POST\",body:JSON.stringify({file_name:(_file_name=file.name)===null||_file_name===void 0?void 0:_file_name.replace(/\\s+/g,\"-\")}),headers:{\"Content-Type\":\"application/json\"}}).then(async response=>{const responseBody=await response.json();if(response.status>200){throw new Error(responseBody.errorMessage);}return responseBody;});}postToPresignedURL(file,presignedUrl){return new Promise((resolve,reject)=>{fetch(presignedUrl,{method:\"PUT\",body:file}).then(()=>resolve({fileLocation:removeURLParameters(presignedUrl)})).catch(reject);});}uploadFile(file){return new Promise((resolve,reject)=>{this.fetchPresignedURL(file).then(({presignedUrl})=>this.postToPresignedURL(file,presignedUrl)).then(resolve).catch(reject);});}}const framerFormsSDK=new FramerFormsSDK;export{framerFormsSDK};function removeURLParameters(urlString){const url=new URL(urlString);url.search=\"\";return url.toString();}\nexport const __FramerMetadata__ = {\"exports\":{\"iconPropertyControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shadowPropertyControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFormStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SUPABASE_KEY\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FormIcon\":{\"type\":\"reactComponent\",\"name\":\"FormIcon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"framerFormsSDK\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SharedFormCode.map"],"mappings":"8MAAua,SAAgB,EAAS,EAAM,CAAiB,GAAK,CAAC,OAAK,SAAO,EAA6B,OAAnB,EAAyB,CAAc,EAAK,MAAM,CAAC,UAAU,YAAY,MAAM,CAAC,MAAM,EAAK,KAAK,OAAO,EAAK,KAAK,QAAQ,EAAK,QAAQ,MAAM,EAAK,OAAO,EAAM,UAAU,gBAAgB,EAAK,MAAM,SAAS,OAAoB,EAAK,OAAuD,IAAI,GAAG,eAAe,QAAQ,mBAAmB,SAAS,cAAc,OAAO,GAAG,CAAK,EAAE,wBAAwB,EAAK,MAAM,MAAM,CAAC,OAAO,EAAK,IAAI,QAAQ,gBAAgB,UAAU,EAAK,KAAK,EAAE,CAAC,CAAC,QAAQ,iBAAiB,UAAU,EAAK,KAAK,EAAE,CAAC,EAAE,IAAA,EAAS,CAAC,EAAG,GAAuC,MAAO,OAAoB,EAAK,QAAQ,CAAC,SAAS,oCAAoC,CAAC,CAAC,EAAhpB,IAAkpB,CAA+lE,SAAS,EAAoB,EAAU,CAAC,IAAM,EAAI,IAAI,IAAI,CAAS,EAAgB,MAAd,GAAI,OAAO,GAAU,EAAI,SAAS,CAAE,yBAAhzG,IAAgC,IAAqE,EAAc,EAAa,EAAY,CAAC,CAAC,EAAe,EAAa,mNAA48B,EAAqB,CAAC,KAAK,EAAY,OAAO,SAAS,GAAK,SAAS,CAAC,SAAS,CAAC,KAAK,EAAY,KAAK,aAAa,OAAO,QAAQ,CAAC,OAAO,OAAO,EAAE,aAAa,CAAC,OAAO,OAAO,EAAE,wBAA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