PageSourceSearch

https://base44.com/assets/index-BxO6IJ_d.js

js base44.com collected 2026-10-01 09:12:28 UTC 10,440 bytes, 1 lines download raw bytes

1import{l as I,m as G,n as U}from"./vendor-react-BtuDEMKy.js";import{r as V}from"./mediaScrollHelper-CCyUarJn.js";function X(_,h){for(var P=0;P<h.length;P++){const y=h[P];if(typeof y!="string"&&!Array.isArray(y)){for(const b in y)if(b!=="default"&&!(b in _)){const S=Object.getOwnPropertyDescriptor(y,b);S&&Object.defineProperty(_,b,S.get?S:{enumerable:!0,get:()=>y[b]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var B={},W;function Y(){return W||(W=1,(function(_){Object.defineProperty(_,"__esModule",{value:!0});var h=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}return n},P=(function(){function n(r,o){for(var t=0;t<o.length;t++){var e=o[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,o,t){return o&&n(r.prototype,o),t&&n(r,t),r}})(),y=function(r,o,t){var e=!0;t:for(;e;){var i=r,l=o,a=t;e=!1,i===null&&(i=Function.prototype);var p=Object.getOwnPropertyDescriptor(i,l);if(p===void 0){var c=Object.getPrototypeOf(i);if(c===null)return;r=c,o=l,t=a,e=!0,p=c=void 0;continue t}else{if("value"in p)return p.value;var g=p.get;return g===void 0?void 0:g.call(a)}}};function b(n){return n&&n.__esModule?n:{default:n}}function S(n,r){var o={};for(var t in n)r.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t]);return o}function M(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function R(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r)}var k=I(),w=b(k),C=G(),L=b(C),F=V(),d=b(F),O=8,x=9,N=(function(n){R(r,n);function r(){var o=this;M(this,r),y(Object.getPrototypeOf(r.prototype),"constructor",this).apply(this,arguments),this.state={hover:!1,transition:"opacity",width:0,height:0},this.margin=15,this.defaultArrowStyle={color:"#fff",borderColor:"rgba(0,0,0,.4)"},this.rootRef=w.default.createRef(),this.handleMouseEnter=function(){o.props.active&&o.props.useHover&&o.setState({hover:!0})},this.handleMouseLeave=function(){o.setState({hover:!1})}}return P(r,[{key:"getGlobalStyle",value:function(){if(!this.props.parentEl)return{display:"none"};var t=h({position:"absolute",padding:"5px",background:"#fff",boxShadow:"0 0 8px rgba(0,0,0,.3)",borderRadius:"3px",transition:this.state.transition+" .3s ease-in-out, visibility .3s ease-in-out",opacity:this.state.hover||this.props.active?1:0,visibility:this.state.hover||this.props.active?"visible":"hidden",zIndex:50},this.getStyle(this.props.position,this.props.arrow));return this.mergeStyle(t,this.props.style.style)}},{key:"getBaseArrowStyle",value:function(){return{position:"absolute",content:'""',transition:"all .3s ease-in-out"}}},{key:"getArrowStyle",value:function(){var t=this.getBaseArrowStyle(),e=this.getBaseArrowStyle();t.zIndex=60,e.zIndex=55;var i=h({},this.defaultArrowStyle,this.props.style.arrowStyle),l=i.borderColor?i.borderColor:"transparent",a="10px solid "+i.color,p=O+"px solid transparent",c="11px solid "+l,g=x+"px solid transparent",E=this.props,v=E.position,m=E.arrow;v==="left"||v==="right"?(t.top="50%",t.borderTop=p,t.borderBottom=p,t.marginTop=-7,e.borderTop=g,e.borderBottom=g,e.top="50%",e.marginTop=-8,v==="left"?(t.right=-10,t.borderLeft=a,e.right=-11,e.borderLeft=c):(t.left=-10,t.borderRight=a,e.left=-11,e.borderRight=c),m==="top"&&(t.top=this.margin,e.top=this.margin),m==="bottom"&&(t.top=null,t.bottom=this.margin-7,e.top=null,e.bottom=this.margin-8)):(t.left=Math.round(this.state.width/2-O),t.borderLeft=p,t.borderRight=p,t.marginLeft=0,e.left=t.left-1,e.borderLeft=g,e.borderRight=g,e.marginLeft=0,v==="top"?(t.bottom=-10,t.borderTop=a,e.bottom=-11,e.borderTop=c):(t.top=-10,t.borderBottom=a,e.top=-11,e.borderBottom=c),m==="right"&&(t.left=null,t.right=this.margin+1-O,e.left=null,e.right=this.margin-O),m==="left"&&(t.left=this.margin+1-O,e.left=this.margin-O));var s=this.props.style.arrowStyle;s.color,s.borderColor;var u=S(s,["color","borderColor"]);return{fgStyle:this.mergeStyle(t,u),bgStyle:this.mergeStyle(e,u)}}},{key:"mergeStyle",value:function(t,e){if(e){e.position,e.top,e.left,e.right,e.bottom,e.marginLeft,e.marginRight;var i=S(e,["position","top","left","right","bottom","marginLeft","marginRight"]);return h({},t,i)}return t}},{key:"getStyle",value:function(t,e){var i=this,l=0,a=this.props.parentEl,p=this.props.align,c=a.getBoundingClientRect(),g=window.scrollY!==void 0?window.scrollY:window.pageYOffset,E=window.scrollX!==void 0?window.scrollX:window.pageXOffset,v=g+c.top,m=E+c.left,s={},u={width:a.offsetWidth,height:a.offsetHeight};!a.offsetHeight&&a.getBoundingClientRect&&(u.width=a.getBoundingClientRect().width,u.height=a.getBoundingClientRect().height),p==="left"?l=-u.width/2+O:p==="right"&&(l=u.width/2-O);var q={left:function(){s.top=v+u.height/2-i.state.height/2,s.left=m-i.state.width-i.margin},right:function(){s.top=v+u.height/2-i.state.height/2,s.left=m+u.width+i.margin},top:function(){s.left=m-i.state.width/2+u.width/2+l,s.top=v-i.state.height-i.margin},bottom:function(){s.left=m-i.state.width/2+u.width/2+l,s.top=v+u.height+i.margin}},H={left:function(){s.left=m+u.width/2-i.margin+l},right:function(){s.left=m-i.state.width+u.width/2+i.margin+l},top:function(){s.top=v+u.height/2-i.margin},bottom:function(){s.top=v+u.height/2-i.state.height+i.margin}};return A(q,t),A(H,e),s}},{key:"checkWindowPosition",value:function(t,e){if(this.props.position==="top"||this.props.position==="bottom")if(t.left<0){var i=this.props.parentEl;if(i){var l=this.state.width,a=e.bgStyle.right;a||(a=l/2-x);var p=Math.round(a-t.left+this.margin);e=h({},e,{bgStyle:h({},e.bgStyle,{right:p,left:null}),fgStyle:h({},e.fgStyle,{right:p+1,left:null})})}t.left=this.margin}else{var c=t.left+this.state.width-window.innerWidth;if(c>0){var g=t.left;t.left=window.innerWidth-this.state.width-this.margin,e.fgStyle.marginLeft+=g-t.left,e.bgStyle.marginLeft+=g-t.left}}return{style:t,arrowStyle:e}}},{key:"componentDidMount",value:function(){this.updateSize()}},{key:"componentDidUpdate",value:function(t,e){this.props!==t&&this.updateSize()}},{key:"updateSize",value:function(){var t=this.rootRef.current.offsetWidth,e=this.rootRef.current.offsetHeight;(t!==this.state.width||e!==this.state.height)&&this.setState({width:t,height:e})}},{key:"render",value:function(){var t=this.checkWindowPosition(this.getGlobalStyle(),this.getArrowStyle()),e=t.style,i=t.arrowStyle;return w.default.createElement("div",{style:e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,ref:this.rootRef},this.props.arrow?w.default.createElement("div",null,w.default.createElement("span",{style:i.fgStyle}),w.default.createElement("span",{style:i.bgStyle})):null,this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(t,e){return{transition:e.hover||t.active?"all":"opacity"}}},{key:"propTypes",value:{active:d.default.bool,position:d.default.oneOf(["top","right","bottom","left"]),arrow:d.default.oneOf([null,"center","top","right","bottom","left"]),align:d.default.oneOf([null,"center","right","left"]),style:d.default.object,useHover:d.default.bool},enumerable:!0},{key:"defaultProps",value:{active:!1,position:"right",arrow:null,align:null,style:{style:{},arrowStyle:{}},useHover:!0},enumerable:!0}]),r})(k.Component),f={},D=(function(n){R(r,n);function r(){M(this,r),y(Object.getPrototypeOf(r.prototype),"constructor",this).apply(this,arguments)}return P(r,[{key:"createPortal",value:function(){f[this.props.group]={node:document.createElement("div"),timeout:!1},f[this.props.group].node.className="ToolTipPortal",document.body.appendChild(f[this.props.group].node)}},{key:"renderPortal",value:function(t){f[this.props.group]||this.createPortal();var e=t.parent,i=S(t,["parent"]),l=typeof e=="string"?document.querySelector(e):e;L.default.render(w.default.createElement(N,h({parentEl:l},i)),f[this.props.group].node)}},{key:"componentDidMount",value:function(){this.props.active&&this.renderPortal(this.props)}},{key:"componentWillReceiveProps",value:function(t){var e=this;if(!(!f[this.props.group]&&!t.active||!this.props.active&&!t.active)){var i=h({},t),l=h({},t);f[this.props.group]&&f[this.props.group].timeout&&clearTimeout(f[this.props.group].timeout),this.props.active&&!i.active&&(l.active=!0,f[this.props.group].timeout=setTimeout(function(){i.active=!1,e.renderPortal(i)},this.props.tooltipTimeout)),this.renderPortal(l)}}},{key:"componentWillUnmount",value:function(){if(f[this.props.group]){L.default.unmountComponentAtNode(f[this.props.group].node),clearTimeout(f[this.props.group].timeout);try{document.body.removeChild(f[this.props.group].node)}catch{}f[this.props.group]=null}}},{key:"render",value:function(){return null}}],[{key:"propTypes",value:{parent:d.default.oneOfType([d.default.string,d.default.object]).isRequired,active:d.default.bool,group:d.default.string,tooltipTimeout:d.default.number},enumerable:!0},{key:"defaultProps",value:{active:!1,group:"main",tooltipTimeout:500},enumerable:!0}]),r})(k.Component);_.default=D;var A=function(r,o){Object.prototype.hasOwnProperty.call(r,o)&&r[o]()},z=(function(n){R(r,n);function r(){var o=this;M(this,r),y(Object.getPrototypeOf(r.prototype),"constructor",this).apply(this,arguments),this.state={tooltipVisible:!1},this.onMouseEnter=function(){o.setState({tooltipVisible:!0})},this.onMouseLeave=function(){o.setState({tooltipVisible:!1})}}return P(r,[{key:"render",value:function(){var t=this,e=this.props;e.children;var i=e.className;e.parent;var l=S(e,["children","className","parent"]);return w.default.createElement(k.Fragment,null,w.default.createElement("span",{className:i,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,ref:function(a){return t.parent=a},key:"parent"},this.props.parent),this.parent?w.default.createElement(D,h({},l,{active:this.state.tooltipVisible,parent:this.parent,key:"tooltip"}),this.props.children):null)}}],[{key:"propTypes",value:{className:d.default.string},enumerable:!0},{key:"defaultProps",value:{className:""},enumerable:!0}]),r})(k.Component);_.StatefulToolTip=z})(B)),B}var j=Y();const Z=U(j),K=X({__proto__:null,default:Z},[j]);
1export{K as i};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.