@metricshift/react 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(T,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],S):(T=typeof globalThis<"u"?globalThis:T||self,S(T.MetricShiftReact={},T.React))})(this,function(T,S){"use strict";var te={exports:{}},H={};/**
1
+ (function(P,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(P=typeof globalThis<"u"?globalThis:P||self,x(P.MetricShiftReact={},P.React))})(this,function(P,x){"use strict";var ke={exports:{}},re={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ge;function Ne(){if(ge)return H;ge=1;var d=S,j=Symbol.for("react.element"),I=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,p=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function M(E,b,P){var h,R={},v=null,W=null;P!==void 0&&(v=""+P),b.key!==void 0&&(v=""+b.key),b.ref!==void 0&&(W=b.ref);for(h in b)f.call(b,h)&&!o.hasOwnProperty(h)&&(R[h]=b[h]);if(E&&E.defaultProps)for(h in b=E.defaultProps,b)R[h]===void 0&&(R[h]=b[h]);return{$$typeof:j,type:E,key:v,ref:W,props:R,_owner:p.current}}return H.Fragment=I,H.jsx=M,H.jsxs=M,H}var K={};/**
9
+ */var Fe;function Xe(){if(Fe)return re;Fe=1;var p=x,S=Symbol.for("react.element"),T=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,b=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function j(y,h,_){var g,k={},O=null,M=null;_!==void 0&&(O=""+_),h.key!==void 0&&(O=""+h.key),h.ref!==void 0&&(M=h.ref);for(g in h)c.call(h,g)&&!o.hasOwnProperty(g)&&(k[g]=h[g]);if(y&&y.defaultProps)for(g in h=y.defaultProps,h)k[g]===void 0&&(k[g]=h[g]);return{$$typeof:S,type:y,key:O,ref:M,props:k,_owner:b.current}}return re.Fragment=T,re.jsx=j,re.jsxs=j,re}var ne={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ye;function Ue(){return ye||(ye=1,process.env.NODE_ENV!=="production"&&function(){var d=S,j=Symbol.for("react.element"),I=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),E=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),z=Symbol.iterator,O="@@iterator";function N(e){if(e===null||typeof e!="object")return null;var r=z&&e[z]||e[O];return typeof r=="function"?r:null}var F=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];U("error",e,t)}}function U(e,r,t){{var a=F.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var c=t.map(function(l){return String(l)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var i=!1,w=!1,Q=!1,ae=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function ie(e){return!!(typeof e=="string"||typeof e=="function"||e===f||e===o||oe||e===p||e===P||e===h||ae||e===W||i||w||Q||typeof e=="object"&&e!==null&&(e.$$typeof===v||e.$$typeof===R||e.$$typeof===M||e.$$typeof===E||e.$$typeof===b||e.$$typeof===Z||e.getModuleId!==void 0))}function G(e,r,t){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function se(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f:return"Fragment";case I:return"Portal";case o:return"Profiler";case p:return"StrictMode";case P:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return se(r)+".Consumer";case M:var t=e;return se(t._context)+".Provider";case b:return G(e,e.render,"ForwardRef");case R:var a=e.displayName||null;return a!==null?a:D(e.type)||"Memo";case v:{var u=e,c=u._payload,l=u._init;try{return D(l(c))}catch{return null}}}return null}var A=Object.assign,g=0,Y,B,Se,Ee,Re,ke,_e;function je(){}je.__reactDisabledLog=!0;function Ge(){{if(g===0){Y=console.log,B=console.info,Se=console.warn,Ee=console.error,Re=console.group,ke=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}g++}}function Xe(){{if(g--,g===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:Y}),info:A({},e,{value:B}),warn:A({},e,{value:Se}),error:A({},e,{value:Ee}),group:A({},e,{value:Re}),groupCollapsed:A({},e,{value:ke}),groupEnd:A({},e,{value:_e})})}g<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=F.ReactCurrentDispatcher,ue;function $(e,r,t){{if(ue===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);ue=a&&a[1]||""}return`
18
- `+ue+e}}var ce=!1,q;{var Qe=typeof WeakMap=="function"?WeakMap:Map;q=new Qe}function we(e,r){if(!e||ce)return"";{var t=q.get(e);if(t!==void 0)return t}var a;ce=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=le.current,le.current=null,Ge();try{if(r){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(_){a=_}Reflect.construct(e,[],l)}else{try{l.call()}catch(_){a=_}e.call(l.prototype)}}else{try{throw Error()}catch(_){a=_}e()}}catch(_){if(_&&a&&typeof _.stack=="string"){for(var s=_.stack.split(`
19
- `),k=a.stack.split(`
20
- `),y=s.length-1,m=k.length-1;y>=1&&m>=0&&s[y]!==k[m];)m--;for(;y>=1&&m>=0;y--,m--)if(s[y]!==k[m]){if(y!==1||m!==1)do if(y--,m--,m<0||s[y]!==k[m]){var C=`
21
- `+s[y].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,C),C}while(y>=1&&m>=0);break}}}finally{ce=!1,le.current=c,Xe(),Error.prepareStackTrace=u}var J=e?e.displayName||e.name:"",L=J?$(J):"";return typeof e=="function"&&q.set(e,L),L}function Ze(e,r,t){return we(e,!1)}function $e(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ee(e,r,t){if(e==null)return"";if(typeof e=="function")return we(e,$e(e));if(typeof e=="string")return $(e);switch(e){case P:return $("Suspense");case h:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case b:return Ze(e.render);case R:return ee(e.type,r,t);case v:{var a=e,u=a._payload,c=a._init;try{return ee(c(u),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Te={},Ce=F.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,t=ee(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}function qe(e,r,t,a,u){{var c=Function.call.bind(X);for(var l in e)if(c(e,l)){var s=void 0;try{if(typeof e[l]!="function"){var k=Error((a||"React class")+": "+t+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}s=e[l](r,l,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){s=y}s&&!(s instanceof Error)&&(re(u),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,l,typeof s),re(null)),s instanceof Error&&!(s.message in Te)&&(Te[s.message]=!0,re(u),x("Failed %s type: %s",t,s.message),re(null))}}}var er=Array.isArray;function fe(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function Oe(e){if(tr(e))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),Pe(e)}var Fe=F.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Ie,Me;function ar(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){typeof e.ref=="string"&&Fe.current}function sr(e,r){{var t=function(){Ie||(Ie=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function lr(e,r){{var t=function(){Me||(Me=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,a,u,c,l){var s={$$typeof:j,type:e,key:r,ref:t,props:l,_owner:c};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function cr(e,r,t,a,u){{var c,l={},s=null,k=null;t!==void 0&&(Oe(t),s=""+t),or(r)&&(Oe(r.key),s=""+r.key),ar(r)&&(k=r.ref,ir(r,u));for(c in r)X.call(r,c)&&!nr.hasOwnProperty(c)&&(l[c]=r[c]);if(e&&e.defaultProps){var y=e.defaultProps;for(c in y)l[c]===void 0&&(l[c]=y[c])}if(s||k){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&sr(l,m),k&&lr(l,m)}return ur(e,s,k,u,a,Fe.current,l)}}var de=F.ReactCurrentOwner,De=F.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=ee(e.type,e._source,r?r.type:null);De.setExtraStackFrame(t)}else De.setExtraStackFrame(null)}var pe;pe=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}function ze(){{if(de.current){var e=D(de.current.type);if(e)return`
17
+ */var Ie;function Qe(){return Ie||(Ie=1,process.env.NODE_ENV!=="production"&&function(){var p=x,S=Symbol.for("react.element"),T=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),y=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),N=Symbol.iterator,W="@@iterator";function K(e){if(e===null||typeof e!="object")return null;var t=N&&e[N]||e[W];return typeof t=="function"?t:null}var A=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];ae("error",e,r)}}function ae(e,t,r){{var a=A.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(t+="%s",r=r.concat([u]));var d=r.map(function(l){return String(l)});d.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,d)}}var i=!1,w=!1,ue=!1,fe=!1,de=!1,oe;oe=Symbol.for("react.module.reference");function pe(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===o||de||e===b||e===_||e===g||fe||e===M||i||w||ue||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===k||e.$$typeof===j||e.$$typeof===y||e.$$typeof===h||e.$$typeof===oe||e.getModuleId!==void 0))}function be(e,t,r){var a=e.displayName;if(a)return a;var u=t.displayName||t.name||"";return u!==""?r+"("+u+")":r}function he(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case T:return"Portal";case o:return"Profiler";case b:return"StrictMode";case _:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var t=e;return he(t)+".Consumer";case j:var r=e;return he(r._context)+".Provider";case h:return be(e,e.render,"ForwardRef");case k:var a=e.displayName||null;return a!==null?a:I(e.type)||"Memo";case O:{var u=e,d=u._payload,l=u._init;try{return I(l(d))}catch{return null}}}return null}var D=Object.assign,U=0,ge,ve,ie,xe,G,ye,$;function X(){}X.__reactDisabledLog=!0;function V(){{if(U===0){ge=console.log,ve=console.info,ie=console.warn,xe=console.error,G=console.group,ye=console.groupCollapsed,$=console.groupEnd;var e={configurable:!0,enumerable:!0,value:X,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function se(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:ge}),info:D({},e,{value:ve}),warn:D({},e,{value:ie}),error:D({},e,{value:xe}),group:D({},e,{value:G}),groupCollapsed:D({},e,{value:ye}),groupEnd:D({},e,{value:$})})}U<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=A.ReactCurrentDispatcher,B;function L(e,t,r){{if(B===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);B=a&&a[1]||""}return`
18
+ `+B+e}}var le=!1,ce;{var je=typeof WeakMap=="function"?WeakMap:Map;ce=new je}function me(e,t){if(!e||le)return"";{var r=ce.get(e);if(r!==void 0)return r}var a;le=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=Y.current,Y.current=null,V();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(C){a=C}Reflect.construct(e,[],l)}else{try{l.call()}catch(C){a=C}e.call(l.prototype)}}else{try{throw Error()}catch(C){a=C}e()}}catch(C){if(C&&a&&typeof C.stack=="string"){for(var s=C.stack.split(`
19
+ `),R=a.stack.split(`
20
+ `),v=s.length-1,m=R.length-1;v>=1&&m>=0&&s[v]!==R[m];)m--;for(;v>=1&&m>=0;v--,m--)if(s[v]!==R[m]){if(v!==1||m!==1)do if(v--,m--,m<0||s[v]!==R[m]){var F=`
21
+ `+s[v].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),typeof e=="function"&&ce.set(e,F),F}while(v>=1&&m>=0);break}}}finally{le=!1,Y.current=d,se(),Error.prepareStackTrace=u}var te=e?e.displayName||e.name:"",J=te?L(te):"";return typeof e=="function"&&ce.set(e,J),J}function _e(e,t,r){return me(e,!1)}function we(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Q(e,t,r){if(e==null)return"";if(typeof e=="function")return me(e,we(e));if(typeof e=="string")return L(e);switch(e){case _:return L("Suspense");case g:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return _e(e.render);case k:return Q(e.type,t,r);case O:{var a=e,u=a._payload,d=a._init;try{return Q(d(u),t,r)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,Se={},Ee=A.ReactDebugCurrentFrame;function Z(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ee.setExtraStackFrame(r)}else Ee.setExtraStackFrame(null)}function We(e,t,r,a,u){{var d=Function.call.bind(H);for(var l in e)if(d(e,l)){var s=void 0;try{if(typeof e[l]!="function"){var R=Error((a||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}s=e[l](t,l,a,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){s=v}s&&!(s instanceof Error)&&(Z(u),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",r,l,typeof s),Z(null)),s instanceof Error&&!(s.message in Se)&&(Se[s.message]=!0,Z(u),f("Failed %s type: %s",r,s.message),Z(null))}}}var E=Array.isArray;function z(e){return E(e)}function q(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function nt(e){try{return ze(e),!1}catch{return!0}}function ze(e){return""+e}function Ye(e){if(nt(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",q(e)),ze(e)}var Be=A.ReactCurrentOwner,at={key:!0,ref:!0,__self:!0,__source:!0},Le,Ne;function ot(e){if(H.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function it(e){if(H.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function st(e,t){typeof e.ref=="string"&&Be.current}function lt(e,t){{var r=function(){Le||(Le=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function ct(e,t){{var r=function(){Ne||(Ne=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var ut=function(e,t,r,a,u,d,l){var s={$$typeof:S,type:e,key:t,ref:r,props:l,_owner:d};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function ft(e,t,r,a,u){{var d,l={},s=null,R=null;r!==void 0&&(Ye(r),s=""+r),it(t)&&(Ye(t.key),s=""+t.key),ot(t)&&(R=t.ref,st(t,u));for(d in t)H.call(t,d)&&!at.hasOwnProperty(d)&&(l[d]=t[d]);if(e&&e.defaultProps){var v=e.defaultProps;for(d in v)l[d]===void 0&&(l[d]=v[d])}if(s||R){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&lt(l,m),R&&ct(l,m)}return ut(e,s,R,u,a,Be.current,l)}}var Ce=A.ReactCurrentOwner,Ue=A.ReactDebugCurrentFrame;function ee(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ue.setExtraStackFrame(r)}else Ue.setExtraStackFrame(null)}var Te;Te=!1;function Pe(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}function Ve(){{if(Ce.current){var e=I(Ce.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function fr(e){return""}var Ae={};function dr(e){{var r=ze();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function dt(e){return""}var He={};function pt(e){{var t=Ve();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function We(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(Ae[t])return;Ae[t]=!0;var a="";e&&e._owner&&e._owner!==de.current&&(a=" It was passed a child from "+D(e._owner.type)+"."),V(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),V(null)}}function Ye(e,r){{if(typeof e!="object")return;if(fe(e))for(var t=0;t<e.length;t++){var a=e[t];ve(a)&&We(a,r)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var u=N(e);if(typeof u=="function"&&u!==e.entries)for(var c=u.call(e),l;!(l=c.next()).done;)ve(l.value)&&We(l.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===b||r.$$typeof===R))t=r.propTypes;else return;if(t){var a=D(r);qe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!pe){pe=!0;var u=D(r);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){V(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),V(null);break}}e.ref!==null&&(V(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}var Be={};function Le(e,r,t,a,u,c){{var l=ie(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k=fr();k?s+=k:s+=ze();var y;e===null?y="null":fe(e)?y="array":e!==void 0&&e.$$typeof===j?(y="<"+(D(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,s)}var m=cr(e,r,t,u,c);if(m==null)return m;if(l){var C=r.children;if(C!==void 0)if(a)if(fe(C)){for(var J=0;J<C.length;J++)Ye(C[J],e);Object.freeze&&Object.freeze(C)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ye(C,e)}if(X.call(r,"key")){var L=D(e),_=Object.keys(r).filter(function(mr){return mr!=="key"}),be=_.length>0?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}";if(!Be[L+be]){var xr=_.length>0?"{"+_.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+r+">.")}return t}}function Je(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=pt(t);if(He[r])return;He[r]=!0;var a="";e&&e._owner&&e._owner!==Ce.current&&(a=" It was passed a child from "+I(e._owner.type)+"."),ee(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,a),ee(null)}}function Ke(e,t){{if(typeof e!="object")return;if(z(e))for(var r=0;r<e.length;r++){var a=e[r];Pe(a)&&Je(a,t)}else if(Pe(e))e._store&&(e._store.validated=!0);else if(e){var u=K(e);if(typeof u=="function"&&u!==e.entries)for(var d=u.call(e),l;!(l=d.next()).done;)Pe(l.value)&&Je(l.value,t)}}}function bt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===h||t.$$typeof===k))r=t.propTypes;else return;if(r){var a=I(t);We(r,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!Te){Te=!0;var u=I(t);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ht(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var a=t[r];if(a!=="children"&&a!=="key"){ee(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),ee(null);break}}e.ref!==null&&(ee(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),ee(null))}}var Ge={};function $e(e,t,r,a,u,d){{var l=pe(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=dt();R?s+=R:s+=Ve();var v;e===null?v="null":z(e)?v="array":e!==void 0&&e.$$typeof===S?(v="<"+(I(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,s)}var m=ft(e,t,r,u,d);if(m==null)return m;if(l){var F=t.children;if(F!==void 0)if(a)if(z(F)){for(var te=0;te<F.length;te++)Ke(F[te],e);Object.freeze&&Object.freeze(F)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ke(F,e)}if(H.call(t,"key")){var J=I(e),C=Object.keys(t).filter(function(St){return St!=="key"}),Oe=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Ge[J+Oe]){var mt=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,be,L,xr,L),Be[L+be]=!0}}return e===f?vr(m):pr(m),m}}function br(e,r,t){return Le(e,r,t,!0)}function gr(e,r,t){return Le(e,r,t,!1)}var yr=gr,hr=br;K.Fragment=f,K.jsx=yr,K.jsxs=hr}()),K}process.env.NODE_ENV==="production"?te.exports=Ne():te.exports=Ue();var n=te.exports;const he=({isOpen:d,onClose:j,onSubmit:I})=>{const[f,p]=S.useState({text:"",rating:void 0,feedbackType:"general",userEmail:"",userName:""}),[o,M]=S.useState(!1),[E,b]=S.useState("idle"),[P,h]=S.useState(""),[R,v]=S.useState(!1),W=S.useRef(null),z=S.useRef(null);S.useEffect(()=>(d?(v(!0),document.body.style.overflow="hidden",setTimeout(()=>{var i;(i=z.current)==null||i.focus()},150)):document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[d]),S.useEffect(()=>{const i=w=>{w.key==="Escape"&&d&&!o&&O()};return d&&document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[d,o]);const O=()=>{v(!1),setTimeout(()=>{j(),setTimeout(()=>{p({text:"",rating:void 0,feedbackType:"general",userEmail:"",userName:""}),b("idle"),h("")},100)},200)},N=async i=>{if(i.preventDefault(),!f.text.trim()){h("Please enter your feedback");return}M(!0),h("");try{await I(f),b("success"),setTimeout(()=>{O()},2e3)}catch(w){b("error"),h(w instanceof Error?w.message:"Failed to submit feedback")}finally{M(!1)}};if(!d)return null;const F=i=>{i.target===i.currentTarget&&!o&&O()},x={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4,padding:"16px",opacity:R?1:0,transition:"opacity 0.2s ease-in-out"},U={backgroundColor:"white",borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"100%",maxHeight:"90vh",overflowY:"auto",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",transform:R?"scale(1)":"scale(0.95)",opacity:R?1:0,transition:"all 0.2s ease-in-out"};return n.jsx("div",{onClick:F,style:x,role:"dialog","aria-modal":"true","aria-labelledby":"feedback-modal-title",children:n.jsxs("div",{ref:W,style:U,onClick:i=>i.stopPropagation(),children:[n.jsxs("div",{style:{marginBottom:"24px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n.jsx("h2",{id:"feedback-modal-title",style:{fontSize:"20px",fontWeight:"600",margin:0,color:"#111827"},children:"Send Feedback"}),n.jsx("button",{onClick:O,disabled:o,"aria-label":"Close feedback form",style:{background:"none",border:"none",fontSize:"24px",cursor:o?"not-allowed":"pointer",color:"#6b7280",padding:"0",lineHeight:"1",opacity:o?.5:1,transition:"color 0.2s"},onMouseEnter:i=>!o&&(i.currentTarget.style.color="#111827"),onMouseLeave:i=>!o&&(i.currentTarget.style.color="#6b7280"),children:"×"})]}),E==="success"&&n.jsxs("div",{style:{backgroundColor:"#d1fae5",border:"1px solid #6ee7b7",borderRadius:"8px",padding:"12px",marginBottom:"16px",color:"#065f46",display:"flex",alignItems:"center",gap:"8px",animation:"slideIn 0.3s ease-out"},role:"status","aria-live":"polite",children:[n.jsx("span",{style:{fontSize:"18px"},children:"✓"}),n.jsx("span",{children:"Thank you! Your feedback has been submitted."})]}),P&&n.jsxs("div",{style:{backgroundColor:"#fee2e2",border:"1px solid #fca5a5",borderRadius:"8px",padding:"12px",marginBottom:"16px",color:"#991b1b",display:"flex",alignItems:"center",gap:"8px"},role:"alert","aria-live":"assertive",children:[n.jsx("span",{style:{fontSize:"18px"},children:"⚠"}),n.jsx("span",{children:P})]}),n.jsxs("form",{onSubmit:N,children:[n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{htmlFor:"feedback-type",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Type"}),n.jsxs("select",{id:"feedback-type",value:f.feedbackType,onChange:i=>p({...f,feedbackType:i.target.value}),disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",backgroundColor:"white",cursor:o?"not-allowed":"pointer",opacity:o?.6:1},children:[n.jsx("option",{value:"general",children:"General Feedback"}),n.jsx("option",{value:"bug",children:"Bug Report"}),n.jsx("option",{value:"feature_request",children:"Feature Request"}),n.jsx("option",{value:"question",children:"Question"}),n.jsx("option",{value:"praise",children:"Praise"})]})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Rating (optional)"}),n.jsx("div",{style:{display:"flex",gap:"8px"},role:"group","aria-label":"Rating",children:[1,2,3,4,5].map(i=>n.jsx("button",{type:"button",onClick:()=>p({...f,rating:i}),disabled:o,"aria-label":`Rate ${i} stars`,"aria-pressed":f.rating===i,style:{background:"none",border:"none",fontSize:"28px",cursor:o?"not-allowed":"pointer",padding:"0",color:f.rating&&f.rating>=i?"#fbbf24":"#d1d5db",transition:"all 0.2s",opacity:o?.6:1,transform:"scale(1)"},onMouseEnter:w=>!o&&(w.currentTarget.style.transform="scale(1.2)"),onMouseLeave:w=>!o&&(w.currentTarget.style.transform="scale(1)"),children:"★"},i))})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsxs("label",{htmlFor:"feedback-text",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:["Your Feedback ",n.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),n.jsx("textarea",{id:"feedback-text",ref:z,value:f.text,onChange:i=>p({...f,text:i.target.value}),placeholder:"Tell us what you think...",required:!0,disabled:o,rows:4,"aria-required":"true",style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",resize:"vertical",fontFamily:"inherit",opacity:o?.6:1,cursor:o?"not-allowed":"text"}})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{htmlFor:"feedback-name",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Name (optional)"}),n.jsx("input",{id:"feedback-name",type:"text",value:f.userName,onChange:i=>p({...f,userName:i.target.value}),placeholder:"Your name",disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",opacity:o?.6:1}})]}),n.jsxs("div",{style:{marginBottom:"24px"},children:[n.jsx("label",{htmlFor:"feedback-email",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Email (optional)"}),n.jsx("input",{id:"feedback-email",type:"email",value:f.userEmail,onChange:i=>p({...f,userEmail:i.target.value}),placeholder:"your@email.com",disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",opacity:o?.6:1}})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[n.jsx("button",{type:"button",onClick:O,disabled:o,style:{padding:"10px 20px",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"white",color:"#374151",fontSize:"14px",fontWeight:"500",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,transition:"all 0.2s"},onMouseEnter:i=>!o&&(i.currentTarget.style.backgroundColor="#f9fafb"),onMouseLeave:i=>!o&&(i.currentTarget.style.backgroundColor="white"),children:"Cancel"}),n.jsxs("button",{type:"submit",disabled:o||E==="success",style:{padding:"10px 20px",border:"none",borderRadius:"6px",backgroundColor:E==="success"?"#10b981":"#3b82f6",color:"white",fontSize:"14px",fontWeight:"500",cursor:o||E==="success"?"not-allowed":"pointer",opacity:o?.7:1,transition:"all 0.2s",display:"flex",alignItems:"center",gap:"8px"},children:[o&&n.jsx("span",{style:{display:"inline-block",width:"14px",height:"14px",border:"2px solid #ffffff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 0.6s linear infinite"}}),n.jsx("span",{children:o?"Sending...":E==="success"?"✓ Sent!":"Send Feedback"})]})]})]}),n.jsx("style",{children:`
30
+ <%s key={someKey} {...props} />`,Oe,J,mt,J),Ge[J+Oe]=!0}}return e===c?ht(m):bt(m),m}}function gt(e,t,r){return $e(e,t,r,!0)}function vt(e,t,r){return $e(e,t,r,!1)}var xt=vt,yt=gt;ne.Fragment=c,ne.jsx=xt,ne.jsxs=yt}()),ne}process.env.NODE_ENV==="production"?ke.exports=Xe():ke.exports=Qe();var n=ke.exports;const Me=({isOpen:p,onClose:S,onSubmit:T})=>{const[c,b]=x.useState({text:"",rating:void 0,feedbackType:"general",userEmail:"",userName:""}),[o,j]=x.useState(!1),[y,h]=x.useState("idle"),[_,g]=x.useState(""),[k,O]=x.useState(!1),M=x.useRef(null),N=x.useRef(null);x.useEffect(()=>(p?(O(!0),document.body.style.overflow="hidden",setTimeout(()=>{var i;(i=N.current)==null||i.focus()},150)):document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[p]),x.useEffect(()=>{const i=w=>{w.key==="Escape"&&p&&!o&&W()};return p&&document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[p,o]);const W=()=>{O(!1),setTimeout(()=>{S(),setTimeout(()=>{b({text:"",rating:void 0,feedbackType:"general",userEmail:"",userName:""}),h("idle"),g("")},100)},200)},K=async i=>{if(i.preventDefault(),!c.text.trim()){g("Please enter your feedback");return}j(!0),g("");try{await T(c),h("success"),setTimeout(()=>{W()},2e3)}catch(w){h("error"),g(w instanceof Error?w.message:"Failed to submit feedback")}finally{j(!1)}};if(!p)return null;const A=i=>{i.target===i.currentTarget&&!o&&W()},f={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4,padding:"16px",opacity:k?1:0,transition:"opacity 0.2s ease-in-out"},ae={backgroundColor:"white",borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"100%",maxHeight:"90vh",overflowY:"auto",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",transform:k?"scale(1)":"scale(0.95)",opacity:k?1:0,transition:"all 0.2s ease-in-out"};return n.jsx("div",{onClick:A,style:f,role:"dialog","aria-modal":"true","aria-labelledby":"feedback-modal-title",children:n.jsxs("div",{ref:M,style:ae,onClick:i=>i.stopPropagation(),children:[n.jsxs("div",{style:{marginBottom:"24px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n.jsx("h2",{id:"feedback-modal-title",style:{fontSize:"20px",fontWeight:"600",margin:0,color:"#111827"},children:"Send Feedback"}),n.jsx("button",{onClick:W,disabled:o,"aria-label":"Close feedback form",style:{background:"none",border:"none",fontSize:"24px",cursor:o?"not-allowed":"pointer",color:"#6b7280",padding:"0",lineHeight:"1",opacity:o?.5:1,transition:"color 0.2s"},onMouseEnter:i=>!o&&(i.currentTarget.style.color="#111827"),onMouseLeave:i=>!o&&(i.currentTarget.style.color="#6b7280"),children:"×"})]}),y==="success"&&n.jsxs("div",{style:{backgroundColor:"#d1fae5",border:"1px solid #6ee7b7",borderRadius:"8px",padding:"12px",marginBottom:"16px",color:"#065f46",display:"flex",alignItems:"center",gap:"8px",animation:"slideIn 0.3s ease-out"},role:"status","aria-live":"polite",children:[n.jsx("span",{style:{fontSize:"18px"},children:"✓"}),n.jsx("span",{children:"Thank you! Your feedback has been submitted."})]}),_&&n.jsxs("div",{style:{backgroundColor:"#fee2e2",border:"1px solid #fca5a5",borderRadius:"8px",padding:"12px",marginBottom:"16px",color:"#991b1b",display:"flex",alignItems:"center",gap:"8px"},role:"alert","aria-live":"assertive",children:[n.jsx("span",{style:{fontSize:"18px"},children:"⚠"}),n.jsx("span",{children:_})]}),n.jsxs("form",{onSubmit:K,children:[n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{htmlFor:"feedback-type",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Type"}),n.jsxs("select",{id:"feedback-type",value:c.feedbackType,onChange:i=>b({...c,feedbackType:i.target.value}),disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",backgroundColor:"white",cursor:o?"not-allowed":"pointer",opacity:o?.6:1},children:[n.jsx("option",{value:"general",children:"General Feedback"}),n.jsx("option",{value:"bug",children:"Bug Report"}),n.jsx("option",{value:"feature_request",children:"Feature Request"}),n.jsx("option",{value:"question",children:"Question"}),n.jsx("option",{value:"praise",children:"Praise"})]})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Rating (optional)"}),n.jsx("div",{style:{display:"flex",gap:"8px"},role:"group","aria-label":"Rating",children:[1,2,3,4,5].map(i=>n.jsx("button",{type:"button",onClick:()=>b({...c,rating:i}),disabled:o,"aria-label":`Rate ${i} stars`,"aria-pressed":c.rating===i,style:{background:"none",border:"none",fontSize:"28px",cursor:o?"not-allowed":"pointer",padding:"0",color:c.rating&&c.rating>=i?"#fbbf24":"#d1d5db",transition:"all 0.2s",opacity:o?.6:1,transform:"scale(1)"},onMouseEnter:w=>!o&&(w.currentTarget.style.transform="scale(1.2)"),onMouseLeave:w=>!o&&(w.currentTarget.style.transform="scale(1)"),children:"★"},i))})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsxs("label",{htmlFor:"feedback-text",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:["Your Feedback ",n.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),n.jsx("textarea",{id:"feedback-text",ref:N,value:c.text,onChange:i=>b({...c,text:i.target.value}),placeholder:"Tell us what you think...",required:!0,disabled:o,rows:4,"aria-required":"true",style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",resize:"vertical",fontFamily:"inherit",opacity:o?.6:1,cursor:o?"not-allowed":"text"}})]}),n.jsxs("div",{style:{marginBottom:"16px"},children:[n.jsx("label",{htmlFor:"feedback-name",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Name (optional)"}),n.jsx("input",{id:"feedback-name",type:"text",value:c.userName,onChange:i=>b({...c,userName:i.target.value}),placeholder:"Your name",disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",opacity:o?.6:1}})]}),n.jsxs("div",{style:{marginBottom:"24px"},children:[n.jsx("label",{htmlFor:"feedback-email",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:"500",color:"#374151"},children:"Email (optional)"}),n.jsx("input",{id:"feedback-email",type:"email",value:c.userEmail,onChange:i=>b({...c,userEmail:i.target.value}),placeholder:"your@email.com",disabled:o,style:{width:"100%",padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"14px",opacity:o?.6:1}})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[n.jsx("button",{type:"button",onClick:W,disabled:o,style:{padding:"10px 20px",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"white",color:"#374151",fontSize:"14px",fontWeight:"500",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,transition:"all 0.2s"},onMouseEnter:i=>!o&&(i.currentTarget.style.backgroundColor="#f9fafb"),onMouseLeave:i=>!o&&(i.currentTarget.style.backgroundColor="white"),children:"Cancel"}),n.jsxs("button",{type:"submit",disabled:o||y==="success",style:{padding:"10px 20px",border:"none",borderRadius:"6px",backgroundColor:y==="success"?"#10b981":"#3b82f6",color:"white",fontSize:"14px",fontWeight:"500",cursor:o||y==="success"?"not-allowed":"pointer",opacity:o?.7:1,transition:"all 0.2s",display:"flex",alignItems:"center",gap:"8px"},children:[o&&n.jsx("span",{style:{display:"inline-block",width:"14px",height:"14px",border:"2px solid #ffffff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 0.6s linear infinite"}}),n.jsx("span",{children:o?"Sending...":y==="success"?"✓ Sent!":"Send Feedback"})]})]})]}),n.jsx("style",{children:`
31
31
  @keyframes spin {
32
32
  to { transform: rotate(360deg); }
33
33
  }
@@ -41,5 +41,5 @@ React keys must be passed directly to JSX without using spread:
41
41
  transform: translateY(0);
42
42
  }
43
43
  }
44
- `})]})})};async function xe(d,j,I){const f={"Content-Type":"application/json"};I&&(f.Authorization=`Bearer ${I}`);try{const p=await fetch(`${d}/api/feedback`,{method:"POST",headers:f,body:JSON.stringify(j)});if(!p.ok){const o=await p.json().catch(()=>({}));throw new Error(o.message||`HTTP ${p.status}: ${p.statusText}`)}return await p.json()}catch(p){throw p instanceof Error?p:new Error("Failed to submit feedback")}}const Ve=({projectId:d,apiKey:j,apiUrl:I="https://metricshift-sdk-be-production.up.railway.app",buttonText:f="Feedback",showIcon:p=!0,position:o="bottom-right",size:M="medium",buttonColor:E="#3b82f6",buttonHoverColor:b="#2563eb",buttonTextColor:P="#ffffff",customStyles:h,customClassName:R="",disabled:v=!1,autoOpen:W=!1,onOpen:z,onClose:O,onSuccess:N,onError:F})=>{const[x,U]=S.useState(W),[i,w]=S.useState(!1),Q=()=>{v||(U(!0),z==null||z())},ae=()=>{U(!1),O==null||O()},oe=async g=>{try{const Y={...g,project_id:d,page_url:window.location.href,page_title:document.title,user_agent:navigator.userAgent,user_identifier:g.userEmail||"anonymous",user_email:g.userEmail,user_name:g.userName,feedback_type:g.feedbackType},B=await xe(I,Y,j);N&&(B!=null&&B.id)&&N(B.id)}catch(Y){throw F&&Y instanceof Error&&F(Y),Y}},Z={small:{padding:"8px 16px",fontSize:"14px",iconSize:"16px"},medium:{padding:"12px 20px",fontSize:"16px",iconSize:"20px"},large:{padding:"16px 28px",fontSize:"18px",iconSize:"24px"}},ie=()=>{if(o==="inline")return{display:"inline-flex",position:"relative"};const g={position:"fixed",zIndex:9999};return o.includes("bottom")?g.bottom="20px":g.top="20px",o.includes("right")?g.right="20px":g.left="20px",g},G=Z[M],D={...ie(),padding:G.padding,backgroundColor:i&&!v?b:E,color:P,border:"none",borderRadius:"8px",fontSize:G.fontSize,fontWeight:"600",cursor:v?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",boxShadow:o!=="inline"?"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)":"none",transition:"all 0.2s ease",opacity:v?.6:1,transform:i&&!v?"translateY(-2px)":"translateY(0)",outline:"none",...h},A={fontSize:G.iconSize,lineHeight:1,display:"flex",alignItems:"center"};return n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:Q,onMouseEnter:()=>!v&&w(!0),onMouseLeave:()=>!v&&w(!1),disabled:v,className:R,style:D,"aria-label":"Open feedback form","aria-pressed":x,"aria-disabled":v,role:"button",tabIndex:v?-1:0,onKeyDown:g=>{!v&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),Q())},children:[p&&n.jsx("span",{style:A,"aria-hidden":"true",children:"💬"}),n.jsx("span",{children:f})]}),n.jsx(he,{isOpen:x,onClose:ae,onSubmit:oe})]})},me=S.createContext(null),Je=()=>{const d=S.useContext(me);if(!d)throw new Error("useMetricShift must be used within MetricShiftProvider");return d},He=({config:d,children:j})=>n.jsx(me.Provider,{value:d,children:j});let ne=null;const Ke={init:d=>{ne={apiUrl:"http://localhost:3000",...d},console.log("✅ MetricShift SDK initialized",{projectId:d.projectId,apiUrl:ne.apiUrl})},getConfig:()=>ne};T.FeedbackButton=Ve,T.FeedbackModal=he,T.MetricShift=Ke,T.MetricShiftProvider=He,T.submitFeedback=xe,T.useMetricShift=Je,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
44
+ `})]})})};async function Ae(p,S,T){const c={"Content-Type":"application/json"};T&&(c.Authorization=`Bearer ${T}`);try{const b=await fetch(`${p}/api/feedback`,{method:"POST",headers:c,body:JSON.stringify(S)});if(!b.ok){const o=await b.json().catch(()=>({}));throw new Error(o.message||`HTTP ${b.status}: ${b.statusText}`)}return await b.json()}catch(b){throw b instanceof Error?b:new Error("Failed to submit feedback")}}const Ze=(p,S=.12)=>{const T=/^#([0-9a-fA-F]{6})$/.exec(p);if(!T)return p;const c=parseInt(T[1],16),b=Math.max(0,Math.min(255,Math.round((c>>16&255)*(1-S)))),o=Math.max(0,Math.min(255,Math.round((c>>8&255)*(1-S)))),j=Math.max(0,Math.min(255,Math.round((c&255)*(1-S)))),y=h=>h.toString(16).padStart(2,"0");return`#${y(b)}${y(o)}${y(j)}`},qe=({projectId:p,apiKey:S,apiUrl:T="https://metricshift-sdk-be-production.up.railway.app",buttonText:c="Feedback",subtitleText:b,showIcon:o=!1,avatarSrc:j,avatarAlt:y,avatarSize:h=40,position:_="bottom-right",size:g="medium",buttonColor:k,buttonHoverColor:O,buttonTextColor:M,customStyles:N,customClassName:W="",variant:K="outline",accentColor:A,disabled:f=!1,autoOpen:ae=!1,onOpen:i,onClose:w,onSuccess:ue,onError:fe})=>{const[de,oe]=x.useState(ae),[pe,be]=x.useState(!1),[he,I]=x.useState(!1),D=()=>{f||(oe(!0),i==null||i())},U=()=>{oe(!1),w==null||w()},ge=async E=>{try{const z={...E,project_id:p,page_url:window.location.href,page_title:document.title,user_agent:navigator.userAgent,user_identifier:E.userEmail||"anonymous",user_email:E.userEmail,user_name:E.userName,feedback_type:E.feedbackType},q=await Ae(T,z,S);ue&&(q!=null&&q.id)&&ue(q.id)}catch(z){throw fe&&z instanceof Error&&fe(z),z}},ve={small:{padding:"6px 14px",fontSize:"13px",iconSize:"14px"},medium:{padding:"10px 18px",fontSize:"15px",iconSize:"18px"},large:{padding:"14px 24px",fontSize:"17px",iconSize:"22px"}},ie=!!j,xe=()=>{if(_==="inline")return{position:"relative"};const E={position:"fixed",zIndex:9999};return _.includes("bottom")?E.bottom="20px":E.top="20px",_.includes("right")?E.right="20px":E.left="20px",E},G=ve[g],ye=xe(),$=A??k??"#111827",X=_!=="inline"?"0 12px 30px rgba(15, 23, 42, 0.12)":"none";let V="#ffffff",se="#f3f4f6",Y=M||$,B="rgba(15, 23, 42, 0.08)",L=1;K==="solid"?(V=k||$,se=O||Ze(V,.12),Y=M||"#ffffff",B="transparent",L=0):K==="ghost"&&(V="transparent",se="#f3f4f6",Y=M||$,B="transparent",L=0);const le={"--ms-feedback-bg":V,"--ms-feedback-color":Y,"--ms-feedback-border":B,"--ms-feedback-radius":"9999px","--ms-feedback-shadow":X},je=ie?{small:"8px 14px",medium:"12px 18px",large:"16px 24px"}[g]:G.padding,me={...le,padding:je,backgroundColor:pe&&!f?se:V,color:Y,border:L?`1px solid ${B}`:"1px solid transparent",borderRadius:"9999px",fontSize:G.fontSize,fontWeight:600,cursor:f?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",boxShadow:he?`${X}, 0 0 0 3px rgba(59,130,246,0.45)`:X,transition:"all 0.2s ease",opacity:f?.6:1,transform:pe&&!f?"translateY(-2px)":"translateY(0)",outline:"none",position:"relative",...N},_e={fontSize:G.iconSize,lineHeight:1,display:"flex",alignItems:"center"},we={display:"flex",flexDirection:"column",alignItems:"flex-start",lineHeight:1.2},Q={fontWeight:600,fontSize:"inherit"},H={marginTop:"2px",fontWeight:400,fontSize:"12px",opacity:.9},Se={...ye,display:"inline-flex",alignItems:"center",justifyContent:"center"},Ee={position:"absolute",top:0,left:"50%",transform:"translate(-50%, -75%)",width:h,height:h,borderRadius:"9999px",overflow:"hidden",boxShadow:"0 8px 22px rgba(15,23,42,0.22)",border:"2px solid #ffffff",backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1,pointerEvents:"none"},Z={width:"100%",height:"100%",objectFit:"cover"};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:Se,children:[ie&&n.jsx("div",{style:Ee,"aria-hidden":y?void 0:!0,children:j&&n.jsx("img",{src:j,alt:y||"",style:Z})}),n.jsxs("button",{onClick:D,onMouseEnter:()=>!f&&be(!0),onMouseLeave:()=>!f&&be(!1),onFocus:()=>I(!0),onBlur:()=>I(!1),disabled:f,className:`ms-feedback-button ${W}`.trim(),style:me,"aria-label":"Open feedback form","aria-pressed":de,"aria-disabled":f,role:"button",tabIndex:f?-1:0,onKeyDown:E=>{!f&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),D())},children:[o&&n.jsx("span",{style:_e,"aria-hidden":"true",children:"💬"}),n.jsxs("div",{style:we,children:[n.jsx("span",{style:Q,children:c}),b&&n.jsx("span",{style:H,children:b})]})]})]}),n.jsx(Me,{isOpen:de,onClose:U,onSubmit:ge})]})},De=x.createContext(null),et=()=>{const p=x.useContext(De);if(!p)throw new Error("useMetricShift must be used within MetricShiftProvider");return p},tt=({config:p,children:S})=>n.jsx(De.Provider,{value:p,children:S});let Re=null;const rt={init:p=>{Re={apiUrl:"http://localhost:3000",...p},console.log("✅ MetricShift SDK initialized",{projectId:p.projectId,apiUrl:Re.apiUrl})},getConfig:()=>Re};P.FeedbackButton=qe,P.FeedbackModal=Me,P.MetricShift=rt,P.MetricShiftProvider=tt,P.submitFeedback=Ae,P.useMetricShift=et,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
45
45
  //# sourceMappingURL=index.umd.js.map