@spaceandtimelabs/makeinfinite-ui 0.43.1 → 0.44.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.
@@ -15062,7 +15062,7 @@ const IS = Gt(null), o5 = () => {
15062
15062
  let T = `SELECT * FROM ${P}.${R}`;
15063
15063
  N && Object.keys(N).length > 0 && (T += `(${Object.entries(N).map(([j, F]) => `'${j}=${F}'`).join(",")})`);
15064
15064
  const $ = await fetch(
15065
- `${t}/proxy/${S.miniappName}/${C}/v1/sql`,
15065
+ `${t}/proxy/${S.miniappName}/${C}/v1/sql/no-injected-authz`,
15066
15066
  {
15067
15067
  method: "POST",
15068
15068
  headers: {
@@ -118,7 +118,7 @@ object-assign
118
118
  */var Nt=typeof Symbol=="function"&&Symbol.for,Sh=Nt?Symbol.for("react.element"):60103,Ch=Nt?Symbol.for("react.portal"):60106,Vc=Nt?Symbol.for("react.fragment"):60107,Wc=Nt?Symbol.for("react.strict_mode"):60108,Gc=Nt?Symbol.for("react.profiler"):60114,qc=Nt?Symbol.for("react.provider"):60109,Yc=Nt?Symbol.for("react.context"):60110,Eh=Nt?Symbol.for("react.async_mode"):60111,Kc=Nt?Symbol.for("react.concurrent_mode"):60111,Xc=Nt?Symbol.for("react.forward_ref"):60112,Zc=Nt?Symbol.for("react.suspense"):60113,l4=Nt?Symbol.for("react.suspense_list"):60120,Jc=Nt?Symbol.for("react.memo"):60115,Qc=Nt?Symbol.for("react.lazy"):60116,c4=Nt?Symbol.for("react.block"):60121,u4=Nt?Symbol.for("react.fundamental"):60117,d4=Nt?Symbol.for("react.responder"):60118,f4=Nt?Symbol.for("react.scope"):60119;function vn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sh:switch(e=e.type,e){case Eh:case Kc:case Vc:case Gc:case Wc:case Zc:return e;default:switch(e=e&&e.$$typeof,e){case Yc:case Xc:case Qc:case Jc:case qc:return e;default:return t}}case Ch:return t}}}function dx(e){return vn(e)===Kc}Qe.AsyncMode=Eh,Qe.ConcurrentMode=Kc,Qe.ContextConsumer=Yc,Qe.ContextProvider=qc,Qe.Element=Sh,Qe.ForwardRef=Xc,Qe.Fragment=Vc,Qe.Lazy=Qc,Qe.Memo=Jc,Qe.Portal=Ch,Qe.Profiler=Gc,Qe.StrictMode=Wc,Qe.Suspense=Zc,Qe.isAsyncMode=function(e){return dx(e)||vn(e)===Eh},Qe.isConcurrentMode=dx,Qe.isContextConsumer=function(e){return vn(e)===Yc},Qe.isContextProvider=function(e){return vn(e)===qc},Qe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sh},Qe.isForwardRef=function(e){return vn(e)===Xc},Qe.isFragment=function(e){return vn(e)===Vc},Qe.isLazy=function(e){return vn(e)===Qc},Qe.isMemo=function(e){return vn(e)===Jc},Qe.isPortal=function(e){return vn(e)===Ch},Qe.isProfiler=function(e){return vn(e)===Gc},Qe.isStrictMode=function(e){return vn(e)===Wc},Qe.isSuspense=function(e){return vn(e)===Zc},Qe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vc||e===Kc||e===Gc||e===Wc||e===Zc||e===l4||typeof e=="object"&&e!==null&&(e.$$typeof===Qc||e.$$typeof===Jc||e.$$typeof===qc||e.$$typeof===Yc||e.$$typeof===Xc||e.$$typeof===u4||e.$$typeof===d4||e.$$typeof===f4||e.$$typeof===c4)},Qe.typeOf=vn,ux.exports=Qe;var Ph=ux.exports;function h4(e){function t(H,O,U,re,j){for(var G=0,$=0,te=0,ae=0,oe,z,se=0,ie=0,fe,ge=fe=oe=0,pe=0,me=0,_e=0,Re=0,nt=U.length,ke=nt-1,Me,Ce="",Le="",pn="",D="",_;pe<nt;){if(z=U.charCodeAt(pe),pe===ke&&$+ae+te+G!==0&&($!==0&&(z=$===47?10:47),ae=te=G=0,nt++,ke++),$+ae+te+G===0){if(pe===ke&&(0<me&&(Ce=Ce.replace(f,"")),0<Ce.trim().length)){switch(z){case 32:case 9:case 59:case 13:case 10:break;default:Ce+=U.charAt(pe)}z=59}switch(z){case 123:for(Ce=Ce.trim(),oe=Ce.charCodeAt(0),fe=1,Re=++pe;pe<nt;){switch(z=U.charCodeAt(pe)){case 123:fe++;break;case 125:fe--;break;case 47:switch(z=U.charCodeAt(pe+1)){case 42:case 47:e:{for(ge=pe+1;ge<ke;++ge)switch(U.charCodeAt(ge)){case 47:if(z===42&&U.charCodeAt(ge-1)===42&&pe+2!==ge){pe=ge+1;break e}break;case 10:if(z===47){pe=ge+1;break e}}pe=ge}}break;case 91:z++;case 40:z++;case 34:case 39:for(;pe++<ke&&U.charCodeAt(pe)!==z;);}if(fe===0)break;pe++}switch(fe=U.substring(Re,pe),oe===0&&(oe=(Ce=Ce.replace(d,"").trim()).charCodeAt(0)),oe){case 64:switch(0<me&&(Ce=Ce.replace(f,"")),z=Ce.charCodeAt(1),z){case 100:case 109:case 115:case 45:me=O;break;default:me=q}if(fe=t(O,me,fe,z,j+1),Re=fe.length,0<B&&(me=n(q,Ce,_e),_=s(3,fe,me,O,L,F,Re,z,j,re),Ce=me.join(""),_!==void 0&&(Re=(fe=_.trim()).length)===0&&(z=0,fe="")),0<Re)switch(z){case 115:Ce=Ce.replace(N,a);case 100:case 109:case 45:fe=Ce+"{"+fe+"}";break;case 107:Ce=Ce.replace(b,"$1 $2"),fe=Ce+"{"+fe+"}",fe=ne===1||ne===2&&i("@"+fe,3)?"@-webkit-"+fe+"@"+fe:"@"+fe;break;default:fe=Ce+fe,re===112&&(fe=(Le+=fe,""))}else fe="";break;default:fe=t(O,n(O,Ce,_e),fe,re,j+1)}pn+=fe,fe=_e=me=ge=oe=0,Ce="",z=U.charCodeAt(++pe);break;case 125:case 59:if(Ce=(0<me?Ce.replace(f,""):Ce).trim(),1<(Re=Ce.length))switch(ge===0&&(oe=Ce.charCodeAt(0),oe===45||96<oe&&123>oe)&&(Re=(Ce=Ce.replace(" ",":")).length),0<B&&(_=s(1,Ce,O,H,L,F,Le.length,re,j,re))!==void 0&&(Re=(Ce=_.trim()).length)===0&&(Ce="\0\0"),oe=Ce.charCodeAt(0),z=Ce.charCodeAt(1),oe){case 0:break;case 64:if(z===105||z===99){D+=Ce+U.charAt(pe);break}default:Ce.charCodeAt(Re-1)!==58&&(Le+=o(Ce,oe,z,Ce.charCodeAt(2)))}_e=me=ge=oe=0,Ce="",z=U.charCodeAt(++pe)}}switch(z){case 13:case 10:$===47?$=0:1+oe===0&&re!==107&&0<Ce.length&&(me=1,Ce+="\0"),0<B*Z&&s(0,Ce,O,H,L,F,Le.length,re,j,re),F=1,L++;break;case 59:case 125:if($+ae+te+G===0){F++;break}default:switch(F++,Me=U.charAt(pe),z){case 9:case 32:if(ae+G+$===0)switch(se){case 44:case 58:case 9:case 32:Me="";break;default:z!==32&&(Me=" ")}break;case 0:Me="\\0";break;case 12:Me="\\f";break;case 11:Me="\\v";break;case 38:ae+$+G===0&&(me=_e=1,Me="\f"+Me);break;case 108:if(ae+$+G+K===0&&0<ge)switch(pe-ge){case 2:se===112&&U.charCodeAt(pe-3)===58&&(K=se);case 8:ie===111&&(K=ie)}break;case 58:ae+$+G===0&&(ge=pe);break;case 44:$+te+ae+G===0&&(me=1,Me+="\r");break;case 34:case 39:$===0&&(ae=ae===z?0:ae===0?z:ae);break;case 91:ae+$+te===0&&G++;break;case 93:ae+$+te===0&&G--;break;case 41:ae+$+G===0&&te--;break;case 40:if(ae+$+G===0){if(oe===0)switch(2*se+3*ie){case 533:break;default:oe=1}te++}break;case 64:$+te+ae+G+ge+fe===0&&(fe=1);break;case 42:case 47:if(!(0<ae+G+te))switch($){case 0:switch(2*z+3*U.charCodeAt(pe+1)){case 235:$=47;break;case 220:Re=pe,$=42}break;case 42:z===47&&se===42&&Re+2!==pe&&(U.charCodeAt(Re+2)===33&&(Le+=U.substring(Re,pe+1)),Me="",$=0)}}$===0&&(Ce+=Me)}ie=se,se=z,pe++}if(Re=Le.length,0<Re){if(me=O,0<B&&(_=s(2,Le,me,H,L,F,Re,re,j,re),_!==void 0&&(Le=_).length===0))return D+Le+pn;if(Le=me.join(",")+"{"+Le+"}",ne*K!==0){switch(ne!==2||i(Le,2)||(K=0),K){case 111:Le=Le.replace(S,":-moz-$1")+Le;break;case 112:Le=Le.replace(x,"::-webkit-input-$1")+Le.replace(x,"::-moz-$1")+Le.replace(x,":-ms-input-$1")+Le}K=0}}return D+Le+pn}function n(H,O,U){var re=O.trim().split(v);O=re;var j=re.length,G=H.length;switch(G){case 0:case 1:var $=0;for(H=G===0?"":H[0]+" ";$<j;++$)O[$]=r(H,O[$],U).trim();break;default:var te=$=0;for(O=[];$<j;++$)for(var ae=0;ae<G;++ae)O[te++]=r(H[ae]+" ",re[$],U).trim()}return O}function r(H,O,U){var re=O.charCodeAt(0);switch(33>re&&(re=(O=O.trim()).charCodeAt(0)),re){case 38:return O.replace(w,"$1"+H.trim());case 58:return H.trim()+O.replace(w,"$1"+H.trim());default:if(0<1*U&&0<O.indexOf("\f"))return O.replace(w,(H.charCodeAt(0)===58?"":"$1")+H.trim())}return H+O}function o(H,O,U,re){var j=H+";",G=2*O+3*U+4*re;if(G===944){H=j.indexOf(":",9)+1;var $=j.substring(H,j.length-1).trim();return $=j.substring(0,H).trim()+$+";",ne===1||ne===2&&i($,1)?"-webkit-"+$+$:$}if(ne===0||ne===2&&!i(j,1))return j;switch(G){case 1015:return j.charCodeAt(10)===97?"-webkit-"+j+j:j;case 951:return j.charCodeAt(3)===116?"-webkit-"+j+j:j;case 963:return j.charCodeAt(5)===110?"-webkit-"+j+j:j;case 1009:if(j.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+j+j;case 978:return"-webkit-"+j+"-moz-"+j+j;case 1019:case 983:return"-webkit-"+j+"-moz-"+j+"-ms-"+j+j;case 883:if(j.charCodeAt(8)===45)return"-webkit-"+j+j;if(0<j.indexOf("image-set(",11))return j.replace(I,"$1-webkit-$2")+j;break;case 932:if(j.charCodeAt(4)===45)switch(j.charCodeAt(5)){case 103:return"-webkit-box-"+j.replace("-grow","")+"-webkit-"+j+"-ms-"+j.replace("grow","positive")+j;case 115:return"-webkit-"+j+"-ms-"+j.replace("shrink","negative")+j;case 98:return"-webkit-"+j+"-ms-"+j.replace("basis","preferred-size")+j}return"-webkit-"+j+"-ms-"+j+j;case 964:return"-webkit-"+j+"-ms-flex-"+j+j;case 1023:if(j.charCodeAt(8)!==99)break;return $=j.substring(j.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+$+"-webkit-"+j+"-ms-flex-pack"+$+j;case 1005:return p.test(j)?j.replace(h,":-webkit-")+j.replace(h,":-moz-")+j:j;case 1e3:switch($=j.substring(13).trim(),O=$.indexOf("-")+1,$.charCodeAt(0)+$.charCodeAt(O)){case 226:$=j.replace(C,"tb");break;case 232:$=j.replace(C,"tb-rl");break;case 220:$=j.replace(C,"lr");break;default:return j}return"-webkit-"+j+"-ms-"+$+j;case 1017:if(j.indexOf("sticky",9)===-1)break;case 975:switch(O=(j=H).length-10,$=(j.charCodeAt(O)===33?j.substring(0,O):j).substring(H.indexOf(":",7)+1).trim(),G=$.charCodeAt(0)+($.charCodeAt(7)|0)){case 203:if(111>$.charCodeAt(8))break;case 115:j=j.replace($,"-webkit-"+$)+";"+j;break;case 207:case 102:j=j.replace($,"-webkit-"+(102<G?"inline-":"")+"box")+";"+j.replace($,"-webkit-"+$)+";"+j.replace($,"-ms-"+$+"box")+";"+j}return j+";";case 938:if(j.charCodeAt(5)===45)switch(j.charCodeAt(6)){case 105:return $=j.replace("-items",""),"-webkit-"+j+"-webkit-box-"+$+"-ms-flex-"+$+j;case 115:return"-webkit-"+j+"-ms-flex-item-"+j.replace(T,"")+j;default:return"-webkit-"+j+"-ms-flex-line-pack"+j.replace("align-content","").replace(T,"")+j}break;case 973:case 989:if(j.charCodeAt(3)!==45||j.charCodeAt(4)===122)break;case 931:case 953:if(A.test(H)===!0)return($=H.substring(H.indexOf(":")+1)).charCodeAt(0)===115?o(H.replace("stretch","fill-available"),O,U,re).replace(":fill-available",":stretch"):j.replace($,"-webkit-"+$)+j.replace($,"-moz-"+$.replace("fill-",""))+j;break;case 962:if(j="-webkit-"+j+(j.charCodeAt(5)===102?"-ms-"+j:"")+j,U+re===211&&j.charCodeAt(13)===105&&0<j.indexOf("transform",10))return j.substring(0,j.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+j}return j}function i(H,O){var U=H.indexOf(O===1?":":"{"),re=H.substring(0,O!==3?U:10);return U=H.substring(U+1,H.length-1),ee(O!==2?re:re.replace(M,"$1"),U,O)}function a(H,O){var U=o(O,O.charCodeAt(0),O.charCodeAt(1),O.charCodeAt(2));return U!==O+";"?U.replace(R," or ($1)").substring(4):"("+O+")"}function s(H,O,U,re,j,G,$,te,ae,oe){for(var z=0,se=O,ie;z<B;++z)switch(ie=X[z].call(u,H,se,U,re,j,G,$,te,ae,oe)){case void 0:case!1:case!0:case null:break;default:se=ie}if(se!==O)return se}function l(H){switch(H){case void 0:case null:B=X.length=0;break;default:if(typeof H=="function")X[B++]=H;else if(typeof H=="object")for(var O=0,U=H.length;O<U;++O)l(H[O]);else Z=!!H|0}return l}function c(H){return H=H.prefix,H!==void 0&&(ee=null,H?typeof H!="function"?ne=1:(ne=2,ee=H):ne=0),c}function u(H,O){var U=H;if(33>U.charCodeAt(0)&&(U=U.trim()),J=U,U=[J],0<B){var re=s(-1,O,U,U,L,F,0,0,0,0);re!==void 0&&typeof re=="string"&&(O=re)}var j=t(q,U,O,0,0);return 0<B&&(re=s(-2,j,U,U,L,F,j.length,0,0,0),re!==void 0&&(j=re)),J="",K=0,F=L=1,j}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}/,N=/\(\s*(.*)\s*\)/g,R=/([\s\S]*?);/g,T=/-self|flex-/g,M=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,I=/([^-])(image-set\()/,F=1,L=1,K=0,ne=1,q=[],X=[],B=0,ee=null,Z=0,J="";return u.use=l,u.set=c,e!==void 0&&c(e),u}var p4={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 m4(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var g4=/^((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)-.*))$/,fx=m4(function(e){return g4.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Rh=Ph,w4={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},v4={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},y4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Nh={};Nh[Rh.ForwardRef]=y4,Nh[Rh.Memo]=hx;function px(e){return Rh.isMemo(e)?hx:Nh[e.$$typeof]||w4}var b4=Object.defineProperty,x4=Object.getOwnPropertyNames,mx=Object.getOwnPropertySymbols,_4=Object.getOwnPropertyDescriptor,S4=Object.getPrototypeOf,gx=Object.prototype;function wx(e,t,n){if(typeof t!="string"){if(gx){var r=S4(t);r&&r!==gx&&wx(e,r,n)}var o=x4(t);mx&&(o=o.concat(mx(t)));for(var i=px(e),a=px(t),s=0;s<o.length;++s){var l=o[s];if(!v4[l]&&!(n&&n[l])&&!(a&&a[l])&&!(i&&i[l])){var c=_4(t,l);try{b4(e,l,c)}catch{}}}}return e}var C4=wx;const E4=Nn(C4);function $r(){return($r=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 vx=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},Th=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!Ph.typeOf(e)},eu=Object.freeze([]),lo=Object.freeze({});function Ws(e){return typeof e=="function"}function yx(e){return e.displayName||e.name||"Component"}function Mh(e){return e&&typeof e.styledComponentId=="string"}var Xi=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Dh=typeof window<"u"&&"HTMLElement"in window,P4=!!(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 Gs(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 R4=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&&Gs(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}(),tu=new Map,nu=new Map,qs=1,ru=function(e){if(tu.has(e))return tu.get(e);for(;nu.has(qs);)qs++;var t=qs++;return tu.set(e,t),nu.set(t,e),t},N4=function(e){return nu.get(e)},T4=function(e,t){t>=qs&&(qs=t+1),tu.set(e,t),nu.set(t,e)},M4="style["+Xi+'][data-styled-version="5.3.11"]',D4=new RegExp("^"+Xi+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),A4=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)},I4=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(D4);if(s){var l=0|parseInt(s[1],10),c=s[2];l!==0&&(T4(c,l),A4(e,c,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}},k4=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},bx=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(Xi))return u}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(Xi,"active"),r.setAttribute("data-styled-version","5.3.11");var a=k4();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},O4=function(){function e(n){var r=this.element=bx(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}Gs(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}(),j4=function(){function e(n){var r=this.element=bx(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}(),$4=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}(),xx=Dh,F4={isServer:!Dh,useCSSOMInjection:!P4},_x=function(){function e(n,r,o){n===void 0&&(n=lo),r===void 0&&(r={}),this.options=$r({},F4,{},n),this.gs=r,this.names=new Map(o),this.server=!!n.isServer,!this.server&&Dh&&xx&&(xx=!1,function(i){for(var a=document.querySelectorAll(M4),s=0,l=a.length;s<l;s++){var c=a[s];c&&c.getAttribute(Xi)!=="active"&&(I4(i,c),c.parentNode&&c.parentNode.removeChild(c))}}(this))}e.registerId=function(n){return ru(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e($r({},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 $4(a):i?new O4(a):new j4(a),new R4(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(ru(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(ru(n),o)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(ru(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=N4(a);if(s!==void 0){var l=n.names.get(s),c=r.getGroup(a);if(l&&c&&l.size){var u=Xi+".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}(),L4=/(a)(d)/gi,Sx=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ah(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Sx(t%52)+n;return(Sx(t%52)+n).replace(L4,"$1-$2")}var Zi=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Cx=function(e){return Zi(5381,e)};function z4(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ws(n)&&!Mh(n))return!1}return!0}var B4=Cx("5.3.11"),H4=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&z4(t),this.componentId=n,this.baseHash=Zi(B4,n),this.baseStyle=r,_x.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=Ji(this.rules,t,n,r).join(""),s=Ah(Zi(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=Zi(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=Ji(h,t,n,r),m=Array.isArray(p)?p.join(""):p;u=Zi(u,m+f),d+=m}}if(d){var v=Ah(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}(),U4=/^\s*\/\/.*$/gm,V4=[":","[",".","#"];function W4(e){var t,n,r,o,i=lo,a=i.options,s=a===void 0?lo:a,l=i.plugins,c=l===void 0?eu:l,u=new h4(s),d=[],f=function(m){function v(w){if(w)try{m(w+"}")}catch{}}return function(w,b,x,S,C,N,R,T,M,A){switch(w){case 1:if(M===0&&b.charCodeAt(0)===64)return m(b+";"),"";break;case 2:if(T===0)return b+"/*|*/";break;case 3:switch(T){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&&V4.indexOf(w[n.length])!==-1||w.match(o)?m:"."+t};function p(m,v,w,b){b===void 0&&(b="&");var x=m.replace(U4,""),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||Gs(15),Zi(m,v.name)},5381).toString():"",p}var Ex=E.createContext();Ex.Consumer;var Px=E.createContext(),G4=(Px.Consumer,new _x),Ih=W4();function q4(){return E.useContext(Ex)||G4}function Y4(){return E.useContext(Px)||Ih}var K4=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=Ih);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 Gs(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=Ih),this.name+t.hash},e}(),X4=/([A-Z])/,Z4=/([A-Z])/g,J4=/^ms-/,Q4=function(e){return"-"+e.toLowerCase()};function Rx(e){return X4.test(e)?e.replace(Z4,Q4).replace(J4,"-ms-"):e}var Nx=function(e){return e==null||e===!1||e===""};function Ji(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)(o=Ji(e[a],t,n,r))!==""&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}if(Nx(e))return"";if(Mh(e))return"."+e.styledComponentId;if(Ws(e)){if(typeof(c=e)!="function"||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return Ji(l,t,n,r)}var c;return e instanceof K4?n?(e.inject(n,r),e.getName(r)):e:Th(e)?function u(d,f){var h,p,m=[];for(var v in d)d.hasOwnProperty(v)&&!Nx(d[v])&&(Array.isArray(d[v])&&d[v].isCss||Ws(d[v])?m.push(Rx(v)+":",d[v],";"):Th(d[v])?m.push.apply(m,u(d[v],v)):m.push(Rx(v)+": "+(h=v,(p=d[v])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in p4||h.startsWith("--")?String(p).trim():p+"px")+";"));return f?[f+" {"].concat(m,["}"]):m}(e):e.toString()}var Tx=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function e5(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 Ws(e)||Th(e)?Tx(Ji(vx(eu,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Tx(Ji(vx(e,n)))}var t5=function(e,t,n){return n===void 0&&(n=lo),e.theme!==n.theme&&e.theme||t||n.theme},n5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,r5=/(^-|-$)/g;function kh(e){return e.replace(n5,"-").replace(r5,"")}var o5=function(e){return Ah(Cx(e)>>>0)};function ou(e){return typeof e=="string"&&!0}var Oh=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},i5=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function a5(e,t,n){var r=e[n];Oh(t)&&Oh(r)?Mx(r,t):e[n]=t}function Mx(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(Oh(a))for(var s in a)i5(s)&&a5(e,a[s],s)}return e}var Dx=E.createContext();Dx.Consumer;var jh={};function Ax(e,t,n){var r=Mh(e),o=!ou(e),i=t.attrs,a=i===void 0?eu:i,s=t.componentId,l=s===void 0?function(b,x){var S=typeof b!="string"?"sc":kh(b);jh[S]=(jh[S]||0)+1;var C=S+"-"+o5("5.3.11"+S+jh[S]);return x?x+"-"+C:C}(t.displayName,t.parentComponentId):s,c=t.displayName,u=c===void 0?function(b){return ou(b)?"styled."+b:"Styled("+yx(b)+")"}(e):c,d=t.displayName&&t.componentId?kh(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 H4(n,d,r?e.componentStyle:void 0),v=m.isStatic&&a.length===0,w=function(b,x){return function(S,C,N,R){var T=S.attrs,M=S.componentStyle,A=S.defaultProps,I=S.foldedComponentIds,F=S.shouldForwardProp,L=S.styledComponentId,K=S.target,ne=function(re,j,G){re===void 0&&(re=lo);var $=$r({},j,{theme:re}),te={};return G.forEach(function(ae){var oe,z,se,ie=ae;for(oe in Ws(ie)&&(ie=ie($)),ie)$[oe]=te[oe]=oe==="className"?(z=te[oe],se=ie[oe],z&&se?z+" "+se:z||se):ie[oe]}),[$,te]}(t5(C,E.useContext(Dx),A)||lo,C,T),q=ne[0],X=ne[1],B=function(re,j,G,$){var te=q4(),ae=Y4(),oe=j?re.generateAndInjectStyles(lo,te,ae):re.generateAndInjectStyles(G,te,ae);return oe}(M,R,q),ee=N,Z=X.$as||C.$as||X.as||C.as||K,J=ou(Z),H=X!==C?$r({},C,{},X):C,O={};for(var U in H)U[0]!=="$"&&U!=="as"&&(U==="forwardedAs"?O.as=H[U]:(F?F(U,fx,Z):!J||fx(U))&&(O[U]=H[U]));return C.style&&X.style!==C.style&&(O.style=$r({},C.style,{},X.style)),O.className=Array.prototype.concat(I,L,B!==L?B:null,C.className,X.className).filter(Boolean).join(" "),O.ref=ee,E.createElement(Z,O)}(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):eu,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(b){var x=t.componentId,S=function(N,R){if(N==null)return{};var T,M,A={},I=Object.keys(N);for(M=0;M<I.length;M++)T=I[M],R.indexOf(T)>=0||(A[T]=N[T]);return A}(t,["componentId"]),C=x&&x+"-"+(ou(b)?b:kh(yx(b)));return Ax(b,$r({},S,{attrs:f,componentId:C}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=r?Mx({},e.defaultProps,b):b}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),o&&E4(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var co=function(e){return function t(n,r,o){if(o===void 0&&(o=lo),!Ph.isValidElementType(r))return Gs(1,String(r));var i=function(){return n(r,o,e5.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,$r({},o,{},a))},i.attrs=function(a){return t(n,r,$r({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(Ax,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){co[e]=co(e)});const Ix=E.createContext(null),kx=()=>{const e=E.useContext(Ix);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},s5=({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(Ix.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:o},children:e})},$h=e=>{const t=e;return{createProject:async(T,M)=>{const A={description:T,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 T=>await fetch(`${t}/subdomains?project_name=${T}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},releaseSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},publishProject:async(T,M)=>{const A={project_name:T,git_ref:M};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},unpublishProject:async T=>{const M={project_name:T};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},tagCommit:async(T,M,A)=>{const I={project_name:T,commit_hash:M,tag_name:A};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(T,M,A,I)=>{const F={project_name:T,component_namespace:M,component_name:A,layout_metadata:I};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})},addProjectChart:async(T,M,A)=>{const I={project_name:T,visual_id:M,layout_metadata:A};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},updateProjectComponentLayoutMetadata:async(T,M,A)=>{const I={project_name:T,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(I)})},updateProjectComponentSourceCode:async(T,M,A)=>{const I={project_name:T,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(I)})},updateApplicationMetadata:async(T,M,A,I)=>{const F={project_name:T,application_name:M,application_description:A,application_category:I};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})},updateApplicationSettings:async(T,M)=>{const A={project_name:T,application_login_enabled:M};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateProjectFile:async(T,M,A,I)=>{const F={file_path:T,project_name:M,source_code:A};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F),signal:I})},deleteProjectFile:async(T,M)=>{const A={project_name:T,file_path:M};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},resetProjectFile:async(T,M,A,I,F)=>{let L={project_name:T,file_path:M,git_ref:A};return I&&(L.prune=I),F&&(L.extra_metadata=F),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)})},deleteProject:async T=>{const M={projects:[T]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},requestErrorCorrection:async(T,M,A)=>{const I={project_name:T,component_id:M,error_message:A};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},addImage:async T=>await fetch(`${t}/add_image`,{method:"POST",body:T})}},Ox=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"}})}},Fh=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,N)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret_reference:N})}),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,N)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:N})}),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,N,R)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),getRateLimit:async(S,C,N)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteRateLimit:async(S,C,N)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),createProxyFetch:S=>async(C,N)=>{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}`,N)},createProxyGetView:S=>{const C=new URL(S.gwProxyUrl).hostname;return async(N,R,T={})=>{let M=`SELECT * FROM ${N}.${R}`;T&&Object.keys(T).length>0&&(M+=`(${Object.entries(T).map(([F,L])=>`'${F}=${L}'`).join(",")})`);const A=await fetch(`${t}/proxy/${S.miniappName}/${C}/v1/sql`,{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 At=[],Lh=0;Lh<256;++Lh)At.push((Lh+256).toString(16).slice(1));function l5(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}var iu,c5=new Uint8Array(16);function u5(){if(!iu&&(iu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!iu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return iu(c5)}var d5=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const jx={randomUUID:d5};function $x(e,t,n){if(jx.randomUUID&&!e)return jx.randomUUID();e=e||{};var r=e.random||(e.rng||u5)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,l5(r)}function f5(e){return typeof e=="function"}const h5=e=>{const{wrapAPICall:t}=kx(),n=$h(e);return new Proxy(n,{get:(o,i)=>{const a=o[i];return f5(a)?(...s)=>t(a.apply(o,s)):a}})},zh=E.createContext(null);zh.Consumer;const p5=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(()=>Ox(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($x()),x=h5(e.config.API_BASE_URL),S=$h(e.config.API_BASE_URL),C=x||S,[N,R]=E.useState(()=>Fh(e.config.PROXY_API_BASE_URL)),[T,M]=E.useState(null),[A,I]=E.useState(null),[F,L]=E.useState(),[K,ne]=E.useState(!1),q=()=>{b($x())},X=(B,ee)=>{if(!B)return;F&&(F.close(),ne(!1));const Z=localStorage.getItem("accessToken")||"",J=`${r.WS_BASE_URL}/ws/chat/${B}?token=${Z}`;if(!J.startsWith("ws://")&&!J.startsWith("wss://")){ee.onerror({customWebsocketError:"INVALID_URL"});return}const H=new WebSocket(J);H.onopen=()=>{ne(!0),ee.onopen()},H.onclose=O=>{ne(!1),ee.onclose(O)},H.onerror=O=>{ee.onerror(O)},H.onmessage=O=>{ee.onmessage(O)},L(H)};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(Ox(r.GW_BASE_URL)),R(B=>{const ee=Fh(r.PROXY_API_BASE_URL),Z=ee.createProxyFetch({miniappName:t.projectName}),J=async(U,re)=>Z(U,re);M(()=>J);const H=ee.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),O=async(U,re,j={})=>{if(typeof U!="string"||typeof re!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof U}, viewName: ${typeof re}`);return H(U,re,j)};return I(()=>O),ee}),()=>{F&&F.close()}},[r,t]),g.jsx(zh.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,handledRequestComponentIds:m,setHandledRequestComponentIds:v,syncToken:w,setSyncToken:q,selectedComponentId:c,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:f,selectedComponentHTML:h,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:l,APIHandler:C,gwAPIHandler:i,proxyHandler:N,proxyFetch:T,proxyGetView:A,startChatbot:X,chatbotWebsocket:F,chatbotWebsocketConnected:K},children:e.children})},m5=e=>g.jsx(s5,{children:g.jsx(p5,{...e})}),Bh=()=>{const e=E.useContext(zh);if(e===null)throw new Error("Invalid project context.");return{...e}},g5=co.div`
121
+ `}}}return i}(this)},e}(),L4=/(a)(d)/gi,Sx=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ah(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Sx(t%52)+n;return(Sx(t%52)+n).replace(L4,"$1-$2")}var Zi=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Cx=function(e){return Zi(5381,e)};function z4(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ws(n)&&!Mh(n))return!1}return!0}var B4=Cx("5.3.11"),H4=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&z4(t),this.componentId=n,this.baseHash=Zi(B4,n),this.baseStyle=r,_x.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=Ji(this.rules,t,n,r).join(""),s=Ah(Zi(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=Zi(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=Ji(h,t,n,r),m=Array.isArray(p)?p.join(""):p;u=Zi(u,m+f),d+=m}}if(d){var v=Ah(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}(),U4=/^\s*\/\/.*$/gm,V4=[":","[",".","#"];function W4(e){var t,n,r,o,i=lo,a=i.options,s=a===void 0?lo:a,l=i.plugins,c=l===void 0?eu:l,u=new h4(s),d=[],f=function(m){function v(w){if(w)try{m(w+"}")}catch{}}return function(w,b,x,S,C,N,R,T,M,A){switch(w){case 1:if(M===0&&b.charCodeAt(0)===64)return m(b+";"),"";break;case 2:if(T===0)return b+"/*|*/";break;case 3:switch(T){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&&V4.indexOf(w[n.length])!==-1||w.match(o)?m:"."+t};function p(m,v,w,b){b===void 0&&(b="&");var x=m.replace(U4,""),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||Gs(15),Zi(m,v.name)},5381).toString():"",p}var Ex=E.createContext();Ex.Consumer;var Px=E.createContext(),G4=(Px.Consumer,new _x),Ih=W4();function q4(){return E.useContext(Ex)||G4}function Y4(){return E.useContext(Px)||Ih}var K4=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=Ih);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 Gs(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=Ih),this.name+t.hash},e}(),X4=/([A-Z])/,Z4=/([A-Z])/g,J4=/^ms-/,Q4=function(e){return"-"+e.toLowerCase()};function Rx(e){return X4.test(e)?e.replace(Z4,Q4).replace(J4,"-ms-"):e}var Nx=function(e){return e==null||e===!1||e===""};function Ji(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)(o=Ji(e[a],t,n,r))!==""&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}if(Nx(e))return"";if(Mh(e))return"."+e.styledComponentId;if(Ws(e)){if(typeof(c=e)!="function"||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return Ji(l,t,n,r)}var c;return e instanceof K4?n?(e.inject(n,r),e.getName(r)):e:Th(e)?function u(d,f){var h,p,m=[];for(var v in d)d.hasOwnProperty(v)&&!Nx(d[v])&&(Array.isArray(d[v])&&d[v].isCss||Ws(d[v])?m.push(Rx(v)+":",d[v],";"):Th(d[v])?m.push.apply(m,u(d[v],v)):m.push(Rx(v)+": "+(h=v,(p=d[v])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in p4||h.startsWith("--")?String(p).trim():p+"px")+";"));return f?[f+" {"].concat(m,["}"]):m}(e):e.toString()}var Tx=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function e5(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 Ws(e)||Th(e)?Tx(Ji(vx(eu,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Tx(Ji(vx(e,n)))}var t5=function(e,t,n){return n===void 0&&(n=lo),e.theme!==n.theme&&e.theme||t||n.theme},n5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,r5=/(^-|-$)/g;function kh(e){return e.replace(n5,"-").replace(r5,"")}var o5=function(e){return Ah(Cx(e)>>>0)};function ou(e){return typeof e=="string"&&!0}var Oh=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},i5=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function a5(e,t,n){var r=e[n];Oh(t)&&Oh(r)?Mx(r,t):e[n]=t}function Mx(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(Oh(a))for(var s in a)i5(s)&&a5(e,a[s],s)}return e}var Dx=E.createContext();Dx.Consumer;var jh={};function Ax(e,t,n){var r=Mh(e),o=!ou(e),i=t.attrs,a=i===void 0?eu:i,s=t.componentId,l=s===void 0?function(b,x){var S=typeof b!="string"?"sc":kh(b);jh[S]=(jh[S]||0)+1;var C=S+"-"+o5("5.3.11"+S+jh[S]);return x?x+"-"+C:C}(t.displayName,t.parentComponentId):s,c=t.displayName,u=c===void 0?function(b){return ou(b)?"styled."+b:"Styled("+yx(b)+")"}(e):c,d=t.displayName&&t.componentId?kh(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 H4(n,d,r?e.componentStyle:void 0),v=m.isStatic&&a.length===0,w=function(b,x){return function(S,C,N,R){var T=S.attrs,M=S.componentStyle,A=S.defaultProps,I=S.foldedComponentIds,F=S.shouldForwardProp,L=S.styledComponentId,K=S.target,ne=function(re,j,G){re===void 0&&(re=lo);var $=$r({},j,{theme:re}),te={};return G.forEach(function(ae){var oe,z,se,ie=ae;for(oe in Ws(ie)&&(ie=ie($)),ie)$[oe]=te[oe]=oe==="className"?(z=te[oe],se=ie[oe],z&&se?z+" "+se:z||se):ie[oe]}),[$,te]}(t5(C,E.useContext(Dx),A)||lo,C,T),q=ne[0],X=ne[1],B=function(re,j,G,$){var te=q4(),ae=Y4(),oe=j?re.generateAndInjectStyles(lo,te,ae):re.generateAndInjectStyles(G,te,ae);return oe}(M,R,q),ee=N,Z=X.$as||C.$as||X.as||C.as||K,J=ou(Z),H=X!==C?$r({},C,{},X):C,O={};for(var U in H)U[0]!=="$"&&U!=="as"&&(U==="forwardedAs"?O.as=H[U]:(F?F(U,fx,Z):!J||fx(U))&&(O[U]=H[U]));return C.style&&X.style!==C.style&&(O.style=$r({},C.style,{},X.style)),O.className=Array.prototype.concat(I,L,B!==L?B:null,C.className,X.className).filter(Boolean).join(" "),O.ref=ee,E.createElement(Z,O)}(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):eu,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(b){var x=t.componentId,S=function(N,R){if(N==null)return{};var T,M,A={},I=Object.keys(N);for(M=0;M<I.length;M++)T=I[M],R.indexOf(T)>=0||(A[T]=N[T]);return A}(t,["componentId"]),C=x&&x+"-"+(ou(b)?b:kh(yx(b)));return Ax(b,$r({},S,{attrs:f,componentId:C}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=r?Mx({},e.defaultProps,b):b}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),o&&E4(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var co=function(e){return function t(n,r,o){if(o===void 0&&(o=lo),!Ph.isValidElementType(r))return Gs(1,String(r));var i=function(){return n(r,o,e5.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,$r({},o,{},a))},i.attrs=function(a){return t(n,r,$r({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(Ax,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){co[e]=co(e)});const Ix=E.createContext(null),kx=()=>{const e=E.useContext(Ix);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},s5=({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(Ix.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:o},children:e})},$h=e=>{const t=e;return{createProject:async(T,M)=>{const A={description:T,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 T=>await fetch(`${t}/subdomains?project_name=${T}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},releaseSubdomain:async(T,M)=>{const A={project_name:T,subdomain:M};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},publishProject:async(T,M)=>{const A={project_name:T,git_ref:M};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},unpublishProject:async T=>{const M={project_name:T};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},tagCommit:async(T,M,A)=>{const I={project_name:T,commit_hash:M,tag_name:A};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(T,M,A,I)=>{const F={project_name:T,component_namespace:M,component_name:A,layout_metadata:I};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})},addProjectChart:async(T,M,A)=>{const I={project_name:T,visual_id:M,layout_metadata:A};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},updateProjectComponentLayoutMetadata:async(T,M,A)=>{const I={project_name:T,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(I)})},updateProjectComponentSourceCode:async(T,M,A)=>{const I={project_name:T,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(I)})},updateApplicationMetadata:async(T,M,A,I)=>{const F={project_name:T,application_name:M,application_description:A,application_category:I};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})},updateApplicationSettings:async(T,M)=>{const A={project_name:T,application_login_enabled:M};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},updateProjectFile:async(T,M,A,I)=>{const F={file_path:T,project_name:M,source_code:A};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F),signal:I})},deleteProjectFile:async(T,M)=>{const A={project_name:T,file_path:M};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})},resetProjectFile:async(T,M,A,I,F)=>{let L={project_name:T,file_path:M,git_ref:A};return I&&(L.prune=I),F&&(L.extra_metadata=F),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)})},deleteProject:async T=>{const M={projects:[T]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})},requestErrorCorrection:async(T,M,A)=>{const I={project_name:T,component_id:M,error_message:A};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)})},addImage:async T=>await fetch(`${t}/add_image`,{method:"POST",body:T})}},Ox=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"}})}},Fh=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,N)=>await fetch(`${t}/config/miniapps/${S}/tier-key-map/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret_reference:N})}),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,N)=>await fetch(`${t}/config/miniapps/${S}/assignments/${C}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:N})}),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,N,R)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),getRateLimit:async(S,C,N)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteRateLimit:async(S,C,N)=>await fetch(`${t}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),createProxyFetch:S=>async(C,N)=>{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}`,N)},createProxyGetView:S=>{const C=new URL(S.gwProxyUrl).hostname;return async(N,R,T={})=>{let M=`SELECT * FROM ${N}.${R}`;T&&Object.keys(T).length>0&&(M+=`(${Object.entries(T).map(([F,L])=>`'${F}=${L}'`).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 At=[],Lh=0;Lh<256;++Lh)At.push((Lh+256).toString(16).slice(1));function l5(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}var iu,c5=new Uint8Array(16);function u5(){if(!iu&&(iu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!iu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return iu(c5)}var d5=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const jx={randomUUID:d5};function $x(e,t,n){if(jx.randomUUID&&!e)return jx.randomUUID();e=e||{};var r=e.random||(e.rng||u5)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,l5(r)}function f5(e){return typeof e=="function"}const h5=e=>{const{wrapAPICall:t}=kx(),n=$h(e);return new Proxy(n,{get:(o,i)=>{const a=o[i];return f5(a)?(...s)=>t(a.apply(o,s)):a}})},zh=E.createContext(null);zh.Consumer;const p5=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(()=>Ox(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($x()),x=h5(e.config.API_BASE_URL),S=$h(e.config.API_BASE_URL),C=x||S,[N,R]=E.useState(()=>Fh(e.config.PROXY_API_BASE_URL)),[T,M]=E.useState(null),[A,I]=E.useState(null),[F,L]=E.useState(),[K,ne]=E.useState(!1),q=()=>{b($x())},X=(B,ee)=>{if(!B)return;F&&(F.close(),ne(!1));const Z=localStorage.getItem("accessToken")||"",J=`${r.WS_BASE_URL}/ws/chat/${B}?token=${Z}`;if(!J.startsWith("ws://")&&!J.startsWith("wss://")){ee.onerror({customWebsocketError:"INVALID_URL"});return}const H=new WebSocket(J);H.onopen=()=>{ne(!0),ee.onopen()},H.onclose=O=>{ne(!1),ee.onclose(O)},H.onerror=O=>{ee.onerror(O)},H.onmessage=O=>{ee.onmessage(O)},L(H)};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(Ox(r.GW_BASE_URL)),R(B=>{const ee=Fh(r.PROXY_API_BASE_URL),Z=ee.createProxyFetch({miniappName:t.projectName}),J=async(U,re)=>Z(U,re);M(()=>J);const H=ee.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),O=async(U,re,j={})=>{if(typeof U!="string"||typeof re!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof U}, viewName: ${typeof re}`);return H(U,re,j)};return I(()=>O),ee}),()=>{F&&F.close()}},[r,t]),g.jsx(zh.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,handledRequestComponentIds:m,setHandledRequestComponentIds:v,syncToken:w,setSyncToken:q,selectedComponentId:c,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:f,selectedComponentHTML:h,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:l,APIHandler:C,gwAPIHandler:i,proxyHandler:N,proxyFetch:T,proxyGetView:A,startChatbot:X,chatbotWebsocket:F,chatbotWebsocketConnected:K},children:e.children})},m5=e=>g.jsx(s5,{children:g.jsx(p5,{...e})}),Bh=()=>{const e=E.useContext(zh);if(e===null)throw new Error("Invalid project context.");return{...e}},g5=co.div`
122
122
  position: fixed;
123
123
  top: 0;
124
124
  left: 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@spaceandtimelabs/makeinfinite-ui",
3
3
  "author": "aw-sxt",
4
4
  "private": false,
5
- "version": "0.43.1",
5
+ "version": "0.44.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {