@spaceandtimelabs/makeinfinite-ui 0.46.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -130,7 +130,7 @@ export declare const APIHandler: (baseUrl: string) => {
|
|
|
130
130
|
updateProjectComponentLayoutMetadata: (projectName: string, componentId: string, layoutMetadata: any) => Promise<Response>;
|
|
131
131
|
updateProjectComponentSourceCode: (projectName: string, componentId: string, sourceCode: string) => Promise<Response>;
|
|
132
132
|
updateApplicationMetadata: (projectName: string, applicationName: string, applicationDescription: string, applicationCategory: string) => Promise<Response>;
|
|
133
|
-
updateApplicationSettings: (projectName: string, applicationLoginEnabled
|
|
133
|
+
updateApplicationSettings: (projectName: string, applicationLoginEnabled?: boolean | null, defaultDeploymentChainReference?: string | null) => Promise<Response>;
|
|
134
134
|
updateProjectFile: (filePath: string, projectName: string, sourceCode: string, abortSignal?: AbortSignal) => Promise<Response>;
|
|
135
135
|
deleteProjectFile: (projectName: string, filePath: string) => Promise<Response>;
|
|
136
136
|
resetProjectFile: (projectName: string, filePath: string, gitRef: string, prune?: boolean, extraMetadata?: string) => Promise<Response>;
|
|
@@ -14781,17 +14781,18 @@ const v1 = Jt(null), J5 = () => {
|
|
|
14781
14781
|
body: JSON.stringify(I)
|
|
14782
14782
|
});
|
|
14783
14783
|
},
|
|
14784
|
-
updateApplicationSettings: async (P, T) => {
|
|
14785
|
-
const
|
|
14784
|
+
updateApplicationSettings: async (P, T = null, D = null) => {
|
|
14785
|
+
const A = {
|
|
14786
14786
|
project_name: P,
|
|
14787
|
-
application_login_enabled: T
|
|
14787
|
+
application_login_enabled: T,
|
|
14788
|
+
default_deployment_chain_reference: D
|
|
14788
14789
|
};
|
|
14789
14790
|
return await fetch(`${t}/update_application_settings`, {
|
|
14790
14791
|
method: "POST",
|
|
14791
14792
|
headers: {
|
|
14792
14793
|
"Content-Type": "application/json"
|
|
14793
14794
|
},
|
|
14794
|
-
body: JSON.stringify(
|
|
14795
|
+
body: JSON.stringify(A)
|
|
14795
14796
|
});
|
|
14796
14797
|
},
|
|
14797
14798
|
updateProjectFile: async (P, T, D, A) => {
|
|
@@ -118,7 +118,7 @@ object-assign
|
|
|
118
118
|
*/var It=typeof Symbol=="function"&&Symbol.for,Yh=It?Symbol.for("react.element"):60103,Kh=It?Symbol.for("react.portal"):60106,cu=It?Symbol.for("react.fragment"):60107,uu=It?Symbol.for("react.strict_mode"):60108,du=It?Symbol.for("react.profiler"):60114,fu=It?Symbol.for("react.provider"):60109,hu=It?Symbol.for("react.context"):60110,Xh=It?Symbol.for("react.async_mode"):60111,pu=It?Symbol.for("react.concurrent_mode"):60111,mu=It?Symbol.for("react.forward_ref"):60112,gu=It?Symbol.for("react.suspense"):60113,e5=It?Symbol.for("react.suspense_list"):60120,wu=It?Symbol.for("react.memo"):60115,vu=It?Symbol.for("react.lazy"):60116,t5=It?Symbol.for("react.block"):60121,n5=It?Symbol.for("react.fundamental"):60117,r5=It?Symbol.for("react.responder"):60118,o5=It?Symbol.for("react.scope"):60119;function En(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Yh:switch(e=e.type,e){case Xh:case pu:case cu:case du:case uu:case gu:return e;default:switch(e=e&&e.$$typeof,e){case hu:case mu:case vu:case wu:case fu:return e;default:return t}}case Kh:return t}}}function Gx(e){return En(e)===pu}rt.AsyncMode=Xh,rt.ConcurrentMode=pu,rt.ContextConsumer=hu,rt.ContextProvider=fu,rt.Element=Yh,rt.ForwardRef=mu,rt.Fragment=cu,rt.Lazy=vu,rt.Memo=wu,rt.Portal=Kh,rt.Profiler=du,rt.StrictMode=uu,rt.Suspense=gu,rt.isAsyncMode=function(e){return Gx(e)||En(e)===Xh},rt.isConcurrentMode=Gx,rt.isContextConsumer=function(e){return En(e)===hu},rt.isContextProvider=function(e){return En(e)===fu},rt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yh},rt.isForwardRef=function(e){return En(e)===mu},rt.isFragment=function(e){return En(e)===cu},rt.isLazy=function(e){return En(e)===vu},rt.isMemo=function(e){return En(e)===wu},rt.isPortal=function(e){return En(e)===Kh},rt.isProfiler=function(e){return En(e)===du},rt.isStrictMode=function(e){return En(e)===uu},rt.isSuspense=function(e){return En(e)===gu},rt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===cu||e===pu||e===du||e===uu||e===gu||e===e5||typeof e=="object"&&e!==null&&(e.$$typeof===vu||e.$$typeof===wu||e.$$typeof===fu||e.$$typeof===hu||e.$$typeof===mu||e.$$typeof===n5||e.$$typeof===r5||e.$$typeof===o5||e.$$typeof===t5)},rt.typeOf=En,Wx.exports=rt;var Zh=Wx.exports;function i5(e){function t(U,F,W,ae,L){for(var K=0,z=0,ie=0,ce=0,se,B,ue=0,le=0,ye,Ce=ye=se=0,xe=0,O=0,V=0,J=0,we=W.length,pe=we-1,fe,ge="",_e="",Xe="",D="",_;xe<we;){if(B=W.charCodeAt(xe),xe===pe&&z+ce+ie+K!==0&&(z!==0&&(B=z===47?10:47),ce=ie=K=0,we++,pe++),z+ce+ie+K===0){if(xe===pe&&(0<O&&(ge=ge.replace(f,"")),0<ge.trim().length)){switch(B){case 32:case 9:case 59:case 13:case 10:break;default:ge+=W.charAt(xe)}B=59}switch(B){case 123:for(ge=ge.trim(),se=ge.charCodeAt(0),ye=1,J=++xe;xe<we;){switch(B=W.charCodeAt(xe)){case 123:ye++;break;case 125:ye--;break;case 47:switch(B=W.charCodeAt(xe+1)){case 42:case 47:e:{for(Ce=xe+1;Ce<pe;++Ce)switch(W.charCodeAt(Ce)){case 47:if(B===42&&W.charCodeAt(Ce-1)===42&&xe+2!==Ce){xe=Ce+1;break e}break;case 10:if(B===47){xe=Ce+1;break e}}xe=Ce}}break;case 91:B++;case 40:B++;case 34:case 39:for(;xe++<pe&&W.charCodeAt(xe)!==B;);}if(ye===0)break;xe++}switch(ye=W.substring(J,xe),se===0&&(se=(ge=ge.replace(d,"").trim()).charCodeAt(0)),se){case 64:switch(0<O&&(ge=ge.replace(f,"")),B=ge.charCodeAt(1),B){case 100:case 109:case 115:case 45:O=F;break;default:O=Y}if(ye=t(F,O,ye,B,L+1),J=ye.length,0<H&&(O=n(Y,ge,V),_=s(3,ye,O,F,$,j,J,B,L,ae),ge=O.join(""),_!==void 0&&(J=(ye=_.trim()).length)===0&&(B=0,ye="")),0<J)switch(B){case 115:ge=ge.replace(T,a);case 100:case 109:case 45:ye=ge+"{"+ye+"}";break;case 107:ge=ge.replace(b,"$1 $2"),ye=ge+"{"+ye+"}",ye=re===1||re===2&&i("@"+ye,3)?"@-webkit-"+ye+"@"+ye:"@"+ye;break;default:ye=ge+ye,ae===112&&(ye=(_e+=ye,""))}else ye="";break;default:ye=t(F,n(F,ge,V),ye,ae,L+1)}Xe+=ye,ye=V=O=Ce=se=0,ge="",B=W.charCodeAt(++xe);break;case 125:case 59:if(ge=(0<O?ge.replace(f,""):ge).trim(),1<(J=ge.length))switch(Ce===0&&(se=ge.charCodeAt(0),se===45||96<se&&123>se)&&(J=(ge=ge.replace(" ",":")).length),0<H&&(_=s(1,ge,F,U,$,j,_e.length,ae,L,ae))!==void 0&&(J=(ge=_.trim()).length)===0&&(ge="\0\0"),se=ge.charCodeAt(0),B=ge.charCodeAt(1),se){case 0:break;case 64:if(B===105||B===99){D+=ge+W.charAt(xe);break}default:ge.charCodeAt(J-1)!==58&&(_e+=o(ge,se,B,ge.charCodeAt(2)))}V=O=Ce=se=0,ge="",B=W.charCodeAt(++xe)}}switch(B){case 13:case 10:z===47?z=0:1+se===0&&ae!==107&&0<ge.length&&(O=1,ge+="\0"),0<H*ee&&s(0,ge,F,U,$,j,_e.length,ae,L,ae),j=1,$++;break;case 59:case 125:if(z+ce+ie+K===0){j++;break}default:switch(j++,fe=W.charAt(xe),B){case 9:case 32:if(ce+K+z===0)switch(ue){case 44:case 58:case 9:case 32:fe="";break;default:B!==32&&(fe=" ")}break;case 0:fe="\\0";break;case 12:fe="\\f";break;case 11:fe="\\v";break;case 38:ce+z+K===0&&(O=V=1,fe="\f"+fe);break;case 108:if(ce+z+K+q===0&&0<Ce)switch(xe-Ce){case 2:ue===112&&W.charCodeAt(xe-3)===58&&(q=ue);case 8:le===111&&(q=le)}break;case 58:ce+z+K===0&&(Ce=xe);break;case 44:z+ie+ce+K===0&&(O=1,fe+="\r");break;case 34:case 39:z===0&&(ce=ce===B?0:ce===0?B:ce);break;case 91:ce+z+ie===0&&K++;break;case 93:ce+z+ie===0&&K--;break;case 41:ce+z+K===0&&ie--;break;case 40:if(ce+z+K===0){if(se===0)switch(2*ue+3*le){case 533:break;default:se=1}ie++}break;case 64:z+ie+ce+K+Ce+ye===0&&(ye=1);break;case 42:case 47:if(!(0<ce+K+ie))switch(z){case 0:switch(2*B+3*W.charCodeAt(xe+1)){case 235:z=47;break;case 220:J=xe,z=42}break;case 42:B===47&&ue===42&&J+2!==xe&&(W.charCodeAt(J+2)===33&&(_e+=W.substring(J,xe+1)),fe="",z=0)}}z===0&&(ge+=fe)}le=ue,ue=B,xe++}if(J=_e.length,0<J){if(O=F,0<H&&(_=s(2,_e,O,U,$,j,J,ae,L,ae),_!==void 0&&(_e=_).length===0))return D+_e+Xe;if(_e=O.join(",")+"{"+_e+"}",re*q!==0){switch(re!==2||i(_e,2)||(q=0),q){case 111:_e=_e.replace(S,":-moz-$1")+_e;break;case 112:_e=_e.replace(x,"::-webkit-input-$1")+_e.replace(x,"::-moz-$1")+_e.replace(x,":-ms-input-$1")+_e}q=0}}return D+_e+Xe}function n(U,F,W){var ae=F.trim().split(v);F=ae;var L=ae.length,K=U.length;switch(K){case 0:case 1:var z=0;for(U=K===0?"":U[0]+" ";z<L;++z)F[z]=r(U,F[z],W).trim();break;default:var ie=z=0;for(F=[];z<L;++z)for(var ce=0;ce<K;++ce)F[ie++]=r(U[ce]+" ",ae[z],W).trim()}return F}function r(U,F,W){var ae=F.charCodeAt(0);switch(33>ae&&(ae=(F=F.trim()).charCodeAt(0)),ae){case 38:return F.replace(w,"$1"+U.trim());case 58:return U.trim()+F.replace(w,"$1"+U.trim());default:if(0<1*W&&0<F.indexOf("\f"))return F.replace(w,(U.charCodeAt(0)===58?"":"$1")+U.trim())}return U+F}function o(U,F,W,ae){var L=U+";",K=2*F+3*W+4*ae;if(K===944){U=L.indexOf(":",9)+1;var z=L.substring(U,L.length-1).trim();return z=L.substring(0,U).trim()+z+";",re===1||re===2&&i(z,1)?"-webkit-"+z+z:z}if(re===0||re===2&&!i(L,1))return L;switch(K){case 1015:return L.charCodeAt(10)===97?"-webkit-"+L+L:L;case 951:return L.charCodeAt(3)===116?"-webkit-"+L+L:L;case 963:return L.charCodeAt(5)===110?"-webkit-"+L+L:L;case 1009:if(L.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+L+L;case 978:return"-webkit-"+L+"-moz-"+L+L;case 1019:case 983:return"-webkit-"+L+"-moz-"+L+"-ms-"+L+L;case 883:if(L.charCodeAt(8)===45)return"-webkit-"+L+L;if(0<L.indexOf("image-set(",11))return L.replace(k,"$1-webkit-$2")+L;break;case 932:if(L.charCodeAt(4)===45)switch(L.charCodeAt(5)){case 103:return"-webkit-box-"+L.replace("-grow","")+"-webkit-"+L+"-ms-"+L.replace("grow","positive")+L;case 115:return"-webkit-"+L+"-ms-"+L.replace("shrink","negative")+L;case 98:return"-webkit-"+L+"-ms-"+L.replace("basis","preferred-size")+L}return"-webkit-"+L+"-ms-"+L+L;case 964:return"-webkit-"+L+"-ms-flex-"+L+L;case 1023:if(L.charCodeAt(8)!==99)break;return z=L.substring(L.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+z+"-webkit-"+L+"-ms-flex-pack"+z+L;case 1005:return p.test(L)?L.replace(h,":-webkit-")+L.replace(h,":-moz-")+L:L;case 1e3:switch(z=L.substring(13).trim(),F=z.indexOf("-")+1,z.charCodeAt(0)+z.charCodeAt(F)){case 226:z=L.replace(C,"tb");break;case 232:z=L.replace(C,"tb-rl");break;case 220:z=L.replace(C,"lr");break;default:return L}return"-webkit-"+L+"-ms-"+z+L;case 1017:if(L.indexOf("sticky",9)===-1)break;case 975:switch(F=(L=U).length-10,z=(L.charCodeAt(F)===33?L.substring(0,F):L).substring(U.indexOf(":",7)+1).trim(),K=z.charCodeAt(0)+(z.charCodeAt(7)|0)){case 203:if(111>z.charCodeAt(8))break;case 115:L=L.replace(z,"-webkit-"+z)+";"+L;break;case 207:case 102:L=L.replace(z,"-webkit-"+(102<K?"inline-":"")+"box")+";"+L.replace(z,"-webkit-"+z)+";"+L.replace(z,"-ms-"+z+"box")+";"+L}return L+";";case 938:if(L.charCodeAt(5)===45)switch(L.charCodeAt(6)){case 105:return z=L.replace("-items",""),"-webkit-"+L+"-webkit-box-"+z+"-ms-flex-"+z+L;case 115:return"-webkit-"+L+"-ms-flex-item-"+L.replace(N,"")+L;default:return"-webkit-"+L+"-ms-flex-line-pack"+L.replace("align-content","").replace(N,"")+L}break;case 973:case 989:if(L.charCodeAt(3)!==45||L.charCodeAt(4)===122)break;case 931:case 953:if(A.test(U)===!0)return(z=U.substring(U.indexOf(":")+1)).charCodeAt(0)===115?o(U.replace("stretch","fill-available"),F,W,ae).replace(":fill-available",":stretch"):L.replace(z,"-webkit-"+z)+L.replace(z,"-moz-"+z.replace("fill-",""))+L;break;case 962:if(L="-webkit-"+L+(L.charCodeAt(5)===102?"-ms-"+L:"")+L,W+ae===211&&L.charCodeAt(13)===105&&0<L.indexOf("transform",10))return L.substring(0,L.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+L}return L}function i(U,F){var W=U.indexOf(F===1?":":"{"),ae=U.substring(0,F!==3?W:10);return W=U.substring(W+1,U.length-1),oe(F!==2?ae:ae.replace(M,"$1"),W,F)}function a(U,F){var W=o(F,F.charCodeAt(0),F.charCodeAt(1),F.charCodeAt(2));return W!==F+";"?W.replace(R," or ($1)").substring(4):"("+F+")"}function s(U,F,W,ae,L,K,z,ie,ce,se){for(var B=0,ue=F,le;B<H;++B)switch(le=Z[B].call(u,U,ue,W,ae,L,K,z,ie,ce,se)){case void 0:case!1:case!0:case null:break;default:ue=le}if(ue!==F)return ue}function l(U){switch(U){case void 0:case null:H=Z.length=0;break;default:if(typeof U=="function")Z[H++]=U;else if(typeof U=="object")for(var F=0,W=U.length;F<W;++F)l(U[F]);else ee=!!U|0}return l}function c(U){return U=U.prefix,U!==void 0&&(oe=null,U?typeof U!="function"?re=1:(re=2,oe=U):re=0),c}function u(U,F){var W=U;if(33>W.charCodeAt(0)&&(W=W.trim()),te=W,W=[te],0<H){var ae=s(-1,F,W,W,$,j,0,0,0,0);ae!==void 0&&typeof ae=="string"&&(F=ae)}var L=t(Y,W,F,0,0);return 0<H&&(ae=s(-2,L,W,W,$,j,L.length,0,0,0),ae!==void 0&&(L=ae)),te="",q=0,j=$=1,L}var d=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,m=/([,: ])(transform)/g,v=/,\r+?/g,w=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,x=/::(place)/g,S=/:(read-only)/g,C=/[svh]\w+-[tblr]{2}/,T=/\(\s*(.*)\s*\)/g,R=/([\s\S]*?);/g,N=/-self|flex-/g,M=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,j=1,$=1,q=0,re=1,Y=[],Z=[],H=0,oe=null,ee=0,te="";return u.use=l,u.set=c,e!==void 0&&c(e),u}var a5={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function s5(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var l5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qx=s5(function(e){return l5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Jh=Zh,c5={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},u5={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qh={};Qh[Jh.ForwardRef]=d5,Qh[Jh.Memo]=Yx;function Kx(e){return Jh.isMemo(e)?Yx:Qh[e.$$typeof]||c5}var f5=Object.defineProperty,h5=Object.getOwnPropertyNames,Xx=Object.getOwnPropertySymbols,p5=Object.getOwnPropertyDescriptor,m5=Object.getPrototypeOf,Zx=Object.prototype;function Jx(e,t,n){if(typeof t!="string"){if(Zx){var r=m5(t);r&&r!==Zx&&Jx(e,r,n)}var o=h5(t);Xx&&(o=o.concat(Xx(t)));for(var i=Kx(e),a=Kx(t),s=0;s<o.length;++s){var l=o[s];if(!u5[l]&&!(n&&n[l])&&!(a&&a[l])&&!(i&&i[l])){var c=p5(t,l);try{f5(e,l,c)}catch{}}}}return e}var g5=Jx;const w5=On(g5);function Yr(){return(Yr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Qx=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},ep=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!Zh.typeOf(e)},yu=Object.freeze([]),_o=Object.freeze({});function il(e){return typeof e=="function"}function e_(e){return e.displayName||e.name||"Component"}function tp(e){return e&&typeof e.styledComponentId=="string"}var ua=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",np=typeof window<"u"&&"HTMLElement"in window,v5=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""&&process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY));function al(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var y5=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,o=0;o<n;o++)r+=this.groupSizes[o];return r},t.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;n>=a;)(a<<=1)<0&&al(16,""+n);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var s=i;s<a;s++)this.groupSizes[s]=0}for(var l=this.indexOfGroup(n+1),c=0,u=r.length;c<u;c++)this.tag.insertRule(l,r[c])&&(this.groupSizes[n]++,l++)},t.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],o=this.indexOfGroup(n),i=o+r;this.groupSizes[n]=0;for(var a=o;a<i;a++)this.tag.deleteRule(o)}},t.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var o=this.groupSizes[n],i=this.indexOfGroup(n),a=i+o,s=i;s<a;s++)r+=this.tag.getRule(s)+`/*!sc*/
|
|
119
119
|
`;return r},e}(),bu=new Map,xu=new Map,sl=1,_u=function(e){if(bu.has(e))return bu.get(e);for(;xu.has(sl);)sl++;var t=sl++;return bu.set(e,t),xu.set(t,e),t},b5=function(e){return xu.get(e)},x5=function(e,t){t>=sl&&(sl=t+1),bu.set(e,t),xu.set(t,e)},_5="style["+ua+'][data-styled-version="5.3.11"]',S5=new RegExp("^"+ua+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),C5=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},E5=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
|
|
120
120
|
`),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var s=a.match(S5);if(s){var l=0|parseInt(s[1],10),c=s[2];l!==0&&(x5(c,l),C5(e,c,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}},P5=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},t_=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(s){for(var l=s.childNodes,c=l.length;c>=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(ua))return u}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(ua,"active"),r.setAttribute("data-styled-version","5.3.11");var a=P5();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},R5=function(){function e(n){var r=this.element=t_(n);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,s=i.length;a<s;a++){var l=i[a];if(l.ownerNode===o)return l}al(17)}(r),this.length=0}var t=e.prototype;return t.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},e}(),N5=function(){function e(n){var r=this.element=t_(n);this.nodes=r.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,r){if(n<=this.length&&n>=0){var o=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),T5=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),n_=np,M5={isServer:!np,useCSSOMInjection:!v5},r_=function(){function e(n,r,o){n===void 0&&(n=_o),r===void 0&&(r={}),this.options=Yr({},M5,{},n),this.gs=r,this.names=new Map(o),this.server=!!n.isServer,!this.server&&np&&n_&&(n_=!1,function(i){for(var a=document.querySelectorAll(_5),s=0,l=a.length;s<l;s++){var c=a[s];c&&c.getAttribute(ua)!=="active"&&(E5(i,c),c.parentNode&&c.parentNode.removeChild(c))}}(this))}e.registerId=function(n){return _u(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e(Yr({},this.options,{},n),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(o=(r=this.options).isServer,i=r.useCSSOMInjection,a=r.target,n=o?new T5(a):i?new R5(a):new N5(a),new y5(n)));var n,r,o,i,a},t.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},t.registerName=function(n,r){if(_u(n),this.names.has(n))this.names.get(n).add(r);else{var o=new Set;o.add(r),this.names.set(n,o)}},t.insertRules=function(n,r,o){this.registerName(n,r),this.getTag().insertRules(_u(n),o)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(_u(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var r=n.getTag(),o=r.length,i="",a=0;a<o;a++){var s=b5(a);if(s!==void 0){var l=n.names.get(s),c=r.getGroup(a);if(l&&c&&l.size){var u=ua+".g"+a+'[id="'+s+'"]',d="";l!==void 0&&l.forEach(function(f){f.length>0&&(d+=f+",")}),i+=""+c+u+'{content:"'+d+`"}/*!sc*/
|
|
121
|
-
`}}}return i}(this)},e}(),D5=/(a)(d)/gi,o_=function(e){return String.fromCharCode(e+(e>25?39:97))};function rp(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=o_(t%52)+n;return(o_(t%52)+n).replace(D5,"$1-$2")}var da=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},i_=function(e){return da(5381,e)};function A5(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(il(n)&&!tp(n))return!1}return!0}var k5=i_("5.3.11"),I5=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&A5(t),this.componentId=n,this.baseHash=da(k5,n),this.baseStyle=r,r_.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var o=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(o,this.staticRulesId))i.push(this.staticRulesId);else{var a=fa(this.rules,t,n,r).join(""),s=rp(da(this.baseHash,a)>>>0);if(!n.hasNameForId(o,s)){var l=r(a,"."+s,void 0,o);n.insertRules(o,s,l)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=da(this.baseHash,r.hash),d="",f=0;f<c;f++){var h=this.rules[f];if(typeof h=="string")d+=h;else if(h){var p=fa(h,t,n,r),m=Array.isArray(p)?p.join(""):p;u=da(u,m+f),d+=m}}if(d){var v=rp(u>>>0);if(!n.hasNameForId(o,v)){var w=r(d,"."+v,void 0,o);n.insertRules(o,v,w)}i.push(v)}}return i.join(" ")},e}(),O5=/^\s*\/\/.*$/gm,j5=[":","[",".","#"];function $5(e){var t,n,r,o,i=_o,a=i.options,s=a===void 0?_o:a,l=i.plugins,c=l===void 0?yu:l,u=new i5(s),d=[],f=function(m){function v(w){if(w)try{m(w+"}")}catch{}}return function(w,b,x,S,C,T,R,N,M,A){switch(w){case 1:if(M===0&&b.charCodeAt(0)===64)return m(b+";"),"";break;case 2:if(N===0)return b+"/*|*/";break;case 3:switch(N){case 102:case 112:return m(x[0]+b),"";default:return b+(A===0?"/*|*/":"")}case-2:b.split("/*|*/}").forEach(v)}}}(function(m){d.push(m)}),h=function(m,v,w){return v===0&&j5.indexOf(w[n.length])!==-1||w.match(o)?m:"."+t};function p(m,v,w,b){b===void 0&&(b="&");var x=m.replace(O5,""),S=v&&w?w+" "+v+" { "+x+" }":x;return t=b,n=v,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),u(w||!v?"":v,S)}return u.use([].concat(c,[function(m,v,w){m===2&&w.length&&w[0].lastIndexOf(n)>0&&(w[0]=w[0].replace(r,h))},f,function(m){if(m===-2){var v=d;return d=[],v}}])),p.hash=c.length?c.reduce(function(m,v){return v.name||al(15),da(m,v.name)},5381).toString():"",p}var a_=E.createContext();a_.Consumer;var s_=E.createContext(),F5=(s_.Consumer,new r_),op=$5();function L5(){return E.useContext(a_)||F5}function z5(){return E.useContext(s_)||op}var B5=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=op);var a=r.name+i.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,i(r.rules,a,"@keyframes"))},this.toString=function(){return al(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=op),this.name+t.hash},e}(),H5=/([A-Z])/,V5=/([A-Z])/g,U5=/^ms-/,W5=function(e){return"-"+e.toLowerCase()};function l_(e){return H5.test(e)?e.replace(V5,W5).replace(U5,"-ms-"):e}var c_=function(e){return e==null||e===!1||e===""};function fa(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)(o=fa(e[a],t,n,r))!==""&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}if(c_(e))return"";if(tp(e))return"."+e.styledComponentId;if(il(e)){if(typeof(c=e)!="function"||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return fa(l,t,n,r)}var c;return e instanceof B5?n?(e.inject(n,r),e.getName(r)):e:ep(e)?function u(d,f){var h,p,m=[];for(var v in d)d.hasOwnProperty(v)&&!c_(d[v])&&(Array.isArray(d[v])&&d[v].isCss||il(d[v])?m.push(l_(v)+":",d[v],";"):ep(d[v])?m.push.apply(m,u(d[v],v)):m.push(l_(v)+": "+(h=v,(p=d[v])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in a5||h.startsWith("--")?String(p).trim():p+"px")+";"));return f?[f+" {"].concat(m,["}"]):m}(e):e.toString()}var u_=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function G5(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return il(e)||ep(e)?u_(fa(Qx(yu,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:u_(fa(Qx(e,n)))}var q5=function(e,t,n){return n===void 0&&(n=_o),e.theme!==n.theme&&e.theme||t||n.theme},Y5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,K5=/(^-|-$)/g;function ip(e){return e.replace(Y5,"-").replace(K5,"")}var X5=function(e){return rp(i_(e)>>>0)};function Su(e){return typeof e=="string"&&!0}var ap=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},Z5=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function J5(e,t,n){var r=e[n];ap(t)&&ap(r)?d_(r,t):e[n]=t}function d_(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(ap(a))for(var s in a)Z5(s)&&J5(e,a[s],s)}return e}var f_=E.createContext();f_.Consumer;var sp={};function h_(e,t,n){var r=tp(e),o=!Su(e),i=t.attrs,a=i===void 0?yu:i,s=t.componentId,l=s===void 0?function(b,x){var S=typeof b!="string"?"sc":ip(b);sp[S]=(sp[S]||0)+1;var C=S+"-"+X5("5.3.11"+S+sp[S]);return x?x+"-"+C:C}(t.displayName,t.parentComponentId):s,c=t.displayName,u=c===void 0?function(b){return Su(b)?"styled."+b:"Styled("+e_(b)+")"}(e):c,d=t.displayName&&t.componentId?ip(t.displayName)+"-"+t.componentId:t.componentId||l,f=r&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,h=t.shouldForwardProp;r&&e.shouldForwardProp&&(h=t.shouldForwardProp?function(b,x,S){return e.shouldForwardProp(b,x,S)&&t.shouldForwardProp(b,x,S)}:e.shouldForwardProp);var p,m=new I5(n,d,r?e.componentStyle:void 0),v=m.isStatic&&a.length===0,w=function(b,x){return function(S,C,T,R){var N=S.attrs,M=S.componentStyle,A=S.defaultProps,k=S.foldedComponentIds,j=S.shouldForwardProp,$=S.styledComponentId,q=S.target,re=function(ae,L,K){ae===void 0&&(ae=_o);var z=Yr({},L,{theme:ae}),ie={};return K.forEach(function(ce){var se,B,ue,le=ce;for(se in il(le)&&(le=le(z)),le)z[se]=ie[se]=se==="className"?(B=ie[se],ue=le[se],B&&ue?B+" "+ue:B||ue):le[se]}),[z,ie]}(q5(C,E.useContext(f_),A)||_o,C,N),Y=re[0],Z=re[1],H=function(ae,L,K,z){var ie=L5(),ce=z5(),se=L?ae.generateAndInjectStyles(_o,ie,ce):ae.generateAndInjectStyles(K,ie,ce);return se}(M,R,Y),oe=T,ee=Z.$as||C.$as||Z.as||C.as||q,te=Su(ee),U=Z!==C?Yr({},C,{},Z):C,F={};for(var W in U)W[0]!=="$"&&W!=="as"&&(W==="forwardedAs"?F.as=U[W]:(j?j(W,qx,ee):!te||qx(W))&&(F[W]=U[W]));return C.style&&Z.style!==C.style&&(F.style=Yr({},C.style,{},Z.style)),F.className=Array.prototype.concat(k,$,H!==$?H:null,C.className,Z.className).filter(Boolean).join(" "),F.ref=oe,E.createElement(ee,F)}(p,b,x,v)};return w.displayName=u,(p=E.forwardRef(w)).attrs=f,p.componentStyle=m,p.displayName=u,p.shouldForwardProp=h,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):yu,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(b){var x=t.componentId,S=function(T,R){if(T==null)return{};var N,M,A={},k=Object.keys(T);for(M=0;M<k.length;M++)N=k[M],R.indexOf(N)>=0||(A[N]=T[N]);return A}(t,["componentId"]),C=x&&x+"-"+(Su(b)?b:ip(e_(b)));return h_(b,Yr({},S,{attrs:f,componentId:C}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=r?d_({},e.defaultProps,b):b}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),o&&w5(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var So=function(e){return function t(n,r,o){if(o===void 0&&(o=_o),!Zh.isValidElementType(r))return al(1,String(r));var i=function(){return n(r,o,G5.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,Yr({},o,{},a))},i.attrs=function(a){return t(n,r,Yr({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(h_,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){So[e]=So(e)});const p_=E.createContext(null),m_=()=>{const e=E.useContext(p_);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},Q5=({children:e})=>{const[t,n]=E.useState(0),r=E.useCallback(async i=>{n(a=>a+1);try{return await i}finally{n(a=>Math.max(0,a-1))}},[]),o=E.useCallback(async(i,a)=>(n(s=>s+1),new Promise((s,l)=>{const c=i(),u=()=>{n(d=>Math.max(0,d-1))};c.addEventListener("load",()=>{if(u(),c.status>=200&&c.status<300)try{const d=a(c);s(d)}catch(d){l(d)}else l(new Error(`Request failed with status ${c.status}`))}),c.addEventListener("error",()=>{u(),l(new Error("Network error occurred"))}),c.addEventListener("abort",()=>{u(),l(new Error("Request cancelled"))})})),[]);return g.jsx(p_.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:o},children:e})},lp=e=>{const t=e;return{createProject:async(N,M)=>{const A={description:N,component_namespace:M};return await fetch(`${t}/create_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},getProjects:async()=>await fetch(`${t}/fetch_projects`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async N=>await fetch(`${t}/subdomains?project_name=${N}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},releaseSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},publishProject:async(N,M)=>{const A={project_name:N,git_ref:M};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},unpublishProject:async N=>{const M={project_name:N};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},tagCommit:async(N,M,A)=>{const k={project_name:N,commit_hash:M,tag_name:A};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(N,M,A,k)=>{const j={project_name:N,component_namespace:M,component_name:A,layout_metadata:k};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},addProjectChart:async(N,M,A)=>{const k={project_name:N,visual_id:M,layout_metadata:A};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateProjectComponentLayoutMetadata:async(N,M,A)=>{const k={project_name:N,component_id:M,layout_metadata:A};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateProjectComponentSourceCode:async(N,M,A)=>{const k={project_name:N,component_id:M,source_code:A};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateApplicationMetadata:async(N,M,A,k)=>{const j={project_name:N,application_name:M,application_description:A,application_category:k};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},updateApplicationSettings:async(N,M)=>{const A={project_name:N,application_login_enabled:M};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateProjectFile:async(N,M,A,k)=>{const j={file_path:N,project_name:M,source_code:A};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j),signal:k})},deleteProjectFile:async(N,M)=>{const A={project_name:N,file_path:M};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},resetProjectFile:async(N,M,A,k,j)=>{let $={project_name:N,file_path:M,git_ref:A};return k&&($.prune=k),j&&($.extra_metadata=j),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},deleteProject:async N=>{const M={projects:[N]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},requestErrorCorrection:async(N,M,A)=>{const k={project_name:N,component_id:M,error_message:A};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},addImage:async N=>await fetch(`${t}/add_image`,{method:"POST",body:N})}},g_=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,a,s,l,c,u,d,f)=>{const h=new URLSearchParams({pageNo:i.toString(),pageSize:a.toString(),scope:s,searchPattern:l,sortBy:c,sortOrder:u,visibility:d,visualType:f}).toString();return await fetch(`${t}/v2/content/visuals?${h}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},cp=e=>{const t=e;return{getSecrets:async()=>await fetch(`${t}/config/secrets`,{method:"GET",headers:{"Content-Type":"application/json"}}),putSecret:async(S,C)=>await fetch(`${t}/config/secrets/${S}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}),getSecret:async S=>await fetch(`${t}/config/secrets/${S}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteSecret:async S=>await fetch(`${t}/config/secrets/${S}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierKeyMap:async S=>await fetch(`${t}/config/miniapps/${S}/tier-key-map`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierKeyMap:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret_reference:T})}),getTierKeyMapForTier:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierKeyMap:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierAssignments:async S=>await fetch(`${t}/config/miniapps/${S}/assignments`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierAssignment:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:T})}),getTierAssignment:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierAssignment:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getRateLimits:async S=>await fetch(`${t}/config/miniapps/${S}/rate-limits`,{method:"GET",headers:{"Content-Type":"application/json"}}),putRateLimit:async(S,C,T,R)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),getRateLimit:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteRateLimit:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),createProxyFetch:S=>async(C,T)=>{const R=C instanceof URL?C:new URL(C.toString());return await fetch(`${t}/proxy/${S.miniappName}/${R.host}${R.pathname}${R.search}${R.hash}`,T)},createProxyGetView:S=>{const C=new URL(S.gwProxyUrl).hostname;return async(T,R,N={})=>{let M=`SELECT * FROM ${T}.${R}`;N&&Object.keys(N).length>0&&(M+=`(${Object.entries(N).map(([j,$])=>`'${j}=${$}'`).join(",")})`);const A=await fetch(`${t}/proxy/${S.miniappName}/${C}/v1/sql/no-injected-authz`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sqlText:M})});if(!A.ok)throw new Error(`Failed to fetch view: ${A.statusText}`);return await A.json()}}}};for(var Ft=[],up=0;up<256;++up)Ft.push((up+256).toString(16).slice(1));function e8(e,t=0){return(Ft[e[t+0]]+Ft[e[t+1]]+Ft[e[t+2]]+Ft[e[t+3]]+"-"+Ft[e[t+4]]+Ft[e[t+5]]+"-"+Ft[e[t+6]]+Ft[e[t+7]]+"-"+Ft[e[t+8]]+Ft[e[t+9]]+"-"+Ft[e[t+10]]+Ft[e[t+11]]+Ft[e[t+12]]+Ft[e[t+13]]+Ft[e[t+14]]+Ft[e[t+15]]).toLowerCase()}var Cu,t8=new Uint8Array(16);function n8(){if(!Cu&&(Cu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cu(t8)}var r8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w_={randomUUID:r8};function v_(e,t,n){if(w_.randomUUID&&!e)return w_.randomUUID();e=e||{};var r=e.random||(e.rng||n8)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e8(r)}function o8(e){return typeof e=="function"}const i8=e=>{const{wrapAPICall:t}=m_(),n=lp(e);return new Proxy(n,{get:(o,i)=>{const a=o[i];return o8(a)?(...s)=>t(a.apply(o,s)):a}})},dp=E.createContext(null);dp.Consumer;const a8=e=>{const[t,n]=E.useState({projectName:null,projectURL:null}),[r,o]=E.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,a]=E.useState(()=>g_(e.config.GW_BASE_URL)),[s,l]=E.useState(!1),[c,u]=E.useState(""),[d,f]=E.useState(""),[h,p]=E.useState(""),[m,v]=E.useState([]),[w,b]=E.useState(v_()),x=i8(e.config.API_BASE_URL),S=lp(e.config.API_BASE_URL),C=x||S,[T,R]=E.useState(()=>cp(e.config.PROXY_API_BASE_URL)),[N,M]=E.useState(null),[A,k]=E.useState(null),[j,$]=E.useState(),[q,re]=E.useState(!1),Y=()=>{b(v_())},Z=(H,oe)=>{if(!H)return;j&&(j.close(),re(!1));const ee=localStorage.getItem("accessToken")||"",te=`${r.WS_BASE_URL}/ws/chat/${H}?token=${ee}`;if(!te.startsWith("ws://")&&!te.startsWith("wss://")){oe.onerror({customWebsocketError:"INVALID_URL"});return}const U=new WebSocket(te);U.onopen=()=>{re(!0),oe.onopen()},U.onclose=F=>{re(!1),oe.onclose(F)},U.onerror=F=>{oe.onerror(F)},U.onmessage=F=>{oe.onmessage(F)},$(U)};return E.useEffect(()=>{o(e==null?void 0:e.config)},[e.config]),E.useEffect(()=>{n(e==null?void 0:e.metadata)},[e.metadata]),E.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}return a(g_(r.GW_BASE_URL)),R(H=>{const oe=cp(r.PROXY_API_BASE_URL),ee=oe.createProxyFetch({miniappName:t.projectName}),te=async(W,ae)=>ee(W,ae);M(()=>te);const U=oe.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),F=async(W,ae,L={})=>{if(typeof W!="string"||typeof ae!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof W}, viewName: ${typeof ae}`);return U(W,ae,L)};return k(()=>F),oe}),()=>{j&&j.close()}},[r,t]),g.jsx(dp.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,handledRequestComponentIds:m,setHandledRequestComponentIds:v,syncToken:w,setSyncToken:Y,selectedComponentId:c,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:f,selectedComponentHTML:h,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:l,APIHandler:C,gwAPIHandler:i,proxyHandler:T,proxyFetch:N,proxyGetView:A,startChatbot:Z,chatbotWebsocket:j,chatbotWebsocketConnected:q},children:e.children})},s8=e=>g.jsx(Q5,{children:g.jsx(a8,{...e})}),fp=()=>{const e=E.useContext(dp);if(e===null)throw new Error("Invalid project context.");return{...e}},l8=So.div`
|
|
121
|
+
`}}}return i}(this)},e}(),D5=/(a)(d)/gi,o_=function(e){return String.fromCharCode(e+(e>25?39:97))};function rp(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=o_(t%52)+n;return(o_(t%52)+n).replace(D5,"$1-$2")}var da=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},i_=function(e){return da(5381,e)};function A5(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(il(n)&&!tp(n))return!1}return!0}var k5=i_("5.3.11"),I5=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&A5(t),this.componentId=n,this.baseHash=da(k5,n),this.baseStyle=r,r_.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var o=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(o,this.staticRulesId))i.push(this.staticRulesId);else{var a=fa(this.rules,t,n,r).join(""),s=rp(da(this.baseHash,a)>>>0);if(!n.hasNameForId(o,s)){var l=r(a,"."+s,void 0,o);n.insertRules(o,s,l)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=da(this.baseHash,r.hash),d="",f=0;f<c;f++){var h=this.rules[f];if(typeof h=="string")d+=h;else if(h){var p=fa(h,t,n,r),m=Array.isArray(p)?p.join(""):p;u=da(u,m+f),d+=m}}if(d){var v=rp(u>>>0);if(!n.hasNameForId(o,v)){var w=r(d,"."+v,void 0,o);n.insertRules(o,v,w)}i.push(v)}}return i.join(" ")},e}(),O5=/^\s*\/\/.*$/gm,j5=[":","[",".","#"];function $5(e){var t,n,r,o,i=_o,a=i.options,s=a===void 0?_o:a,l=i.plugins,c=l===void 0?yu:l,u=new i5(s),d=[],f=function(m){function v(w){if(w)try{m(w+"}")}catch{}}return function(w,b,x,S,C,T,R,N,M,A){switch(w){case 1:if(M===0&&b.charCodeAt(0)===64)return m(b+";"),"";break;case 2:if(N===0)return b+"/*|*/";break;case 3:switch(N){case 102:case 112:return m(x[0]+b),"";default:return b+(A===0?"/*|*/":"")}case-2:b.split("/*|*/}").forEach(v)}}}(function(m){d.push(m)}),h=function(m,v,w){return v===0&&j5.indexOf(w[n.length])!==-1||w.match(o)?m:"."+t};function p(m,v,w,b){b===void 0&&(b="&");var x=m.replace(O5,""),S=v&&w?w+" "+v+" { "+x+" }":x;return t=b,n=v,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),u(w||!v?"":v,S)}return u.use([].concat(c,[function(m,v,w){m===2&&w.length&&w[0].lastIndexOf(n)>0&&(w[0]=w[0].replace(r,h))},f,function(m){if(m===-2){var v=d;return d=[],v}}])),p.hash=c.length?c.reduce(function(m,v){return v.name||al(15),da(m,v.name)},5381).toString():"",p}var a_=E.createContext();a_.Consumer;var s_=E.createContext(),F5=(s_.Consumer,new r_),op=$5();function L5(){return E.useContext(a_)||F5}function z5(){return E.useContext(s_)||op}var B5=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=op);var a=r.name+i.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,i(r.rules,a,"@keyframes"))},this.toString=function(){return al(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=op),this.name+t.hash},e}(),H5=/([A-Z])/,V5=/([A-Z])/g,U5=/^ms-/,W5=function(e){return"-"+e.toLowerCase()};function l_(e){return H5.test(e)?e.replace(V5,W5).replace(U5,"-ms-"):e}var c_=function(e){return e==null||e===!1||e===""};function fa(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)(o=fa(e[a],t,n,r))!==""&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}if(c_(e))return"";if(tp(e))return"."+e.styledComponentId;if(il(e)){if(typeof(c=e)!="function"||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return fa(l,t,n,r)}var c;return e instanceof B5?n?(e.inject(n,r),e.getName(r)):e:ep(e)?function u(d,f){var h,p,m=[];for(var v in d)d.hasOwnProperty(v)&&!c_(d[v])&&(Array.isArray(d[v])&&d[v].isCss||il(d[v])?m.push(l_(v)+":",d[v],";"):ep(d[v])?m.push.apply(m,u(d[v],v)):m.push(l_(v)+": "+(h=v,(p=d[v])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in a5||h.startsWith("--")?String(p).trim():p+"px")+";"));return f?[f+" {"].concat(m,["}"]):m}(e):e.toString()}var u_=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function G5(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return il(e)||ep(e)?u_(fa(Qx(yu,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:u_(fa(Qx(e,n)))}var q5=function(e,t,n){return n===void 0&&(n=_o),e.theme!==n.theme&&e.theme||t||n.theme},Y5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,K5=/(^-|-$)/g;function ip(e){return e.replace(Y5,"-").replace(K5,"")}var X5=function(e){return rp(i_(e)>>>0)};function Su(e){return typeof e=="string"&&!0}var ap=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},Z5=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function J5(e,t,n){var r=e[n];ap(t)&&ap(r)?d_(r,t):e[n]=t}function d_(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(ap(a))for(var s in a)Z5(s)&&J5(e,a[s],s)}return e}var f_=E.createContext();f_.Consumer;var sp={};function h_(e,t,n){var r=tp(e),o=!Su(e),i=t.attrs,a=i===void 0?yu:i,s=t.componentId,l=s===void 0?function(b,x){var S=typeof b!="string"?"sc":ip(b);sp[S]=(sp[S]||0)+1;var C=S+"-"+X5("5.3.11"+S+sp[S]);return x?x+"-"+C:C}(t.displayName,t.parentComponentId):s,c=t.displayName,u=c===void 0?function(b){return Su(b)?"styled."+b:"Styled("+e_(b)+")"}(e):c,d=t.displayName&&t.componentId?ip(t.displayName)+"-"+t.componentId:t.componentId||l,f=r&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,h=t.shouldForwardProp;r&&e.shouldForwardProp&&(h=t.shouldForwardProp?function(b,x,S){return e.shouldForwardProp(b,x,S)&&t.shouldForwardProp(b,x,S)}:e.shouldForwardProp);var p,m=new I5(n,d,r?e.componentStyle:void 0),v=m.isStatic&&a.length===0,w=function(b,x){return function(S,C,T,R){var N=S.attrs,M=S.componentStyle,A=S.defaultProps,k=S.foldedComponentIds,j=S.shouldForwardProp,$=S.styledComponentId,q=S.target,re=function(ae,L,K){ae===void 0&&(ae=_o);var z=Yr({},L,{theme:ae}),ie={};return K.forEach(function(ce){var se,B,ue,le=ce;for(se in il(le)&&(le=le(z)),le)z[se]=ie[se]=se==="className"?(B=ie[se],ue=le[se],B&&ue?B+" "+ue:B||ue):le[se]}),[z,ie]}(q5(C,E.useContext(f_),A)||_o,C,N),Y=re[0],Z=re[1],H=function(ae,L,K,z){var ie=L5(),ce=z5(),se=L?ae.generateAndInjectStyles(_o,ie,ce):ae.generateAndInjectStyles(K,ie,ce);return se}(M,R,Y),oe=T,ee=Z.$as||C.$as||Z.as||C.as||q,te=Su(ee),U=Z!==C?Yr({},C,{},Z):C,F={};for(var W in U)W[0]!=="$"&&W!=="as"&&(W==="forwardedAs"?F.as=U[W]:(j?j(W,qx,ee):!te||qx(W))&&(F[W]=U[W]));return C.style&&Z.style!==C.style&&(F.style=Yr({},C.style,{},Z.style)),F.className=Array.prototype.concat(k,$,H!==$?H:null,C.className,Z.className).filter(Boolean).join(" "),F.ref=oe,E.createElement(ee,F)}(p,b,x,v)};return w.displayName=u,(p=E.forwardRef(w)).attrs=f,p.componentStyle=m,p.displayName=u,p.shouldForwardProp=h,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):yu,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(b){var x=t.componentId,S=function(T,R){if(T==null)return{};var N,M,A={},k=Object.keys(T);for(M=0;M<k.length;M++)N=k[M],R.indexOf(N)>=0||(A[N]=T[N]);return A}(t,["componentId"]),C=x&&x+"-"+(Su(b)?b:ip(e_(b)));return h_(b,Yr({},S,{attrs:f,componentId:C}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=r?d_({},e.defaultProps,b):b}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),o&&w5(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var So=function(e){return function t(n,r,o){if(o===void 0&&(o=_o),!Zh.isValidElementType(r))return al(1,String(r));var i=function(){return n(r,o,G5.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,Yr({},o,{},a))},i.attrs=function(a){return t(n,r,Yr({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(h_,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){So[e]=So(e)});const p_=E.createContext(null),m_=()=>{const e=E.useContext(p_);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},Q5=({children:e})=>{const[t,n]=E.useState(0),r=E.useCallback(async i=>{n(a=>a+1);try{return await i}finally{n(a=>Math.max(0,a-1))}},[]),o=E.useCallback(async(i,a)=>(n(s=>s+1),new Promise((s,l)=>{const c=i(),u=()=>{n(d=>Math.max(0,d-1))};c.addEventListener("load",()=>{if(u(),c.status>=200&&c.status<300)try{const d=a(c);s(d)}catch(d){l(d)}else l(new Error(`Request failed with status ${c.status}`))}),c.addEventListener("error",()=>{u(),l(new Error("Network error occurred"))}),c.addEventListener("abort",()=>{u(),l(new Error("Request cancelled"))})})),[]);return g.jsx(p_.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:o},children:e})},lp=e=>{const t=e;return{createProject:async(N,M)=>{const A={description:N,component_namespace:M};return await fetch(`${t}/create_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},getProjects:async()=>await fetch(`${t}/fetch_projects`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async N=>await fetch(`${t}/subdomains?project_name=${N}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},releaseSubdomain:async(N,M)=>{const A={project_name:N,subdomain:M};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},publishProject:async(N,M)=>{const A={project_name:N,git_ref:M};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},unpublishProject:async N=>{const M={project_name:N};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},tagCommit:async(N,M,A)=>{const k={project_name:N,commit_hash:M,tag_name:A};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(N,M,A,k)=>{const j={project_name:N,component_namespace:M,component_name:A,layout_metadata:k};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},addProjectChart:async(N,M,A)=>{const k={project_name:N,visual_id:M,layout_metadata:A};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateProjectComponentLayoutMetadata:async(N,M,A)=>{const k={project_name:N,component_id:M,layout_metadata:A};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateProjectComponentSourceCode:async(N,M,A)=>{const k={project_name:N,component_id:M,source_code:A};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateApplicationMetadata:async(N,M,A,k)=>{const j={project_name:N,application_name:M,application_description:A,application_category:k};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},updateApplicationSettings:async(N,M=null,A=null)=>{const k={project_name:N,application_login_enabled:M,default_deployment_chain_reference:A};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},updateProjectFile:async(N,M,A,k)=>{const j={file_path:N,project_name:M,source_code:A};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j),signal:k})},deleteProjectFile:async(N,M)=>{const A={project_name:N,file_path:M};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},resetProjectFile:async(N,M,A,k,j)=>{let $={project_name:N,file_path:M,git_ref:A};return k&&($.prune=k),j&&($.extra_metadata=j),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},deleteProject:async N=>{const M={projects:[N]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},requestErrorCorrection:async(N,M,A)=>{const k={project_name:N,component_id:M,error_message:A};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})},addImage:async N=>await fetch(`${t}/add_image`,{method:"POST",body:N})}},g_=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,a,s,l,c,u,d,f)=>{const h=new URLSearchParams({pageNo:i.toString(),pageSize:a.toString(),scope:s,searchPattern:l,sortBy:c,sortOrder:u,visibility:d,visualType:f}).toString();return await fetch(`${t}/v2/content/visuals?${h}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},cp=e=>{const t=e;return{getSecrets:async()=>await fetch(`${t}/config/secrets`,{method:"GET",headers:{"Content-Type":"application/json"}}),putSecret:async(S,C)=>await fetch(`${t}/config/secrets/${S}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}),getSecret:async S=>await fetch(`${t}/config/secrets/${S}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteSecret:async S=>await fetch(`${t}/config/secrets/${S}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierKeyMap:async S=>await fetch(`${t}/config/miniapps/${S}/tier-key-map`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierKeyMap:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret_reference:T})}),getTierKeyMapForTier:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierKeyMap:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierAssignments:async S=>await fetch(`${t}/config/miniapps/${S}/assignments`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierAssignment:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:T})}),getTierAssignment:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierAssignment:async(S,C)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getRateLimits:async S=>await fetch(`${t}/config/miniapps/${S}/rate-limits`,{method:"GET",headers:{"Content-Type":"application/json"}}),putRateLimit:async(S,C,T,R)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),getRateLimit:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteRateLimit:async(S,C,T)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${T}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),createProxyFetch:S=>async(C,T)=>{const R=C instanceof URL?C:new URL(C.toString());return await fetch(`${t}/proxy/${S.miniappName}/${R.host}${R.pathname}${R.search}${R.hash}`,T)},createProxyGetView:S=>{const C=new URL(S.gwProxyUrl).hostname;return async(T,R,N={})=>{let M=`SELECT * FROM ${T}.${R}`;N&&Object.keys(N).length>0&&(M+=`(${Object.entries(N).map(([j,$])=>`'${j}=${$}'`).join(",")})`);const A=await fetch(`${t}/proxy/${S.miniappName}/${C}/v1/sql/no-injected-authz`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sqlText:M})});if(!A.ok)throw new Error(`Failed to fetch view: ${A.statusText}`);return await A.json()}}}};for(var Ft=[],up=0;up<256;++up)Ft.push((up+256).toString(16).slice(1));function e8(e,t=0){return(Ft[e[t+0]]+Ft[e[t+1]]+Ft[e[t+2]]+Ft[e[t+3]]+"-"+Ft[e[t+4]]+Ft[e[t+5]]+"-"+Ft[e[t+6]]+Ft[e[t+7]]+"-"+Ft[e[t+8]]+Ft[e[t+9]]+"-"+Ft[e[t+10]]+Ft[e[t+11]]+Ft[e[t+12]]+Ft[e[t+13]]+Ft[e[t+14]]+Ft[e[t+15]]).toLowerCase()}var Cu,t8=new Uint8Array(16);function n8(){if(!Cu&&(Cu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cu(t8)}var r8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w_={randomUUID:r8};function v_(e,t,n){if(w_.randomUUID&&!e)return w_.randomUUID();e=e||{};var r=e.random||(e.rng||n8)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e8(r)}function o8(e){return typeof e=="function"}const i8=e=>{const{wrapAPICall:t}=m_(),n=lp(e);return new Proxy(n,{get:(o,i)=>{const a=o[i];return o8(a)?(...s)=>t(a.apply(o,s)):a}})},dp=E.createContext(null);dp.Consumer;const a8=e=>{const[t,n]=E.useState({projectName:null,projectURL:null}),[r,o]=E.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,a]=E.useState(()=>g_(e.config.GW_BASE_URL)),[s,l]=E.useState(!1),[c,u]=E.useState(""),[d,f]=E.useState(""),[h,p]=E.useState(""),[m,v]=E.useState([]),[w,b]=E.useState(v_()),x=i8(e.config.API_BASE_URL),S=lp(e.config.API_BASE_URL),C=x||S,[T,R]=E.useState(()=>cp(e.config.PROXY_API_BASE_URL)),[N,M]=E.useState(null),[A,k]=E.useState(null),[j,$]=E.useState(),[q,re]=E.useState(!1),Y=()=>{b(v_())},Z=(H,oe)=>{if(!H)return;j&&(j.close(),re(!1));const ee=localStorage.getItem("accessToken")||"",te=`${r.WS_BASE_URL}/ws/chat/${H}?token=${ee}`;if(!te.startsWith("ws://")&&!te.startsWith("wss://")){oe.onerror({customWebsocketError:"INVALID_URL"});return}const U=new WebSocket(te);U.onopen=()=>{re(!0),oe.onopen()},U.onclose=F=>{re(!1),oe.onclose(F)},U.onerror=F=>{oe.onerror(F)},U.onmessage=F=>{oe.onmessage(F)},$(U)};return E.useEffect(()=>{o(e==null?void 0:e.config)},[e.config]),E.useEffect(()=>{n(e==null?void 0:e.metadata)},[e.metadata]),E.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}return a(g_(r.GW_BASE_URL)),R(H=>{const oe=cp(r.PROXY_API_BASE_URL),ee=oe.createProxyFetch({miniappName:t.projectName}),te=async(W,ae)=>ee(W,ae);M(()=>te);const U=oe.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),F=async(W,ae,L={})=>{if(typeof W!="string"||typeof ae!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof W}, viewName: ${typeof ae}`);return U(W,ae,L)};return k(()=>F),oe}),()=>{j&&j.close()}},[r,t]),g.jsx(dp.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,handledRequestComponentIds:m,setHandledRequestComponentIds:v,syncToken:w,setSyncToken:Y,selectedComponentId:c,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:f,selectedComponentHTML:h,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:l,APIHandler:C,gwAPIHandler:i,proxyHandler:T,proxyFetch:N,proxyGetView:A,startChatbot:Z,chatbotWebsocket:j,chatbotWebsocketConnected:q},children:e.children})},s8=e=>g.jsx(Q5,{children:g.jsx(a8,{...e})}),fp=()=>{const e=E.useContext(dp);if(e===null)throw new Error("Invalid project context.");return{...e}},l8=So.div`
|
|
122
122
|
position: fixed;
|
|
123
123
|
top: 0;
|
|
124
124
|
left: 0;
|