@capacitor-community/admob 8.2.0 → 8.2.1-beta.pr490.shaf4a3cab095f4

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.
Files changed (81) hide show
  1. package/CapacitorCommunityAdmob.podspec +1 -1
  2. package/Package.swift +1 -1
  3. package/README.md +8 -7
  4. package/android/build.gradle +5 -1
  5. package/android/src/main/java/com/getcapacitor/community/admob/AdMob.java +88 -0
  6. package/android/src/main/java/com/getcapacitor/community/admob/nativeads/NativeAdExecutor.kt +626 -0
  7. package/android/src/main/java/com/getcapacitor/community/admob/nativeads/NativeAdFeedSessions.kt +35 -0
  8. package/android/src/main/java/com/getcapacitor/community/admob/nativeads/NativeAdPlacementValue.kt +44 -0
  9. package/android/src/main/java/com/getcapacitor/community/admob/nativeads/NativeAdPluginEvents.kt +11 -0
  10. package/android/src/main/java/com/getcapacitor/community/admob/nativeads/PluginNativeAdView.kt +187 -0
  11. package/dist/esm/index.d.ts +1 -0
  12. package/dist/esm/index.js +5 -1
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/native-ads/index.d.ts +6 -0
  15. package/dist/esm/native-ads/index.js +4 -0
  16. package/dist/esm/native-ads/index.js.map +1 -0
  17. package/dist/esm/native-ads/native-ad-definitions.interface.d.ts +20 -0
  18. package/dist/esm/native-ads/native-ad-definitions.interface.js +2 -0
  19. package/dist/esm/native-ads/native-ad-definitions.interface.js.map +1 -0
  20. package/dist/esm/native-ads/native-ad-element.d.ts +9 -0
  21. package/dist/esm/native-ads/native-ad-element.js +53 -0
  22. package/dist/esm/native-ads/native-ad-element.js.map +1 -0
  23. package/dist/esm/native-ads/native-ad-event.interface.d.ts +5 -0
  24. package/dist/esm/native-ads/native-ad-event.interface.js +2 -0
  25. package/dist/esm/native-ads/native-ad-event.interface.js.map +1 -0
  26. package/dist/esm/native-ads/native-ad-feed.d.ts +72 -0
  27. package/dist/esm/native-ads/native-ad-feed.js +643 -0
  28. package/dist/esm/native-ads/native-ad-feed.js.map +1 -0
  29. package/dist/esm/native-ads/native-ad-geometry.d.ts +8 -0
  30. package/dist/esm/native-ads/native-ad-geometry.js +92 -0
  31. package/dist/esm/native-ads/native-ad-geometry.js.map +1 -0
  32. package/dist/esm/native-ads/native-ad-options.interface.d.ts +40 -0
  33. package/dist/esm/native-ads/native-ad-options.interface.js +2 -0
  34. package/dist/esm/native-ads/native-ad-options.interface.js.map +1 -0
  35. package/dist/esm/native-ads/native-ad-placement.interface.d.ts +28 -0
  36. package/dist/esm/native-ads/native-ad-placement.interface.js +2 -0
  37. package/dist/esm/native-ads/native-ad-placement.interface.js.map +1 -0
  38. package/dist/esm/native-ads/native-ad-plugin-events.enum.d.ts +9 -0
  39. package/dist/esm/native-ads/native-ad-plugin-events.enum.js +11 -0
  40. package/dist/esm/native-ads/native-ad-plugin-events.enum.js.map +1 -0
  41. package/dist/esm/native-ads/native-ad-style.interface.d.ts +30 -0
  42. package/dist/esm/native-ads/native-ad-style.interface.js +2 -0
  43. package/dist/esm/native-ads/native-ad-style.interface.js.map +1 -0
  44. package/dist/esm/native-ads/native-ad-template.enum.d.ts +11 -0
  45. package/dist/esm/native-ads/native-ad-template.enum.js +13 -0
  46. package/dist/esm/native-ads/native-ad-template.enum.js.map +1 -0
  47. package/dist/esm/web.d.ts +9 -1
  48. package/dist/esm/web.js +15 -0
  49. package/dist/esm/web.js.map +1 -1
  50. package/dist/plugin.cjs.js +883 -1
  51. package/dist/plugin.cjs.js.map +1 -1
  52. package/dist/plugin.js +883 -1
  53. package/dist/plugin.js.map +1 -1
  54. package/docs/configuration.md +2 -2
  55. package/docs/consent.md +6 -6
  56. package/docs/events.md +3 -2
  57. package/docs/migration.md +22 -2
  58. package/docs/native-ads.md +187 -0
  59. package/docs/rewarded.md +13 -0
  60. package/ios/Sources/AdMobPlugin/AdMobPlugin.swift +103 -41
  61. package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdPluginEvents.swift +3 -0
  62. package/ios/Sources/AdMobPlugin/Banner/BannerAdPluginEvents.swift +3 -0
  63. package/ios/Sources/AdMobPlugin/Banner/BannerAdSizeEnum.swift +3 -0
  64. package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +4 -4
  65. package/ios/Sources/AdMobPlugin/Helper/AuthorizationStatusEnum.swift +3 -0
  66. package/ios/Sources/AdMobPlugin/Interstitial/AdInterstitialExecutor.swift +3 -0
  67. package/ios/Sources/AdMobPlugin/Interstitial/InterstitialAdPluginEvents.swift +3 -0
  68. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdExecutor.swift +354 -0
  69. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdFeedSessions.swift +34 -0
  70. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdPlacementValue.swift +50 -0
  71. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdPluginEvents.swift +11 -0
  72. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdScrollTracker.swift +66 -0
  73. package/ios/Sources/AdMobPlugin/NativeAds/NativeAdValues.swift +27 -0
  74. package/ios/Sources/AdMobPlugin/NativeAds/PluginNativeAdView.swift +187 -0
  75. package/ios/Sources/AdMobPlugin/Rewarded/AdRewardExecutor.swift +3 -0
  76. package/ios/Sources/AdMobPlugin/Rewarded/RewardAdPluginEvents.swift +3 -0
  77. package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +3 -0
  78. package/ios/Sources/AdMobPlugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +3 -0
  79. package/ios/Tests/AdMobPluginTests/AdMobPluginTests.swift +82 -10
  80. package/ios/Tests/AdMobPluginTests/NativeAdScrollTrackerTests.swift +47 -0
  81. package/package.json +6 -4
@@ -2,6 +2,859 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
+ function* projectionAncestors(element) {
6
+ let current = element;
7
+ while (current) {
8
+ const root = current.getRootNode();
9
+ current = current.assignedSlot ?? current.parentElement ?? (root instanceof ShadowRoot ? root.host : null);
10
+ if (current)
11
+ yield current;
12
+ }
13
+ }
14
+
15
+ /** Current CSS visibility without the Engine's projection hiding rules.
16
+ * Use when an existing renderer decides whether its DOM source is authored hidden.
17
+ * Projection attributes are restored synchronously before returning; this performs
18
+ * a style read and may notify MutationObservers, so it is not a cached measurement.
19
+ */
20
+ const getUnprojectedVisibility = (element) => {
21
+ const win = element.ownerDocument.defaultView;
22
+ if (!win)
23
+ return 'hidden';
24
+ const markers = [];
25
+ for (const node of [element, ...projectionAncestors(element)]) {
26
+ for (const attribute of Array.from(node.attributes)) {
27
+ if (attribute.name === 'data-native-ui-snapshot-source' ||
28
+ attribute.name === 'data-native-ui-snapshot-prepared' ||
29
+ attribute.name === 'data-native-ui-snapshot-content' ||
30
+ attribute.name.startsWith('data-native-ui-session-'))
31
+ markers.push({ node, name: attribute.name, value: attribute.value });
32
+ }
33
+ }
34
+ try {
35
+ for (const { node, name } of markers)
36
+ node.removeAttribute(name);
37
+ return win.getComputedStyle(element).visibility;
38
+ }
39
+ finally {
40
+ for (const { node, name, value } of markers)
41
+ node.setAttribute(name, value);
42
+ }
43
+ };
44
+
45
+ // The injected runtime and a plugin's bundled helper share the binding.
46
+ const placementKey = Symbol.for('webview-native-ui-engine.projection-placement');
47
+ const bindProjectionPlacement = (element, measure, invalidate = () => { }) => {
48
+ const host = element;
49
+ const state = { projected: false, measure, invalidate };
50
+ host[placementKey] = state;
51
+ return {
52
+ get projected() {
53
+ return host[placementKey] === state && state.projected;
54
+ },
55
+ dispose() {
56
+ if (host[placementKey] === state)
57
+ delete host[placementKey];
58
+ state.projected = false;
59
+ },
60
+ };
61
+ };
62
+
63
+ const NATIVE_AD_ELEMENT_NAME = 'capacitor-admob-native';
64
+ const defineNativeAdElement = (findFeed) => {
65
+ const runtime = globalThis;
66
+ runtime.__capacitorAdMobNativeFeedLookup = findFeed;
67
+ if (typeof customElements === 'undefined' || customElements.get(NATIVE_AD_ELEMENT_NAME)) {
68
+ return;
69
+ }
70
+ customElements.define(NATIVE_AD_ELEMENT_NAME, class extends HTMLElement {
71
+ static get observedAttributes() {
72
+ return ['feed-id', 'slot-key'];
73
+ }
74
+ connectedCallback() {
75
+ this.connectToFeed();
76
+ }
77
+ disconnectedCallback() {
78
+ this.disconnectFromFeed();
79
+ }
80
+ attributeChangedCallback() {
81
+ if (!this.isConnected) {
82
+ return;
83
+ }
84
+ this.disconnectFromFeed();
85
+ this.connectToFeed();
86
+ }
87
+ connectToFeed() {
88
+ var _a, _b, _c;
89
+ const feedId = (_a = this.getAttribute('feed-id')) === null || _a === void 0 ? void 0 : _a.trim();
90
+ const slotKey = (_b = this.getAttribute('slot-key')) === null || _b === void 0 ? void 0 : _b.trim();
91
+ const feed = feedId ? (_c = runtime.__capacitorAdMobNativeFeedLookup) === null || _c === void 0 ? void 0 : _c.call(runtime, feedId) : undefined;
92
+ if (!feed || !slotKey) {
93
+ return;
94
+ }
95
+ try {
96
+ feed.attach(slotKey, this);
97
+ this.attachedFeed = feed;
98
+ }
99
+ catch (error) {
100
+ this.dispatchEvent(new CustomEvent('nativeAdError', { bubbles: true, detail: error }));
101
+ }
102
+ }
103
+ disconnectFromFeed() {
104
+ var _a;
105
+ (_a = this.attachedFeed) === null || _a === void 0 ? void 0 : _a.detach(this);
106
+ this.attachedFeed = undefined;
107
+ }
108
+ });
109
+ };
110
+ const connectNativeAdElements = () => {
111
+ document
112
+ .querySelectorAll(NATIVE_AD_ELEMENT_NAME)
113
+ .forEach((element) => { var _a, _b; return (_b = (_a = element).connectToFeed) === null || _b === void 0 ? void 0 : _b.call(_a); });
114
+ };
115
+
116
+ const intersectRects = (left, right) => {
117
+ const x = Math.max(left.x, right.x);
118
+ const y = Math.max(left.y, right.y);
119
+ const maxX = Math.min(left.x + left.width, right.x + right.width);
120
+ const maxY = Math.min(left.y + left.height, right.y + right.height);
121
+ return {
122
+ x,
123
+ y,
124
+ width: Math.max(0, maxX - x),
125
+ height: Math.max(0, maxY - y),
126
+ };
127
+ };
128
+ const toNativeRect = (rect) => ({
129
+ x: rect.left,
130
+ y: rect.top,
131
+ width: rect.width,
132
+ height: rect.height,
133
+ });
134
+ const clipsDescendants = (element) => {
135
+ const style = window.getComputedStyle(element);
136
+ return [style.overflow, style.overflowX, style.overflowY].some((value) => ['auto', 'hidden', 'scroll', 'clip'].includes(value));
137
+ };
138
+ function* nativeAdAncestors(element) {
139
+ var _a, _b;
140
+ let current = element;
141
+ while (current) {
142
+ const root = current.getRootNode();
143
+ current =
144
+ (_b = (_a = current.assignedSlot) !== null && _a !== void 0 ? _a : current.parentElement) !== null && _b !== void 0 ? _b : (root instanceof ShadowRoot ? root.host : null);
145
+ if (current)
146
+ yield current;
147
+ }
148
+ }
149
+ const measureNativeAdSlot = (element, scrollElement) => {
150
+ var _a, _b, _c, _d, _e, _f, _g, _h;
151
+ const style = window.getComputedStyle(element);
152
+ const domRect = element.getBoundingClientRect();
153
+ if (!element.isConnected ||
154
+ style.display === 'none' ||
155
+ (style.visibility === 'hidden' && getUnprojectedVisibility(element) === 'hidden') ||
156
+ Number.parseFloat(style.opacity || '1') === 0 ||
157
+ domRect.width <= 0 ||
158
+ domRect.height <= 0) {
159
+ return undefined;
160
+ }
161
+ const rect = toNativeRect(domRect);
162
+ let clipRect = scrollElement
163
+ ? rect
164
+ : {
165
+ x: (_b = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0,
166
+ y: (_d = (_c = window.visualViewport) === null || _c === void 0 ? void 0 : _c.offsetTop) !== null && _d !== void 0 ? _d : 0,
167
+ width: (_f = (_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : window.innerWidth,
168
+ height: (_h = (_g = window.visualViewport) === null || _g === void 0 ? void 0 : _g.height) !== null && _h !== void 0 ? _h : window.innerHeight,
169
+ };
170
+ let foundScrollElement = !scrollElement;
171
+ for (const ancestor of nativeAdAncestors(element)) {
172
+ if (ancestor === scrollElement) {
173
+ foundScrollElement = true;
174
+ break;
175
+ }
176
+ if (clipsDescendants(ancestor)) {
177
+ clipRect = intersectRects(clipRect, toNativeRect(ancestor.getBoundingClientRect()));
178
+ }
179
+ }
180
+ clipRect = intersectRects(rect, clipRect);
181
+ if (!foundScrollElement || clipRect.width <= 0 || clipRect.height <= 0)
182
+ return undefined;
183
+ if (scrollElement) {
184
+ const origin = scrollElement.getBoundingClientRect();
185
+ const translate = (value) => (Object.assign(Object.assign({}, value), { x: value.x - origin.left + scrollElement.scrollLeft, y: value.y - origin.top + scrollElement.scrollTop }));
186
+ return { rect: translate(rect), clipRect: translate(clipRect) };
187
+ }
188
+ return { rect, clipRect };
189
+ };
190
+ const measureNativeAdScrollContainer = (element) => {
191
+ var _a, _b, _c, _d, _e, _f, _g, _h;
192
+ const rect = toNativeRect(element.getBoundingClientRect());
193
+ let clipRect = intersectRects(rect, {
194
+ x: (_b = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0,
195
+ y: (_d = (_c = window.visualViewport) === null || _c === void 0 ? void 0 : _c.offsetTop) !== null && _d !== void 0 ? _d : 0,
196
+ width: (_f = (_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : window.innerWidth,
197
+ height: (_h = (_g = window.visualViewport) === null || _g === void 0 ? void 0 : _g.height) !== null && _h !== void 0 ? _h : window.innerHeight,
198
+ });
199
+ for (const ancestor of nativeAdAncestors(element)) {
200
+ if (clipsDescendants(ancestor)) {
201
+ clipRect = intersectRects(clipRect, toNativeRect(ancestor.getBoundingClientRect()));
202
+ }
203
+ }
204
+ return { rect, clipRect, contentWidth: element.scrollWidth, contentHeight: element.scrollHeight };
205
+ };
206
+
207
+ /**
208
+ * Layouts rendered by the native Google Mobile Ads SDK.
209
+ *
210
+ * The dimensions of a native ad slot must remain stable while it is used by a
211
+ * virtual scroller. `small` is intended for compact rows, while `medium`
212
+ * includes a larger media area.
213
+ */
214
+ exports.NativeAdTemplate = void 0;
215
+ (function (NativeAdTemplate) {
216
+ NativeAdTemplate["Small"] = "small";
217
+ NativeAdTemplate["Medium"] = "medium";
218
+ })(exports.NativeAdTemplate || (exports.NativeAdTemplate = {}));
219
+
220
+ const SCROLL_SETTLE_MS = 120;
221
+ const MAX_NATIVE_ADS = 3;
222
+ const MAX_ACTIVE_FEEDS = 2;
223
+ const MIN_SMALL_SLOT_WIDTH = 120;
224
+ const MIN_MEDIUM_SLOT_WIDTH = 144;
225
+ const MIN_MEDIUM_SLOT_HEIGHT = 300;
226
+ const MIN_SMALL_SLOT_HEIGHT = 120;
227
+ const TEMPLATE_ATTRIBUTE = 'data-capacitor-admob-template';
228
+ const applySlotDefaults = (element, template) => {
229
+ const root = element.getRootNode();
230
+ const container = root instanceof ShadowRoot ? root : element.ownerDocument.head;
231
+ if (!container.querySelector('style[data-capacitor-admob-defaults]')) {
232
+ const style = element.ownerDocument.createElement('style');
233
+ style.setAttribute('data-capacitor-admob-defaults', '');
234
+ // Prefer the first cascade layer; older WebViews use zero-specificity rules.
235
+ const defaults = `
236
+ :where([${TEMPLATE_ATTRIBUTE}]) { display: block; height: 320px; }
237
+ :where([${TEMPLATE_ATTRIBUTE}="small"]) { height: 120px; }
238
+ `;
239
+ style.textContent =
240
+ 'CSSLayerBlockRule' in globalThis ? `@layer capacitor-admob-defaults { ${defaults} }` : defaults;
241
+ container.prepend(style);
242
+ }
243
+ element.setAttribute(TEMPLATE_ATTRIBUTE, template);
244
+ };
245
+ let bridge;
246
+ let sessionSequence = 0;
247
+ const feeds = new Map();
248
+ const createSessionId = () => { var _a, _b, _c; return (_c = (_b = (_a = globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : `${Date.now()}-${++sessionSequence}-${Math.random().toString(36).slice(2)}`; };
249
+ /**
250
+ * Manages native ad placement and lifecycle in a scrolling feed.
251
+ *
252
+ * A stable `slotKey`, rather than the element or array index, owns the native
253
+ * ad lifecycle. Virtual-scroller compatibility has not yet been validated.
254
+ */
255
+ class NativeAdFeed {
256
+ constructor(options) {
257
+ var _a;
258
+ this.sessionId = createSessionId();
259
+ this.slots = new Map();
260
+ this.elementSlots = new Map();
261
+ this.scrollRoots = new Set();
262
+ this.destroyed = false;
263
+ this.nativeStarted = false;
264
+ this.paused = false;
265
+ this.layoutInvalidated = false;
266
+ this.lastPlacementWasDirect = false;
267
+ this.placementAcknowledgementRequired = false;
268
+ this.operationTask = Promise.resolve();
269
+ this.updateDirty = false;
270
+ this.placementSequence = 0;
271
+ this.listenerHandles = new Set();
272
+ this.handleViewportMotion = (event) => {
273
+ if (this.destroyed) {
274
+ return;
275
+ }
276
+ if (event instanceof Event &&
277
+ event.type === 'load' &&
278
+ event.target instanceof HTMLImageElement &&
279
+ event.target.dataset['admobSnapshot'] !== undefined)
280
+ return;
281
+ if (!(event instanceof Event) || !['scroll', 'touchmove', 'wheel'].includes(event.type)) {
282
+ for (const state of this.slots.values())
283
+ state.lastPlacement = undefined;
284
+ }
285
+ if (!(this.nativeScrollElement &&
286
+ event instanceof Event &&
287
+ ['scroll', 'touchmove', 'wheel'].includes(event.type))) {
288
+ this.schedulePlacementUpdate();
289
+ }
290
+ this.scheduleEvaluation();
291
+ };
292
+ this.handleVisibilityChange = () => {
293
+ if (this.destroyed) {
294
+ return;
295
+ }
296
+ if (document.hidden) {
297
+ this.layoutInvalidated = true;
298
+ void this.requestPlacementUpdate();
299
+ return;
300
+ }
301
+ this.scheduleEvaluation();
302
+ };
303
+ const id = options.feedId.trim();
304
+ if (!id) {
305
+ throw new Error('Native ad feed id must not be empty');
306
+ }
307
+ if (feeds.has(id)) {
308
+ throw new Error(`Native ad feed id already exists: ${id}`);
309
+ }
310
+ if (feeds.size >= MAX_ACTIVE_FEEDS) {
311
+ throw new Error(`At most ${MAX_ACTIVE_FEEDS} native ad feeds can be active`);
312
+ }
313
+ if (options.androidScrollSnapshot && core.Capacitor.getPlatform() !== 'android') {
314
+ throw new Error('androidScrollSnapshot requires Android');
315
+ }
316
+ this.options = Object.assign(Object.assign({}, options), { feedId: id });
317
+ this.nativeScrollElement = core.Capacitor.getPlatform() === 'ios' ? options.scrollElement : undefined;
318
+ if (typeof IntersectionObserver !== 'undefined') {
319
+ this.intersectionObserver = new IntersectionObserver((entries) => {
320
+ for (const entry of entries) {
321
+ const slotKey = this.elementSlots.get(entry.target);
322
+ const state = slotKey ? this.slots.get(slotKey) : undefined;
323
+ if (state) {
324
+ state.intersecting = entry.isIntersecting;
325
+ }
326
+ }
327
+ this.schedulePlacementUpdate();
328
+ this.scheduleEvaluation();
329
+ });
330
+ }
331
+ if (typeof ResizeObserver !== 'undefined') {
332
+ this.resizeObserver = new ResizeObserver(this.handleViewportMotion);
333
+ if (this.nativeScrollElement)
334
+ this.resizeObserver.observe(this.nativeScrollElement);
335
+ }
336
+ document.addEventListener('scroll', this.handleViewportMotion, true);
337
+ document.addEventListener('touchmove', this.handleViewportMotion, { capture: true, passive: true });
338
+ document.addEventListener('wheel', this.handleViewportMotion, { capture: true, passive: true });
339
+ window.addEventListener('resize', this.handleViewportMotion, { passive: true });
340
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', this.handleViewportMotion, { passive: true });
341
+ document.addEventListener('visibilitychange', this.handleVisibilityChange);
342
+ document.addEventListener('load', this.handleViewportMotion, true);
343
+ feeds.set(id, this);
344
+ }
345
+ static async create(options) {
346
+ var _a;
347
+ if (!bridge) {
348
+ throw new Error('AdMob native ad bridge is not configured');
349
+ }
350
+ if (typeof document === 'undefined' || typeof window === 'undefined') {
351
+ throw new Error('NativeAdFeed can only be created in a browser environment');
352
+ }
353
+ if (options.isTesting !== true && !((_a = options.adId) === null || _a === void 0 ? void 0 : _a.trim())) {
354
+ throw new Error('adId is required unless isTesting is true');
355
+ }
356
+ const feed = new NativeAdFeed(options);
357
+ try {
358
+ await bridge.startNativeAdFeed({ feedId: feed.feedId, sessionId: feed.sessionId });
359
+ feed.nativeStarted = true;
360
+ defineNativeAdElement((feedId) => feeds.get(feedId));
361
+ connectNativeAdElements();
362
+ return feed;
363
+ }
364
+ catch (error) {
365
+ await feed.destroy();
366
+ throw error;
367
+ }
368
+ }
369
+ get feedId() {
370
+ return this.options.feedId;
371
+ }
372
+ async addListener(eventName, listener) {
373
+ this.assertActive();
374
+ if (!bridge) {
375
+ throw new Error('AdMob native ad bridge is not configured');
376
+ }
377
+ const nativeHandle = await bridge.addListener(eventName, (event) => {
378
+ if (event.feedId === this.options.feedId && event.sessionId === this.sessionId) {
379
+ const filteredListener = listener;
380
+ filteredListener(event);
381
+ }
382
+ });
383
+ if (this.destroyed) {
384
+ await nativeHandle.remove();
385
+ this.assertActive();
386
+ }
387
+ let removed = false;
388
+ const handle = {
389
+ remove: async () => {
390
+ if (removed) {
391
+ return;
392
+ }
393
+ removed = true;
394
+ this.listenerHandles.delete(handle);
395
+ await nativeHandle.remove();
396
+ },
397
+ };
398
+ this.listenerHandles.add(handle);
399
+ return handle;
400
+ }
401
+ attach(slotKey, element) {
402
+ var _a, _b, _c, _d, _e;
403
+ this.assertActive();
404
+ const normalizedKey = slotKey.trim();
405
+ if (!normalizedKey) {
406
+ throw new Error('Native ad slotKey must not be empty');
407
+ }
408
+ const previousKey = this.elementSlots.get(element);
409
+ if (previousKey === normalizedKey) {
410
+ return;
411
+ }
412
+ if (previousKey && previousKey !== normalizedKey) {
413
+ this.detach(element);
414
+ }
415
+ const existing = this.slots.get(normalizedKey);
416
+ if ((existing === null || existing === void 0 ? void 0 : existing.element) && existing.element !== element) {
417
+ throw new Error(`Native ad slotKey is already attached: ${normalizedKey}`);
418
+ }
419
+ const state = existing !== null && existing !== void 0 ? existing : {
420
+ slotKey: normalizedKey,
421
+ generation: 0,
422
+ intersecting: !this.intersectionObserver,
423
+ status: 'idle',
424
+ lastUsed: Date.now(),
425
+ loadVersion: 0,
426
+ };
427
+ applySlotDefaults(element, (_a = this.options.template) !== null && _a !== void 0 ? _a : exports.NativeAdTemplate.Medium);
428
+ state.element = element;
429
+ if (this.options.androidScrollSnapshot) {
430
+ const owner = ((_b = state.projectionOwner) !== null && _b !== void 0 ? _b : (state.projectionOwner = `admob-${crypto.randomUUID()}`));
431
+ element.dataset['admobProjection'] = owner;
432
+ state.projectionSelector = `[data-admob-projection="${owner}"]`;
433
+ (_c = state.placementBinding) === null || _c === void 0 ? void 0 : _c.dispose();
434
+ state.placementBinding = bindProjectionPlacement(element, () => {
435
+ const placement = this.measurePlacement(state);
436
+ state.lastPlacement = placement;
437
+ // The reveal request applies this exact placement; keep batch deduplication in sync.
438
+ if (this.lastPlacements) {
439
+ const previous = JSON.parse(this.lastPlacements);
440
+ previous.placements = previous.placements.map((item) => item.slotKey === state.slotKey ? placement : item);
441
+ this.lastPlacements = JSON.stringify(previous);
442
+ }
443
+ return Object.assign(Object.assign({}, placement), { sessionId: this.sessionId, sequence: ++this.placementSequence });
444
+ }, () => {
445
+ if (state.element !== element || this.destroyed)
446
+ return;
447
+ state.lastPlacement = undefined;
448
+ this.lastPlacements = undefined;
449
+ this.schedulePlacementUpdate();
450
+ });
451
+ }
452
+ state.generation += 1;
453
+ state.lastUsed = Date.now();
454
+ this.slots.set(normalizedKey, state);
455
+ this.elementSlots.set(element, normalizedKey);
456
+ this.updateScrollRoots();
457
+ (_d = this.intersectionObserver) === null || _d === void 0 ? void 0 : _d.observe(element);
458
+ (_e = this.resizeObserver) === null || _e === void 0 ? void 0 : _e.observe(element);
459
+ this.scheduleEvaluation();
460
+ }
461
+ detach(element) {
462
+ var _a, _b, _c;
463
+ const slotKey = this.elementSlots.get(element);
464
+ if (!slotKey) {
465
+ return;
466
+ }
467
+ const state = this.slots.get(slotKey);
468
+ if ((state === null || state === void 0 ? void 0 : state.element) === element) {
469
+ (_a = state.placementBinding) === null || _a === void 0 ? void 0 : _a.dispose();
470
+ state.placementBinding = undefined;
471
+ state.lastPlacement = undefined;
472
+ if (state.projectionOwner)
473
+ delete element.dataset['admobProjection'];
474
+ state.element = undefined;
475
+ state.intersecting = false;
476
+ state.generation += 1;
477
+ state.lastUsed = Date.now();
478
+ }
479
+ (_b = this.intersectionObserver) === null || _b === void 0 ? void 0 : _b.unobserve(element);
480
+ (_c = this.resizeObserver) === null || _c === void 0 ? void 0 : _c.unobserve(element);
481
+ this.elementSlots.delete(element);
482
+ this.updateScrollRoots();
483
+ void this.requestPlacementUpdate();
484
+ this.scheduleEvaluation();
485
+ }
486
+ async reload(slotKey) {
487
+ this.assertActive();
488
+ const normalizedKey = slotKey.trim();
489
+ const state = this.slots.get(normalizedKey);
490
+ if (!state) {
491
+ throw new Error(`Native ad slotKey is not registered: ${normalizedKey}`);
492
+ }
493
+ await this.runOperation(async () => {
494
+ await this.removeStateAd(state);
495
+ const protectedStates = new Set(this.getVisibleStates());
496
+ protectedStates.add(state);
497
+ await this.evictUnusedAds(protectedStates);
498
+ if ([...this.slots.values()].filter((slot) => this.occupiesNativeAd(slot)).length >= MAX_NATIVE_ADS) {
499
+ throw new Error('Native ad capacity is currently in use by visible slots');
500
+ }
501
+ await this.loadState(state);
502
+ await this.requestPlacementUpdate();
503
+ });
504
+ }
505
+ /** Immediately hides this feed's overlays until {@link resume} is called. */
506
+ async pause() {
507
+ this.assertActive();
508
+ this.paused = true;
509
+ this.layoutInvalidated = true;
510
+ if (!(await this.requestPlacementUpdate())) {
511
+ throw new Error('Failed to hide native ad placements');
512
+ }
513
+ }
514
+ /** Re-evaluates slots and restores eligible overlays after the viewport settles. */
515
+ resume() {
516
+ this.assertActive();
517
+ this.paused = false;
518
+ this.scheduleEvaluation();
519
+ }
520
+ /** Hides stale overlays and remeasures after an application-driven layout change. */
521
+ async invalidateLayout() {
522
+ this.assertActive();
523
+ for (const state of this.slots.values())
524
+ state.lastPlacement = undefined;
525
+ this.layoutInvalidated = true;
526
+ this.scheduleEvaluation();
527
+ if (!(await this.requestPlacementUpdate())) {
528
+ throw new Error('Failed to hide native ad placements');
529
+ }
530
+ }
531
+ async destroy() {
532
+ var _a, _b, _c;
533
+ if (!this.destroyed) {
534
+ this.destroyed = true;
535
+ feeds.delete(this.options.feedId);
536
+ document.removeEventListener('scroll', this.handleViewportMotion, true);
537
+ for (const root of this.scrollRoots) {
538
+ root.removeEventListener('scroll', this.handleViewportMotion, true);
539
+ }
540
+ this.scrollRoots.clear();
541
+ document.removeEventListener('touchmove', this.handleViewportMotion, true);
542
+ document.removeEventListener('wheel', this.handleViewportMotion, true);
543
+ window.removeEventListener('resize', this.handleViewportMotion);
544
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', this.handleViewportMotion);
545
+ document.removeEventListener('visibilitychange', this.handleVisibilityChange);
546
+ document.removeEventListener('load', this.handleViewportMotion, true);
547
+ if (this.settleTimer) {
548
+ clearTimeout(this.settleTimer);
549
+ }
550
+ if (this.placementFrame !== undefined) {
551
+ cancelAnimationFrame(this.placementFrame);
552
+ this.placementFrame = undefined;
553
+ }
554
+ (_b = this.intersectionObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
555
+ (_c = this.resizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
556
+ }
557
+ if (this.destroyTask) {
558
+ return this.destroyTask;
559
+ }
560
+ this.destroyTask = this.destroyResources();
561
+ try {
562
+ await this.destroyTask;
563
+ }
564
+ finally {
565
+ this.destroyTask = undefined;
566
+ }
567
+ }
568
+ schedulePlacementUpdate() {
569
+ if (this.destroyed || this.placementFrame !== undefined) {
570
+ return;
571
+ }
572
+ this.placementFrame = requestAnimationFrame(() => {
573
+ this.placementFrame = undefined;
574
+ void this.requestPlacementUpdate(true);
575
+ });
576
+ }
577
+ updateScrollRoots() {
578
+ const roots = new Set();
579
+ for (const element of this.elementSlots.keys()) {
580
+ for (const ancestor of [element, ...nativeAdAncestors(element)]) {
581
+ const root = ancestor.getRootNode();
582
+ if (root instanceof ShadowRoot)
583
+ roots.add(root);
584
+ }
585
+ }
586
+ for (const root of this.scrollRoots) {
587
+ if (!roots.has(root)) {
588
+ root.removeEventListener('scroll', this.handleViewportMotion, true);
589
+ this.scrollRoots.delete(root);
590
+ }
591
+ }
592
+ for (const root of roots) {
593
+ if (!this.scrollRoots.has(root)) {
594
+ // Element scroll events do not cross a shadow boundary.
595
+ root.addEventListener('scroll', this.handleViewportMotion, true);
596
+ this.scrollRoots.add(root);
597
+ }
598
+ }
599
+ }
600
+ scheduleEvaluation() {
601
+ if (this.destroyed) {
602
+ return;
603
+ }
604
+ if (this.settleTimer) {
605
+ clearTimeout(this.settleTimer);
606
+ }
607
+ this.settleTimer = setTimeout(() => {
608
+ this.layoutInvalidated = false;
609
+ void this.runOperation(async () => {
610
+ await this.evaluate();
611
+ });
612
+ }, SCROLL_SETTLE_MS);
613
+ }
614
+ async evaluate() {
615
+ if (this.destroyed || this.paused || document.hidden) {
616
+ return;
617
+ }
618
+ const visibleStates = this.getVisibleStates();
619
+ for (const state of visibleStates) {
620
+ state.lastUsed = Date.now();
621
+ }
622
+ await this.evictUnusedAds(new Set(visibleStates));
623
+ const occupied = [...this.slots.values()].filter((state) => this.occupiesNativeAd(state)).length;
624
+ const loadable = visibleStates
625
+ .filter((state) => state.status === 'idle')
626
+ .slice(0, Math.max(0, MAX_NATIVE_ADS - occupied));
627
+ await Promise.allSettled(loadable.map((state) => this.loadState(state)));
628
+ await this.requestPlacementUpdate();
629
+ }
630
+ async loadState(state) {
631
+ var _a;
632
+ if (state.status !== 'idle' || !bridge) {
633
+ return;
634
+ }
635
+ state.status = 'loading';
636
+ const loadVersion = ++state.loadVersion;
637
+ try {
638
+ await bridge.loadNativeAd(Object.assign({ feedId: this.options.feedId, sessionId: this.sessionId, slotKey: state.slotKey, template: (_a = this.options.template) !== null && _a !== void 0 ? _a : exports.NativeAdTemplate.Medium, style: this.options.style, adId: this.options.adId, isTesting: this.options.isTesting, npa: this.options.npa }, (state.projectionSelector ? { projectionSelector: state.projectionSelector } : {})));
639
+ if (state.loadVersion === loadVersion) {
640
+ state.status = 'loaded';
641
+ state.lastUsed = Date.now();
642
+ }
643
+ }
644
+ catch (error) {
645
+ if (state.loadVersion === loadVersion) {
646
+ state.status = 'failed';
647
+ }
648
+ throw error;
649
+ }
650
+ }
651
+ async evictUnusedAds(visibleStates) {
652
+ const occupied = [...this.slots.values()].filter((state) => this.occupiesNativeAd(state));
653
+ const requestedLoads = [...visibleStates].filter((state) => state.status === 'idle').length;
654
+ const evictionCount = Math.max(0, occupied.length + Math.min(requestedLoads, MAX_NATIVE_ADS) - MAX_NATIVE_ADS);
655
+ const evicted = occupied
656
+ .filter((state) => !visibleStates.has(state))
657
+ .sort((left, right) => left.lastUsed - right.lastUsed)
658
+ .slice(0, evictionCount);
659
+ await Promise.allSettled(evicted.map((state) => this.removeStateAd(state)));
660
+ const detached = [...this.slots.values()]
661
+ .filter((state) => !state.element && !this.occupiesNativeAd(state))
662
+ .sort((left, right) => right.lastUsed - left.lastUsed);
663
+ for (const state of detached.slice(MAX_NATIVE_ADS)) {
664
+ this.slots.delete(state.slotKey);
665
+ }
666
+ }
667
+ occupiesNativeAd(state) {
668
+ return ['loading', 'loaded', 'removing', 'removeFailed'].includes(state.status);
669
+ }
670
+ getVisibleStates() {
671
+ return [...this.slots.values()].filter((state) => {
672
+ var _a;
673
+ if (this.reuseProjectedPlacement(state))
674
+ return state.intersecting && !!((_a = state.lastPlacement) === null || _a === void 0 ? void 0 : _a.visible);
675
+ const measured = state.element && state.intersecting ? measureNativeAdSlot(state.element) : undefined;
676
+ return Boolean(measured && this.isSupportedSize(measured));
677
+ });
678
+ }
679
+ isSupportedSize(measured) {
680
+ var _a, _b;
681
+ const minimumHeight = ((_a = this.options.template) !== null && _a !== void 0 ? _a : exports.NativeAdTemplate.Medium) === exports.NativeAdTemplate.Small
682
+ ? MIN_SMALL_SLOT_HEIGHT
683
+ : MIN_MEDIUM_SLOT_HEIGHT;
684
+ const minimumWidth = ((_b = this.options.template) !== null && _b !== void 0 ? _b : exports.NativeAdTemplate.Medium) === exports.NativeAdTemplate.Small
685
+ ? MIN_SMALL_SLOT_WIDTH
686
+ : MIN_MEDIUM_SLOT_WIDTH;
687
+ return measured.rect.width >= minimumWidth && measured.rect.height >= minimumHeight;
688
+ }
689
+ async removeStateAd(state) {
690
+ if (state.status === 'removing') {
691
+ return;
692
+ }
693
+ if (!bridge || state.status === 'idle' || state.status === 'failed') {
694
+ state.status = 'idle';
695
+ return;
696
+ }
697
+ state.status = 'removing';
698
+ const removeVersion = ++state.loadVersion;
699
+ await this.requestPlacementUpdate();
700
+ try {
701
+ await bridge.removeNativeAd({
702
+ feedId: this.options.feedId,
703
+ sessionId: this.sessionId,
704
+ slotKey: state.slotKey,
705
+ });
706
+ if (state.loadVersion === removeVersion) {
707
+ state.status = 'idle';
708
+ }
709
+ }
710
+ catch (error) {
711
+ if (state.loadVersion === removeVersion) {
712
+ state.status = 'removeFailed';
713
+ }
714
+ throw error;
715
+ }
716
+ }
717
+ runOperation(operation) {
718
+ const result = this.operationTask.then(operation);
719
+ this.operationTask = result.catch(() => undefined);
720
+ return result;
721
+ }
722
+ async destroyResources() {
723
+ var _a;
724
+ await Promise.all([
725
+ ...[...this.listenerHandles].map((handle) => handle.remove()),
726
+ ...(this.nativeStarted && bridge
727
+ ? [bridge.destroyNativeAdFeed({ feedId: this.options.feedId, sessionId: this.sessionId })]
728
+ : []),
729
+ ]);
730
+ this.nativeStarted = false;
731
+ this.listenerHandles.clear();
732
+ for (const state of this.slots.values())
733
+ (_a = state.placementBinding) === null || _a === void 0 ? void 0 : _a.dispose();
734
+ this.slots.clear();
735
+ this.elementSlots.clear();
736
+ }
737
+ reuseProjectedPlacement(state) {
738
+ var _a, _b, _c;
739
+ return Boolean(((_a = state.placementBinding) === null || _a === void 0 ? void 0 : _a.projected) &&
740
+ ((_b = state.lastPlacement) === null || _b === void 0 ? void 0 : _b.visible) &&
741
+ ((_c = state.element) === null || _c === void 0 ? void 0 : _c.isConnected) &&
742
+ !this.paused &&
743
+ !this.destroyed &&
744
+ !document.hidden &&
745
+ state.status === 'loaded' &&
746
+ state.lastPlacement.generation === state.generation);
747
+ }
748
+ measurePlacement(state) {
749
+ const measured = state.element ? measureNativeAdSlot(state.element, this.nativeScrollElement) : undefined;
750
+ return {
751
+ feedId: this.options.feedId,
752
+ slotKey: state.slotKey,
753
+ generation: state.generation,
754
+ visible: Boolean(!this.paused &&
755
+ !this.destroyed &&
756
+ state.status === 'loaded' &&
757
+ (!this.layoutInvalidated || this.options.androidScrollSnapshot) &&
758
+ measured &&
759
+ this.isSupportedSize(measured) &&
760
+ !document.hidden),
761
+ rect: measured === null || measured === void 0 ? void 0 : measured.rect,
762
+ clipRect: measured === null || measured === void 0 ? void 0 : measured.clipRect,
763
+ };
764
+ }
765
+ requestPlacementUpdate(allowDirect = false) {
766
+ this.updateDirty = true;
767
+ this.placementAcknowledgementRequired || (this.placementAcknowledgementRequired = !allowDirect);
768
+ if (!this.placementUpdateTask) {
769
+ this.placementUpdateTask = Promise.resolve().then(() => this.flushPlacementUpdates());
770
+ }
771
+ return this.placementUpdateTask;
772
+ }
773
+ async flushPlacementUpdates() {
774
+ if (!bridge || this.destroyed) {
775
+ return true;
776
+ }
777
+ try {
778
+ while (this.updateDirty && !this.destroyed) {
779
+ this.updateDirty = false;
780
+ const allowDirect = !this.placementAcknowledgementRequired;
781
+ this.placementAcknowledgementRequired = false;
782
+ const retainedSlots = new Set();
783
+ const placements = [...this.slots.values()]
784
+ .filter((state) => state.status === 'loaded')
785
+ .map((state) => {
786
+ if (this.reuseProjectedPlacement(state)) {
787
+ retainedSlots.add(state.slotKey);
788
+ return state.lastPlacement;
789
+ }
790
+ return (state.lastPlacement = this.measurePlacement(state));
791
+ });
792
+ const scrollContainer = this.nativeScrollElement
793
+ ? measureNativeAdScrollContainer(this.nativeScrollElement)
794
+ : undefined;
795
+ const serializedPlacements = JSON.stringify({ placements, scrollContainer });
796
+ if (serializedPlacements === this.lastPlacements && (allowDirect || !this.lastPlacementWasDirect)) {
797
+ continue;
798
+ }
799
+ try {
800
+ const batch = Object.assign({ feedId: this.options.feedId, sessionId: this.sessionId, sequence: ++this.placementSequence, placements: placements.map((placement) => {
801
+ return retainedSlots.has(placement.slotKey)
802
+ ? {
803
+ feedId: placement.feedId,
804
+ slotKey: placement.slotKey,
805
+ generation: placement.generation,
806
+ visible: true,
807
+ retain: true,
808
+ }
809
+ : placement;
810
+ }) }, (scrollContainer ? { scrollContainer } : {}));
811
+ const channel = core.Capacitor.getPlatform() === 'android'
812
+ ? window
813
+ .capacitorAdMobPlacements
814
+ : undefined;
815
+ let sentDirectly = false;
816
+ if (allowDirect && channel) {
817
+ try {
818
+ channel.postMessage(JSON.stringify(batch));
819
+ sentDirectly = true;
820
+ }
821
+ catch (_a) {
822
+ // Keep the acknowledged bridge available if the direct channel fails.
823
+ }
824
+ }
825
+ if (!sentDirectly)
826
+ await bridge.updateNativeAdPlacements(batch);
827
+ this.lastPlacementWasDirect = sentDirectly;
828
+ this.lastPlacements = serializedPlacements;
829
+ }
830
+ catch (_b) {
831
+ this.lastPlacements = undefined;
832
+ // Retry on the next scroll, resize, or lifecycle update without
833
+ // creating an unhandled rejection from this fire-and-forget task.
834
+ this.updateDirty = true;
835
+ return false;
836
+ }
837
+ }
838
+ return true;
839
+ }
840
+ catch (_c) {
841
+ this.updateDirty = true;
842
+ return false;
843
+ }
844
+ finally {
845
+ this.placementUpdateTask = undefined;
846
+ }
847
+ }
848
+ assertActive() {
849
+ if (this.destroyed) {
850
+ throw new Error(`Native ad feed has been destroyed: ${this.options.feedId}`);
851
+ }
852
+ }
853
+ }
854
+ const configureNativeAdBridge = (adMobBridge) => {
855
+ bridge = adMobBridge;
856
+ };
857
+
5
858
  exports.MaxAdContentRating = void 0;
6
859
  (function (MaxAdContentRating) {
7
860
  /**
@@ -330,9 +1183,22 @@ exports.AppOpenAdPluginEvents = void 0;
330
1183
  AppOpenAdPluginEvents["AdImpression"] = "appOpenAdImpression";
331
1184
  })(exports.AppOpenAdPluginEvents || (exports.AppOpenAdPluginEvents = {}));
332
1185
 
333
- const AdMob = core.registerPlugin('AdMob', {
1186
+ exports.NativeAdPluginEvents = void 0;
1187
+ (function (NativeAdPluginEvents) {
1188
+ NativeAdPluginEvents["Loaded"] = "nativeAdLoaded";
1189
+ NativeAdPluginEvents["FailedToLoad"] = "nativeAdFailedToLoad";
1190
+ NativeAdPluginEvents["Clicked"] = "nativeAdClicked";
1191
+ NativeAdPluginEvents["AdImpression"] = "nativeAdImpression";
1192
+ NativeAdPluginEvents["Opened"] = "nativeAdOpened";
1193
+ NativeAdPluginEvents["Closed"] = "nativeAdClosed";
1194
+ NativeAdPluginEvents["AdPaid"] = "nativeAdPaid";
1195
+ })(exports.NativeAdPluginEvents || (exports.NativeAdPluginEvents = {}));
1196
+
1197
+ const nativeAdBridge = core.registerPlugin('AdMob', {
334
1198
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.AdMobWeb()),
335
1199
  });
1200
+ const AdMob = nativeAdBridge;
1201
+ configureNativeAdBridge(nativeAdBridge);
336
1202
 
337
1203
  /**
338
1204
  * For more information:
@@ -408,6 +1274,21 @@ class AdMobWeb extends core.WebPlugin {
408
1274
  async removeBanner() {
409
1275
  console.log('removeBanner');
410
1276
  }
1277
+ async startNativeAdFeed() {
1278
+ throw new Error('Native ads are only available on iOS and Android');
1279
+ }
1280
+ async destroyNativeAdFeed(options) {
1281
+ console.log('destroyNativeAdFeed', options);
1282
+ }
1283
+ async loadNativeAd() {
1284
+ throw new Error('Native ads are only available on iOS and Android');
1285
+ }
1286
+ async updateNativeAdPlacements(options) {
1287
+ console.log('updateNativeAdPlacements', options);
1288
+ }
1289
+ async removeNativeAd(options) {
1290
+ console.log('removeNativeAd', options);
1291
+ }
411
1292
  async prepareInterstitial(options) {
412
1293
  console.log('prepareInterstitial', options);
413
1294
  return {
@@ -467,4 +1348,5 @@ var web = /*#__PURE__*/Object.freeze({
467
1348
  });
468
1349
 
469
1350
  exports.AdMob = AdMob;
1351
+ exports.NativeAdFeed = NativeAdFeed;
470
1352
  //# sourceMappingURL=plugin.cjs.js.map