@tekibo/feedpulse-sdk 0.4.1 → 0.5.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/nuxt.mjs CHANGED
@@ -1,88 +1,202 @@
1
- import { inject as h, defineComponent as m, provide as w, onMounted as F, onBeforeUnmount as P, renderSlot as _, ref as p, createElementBlock as s, openBlock as d, normalizeStyle as x, createCommentVNode as b, Fragment as g, createElementVNode as n, withDirectives as z, toDisplayString as S, renderList as C, vModelText as E } from "vue";
2
- import { FeedPulseTracker as T } from "./index.mjs";
3
- const v = /* @__PURE__ */ Symbol("feedpulse");
4
- function $() {
5
- return h(v, null);
1
+ import { inject as B, defineComponent as _, ref as g, onMounted as D, onBeforeUnmount as E, createBlock as P, openBlock as l, Teleport as M, createElementBlock as u, createCommentVNode as x, createElementVNode as n, createTextVNode as b, withDirectives as C, vModelCheckbox as A, toDisplayString as $, provide as T, Fragment as h, renderSlot as L, normalizeStyle as z, renderList as V, vModelText as R } from "vue";
2
+ import { CookieManager as F, FeedPulseTracker as U } from "./index.mjs";
3
+ const S = /* @__PURE__ */ Symbol("feedpulse");
4
+ function j() {
5
+ return B(S, null);
6
6
  }
7
- const W = /* @__PURE__ */ m({
7
+ const K = {
8
+ key: 0,
9
+ style: { position: "fixed", bottom: "0", left: "0", right: "0", "z-index": "99999", background: "#1a1a1a", color: "#fff", padding: "20px 24px", "border-top": "1px solid #333", "font-family": "sans-serif" }
10
+ }, N = { style: { "max-width": "900px", margin: "0 auto" } }, q = {
11
+ key: 0,
12
+ style: { "margin-bottom": "12px", "font-size": "13px" }
13
+ }, W = { style: { display: "flex", "align-items": "center", gap: "8px", "margin-bottom": "6px" } }, H = { style: { display: "flex", "align-items": "center", gap: "8px" } }, O = { style: { display: "flex", gap: "8px", "flex-wrap": "wrap", "align-items": "center" } }, Y = /* @__PURE__ */ _({
14
+ __name: "consent-banner",
15
+ emits: ["consent"],
16
+ setup(d, { emit: r }) {
17
+ const o = r, t = new F(), i = g(!1), e = g(!1), a = g(!1), p = g(!1);
18
+ function v() {
19
+ i.value = !0, e.value = !0;
20
+ }
21
+ D(() => {
22
+ const y = t.getConsent();
23
+ i.value = !y || t.isConsentExpired(), y && (a.value = y.analytics, p.value = y.marketing), typeof window < "u" && (window.addEventListener("feedpulse:open-consent", v), window.addEventListener("feedpulse:withdraw-consent", w));
24
+ });
25
+ function m() {
26
+ t.setConsent({ analytics: !0, marketing: !0, version: "1.0" }), o("consent", { analytics: !0, marketing: !0, action: "accept_all" }), i.value = !1;
27
+ }
28
+ function c() {
29
+ t.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), t.clearAnalyticsCookies(), o("consent", { analytics: !1, marketing: !1, action: "reject_all" }), i.value = !1;
30
+ }
31
+ function f() {
32
+ t.setConsent({ analytics: a.value, marketing: p.value, version: "1.0" }), a.value || t.clearAnalyticsCookies(), o("consent", { analytics: a.value, marketing: p.value, action: "custom" }), i.value = !1;
33
+ }
34
+ function w() {
35
+ t.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), t.clearAnalyticsCookies(), a.value = !1, p.value = !1, o("consent", { analytics: !1, marketing: !1, action: "withdraw" }), i.value = !0;
36
+ }
37
+ return E(() => {
38
+ typeof window < "u" && (window.removeEventListener("feedpulse:open-consent", v), window.removeEventListener("feedpulse:withdraw-consent", w));
39
+ }), (y, s) => (l(), P(M, { to: "body" }, [
40
+ i.value ? (l(), u("div", K, [
41
+ n("div", N, [
42
+ s[6] || (s[6] = n("p", { style: { margin: "0 0 12px", "font-size": "14px", "line-height": "1.5" } }, [
43
+ b(" We use cookies to improve reliability and understand usage. "),
44
+ n("a", {
45
+ href: "/privacy",
46
+ style: { color: "#818cf8" }
47
+ }, "Privacy Policy")
48
+ ], -1)),
49
+ e.value ? (l(), u("div", q, [
50
+ s[5] || (s[5] = n("label", { style: { display: "flex", "align-items": "center", gap: "8px", "margin-bottom": "6px", opacity: "0.75" } }, [
51
+ n("input", {
52
+ type: "checkbox",
53
+ checked: "",
54
+ disabled: ""
55
+ }),
56
+ b(" Necessary (always on) ")
57
+ ], -1)),
58
+ n("label", W, [
59
+ C(n("input", {
60
+ "onUpdate:modelValue": s[0] || (s[0] = (k) => a.value = k),
61
+ type: "checkbox"
62
+ }, null, 512), [
63
+ [A, a.value]
64
+ ]),
65
+ s[3] || (s[3] = b(" Analytics ", -1))
66
+ ]),
67
+ n("label", H, [
68
+ C(n("input", {
69
+ "onUpdate:modelValue": s[1] || (s[1] = (k) => p.value = k),
70
+ type: "checkbox"
71
+ }, null, 512), [
72
+ [A, p.value]
73
+ ]),
74
+ s[4] || (s[4] = b(" Marketing ", -1))
75
+ ])
76
+ ])) : x("", !0),
77
+ n("div", O, [
78
+ n("button", {
79
+ style: { width: "130px", padding: "9px 12px", background: "#4f46e5", color: "#fff", border: "1px solid #4f46e5", "border-radius": "6px", "font-size": "13px", "font-weight": "600", cursor: "pointer" },
80
+ onClick: m
81
+ }, " Accept All "),
82
+ n("button", {
83
+ style: { width: "130px", padding: "9px 12px", background: "transparent", color: "#fff", border: "1px solid #555", "border-radius": "6px", "font-size": "13px", "font-weight": "600", cursor: "pointer" },
84
+ onClick: c
85
+ }, " Reject All "),
86
+ n("button", {
87
+ style: { padding: "9px 16px", background: "transparent", color: "#aaa", border: "1px solid #333", "border-radius": "6px", "font-size": "13px", cursor: "pointer" },
88
+ onClick: s[2] || (s[2] = (k) => e.value ? f() : e.value = !0)
89
+ }, $(e.value ? "Save Preferences" : "Customize"), 1)
90
+ ])
91
+ ])
92
+ ])) : x("", !0)
93
+ ]));
94
+ }
95
+ }), te = /* @__PURE__ */ _({
8
96
  __name: "FeedPulseProvider",
9
97
  props: {
10
98
  apiKey: {},
11
99
  endpoint: {},
12
- debug: { type: Boolean }
100
+ debug: { type: Boolean },
101
+ consentRequired: { type: Boolean, default: !0 }
13
102
  },
14
- setup(e) {
15
- const t = e, u = new T({
16
- apiKey: t.apiKey,
17
- endpoint: t.endpoint,
18
- debug: t.debug
103
+ setup(d) {
104
+ const r = d, o = new F(), t = new U({
105
+ apiKey: r.apiKey,
106
+ endpoint: r.endpoint,
107
+ debug: r.debug
19
108
  });
20
- return w(v, u), F(() => u.init()), P(() => u.destroy()), (i, o) => _(i.$slots, "default");
109
+ T(S, t);
110
+ function i(e) {
111
+ const a = o.setConsent({
112
+ analytics: e.analytics,
113
+ marketing: e.marketing,
114
+ version: "1.0"
115
+ });
116
+ e.analytics || o.clearAnalyticsCookies(), t.updateCookieData(o.getAllData(e.analytics)), t.track("consent", "__consent__", {
117
+ analytics: e.analytics,
118
+ marketing: e.marketing,
119
+ action: e.action,
120
+ userAgent: navigator.userAgent,
121
+ version: a.version
122
+ });
123
+ }
124
+ return D(() => {
125
+ const e = o.getConsent();
126
+ r.consentRequired === !1 ? (o.setConsent({ analytics: !0, marketing: !0, version: "1.0" }), t.updateCookieData(o.getAllData(!0))) : e && !o.isConsentExpired() ? t.updateCookieData(o.getAllData(e.analytics)) : t.updateCookieData(o.getAllData(!1)), t.init();
127
+ }), E(() => t.destroy()), (e, a) => (l(), u(h, null, [
128
+ L(e.$slots, "default"),
129
+ d.consentRequired !== !1 ? (l(), P(Y, {
130
+ key: 0,
131
+ onConsent: i
132
+ })) : x("", !0)
133
+ ], 64));
21
134
  }
22
- }), B = {
135
+ }), G = {
23
136
  key: 1,
24
137
  style: { background: "#fff", border: "1px solid #e5e7eb", "border-radius": "12px", padding: "16px", width: "280px", "box-shadow": "0 10px 25px rgba(0,0,0,0.15)" }
25
- }, K = { style: { margin: "0 0 12px", "font-weight": "600", color: "#111" } }, D = { style: { display: "flex", gap: "6px", "margin-bottom": "12px" } }, U = ["onClick"], V = {
138
+ }, I = { style: { margin: "0 0 12px", "font-weight": "600", color: "#111" } }, J = { style: { display: "flex", gap: "6px", "margin-bottom": "12px" } }, Q = ["onClick"], X = {
26
139
  key: 1,
27
140
  style: { "text-align": "center", padding: "16px", color: "#111" }
28
- }, j = /* @__PURE__ */ m({
141
+ }, ne = /* @__PURE__ */ _({
29
142
  __name: "FeedPulseWidget",
30
143
  props: {
31
144
  id: {},
32
145
  placeholder: {},
33
146
  position: { default: "bottom-right" }
34
147
  },
35
- setup(e) {
36
- const t = e, u = $(), i = p(t.position === "inline"), o = p(null), a = p(""), c = p(!1);
37
- function y(f) {
38
- o.value = f;
148
+ setup(d) {
149
+ const r = d, o = j(), t = g(r.position === "inline"), i = g(null), e = g(""), a = g(!1);
150
+ function p(m) {
151
+ i.value = m;
39
152
  }
40
- function k() {
41
- !o.value && !a.value.trim() || (u?.trackFeedback(t.id ?? null, o.value, a.value || null), c.value = !0, setTimeout(() => {
42
- i.value = t.position === "inline", c.value = !1, o.value = null, a.value = "";
153
+ function v() {
154
+ !i.value && !e.value.trim() || (o?.trackFeedback(r.id ?? null, i.value, e.value || null), a.value = !0, setTimeout(() => {
155
+ t.value = r.position === "inline", a.value = !1, i.value = null, e.value = "";
43
156
  }, 2e3));
44
157
  }
45
- return (f, r) => (d(), s("div", {
158
+ return (m, c) => (l(), u("div", {
46
159
  class: "feedpulse-widget",
47
- style: x(e.position !== "inline" ? `position:fixed; ${e.position === "bottom-right" ? "right:24px" : "left:24px"}; bottom:24px; z-index:9999;` : "")
160
+ style: z(d.position !== "inline" ? `position:fixed; ${d.position === "bottom-right" ? "right:24px" : "left:24px"}; bottom:24px; z-index:9999;` : "")
48
161
  }, [
49
- e.position !== "inline" ? (d(), s("button", {
162
+ d.position !== "inline" ? (l(), u("button", {
50
163
  key: 0,
51
164
  style: { background: "#6366f1", color: "#fff", border: "none", "border-radius": "50%", width: "48px", height: "48px", "font-size": "20px", cursor: "pointer" },
52
- onClick: r[0] || (r[0] = (l) => i.value = !i.value)
53
- }, " 💬 ")) : b("", !0),
54
- i.value ? (d(), s("div", B, [
55
- c.value ? (d(), s("div", V, [...r[2] || (r[2] = [
165
+ onClick: c[0] || (c[0] = (f) => t.value = !t.value)
166
+ }, " 💬 ")) : x("", !0),
167
+ t.value ? (l(), u("div", G, [
168
+ a.value ? (l(), u("div", X, [...c[2] || (c[2] = [
56
169
  n("p", { style: { "font-size": "28px", margin: "0" } }, " 🎉 ", -1),
57
170
  n("p", { style: { margin: "8px 0 0", "font-weight": "600" } }, " Thanks for your feedback! ", -1)
58
- ])])) : (d(), s(g, { key: 0 }, [
59
- n("p", K, S(e.placeholder ?? "How was your experience?"), 1),
60
- n("div", D, [
61
- (d(), s(g, null, C(5, (l) => n("button", {
62
- key: l,
63
- style: x({ background: "none", border: "none", cursor: "pointer", fontSize: "24px", opacity: o.value !== null && l <= o.value ? 1 : 0.3 }),
64
- onClick: (L) => y(l)
65
- }, " ⭐ ", 12, U)), 64))
171
+ ])])) : (l(), u(h, { key: 0 }, [
172
+ n("p", I, $(d.placeholder ?? "How was your experience?"), 1),
173
+ n("div", J, [
174
+ (l(), u(h, null, V(5, (f) => n("button", {
175
+ key: f,
176
+ style: z({ background: "none", border: "none", cursor: "pointer", fontSize: "24px", opacity: i.value !== null && f <= i.value ? 1 : 0.3 }),
177
+ onClick: (w) => p(f)
178
+ }, " ⭐ ", 12, Q)), 64))
66
179
  ]),
67
- z(n("textarea", {
68
- "onUpdate:modelValue": r[1] || (r[1] = (l) => a.value = l),
180
+ C(n("textarea", {
181
+ "onUpdate:modelValue": c[1] || (c[1] = (f) => e.value = f),
69
182
  placeholder: "Tell us more (optional)...",
70
183
  rows: "3",
71
184
  style: { width: "100%", padding: "8px", border: "1px solid #d1d5db", "border-radius": "8px", resize: "none", "font-size": "14px" }
72
185
  }, null, 512), [
73
- [E, a.value]
186
+ [R, e.value]
74
187
  ]),
75
188
  n("button", {
76
189
  style: { "margin-top": "10px", width: "100%", background: "#6366f1", color: "#fff", border: "none", "border-radius": "8px", padding: "10px", "font-weight": "600", cursor: "pointer" },
77
- onClick: k
190
+ onClick: v
78
191
  }, " Submit Feedback ")
79
192
  ], 64))
80
- ])) : b("", !0)
193
+ ])) : x("", !0)
81
194
  ], 4));
82
195
  }
83
196
  });
84
197
  export {
85
- W as FeedPulseProvider,
86
- j as FeedPulseWidget,
87
- $ as useFeedPulse
198
+ Y as ConsentBanner,
199
+ te as FeedPulseProvider,
200
+ ne as FeedPulseWidget,
201
+ j as useFeedPulse
88
202
  };
package/dist/react.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),ne=require("./index.js");var S={exports:{}},g={};var z;function oe(){if(z)return g;z=1;var i=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function s(d,n,u){var c=null;if(u!==void 0&&(c=""+u),n.key!==void 0&&(c=""+n.key),"key"in n){u={};for(var b in n)b!=="key"&&(u[b]=n[b])}else u=n;return n=u.ref,{$$typeof:i,type:d,key:c,ref:n!==void 0?n:null,props:u}}return g.Fragment=f,g.jsx=s,g.jsxs=s,g}var x={};var D;function ae(){return D||(D=1,process.env.NODE_ENV!=="production"&&(function(){function i(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case V:return"Profiler";case J:return"StrictMode";case H:return"Suspense";case Z:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case U:return"Portal";case X:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case B:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return r=e.displayName||null,r!==null?r:i(e.type)||"Memo";case j:r=e._payload,e=e._init;try{return i(e(r))}catch{}}return null}function f(e){return""+e}function s(e){try{f(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,o=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),f(e)}}function d(e){if(e===P)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===j)return"<...>";try{var r=i(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function n(){var e=w.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function c(e){if(N.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function b(e,r){function t(){F||(F=!0,console.error("%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://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function R(){var e=i(this.type);return Y[e]||(Y[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function T(e,r,t,o,y,A){var a=t.ref;return e={$$typeof:p,type:e,key:r,props:t,_owner:o},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:R}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function k(e,r,t,o,y,A){var a=r.children;if(a!==void 0)if(o)if(re(a)){for(o=0;o<a.length;o++)v(a[o]);Object.freeze&&Object.freeze(a)}else console.error("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 v(a);if(N.call(r,"key")){a=i(e);var _=Object.keys(r).filter(function(te){return te!=="key"});o=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",W[a+o]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),N=require("./index.js");var j={exports:{}},_={};var Y;function se(){if(Y)return _;Y=1;var d=Symbol.for("react.transitional.element"),y=Symbol.for("react.fragment");function o(g,i,s){var m=null;if(s!==void 0&&(m=""+s),i.key!==void 0&&(m=""+i.key),"key"in i){s={};for(var b in i)b!=="key"&&(s[b]=i[b])}else s=i;return i=s.ref,{$$typeof:d,type:g,key:m,ref:i!==void 0?i:null,props:s}}return _.Fragment=y,_.jsx=o,_.jsxs=o,_}var R={};var $;function ie(){return $||($=1,process.env.NODE_ENV!=="production"&&(function(){function d(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case X:return"Profiler";case G:return"StrictMode";case K:return"Suspense";case ee:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case J:return"Portal";case Z:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:d(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return d(e(t))}catch{}}return null}function y(e){return""+e}function o(e){try{y(e);var t=!1}catch{t=!0}if(t){t=console;var a=t.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),y(e)}}function g(e){if(e===S)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var t=d(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function i(){var e=A.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function m(e){if(F.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function b(e,t){function a(){D||(D=!0,console.error("%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://react.dev/link/special-props)",t))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function x(){var e=d(this.type);return I[e]||(I[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function h(e,t,a,l,w,C){var c=a.ref;return e={$$typeof:v,type:e,key:t,props:a,_owner:l},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:x}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function n(e,t,a,l,w,C){var c=t.children;if(c!==void 0)if(l)if(ae(c)){for(l=0;l<c.length;l++)f(c[l]);Object.freeze&&Object.freeze(c)}else console.error("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 f(c);if(F.call(t,"key")){c=d(e);var E=Object.keys(t).filter(function(oe){return oe!=="key"});l=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",z[c+l]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,o,a,_,a),W[a+o]=!0)}if(a=null,t!==void 0&&(s(t),a=""+t),c(r)&&(s(r.key),a=""+r.key),"key"in r){t={};for(var C in r)C!=="key"&&(t[C]=r[C])}else t=r;return a&&b(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),T(e,a,t,n(),y,A)}function v(e){h(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===j&&(e._payload.status==="fulfilled"?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function h(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}var E=m,p=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),X=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ee=Symbol.for("react.client.reference"),w=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,re=Array.isArray,O=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(e){return e()}};var F,Y={},I=E.react_stack_bottom_frame.bind(E,u)(),$=O(d(u)),W={};x.Fragment=P,x.jsx=function(e,r,t){var o=1e4>w.recentlyCreatedOwnerStacks++;return k(e,r,t,!1,o?Error("react-stack-top-frame"):I,o?O(d(e)):$)},x.jsxs=function(e,r,t){var o=1e4>w.recentlyCreatedOwnerStacks++;return k(e,r,t,!0,o?Error("react-stack-top-frame"):I,o?O(d(e)):$)}})()),x}var M;function se(){return M||(M=1,process.env.NODE_ENV==="production"?S.exports=oe():S.exports=ae()),S.exports}var l=se();const L=m.createContext({tracker:null});function le({apiKey:i,endpoint:f,debug:s,children:d}){const n=m.useRef(null);return m.useEffect(()=>(n.current=new ne.FeedPulseTracker({apiKey:i,endpoint:f,debug:s}),n.current.init(),()=>n.current?.destroy()),[i,f,s]),l.jsx(L.Provider,{value:{tracker:n.current},children:d})}function q(){return m.useContext(L)}function ue({id:i,placeholder:f,position:s="bottom-right"}){const{tracker:d}=q(),[n,u]=m.useState(s==="inline"),[c,b]=m.useState(null),[R,T]=m.useState(""),[k,v]=m.useState(!1),h=()=>{!c&&!R.trim()||(d?.trackFeedback(i??null,c,R||null),v(!0),setTimeout(()=>{u(s==="inline"),v(!1),b(null),T("")},2e3))},E=s!=="inline"?{position:"fixed",bottom:24,[s==="bottom-right"?"right":"left"]:24,zIndex:9999}:{};return l.jsxs("div",{style:E,children:[s!=="inline"&&l.jsx("button",{onClick:()=>u(!n),style:{background:"#6366f1",color:"#fff",border:"none",borderRadius:"50%",width:48,height:48,fontSize:20,cursor:"pointer"},children:"💬"}),n&&l.jsx("div",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,padding:16,width:280,boxShadow:"0 10px 25px rgba(0,0,0,0.15)"},children:k?l.jsxs("div",{style:{textAlign:"center",padding:16},children:[l.jsx("p",{style:{fontSize:28,margin:0},children:"🎉"}),l.jsx("p",{style:{margin:"8px 0 0",fontWeight:600},children:"Thanks for your feedback!"})]}):l.jsxs(l.Fragment,{children:[l.jsx("p",{style:{margin:"0 0 12px",fontWeight:600},children:f??"How was your experience?"}),l.jsx("div",{style:{display:"flex",gap:6,marginBottom:12},children:[1,2,3,4,5].map(p=>l.jsx("button",{onClick:()=>b(p),style:{background:"none",border:"none",cursor:"pointer",fontSize:24,opacity:c!==null&&p<=c?1:.3},children:"⭐"},p))}),l.jsx("textarea",{value:R,onChange:p=>T(p.target.value),placeholder:"Tell us more (optional)...",rows:3,style:{width:"100%",padding:8,border:"1px solid #d1d5db",borderRadius:8,resize:"none",fontSize:14}}),l.jsx("button",{onClick:h,style:{marginTop:10,width:"100%",background:"#6366f1",color:"#fff",border:"none",borderRadius:8,padding:10,fontWeight:600,cursor:"pointer"},children:"Submit Feedback"})]})})]})}exports.FeedPulseProvider=le;exports.FeedPulseWidget=ue;exports.useFeedPulse=q;
6
+ <%s key={someKey} {...props} />`,l,c,E,c),z[c+l]=!0)}if(c=null,a!==void 0&&(o(a),c=""+a),m(t)&&(o(t.key),c=""+t.key),"key"in t){a={};for(var O in t)O!=="key"&&(a[O]=t[O])}else a=t;return c&&b(a,typeof e=="function"?e.displayName||e.name||"Unknown":e),h(e,c,a,i(),w,C)}function f(e){k(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?k(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function k(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}var p=u,v=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),ne=Symbol.for("react.client.reference"),A=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,ae=Array.isArray,P=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(e){return e()}};var D,I={},M=p.react_stack_bottom_frame.bind(p,s)(),W=P(g(s)),z={};R.Fragment=S,R.jsx=function(e,t,a){var l=1e4>A.recentlyCreatedOwnerStacks++;return n(e,t,a,!1,l?Error("react-stack-top-frame"):M,l?P(g(e)):W)},R.jsxs=function(e,t,a){var l=1e4>A.recentlyCreatedOwnerStacks++;return n(e,t,a,!0,l?Error("react-stack-top-frame"):M,l?P(g(e)):W)}})()),R}var L;function le(){return L||(L=1,process.env.NODE_ENV==="production"?j.exports=se():j.exports=ie()),j.exports}var r=le();const U=new N.CookieManager;function V({onConsent:d}){const[y,o]=u.useState(!1),[g,i]=u.useState(!1),[s,m]=u.useState(!1),[b,x]=u.useState(!1);u.useEffect(()=>{const p=U.getConsent();o(!p||U.isConsentExpired()),p&&(m(p.analytics),x(p.marketing))},[]);const h=()=>{d({analytics:!0,marketing:!0,action:"accept_all"}),o(!1)},n=()=>{d({analytics:!1,marketing:!1,action:"reject_all"}),o(!1)},f=()=>{d({analytics:s,marketing:b,action:"custom"}),o(!1)},k=u.useCallback(()=>{d({analytics:!1,marketing:!1,action:"withdraw"}),m(!1),x(!1),o(!0)},[d]);return u.useEffect(()=>{const p=()=>{o(!0),i(!0)};return window.addEventListener("feedpulse:open-consent",p),window.addEventListener("feedpulse:withdraw-consent",k),()=>{window.removeEventListener("feedpulse:open-consent",p),window.removeEventListener("feedpulse:withdraw-consent",k)}},[k]),y?r.jsx("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:99999,background:"#1a1a1a",color:"#fff",padding:"20px 24px",borderTop:"1px solid #333",fontFamily:"sans-serif"},children:r.jsxs("div",{style:{maxWidth:900,margin:"0 auto"},children:[r.jsxs("p",{style:{margin:"0 0 12px",fontSize:14,lineHeight:1.5},children:["We use cookies to improve reliability and understand usage."," ",r.jsx("a",{href:"/privacy",style:{color:"#818cf8"},children:"Privacy Policy"})]}),g&&r.jsxs("div",{style:{marginBottom:12,fontSize:13},children:[r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6,opacity:.75},children:[r.jsx("input",{type:"checkbox",checked:!0,disabled:!0}),"Necessary (always on)"]}),r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[r.jsx("input",{type:"checkbox",checked:s,onChange:p=>m(p.target.checked)}),"Analytics"]}),r.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("input",{type:"checkbox",checked:b,onChange:p=>x(p.target.checked)}),"Marketing"]})]}),r.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[r.jsx("button",{type:"button",style:{width:130,padding:"9px 12px",background:"#4f46e5",color:"#fff",border:"1px solid #4f46e5",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},onClick:h,children:"Accept All"}),r.jsx("button",{type:"button",style:{width:130,padding:"9px 12px",background:"transparent",color:"#fff",border:"1px solid #555",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},onClick:n,children:"Reject All"}),r.jsx("button",{type:"button",style:{padding:"9px 16px",background:"transparent",color:"#aaa",border:"1px solid #333",borderRadius:6,fontSize:13,cursor:"pointer"},onClick:()=>g?f():i(!0),children:g?"Save Preferences":"Customize"})]})]})}):null}const q=u.createContext({tracker:null});function ce({apiKey:d,endpoint:y,debug:o,consentRequired:g=!0,children:i}){const s=u.useRef(null),m=u.useRef(new N.CookieManager),[b,x]=u.useState(null),h=u.useCallback(n=>{const f=m.current,k=f.setConsent({analytics:n.analytics,marketing:n.marketing,version:"1.0"});n.analytics||f.clearAnalyticsCookies(),s.current?.updateCookieData(f.getAllData(n.analytics)),s.current?.track("consent","__consent__",{analytics:n.analytics,marketing:n.marketing,action:n.action,userAgent:navigator.userAgent,version:k.version})},[]);return u.useEffect(()=>{const n=new N.FeedPulseTracker({apiKey:d,endpoint:y,debug:o});s.current=n,x(n);const f=m.current,k=f.getConsent();return g?k&&!f.isConsentExpired()?n.updateCookieData(f.getAllData(k.analytics)):n.updateCookieData(f.getAllData(!1)):(f.setConsent({analytics:!0,marketing:!0,version:"1.0"}),n.updateCookieData(f.getAllData(!0))),n.init(),()=>{n.destroy(),s.current=null,x(null)}},[d,y,o,g]),r.jsxs(q.Provider,{value:{tracker:b},children:[i,g&&r.jsx(V,{onConsent:h})]})}function B(){return u.useContext(q)}function ue({id:d,placeholder:y,position:o="bottom-right"}){const{tracker:g}=B(),[i,s]=u.useState(o==="inline"),[m,b]=u.useState(null),[x,h]=u.useState(""),[n,f]=u.useState(!1),k=()=>{!m&&!x.trim()||(g?.trackFeedback(d??null,m,x||null),f(!0),setTimeout(()=>{s(o==="inline"),f(!1),b(null),h("")},2e3))},p=o!=="inline"?{position:"fixed",bottom:24,[o==="bottom-right"?"right":"left"]:24,zIndex:9999}:{};return r.jsxs("div",{style:p,children:[o!=="inline"&&r.jsx("button",{onClick:()=>s(!i),style:{background:"#6366f1",color:"#fff",border:"none",borderRadius:"50%",width:48,height:48,fontSize:20,cursor:"pointer"},children:"💬"}),i&&r.jsx("div",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,padding:16,width:280,boxShadow:"0 10px 25px rgba(0,0,0,0.15)"},children:n?r.jsxs("div",{style:{textAlign:"center",padding:16},children:[r.jsx("p",{style:{fontSize:28,margin:0},children:"🎉"}),r.jsx("p",{style:{margin:"8px 0 0",fontWeight:600},children:"Thanks for your feedback!"})]}):r.jsxs(r.Fragment,{children:[r.jsx("p",{style:{margin:"0 0 12px",fontWeight:600},children:y??"How was your experience?"}),r.jsx("div",{style:{display:"flex",gap:6,marginBottom:12},children:[1,2,3,4,5].map(v=>r.jsx("button",{onClick:()=>b(v),style:{background:"none",border:"none",cursor:"pointer",fontSize:24,opacity:m!==null&&v<=m?1:.3},children:"⭐"},v))}),r.jsx("textarea",{value:x,onChange:v=>h(v.target.value),placeholder:"Tell us more (optional)...",rows:3,style:{width:"100%",padding:8,border:"1px solid #d1d5db",borderRadius:8,resize:"none",fontSize:14}}),r.jsx("button",{onClick:k,style:{marginTop:10,width:"100%",background:"#6366f1",color:"#fff",border:"none",borderRadius:8,padding:10,fontWeight:600,cursor:"pointer"},children:"Submit Feedback"})]})})]})}exports.ConsentBanner=V;exports.FeedPulseProvider=ce;exports.FeedPulseWidget=ue;exports.useFeedPulse=B;