@car-cutter/react-webplayer 3.2.3 → 3.2.5
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.cjs +1 -1
- package/dist/index.js +117 -104
- package/dist/legacy.cjs +1 -1
- package/dist/legacy.js +2 -2
- package/dist/shared-CiiFL5oT.cjs +6 -0
- package/dist/{shared-Cqjm0mDC.js → shared-zi1amD4C.js} +2501 -2528
- package/package.json +5 -5
- package/dist/shared-DKZOITXN.cjs +0 -6
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-CiiFL5oT.cjs");require("react/jsx-runtime");const g=require("react"),V=require("react-dom/client");var D=Object.defineProperty,v=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t,r)=>v(e,typeof t!="symbol"?t+"":t,r);const w={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,r)=>{const o=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof o=="function"?o.bind(r):void 0}},Y={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function G(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,o)=>`${r}-${o.toLowerCase()}`)}function R(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const F={stringify:e=>e.name,parse:(e,t,r)=>{const o=(()=>{const _=R(t);if(typeof r<"u"&&_ in r.container)return r.container[_]})();return typeof o=="function"?o.bind(r):void 0}},j={stringify:e=>`${e}`,parse:e=>parseFloat(e)},k={stringify:e=>e,parse:e=>e},C={string:k,number:j,boolean:w,function:M,method:F,json:Y},O=Symbol.for("r2wc.render"),N=Symbol.for("r2wc.connected"),T=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function x(e,t,r){var o,_,d;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const f=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),I=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),b={},S={},h={},A={};for(const s of f){b[s]=Array.isArray(t.props)?"string":t.props[s];const i=G(s);h[s]=i,A[i]=s}for(const s of I)S[s]=Array.isArray(t.events)?{}:t.events[s];class P extends HTMLElement{constructor(){super(),m(this,d,!0),m(this,_),m(this,o,{}),m(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const i of f){const l=h[i],c=this.getAttribute(l),E=b[i],u=E?C[E]:null;if(E==="method"){const p=R(l);Object.defineProperty(this[a].container,p,{enumerable:!0,configurable:!0,get(){return this[a][p]},set(W){this[a][p]=W,this[O]()}}),this[a][i]=u.parse(c,l,this)}u!=null&&u.parse&&c&&(this[a][i]=u.parse(c,l,this))}for(const i of I)this[a][i]=l=>{const c=i.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(c,{detail:l,...S[i]}))}}static get observedAttributes(){return Object.keys(A)}connectedCallback(){this[N]=!0,this[O]()}disconnectedCallback(){this[N]=!1,this[T]&&r.unmount(this[T]),delete this[T]}attributeChangedCallback(i,l,c){const E=A[i],u=b[E],p=u?C[u]:null;E in b&&p!=null&&p.parse&&c&&(this[a][E]=p.parse(c,i,this),this[O]())}[(d=N,_=T,o=a,O)](){this[N]&&(this[T]?r.update(this[T],this[a]):this[T]=r.mount(this.container,e,this[a]))}}for(const s of f){const i=h[s],l=b[s];Object.defineProperty(P.prototype,s,{enumerable:!0,configurable:!0,get(){return this[a][s]},set(c){this[a][s]=c;const E=l?C[l]:null;if(E!=null&&E.stringify){const u=E.stringify(c,i,this);this.getAttribute(i)!==u&&this.setAttribute(i,u)}else this[O]()}})}return P}const y=new Map;function B(e,t,r){const o=y.get(e);if(o){o.tid!==null&&clearTimeout(o.tid),o.tid=null;const f=g.createElement(t,r);return o.root.render(f),{root:o.root,ReactComponent:t}}const _=V.createRoot(e);y.set(e,{root:_,tid:null});const d=g.createElement(t,r);return _.render(d),{root:_,ReactComponent:t}}function $({root:e,ReactComponent:t},r){const o=g.createElement(t,r);e.render(o)}function H({root:e}){for(const[t,r]of y)if(r.root===e){r.tid=setTimeout(()=>{y.delete(t),e.unmount()},0);return}setTimeout(()=>{e.unmount()},0)}function L(e,t={}){return x(e,t,{mount:B,update:$,unmount:H})}const U=L(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",themeConfig:"string",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",spinCursor:"string",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean",monitoring:"boolean"}}),X=L(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),q=L(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function z(){customElements.define(n.WEB_PLAYER_WC_TAG,U),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,X),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,q)}function J(){n.checkCustomElementsDefinition()||z()}J();exports.ANALYTICS_EVENT_DISPLAY=n.ANALYTICS_EVENT_DISPLAY;exports.ANALYTICS_EVENT_ERROR=n.ANALYTICS_EVENT_ERROR;exports.ANALYTICS_EVENT_INTERACTION=n.ANALYTICS_EVENT_INTERACTION;exports.ANALYTICS_EVENT_LOAD=n.ANALYTICS_EVENT_LOAD;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
|
package/dist/index.js
CHANGED
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
import { W as
|
|
2
|
-
import { A as
|
|
1
|
+
import { W as w, a as W, b as R, c as D, d as V, e as M, f as j } from "./shared-zi1amD4C.js";
|
|
2
|
+
import { A as le, g as ue, h as pe, i as fe, D as me, E as Ee, j as be, k as de, l as he, m as ye, n as ge, o as _e, p as Ce, q as Oe, r as Te, s as Ae, t as Ne, u as Se, v as Le } from "./shared-zi1amD4C.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
4
|
+
import A from "react";
|
|
5
|
+
import { createRoot as x } from "react-dom/client";
|
|
6
|
+
var k = Object.defineProperty, Y = (e, t, n) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => Y(e, typeof t != "symbol" ? t + "" : t, n);
|
|
7
|
+
const F = {
|
|
8
8
|
stringify: (e) => e ? "true" : "false",
|
|
9
9
|
parse: (e) => /^[ty1-9]/i.test(e)
|
|
10
|
-
},
|
|
10
|
+
}, G = {
|
|
11
11
|
stringify: (e) => e.name,
|
|
12
12
|
parse: (e, t, n) => {
|
|
13
|
-
const
|
|
13
|
+
const o = (() => {
|
|
14
14
|
if (typeof window < "u" && e in window)
|
|
15
15
|
return window[e];
|
|
16
16
|
if (typeof global < "u" && e in global)
|
|
17
17
|
return global[e];
|
|
18
18
|
})();
|
|
19
|
-
return typeof
|
|
19
|
+
return typeof o == "function" ? o.bind(n) : void 0;
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, $ = {
|
|
22
22
|
stringify: (e) => JSON.stringify(e),
|
|
23
23
|
parse: (e) => JSON.parse(e)
|
|
24
24
|
};
|
|
25
|
-
function
|
|
25
|
+
function B(e) {
|
|
26
26
|
return e.replace(
|
|
27
27
|
/([a-z0-9])([A-Z])/g,
|
|
28
|
-
(t, n,
|
|
28
|
+
(t, n, o) => `${n}-${o.toLowerCase()}`
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function v(e) {
|
|
32
32
|
return e.replace(/[-:]([a-z])/g, (t, n) => `${n.toUpperCase()}`);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const H = {
|
|
35
35
|
stringify: (e) => e.name,
|
|
36
36
|
parse: (e, t, n) => {
|
|
37
|
-
const
|
|
38
|
-
const p =
|
|
37
|
+
const o = (() => {
|
|
38
|
+
const p = v(t);
|
|
39
39
|
if (typeof n < "u" && p in n.container)
|
|
40
40
|
return n.container[p];
|
|
41
41
|
})();
|
|
42
|
-
return typeof
|
|
42
|
+
return typeof o == "function" ? o.bind(n) : void 0;
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, U = {
|
|
45
45
|
stringify: (e) => `${e}`,
|
|
46
46
|
parse: (e) => parseFloat(e)
|
|
47
|
-
},
|
|
47
|
+
}, z = {
|
|
48
48
|
stringify: (e) => e,
|
|
49
49
|
parse: (e) => e
|
|
50
|
-
},
|
|
51
|
-
string:
|
|
52
|
-
number:
|
|
53
|
-
boolean:
|
|
54
|
-
function:
|
|
55
|
-
method:
|
|
56
|
-
json:
|
|
57
|
-
},
|
|
58
|
-
function
|
|
59
|
-
var
|
|
50
|
+
}, T = {
|
|
51
|
+
string: z,
|
|
52
|
+
number: U,
|
|
53
|
+
boolean: F,
|
|
54
|
+
function: G,
|
|
55
|
+
method: H,
|
|
56
|
+
json: $
|
|
57
|
+
}, d = Symbol.for("r2wc.render"), g = Symbol.for("r2wc.connected"), m = Symbol.for("r2wc.context"), i = Symbol.for("r2wc.props");
|
|
58
|
+
function J(e, t, n) {
|
|
59
|
+
var o, p, h;
|
|
60
60
|
t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []), t.events || (t.events = []);
|
|
61
|
-
const
|
|
62
|
-
for (const s of
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
61
|
+
const E = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), S = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), b = {}, L = {}, C = {}, O = {};
|
|
62
|
+
for (const s of E) {
|
|
63
|
+
b[s] = Array.isArray(t.props) ? "string" : t.props[s];
|
|
64
|
+
const r = B(s);
|
|
65
|
+
C[s] = r, O[r] = s;
|
|
66
66
|
}
|
|
67
|
-
for (const s of
|
|
68
|
-
|
|
69
|
-
class
|
|
67
|
+
for (const s of S)
|
|
68
|
+
L[s] = Array.isArray(t.events) ? {} : t.events[s];
|
|
69
|
+
class P extends HTMLElement {
|
|
70
70
|
constructor() {
|
|
71
|
-
super(),
|
|
71
|
+
super(), y(this, h, !0), y(this, p), y(this, o, {}), y(this, "container"), t.shadow ? this.container = this.attachShadow({
|
|
72
72
|
mode: t.shadow
|
|
73
73
|
}) : this.container = this, this[i].container = this.container;
|
|
74
|
-
for (const
|
|
75
|
-
const l =
|
|
74
|
+
for (const r of E) {
|
|
75
|
+
const l = C[r], a = this.getAttribute(l), c = b[r], u = c ? T[c] : null;
|
|
76
76
|
if (c === "method") {
|
|
77
|
-
const f =
|
|
77
|
+
const f = v(l);
|
|
78
78
|
Object.defineProperty(this[i].container, f, {
|
|
79
79
|
enumerable: !0,
|
|
80
80
|
configurable: !0,
|
|
81
81
|
get() {
|
|
82
82
|
return this[i][f];
|
|
83
83
|
},
|
|
84
|
-
set(
|
|
85
|
-
this[i][f] =
|
|
84
|
+
set(I) {
|
|
85
|
+
this[i][f] = I, this[d]();
|
|
86
86
|
}
|
|
87
|
-
}), this[i][
|
|
87
|
+
}), this[i][r] = u.parse(a, l, this);
|
|
88
88
|
}
|
|
89
|
-
u != null && u.parse && a && (this[i][
|
|
89
|
+
u != null && u.parse && a && (this[i][r] = u.parse(a, l, this));
|
|
90
90
|
}
|
|
91
|
-
for (const
|
|
92
|
-
this[i][
|
|
93
|
-
const a =
|
|
91
|
+
for (const r of S)
|
|
92
|
+
this[i][r] = (l) => {
|
|
93
|
+
const a = r.replace(/^on/, "").toLowerCase();
|
|
94
94
|
this.dispatchEvent(
|
|
95
|
-
new CustomEvent(a, { detail: l, ...
|
|
95
|
+
new CustomEvent(a, { detail: l, ...L[r] })
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
static get observedAttributes() {
|
|
100
|
-
return Object.keys(
|
|
100
|
+
return Object.keys(O);
|
|
101
101
|
}
|
|
102
102
|
connectedCallback() {
|
|
103
|
-
this[
|
|
103
|
+
this[g] = !0, this[d]();
|
|
104
104
|
}
|
|
105
105
|
disconnectedCallback() {
|
|
106
|
-
this[
|
|
106
|
+
this[g] = !1, this[m] && n.unmount(this[m]), delete this[m];
|
|
107
107
|
}
|
|
108
|
-
attributeChangedCallback(
|
|
109
|
-
const c =
|
|
110
|
-
c in
|
|
108
|
+
attributeChangedCallback(r, l, a) {
|
|
109
|
+
const c = O[r], u = b[c], f = u ? T[u] : null;
|
|
110
|
+
c in b && f != null && f.parse && a && (this[i][c] = f.parse(a, r, this), this[d]());
|
|
111
111
|
}
|
|
112
|
-
[(
|
|
113
|
-
this[
|
|
112
|
+
[(h = g, p = m, o = i, d)]() {
|
|
113
|
+
this[g] && (this[m] ? n.update(this[m], this[i]) : this[m] = n.mount(
|
|
114
114
|
this.container,
|
|
115
115
|
e,
|
|
116
116
|
this[i]
|
|
117
117
|
));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
for (const s of
|
|
121
|
-
const
|
|
122
|
-
Object.defineProperty(
|
|
120
|
+
for (const s of E) {
|
|
121
|
+
const r = C[s], l = b[s];
|
|
122
|
+
Object.defineProperty(P.prototype, s, {
|
|
123
123
|
enumerable: !0,
|
|
124
124
|
configurable: !0,
|
|
125
125
|
get() {
|
|
@@ -127,37 +127,50 @@ function z(e, t, n) {
|
|
|
127
127
|
},
|
|
128
128
|
set(a) {
|
|
129
129
|
this[i][s] = a;
|
|
130
|
-
const c = l ?
|
|
130
|
+
const c = l ? T[l] : null;
|
|
131
131
|
if (c != null && c.stringify) {
|
|
132
|
-
const u = c.stringify(a,
|
|
133
|
-
this.getAttribute(
|
|
132
|
+
const u = c.stringify(a, r, this);
|
|
133
|
+
this.getAttribute(r) !== u && this.setAttribute(r, u);
|
|
134
134
|
} else
|
|
135
|
-
this[
|
|
135
|
+
this[d]();
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
return
|
|
139
|
+
return P;
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
const _ = /* @__PURE__ */ new Map();
|
|
142
|
+
function X(e, t, n) {
|
|
143
|
+
const o = _.get(e);
|
|
144
|
+
if (o) {
|
|
145
|
+
o.tid !== null && clearTimeout(o.tid), o.tid = null;
|
|
146
|
+
const E = A.createElement(t, n);
|
|
147
|
+
return o.root.render(E), { root: o.root, ReactComponent: t };
|
|
148
|
+
}
|
|
149
|
+
const p = x(e);
|
|
150
|
+
_.set(e, { root: p, tid: null });
|
|
151
|
+
const h = A.createElement(t, n);
|
|
152
|
+
return p.render(h), { root: p, ReactComponent: t };
|
|
147
153
|
}
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
e.render(
|
|
154
|
+
function q({ root: e, ReactComponent: t }, n) {
|
|
155
|
+
const o = A.createElement(t, n);
|
|
156
|
+
e.render(o);
|
|
151
157
|
}
|
|
152
|
-
function
|
|
158
|
+
function Z({ root: e }) {
|
|
159
|
+
for (const [t, n] of _)
|
|
160
|
+
if (n.root === e) {
|
|
161
|
+
n.tid = setTimeout(() => {
|
|
162
|
+
_.delete(t), e.unmount();
|
|
163
|
+
}, 0);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
153
166
|
setTimeout(() => {
|
|
154
167
|
e.unmount();
|
|
155
168
|
}, 0);
|
|
156
169
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
170
|
+
function N(e, t = {}) {
|
|
171
|
+
return J(e, t, { mount: X, update: q, unmount: Z });
|
|
159
172
|
}
|
|
160
|
-
const
|
|
173
|
+
const K = N(w, {
|
|
161
174
|
shadow: "closed",
|
|
162
175
|
props: {
|
|
163
176
|
compositionUrl: "string",
|
|
@@ -192,48 +205,48 @@ const Z = T(I, {
|
|
|
192
205
|
// Monitoring
|
|
193
206
|
monitoring: "boolean"
|
|
194
207
|
}
|
|
195
|
-
}),
|
|
208
|
+
}), Q = N(W, {
|
|
196
209
|
shadow: "closed",
|
|
197
210
|
props: {
|
|
198
211
|
index: "number",
|
|
199
212
|
thumbnailSrc: "string"
|
|
200
213
|
}
|
|
201
|
-
}),
|
|
214
|
+
}), ee = N(R, {
|
|
202
215
|
shadow: "closed",
|
|
203
216
|
props: {
|
|
204
217
|
name: "string"
|
|
205
218
|
}
|
|
206
219
|
});
|
|
207
|
-
function ee() {
|
|
208
|
-
customElements.define(D, Z), customElements.define(
|
|
209
|
-
V,
|
|
210
|
-
K
|
|
211
|
-
), customElements.define(M, Q);
|
|
212
|
-
}
|
|
213
220
|
function te() {
|
|
214
|
-
|
|
221
|
+
customElements.define(V, K), customElements.define(
|
|
222
|
+
M,
|
|
223
|
+
Q
|
|
224
|
+
), customElements.define(j, ee);
|
|
225
|
+
}
|
|
226
|
+
function ne() {
|
|
227
|
+
D() || te();
|
|
215
228
|
}
|
|
216
|
-
|
|
229
|
+
ne();
|
|
217
230
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
231
|
+
le as ANALYTICS_EVENT_DISPLAY,
|
|
232
|
+
ue as ANALYTICS_EVENT_ERROR,
|
|
233
|
+
pe as ANALYTICS_EVENT_INTERACTION,
|
|
234
|
+
fe as ANALYTICS_EVENT_LOAD,
|
|
235
|
+
me as DEFAULT_EVENT_PREFIX,
|
|
236
|
+
Ee as EVENT_COMPOSITION_LOADED,
|
|
237
|
+
be as EVENT_COMPOSITION_LOADING,
|
|
238
|
+
de as EVENT_COMPOSITION_LOAD_ERROR,
|
|
226
239
|
he as EVENT_EXTEND_MODE_OFF,
|
|
227
240
|
ye as EVENT_EXTEND_MODE_ON,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
241
|
+
ge as EVENT_GALLERY_CLOSE,
|
|
242
|
+
_e as EVENT_GALLERY_OPEN,
|
|
243
|
+
Ce as EVENT_HOTSPOTS_OFF,
|
|
231
244
|
Oe as EVENT_HOTSPOTS_ON,
|
|
232
245
|
Te as EVENT_ITEM_CHANGE,
|
|
233
|
-
|
|
234
|
-
|
|
246
|
+
j as WEB_PLAYER_ICON_WC_TAG,
|
|
247
|
+
V as WEB_PLAYER_WC_TAG,
|
|
235
248
|
Ae as WebPlayer,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
249
|
+
Ne as WebPlayerCustomMedia,
|
|
250
|
+
Se as WebPlayerIcon,
|
|
251
|
+
Le as generateCompositionUrl
|
|
239
252
|
};
|
package/dist/legacy.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared-CiiFL5oT.cjs");require("react/jsx-runtime");const P=require("react"),m=require("react-dom");var V=Object.defineProperty,D=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t,r)=>D(e,typeof t!="symbol"?t+"":t,r);const v={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},M={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof s=="function"?s.bind(r):void 0}},w={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Y(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,r,s)=>`${r}-${s.toLowerCase()}`)}function R(e){return e.replace(/[-:]([a-z])/g,(t,r)=>`${r.toUpperCase()}`)}const G={stringify:e=>e.name,parse:(e,t,r)=>{const s=(()=>{const T=R(t);if(typeof r<"u"&&T in r.container)return r.container[T]})();return typeof s=="function"?s.bind(r):void 0}},F={stringify:e=>`${e}`,parse:e=>parseFloat(e)},j={stringify:e=>e,parse:e=>e},d={string:j,number:F,boolean:v,function:M,method:G,json:w},b=Symbol.for("r2wc.render"),N=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),a=Symbol.for("r2wc.props");function k(e,t,r){var s,T,g;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const y=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),L=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),O={},I={},A={},h={};for(const i of y){O[i]=Array.isArray(t.props)?"string":t.props[i];const o=Y(i);A[i]=o,h[o]=i}for(const i of L)I[i]=Array.isArray(t.events)?{}:t.events[i];class S extends HTMLElement{constructor(){super(),f(this,g,!0),f(this,T),f(this,s,{}),f(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[a].container=this.container;for(const o of y){const l=A[o],E=this.getAttribute(l),c=O[o],u=c?d[c]:null;if(c==="method"){const _=R(l);Object.defineProperty(this[a].container,_,{enumerable:!0,configurable:!0,get(){return this[a][_]},set(W){this[a][_]=W,this[b]()}}),this[a][o]=u.parse(E,l,this)}u!=null&&u.parse&&E&&(this[a][o]=u.parse(E,l,this))}for(const o of L)this[a][o]=l=>{const E=o.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(E,{detail:l,...I[o]}))}}static get observedAttributes(){return Object.keys(h)}connectedCallback(){this[N]=!0,this[b]()}disconnectedCallback(){this[N]=!1,this[p]&&r.unmount(this[p]),delete this[p]}attributeChangedCallback(o,l,E){const c=h[o],u=O[c],_=u?d[u]:null;c in O&&_!=null&&_.parse&&E&&(this[a][c]=_.parse(E,o,this),this[b]())}[(g=N,T=p,s=a,b)](){this[N]&&(this[p]?r.update(this[p],this[a]):this[p]=r.mount(this.container,e,this[a]))}}for(const i of y){const o=A[i],l=O[i];Object.defineProperty(S.prototype,i,{enumerable:!0,configurable:!0,get(){return this[a][i]},set(E){this[a][i]=E;const c=l?d[l]:null;if(c!=null&&c.stringify){const u=c.stringify(E,o,this);this.getAttribute(o)!==u&&this.setAttribute(o,u)}else this[b]()}})}return S}function B(e,t,r){const s=P.createElement(t,r);return m.render(s,e),{container:e,ReactComponent:t}}function $({container:e,ReactComponent:t},r){const s=P.createElement(t,r);m.render(s,e)}function x({container:e}){m.unmountComponentAtNode(e)}function C(e,t={}){return k(e,t,{mount:B,update:$,unmount:x})}const U=C(n.WebPlayerWithInjectedStyles,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",themeConfig:"string",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",spinCursor:"string",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean",monitoring:"boolean"}}),H=C(n.WebPlayerCustomMedia,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),X=C(n.WebPlayerIcon,{shadow:"closed",props:{name:"string"}});function q(){customElements.define(n.WEB_PLAYER_WC_TAG,U),customElements.define(n.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG,H),customElements.define(n.WEB_PLAYER_ICON_WC_TAG,X)}function z(){n.checkCustomElementsDefinition()||q()}z();exports.ANALYTICS_EVENT_DISPLAY=n.ANALYTICS_EVENT_DISPLAY;exports.ANALYTICS_EVENT_ERROR=n.ANALYTICS_EVENT_ERROR;exports.ANALYTICS_EVENT_INTERACTION=n.ANALYTICS_EVENT_INTERACTION;exports.ANALYTICS_EVENT_LOAD=n.ANALYTICS_EVENT_LOAD;exports.DEFAULT_EVENT_PREFIX=n.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=n.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=n.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=n.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=n.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=n.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=n.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=n.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=n.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=n.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=n.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_ICON_WC_TAG=n.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=n.WEB_PLAYER_WC_TAG;exports.WebPlayer=n.WebPlayer;exports.WebPlayerCustomMedia=n.WebPlayerCustomMedia$1;exports.WebPlayerIcon=n.WebPlayerIcon$1;exports.generateCompositionUrl=n.generateCompositionUrl;
|
package/dist/legacy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W, a as w, b as R, c as D, d as V, e as M, f as j } from "./shared-
|
|
2
|
-
import { A as ce, g as le, h as ue, i as pe, D as fe, E as me, j as Ee, k as be, l as he, m as de, n as ye, o as ge, p as _e, q as Ae, r as Ce, s as Oe, t as Te, u as Ne, v as Se } from "./shared-
|
|
1
|
+
import { W, a as w, b as R, c as D, d as V, e as M, f as j } from "./shared-zi1amD4C.js";
|
|
2
|
+
import { A as ce, g as le, h as ue, i as pe, D as fe, E as me, j as Ee, k as be, l as he, m as de, n as ye, o as ge, p as _e, q as Ae, r as Ce, s as Oe, t as Te, u as Ne, v as Se } from "./shared-zi1amD4C.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import P from "react";
|
|
5
5
|
import C from "react-dom";
|