prebid-universal-creative 1.17.1 → 1.18.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/.circleci/config.yml +1 -1
- package/README.md +74 -7
- package/browsers.json +12 -12
- package/dist/amp.js +3 -3
- package/dist/banner.js +3 -3
- package/dist/creative.js +3 -3
- package/dist/load-cookie-with-consent.html +1 -1
- package/dist/load-cookie.html +1 -1
- package/dist/main.max.js +3172 -0
- package/dist/mobile.js +3 -3
- package/dist/native-render.js +3 -3
- package/dist/native-trk.js +3 -3
- package/dist/native.js +3 -3
- package/dist/uid.js +3 -3
- package/dist/video.js +3 -3
- package/gulpfile.js +35 -11
- package/karma.conf.maker.js +22 -10
- package/package.json +15 -15
- package/src/cookieSync.js +2 -0
- package/src/cookieSyncWithConsent.js +2 -0
- package/src/mobileAndAmpRender.js +4 -3
- package/src/nativeAssetManager.js +1 -1
- package/src/nativeORTBTrackerManager.js +0 -2
- package/src/nativeTrackerManager.js +1 -1
- package/src/postscribeRender.js +71 -0
- package/src/renderingManager.js +1 -1
- package/test/spec/mobileAndAmpRender_spec.js +89 -96
- package/test/spec/nativeAssetManager_spec.js +20 -8
- package/test/spec/nativeORTBTrackerManager_spec.js +2 -2
- package/test/spec/nativeTrackerManager_spec.js +3 -8
- package/test/spec/renderingManager_spec.js +4 -24
- package/test/spec/uid_spec.js +10 -29
- package/test/test_index.js +1 -1
- package/webpack.conf.js +12 -15
- package/dist/0df2612ebfffd5ad651a.max.js +0 -1050
- package/src/adHtmlRender.js +0 -15
package/.circleci/config.yml
CHANGED
package/README.md
CHANGED
|
@@ -11,8 +11,44 @@ Prebid Universal Creative is a javascript api to render multiple formats. This f
|
|
|
11
11
|
|
|
12
12
|
You can find a detailed explanations on the [Prebid Universal Creative](https://docs.prebid.org/overview/prebid-universal-creative.html) and [AdOps - Add Creative](https://docs.prebid.org/adops/setting-up-prebid-with-the-appnexus-ad-server.html#step-3-add-creatives) pages.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### File Selection for Different Platforms
|
|
15
15
|
|
|
16
|
+
**Generic template:**
|
|
17
|
+
```html
|
|
18
|
+
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/PUCFILE"></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Replace "PUCFILE" with:**
|
|
22
|
+
- **Prebid.js**: `%%PATTERN:hb_format%%.js` - This dynamically loads the appropriate creative file based on the ad format
|
|
23
|
+
- **Prebid Mobile**: `mobile.js` or `creative.js` - the latter is recommended so that the creative could be reused for both desktop and mobile.
|
|
24
|
+
|
|
25
|
+
> **Important Note about File Compatibility:**
|
|
26
|
+
> - Both `creative.js` and `mobile.js` work for mobile implementations
|
|
27
|
+
> - `creative.js` is more general and **will work for both desktop and mobile**
|
|
28
|
+
> - `banner.js`, `native.js`, `video.js` - contain **only desktop creative rendering code** and do not support mobile
|
|
29
|
+
|
|
30
|
+
**Example for Prebid Mobile:**
|
|
31
|
+
```html
|
|
32
|
+
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
|
|
33
|
+
<script>
|
|
34
|
+
var ucTagData = {};
|
|
35
|
+
ucTagData.adServerDomain = "";
|
|
36
|
+
ucTagData.pubUrl = "%%PATTERN:url%%";
|
|
37
|
+
ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;
|
|
38
|
+
ucTagData.hbPb = "%%PATTERN:hb_pb%%";
|
|
39
|
+
ucTagData.hbFormat = "%%PATTERN:hb_format%%";
|
|
40
|
+
ucTagData.adId = "%%PATTERN:hb_adid%%";
|
|
41
|
+
ucTagData.requestAllAssets = true;
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
ucTag.renderAd(document, ucTagData);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.log(e);
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Example for Prebid.js (Desktop/Web):**
|
|
16
52
|
```html
|
|
17
53
|
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/%%PATTERN:hb_format%%.js"></script>
|
|
18
54
|
<script>
|
|
@@ -35,17 +71,49 @@ You can find a detailed explanations on the [Prebid Universal Creative](https://
|
|
|
35
71
|
</script>
|
|
36
72
|
```
|
|
37
73
|
|
|
38
|
-
Creative created like described above will work for
|
|
74
|
+
Creative created like described above will work for the following formats:
|
|
39
75
|
- amp
|
|
40
76
|
- banner
|
|
41
|
-
- mobile
|
|
42
77
|
- native
|
|
43
78
|
- video (outstream video)
|
|
44
79
|
|
|
45
|
-
Which means that the same creative code can be reused on
|
|
46
|
-
|
|
80
|
+
Universal creative library is loaded with `%%PATTERN:hb_format%%.js` path. For each `hb_format` targeting key-value, separate `.js` library will be loaded. Which means that the same creative code can be reused for any format, however unfortunately not on mobile, because `mobile` is not one of the values that `hb_format` keyword could take.
|
|
81
|
+
|
|
82
|
+
> **important:** If you’re using the `Send All Bids` scenario (where every bidder has a separate order), the creative and targeting will be different from the example shown here. See [Send All Bids](https://docs.prebid.org/adops/send-all-vs-top-price.html#send-all-bids) for details and an example below.
|
|
83
|
+
|
|
84
|
+
### Send All Bids Configuration
|
|
85
|
+
|
|
86
|
+
For the "Send All Bids" scenario, use this template:
|
|
87
|
+
|
|
88
|
+
```html
|
|
89
|
+
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/PUCFILE"></script>
|
|
90
|
+
<script>
|
|
91
|
+
var ucTagData = {};
|
|
92
|
+
ucTagData.adServerDomain = "";
|
|
93
|
+
ucTagData.pubUrl = "%%PATTERN:url%%";
|
|
94
|
+
ucTagData.adId = "%%PATTERN:hb_adid_BIDDERCODE%%";
|
|
95
|
+
ucTagData.cacheHost = "%%PATTERN:hb_cache_host_BIDDERCODE%%";
|
|
96
|
+
ucTagData.cachePath = "%%PATTERN:hb_cache_path_BIDDERCODE%%";
|
|
97
|
+
ucTagData.uuid = "%%PATTERN:hb_cache_id_BIDDERCODE%%";
|
|
98
|
+
ucTagData.mediaType = "%%PATTERN:hb_format_BIDDERCODE%%";
|
|
99
|
+
ucTagData.env = "%%PATTERN:hb_env%%";
|
|
100
|
+
ucTagData.size = "%%PATTERN:hb_size_BIDDERCODE%%";
|
|
101
|
+
ucTagData.hbPb = "%%PATTERN:hb_pb_BIDDERCODE%%";
|
|
102
|
+
// mobileResize needed for mobile GAM only
|
|
103
|
+
ucTagData.mobileResize = "hb_size:%%PATTERN:hb_size_BIDDERCODE%%";
|
|
104
|
+
// these next two are only needed for native creatives but are ok for banner
|
|
105
|
+
ucTagData.requestAllAssets = true;
|
|
106
|
+
ucTagData.clickUrlUnesc = "%%CLICK_URL_UNESC%%";
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
ucTag.renderAd(document, ucTagData);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
console.log(e);
|
|
112
|
+
}
|
|
113
|
+
</script>
|
|
114
|
+
```
|
|
47
115
|
|
|
48
|
-
|
|
116
|
+
Replace "PUCFILE" as described above. Note the use of `BIDDERCODE` suffix in the targeting patterns, this implies that each bidder has separate line items with bidder-specific keyword targeting.
|
|
49
117
|
|
|
50
118
|
## Install
|
|
51
119
|
|
|
@@ -126,4 +194,3 @@ This project is in its infancy, and many things can be improved.
|
|
|
126
194
|
Report bugs, request features, and suggest improvements [on Github](https://github.com/prebid/prebid-universal-creative/issues).
|
|
127
195
|
|
|
128
196
|
Or better yet, [open a pull request](https://github.com/prebid/prebid-universal-creative/compare) with the changes you'd like to see.
|
|
129
|
-
|
package/browsers.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"bs_edge_latest_windows_11": {
|
|
3
3
|
"base": "BrowserStack",
|
|
4
|
-
"os_version": "
|
|
4
|
+
"os_version": "11",
|
|
5
5
|
"browser": "edge",
|
|
6
6
|
"browser_version": "latest",
|
|
7
7
|
"device": null,
|
|
8
8
|
"os": "Windows"
|
|
9
9
|
},
|
|
10
|
-
"
|
|
10
|
+
"bs_chrome_latest_windows_11": {
|
|
11
11
|
"base": "BrowserStack",
|
|
12
|
-
"os_version": "
|
|
12
|
+
"os_version": "11",
|
|
13
13
|
"browser": "chrome",
|
|
14
14
|
"browser_version": "latest",
|
|
15
15
|
"device": null,
|
|
16
16
|
"os": "Windows"
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"bs_chrome_113_windows_10": {
|
|
19
19
|
"base": "BrowserStack",
|
|
20
20
|
"os_version": "10",
|
|
21
21
|
"browser": "chrome",
|
|
22
|
-
"browser_version": "
|
|
22
|
+
"browser_version": "113.0",
|
|
23
23
|
"device": null,
|
|
24
24
|
"os": "Windows"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"bs_firefox_latest_windows_11": {
|
|
27
27
|
"base": "BrowserStack",
|
|
28
|
-
"os_version": "
|
|
28
|
+
"os_version": "11",
|
|
29
29
|
"browser": "firefox",
|
|
30
30
|
"browser_version": "latest",
|
|
31
31
|
"device": null,
|
|
32
32
|
"os": "Windows"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"bs_safari_latest_mac": {
|
|
35
35
|
"base": "BrowserStack",
|
|
36
|
-
"os_version": "
|
|
36
|
+
"os_version": "Tahoe",
|
|
37
37
|
"browser": "safari",
|
|
38
38
|
"browser_version": "latest",
|
|
39
39
|
"device": null,
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"bs_safari_15_catalina": {
|
|
43
43
|
"base": "BrowserStack",
|
|
44
|
-
"os_version": "
|
|
44
|
+
"os_version": "Monterey",
|
|
45
45
|
"browser": "safari",
|
|
46
|
-
"browser_version": "
|
|
46
|
+
"browser_version": "15.6",
|
|
47
47
|
"device": null,
|
|
48
48
|
"os": "OS X"
|
|
49
49
|
}
|
package/dist/amp.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* prebid-universal-creative v1.
|
|
2
|
-
Updated :
|
|
3
|
-
!function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=function(e,t){return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},t)).forEach(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e,2),n=t[0],r=t[1];i.setAttribute(n,r)}),i}(document,{height:e,width:t})},t.b=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(e,t){Object(r.a)(t)}},function(e,t,n){"use strict";t.a=function(e){var t=Object(f.g)(e),n=t.cacheHost,r=t.cachePath,i=t.uuid,o=t.size,a=t.hbPb,c="Prebid_";if((i=i||"").substr(0,c.length)===c)!function(e){var t=window.localStorage.getItem(e);p(!0)(t)}(i),g(o);else{var u="".concat(function(e,t){var n=void 0===t||""===t?b:t;return"https://".concat(void 0===e||""===e?s:e).concat(n)}(n,r),"?uuid=").concat(i);g(o),Object(f.f)(u,p(Object(d.a)(t.env),a))}};var f=n(3),d=n(4),l=n(0),h=n(5),s="prebid.adnxs.com",b="/pbc/v1/cache";function g(e){if(e){var t=e.split("x").map(Number);!function(r,i){var o=window.innerWidth,a=window.innerHeight;if(o!==r||a!==i){if(Object(d.b)(window)){window.$sf.ext.register(r,i,function(e){var t=r-o,n=i-a;window.$sf.ext.expand({r:t,b:n,push:!0})})}window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:i},"*")}}(t[0],t[1])}else console.log("Targeting key hb_size not found to resize creative")}function p(d,s){return function(e){var t=function(e){var t;try{t=JSON.parse(e)}catch(e){console.log("Error parsing response from cache host: ".concat(e))}return t}(e),n=t.price||s,r=Object(f.c)(t),i=t.width?t.width:t.w,o=t.height?t.height:t.h;if(t.wurl&&Object(f.h)(decodeURIComponent(t.wurl)),t.adm){if(t.adm=n?t.adm.replace("${AUCTION_PRICE}",n):t.adm.replace("${AUCTION_PRICE}",""),r+=d?v(t.adm,i,o):t.adm,t.nurl&&(r+=Object(f.a)(decodeURIComponent(t.nurl))),t.burl){var a=function(){Object(f.h)(t.burl)};if(d)Object(f.e)(window,"mraid.js",function(){!function(t){function n(e){0<e&&(mraid.removeEventListener("exposureChange",n),t())}function r(e){e&&(mraid.removeEventListener("viewableChange",r),t())}function i(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",n):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?t():mraid.addEventListener("viewableChange",r))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function e(){mraid.removeEventListener("ready",e),i()}):i(),!0)}(a)&&a()},a);else a()}Object(h.a)(r)}else if(t.nurl)if(d){r+=v(Object(f.e)(window,t.nurl).outerHTML,i,o),Object(h.a)(r)}else{var c=t.nurl,u=Object(f.b)(t);Object(l.b)(u,document,"body"),Object(f.i)(c,i,o)}}}function v(e,t,n){var r=Object(f.d)();return'<div id="'.concat(r,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(r,'_inner" style="margin: 0 auto; width:').concat(t,"px; height:").concat(n,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(e,"</div>\n </div>")}},function(e,t,n){"use strict";t.h=function(e,t){var n=new Image;t&&"function"==typeof t&&(n.addEventListener("load",t),n.addEventListener("error",t));n.src=e},t.a=function(e){if(!e)return"";var t=encodeURI(e);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(t,'"></div>')},t.i=function(e,t,n){var r=i.a(n,t);r.src=e,document.body.appendChild(r)},t.f=function(e,t){var n=new XMLHttpRequest;n.addEventListener("load",function(){t(n.responseText)}),n.open("GET",e),n.send()},t.d=function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},t.e=function(e,t,n,r){var i=e.document,o=i.createElement("script");o.type="text/javascript",n&&"function"==typeof n&&(o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,n())}:o.onload=function(){n()});r&&"function"==typeof r&&(o.onerror=function(){r()});o.src=t;var a=i.getElementsByTagName("head");(a=a.length?a:i.getElementsByTagName("body")).length&&(a=a[0]).insertBefore(o,a.firstChild);return o},t.b=r,t.c=function(e){var t=r(e),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.g=function(t){var n={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!t[e]||!(function(e){return o(e,"Object")}(t[e])&&0<Object.keys(t[e]).length||a(t[e])&&""!==t[e]))}var r={},i={};e("targetingMap")?i=function(t){var n={};return Object.keys(t).forEach(function(e){Array.isArray(t[e])&&0<t[e].length&&(n[e]=t[e][0])}),n}(t.targetingMap):e("targetingKeywords")&&(i=function(e){var i={},t=e.split(",");return 0<t.length&&t.forEach(function(e){var t=e.split(":");if(2===t.length){var n=t[0],r=t[1];i[n]=r}}),i}(t.targetingKeywords));return function(t){Object.keys(t).forEach(function(e){r[n[e]||e]=t[e]})}(i),Object.keys(t).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&a(t[e])&&""!==t[e]&&(r[e]=t[e])}),r};var i=n(0);function r(e){return document.createComment("Creative ".concat(e.crid," served by Prebid.js Header Bidding"))}function o(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function a(e){return o(e,"String")}},function(e,t,n){"use strict";t.b=function(e){return!(!e.$sf||!e.$sf.ext)},t.a=function(e){return e&&"mobile-app"===e}},function(e,t,n){"use strict";function r(e){try{var t=document.createRange().createContextualFragment(e);document.body.append(t)}catch(e){console.error(e)}}t.a=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r;e=e.replace(/\<(\?xml|(\!DOCTYPE[^\>\[]+(\[[^\]]+)?))+[^>]+\>/gi,""),t(e)}}]);
|
|
1
|
+
/* prebid-universal-creative v1.18.0
|
|
2
|
+
Updated : 2026-07-14 */
|
|
3
|
+
!function(){var n=[,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderAmpOrMobileAd=function(t){var e=(0,f.transformAuctionTargetingData)(t),r=e.cacheHost,n=e.cachePath,o=e.uuid,i=e.size,a=e.hbPb,s="Prebid_";if((o=o||"").substr(0,s.length)===s)!function(t){var e=window.localStorage.getItem(t);m(!0)(e)}(o),y(i);else{var c="".concat(function(t,e){var r=void 0===e||""===e?h:e;return"https://".concat(void 0===t||""===t?l:t).concat(r)}(r,n),"?uuid=").concat(o);y(i),(0,f.sendRequest)(c,m((0,u.isMobileApp)(e.env),a))}};var f=r(2),u=r(4),p=r(3),d=r(5),l="prebid.adnxs.com",h="/pbc/v1/cache";function y(t){if(t){var e=t.split("x").map(Number);!function(r,n){var o=window.innerWidth,i=window.innerHeight;if(o!==r||i!==n){if((0,u.isSafeFrame)(window)){window.$sf.ext.register(r,n,function(){var t=r-o,e=n-i;window.$sf.ext.expand({r:t,b:e,push:!0})})}window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:n},"*")}}(e[0],e[1])}else console.log("Targeting key hb_size not found to resize creative")}function m(u,l){return function(t){var e=function(t){var e;try{e=JSON.parse(t)}catch(t){console.log("Error parsing response from cache host: ".concat(t))}return e}(t),r=e.price||l,n=(0,f.getCreativeCommentMarkup)(e),o=e.width?e.width:e.w,i=e.height?e.height:e.h;if(e.wurl&&(0,f.triggerPixel)(decodeURIComponent(e.wurl)),e.adm){if(e.adm=r?e.adm.replace("${AUCTION_PRICE}",r):e.adm.replace("${AUCTION_PRICE}",""),n+=u?g(e.adm,o,i):e.adm,e.nurl&&(n+=(0,f.createTrackPixelHtml)(decodeURIComponent(e.nurl))),e.burl){var a=function(){(0,f.triggerPixel)(e.burl)};u?(0,f.loadScript)(window,"mraid.js",function(){!function(e){function r(t){0<t&&(mraid.removeEventListener("exposureChange",r),e())}function n(t){t&&(mraid.removeEventListener("viewableChange",n),e())}function o(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",r):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?e():mraid.addEventListener("viewableChange",n))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function t(){mraid.removeEventListener("ready",t),o()}):o(),!0)}(a)&&a()},a):a()}(0,d.writeAdHtml)(n)}else if(e.nurl)if(u){n+=g((0,f.loadScript)(window,e.nurl).outerHTML,o,i),(0,d.writeAdHtml)(n)}else{var s=e.nurl,c=(0,f.getCreativeComment)(e);(0,p.insertElement)(c,document,"body"),(0,f.writeAdUrl)(s,o,i)}}}function g(t,e,r){var n=(0,f.getUUID)();return'<div id="'.concat(n,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(n,'_inner" style="margin: 0 auto; width:').concat(e,"px; height:").concat(r,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(t,"</div>\n </div>")}},function(t,e,r){"use strict";function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.createTrackPixelHtml=function(t){if(!t)return"";var e=encodeURI(t);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(e,'"></div>')},e.getCreativeComment=i,e.getCreativeCommentMarkup=function(t){var e=i(t),r=document.createElement("div");return r.appendChild(e),r.innerHTML},e.getUUID=function(){var r=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"===t?e:3&e|8).toString(16)})},e.loadScript=function(t,e,r,n){var o=t.document,i=o.createElement("script");i.type="text/javascript",r&&"function"==typeof r&&(i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,r())}:i.onload=function(){r()});n&&"function"==typeof n&&(i.onerror=function(){n()});i.src=e;var a=o.getElementsByTagName("head");(a=a.length?a:o.getElementsByTagName("body")).length&&(a=a[0]).insertBefore(i,a.firstChild);return i},e.parseUrl=function(t){var e=document.createElement("a");return e.href=decodeURIComponent(t),{href:e.href,protocol:(e.protocol||"").replace(/:$/,""),hostname:e.hostname,port:+e.port,pathname:e.pathname.replace(/^(?!\/)/,"/"),hash:(e.hash||"").replace(/^#/,""),host:(e.host||window.location.host).replace(/:(443|80)$/,"")}},e.sendRequest=function(t,e){var r=new XMLHttpRequest;r.addEventListener("load",function(){e(r.responseText)}),r.open("GET",t),r.send()},e.transformAuctionTargetingData=function(e){var r={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function t(t){return!(!e[t]||!(function(t){return a(t,"Object")}(e[t])&&0<Object.keys(e[t]).length||s(e[t])&&""!==e[t]))}var n={},o={};t("targetingMap")?o=function(e){var r={};return Object.keys(e).forEach(function(t){Array.isArray(e[t])&&0<e[t].length&&(r[t]=e[t][0])}),r}(e.targetingMap):t("targetingKeywords")&&(o=function(t){var o={},e=t.split(",");return 0<e.length&&e.forEach(function(t){var e=t.split(":");if(2===e.length){var r=e[0],n=e[1];o[r]=n}}),o}(e.targetingKeywords));return function(e){Object.keys(e).forEach(function(t){n[r[t]||t]=e[t]})}(o),Object.keys(e).forEach(function(t){"targetingMap"!==t&&"targetingKeywords"!==t&&s(e[t])&&""!==e[t]&&(n[t]=e[t])}),n},e.triggerPixel=function(t,e){var r=new Image;e&&"function"==typeof e&&(r.addEventListener("load",e),r.addEventListener("error",e));r.src=t},e.writeAdUrl=function(t,e,r){var n=o.getEmptyIframe(r,e);n.src=t,document.body.appendChild(n)};var o=n(r(3));function n(t,e){if("function"==typeof WeakMap)var a=new WeakMap,s=new WeakMap;return(n=function(t,e){if(!e&&t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=c(t)&&"function"!=typeof t)return o;if(r=e?s:a){if(r.has(t))return r.get(t);r.set(t,o)}for(var i in t)"default"!==i&&{}.hasOwnProperty.call(t,i)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,i))&&(n.get||n.set)?r(o,i,n):o[i]=t[i]);return o})(t,e)}function i(t){return document.createComment("Creative ".concat(t.crid," served by Prebid.js Header Bidding"))}function a(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function s(t){return a(t,"String")}},function(t,e){"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function r(){return(r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)!{}.hasOwnProperty.call(r,n)||(t[n]=r[n])}return t}).apply(null,arguments)}function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=t.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},e)).forEach(function(t){var e=i(t,2),r=e[0],n=e[1];o.setAttribute(r,n)}),o}Object.defineProperty(e,"__esModule",{value:!0}),e.getEmptyIframe=function(t,e){return o(document,{height:t,width:e})},e.insertElement=function(t,e,r){var n;e=e||document,n=r?e.getElementsByTagName(r):e.getElementsByTagName("head");try{(n=n.length?n:e.getElementsByTagName("body")).length&&(n=n[0]).insertBefore(t,n.firstChild)}catch(t){}},e.makeIframe=o},function(t,e){"use strict";function r(t){return t.top!==t&&!n(t)}function n(t){try{return t.top.location.toString(),!0}catch(t){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.canInspectWindow=n,e.canLocatePrebid=function(t){var e=!1,r=t;for(;!e;){try{if(r.pbjs){e=!0;break}}catch(t){}if(r===window.top)break;r=r.parent}return e},e.isAmp=function(t,e){return"string"==typeof t&&""!==t&&r(e)},e.isCrossDomain=r,e.isMobileApp=function(t){return t&&"mobile-app"===t},e.isSafeFrame=function(t){return!(!t.$sf||!t.$sf.ext)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeAdHtml=function(e){var r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.default;e=e.replace(/<\?xml\b[^>]*(?:\?>|>)/gi,"").replace(/<!doctype\b[^>\[]*(?:\[[^\]]*\][^>]*)?>/gi,"");try{r=function(t){function n(t){if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim()){var e="PUC_NODE_TEXT_".concat(u++,"_").concat(o);c.set(e,t.textContent);var r=s.createElement("span");r.dataset.textId=e,t.parentNode.replaceChild(r,t)}else(function(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()})(t.childNodes).forEach(n)}var o=Date.now(),e="PUC_START_".concat(o),r="PUC_END_".concat(o),i='<div id="'.concat(e,'"></div>'),a='<div id="'.concat(r,'"></div>'),s=(new DOMParser).parseFromString("".concat(i).concat(t).concat(a),"text/html"),c=new Map,u=0,l=s.querySelector("#".concat(e)).nextSibling,f=s.querySelector("#".concat(r));for(;l&&l!==f;)n(l),l=l.nextSibling;return(new XMLSerializer).serializeToString(s).split(i)[1].split(a)[0].replace(/<span data-text-id="(PUC_NODE_TEXT_\d+_\d+)"[^>]*><\/span>/g,function(t,e){return c.get(e)||""}).trim()}(e)}catch(t){console.error("Error normalizing markup:",t.message),r=e}t(document.body,r,{error:console.error})};var n,o=(n=r(6))&&n.__esModule?n:{default:n};function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}},function(t){var e;e=function(){return o={},r.m=n=[function(t,e,r){"use strict";var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.exports=i.default},function(t,e,r){"use strict";e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=h;var n,o=r(2),c=(n=o)&&n.__esModule?n:{default:n},i=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}}(r(4));function u(){}var a={afterAsync:u,afterDequeue:u,afterStreamStart:u,afterWrite:u,autoFix:!0,beforeEnqueue:u,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:u,error:function(t){throw new Error(t.msg)},releaseAsync:!1},l=0,f=[],p=null;function d(){var t=f.shift();if(t){var e=i.last(t);e.afterDequeue(),t.stream=function(t,e,n){(p=new c.default(t,n)).id=l++,p.name=n.name||p.id,h.streams[p.name]=p;var r=t.ownerDocument,o={close:r.close,open:r.open,write:r.write,writeln:r.writeln};function i(t){t=n.beforeWrite(t),p.write(t),n.afterWrite(t)}s(r,{close:u,open:u,write:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return i(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return i(e.join("")+"\n")}});var a=p.win.onerror||u;return p.win.onerror=function(t,e,r){n.error({msg:t+" - "+e+": "+r}),a.apply(p.win,[t,e,r])},p.write(e,function(){s(r,o),p.win.onerror=a,n.done(),p=null,d()}),p}.apply(void 0,t),e.afterStreamStart()}}function h(t,e,r){if(i.isFunction(r))r={done:r};else if("clear"===r)return f=[],p=null,void(l=0);r=i.defaults(r,a);var n=[t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t,e,r];return t.postscribe={cancel:function(){n.stream?n.stream.abort():n[1]=u}},r.beforeEnqueue(n),f.push(n),p||d(),t.postscribe}s(h,{streams:{},queue:f,WriteStream:c.default})},function(t,e,r){"use strict";e.__esModule=!0;var n,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(3),i=(n=o)&&n.__esModule?n:{default:n},a=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}}(r(4));var l="data-ps-",f="ps-style",p="ps-script";function c(t,e){var r=l+e,n=t.getAttribute(r);return a.existy(n)?String(n):n}function u(t,e,r){var n=2<arguments.length&&void 0!==r?r:null,o=l+e;a.existy(n)&&""!==n?t.setAttribute(o,n):t.removeAttribute(o)}var d=(h.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();a.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},h.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},h.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,r=void 0,n=void 0,o=[];(e=this.parser.readToken())&&!(r=a.isScript(e))&&!(n=a.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);0<o.length&&this._writeStaticTokens(o),r&&this._handleScriptToken(e),n&&this._handleStyleToken(e)},h.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},h.prototype._buildChunk=function(t){for(var e=this.actuals.length,r=[],n=[],o=[],i=t.length,a=0;a<i;a++){var s=t[a],c=s.toString();if(r.push(c),s.attrs){if(!/^noscript$/i.test(s.tagName)){var u=e++;n.push(c.replace(/(\/?>)/," "+l+"id="+u+" $1")),s.attrs.id!==p&&s.attrs.id!==f&&o.push("atomicTag"===s.type?"":"<"+s.tagName+" "+l+"proxyof="+u+(s.unary?" />":">"))}}else n.push(c),o.push("endTag"===s.type?c:"")}return{tokens:t,raw:r.join(""),actual:n.join(""),proxy:o.join("")}},h.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];a.existy(t=e.shift());){var r=1===t.nodeType;if(!r||!c(t,"proxyof")){r&&u(this.actuals[c(t,"id")]=t,"id");var n=t.parentNode&&c(t.parentNode,"proxyof");n&&this.actuals[n].appendChild(t)}e.unshift.apply(e,a.toArray(t.childNodes))}},h.prototype._handleScriptToken=function(t){var e=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},h.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",(t=this.options.beforeWriteToken(t))&&this._writeStyleToken(t),e&&this.write()},h.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,f),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},h.prototype._buildStyle=function(t){var r=this.doc.createElement(t.tagName);return r.setAttribute("type",t.type),a.eachKey(t.attrs,function(t,e){r.setAttribute(t,e)}),r},h.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var r=this.doc.getElementById(e);r&&r.parentNode.replaceChild(t,r)},h.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},h.prototype._onScriptDone=function(t){t===this.scriptStack[0]?(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)):this.options.error({msg:"Bad script nesting or script finished twice"})},h.prototype._writeScriptToken=function(t,e){var r=this._buildScript(t),n=this._shouldRelease(r),o=this.options.afterAsync;t.src&&(r.src=t.src,this._scriptLoadHandler(r,n?o:function(){e(),o()}));try{this._insertCursor(r,p),r.src&&!n||e()}catch(t){this.options.error(t),e()}},h.prototype._buildScript=function(t){var r=this.doc.createElement(t.tagName);return a.eachKey(t.attrs,function(t,e){r.setAttribute(t,e)}),t.content&&(r.text=t.content),r},h.prototype._scriptLoadHandler=function(e,r){function n(){e=e.onload=e.onreadystatechange=e.onerror=null}var o=this.options.error;function t(){n(),null!=r&&r(),r=null}function i(t){n(),o(t),null!=r&&r(),r=null}function a(t,e){var r=t["on"+e];null!=r&&(t["_on"+e]=r)}a(e,"load"),a(e,"error"),s(e,{onload:function(){if(e._onload)try{e._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){i({msg:"onload handler failed "+t+" @ "+e.src})}t()},onerror:function(){if(e._onerror)try{e._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){return void i({msg:"onerror handler failed "+t+" @ "+e.src})}i({msg:"remote script failed "+e.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(e.readyState)&&t()}})},h.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},h);function h(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),this.root=t,this.options=e,this.doc=t.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new i.default("",{autoFix:e.autoFix}),this.actuals=[t],this.proxyHistory="",this.proxyRoot=this.doc.createElement(t.nodeName),this.scriptStack=[],this.writeQueue=[],u(this.proxyRoot,"proxyof",0)}e.default=d},function(t,e,r){var n;n=function(){return o={},r.m=n=[function(t,e,r){"use strict";var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.exports=i.default},function(t,e,r){"use strict";e.__esModule=!0;var n,a=u(r(2)),o=u(r(3)),i=r(6),s=(n=i)&&n.__esModule?n:{default:n},c=r(5);function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var l={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=(p.prototype.append=function(t){this.stream+=t},p.prototype.prepend=function(t){this.stream=t+this.stream},p.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},p.prototype._peekTokenImpl=function(){for(var t in l)if(l.hasOwnProperty(t)&&l[t].test(this.stream)){var e=o[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},p.prototype.peekToken=function(){return this._peekToken()},p.prototype.readToken=function(){return this._readToken()},p.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},p.prototype.clear=function(){var t=this.stream;return this.stream="",t},p.prototype.rest=function(){return this.stream},p);function p(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),this.stream=e;var n=!1,o={};for(var i in a)a.hasOwnProperty(i)&&(r.autoFix&&(o[i+"Fix"]=!0),n=n||o[i+"Fix"]);n?(this._readToken=(0,s.default)(this,o,function(){return t._readTokenImpl()}),this._peekToken=(0,s.default)(this,o,function(){return t._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}for(var d in(e.default=f).tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=(0,c.escapeQuotes)(t[r],null));return e},f.supports=a)a.hasOwnProperty(d)&&(f.browserHasFlaw=f.browserHasFlaw||!a[d]&&d)},function(t,e){"use strict";var r=!(e.__esModule=!0),n=!1,o=window.document.createElement("div");try{var i="<P><I></P></I>";o.innerHTML=i,e.tagSoup=r=o.innerHTML!==i}catch(t){e.tagSoup=r=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=n=2===o.childNodes.length}catch(t){e.selfClose=n=!1}o=null,e.tagSoup=r,e.selfClose=n},function(t,e,r){"use strict";e.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=function(t){var e=t.indexOf("--\x3e");if(0<=e)return new s.CommentToken(t.substr(4,e-1),e+3)},e.chars=function(t){var e=t.indexOf("<");return new s.CharsToken(0<=e?e:t.length)},e.startTag=o,e.atomicTag=function(t){var e=o(t);if(e){var r=t.slice(e.length);if(r.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var n=r.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(n)return new s.AtomicTagToken(e.tagName,n[0].length+e.length,e.attrs,e.booleanAttrs,n[1])}}},e.endTag=function(t){var e=t.match(c.endTag);if(e)return new s.EndTagToken(e[1],e[0].length)};var s=r(4),c={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i};function o(t){var r,n,o;if(-1!==t.indexOf(">")){var e=t.match(c.startTag);if(e){var i=(r={},n={},o=e[2],e[2].replace(c.attr,function(t,e){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(r[arguments[5]]="",n[arguments[5]]=!0):r[e]=arguments[2]||arguments[3]||arguments[4]||c.fillAttr.test(e)&&e||"":r[e]="",o=o.replace(t,"")}),{v:new s.StartTagToken(e[1],e[0].length,r,n,!!e[3],o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))});if("object"===(void 0===i?"undefined":a(i)))return i.v}}}},function(t,e,r){"use strict";e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var a=r(5);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.Token=function t(e,r){s(this,t),this.type=e,this.length=r,this.text=""},e.CommentToken=(n.prototype.toString=function(){return"\x3c!--"+this.content},n);function n(t,e){s(this,n),this.type="comment",this.length=e||(t?t.length:0),this.text="",this.content=t}e.CharsToken=(o.prototype.toString=function(){return this.text},o);function o(t){s(this,o),this.type="chars",this.length=t,this.text=""}var i=e.TagToken=(c.formatTag=function(t,e){var r=1<arguments.length&&void 0!==e?e:null,n="<"+t.tagName;for(var o in t.attrs)if(t.attrs.hasOwnProperty(o)){n+=" "+o;var i=t.attrs[o];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[o]||(n+='="'+(0,a.escapeQuotes)(i)+'"')}return t.rest&&(n+=" "+t.rest),t.unary&&!t.html5Unary?n+="/>":n+=">",null!=r&&(n+=r+"</"+t.tagName+">"),n},c);function c(t,e,r,n,o){s(this,c),this.type=t,this.length=r,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=o,this.unary=!1,this.html5Unary=!1}e.StartTagToken=(u.prototype.toString=function(){return i.formatTag(this)},u);function u(t,e,r,n,o,i){s(this,u),this.type="startTag",this.length=e,this.text="",this.tagName=t,this.attrs=r,this.booleanAttrs=n,this.html5Unary=!1,this.unary=o,this.rest=i}e.AtomicTagToken=(l.prototype.toString=function(){return i.formatTag(this,this.content)},l);function l(t,e,r,n,o){s(this,l),this.type="atomicTag",this.length=e,this.text="",this.tagName=t,this.attrs=r,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1,this.content=o}e.EndTagToken=(f.prototype.toString=function(){return"</"+this.tagName+">"},f);function f(t,e){s(this,f),this.type="endTag",this.length=e,this.text="",this.tagName=t}},function(t,e){"use strict";e.__esModule=!0,e.escapeQuotes=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}},function(t,e){"use strict";e.__esModule=!0,e.default=function(r,n,e){var o=function(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,r=0;e=this[r];r++)if(e.tagName===t)return!0;return!1},t}(),i={startTag:function(t){var e=t.tagName;"TR"===e.toUpperCase()&&o.lastTagNameEq("TABLE")?(r.prepend("<TBODY>"),a()):n.selfCloseFix&&s.test(e)&&o.containsTagName(e)?o.lastTagNameEq(e)?u(r,o):(r.prepend("</"+t.tagName+">"),a()):t.unary||o.push(t)},endTag:function(t){o.last()?n.tagSoupFix&&!o.lastTagNameEq(t.tagName)?u(r,o):o.pop():n.tagSoupFix&&(e(),a())}};function a(){var t=function(t,e){var r=t.stream,n=c(e());return t.stream=r,n}(r,e);t&&i[t.type]&&i[t.type](t)}return function(){return a(),c(e())}};var r=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,s=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i;function c(t){return t&&"startTag"===t.type&&(t.unary=r.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function u(t,e){var r=e.pop();t.prepend("</"+r.tagName+">")}}],r.c=o,r.p="",r(0);function r(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return n[t].call(e.exports,e,e.exports,r),e.loaded=!0,e.exports}var n,o},t.exports=n()},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(t){return null!=t}function i(t,e,r){var n=void 0,o=t&&t.length||0;for(n=0;n<o;n++)e.call(r,t[n],n)}function a(t,e,r){for(var n in t)t.hasOwnProperty(n)&&e.call(r,n,t[n])}function r(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t))&&!!~t.tagName.toLowerCase().indexOf(e)}e.existy=o,e.isFunction=function(t){return"function"==typeof t},e.each=i,e.eachKey=a,e.defaults=function(r,t){return r=r||{},a(t,function(t,e){o(r[t])||(r[t]=e)}),r},e.toArray=function(r){try{return Array.prototype.slice.call(r)}catch(t){var e=function(){var e=[];return i(r,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":n(e)))return e.v}},e.last=function(t){return t[t.length-1]},e.isTag=r,e.isScript=function(t){return r(t,"script")},e.isStyle=function(t){return r(t,"style")}}],r.c=o,r.p="",r(0);function r(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return n[t].call(e.exports,e,e.exports,r),e.loaded=!0,e.exports}var n,o},t.exports=e()}],o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t].call(r.exports,r,r.exports,i),r.exports}!function(){"use strict";var r=i(1);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(t,e){(0,r.renderAmpOrMobileAd)(e)}}()}();
|
package/dist/banner.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* prebid-universal-creative v1.
|
|
2
|
-
Updated :
|
|
3
|
-
!function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=r,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=3)}([function(e,n,t){"use strict";function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function o(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},n)).forEach(function(e){var n=a(e,2),t=n[0],r=n[1];o.setAttribute(t,r)}),o}n.c=o,n.a=function(e,n){return o(document,{height:e,width:n})},n.b=function(e,n,t){var r;n=n||document,r=t?n.getElementsByTagName(t):n.getElementsByTagName("head");try{(r=r.length?r:n.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}},function(e,n,t){"use strict";n.b=function(n){var t={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!n[e]||!(function(e){return a(e,"Object")}(n[e])&&0<Object.keys(n[e]).length||i(n[e])&&""!==n[e]))}var r={},o={};e("targetingMap")?o=function(n){var t={};return Object.keys(n).forEach(function(e){Array.isArray(n[e])&&0<n[e].length&&(t[e]=n[e][0])}),t}(n.targetingMap):e("targetingKeywords")&&(o=function(e){var o={},n=e.split(",");return 0<n.length&&n.forEach(function(e){var n=e.split(":");if(2===n.length){var t=n[0],r=n[1];o[t]=r}}),o}(n.targetingKeywords));return function(n){Object.keys(n).forEach(function(e){r[t[e]||e]=n[e]})}(o),Object.keys(n).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&i(n[e])&&""!==n[e]&&(r[e]=n[e])}),r},n.a=function(e){var n=document.createElement("a");return n.href=decodeURIComponent(e),{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),hash:(n.hash||"").replace(/^#/,""),host:(n.host||window.location.host).replace(/:(443|80)$/,"")}};t(0);function a(e,n){return Object.prototype.toString.call(e)==="[object "+n+"]"}function i(e){return a(e,"String")}},function(e,n,t){"use strict";n.a=function(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,i=function(){if(null==n)return null;var e=Object(r.a)(n);return e.protocol+"://"+e.host}();function e(e){return e&&e.frames&&e.frames.__pb_locator__}var c=a.parent;try{for(;null!=c&&c!==a.top&&!e(c);)c=c.parent;e(c)||(c=a.parent)}catch(e){}return function(e,n){if(null==i)throw new Error("Missing pubUrl");var t;if(e=JSON.stringify(e),null==n)c.postMessage(e,i);else{var r=new MessageChannel;(t=r.port1).onmessage=n,a.addEventListener("message",o),c.postMessage(e,i,[r.port2])}return function(){null!=t&&(a.removeEventListener("message",o),t.onmessage=null,t=null)};function o(e){(e.origin||e.originalEvent&&e.originalEvent.origin)===i&&n(e)}}},n.b=function(e,n){return o({adId:e,message:a,event:n?c:i},n?{info:n}:null)};var r=t(1);function o(){return(o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var a="Prebid Event",i="adRenderSucceeded",c="adRenderFailed"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(4);window.ucTag=window.ucTag||{},window.ucTag.renderAd=r.a},function(e,n,t){"use strict";n.a=function(e,n){var t=Object(r.b)(n);Object(o.a)(window)?function(e,n){for(var t=!1,r=window,o=0;o<10;o++)if((r=r.parent).pbjs)try{r.pbjs.renderAd(e,n),t=!0;break}catch(e){continue}t||console.error("Unable to locate pbjs.renderAd function!")}(e,t.adId):function(l,d){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",n=3<arguments.length?arguments[3]:void 0,t=l.location,r=e||l.location.hostname,o=t.protocol+"//"+r,f=Object(i.a)(n,l),h=function(e){return f(Object(i.b)(d,e))};function a(e){var n=e.message?"message":"data",t={};try{t=JSON.parse(e[n])}catch(e){return}if(t.message&&"Prebid Response"===t.message&&t.adId===d){if(Object(g.a)(t))return void Object(g.b)(d,t,f,l);try{var r=l.document.body,o=t.ad,a=t.adUrl,i=t.width,c=t.height;if("video"===t.mediaType)h({reason:"preventWritingOnMainDocument",message:"Cannot render video ad ".concat(d)}),console.log("Error trying to write ad.");else if(o){var s=Object(p.a)(t.height,t.width);r.appendChild(s),s.contentDocument.open(),s.contentDocument.write(o),s.contentDocument.close(),h()}else if(a){var u=Object(p.a)(c,i);u.style.display="inline",u.style.overflow="hidden",u.src=a,Object(p.b)(u,document,"body"),h()}else h({reason:"noAd",message:"No ad for ".concat(d)}),console.log("Error trying to write ad. No ad markup or adUrl for ".concat(d))}catch(e){h({reason:"exception",message:e.message}),console.log("Error in rendering ad",e)}}}f({message:"Prebid Request",adId:d,adServerDomain:o},a)}(window,t.adId,t.adServerDomain,t.pubUrl)};var r=t(1),o=t(5),p=t(0),i=t(2),g=t(6)},function(e,n,t){"use strict";n.a=function(e){var n=!1,t=e;for(;!n;){try{if(t.pbjs){n=!0;break}}catch(e){}if(t===window.top)break;t=t.parent}return n}},function(e,n,t){"use strict";n.a=function(e){return"string"==typeof e.renderer&&parseInt(e.rendererVersion,10)>=o},n.b=function(a,i,c){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:window,u=4<arguments.length&&void 0!==arguments[4]?arguments[4]:r.c,l=u(s.document,{width:0,height:0,style:"display: none",srcdoc:"<script>".concat(i.renderer,"<\/script>"),name:"__pb_renderer__"});return new Promise(function(n,t){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};c(Object(d.b)(a,{reason:e.reason||"exception",message:e.message})),e.stack&&console.error(e),t(e)}function o(e){return function(){try{return e.apply(this,arguments)}catch(e){r(e)}}}l.onload=o(function(){var e=l.contentWindow;e.Promise.resolve(e.render(i,{mkFrame:u,sendMessage:function(e,n,t){return c(f({adId:a,message:e},n),t?o(t):void 0)}},s)).then(function(){return c(Object(d.b)(a))},r).then(n)}),s.document.body.appendChild(l)})};var r=t(0),d=t(2);function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var o=3}]);
|
|
1
|
+
/* prebid-universal-creative v1.18.0
|
|
2
|
+
Updated : 2026-07-14 */
|
|
3
|
+
!function(){"use strict";var t=[,function(e,n,r){Object.defineProperty(n,"__esModule",{value:!0}),n.renderBannerOrDisplayAd=function(e,n){var r=(0,t.transformAuctionTargetingData)(n);(0,o.canLocatePrebid)(window)?a(e,r.adId):c(window,r.adId,r.adServerDomain,r.pubUrl)},n.renderCrossDomain=c,n.renderLegacy=a;var t=r(2),o=r(4),g=r(3),i=r(5),m=r(6);function a(e,n){for(var r=!1,t=window,o=0;o<10;o++)if((t=t.parent).pbjs)try{t.pbjs.renderAd(e,n),r=!0;break}catch(e){continue}r||console.error("Unable to locate pbjs.renderAd function!")}function c(d,l){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",n=3<arguments.length?arguments[3]:void 0,r=d.location,t=e||d.location.hostname,o=r.protocol+"//"+t,f=(0,i.prebidMessenger)(n,d),p=function(e){return f((0,i.renderEventMessage)(l,e))};function a(e){var n=e.message?"message":"data",r={};try{r=JSON.parse(e[n])}catch(e){return}if(r.message&&"Prebid Response"===r.message&&r.adId===l){if((0,m.hasDynamicRenderer)(r))return void(0,m.runDynamicRenderer)(l,r,f,d);try{var t=d.document.body,o=r.ad,a=r.adUrl,i=r.width,c=r.height;if("video"===r.mediaType)p({reason:"preventWritingOnMainDocument",message:"Cannot render video ad ".concat(l)}),console.log("Error trying to write ad.");else if(o){var u=(0,g.getEmptyIframe)(r.height,r.width);t.appendChild(u),u.contentDocument.open(),u.contentDocument.write(o),u.contentDocument.close(),p()}else if(a){var s=(0,g.getEmptyIframe)(c,i);s.style.display="inline",s.style.overflow="hidden",s.src=a,(0,g.insertElement)(s,document,"body"),p()}else p({reason:"noAd",message:"No ad for ".concat(l)}),console.log("Error trying to write ad. No ad markup or adUrl for ".concat(l))}catch(e){p({reason:"exception",message:e.message}),console.log("Error in rendering ad",e)}}}f({message:"Prebid Request",adId:l,adServerDomain:o},a)}},function(e,n,r){function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.createTrackPixelHtml=function(e){if(!e)return"";var n=encodeURI(e);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(n,'"></div>')},n.getCreativeComment=a,n.getCreativeCommentMarkup=function(e){var n=a(e),r=document.createElement("div");return r.appendChild(n),r.innerHTML},n.getUUID=function(){var r=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"===e?n:3&n|8).toString(16)})},n.loadScript=function(e,n,r,t){var o=e.document,a=o.createElement("script");a.type="text/javascript",r&&"function"==typeof r&&(a.readyState?a.onreadystatechange=function(){"loaded"!==a.readyState&&"complete"!==a.readyState||(a.onreadystatechange=null,r())}:a.onload=function(){r()});t&&"function"==typeof t&&(a.onerror=function(){t()});a.src=n;var i=o.getElementsByTagName("head");(i=i.length?i:o.getElementsByTagName("body")).length&&(i=i[0]).insertBefore(a,i.firstChild);return a},n.parseUrl=function(e){var n=document.createElement("a");return n.href=decodeURIComponent(e),{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),hash:(n.hash||"").replace(/^#/,""),host:(n.host||window.location.host).replace(/:(443|80)$/,"")}},n.sendRequest=function(e,n){var r=new XMLHttpRequest;r.addEventListener("load",function(){n(r.responseText)}),r.open("GET",e),r.send()},n.transformAuctionTargetingData=function(n){var r={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!n[e]||!(function(e){return i(e,"Object")}(n[e])&&0<Object.keys(n[e]).length||c(n[e])&&""!==n[e]))}var t={},o={};e("targetingMap")?o=function(n){var r={};return Object.keys(n).forEach(function(e){Array.isArray(n[e])&&0<n[e].length&&(r[e]=n[e][0])}),r}(n.targetingMap):e("targetingKeywords")&&(o=function(e){var o={},n=e.split(",");return 0<n.length&&n.forEach(function(e){var n=e.split(":");if(2===n.length){var r=n[0],t=n[1];o[r]=t}}),o}(n.targetingKeywords));return function(n){Object.keys(n).forEach(function(e){t[r[e]||e]=n[e]})}(o),Object.keys(n).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&c(n[e])&&""!==n[e]&&(t[e]=n[e])}),t},n.triggerPixel=function(e,n){var r=new Image;n&&"function"==typeof n&&(r.addEventListener("load",n),r.addEventListener("error",n));r.src=e},n.writeAdUrl=function(e,n,r){var t=o.getEmptyIframe(r,n);t.src=e,document.body.appendChild(t)};var o=t(r(3));function t(e,n){if("function"==typeof WeakMap)var i=new WeakMap,c=new WeakMap;return(t=function(e,n){if(!n&&e&&e.__esModule)return e;var r,t,o={__proto__:null,default:e};if(null===e||"object"!=u(e)&&"function"!=typeof e)return o;if(r=n?c:i){if(r.has(e))return r.get(e);r.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((t=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(t.get||t.set)?r(o,a,t):o[a]=e[a]);return o})(e,n)}function a(e){return document.createComment("Creative ".concat(e.crid," served by Prebid.js Header Bidding"))}function i(e,n){return Object.prototype.toString.call(e)==="[object "+n+"]"}function c(e){return i(e,"String")}},function(e,n){function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,a,i,c=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;u=!1}else for(;!(u=(t=a.call(r)).done)&&(c.push(t.value),c.length!==n);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r<n;r++)t[r]=e[r];return t}function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)!{}.hasOwnProperty.call(r,t)||(e[t]=r[t])}return e}).apply(null,arguments)}function o(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},n)).forEach(function(e){var n=a(e,2),r=n[0],t=n[1];o.setAttribute(r,t)}),o}Object.defineProperty(n,"__esModule",{value:!0}),n.getEmptyIframe=function(e,n){return o(document,{height:e,width:n})},n.insertElement=function(e,n,r){var t;n=n||document,t=r?n.getElementsByTagName(r):n.getElementsByTagName("head");try{(t=t.length?t:n.getElementsByTagName("body")).length&&(t=t[0]).insertBefore(e,t.firstChild)}catch(e){}},n.makeIframe=o},function(e,n){function r(e){return e.top!==e&&!t(e)}function t(e){try{return e.top.location.toString(),!0}catch(e){return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.canInspectWindow=t,n.canLocatePrebid=function(e){var n=!1,r=e;for(;!n;){try{if(r.pbjs){n=!0;break}}catch(e){}if(r===window.top)break;r=r.parent}return n},n.isAmp=function(e,n){return"string"==typeof e&&""!==e&&r(n)},n.isCrossDomain=r,n.isMobileApp=function(e){return e&&"mobile-app"===e},n.isSafeFrame=function(e){return!(!e.$sf||!e.$sf.ext)}},function(e,n,r){Object.defineProperty(n,"__esModule",{value:!0}),n.PREBID_EVENT=n.AD_RENDER_SUCCEEDED=n.AD_RENDER_FAILED=void 0,n.prebidMessenger=function(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,i=function(){if(null==n)return null;var e=(0,t.parseUrl)(n);return e.protocol+"://"+e.host}();function e(e){return e&&e.frames&&e.frames.__pb_locator__}var c=a.parent;try{for(;null!=c&&c!==a.top&&!e(c);)c=c.parent;e(c)||(c=a.parent)}catch(e){}return function(e,n){if(null==i)throw new Error("Missing pubUrl");var r;if(e=JSON.stringify(e),null==n)c.postMessage(e,i);else{var t=new MessageChannel;(r=t.port1).onmessage=n,a.addEventListener("message",o),c.postMessage(e,i,[t.port2])}return function(){null!=r&&(a.removeEventListener("message",o),r.onmessage=null,r=null)};function o(e){(e.origin||e.originalEvent&&e.originalEvent.origin)===i&&n(e)}}},n.renderEventMessage=function(e,n){return o({adId:e,message:a,event:n?c:i},n?{info:n}:null)};var t=r(2);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)!{}.hasOwnProperty.call(r,t)||(e[t]=r[t])}return e}).apply(null,arguments)}var a=n.PREBID_EVENT="Prebid Event",i=n.AD_RENDER_SUCCEEDED="adRenderSucceeded",c=n.AD_RENDER_FAILED="adRenderFailed"},function(e,n,r){Object.defineProperty(n,"__esModule",{value:!0}),n.MIN_RENDERER_VERSION=void 0,n.hasDynamicRenderer=function(e){return"string"==typeof e.renderer&&parseInt(e.rendererVersion,10)>=o},n.runDynamicRenderer=function(a,i,c){var u=3<arguments.length&&void 0!==arguments[3]?arguments[3]:window,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.makeIframe,d=s(u.document,{width:0,height:0,style:"display: none",srcdoc:"<script>".concat(i.renderer,"<\/script>"),name:"__pb_renderer__"});return new Promise(function(n,r){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};c((0,l.renderEventMessage)(a,{reason:e.reason||"exception",message:e.message})),e.stack&&console.error(e),r(e)}function o(e){return function(){try{return e.apply(this,arguments)}catch(e){t(e)}}}d.onload=o(function(){var e=d.contentWindow;e.Promise.resolve(e.render(i,{mkFrame:s,sendMessage:function(e,n,r){return c(f({adId:a,message:e},n),r?o(r):void 0)}},u)).then(function(){return c((0,l.renderEventMessage)(a))},t).then(n)}),u.document.body.appendChild(d)})};var t=r(3),l=r(5);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)!{}.hasOwnProperty.call(r,t)||(e[t]=r[t])}return e}).apply(null,arguments)}var o=n.MIN_RENDERER_VERSION=3}],o={};function a(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,a),r.exports}var e;e=a(1),window.ucTag=window.ucTag||{},window.ucTag.renderAd=e.renderBannerOrDisplayAd}();
|
package/dist/creative.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* v1.
|
|
2
|
-
Updated :
|
|
1
|
+
/* v1.18.0
|
|
2
|
+
Updated : 2026-07-14
|
|
3
3
|
DEPRECATED, please use creative based on hb_format targeting */
|
|
4
|
-
!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=4)}([function(e,t,n){"use strict";t.i=function(e,t){var n=new Image;t&&"function"==typeof t&&(n.addEventListener("load",t),n.addEventListener("error",t));n.src=e},t.a=function(e){if(!e)return"";var t=encodeURI(e);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(t,'"></div>')},t.j=function(e,t,n){var r=o.a(n,t);r.src=e,document.body.appendChild(r)},t.g=function(e,t){var n=new XMLHttpRequest;n.addEventListener("load",function(){t(n.responseText)}),n.open("GET",e),n.send()},t.d=function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},t.e=function(e,t,n,r){var o=e.document,a=o.createElement("script");a.type="text/javascript",n&&"function"==typeof n&&(a.readyState?a.onreadystatechange=function(){"loaded"!==a.readyState&&"complete"!==a.readyState||(a.onreadystatechange=null,n())}:a.onload=function(){n()});r&&"function"==typeof r&&(a.onerror=function(){r()});a.src=t;var i=o.getElementsByTagName("head");(i=i.length?i:o.getElementsByTagName("body")).length&&(i=i[0]).insertBefore(a,i.firstChild);return a},t.b=r,t.c=function(e){var t=r(e),n=document.createElement("div");return n.appendChild(t),n.innerHTML},t.h=function(t){var n={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function e(e){return!(!t[e]||!(function(e){return a(e,"Object")}(t[e])&&0<Object.keys(t[e]).length||i(t[e])&&""!==t[e]))}var r={},o={};e("targetingMap")?o=function(t){var n={};return Object.keys(t).forEach(function(e){Array.isArray(t[e])&&0<t[e].length&&(n[e]=t[e][0])}),n}(t.targetingMap):e("targetingKeywords")&&(o=function(e){var o={},t=e.split(",");return 0<t.length&&t.forEach(function(e){var t=e.split(":");if(2===t.length){var n=t[0],r=t[1];o[n]=r}}),o}(t.targetingKeywords));return function(t){Object.keys(t).forEach(function(e){r[n[e]||e]=t[e]})}(o),Object.keys(t).forEach(function(e){"targetingMap"!==e&&"targetingKeywords"!==e&&i(t[e])&&""!==t[e]&&(r[e]=t[e])}),r},t.f=function(e){var t=document.createElement("a");return t.href=decodeURIComponent(e),{href:t.href,protocol:(t.protocol||"").replace(/:$/,""),hostname:t.hostname,port:+t.port,pathname:t.pathname.replace(/^(?!\/)/,"/"),hash:(t.hash||"").replace(/^#/,""),host:(t.host||window.location.host).replace(/:(443|80)$/,"")}};var o=n(1);function r(e){return document.createComment("Creative ".concat(e.crid," served by Prebid.js Header Bidding"))}function a(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function i(e){return a(e,"String")}},function(e,t,n){"use strict";function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},t)).forEach(function(e){var t=a(e,2),n=t[0],r=t[1];o.setAttribute(n,r)}),o}t.c=o,t.a=function(e,t){return o(document,{height:e,width:t})},t.b=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}}},function(e,t,n){"use strict";t.b=function(e,t){return"string"==typeof e&&""!==e&&function(e){return e.top!==e&&!function(e){try{return e.top.location.toString(),!0}catch(e){return!1}}(e)}(t)},t.d=function(e){return!(!e.$sf||!e.$sf.ext)},t.a=function(e){var t=!1,n=e;for(;!t;){try{if(n.pbjs){t=!0;break}}catch(e){}if(n===window.top)break;n=n.parent}return t},t.c=function(e){return e&&"mobile-app"===e}},function(e,t,n){"use strict";t.a=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,i=function(){if(null==t)return null;var e=Object(r.f)(t);return e.protocol+"://"+e.host}();function e(e){return e&&e.frames&&e.frames.__pb_locator__}var c=a.parent;try{for(;null!=c&&c!==a.top&&!e(c);)c=c.parent;e(c)||(c=a.parent)}catch(e){}return function(e,t){if(null==i)throw new Error("Missing pubUrl");var n;if(e=JSON.stringify(e),null==t)c.postMessage(e,i);else{var r=new MessageChannel;(n=r.port1).onmessage=t,a.addEventListener("message",o),c.postMessage(e,i,[r.port2])}return function(){null!=n&&(a.removeEventListener("message",o),n.onmessage=null,n=null)};function o(e){(e.origin||e.originalEvent&&e.originalEvent.origin)===i&&t(e)}}},t.b=function(e,t){return o({adId:e,message:a,event:t?c:i},t?{info:t}:null)};var r=n(0);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a="Prebid Event",i="adRenderSucceeded",c="adRenderFailed"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5),a=n(7),i=n(2);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(e,t){var n=Object(r.h)(t);Object(i.c)(n.env)||Object(i.b)(n.uuid,window)?Object(a.a)(t):Object(o.a)(e,t)}},function(e,t,n){"use strict";t.a=function(e,t){var n=Object(r.h)(t);Object(o.a)(window)?function(e,t){for(var n=!1,r=window,o=0;o<10;o++)if((r=r.parent).pbjs)try{r.pbjs.renderAd(e,t),n=!0;break}catch(e){continue}n||console.error("Unable to locate pbjs.renderAd function!")}(e,n.adId):function(d,l){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",t=3<arguments.length?arguments[3]:void 0,n=d.location,r=e||d.location.hostname,o=n.protocol+"//"+r,f=Object(i.a)(t,d),h=function(e){return f(Object(i.b)(l,e))};function a(e){var t=e.message?"message":"data",n={};try{n=JSON.parse(e[t])}catch(e){return}if(n.message&&"Prebid Response"===n.message&&n.adId===l){if(Object(g.a)(n))return void Object(g.b)(l,n,f,d);try{var r=d.document.body,o=n.ad,a=n.adUrl,i=n.width,c=n.height;if("video"===n.mediaType)h({reason:"preventWritingOnMainDocument",message:"Cannot render video ad ".concat(l)}),console.log("Error trying to write ad.");else if(o){var u=Object(p.a)(n.height,n.width);r.appendChild(u),u.contentDocument.open(),u.contentDocument.write(o),u.contentDocument.close(),h()}else if(a){var s=Object(p.a)(c,i);s.style.display="inline",s.style.overflow="hidden",s.src=a,Object(p.b)(s,document,"body"),h()}else h({reason:"noAd",message:"No ad for ".concat(l)}),console.log("Error trying to write ad. No ad markup or adUrl for ".concat(l))}catch(e){h({reason:"exception",message:e.message}),console.log("Error in rendering ad",e)}}}f({message:"Prebid Request",adId:l,adServerDomain:o},a)}(window,n.adId,n.adServerDomain,n.pubUrl)};var r=n(0),o=n(2),p=n(1),i=n(3),g=n(6)},function(e,t,n){"use strict";t.a=function(e){return"string"==typeof e.renderer&&parseInt(e.rendererVersion,10)>=o},t.b=function(a,i,c){var u=3<arguments.length&&void 0!==arguments[3]?arguments[3]:window,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:r.c,d=s(u.document,{width:0,height:0,style:"display: none",srcdoc:"<script>".concat(i.renderer,"<\/script>"),name:"__pb_renderer__"});return new Promise(function(t,n){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};c(Object(l.b)(a,{reason:e.reason||"exception",message:e.message})),e.stack&&console.error(e),n(e)}function o(e){return function(){try{return e.apply(this,arguments)}catch(e){r(e)}}}d.onload=o(function(){var e=d.contentWindow;e.Promise.resolve(e.render(i,{mkFrame:s,sendMessage:function(e,t,n){return c(f({adId:a,message:e},t),n?o(n):void 0)}},u)).then(function(){return c(Object(l.b)(a))},r).then(t)}),u.document.body.appendChild(d)})};var r=n(1),l=n(3);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=3},function(e,t,n){"use strict";t.a=function(e){var t=Object(l.h)(e),n=t.cacheHost,r=t.cachePath,o=t.uuid,a=t.size,i=t.hbPb,c="Prebid_";if((o=o||"").substr(0,c.length)===c)!function(e){var t=window.localStorage.getItem(e);v(!0)(t)}(o),g(a);else{var u="".concat(function(e,t){var n=void 0===t||""===t?p:t;return"https://".concat(void 0===e||""===e?d:e).concat(n)}(n,r),"?uuid=").concat(o);g(a),Object(l.g)(u,v(Object(s.c)(t.env),i))}};var l=n(0),s=n(2),f=n(1),h=n(8),d="prebid.adnxs.com",p="/pbc/v1/cache";function g(e){if(e){var t=e.split("x").map(Number);!function(r,o){var a=window.innerWidth,i=window.innerHeight;if(a!==r||i!==o){if(Object(s.d)(window)){window.$sf.ext.register(r,o,function(e){var t=r-a,n=o-i;window.$sf.ext.expand({r:t,b:n,push:!0})})}window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:o},"*")}}(t[0],t[1])}else console.log("Targeting key hb_size not found to resize creative")}function v(s,d){return function(e){var t=function(e){var t;try{t=JSON.parse(e)}catch(e){console.log("Error parsing response from cache host: ".concat(e))}return t}(e),n=t.price||d,r=Object(l.c)(t),o=t.width?t.width:t.w,a=t.height?t.height:t.h;if(t.wurl&&Object(l.i)(decodeURIComponent(t.wurl)),t.adm){if(t.adm=n?t.adm.replace("${AUCTION_PRICE}",n):t.adm.replace("${AUCTION_PRICE}",""),r+=s?b(t.adm,o,a):t.adm,t.nurl&&(r+=Object(l.a)(decodeURIComponent(t.nurl))),t.burl){var i=function(){Object(l.i)(t.burl)};if(s)Object(l.e)(window,"mraid.js",function(){!function(t){function n(e){0<e&&(mraid.removeEventListener("exposureChange",n),t())}function r(e){e&&(mraid.removeEventListener("viewableChange",r),t())}function o(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",n):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?t():mraid.addEventListener("viewableChange",r))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function e(){mraid.removeEventListener("ready",e),o()}):o(),!0)}(i)&&i()},i);else i()}Object(h.a)(r)}else if(t.nurl)if(s){r+=b(Object(l.e)(window,t.nurl).outerHTML,o,a),Object(h.a)(r)}else{var c=t.nurl,u=Object(l.b)(t);Object(f.b)(u,document,"body"),Object(l.j)(c,o,a)}}}function b(e,t,n){var r=Object(l.d)();return'<div id="'.concat(r,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(r,'_inner" style="margin: 0 auto; width:').concat(t,"px; height:").concat(n,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(e,"</div>\n </div>")}},function(e,t,n){"use strict";function r(e){try{var t=document.createRange().createContextualFragment(e);document.body.append(t)}catch(e){console.error(e)}}t.a=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r;e=e.replace(/\<(\?xml|(\!DOCTYPE[^\>\[]+(\[[^\]]+)?))+[^>]+\>/gi,""),t(e)}}]);
|
|
4
|
+
!function(){var n=[,function(t,e,r){"use strict";function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.createTrackPixelHtml=function(t){if(!t)return"";var e=encodeURI(t);return'<div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="'.concat(e,'"></div>')},e.getCreativeComment=i,e.getCreativeCommentMarkup=function(t){var e=i(t),r=document.createElement("div");return r.appendChild(e),r.innerHTML},e.getUUID=function(){var r=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"===t?e:3&e|8).toString(16)})},e.loadScript=function(t,e,r,n){var o=t.document,i=o.createElement("script");i.type="text/javascript",r&&"function"==typeof r&&(i.readyState?i.onreadystatechange=function(){"loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,r())}:i.onload=function(){r()});n&&"function"==typeof n&&(i.onerror=function(){n()});i.src=e;var a=o.getElementsByTagName("head");(a=a.length?a:o.getElementsByTagName("body")).length&&(a=a[0]).insertBefore(i,a.firstChild);return i},e.parseUrl=function(t){var e=document.createElement("a");return e.href=decodeURIComponent(t),{href:e.href,protocol:(e.protocol||"").replace(/:$/,""),hostname:e.hostname,port:+e.port,pathname:e.pathname.replace(/^(?!\/)/,"/"),hash:(e.hash||"").replace(/^#/,""),host:(e.host||window.location.host).replace(/:(443|80)$/,"")}},e.sendRequest=function(t,e){var r=new XMLHttpRequest;r.addEventListener("load",function(){e(r.responseText)}),r.open("GET",t),r.send()},e.transformAuctionTargetingData=function(e){var r={hb_adid:"adId",hb_cache_host:"cacheHost",hb_cache_path:"cachePath",hb_cache_id:"uuid",hb_format:"mediaType",hb_env:"env",hb_size:"size",hb_pb:"hbPb"};function t(t){return!(!e[t]||!(function(t){return a(t,"Object")}(e[t])&&0<Object.keys(e[t]).length||s(e[t])&&""!==e[t]))}var n={},o={};t("targetingMap")?o=function(e){var r={};return Object.keys(e).forEach(function(t){Array.isArray(e[t])&&0<e[t].length&&(r[t]=e[t][0])}),r}(e.targetingMap):t("targetingKeywords")&&(o=function(t){var o={},e=t.split(",");return 0<e.length&&e.forEach(function(t){var e=t.split(":");if(2===e.length){var r=e[0],n=e[1];o[r]=n}}),o}(e.targetingKeywords));return function(e){Object.keys(e).forEach(function(t){n[r[t]||t]=e[t]})}(o),Object.keys(e).forEach(function(t){"targetingMap"!==t&&"targetingKeywords"!==t&&s(e[t])&&""!==e[t]&&(n[t]=e[t])}),n},e.triggerPixel=function(t,e){var r=new Image;e&&"function"==typeof e&&(r.addEventListener("load",e),r.addEventListener("error",e));r.src=t},e.writeAdUrl=function(t,e,r){var n=o.getEmptyIframe(r,e);n.src=t,document.body.appendChild(n)};var o=n(r(2));function n(t,e){if("function"==typeof WeakMap)var a=new WeakMap,s=new WeakMap;return(n=function(t,e){if(!e&&t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=c(t)&&"function"!=typeof t)return o;if(r=e?s:a){if(r.has(t))return r.get(t);r.set(t,o)}for(var i in t)"default"!==i&&{}.hasOwnProperty.call(t,i)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,i))&&(n.get||n.set)?r(o,i,n):o[i]=t[i]);return o})(t,e)}function i(t){return document.createComment("Creative ".concat(t.crid," served by Prebid.js Header Bidding"))}function a(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function s(t){return a(t,"String")}},function(t,e){"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function r(){return(r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)!{}.hasOwnProperty.call(r,n)||(t[n]=r[n])}return t}).apply(null,arguments)}function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=t.createElement("iframe");return Object.entries(r({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},e)).forEach(function(t){var e=i(t,2),r=e[0],n=e[1];o.setAttribute(r,n)}),o}Object.defineProperty(e,"__esModule",{value:!0}),e.getEmptyIframe=function(t,e){return o(document,{height:t,width:e})},e.insertElement=function(t,e,r){var n;e=e||document,n=r?e.getElementsByTagName(r):e.getElementsByTagName("head");try{(n=n.length?n:e.getElementsByTagName("body")).length&&(n=n[0]).insertBefore(t,n.firstChild)}catch(t){}},e.makeIframe=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderBannerOrDisplayAd=function(t,e){var r=(0,n.transformAuctionTargetingData)(e);(0,o.canLocatePrebid)(window)?i(t,r.adId):s(window,r.adId,r.adServerDomain,r.pubUrl)},e.renderCrossDomain=s,e.renderLegacy=i;var n=r(1),o=r(4),h=r(2),a=r(5),m=r(6);function i(t,e){for(var r=!1,n=window,o=0;o<10;o++)if((n=n.parent).pbjs)try{n.pbjs.renderAd(t,e),r=!0;break}catch(t){continue}r||console.error("Unable to locate pbjs.renderAd function!")}function s(l,f){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",e=3<arguments.length?arguments[3]:void 0,r=l.location,n=t||l.location.hostname,o=r.protocol+"//"+n,d=(0,a.prebidMessenger)(e,l),p=function(t){return d((0,a.renderEventMessage)(f,t))};function i(t){var e=t.message?"message":"data",r={};try{r=JSON.parse(t[e])}catch(t){return}if(r.message&&"Prebid Response"===r.message&&r.adId===f){if((0,m.hasDynamicRenderer)(r))return void(0,m.runDynamicRenderer)(f,r,d,l);try{var n=l.document.body,o=r.ad,i=r.adUrl,a=r.width,s=r.height;if("video"===r.mediaType)p({reason:"preventWritingOnMainDocument",message:"Cannot render video ad ".concat(f)}),console.log("Error trying to write ad.");else if(o){var c=(0,h.getEmptyIframe)(r.height,r.width);n.appendChild(c),c.contentDocument.open(),c.contentDocument.write(o),c.contentDocument.close(),p()}else if(i){var u=(0,h.getEmptyIframe)(s,a);u.style.display="inline",u.style.overflow="hidden",u.src=i,(0,h.insertElement)(u,document,"body"),p()}else p({reason:"noAd",message:"No ad for ".concat(f)}),console.log("Error trying to write ad. No ad markup or adUrl for ".concat(f))}catch(t){p({reason:"exception",message:t.message}),console.log("Error in rendering ad",t)}}}d({message:"Prebid Request",adId:f,adServerDomain:o},i)}},function(t,e){"use strict";function r(t){return t.top!==t&&!n(t)}function n(t){try{return t.top.location.toString(),!0}catch(t){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.canInspectWindow=n,e.canLocatePrebid=function(t){var e=!1,r=t;for(;!e;){try{if(r.pbjs){e=!0;break}}catch(t){}if(r===window.top)break;r=r.parent}return e},e.isAmp=function(t,e){return"string"==typeof t&&""!==t&&r(e)},e.isCrossDomain=r,e.isMobileApp=function(t){return t&&"mobile-app"===t},e.isSafeFrame=function(t){return!(!t.$sf||!t.$sf.ext)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PREBID_EVENT=e.AD_RENDER_SUCCEEDED=e.AD_RENDER_FAILED=void 0,e.prebidMessenger=function(e){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,a=function(){if(null==e)return null;var t=(0,n.parseUrl)(e);return t.protocol+"://"+t.host}();function t(t){return t&&t.frames&&t.frames.__pb_locator__}var s=i.parent;try{for(;null!=s&&s!==i.top&&!t(s);)s=s.parent;t(s)||(s=i.parent)}catch(t){}return function(t,e){if(null==a)throw new Error("Missing pubUrl");var r;if(t=JSON.stringify(t),null==e)s.postMessage(t,a);else{var n=new MessageChannel;(r=n.port1).onmessage=e,i.addEventListener("message",o),s.postMessage(t,a,[n.port2])}return function(){null!=r&&(i.removeEventListener("message",o),r.onmessage=null,r=null)};function o(t){(t.origin||t.originalEvent&&t.originalEvent.origin)===a&&e(t)}}},e.renderEventMessage=function(t,e){return o({adId:t,message:i,event:e?s:a},e?{info:e}:null)};var n=r(1);function o(){return(o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)!{}.hasOwnProperty.call(r,n)||(t[n]=r[n])}return t}).apply(null,arguments)}var i=e.PREBID_EVENT="Prebid Event",a=e.AD_RENDER_SUCCEEDED="adRenderSucceeded",s=e.AD_RENDER_FAILED="adRenderFailed"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MIN_RENDERER_VERSION=void 0,e.hasDynamicRenderer=function(t){return"string"==typeof t.renderer&&parseInt(t.rendererVersion,10)>=o},e.runDynamicRenderer=function(i,a,s){var c=3<arguments.length&&void 0!==arguments[3]?arguments[3]:window,u=4<arguments.length&&void 0!==arguments[4]?arguments[4]:n.makeIframe,l=u(c.document,{width:0,height:0,style:"display: none",srcdoc:"<script>".concat(a.renderer,"<\/script>"),name:"__pb_renderer__"});return new Promise(function(e,r){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};s((0,f.renderEventMessage)(i,{reason:t.reason||"exception",message:t.message})),t.stack&&console.error(t),r(t)}function o(t){return function(){try{return t.apply(this,arguments)}catch(t){n(t)}}}l.onload=o(function(){var t=l.contentWindow;t.Promise.resolve(t.render(a,{mkFrame:u,sendMessage:function(t,e,r){return s(d({adId:i,message:t},e),r?o(r):void 0)}},c)).then(function(){return s((0,f.renderEventMessage)(i))},n).then(e)}),c.document.body.appendChild(l)})};var n=r(2),f=r(5);function d(){return(d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)!{}.hasOwnProperty.call(r,n)||(t[n]=r[n])}return t}).apply(null,arguments)}var o=e.MIN_RENDERER_VERSION=3},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderAmpOrMobileAd=function(t){var e=(0,f.transformAuctionTargetingData)(t),r=e.cacheHost,n=e.cachePath,o=e.uuid,i=e.size,a=e.hbPb,s="Prebid_";if((o=o||"").substr(0,s.length)===s)!function(t){var e=window.localStorage.getItem(t);y(!0)(e)}(o),m(i);else{var c="".concat(function(t,e){var r=void 0===e||""===e?h:e;return"https://".concat(void 0===t||""===t?l:t).concat(r)}(r,n),"?uuid=").concat(o);m(i),(0,f.sendRequest)(c,y((0,u.isMobileApp)(e.env),a))}};var f=r(1),u=r(4),d=r(2),p=r(8),l="prebid.adnxs.com",h="/pbc/v1/cache";function m(t){if(t){var e=t.split("x").map(Number);!function(r,n){var o=window.innerWidth,i=window.innerHeight;if(o!==r||i!==n){if((0,u.isSafeFrame)(window)){window.$sf.ext.register(r,n,function(){var t=r-o,e=n-i;window.$sf.ext.expand({r:t,b:e,push:!0})})}window.parent.postMessage({sentinel:"amp",type:"embed-size",width:r,height:n},"*")}}(e[0],e[1])}else console.log("Targeting key hb_size not found to resize creative")}function y(u,l){return function(t){var e=function(t){var e;try{e=JSON.parse(t)}catch(t){console.log("Error parsing response from cache host: ".concat(t))}return e}(t),r=e.price||l,n=(0,f.getCreativeCommentMarkup)(e),o=e.width?e.width:e.w,i=e.height?e.height:e.h;if(e.wurl&&(0,f.triggerPixel)(decodeURIComponent(e.wurl)),e.adm){if(e.adm=r?e.adm.replace("${AUCTION_PRICE}",r):e.adm.replace("${AUCTION_PRICE}",""),n+=u?g(e.adm,o,i):e.adm,e.nurl&&(n+=(0,f.createTrackPixelHtml)(decodeURIComponent(e.nurl))),e.burl){var a=function(){(0,f.triggerPixel)(e.burl)};u?(0,f.loadScript)(window,"mraid.js",function(){!function(e){function r(t){0<t&&(mraid.removeEventListener("exposureChange",r),e())}function n(t){t&&(mraid.removeEventListener("viewableChange",n),e())}function o(){window.MRAID_ENV&&3<=parseFloat(window.MRAID_ENV.version)?mraid.addEventListener("exposureChange",r):window.MRAID_ENV&&parseFloat(window.MRAID_ENV.version)<3&&(mraid.isViewable()?e():mraid.addEventListener("viewableChange",n))}return!(!window.mraid||!window.MRAID_ENV)&&("loading"==mraid.getState()?mraid.addEventListener("ready",function t(){mraid.removeEventListener("ready",t),o()}):o(),!0)}(a)&&a()},a):a()}(0,p.writeAdHtml)(n)}else if(e.nurl)if(u){n+=g((0,f.loadScript)(window,e.nurl).outerHTML,o,i),(0,p.writeAdHtml)(n)}else{var s=e.nurl,c=(0,f.getCreativeComment)(e);(0,d.insertElement)(c,document,"body"),(0,f.writeAdUrl)(s,o,i)}}}function g(t,e,r){var n=(0,f.getUUID)();return'<div id="'.concat(n,'" style="border-style: none; position: absolute; width:100%; height:100%;">\n <div id="').concat(n,'_inner" style="margin: 0 auto; width:').concat(e,"px; height:").concat(r,'px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">').concat(t,"</div>\n </div>")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeAdHtml=function(e){var r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.default;e=e.replace(/<\?xml\b[^>]*(?:\?>|>)/gi,"").replace(/<!doctype\b[^>\[]*(?:\[[^\]]*\][^>]*)?>/gi,"");try{r=function(t){function n(t){if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim()){var e="PUC_NODE_TEXT_".concat(u++,"_").concat(o);c.set(e,t.textContent);var r=s.createElement("span");r.dataset.textId=e,t.parentNode.replaceChild(r,t)}else(function(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()})(t.childNodes).forEach(n)}var o=Date.now(),e="PUC_START_".concat(o),r="PUC_END_".concat(o),i='<div id="'.concat(e,'"></div>'),a='<div id="'.concat(r,'"></div>'),s=(new DOMParser).parseFromString("".concat(i).concat(t).concat(a),"text/html"),c=new Map,u=0,l=s.querySelector("#".concat(e)).nextSibling,f=s.querySelector("#".concat(r));for(;l&&l!==f;)n(l),l=l.nextSibling;return(new XMLSerializer).serializeToString(s).split(i)[1].split(a)[0].replace(/<span data-text-id="(PUC_NODE_TEXT_\d+_\d+)"[^>]*><\/span>/g,function(t,e){return c.get(e)||""}).trim()}(e)}catch(t){console.error("Error normalizing markup:",t.message),r=e}t(document.body,r,{error:console.error})};var n,o=(n=r(9))&&n.__esModule?n:{default:n};function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}},function(t){var e;e=function(){return o={},r.m=n=[function(t,e,r){"use strict";var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.exports=i.default},function(t,e,r){"use strict";e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=h;var n,o=r(2),c=(n=o)&&n.__esModule?n:{default:n},i=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}}(r(4));function u(){}var a={afterAsync:u,afterDequeue:u,afterStreamStart:u,afterWrite:u,autoFix:!0,beforeEnqueue:u,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:u,error:function(t){throw new Error(t.msg)},releaseAsync:!1},l=0,f=[],d=null;function p(){var t=f.shift();if(t){var e=i.last(t);e.afterDequeue(),t.stream=function(t,e,n){(d=new c.default(t,n)).id=l++,d.name=n.name||d.id,h.streams[d.name]=d;var r=t.ownerDocument,o={close:r.close,open:r.open,write:r.write,writeln:r.writeln};function i(t){t=n.beforeWrite(t),d.write(t),n.afterWrite(t)}s(r,{close:u,open:u,write:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return i(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return i(e.join("")+"\n")}});var a=d.win.onerror||u;return d.win.onerror=function(t,e,r){n.error({msg:t+" - "+e+": "+r}),a.apply(d.win,[t,e,r])},d.write(e,function(){s(r,o),d.win.onerror=a,n.done(),d=null,p()}),d}.apply(void 0,t),e.afterStreamStart()}}function h(t,e,r){if(i.isFunction(r))r={done:r};else if("clear"===r)return f=[],d=null,void(l=0);r=i.defaults(r,a);var n=[t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t,e,r];return t.postscribe={cancel:function(){n.stream?n.stream.abort():n[1]=u}},r.beforeEnqueue(n),f.push(n),d||p(),t.postscribe}s(h,{streams:{},queue:f,WriteStream:c.default})},function(t,e,r){"use strict";e.__esModule=!0;var n,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(3),i=(n=o)&&n.__esModule?n:{default:n},a=function(t){{if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}}(r(4));var l="data-ps-",f="ps-style",d="ps-script";function c(t,e){var r=l+e,n=t.getAttribute(r);return a.existy(n)?String(n):n}function u(t,e,r){var n=2<arguments.length&&void 0!==r?r:null,o=l+e;a.existy(n)&&""!==n?t.setAttribute(o,n):t.removeAttribute(o)}var p=(h.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();a.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},h.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},h.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,r=void 0,n=void 0,o=[];(e=this.parser.readToken())&&!(r=a.isScript(e))&&!(n=a.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);0<o.length&&this._writeStaticTokens(o),r&&this._handleScriptToken(e),n&&this._handleStyleToken(e)},h.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},h.prototype._buildChunk=function(t){for(var e=this.actuals.length,r=[],n=[],o=[],i=t.length,a=0;a<i;a++){var s=t[a],c=s.toString();if(r.push(c),s.attrs){if(!/^noscript$/i.test(s.tagName)){var u=e++;n.push(c.replace(/(\/?>)/," "+l+"id="+u+" $1")),s.attrs.id!==d&&s.attrs.id!==f&&o.push("atomicTag"===s.type?"":"<"+s.tagName+" "+l+"proxyof="+u+(s.unary?" />":">"))}}else n.push(c),o.push("endTag"===s.type?c:"")}return{tokens:t,raw:r.join(""),actual:n.join(""),proxy:o.join("")}},h.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];a.existy(t=e.shift());){var r=1===t.nodeType;if(!r||!c(t,"proxyof")){r&&u(this.actuals[c(t,"id")]=t,"id");var n=t.parentNode&&c(t.parentNode,"proxyof");n&&this.actuals[n].appendChild(t)}e.unshift.apply(e,a.toArray(t.childNodes))}},h.prototype._handleScriptToken=function(t){var e=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},h.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",(t=this.options.beforeWriteToken(t))&&this._writeStyleToken(t),e&&this.write()},h.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,f),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},h.prototype._buildStyle=function(t){var r=this.doc.createElement(t.tagName);return r.setAttribute("type",t.type),a.eachKey(t.attrs,function(t,e){r.setAttribute(t,e)}),r},h.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var r=this.doc.getElementById(e);r&&r.parentNode.replaceChild(t,r)},h.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},h.prototype._onScriptDone=function(t){t===this.scriptStack[0]?(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)):this.options.error({msg:"Bad script nesting or script finished twice"})},h.prototype._writeScriptToken=function(t,e){var r=this._buildScript(t),n=this._shouldRelease(r),o=this.options.afterAsync;t.src&&(r.src=t.src,this._scriptLoadHandler(r,n?o:function(){e(),o()}));try{this._insertCursor(r,d),r.src&&!n||e()}catch(t){this.options.error(t),e()}},h.prototype._buildScript=function(t){var r=this.doc.createElement(t.tagName);return a.eachKey(t.attrs,function(t,e){r.setAttribute(t,e)}),t.content&&(r.text=t.content),r},h.prototype._scriptLoadHandler=function(e,r){function n(){e=e.onload=e.onreadystatechange=e.onerror=null}var o=this.options.error;function t(){n(),null!=r&&r(),r=null}function i(t){n(),o(t),null!=r&&r(),r=null}function a(t,e){var r=t["on"+e];null!=r&&(t["_on"+e]=r)}a(e,"load"),a(e,"error"),s(e,{onload:function(){if(e._onload)try{e._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){i({msg:"onload handler failed "+t+" @ "+e.src})}t()},onerror:function(){if(e._onerror)try{e._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){return void i({msg:"onerror handler failed "+t+" @ "+e.src})}i({msg:"remote script failed "+e.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(e.readyState)&&t()}})},h.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},h);function h(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),this.root=t,this.options=e,this.doc=t.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new i.default("",{autoFix:e.autoFix}),this.actuals=[t],this.proxyHistory="",this.proxyRoot=this.doc.createElement(t.nodeName),this.scriptStack=[],this.writeQueue=[],u(this.proxyRoot,"proxyof",0)}e.default=p},function(t,e,r){var n;n=function(){return o={},r.m=n=[function(t,e,r){"use strict";var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.exports=i.default},function(t,e,r){"use strict";e.__esModule=!0;var n,a=u(r(2)),o=u(r(3)),i=r(6),s=(n=i)&&n.__esModule?n:{default:n},c=r(5);function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var l={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=(d.prototype.append=function(t){this.stream+=t},d.prototype.prepend=function(t){this.stream=t+this.stream},d.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},d.prototype._peekTokenImpl=function(){for(var t in l)if(l.hasOwnProperty(t)&&l[t].test(this.stream)){var e=o[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},d.prototype.peekToken=function(){return this._peekToken()},d.prototype.readToken=function(){return this._readToken()},d.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},d.prototype.clear=function(){var t=this.stream;return this.stream="",t},d.prototype.rest=function(){return this.stream},d);function d(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.stream=e;var n=!1,o={};for(var i in a)a.hasOwnProperty(i)&&(r.autoFix&&(o[i+"Fix"]=!0),n=n||o[i+"Fix"]);n?(this._readToken=(0,s.default)(this,o,function(){return t._readTokenImpl()}),this._peekToken=(0,s.default)(this,o,function(){return t._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}for(var p in(e.default=f).tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=(0,c.escapeQuotes)(t[r],null));return e},f.supports=a)a.hasOwnProperty(p)&&(f.browserHasFlaw=f.browserHasFlaw||!a[p]&&p)},function(t,e){"use strict";var r=!(e.__esModule=!0),n=!1,o=window.document.createElement("div");try{var i="<P><I></P></I>";o.innerHTML=i,e.tagSoup=r=o.innerHTML!==i}catch(t){e.tagSoup=r=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=n=2===o.childNodes.length}catch(t){e.selfClose=n=!1}o=null,e.tagSoup=r,e.selfClose=n},function(t,e,r){"use strict";e.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=function(t){var e=t.indexOf("--\x3e");if(0<=e)return new s.CommentToken(t.substr(4,e-1),e+3)},e.chars=function(t){var e=t.indexOf("<");return new s.CharsToken(0<=e?e:t.length)},e.startTag=o,e.atomicTag=function(t){var e=o(t);if(e){var r=t.slice(e.length);if(r.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var n=r.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(n)return new s.AtomicTagToken(e.tagName,n[0].length+e.length,e.attrs,e.booleanAttrs,n[1])}}},e.endTag=function(t){var e=t.match(c.endTag);if(e)return new s.EndTagToken(e[1],e[0].length)};var s=r(4),c={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i};function o(t){var r,n,o;if(-1!==t.indexOf(">")){var e=t.match(c.startTag);if(e){var i=(r={},n={},o=e[2],e[2].replace(c.attr,function(t,e){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(r[arguments[5]]="",n[arguments[5]]=!0):r[e]=arguments[2]||arguments[3]||arguments[4]||c.fillAttr.test(e)&&e||"":r[e]="",o=o.replace(t,"")}),{v:new s.StartTagToken(e[1],e[0].length,r,n,!!e[3],o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))});if("object"===(void 0===i?"undefined":a(i)))return i.v}}}},function(t,e,r){"use strict";e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var a=r(5);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.Token=function t(e,r){s(this,t),this.type=e,this.length=r,this.text=""},e.CommentToken=(n.prototype.toString=function(){return"\x3c!--"+this.content},n);function n(t,e){s(this,n),this.type="comment",this.length=e||(t?t.length:0),this.text="",this.content=t}e.CharsToken=(o.prototype.toString=function(){return this.text},o);function o(t){s(this,o),this.type="chars",this.length=t,this.text=""}var i=e.TagToken=(c.formatTag=function(t,e){var r=1<arguments.length&&void 0!==e?e:null,n="<"+t.tagName;for(var o in t.attrs)if(t.attrs.hasOwnProperty(o)){n+=" "+o;var i=t.attrs[o];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[o]||(n+='="'+(0,a.escapeQuotes)(i)+'"')}return t.rest&&(n+=" "+t.rest),t.unary&&!t.html5Unary?n+="/>":n+=">",null!=r&&(n+=r+"</"+t.tagName+">"),n},c);function c(t,e,r,n,o){s(this,c),this.type=t,this.length=r,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=o,this.unary=!1,this.html5Unary=!1}e.StartTagToken=(u.prototype.toString=function(){return i.formatTag(this)},u);function u(t,e,r,n,o,i){s(this,u),this.type="startTag",this.length=e,this.text="",this.tagName=t,this.attrs=r,this.booleanAttrs=n,this.html5Unary=!1,this.unary=o,this.rest=i}e.AtomicTagToken=(l.prototype.toString=function(){return i.formatTag(this,this.content)},l);function l(t,e,r,n,o){s(this,l),this.type="atomicTag",this.length=e,this.text="",this.tagName=t,this.attrs=r,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1,this.content=o}e.EndTagToken=(f.prototype.toString=function(){return"</"+this.tagName+">"},f);function f(t,e){s(this,f),this.type="endTag",this.length=e,this.text="",this.tagName=t}},function(t,e){"use strict";e.__esModule=!0,e.escapeQuotes=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}},function(t,e){"use strict";e.__esModule=!0,e.default=function(r,n,e){var o=function(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,r=0;e=this[r];r++)if(e.tagName===t)return!0;return!1},t}(),i={startTag:function(t){var e=t.tagName;"TR"===e.toUpperCase()&&o.lastTagNameEq("TABLE")?(r.prepend("<TBODY>"),a()):n.selfCloseFix&&s.test(e)&&o.containsTagName(e)?o.lastTagNameEq(e)?u(r,o):(r.prepend("</"+t.tagName+">"),a()):t.unary||o.push(t)},endTag:function(t){o.last()?n.tagSoupFix&&!o.lastTagNameEq(t.tagName)?u(r,o):o.pop():n.tagSoupFix&&(e(),a())}};function a(){var t=function(t,e){var r=t.stream,n=c(e());return t.stream=r,n}(r,e);t&&i[t.type]&&i[t.type](t)}return function(){return a(),c(e())}};var r=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,s=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i;function c(t){return t&&"startTag"===t.type&&(t.unary=r.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function u(t,e){var r=e.pop();t.prepend("</"+r.tagName+">")}}],r.c=o,r.p="",r(0);function r(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return n[t].call(e.exports,e,e.exports,r),e.loaded=!0,e.exports}var n,o},t.exports=n()},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(t){return null!=t}function i(t,e,r){var n=void 0,o=t&&t.length||0;for(n=0;n<o;n++)e.call(r,t[n],n)}function a(t,e,r){for(var n in t)t.hasOwnProperty(n)&&e.call(r,n,t[n])}function r(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t))&&!!~t.tagName.toLowerCase().indexOf(e)}e.existy=o,e.isFunction=function(t){return"function"==typeof t},e.each=i,e.eachKey=a,e.defaults=function(r,t){return r=r||{},a(t,function(t,e){o(r[t])||(r[t]=e)}),r},e.toArray=function(r){try{return Array.prototype.slice.call(r)}catch(t){var e=function(){var e=[];return i(r,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":n(e)))return e.v}},e.last=function(t){return t[t.length-1]},e.isTag=r,e.isScript=function(t){return r(t,"script")},e.isStyle=function(t){return r(t,"style")}}],r.c=o,r.p="",r(0);function r(t){if(o[t])return o[t].exports;var e=o[t]={exports:{},id:t,loaded:!1};return n[t].call(e.exports,e,e.exports,r),e.loaded=!0,e.exports}var n,o},t.exports=e()}],o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t].call(r.exports,r,r.exports,s),r.exports}!function(){"use strict";var n=s(1),o=s(3),i=s(7),a=s(4);window.ucTag=window.ucTag||{},window.ucTag.renderAd=function(t,e){var r=(0,n.transformAuctionTargetingData)(e);(0,a.isMobileApp)(r.env)||(0,a.isAmp)(r.uuid,window)?(0,i.renderAmpOrMobileAd)(e):(0,o.renderBannerOrDisplayAd)(t,e)}}()}();
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<title>Document</title>
|
|
8
8
|
<script type="text/javascript">
|
|
9
9
|
// cookie-sync start
|
|
10
|
-
!function(
|
|
10
|
+
!function(){"use strict";var r=[,function(e,t){function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(n({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},t)).forEach(function(e){var t=a(e,2),n=t[0],r=t[1];o.setAttribute(n,r)}),o}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyIframe=function(e,t){return o(document,{height:e,width:t})},t.insertElement=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}},t.makeIframe=o}],o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}var i,e,t,n,c,s,u,l,f,d,p,y,m,g,h,v,b,w,x;function S(e,t){if("function"==typeof WeakMap)var i=new WeakMap,c=new WeakMap;return(S=function(e,t){if(!t&&e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=O(e)&&"function"!=typeof e)return o;if(n=t?c:i){if(n.has(e))return n.get(e);n.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(o,a,r):o[a]=e[a]);return o})(e,t)}function _(){return(_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e){return new RegExp(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i).test(e)}function E(e,t,n,r){t&&I(t)?"image"===e||"redirect"===e?(console.log('Invoking image pixel user sync for bidder: "'.concat(n,'"')),function(e,t){var n=new Image;n.addEventListener("load",t),n.addEventListener("error",t),n.src=e}(t,r)):"iframe"==e?(console.log('Invoking iframe pixel user sync for bidder: "'.concat(n,'"')),function(e,t,n){if(!e)return;var r=i.getEmptyIframe(0,0);r.id="sync_".concat(t,"_").concat(Date.now()),r.src=e,r.onload=n,i.insertElement(r,document,"html")}(t,n,r)):(console.log('User sync type "'.concat(e,'" not supported for bidder: "').concat(n,'"')),r()):(console.log('No valid sync url for bidder "'.concat(n,'": ').concat(t)),r())}function j(e){var t=JSON.parse(e);"ok"!==t.status&&"no_cookie"!==t.status||t.bidder_status&&!function e(t){if(0!==t.length){var n=t.pop();n.no_cookie?E(n.usersync.type,n.usersync.url,n.bidder,e.bind(null,t)):e(t)}}(t.bidder_status)}function T(e,t){var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function M(e){var t=e&&"object"===O(e)?e:{};return t.limit=p,t.coopSync=m,l&&(t.filterSettings={iframe:{bidders:"*",filter:"exclude"}}),f&&(t.bidders=f),v&&(t.account=v),t=function(e){return b.consentMetadata&&(b.consentMetadata.gdprApplies?(e.gdpr=1,e.gdpr_consent=b.consentString||""):e.gdpr=0),e}(t),JSON.stringify(t)}function k(){w=!0,function(e,t,n,r){var o=3<arguments.length&&void 0!==r?r:{};try{var a,i=o.method||(n?"POST":"GET"),c="object"===O(t)?t:{success:function(){console.log("xhr success")},error:function(e){console.log("xhr error",null,e)}};if("function"==typeof t&&(c.success=t),(a=new window.XMLHttpRequest).onreadystatechange=function(){if(4===a.readyState){var e=a.status;200<=e&&e<300||304===e?c.success(a.responseText,a):c.error(a.statusText,a)}},a.ontimeout=function(){console.log("xhr timeout after ",a.timeout,"ms")},"GET"===i&&n){var s=parseURL(e,o);_(s.search,n),e=formatURL(s)}a.open(i,e),a.timeout=3e3,o.withCredentials&&(a.withCredentials=!0),o.preflight&&a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.setRequestHeader("Content-Type",o.contentType||"text/plain"),"POST"===i&&n?a.send(n):a.send()}catch(e){console.log("xhr construction",e)}}(s,j,M(u),{withCredentials:!0})}i=S(a(1)),c={rubicon:"https://prebid-server.rubiconproject.com/cookie_sync",appnexus:"https://prebid.adnxs.com/pbs/v1/cookie_sync"},s=function(e){var t="https://prebid.adnxs.com/pbs/v1/cookie_sync";if(!e)return t;var n=c[e]||decodeURIComponent(e)||"";return I(n)?n:t}(T("endpoint",window.location.search)),u=function(e){if(e){var t=e.split(",").reduce(function(e,t){var n=t.split(":");return 2===n.length&&""!==n[0]&&""!==n[1]&&(e[n[0]]=/^\d+$/.test(n[1])?parseInt(n[1]):n[1]),e},{});return t&&Object.keys(t).length?t:void 0}}(T("args",window.location.search)),l=(e=T("source",window.location.search))&&"amp"===e.toLowerCase(),f=function(e){if(e){var t=e.split(",").filter(function(e){return!!e});if(0<t.length)return t}}(T("bidders",window.location.search)),d=T("max_sync_count",window.location.search),p=function(e){if(isNaN(e)||e<0)return 9007199254740991;return e}(parseInt(d||10,10)),y=T("coop_sync",window.location.search),m=!y||"true"===y||!!parseInt(y),t=parseInt(T("timeout",window.location.search),10),g=isNaN(t)||t!==parseInt(t,10)?1e4:t,h=0!==(n=parseInt(T("defaultGdprScope",window.location.search),10))&&1!==n?1:n,v=T("account",window.location.search),w=!(b={}),x=setTimeout(function(){w||(h||k(),console.log("Message listener timed out. No consent data was returned."))},g),window.addEventListener("message",function(e){"consent-data"===e.data.type&&(b=e.data,clearTimeout(x),w||k())},!1),window.parent.postMessage({sentinel:"amp",type:"send-consent-data"},"*")}();
|
|
11
11
|
// end.
|
|
12
12
|
</script>
|
|
13
13
|
</head>
|
package/dist/load-cookie.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<title>Document</title>
|
|
8
8
|
<script type="text/javascript">
|
|
9
9
|
// cookie-sync start
|
|
10
|
-
!function(
|
|
10
|
+
!function(){"use strict";var r=[,function(e,t){function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=e.createElement("iframe");return Object.entries(n({frameborder:0,scrolling:"no",marginheight:0,marginwidth:0,TOPMARGIN:0,LEFTMARGIN:0,allowtransparency:"true"},t)).forEach(function(e){var t=i(e,2),n=t[0],r=t[1];o.setAttribute(n,r)}),o}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyIframe=function(e,t){return o(document,{height:e,width:t})},t.insertElement=function(e,t,n){var r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{(r=r.length?r:t.getElementsByTagName("body")).length&&(r=r[0]).insertBefore(e,r.firstChild)}catch(e){}},t.makeIframe=o}],o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}var a,e,t,n,c,s,u,l,f,d,p,y,g,m,h,b;function v(e,t){if("function"==typeof WeakMap)var a=new WeakMap,c=new WeakMap;return(v=function(e,t){if(!t&&e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=_(e)&&"function"!=typeof e)return o;if(n=t?c:a){if(n.has(e))return n.get(e);n.set(e,o)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?n(o,i,r):o[i]=e[i]);return o})(e,t)}function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return new RegExp(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i).test(e)}function O(e,t,n,r){t&&x(t)?"image"===e||"redirect"===e?(console.log('Invoking image pixel user sync for bidder: "'.concat(n,'"')),function(e,t){var n=new Image;n.addEventListener("load",t),n.addEventListener("error",t),n.src=e}(t,r)):"iframe"==e?(console.log('Invoking iframe pixel user sync for bidder: "'.concat(n,'"')),function(e,t,n){if(!e)return;var r=a.getEmptyIframe(0,0);r.id="sync_".concat(t,"_").concat(Date.now()),r.src=e,r.onload=n,a.insertElement(r,document,"html")}(t,n,r)):(console.log('User sync type "'.concat(e,'" not supported for bidder: "').concat(n,'"')),r()):(console.log('No valid sync url for bidder "'.concat(n,'": ').concat(t)),r())}function S(e,t){var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}a=v(i(1)),c={rubicon:"https://prebid-server.rubiconproject.com/cookie_sync",appnexus:"https://prebid.adnxs.com/pbs/v1/cookie_sync"},s=function(e){var t="https://prebid.adnxs.com/pbs/v1/cookie_sync";if(!e)return t;var n=c[e]||decodeURIComponent(e)||"";return x(n)?n:t}(S("endpoint",window.location.search)),u=function(e){if(e){var t=e.split(",").reduce(function(e,t){var n=t.split(":");return 2===n.length&&""!==n[0]&&""!==n[1]&&(e[n[0]]=/^\d+$/.test(n[1])?parseInt(n[1]):n[1]),e},{});return t&&Object.keys(t).length?t:void 0}}(S("args",window.location.search)),l=function(e){if(e){var t=e.split(",").filter(function(e){return!!e});if(0<t.length)return t}}(S("bidders",window.location.search)),f=(e=S("source",window.location.search))&&"amp"===e.toLowerCase(),d=S("max_sync_count",window.location.search),p=function(e){if(isNaN(e)||e<0)return 9007199254740991;return e}(parseInt(d||10,10)),y=S("coop_sync",window.location.search),g=!y||"true"===y||!!parseInt(y),m=function(e){if(0===e||1===e)return e;console.log("Ignoring gdpr param, it should be 1 or 0")}(parseInt(S("gdpr",window.location.search),10)),h=function(e){if(e)return e;console.log("Ignoring gdpr_consent param, it should be a non empty value")}(S("gdpr_consent",window.location.search)),b=S("account",window.location.search),function(e,t,n,r){var o=3<arguments.length&&void 0!==r?r:{};try{var i,a=o.method||(n?"POST":"GET"),c="object"===_(t)?t:{success:function(){console.log("xhr success")},error:function(e){console.log("xhr error",null,e)}};if("function"==typeof t&&(c.success=t),(i=new window.XMLHttpRequest).onreadystatechange=function(){if(4===i.readyState){var e=i.status;200<=e&&e<300||304===e?c.success(i.responseText,i):c.error(i.statusText,i)}},i.ontimeout=function(){console.log("xhr timeout after ",i.timeout,"ms")},"GET"===a&&n){var s=parseURL(e,o);w(s.search,n),e=formatURL(s)}i.open(a,e),i.timeout=3e3,o.withCredentials&&(i.withCredentials=!0),o.preflight&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("Content-Type",o.contentType||"text/plain"),"POST"===a&&n?i.send(n):i.send()}catch(e){console.log("xhr construction",e)}}(s,function(e){var t=JSON.parse(e);"ok"!==t.status&&"no_cookie"!==t.status||t.bidder_status&&!function e(t){if(0!==t.length){var n=t.pop();n.no_cookie?O(n.usersync.type,n.usersync.url,n.bidder,e.bind(null,t)):e(t)}}(t.bidder_status)},((n=(t=u)&&"object"===_(t)?t:{}).limit=p,n.coopSync=g,m&&(n.gdpr=m),h&&(n.gdpr_consent=h),f&&(n.filterSettings={iframe:{bidders:"*",filter:"exclude"}}),l&&(n.bidders=l),b&&(n.account=b),JSON.stringify(n)),{withCredentials:!0})}();
|
|
11
11
|
// end.
|
|
12
12
|
</script>
|
|
13
13
|
</head>
|