@stagewise/toolbar
Version:
stagewise toolbar SDK for AI Agent interaction.
2 lines (1 loc) • 14.8 kB
JavaScript
;var n$1;exports.l=void 0;var u$1;exports.t=void 0;var i$1,r,o$1,e,f$1,c$1,s$1,a$1,h,p$1={},y=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n2,l2){for(var u2 in l2)n2[u2]=l2[u2];return n2}function g(n2){n2&&n2.parentNode&&n2.parentNode.removeChild(n2)}function _(l2,u2,t2){var i2,r2,o2,e2={};for(o2 in u2)o2=="key"?i2=u2[o2]:o2=="ref"?r2=u2[o2]:e2[o2]=u2[o2];if(arguments.length>2&&(e2.children=arguments.length>3?n$1.call(arguments,2):t2),typeof l2=="function"&&l2.defaultProps!=null)for(o2 in l2.defaultProps)e2[o2]==null&&(e2[o2]=l2.defaultProps[o2]);return m(l2,e2,i2,r2,null)}function m(n2,t2,i2,r2,o2){var e2={type:n2,props:t2,key:i2,ref:r2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o2??++u$1,__i:-1,__u:0};return o2==null&&exports.l.vnode!=null&&exports.l.vnode(e2),e2}function b(){return{current:null}}function k(n2){return n2.children}function x(n2,l2){this.props=n2,this.context=l2}function S(n2,l2){if(l2==null)return n2.__?S(n2.__,n2.__i+1):null;for(var u2;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null)return u2.__e;return typeof n2.type=="function"?S(n2):null}function C(n2){var l2,u2;if((n2=n2.__)!=null&&n2.__c!=null){for(n2.__e=n2.__c.base=null,l2=0;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null){n2.__e=n2.__c.base=u2.__e;break}return C(n2)}}function M(n2){(!n2.__d&&(n2.__d=!0)&&i$1.push(n2)&&!$.__r++||r!=exports.l.debounceRendering)&&((r=exports.l.debounceRendering)||o$1)($)}function $(){for(var n2,u2,t2,r2,o2,f2,c2,s2=1;i$1.length;)i$1.length>s2&&i$1.sort(e),n2=i$1.shift(),s2=i$1.length,n2.__d&&(t2=void 0,o2=(r2=(u2=n2).__v).__e,f2=[],c2=[],u2.__P&&((t2=d({},r2)).__v=r2.__v+1,exports.l.vnode&&exports.l.vnode(t2),O(u2.__P,t2,r2,u2.__n,u2.__P.namespaceURI,32&r2.__u?[o2]:null,f2,o2??S(r2),!!(32&r2.__u),c2),t2.__v=r2.__v,t2.__.__k[t2.__i]=t2,z(f2,t2,c2),t2.__e!=o2&&C(t2)));$.__r=0}function I(n2,l2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,v2,w2,d2,g2,_2=t2&&t2.__k||y,m2=l2.length;for(f2=P(u2,l2,_2,f2,m2),a2=0;a2<m2;a2++)(v2=u2.__k[a2])!=null&&(h2=v2.__i==-1?p$1:_2[v2.__i]||p$1,v2.__i=a2,g2=O(n2,v2,h2,i2,r2,o2,e2,f2,c2,s2),w2=v2.__e,v2.ref&&h2.ref!=v2.ref&&(h2.ref&&q(h2.ref,null,v2),s2.push(v2.ref,v2.__c||w2,v2)),d2==null&&w2!=null&&(d2=w2),4&v2.__u||h2.__k===v2.__k?f2=A(v2,f2,n2):typeof v2.type=="function"&&g2!==void 0?f2=g2:w2&&(f2=w2.nextSibling),v2.__u&=-7);return u2.__e=d2,f2}function P(n2,l2,u2,t2,i2){var r2,o2,e2,f2,c2,s2=u2.length,a2=s2,h2=0;for(n2.__k=new Array(i2),r2=0;r2<i2;r2++)(o2=l2[r2])!=null&&typeof o2!="boolean"&&typeof o2!="function"?(f2=r2+h2,(o2=n2.__k[r2]=typeof o2=="string"||typeof o2=="number"||typeof o2=="bigint"||o2.constructor==String?m(null,o2,null,null,null):w(o2)?m(k,{children:o2},null,null,null):o2.constructor==null&&o2.__b>0?m(o2.type,o2.props,o2.key,o2.ref?o2.ref:null,o2.__v):o2).__=n2,o2.__b=n2.__b+1,e2=null,(c2=o2.__i=L(o2,u2,f2,a2))!=-1&&(a2--,(e2=u2[c2])&&(e2.__u|=2)),e2==null||e2.__v==null?(c2==-1&&(i2>s2?h2--:i2<s2&&h2++),typeof o2.type!="function"&&(o2.__u|=4)):c2!=f2&&(c2==f2-1?h2--:c2==f2+1?h2++:(c2>f2?h2--:h2++,o2.__u|=4))):n2.__k[r2]=null;if(a2)for(r2=0;r2<s2;r2++)(e2=u2[r2])!=null&&(2&e2.__u)==0&&(e2.__e==t2&&(t2=S(e2)),B(e2,e2));return t2}function A(n2,l2,u2){var t2,i2;if(typeof n2.type=="function"){for(t2=n2.__k,i2=0;t2&&i2<t2.length;i2++)t2[i2]&&(t2[i2].__=n2,l2=A(t2[i2],l2,u2));return l2}n2.__e!=l2&&(l2&&n2.type&&!u2.contains(l2)&&(l2=S(n2)),u2.insertBefore(n2.__e,l2||null),l2=n2.__e);do l2=l2&&l2.nextSibling;while(l2!=null&&l2.nodeType==8);return l2}function H(n2,l2){return l2=l2||[],n2==null||typeof n2=="boolean"||(w(n2)?n2.some(function(n3){H(n3,l2)}):l2.push(n2)),l2}function L(n2,l2,u2,t2){var i2,r2,o2=n2.key,e2=n2.type,f2=l2[u2];if(f2===null&&n2.key==null||f2&&o2==f2.key&&e2==f2.type&&(2&f2.__u)==0)return u2;if(t2>(f2!=null&&(2&f2.__u)==0?1:0))for(i2=u2-1,r2=u2+1;i2>=0||r2<l2.length;){if(i2>=0){if((f2=l2[i2])&&(2&f2.__u)==0&&o2==f2.key&&e2==f2.type)return i2;i2--}if(r2<l2.length){if((f2=l2[r2])&&(2&f2.__u)==0&&o2==f2.key&&e2==f2.type)return r2;r2++}}return-1}function T(n2,l2,u2){l2[0]=="-"?n2.setProperty(l2,u2??""):n2[l2]=u2==null?"":typeof u2!="number"||v.test(l2)?u2:u2+"px"}function j(n2,l2,u2,t2,i2){var r2;n:if(l2=="style")if(typeof u2=="string")n2.style.cssText=u2;else{if(typeof t2=="string"&&(n2.style.cssText=t2=""),t2)for(l2 in t2)u2&&l2 in u2||T(n2.style,l2,"");if(u2)for(l2 in u2)t2&&u2[l2]==t2[l2]||T(n2.style,l2,u2[l2])}else if(l2[0]=="o"&&l2[1]=="n")r2=l2!=(l2=l2.replace(f$1,"$1")),l2=l2.toLowerCase()in n2||l2=="onFocusOut"||l2=="onFocusIn"?l2.toLowerCase().slice(2):l2.slice(2),n2.l||(n2.l={}),n2.l[l2+r2]=u2,u2?t2?u2.u=t2.u:(u2.u=c$1,n2.addEventListener(l2,r2?a$1:s$1,r2)):n2.removeEventListener(l2,r2?a$1:s$1,r2);else{if(i2=="http://www.w3.org/2000/svg")l2=l2.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(l2!="width"&&l2!="height"&&l2!="href"&&l2!="list"&&l2!="form"&&l2!="tabIndex"&&l2!="download"&&l2!="rowSpan"&&l2!="colSpan"&&l2!="role"&&l2!="popover"&&l2 in n2)try{n2[l2]=u2??"";break n}catch{}typeof u2=="function"||(u2==null||u2===!1&&l2[4]!="-"?n2.removeAttribute(l2):n2.setAttribute(l2,l2=="popover"&&u2==1?"":u2))}}function F(n2){return function(u2){if(this.l){var t2=this.l[u2.type+n2];if(u2.t==null)u2.t=c$1++;else if(u2.t<t2.u)return;return t2(exports.l.event?exports.l.event(u2):u2)}}}function O(n2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,p2,y2,v2,_2,m2,b2,S2,C2,M2,$2,P2,A2,H2,L2,T2,j2=u2.type;if(u2.constructor!=null)return null;128&t2.__u&&(c2=!!(32&t2.__u),o2=[f2=u2.__e=t2.__e]),(a2=exports.l.__b)&&a2(u2);n:if(typeof j2=="function")try{if(b2=u2.props,S2="prototype"in j2&&j2.prototype.render,C2=(a2=j2.contextType)&&i2[a2.__c],M2=a2?C2?C2.props.value:a2.__:i2,t2.__c?m2=(h2=u2.__c=t2.__c).__=h2.__E:(S2?u2.__c=h2=new j2(b2,M2):(u2.__c=h2=new x(b2,M2),h2.constructor=j2,h2.render=D),C2&&C2.sub(h2),h2.props=b2,h2.state||(h2.state={}),h2.context=M2,h2.__n=i2,p2=h2.__d=!0,h2.__h=[],h2._sb=[]),S2&&h2.__s==null&&(h2.__s=h2.state),S2&&j2.getDerivedStateFromProps!=null&&(h2.__s==h2.state&&(h2.__s=d({},h2.__s)),d(h2.__s,j2.getDerivedStateFromProps(b2,h2.__s))),y2=h2.props,v2=h2.state,h2.__v=u2,p2)S2&&j2.getDerivedStateFromProps==null&&h2.componentWillMount!=null&&h2.componentWillMount(),S2&&h2.componentDidMount!=null&&h2.__h.push(h2.componentDidMount);else{if(S2&&j2.getDerivedStateFromProps==null&&b2!==y2&&h2.componentWillReceiveProps!=null&&h2.componentWillReceiveProps(b2,M2),!h2.__e&&h2.shouldComponentUpdate!=null&&h2.shouldComponentUpdate(b2,h2.__s,M2)===!1||u2.__v==t2.__v){for(u2.__v!=t2.__v&&(h2.props=b2,h2.state=h2.__s,h2.__d=!1),u2.__e=t2.__e,u2.__k=t2.__k,u2.__k.some(function(n3){n3&&(n3.__=u2)}),$2=0;$2<h2._sb.length;$2++)h2.__h.push(h2._sb[$2]);h2._sb=[],h2.__h.length&&e2.push(h2);break n}h2.componentWillUpdate!=null&&h2.componentWillUpdate(b2,h2.__s,M2),S2&&h2.componentDidUpdate!=null&&h2.__h.push(function(){h2.componentDidUpdate(y2,v2,_2)})}if(h2.context=M2,h2.props=b2,h2.__P=n2,h2.__e=!1,P2=exports.l.__r,A2=0,S2){for(h2.state=h2.__s,h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),H2=0;H2<h2._sb.length;H2++)h2.__h.push(h2._sb[H2]);h2._sb=[]}else do h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),h2.state=h2.__s;while(h2.__d&&++A2<25);h2.state=h2.__s,h2.getChildContext!=null&&(i2=d(d({},i2),h2.getChildContext())),S2&&!p2&&h2.getSnapshotBeforeUpdate!=null&&(_2=h2.getSnapshotBeforeUpdate(y2,v2)),L2=a2,a2!=null&&a2.type===k&&a2.key==null&&(L2=N(a2.props.children)),f2=I(n2,w(L2)?L2:[L2],u2,t2,i2,r2,o2,e2,f2,c2,s2),h2.base=u2.__e,u2.__u&=-161,h2.__h.length&&e2.push(h2),m2&&(h2.__E=h2.__=null)}catch(n3){if(u2.__v=null,c2||o2!=null)if(n3.then){for(u2.__u|=c2?160:128;f2&&f2.nodeType==8&&f2.nextSibling;)f2=f2.nextSibling;o2[o2.indexOf(f2)]=null,u2.__e=f2}else for(T2=o2.length;T2--;)g(o2[T2]);else u2.__e=t2.__e,u2.__k=t2.__k;exports.l.__e(n3,u2,t2)}else o2==null&&u2.__v==t2.__v?(u2.__k=t2.__k,u2.__e=t2.__e):f2=u2.__e=V(t2.__e,u2,t2,i2,r2,o2,e2,c2,s2);return(a2=exports.l.diffed)&&a2(u2),128&u2.__u?void 0:f2}function z(n2,u2,t2){for(var i2=0;i2<t2.length;i2++)q(t2[i2],t2[++i2],t2[++i2]);exports.l.__c&&exports.l.__c(u2,n2),n2.some(function(u3){try{n2=u3.__h,u3.__h=[],n2.some(function(n3){n3.call(u3)})}catch(n3){exports.l.__e(n3,u3.__v)}})}function N(n2){return typeof n2!="object"||n2==null||n2.__b&&n2.__b>0?n2:w(n2)?n2.map(N):d({},n2)}function V(u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,y2,v2,d2,_2,m2,b2=i2.props,k2=t2.props,x2=t2.type;if(x2=="svg"?o2="http://www.w3.org/2000/svg":x2=="math"?o2="http://www.w3.org/1998/Math/MathML":o2||(o2="http://www.w3.org/1999/xhtml"),e2!=null){for(a2=0;a2<e2.length;a2++)if((d2=e2[a2])&&"setAttribute"in d2==!!x2&&(x2?d2.localName==x2:d2.nodeType==3)){u2=d2,e2[a2]=null;break}}if(u2==null){if(x2==null)return document.createTextNode(k2);u2=document.createElementNS(o2,x2,k2.is&&k2),c2&&(exports.l.__m&&exports.l.__m(t2,e2),c2=!1),e2=null}if(x2==null)b2===k2||c2&&u2.data==k2||(u2.data=k2);else{if(e2=e2&&n$1.call(u2.childNodes),b2=i2.props||p$1,!c2&&e2!=null)for(b2={},a2=0;a2<u2.attributes.length;a2++)b2[(d2=u2.attributes[a2]).name]=d2.value;for(a2 in b2)if(d2=b2[a2],a2!="children"){if(a2=="dangerouslySetInnerHTML")y2=d2;else if(!(a2 in k2)){if(a2=="value"&&"defaultValue"in k2||a2=="checked"&&"defaultChecked"in k2)continue;j(u2,a2,null,d2,o2)}}for(a2 in k2)d2=k2[a2],a2=="children"?v2=d2:a2=="dangerouslySetInnerHTML"?h2=d2:a2=="value"?_2=d2:a2=="checked"?m2=d2:c2&&typeof d2!="function"||b2[a2]===d2||j(u2,a2,d2,b2[a2],o2);if(h2)c2||y2&&(h2.__html==y2.__html||h2.__html==u2.innerHTML)||(u2.innerHTML=h2.__html),t2.__k=[];else if(y2&&(u2.innerHTML=""),I(t2.type=="template"?u2.content:u2,w(v2)?v2:[v2],t2,i2,r2,x2=="foreignObject"?"http://www.w3.org/1999/xhtml":o2,e2,f2,e2?e2[0]:i2.__k&&S(i2,0),c2,s2),e2!=null)for(a2=e2.length;a2--;)g(e2[a2]);c2||(a2="value",x2=="progress"&&_2==null?u2.removeAttribute("value"):_2!=null&&(_2!==u2[a2]||x2=="progress"&&!_2||x2=="option"&&_2!=b2[a2])&&j(u2,a2,_2,b2[a2],o2),a2="checked",m2!=null&&m2!=u2[a2]&&j(u2,a2,m2,b2[a2],o2))}return u2}function q(n2,u2,t2){try{if(typeof n2=="function"){var i2=typeof n2.__u=="function";i2&&n2.__u(),i2&&u2==null||(n2.__u=n2(u2))}else n2.current=u2}catch(n3){exports.l.__e(n3,t2)}}function B(n2,u2,t2){var i2,r2;if(exports.l.unmount&&exports.l.unmount(n2),(i2=n2.ref)&&(i2.current&&i2.current!=n2.__e||q(i2,null,u2)),(i2=n2.__c)!=null){if(i2.componentWillUnmount)try{i2.componentWillUnmount()}catch(n3){exports.l.__e(n3,u2)}i2.base=i2.__P=null}if(i2=n2.__k)for(r2=0;r2<i2.length;r2++)i2[r2]&&B(i2[r2],u2,t2||typeof n2.type!="function");t2||g(n2.__e),n2.__c=n2.__=n2.__e=void 0}function D(n2,l2,u2){return this.constructor(n2,u2)}function E(u2,t2,i2){var r2,o2,e2,f2;t2==document&&(t2=document.documentElement),exports.l.__&&exports.l.__(u2,t2),o2=(r2=typeof i2=="function")?null:i2&&i2.__k||t2.__k,e2=[],f2=[],O(t2,u2=(!r2&&i2||t2).__k=_(k,null,[u2]),o2||p$1,p$1,t2.namespaceURI,!r2&&i2?[i2]:o2?null:t2.firstChild?n$1.call(t2.childNodes):null,e2,!r2&&i2?i2:o2?o2.__e:t2.firstChild,r2,f2),z(e2,u2,f2)}function G(n2,l2){E(n2,l2,G)}function J(l2,u2,t2){var i2,r2,o2,e2,f2=d({},l2.props);for(o2 in l2.type&&l2.type.defaultProps&&(e2=l2.type.defaultProps),u2)o2=="key"?i2=u2[o2]:o2=="ref"?r2=u2[o2]:f2[o2]=u2[o2]==null&&e2!=null?e2[o2]:u2[o2];return arguments.length>2&&(f2.children=arguments.length>3?n$1.call(arguments,2):t2),m(l2.type,f2,i2||l2.key,r2||l2.ref,null)}function K(n2){function l2(n3){var u2,t2;return this.getChildContext||(u2=new Set,(t2={})[l2.__c]=this,this.getChildContext=function(){return t2},this.componentWillUnmount=function(){u2=null},this.shouldComponentUpdate=function(n4){this.props.value!=n4.value&&u2.forEach(function(n5){n5.__e=!0,M(n5)})},this.sub=function(n4){u2.add(n4);var l3=n4.componentWillUnmount;n4.componentWillUnmount=function(){u2&&u2.delete(n4),l3&&l3.call(n4)}}),n3.children}return l2.__c="__cC"+h++,l2.__=n2,l2.Provider=l2.__l=(l2.Consumer=function(n3,l3){return n3.children(l3)}).contextType=l2,l2}n$1=y.slice,exports.l={__e:function(n2,l2,u2,t2){for(var i2,r2,o2;l2=l2.__;)if((i2=l2.__c)&&!i2.__)try{if((r2=i2.constructor)&&r2.getDerivedStateFromError!=null&&(i2.setState(r2.getDerivedStateFromError(n2)),o2=i2.__d),i2.componentDidCatch!=null&&(i2.componentDidCatch(n2,t2||{}),o2=i2.__d),o2)return i2.__E=i2}catch(l3){n2=l3}throw n2}},u$1=0,exports.t=function(n2){return n2!=null&&n2.constructor==null},x.prototype.setState=function(n2,l2){var u2;u2=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=d({},this.state),typeof n2=="function"&&(n2=n2(d({},u2),this.props)),n2&&d(u2,n2),n2!=null&&this.__v&&(l2&&this._sb.push(l2),M(this))},x.prototype.forceUpdate=function(n2){this.__v&&(this.__e=!0,n2&&this.__h.push(n2),M(this))},x.prototype.render=k,i$1=[],o$1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n2,l2){return n2.__v.__b-l2.__v.__b},$.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F(!1),a$1=F(!0),h=0;var t=/["&<]/;function n(r2){if(r2.length===0||t.test(r2)===!1)return r2;for(var e2=0,n2=0,o2="",f2="";n2<r2.length;n2++){switch(r2.charCodeAt(n2)){case 34:f2=""";break;case 38:f2="&";break;case 60:f2="<";break;default:continue}n2!==e2&&(o2+=r2.slice(e2,n2)),o2+=f2,e2=n2+1}return n2!==e2&&(o2+=r2.slice(e2,n2)),o2}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e2,t2,n2,o2,i2,u2){t2||(t2={});var a2,c2,p2=t2;if("ref"in p2)for(c2 in p2={},t2)c2=="ref"?a2=t2[c2]:p2[c2]=t2[c2];var l2={type:e2,props:p2,key:n2,ref:a2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i2,__self:u2};if(typeof e2=="function"&&(a2=e2.defaultProps))for(c2 in a2)p2[c2]===void 0&&(p2[c2]=a2[c2]);return exports.l.vnode&&exports.l.vnode(l2),l2}function a(r2){var t2=u(k,{tpl:r2,exprs:[].slice.call(arguments,1)});return t2.key=t2.__v,t2}var c={},p=/[A-Z]/g;function l(e2,t2){if(exports.l.attr){var f2=exports.l.attr(e2,t2);if(typeof f2=="string")return f2}if(e2==="ref"||e2==="key")return"";if(e2==="style"&&typeof t2=="object"){var i2="";for(var u2 in t2){var a2=t2[u2];if(a2!=null&&a2!==""){var l2=u2[0]=="-"?u2:c[u2]||(c[u2]=u2.replace(p,"-$&").toLowerCase()),s2=";";typeof a2!="number"||l2.startsWith("--")||o.test(l2)||(s2="px;"),i2=i2+l2+":"+a2+s2}}return e2+'="'+i2+'"'}return t2==null||t2===!1||typeof t2=="function"||typeof t2=="object"?"":t2===!0?e2:e2+'="'+n(t2)+'"'}function s(r2){if(r2==null||typeof r2=="boolean"||typeof r2=="function")return null;if(typeof r2=="object"){if(r2.constructor===void 0)return r2;if(i(r2)){for(var e2=0;e2<r2.length;e2++)r2[e2]=s(r2[e2]);return r2}}return n(""+r2)}exports.E=E;exports.G=G;exports.H=H;exports.J=J;exports.K=K;exports._=_;exports.a=a;exports.b=b;exports.k=k;exports.l$1=l;exports.s=s;exports.u=u;exports.x=x;