New technology sometimes makes the world around us look unrecognizable. Photo illustration by Lisa Larson-Walker. Photos by the Library of Congress.

Computers can write music now. They’re actually not awful at it. And they’re much quicker and cheaper than human composers, without any of the ego or ambition, making them an appealing choice for anyone who needs a tune on a tight budget. You might soon hear songs written by artificial intelligence playing in the background of radio ads, YouTube shows, or video games.

A.I. has not yet penned a Top 40 hit. But it gets more talented every day. It’s likely a matter of time before a song composed entirely by a computer is rocking dance floors and climbing pop charts.

The way a computer learns to compose is by listening to whatever music you feed it and then analyzing the patterns it finds. Which raises the question: Who gets the songwriting credit—and banks the royalties—when the composer is a neural net that wrote its hit jam after imbibing, say, the entire catalog of the Beatles? Would you divvy credit between Lennon, McCartney, and whichever hoodie-clad coder programmed the software? When I spoke to the general counsel of BMI, an agency that defends songwriters’ rights, he chuckled as he confessed that nobody knows exactly how this will all shake out.

If there’s one thing we’ve learned in making The Secret History of the Future—our podcast that unearths the tech quandaries of yesterday and uses them to predict the shape of tech’s tomorrow—it’s that solutions to today’s problems are often found lurking in the past. In this case, there’s much we can learn from a story about another cutting-edge technology that once ripped apart the music business. It was called the phonograph.

When Thomas Edison invented the phonograph in 1877, it was the first time that humans could record and play back sound. And suddenly, instead of just playing concerts for cash, professional composers could also sell recordings of their music to the masses. Seems like fantastic news for the songwriters, right? But it wasn’t that simple.



The most famous American composer of his era—the equivalent of today’s mega rock stars—was John Philip Sousa, a bandleader who wrote military marches in the late 19th century that still get played today. (It’s a good bet you heard “The Stars and Stripes Forever” on the Fourth of July.) Sousa earned a fortune from barnstorming the country on his concert tours and from selling the sheet music for his compositions. But when the public began to buy phonograph recordings of his songs, Sousa discovered that he didn’t receive a dime from the sales. There were crucial flaws in the existing copyright laws, which had failed to keep up with the advance of technology.

What Sousa did next doesn’t just make for a fascinating yarn. It also prefigures copyright disputes that arose when the new technology of digital sampling exploded on the hip-hop scene in the 1980s. And it offers clues about what to do when it turns out the next John Philip Sousa is an A.I.

This is one of many stories you’ll hear in Season 2 of The Secret History of the Future. My co-host, Tom Standage, and I are back with another 10 episodes of this trans-Atlantic collaboration from Slate and the Economist. Last year, we told you about a pair of black-hat hackers from the 1830s, a chess-playing robot from the 1770s, and a bunch of influencers from the 1600s who made the fork happen, transforming it from a weird curiosity into an essential utensil. This year, we’re bringing you a whole new collection of curious tales and colorful characters from yore, in search of insights to help us navigate the big tech problems looming ahead of us.

In Season 2, you’ll meet a Finnish maritime expert who’s reinventing the way ships work, a Dutch entrepreneur who’s growing beef burgers in Petri dishes, an American futurist who’s building a mysterious clock deep inside a Texas mountain, and countless other fascinating folks. Along the way, you’ll learn …

… what the world’s oldest computer program, written by Ada Lovelace in 1843, can tell us about algorithmic bias today …

… how the potato’s lumpy introduction to Europe might offer warnings for scientists who are designing the foods of tomorrow …

… and whether past mistakes using forensic fingerprinting can help us avoid new pitfalls with DNA evidence.

New technology sometimes makes the world around us look unrecognizable. But human nature—even over the centuries—remains remarkably familiar. Again and again, as we’ve researched the stories that go into these podcast episodes, we’ve seen that the past is full of hints about what’s coming around the corner. We hope you’ll join us as we reveal The Secret History of the Future.

Seth Stevenson is a frequent contributor to Slate. He is the author of Grounded: A Down to Earth Journey Around the World.

Slate is published by The Slate Group, a Graham Holdings Company. All contents © 2019 The Slate Group LLC. All rights reserved.

Slate relies on advertising to support our journalism. If you value our work, please disable your ad blocker.

By joining Slate Plus you support our work and get exclusive content. And you'll never see this message again.

Ball Head Bolt

'):""},e.getDefinedParams=function(t,e){return e.filter(function(e){return t[e]}).reduce(function(e,n){return i(e,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,t[n]))},{})},e.isValidMediaTypes=function(t){var e=["banner","native","video"];return!!Object.keys(t).every(function(t){return X()(e,t)})&&(!t.video||!t.video.context||X()(["instream","outstream","adpod"],t.video.context))},e.getBidderRequest=function(t,e,n){return Z()(t,function(t){return 0n[t]?-1:0}};var H,K=n(3),$=n(90),Y=n.n($),J=n(10),Z=n.n(J),Q=n(8),X=n.n(Q),tt=n(11),et=n(4),nt=!1,rt="Array",it="String",ot="Function",at="Number",ut="Object",st="Boolean",ct=Object.prototype.toString,ft=Boolean(window.console),dt=Boolean(ft&&window.console.log),lt=Boolean(ft&&window.console.info),pt=Boolean(ft&&window.console.warn),ht=Boolean(ft&&window.console.error),gt={checkCookieSupport:V,createTrackPixelIframeHtml:B,getWindowSelf:p,getWindowTop:l,getAncestorOrigins:d,getTopFrameReferrer:f,getWindowLocation:h,getTopWindowLocation:c,insertUserSyncIframe:R,insertElement:C,isFn:w,triggerPixel:D,logError:y,logWarn:b,logMessage:g,logInfo:v},vt={},bt=function(t,e){return e}.bind(null,1,vt)()===vt?Function.prototype.bind:function(t){var e=this,n=Array.prototype.slice.call(arguments,1);return function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}},yt=(H=0,function(){return++H}),mt=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf}(),_t=function(t,e){return t.hasOwnProperty?t.hasOwnProperty(e):void 0!==t[e]&&t.constructor.prototype[e]!==t[e]},Et=z("timeToRespond",function(t,e){return es;)r(u,n=e[s++])&&(~o(c,n)||c.push(n));return c}},141:function(t,e,n){var r=n(18).document;t.exports=r&&r.documentElement},142:function(t,e,n){var r=n(25),i=n(41),o=n(49)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},143:function(t,e,n){n(144);for(var r=n(18),i=n(20),o=n(28),a=n(15)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},145:function(t,e,n){"use strict";var r=n(146),i=n(78);t.exports=n(148)("Set",function(t){return function(){return t(this,0=l.syncsPerBidder)return o.logWarn('Number of user syncs exceeded for "'.concat(e,'"'));if(l.filterSettings){if(function(t,e){var n=l.filterSettings;if(function(t,e){if(t.all&&t[e])return o.logWarn('Detected presence of the "filterSettings.all" and "filterSettings.'.concat(e,'" in userSync config. You cannot mix "all" with "iframe/image" configs; they are mutually exclusive.')),!1;var n=t.all?t.all:t[e],r=t.all?"all":e;if(!n)return!1;var i=n.filter,a=n.bidders;return i&&"include"!==i&&"exclude"!==i?(o.logWarn('UserSync "filterSettings.'.concat(r,".filter" setting '").concat(i,"' is not a valid option; use either 'include' or 'exclude'.")),!1):!!("*"===a||Array.isArray(a)&&0t.getTimeout()+y.config.getConfig("timeoutBuffer")&&t.executeCallback(!0)}function u(t,e){var n=t.getBidRequests(),r=S()(n,function(t){return t.bidderCode===e.bidderCode});!function(t,e){var n;if(t.bidderCode&&(0n&&(e=!1)),!e}),e&&t.run(),e}function a(t,e){void 0===t[e]?t[e]=1:t[e]++}var c=this;u=D,i=Date.now();var f=O.makeBidRequests(v,i,w,z,b);I.logInfo("Bids Requested for Auction with id: ".concat(w),f),f.forEach(function(t){var e;e=t,_=_.concat(e)});var d={};if(f.lengthe.max?t:e},{max:0}),a=u()(e.buckets,function(e){if(t>i.max*n){var o=e.precision;void 0===o&&(o=c),r=(e.max*n).toFixed(o)}else if(t=e.min*n)return e});return a&&(r=function(t,e,n){var r=void 0!==e.precision?e.precision:c,i=e.increment*n,o=e.min*n,a=Math.pow(10,r+2),u=(t*a-o*a)/(i*a),s=Math.floor(u)*i+o;return(s=Number(s.toFixed(10))).toFixed(r)}(t,a,n)),r}function o(t){ if(s.isEmpty(t)||!t.buckets||!Array.isArray(t.buckets))return!1;var e=!0;return t.buckets.forEach(function(t){void 0!==t.min&&t.max&&t.increment||(e=!1)}),e}n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o});var a=n(10),u=n.n(a),s=n(0),c=2,f={buckets:[{min:0,max:5,increment:.5}]},d={buckets:[{min:0,max:20,increment:.1}]},l={buckets:[{min:0,max:20,increment:.01}]},p={buckets:[{min:0,max:3,increment:.01},{min:3,max:8,increment:.05},{min:8,max:20,increment:.5}]},h={buckets:[{min:0,max:5,increment:.05},{min:5,max:10,increment:.1},{min:10,max:20,increment:.5}]}},52:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},53:function(t,e,n){var r=n(16),i=n(18).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},54:function(t,e,n){var r=n(31);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},55:function(t,e,n){var r=n(31);t.exports=Array.isArray||function(t){return"Array"==r(t)}},56:function(t,e,n){var r=n(14),i=n(18),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(57)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},57:function(t,e){t.exports=!0},58:function(t,e,n){var r=n(44),i=n(33),o=n(88);t.exports=function(t){return function(e,n,a){var u,s=r(e),c=i(s.length),f=o(a,c);if(t&&n!=n){for(;fe.cpm/e.video.durationBucket?-1:0};var c=n(0),f=n(36),d=n(64),l=n(46),p=n(17),h=n(63),g=n(3),v=n(2),b=n(133),y=n.n(b),m=n(10),_=n.n(m),E=n(156),S="hb_pb_cat_dur",w="hb_cache_id",T=50,A=5,x=function(){function t(t){e[t]={},e[t].bidStorage=new y.a,e[t].queueDispatcher=function(t){var e,n=1;return function(r,i,o,a){var u=this,s=function(){(function(t,e,n){(function(t){for(var e=0;e"):"";return'n n n prebid.org wrappern n ").concat(n,"n n n n ")}(t.vastUrl,t.vastImpUrl),ttlseconds:Number(t.ttl)};return"string"==typeof t.customCacheKey&&""!==t.customCacheKey&&(e.key=t.customCacheKey),e}e.b=function(t,e){var n={puts:t.map(r)};Object(i.a)(o.config.getConfig("cache.url"),function(t){return{success:function(e){var n;try{n=JSON.parse(e).responses}catch(e){return void t(e,[])}n?t(null,n):t(new Error("The cache server didn't respond with a responses property."),[])},error:function(e,n){t(new Error("Error storing video ad in the cache: ".concat(e,": ").concat(JSON.stringify(n))),[])}}}(e),JSON.stringify(n),{contentType:"text/plain",withCredentials:!0})},e.a=function(t){return"".concat(o.config.getConfig("cache.url"),"?uuid=").concat(t)};var i=n(5),o=n(3)},64:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof(t)})(t)}function i(){return(i=Object.assign||function(t){for(var e=1;e (eg mediaTypes.banner.sizes)."),t.sizes=n);if(e&&e.video){var i=e.video;if(i.playerSize)if(Array.isArray(i.playerSize)&&1===i.playerSize.length&&i.playerSize.every(function(t){return Object(f.isArrayOfNums)(t,2)}))t.sizes=i.playerSize;else if(Object(f.isArrayOfNums)(i.playerSize,2)){var o=[];o.push(i.playerSize),x.logInfo("Transforming video.playerSize from [".concat(i.playerSize,"] to [[").concat(o,"]] so it's in the proper format.")),t.sizes=i.playerSize=o}else x.logError("Detected incorrect configuration of mediaTypes.video.playerSize. Please specify only one set of dimensions in a format like: [[640, 480]]. Removing invalid mediaTypes.video.playerSize property from request."),delete t.mediaTypes.video.playerSize}if(e&&e.native){var a=e.native;a.image&&a.image.sizes&&!Array.isArray(a.image.sizes)&&(x.logError("Please use an array of sizes for native.image.sizes field. Removing invalid mediaTypes.native.image.sizes property from request."),delete t.mediaTypes.native.image.sizes),a.image&&a.image.aspect_ratios&&!Array.isArray(a.image.aspect_ratios)&&(x.logError("Please use an array of sizes for native.image.aspect_ratios field. Removing invalid mediaTypes.native.image.aspect_ratios property from request."),delete t.mediaTypes.native.image.aspect_ratios),a.icon&&a.icon.sizes&&!Array.isArray(a.icon.sizes)&&(x.logError("Please use an array of sizes for native.icon.sizes field. Removing invalid mediaTypes.native.icon.sizes property from request."),delete t.mediaTypes.native.icon.sizes)}}),t},"checkAdUnitSetup");T.getAdserverTargetingForAdUnitCodeStr=function(t){if(x.logInfo("Invoking pbjs.getAdserverTargetingForAdUnitCodeStr",arguments),t){var e=T.getAdserverTargetingForAdUnitCode(t);return x.transformAdServerTargetingObj(e)}x.logMessage("Need to call getAdserverTargetingForAdUnitCodeStr with adunitCode")},T.getAdserverTargetingForAdUnitCode=function(t){return T.getAdserverTargeting(t)[t]},T.getAdserverTargeting=function(t){return x.logInfo("Invoking pbjs.getAdserverTargeting",arguments),v.b.getAllTargeting(t)},T.getNoBids=function(){return x.logInfo("Invoking pbjs.getNoBids",arguments),a("getNoBids")},T.getBidResponses=function(){return x.logInfo("Invoking pbjs.getBidResponses",arguments),a("getBidsReceived")},T.getBidResponsesForAdUnitCode=function(t){return{bids:g.a.getBidsReceived().filter(function(e){return e.adUnitCode===t}).map(f.removeRequestId)}},T.setTargetingForGPTAsync=function(t,e){if(x.logInfo("Invoking pbjs.setTargetingForGPTAsync",arguments),Object(f.isGptPubadsDefined)()){var n=v.b.getAllTargeting(t);v.b.resetPresetTargeting(t),v.b.setTargetingForGPT(n,e),Object.keys(n).forEach(function(t){Object.keys(n[t]).forEach(function(e){"hb_adid"===e&&g.a.setStatusForBids(n[t][e],A.BID_STATUS.BID_TARGETING_SET)})}),O.emit(P,n)}else x.logError("window.googletag is not defined on the page")},T.setTargetingForAst=function(){x.logInfo("Invoking pbjs.setTargetingForAn",arguments),v.b.isApntagDefined()?(v.b.setTargetingForAst(),O.emit(P,v.b.getAllTargeting())):x.logError("window.apntag is not defined on the page")},T.renderAd=function(t,e){if(x.logInfo("Invoking pbjs.renderAd",arguments),x.logMessage("Calling renderAd with adId :"+e),t&&e)try{var n=g.a.findBidByAdId(e);if(n){n.status=A.BID_STATUS.RENDERED,n.ad=x.replaceAuctionPrice(n.ad,n.cpm),n.adUrl=x.replaceAuctionPrice(n.adUrl,n.cpm),g.a.addWinningBid(n),O.emit(R,n);var r=n.height,i=n.width,a=n.ad,s=n.mediaType,c=n.adUrl,f=n.renderer,d=document.createComment("Creative ".concat(n.creativeId," served by ").concat(n.bidder," Prebid.js Header Bidding"));if(x.insertElement(d,t,"body"),Object(S.c)(f))Object(S.b)(f,n);else if(t===document&&!x.inIframe()||"video"===s){var l="Error trying to write ad. Ad render call ad id ".concat(e," was prevented from writing to the main document.");u(U,l,n)}else if(a)t.open("text/html","replace"),t.write(a),t.close(),o(t,i,r),x.callBurl(n);else if(c){var p=x.createInvisibleIframe();p.height=r,p.width=i,p.style.display="inline",p.style.overflow="hidden",p.src=c,x.insertElement(p,t,"body"),o(t,i,r),x.callBurl(n)}else{var h="Error trying to write ad. No ad for bid response id: ".concat(e);u(M,h,n)}}else{var v="Error trying to write ad. Cannot find ad by given id : ".concat(e);u(q,v)}}catch(t){var b="Error trying to write ad Id :".concat(e," to the page:").concat(t.message);u(z,b)}else{var y="Error trying to write ad Id :".concat(e," to the page. Missing document or adId");u(L,y)}},T.removeAdUnit=function(t){x.logInfo("Invoking pbjs.removeAdUnit",arguments),t?(x.isArray(t)?t:[t]).forEach(function(t){for(var e=0;eObject(u.timestamp)()},_=function(t){return t&&(t.status&&!h()([v.BID_STATUS.BID_TARGETING_SET,v.BID_STATUS.RENDERED],t.status)||!t.status)},E=function(t){function e(e){return"string"==typeof e?[e]:g.isArray(e)?e:t.getAdUnitCodes()||[]}function n(){var e=t.getBidsReceived();return s.config.getConfig("useBidCache")||(e=e.filter(function(t){return T[t.adUnitCode]===t.auctionId})),a(e=e.filter(function(t){return Object(u.deepAccess)(t,"video.context")!==l.a}).filter(function(t){return"banner"!==t.mediaType||Object(d.c)([t.width,t.height])}).filter(_).filter(m),u.getOldestHighestCpmBid)}function f(){return t.getStandardBidderAdServerTargeting().map(function(t){return t.key}).concat(y).filter(u.uniques)}function p(t,e,n,r){return Object.keys(e.adserverTargeting).filter(E()).forEach(function(n){t.length&&t.filter(function(t){return function(n){return n.adUnitCode===e.adUnitCode&&n.adserverTargeting[t]}}(n)).forEach(function(t){return function(n){g.isArray(n.adserverTargeting[t])||(n.adserverTargeting[t]=[n.adserverTargeting[t]]),n.adserverTargeting[t]=n.adserverTargeting[t].concat(e.adserverTargeting[t]).filter(u.uniques),delete e.adserverTargeting[t]}}(n))}),t.push(e),t}function E(){var t=f();return function(e){return-1===t.indexOf(e)}}function S(t){return o({},t.adUnitCode,Object.keys(t.adserverTargeting).filter(E()).map(function(e){return o({},e.substring(0,20),[t.adserverTargeting[e]])}))}var w={},T={};return w.setLatestAuctionForAdUnit=function(t,e){T[t]=e},w.resetPresetTargeting=function(n){if(Object(u.isGptPubadsDefined)()){var r=e(n),i=t.getAdUnits().filter(function(t){return h()(r,t.code)});window.googletag.pubads().getSlots().forEach(function(t){b.forEach(function(e){i.forEach(function(n){n.code!==t.getAdUnitPath()&&n.code!==t.getSlotElementId()||t.setTargeting(e,null)})})})}},w.resetPresetTargetingAST=function(t){e(t).forEach(function(t){var e=window.apntag.getTag(t);if(e&&e.keywords){var n=Object.keys(e.keywords),r={};n.forEach(function(t){h()(b,t.toLowerCase())||(r[t]=e.keywords[t])}),window.apntag.modifyTag(t,{keywords:r})}})},w.getAllTargeting=function(t){var d=1=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},68:function(t,e,n){ var r=n(24),i=n(138),o=n(69),a=n(49)("IE_PROTO"),u=function(){},s="prototype",c=function(){var t,e=n(53)("iframe"),r=o.length;for(e.style.display="none",n(141).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("document.F=Object"),t.close(),c=t.F;r--;)delete c[s][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[s]=r(t),n=new u,u[s]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},69:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},7:function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){var e=t.bidderCode,n=t.auctionId,r=t.bidderRequestId,o=t.adUnits,a=t.labels,u=t.src;return o.reduce(function(t,o){var s=Object(f.b)(Object(f.a)(o,a),o.mediaTypes,o.sizes),l=s.active,p=s.mediaTypes,h=s.filterResults;return l?h&&E.logInfo('Size mapping filtered adUnit "'.concat(o.code,'" banner sizes from '),h.before,"to ",h.after):E.logInfo('Size mapping disabled adUnit "'.concat(o.code,'"')),l&&t.push(o.bids.filter(function(t){return t.bidder===e}).reduce(function(t,e){var s=o.nativeParams||E.deepAccess(o,"mediaTypes.native");s&&(e=i({},e,{nativeParams:Object(d.g)(s)})),e=i({},e,Object(c.getDefinedParams)(o,["mediaType","renderer"]));var l=Object(f.b)(Object(f.a)(e,a),p),h=l.active,g=l.mediaTypes,v=l.filterResults;return h?v&&E.logInfo('Size mapping filtered adUnit "'.concat(o.code,'" bidder "').concat(e.bidder,'" banner sizes from '),v.before,"to ",v.after):E.logInfo('Size mapping deactivated adUnit "'.concat(o.code,'" bidder "').concat(e.bidder,'"')),E.isValidMediaTypes(g)?e=i({},e,{mediaTypes:g}):E.logError("mediaTypes is not correctly configured for adunit ".concat(o.code)),h&&t.push(i({},e,{adUnitCode:o.code,transactionId:o.transactionId,sizes:E.deepAccess(g,"banner.sizes")||E.deepAccess(g,"video.playerSize")||[],bidId:e.bid_id||E.getUniqueIdentifierStr(),bidderRequestId:r,auctionId:n,src:u,bidRequestsCount:m.a.getCounter(o.code)})),t},[])),t},[]).reduce(c.flatten,[]).filter(function(t){return""!==t})}function a(){return I&&I.enabled&&I.testing&&s}function u(t,e,n){try{var r=A[t].getSpec();r&&r[e]&&"function"==typeof r[e]&&(E.logInfo("Invoking ".concat(t,".").concat(e)),r[e](n))}catch(n){E.logWarn("Error calling ".concat(e," of ").concat(t))}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"gdprDataHandler",function(){return j}),e.setS2STestingModule=function(t){s=t};var s,c=n(0),f=n(59),d=n(26),l=n(1),p=n(5),h=n(3),g=n(8),v=n.n(g),b=n(10),y=n.n(b),m=n(60),_=n(61),E=n(0),S=n(4),w=n(9),T={},A=T.bidderRegistry={},x=T.aliasRegistry={},I={};h.config.getConfig("s2sConfig",function(t){I=t.s2sConfig});var O={},j={consentData:null,setConsentData:function(t){j.consentData=t},getConsentData:function(){return j.consentData}};T.makeBidRequests=function(t,e,n,r,i){var u=[],f=Object(c.getBidderCodes)(t);h.config.getConfig("bidderSequence")===h.RANDOM&&(f=Object(c.shuffle)(f));var d=Object(_.b)(),l=f,p=[];if(I.enabled){a()&&(p=s.getSourceBidderMap(t)[s.CLIENT]);var g=I.bidders;l=f.filter(function(t){return!v()(g,t)||v()(p,t)});var b=function(t){var e=I.bidders,n=E.deepClone(t);return n.forEach(function(t){t.bids=t.bids.filter(function(t){return v()(e,t.bidder)&&(!a()||t.finalSource!==s.CLIENT)}).map(function(t){return t.bid_id=E.getUniqueIdentifierStr(),t})}),n=n.filter(function(t){return 0!==t.bids.length})}(t),m=E.generateUUID();g.forEach(function(t){var r=E.getUniqueIdentifierStr(),a={bidderCode:t,auctionId:n,bidderRequestId:r,tid:m,bids:o({bidderCode:t,auctionId:n,bidderRequestId:r,adUnits:E.deepClone(b),labels:i,src:S.S2S.SRC}),auctionStart:e,timeout:I.timeout,src:S.S2S.SRC,refererInfo:d};0!==a.bids.length&&u.push(a)}),b.forEach(function(t){var e=t.bids.filter(function(t){return y()(u,function(e){return y()(e.bids,function(e){return e.bidId===t.bid_id})})});t.bids=e}),u.forEach(function(t){t.adUnitsS2SCopy=b.filter(function(t){return 0<t.bids.length})})}var w=function(t){var e=E.deepClone(t);return e.forEach(function(t){t.bids=t.bids.filter(function(t){return!a()||t.finalSource!==s.SERVER})}),e=e.filter(function(t){return 0!==t.bids.length})}(t);return l.forEach(function(t){var a=E.getUniqueIdentifierStr(),s={bidderCode:t,auctionId:n,bidderRequestId:a,bids:o({bidderCode:t,auctionId:n,bidderRequestId:a,adUnits:E.deepClone(w),labels:i,src:"client"}),auctionStart:e,timeout:r,refererInfo:d},c=A[t];c||E.logError("Trying to make a request for bidder that does not exist: ".concat(t)),c&&s.bids&&0!==s.bids.length&&u.push(s)}),j.getConsentData()&&u.forEach(function(t){t.gdprConsent=j.getConsentData()}),u},T.callBids=function(t,e,n,i,o,a){if(e.length){var u=r(e.reduce(function(t,e){return t[Number(void 0!==e.src&&e.src===S.S2S.SRC)].push(e),t},[[],[]]),2),s=u[0],f=u[1];if(f.length){var d=Object(p.b)(a,o?{request:o.request.bind(null,"s2s"),done:o.done}:void 0),l=I.bidders,h=A[I.adapter],g=f[0].tid,b=f[0].adUnitsS2SCopy;if(h){var y={tid:g,ad_units:b};if(y.ad_units.length){var m=f.map(function(t){return t.start=Object(c.timestamp)(),i.bind(t)}),_=y.ad_units.reduce(function(t,e){return t.concat((e.bids||[]).reduce(function(t,e){return t.concat(e.bidder)},[]))},[]);E.logMessage("CALLING S2S HEADER BIDDERS ==== ".concat(l.filter(function(t){return v()(_,t)}).join(","))),f.forEach(function(t){w.emit(S.EVENTS.BID_REQUESTED,t)}),h.callBids(y,f,function(t,e){var r=Object(c.getBidderRequest)(f,e.bidderCode,t);r&&n.call(r,t,e)},function(){return m.forEach(function(t){return t()})},d)}}}s.forEach(function(t){t.start=Object(c.timestamp)();var e=A[t.bidderCode];E.logMessage("CALLING BIDDER ======= ".concat(t.bidderCode)),w.emit(S.EVENTS.BID_REQUESTED,t);var r=Object(p.b)(a,o?{request:o.request.bind(null,t.bidderCode),done:o.done}:void 0);e.callBids(t,n.bind(t),i.bind(t),r)})}else E.logWarn("callBids executed with no bidRequests. Were they filtered by labels or sizing?")},T.videoAdapters=[],T.registerBidAdapter=function(t,e){var n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).supportedMediaTypes,r=void 0===n?[]:n;t&&e?"function"==typeof t.callBids?(A[e]=t,v()(r,"video")&&T.videoAdapters.push(e),v()(r,"native")&&d.e.push(e)):E.logError("Bidder adaptor error for bidder code: "+e+"bidder must implement a callBids() function"):E.logError("bidAdaptor or bidderCode not specified")},T.aliasBidAdapter=function(t,e){if(void 0===A[e]){var n=A[t];if(void 0===n){var r=h.config.getConfig("s2sConfig"),o=r&&r.bidders;o&&v()(o,e)?x[e]=t:E.logError('bidderCode "'+t+'" is not an existing bidder.',"adapterManager.aliasBidAdapter")}else try{var a,u=function(t){var e=[];return v()(T.videoAdapters,t)&&e.push("video"),v()(d.e,t)&&e.push("native"),e}(t);if(n.constructor.prototype!=Object.prototype)(a=new n.constructor).setBidderCode(e);else{var s=n.getSpec();a=Object(l.newBidder)(i({},s,{code:e})),x[e]=t}T.registerBidAdapter(a,e,{supportedMediaTypes:u})}catch(e){E.logError(t+" bidder does not currently support aliasing.","adapterManager.aliasBidAdapter")}}else E.logMessage('alias name "'+e+'" has been already specified.')},T.registerAnalyticsAdapter=function(t){var e=t.adapter,n=t.code;e&&n?"function"==typeof e.enableAnalytics?(e.code=n,O[n]=e):E.logError('Prebid Error: Analytics adaptor error for analytics "'.concat(n,'"n analytics adapter must implement an enableAnalytics() function')):E.logError("Prebid Error: analyticsAdapter or analyticsCode not specified")},T.enableAnalytics=function(t){E.isArray(t)||(t=[t]),E._each(t,function(t){var e=O[t.provider];e?e.enableAnalytics(t):E.logError("Prebid Error: no analytics adapter found in registry forn ".concat(t.provider,"."))})},T.getBidAdapter=function(t){return A[t]},T.callTimedOutBidders=function(t,e,n){e=e.map(function(e){return e.params=E.getUserConfiguredParams(t,e.adUnitCode,e.bidder),e.timeout=n,e}),e=E.groupBy(e,"bidder"),Object.keys(e).forEach(function(t){u(t,"onTimeout",e[t])})},T.callBidWonBidder=function(t,e,n){e.params=E.getUserConfiguredParams(n,e.adUnitCode,e.bidder),u(t,"onBidWon",e)},T.callSetTargetingBidder=function(t,e){u(t,"onSetTargeting",e)},e.default=T},70:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},71:function(t,e,n){var r=n(20);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},72:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},73:function(t,e,n){var r=n(24);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},74:function(t,e,n){var r=n(28),i=n(15)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},75:function(t,e,n){var r=n(76),i=n(15)("iterator"),o=n(28);t.exports=n(14).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},76:function(t,e,n){var r=n(31),i=n(15)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},77:function(t,e,n){var r=n(43)("meta"),i=n(16),o=n(25),a=n(19).f,u=0,s=Object.isExtensible||function(){return!0},c=!n(30)(function(){return s(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==(void 0===t?"undefined":_typeof(t))?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return c&&d.NEED&&s(t)&&!o(t,r)&&f(t),t}}},78:function(t,e,n){var r=n(16);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},79:function(t,e,n){"use strict";e.a=function(t,e){o.adServers=o.adServers||{},o.adServers[t]=o.adServers[t]||{},Object.keys(e).forEach(function(n){o.adServers[t][n]?Object(i.logWarn)("Attempting to add an already registered function property ".concat(n," for AdServer ").concat(t,".")):o.adServers[t][n]=e[n]})};var r=n(65),i=n(0),o=Object(r.a)()},8:function(t,e,n){n(87),t.exports=n(14).Array.includes},82:function(t,e,n){"use strict";var r=n(13),i=n(40)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,1<arguments.length?arguments[1]:void 0)}}),n(34)(o)},83:function(t,e,n){t.exports=!n(21)&&!n(30)(function(){return 7!=Object.defineProperty(n(53)("div"),"a",{get:function(){return 7}}).a})},84:function(t,e,n){var r=n(16);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},85:function(t,e,n){var r=n(86);t.exports=function(t,e){return new(r(t))(e)}},86:function(t,e,n){var r=n(16),i=n(55),o=n(15)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},87:function(t,e,n){"use strict";var r=n(13),i=n(58)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,1<arguments.length?arguments[1]:void 0)}}),n(34)("includes")},88:function(t,e,n){var r=n(42),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},89:function(t,e){function n(t){return c.call(r(arguments,1),function(t,e){return e&&Object.keys(e).forEach(function(n){t[n]=e[n]}),t},t)}function r(t,e){return Array.prototype.slice.call(t,e)}function i(t){function e(t,e){return"function"==typeof t?l.call(null,"sync",t,e):"string"==typeof t&&"function"==typeof e?l.apply(null,arguments):"object"==(void 0===t?"undefined":_typeof(t))?function(t,e,n){var r=!0;void 0===e&&(e=Object.getOwnPropertyNames(t),r=!1);for(var i={},o=["constructor"];(e=e.filter(function(e){return!("function"!=typeof t[e]||-1!==o.indexOf(e)||e.match(/^_/))})).forEach(function(e){var r=e.split(":"),o=r[0],a=r[1]||"sync";if(!i[o]){var u=t[o];i[o]=t[o]=l(a,u,n?[n,o]:void 0)}}),t=Object.getPrototypeOf(t),r&&t!==s;);return i}.apply(null,arguments):void 0}function a(t){var e=Array.isArray(t)?t:t.split(".");return c.call(e,function(n,r,i){var a=n[r],u=!1;return a||(i===e.length-1?(p||g.push(function(){u||console.warn(o+": referenced '"+t+"' but it was never created")}),n[r]=d(function(t){n[r]=t,u=!0})):n[r]={})},h)}function d(t){function e(t,e,n,a){var u={hook:n,type:e,priority:a||10,remove:function(){var e=t.indexOf(u);-1!==e&&(t.splice(e,1),o(r,i))}};return t.push(u),t.sort(function(t,e){return e.priority-t.priority}),o(r,i),this}var r=[],i=[],o=function(){};return{__funHook:{install:function(e,n,a){this.type=e,this.fn=n,(o=a)(r,i),t&&t(n)}},before:function(t,n){return e.call(this,r,"before",t,n)},after:function(t,n){return e.call(this,i,"after",t,n)},getHooks:function(t){var e=r.concat(i);return"object"==(void 0===t?"undefined":_typeof(t))&&(e=e.filter(function(e){return Object.keys(t).every(function(n){return e[n]===t[n]})})),n(e,{remove:function(){return e.forEach(function(t){t.remove()}),this}})},removeAll:function(){return this.getHooks().remove()}}}function l(e,u,s){function c(){!p&&("sync"!==e||t.ready&i.SYNC)&&("async"!==e||t.ready&i.ASYNC)?"sync"!==e&&t.ready&i.QUEUE?b.apply=function(){var t=arguments;g.push(function(){h.apply(t[1],t[2])})}:b.apply=function(){throw o+": hooked function not ready"}:b.apply=l}if(u.__funHook){if(u.__funHook.type!==e)throw o+": recreated hookable with different type";return u.__funHook.fn}var l,h,v=s?a(s):d(),b={get:function(t,e){return v[e]||Reflect.get.apply(Reflect,arguments)}};return p||g.push(c),t.useProxy?h=new Proxy(u,b):n(h=function(){return b.apply?b.apply(u,this,r(arguments)):u.apply(this,arguments)},v),v.__funHook.install(e,h,function(t,r){function i(t,n,r){for(var i=t.length;0>>0,o=0;if(e)n=e;else{for(;o<i&&!(o in r);)o++;n=r[o++]}for(;o<i;)o in r&&(n=t(n,r[o],o,r)),o++;return n},f=4===function(t,e){return e}.bind(null,1,4)()?Function.prototype.bind:function(t){var e=this,n=r(arguments,1);return function(){return e.apply(t,n.concat(r(arguments)))}};t.exports=i},9:function(t,e,n){function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var i,o,a=n(0),u=n(4),s=Array.prototype.slice,c=Array.prototype.push,f=a._map(u.EVENTS,function(t){return t}),d=u.EVENT_ID_PATHS,l=[];t.exports=(i={},(o={}).on=function(t,e,n){if(function(t){return a.contains(f,t)}(t)){var r=i[t]||{que:[]};n?(r[n]=r[n]||{que:[]},r[n].que.push(e)):r.que.push(e),i[t]=r}else a.logError("Wrong event name : "+t+" Valid event names :"+f)},o.emit=function(t){!function(t,e){a.logMessage("Emitting event for: "+t);var n=e[0]||{},r=n[d[t]],o=i[t]||{que:[]},u=a._map(o,function(t,e){return e}),s=[];l.push({eventType:t,args:n,id:r}),r&&a.contains(u,r)&&c.apply(s,o[r].que),c.apply(s,o.que),a._each(s,function(t){if(t)try{t.apply(null,e)}catch(t){a.logError("Error executing handler:","events.js",t)}})}(t,s.call(arguments,1))},o.off=function(t,e,n){var r=i[t];a.isEmpty(r)||a.isEmpty(r.que)&&a.isEmpty(r[n])||n&&(a.isEmpty(r[n])||a.isEmpty(r[n].que))||(n?a._each(r[n].que,function(t){var i=r[n].que;t===e&&i.splice(a.indexOf.call(i,t),1)}):a._each(r.que,function(t){var n=r.que;t===e&&n.splice(a.indexOf.call(n,t),1)}),i[t]=r)},o.get=function(){return i},o.getEvents=function(){var t=[];return a._each(l,function(e){var n=r({},e);t.push(n)}),t},o)},90:function(t,e){t.exports=function t(e){var n=Array.isArray(e)?[]:{};for(var r in e){var i=e[r];n[r]=i&&"object"==(void 0===i?"undefined":_typeof(i))?t(i):i}return n}}}),pbjsChunk([195],{182:function(t,e,n){t.exports=n(183)},183:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof(t)})(t)}function i(){if(_&&"object"===r(window[m])&&"function"==typeof window[m].getInstance){for(var t=0;t<y.length;t++)y[t].call();y.push=function(t){t.call()},_=!1}d.logMessage("event count sent to Amplitude: "+E)}function o(t){var e={};return w.forEach(function(n){n in t&&(e[n]=t[n])}),e}function a(t){t&&t.bidderCode&&y.push(function(){var e=o(t);E++,window[m].logEvent("Prebid.js Requests",e)}),i()}function u(t){t&&t.bidderCode&&y.push(function(){if(0<t.cpm){var e=o(t);E++,window[m].logEvent("Prebid.js Bids",e)}}),i()}function s(t){y.push(function(){d._each(t,function(t){var e=o(t);E++,window[m].logEvent("Prebid.js Timeouts",e)})}),i()}function c(t){y.push(function(){var e=o(t);E++,window[m].logEvent("Prebid.js Wins",e)}),i()}Object.defineProperty(e,"__esModule",{value:!0});var f=n(9),d=n(0),l=n(4),p=n(7).default,h=l.EVENTS.BID_REQUESTED,g=l.EVENTS.BID_TIMEOUT,v=l.EVENTS.BID_RESPONSE,b=l.EVENTS.BID_WON,y=[],m=null,_=!0,E=0,S=!0,w=["bidder","bidderCode","size","cpm","statusMessage","timeToRespond","adUnitCode"],T={};T.enableAnalytics=function(t){var e=t.provider,n=t.options;if(m=e||"amplitude",S=void 0===n||void 0===n.sampling||Math.random()<parseFloat(n.sampling),n&&void 0!==n.global&&(m=n.global),S){var i=f.getEvents();d._each(i,function(t){if("object"===r(t)){var e=t.args;t.eventType===h?a(e):t.eventType===v?u(e):t.eventType===g?s(e):t.eventType===b&&c(e)}}),f.on(h,function(t){a(t)}),f.on(v,function(t){u(t)}),f.on(g,function(t){s(t)}),f.on(b,function(t){c(t)})}else d.logMessage("Prebid.js amplitude analytics disabled by sampling");this.enableAnalytics=function(){return d.logMessage("Analytics adapter already enabled, unnecessary call to `enableAnalytics`.")}},p.registerAnalyticsAdapter({adapter:T,code:"amplitude"}),e.default=T}},[182]),pbjsChunk([190],{194:function(t,e,n){t.exports=n(195)},195:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof(t)})(t)}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t){return!!(m.isArray(t)&&0<t.length)}function u(t){a(t.value)&&""===t.value[0]&&delete t.value}function s(t){var e={};if(e.sizes=c(t.sizes),e.primary_size=e.sizes[0],e.ad_types=[],e.uuid=t.bidId,t.params.placementId?e.id=parseInt(t.params.placementId,10):e.code=t.params.invCode,e.allow_smaller_sizes=t.params.allowSmallerSizes||!1,e.use_pmt_rule=t.params.usePaymentRule||!1,e.prebid=!0,e.disable_psa=!0,t.params.reserve&&(e.reserve=t.params.reserve),t.params.position&&(e.position={above:1,below:2}[t.params.position]||0),t.params.trafficSourceCode&&(e.traffic_source_code=t.params.trafficSourceCode),t.params.privateSizes&&(e.private_sizes=c(t.params.privateSizes)),t.params.supplyType&&(e.supply_type=t.params.supplyType),t.params.pubClick&&(e.pubclick=t.params.pubClick),t.params.extInvCode&&(e.ext_inv_code=t.params.extInvCode),t.params.externalImpId&&(e.external_imp_id=t.params.externalImpId),!m.isEmpty(t.params.keywords)){var n=m.transformBidderParamKeywords(t.params.keywords);0<n.length&&n.forEach(u),e.keywords=n}if((t.mediaType===S.c||m.deepAccess(t,"mediaTypes.".concat(S.c)))&&(e.ad_types.push(S.c),0===e.sizes.length&&(e.sizes=c([1,1])),t.nativeParams)){var r=function(t){var e={};return Object.keys(t).forEach(function(n){var r=R[n]&&R[n].serverName||R[n]||n,o=R[n]&&R[n].requiredParams;e[r]=i({},o,t[n]);var a=R[n]&&R[n].minimumParams;if(o&&a){var u=Object.keys(t[n]),s=Object.keys(o);0===u.filter(function(t){return!x()(s,t)}).length&&(e[r]=i({},e[r],a))}}),e}(t.nativeParams);e[S.c]={layouts:[r]}}var o=m.deepAccess(t,"mediaTypes.".concat(S.d)),a=m.deepAccess(t,"mediaTypes.video.context");return(t.mediaType===S.d||o)&&e.ad_types.push(S.d),(t.mediaType===S.d||o&&"outstream"!==a)&&(e.require_asset_url=!0),t.params.video&&(e.video={},Object.keys(t.params.video).filter(function(t){return x()(O,t)}).forEach(function(n){return e.video[n]=t.params.video[n]})),(m.isEmpty(t.mediaType)&&m.isEmpty(t.mediaTypes)||t.mediaType===S.b||t.mediaTypes&&t.mediaTypes[S.b])&&e.ad_types.push(S.b),e}function c(t){var e=[],n={};if(m.isArray(t)&&2===t.length&&!m.isArray(t[0]))n.width=parseInt(t[0],10),n.height=parseInt(t[1],10),e.push(n);else if("object"===r(t))for(var i=0;i<t.length;i++){var o=t[i];(n={}).width=parseInt(o[0],10),n.height=parseInt(o[1],10),e.push(n)}return e}function f(t){return!!t.params.user}function d(t){return!!parseInt(t.params.member,10)}function l(t){if(t.params)return!!t.params.app}function p(t){return t.params&&t.params.app?!!t.params.app.id:!!t.params.app}function h(t){return!!t.debug}function g(t){return t.mediaTypes&&t.mediaTypes.video&&t.mediaTypes.video.context===S.a}function v(t,e,n){m.isEmpty(t.video)&&(t.video={}),t.video[e]=n}function b(t){t.renderer.push(function(){window.ANOutstreamVideo.renderAd({tagId:t.adResponse.tag_id,sizes:[t.getSize().split("x")],targetId:t.adUnitCode,uuid:t.adResponse.uuid,adResponse:t.adResponse,rendererOptions:t.renderer.getConfig()},function(t,e,n){t.renderer.handleVideoEvent({id:e,eventName:n})}.bind(null,t))})}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"spec",function(){return B});var y=n(12),m=n(0),_=n(3),E=n(1),S=n(2),w=n(10),T=n.n(w),A=n(8),x=n.n(A),I="//ib.adnxs.com/ut/v3/prebid",O=["id","mimes","minduration","maxduration","startdelay","skippable","playback_method","frameworks"],j=["age","external_uid","segments","gender","dnt","language"],C=["geo","device_id"],D=["enabled","dongle","member_id","debug_timeout"],R={body:"description",body2:"desc2",cta:"ctatext",image:{serverName:"main_image",requiredParams:{required:!0},minimumParams:{sizes:[{}]}},icon:{serverName:"icon",requiredParams:{required:!0},minimumParams:{sizes:[{}]}},sponsoredBy:"sponsored_by",privacyLink:"privacy_link",salePrice:"saleprice",displayUrl:"displayurl"},B={code:"appnexus",aliases:["appnexusAst","brealtime","emxdigital","pagescience","defymedia","gourmetads","matomy","featureforward","oftmedia","districtm"],supportedMediaTypes:[S.b,S.d,S.c],isBidRequestValid:function(t){return!!(t.params.placementId||t.params.member&&t.params.invCode)},buildRequests:function(t,e){var n,r=t.map(s),i=T()(t,f);i&&(n={},Object.keys(i.params.user).filter(function(t){return x()(j,t)}).forEach(function(t){return n[t]=i.params.user[t]}));var a,u=T()(t,l);u&&u.params&&u.params.app&&(a={},Object.keys(u.params.app).filter(function(t){return x()(C,t)}).forEach(function(t){return a[t]=u.params.app[t]}));var c,b=T()(t,p);b&&b.params&&u.params.app&&u.params.app.id&&(c={appid:b.params.app.id});var y={},E={},S=m.getCookie("apn_prebid_debug")||null;if(S)try{y=JSON.parse(S)}catch(t){m.logError("AppNexus Debug Auction Cookie Error:nn"+t)}else{var w=T()(t,h);w&&w.debug&&(y=w.debug)}y&&y.enabled&&Object.keys(y).filter(function(t){return x()(D,t)}).forEach(function(t){E[t]=y[t]});var A=T()(t,d),O=A?parseInt(A.params.member,10):0,R={tags:o(r),user:n,sdk:{source:"pbjs",version:"2.8.0"}};if(0<O&&(R.member_id=O),u&&(R.device=a),b&&(R.app=c),_.config.getConfig("adpod.brandCategoryExclusion")&&(R.brand_category_uniqueness=!0),E.enabled&&(R.debug=E,m.logInfo("AppNexus Debug Auction Settings:nn"+JSON.stringify(E,null,4))),e&&e.gdprConsent&&(R.gdpr_consent={consent_string:e.gdprConsent.consentString,consent_required:e.gdprConsent.gdprApplies}),e&&e.refererInfo){var B={rd_ref:encodeURIComponent(e.refererInfo.referer),rd_top:e.refererInfo.reachedTop,rd_ifs:e.refererInfo.numIframes,rd_stk:e.refererInfo.stack.map(function(t){return encodeURIComponent(t)}).join(",")};R.referrer_detection=B}return T()(t,g)&&t.filter(g).forEach(function(t){var e=function(t,e){var n=e.mediaTypes.video,r=n.durationRangeSec,i=n.requireExactDuration,a=function(t){var e=t.adPodDurationSec,n=t.durationRangeSec,r=t.requireExactDuration,i=m.getMinValueFromArray(n),o=Math.floor(e/i);return r?Math.max(o,n.length):o}(e.mediaTypes.video),u=m.getMaxValueFromArray(r),s=t.filter(function(t){return t.uuid===e.bidId}),c=m.fill.apply(m,o(s).concat([a]));if(i){var f=Math.ceil(a/r.length),d=m.chunk(c,f);r.forEach(function(t,e){d[e].map(function(e){v(e,"minduration",t),v(e,"maxduration",t)})})}else c.map(function(t){return v(t,"maxduration",u)});return c}(r,t),n=R.tags.filter(function(e){return e.uuid!==t.bidId});R.tags=[].concat(o(n),o(e))}),function(t,e){var n=[];if(15<t.tags.length){var r=m.deepClone(t);m.chunk(t.tags,15).forEach(function(t){r.tags=t;var i=JSON.stringify(r);n.push({method:"POST",url:I,data:i,bidderRequest:e})})}else{var i=JSON.stringify(t);n={method:"POST",url:I,data:i,bidderRequest:e}}return n}(R,e)},interpretResponse:function(t,e){var n=this,r=e.bidderRequest;t=t.body;var o=[];if(!t||t.error){var a="in response for ".concat(r.bidderCode," adapter");return t&&t.error&&(a+=": ".concat(t.error)),m.logError(a),o}if(t.tags&&t.tags.forEach(function(t){var e=function(t){return t&&t.ads&&t.ads.length&&T()(t.ads,function(t){return t.rtb})}(t);if(e&&0!==e.cpm&&x()(n.supportedMediaTypes,e.ad_type)){var a=function(t,e,n){var r=m.getBidRequest(t.uuid,[n]),o={requestId:t.uuid,cpm:e.cpm,creativeId:e.creative_id,dealId:e.deal_id,currency:"USD",netRevenue:!0,ttl:300,adUnitCode:r.adUnitCode,appnexus:{buyerMemberId:e.buyer_member_id,dealPriority:e.deal_priority,dealCode:e.deal_code}};if(e.rtb.video){i(o,{width:e.rtb.video.player_width,height:e.rtb.video.player_height,vastUrl:e.rtb.video.asset_url,vastImpUrl:e.notify_url,ttl:3600});if(m.deepAccess(r,"mediaTypes.video.context")===S.a){var a=Object(E.getIabSubCategory)(r.bidder,e.brand_category_id);o.meta={iabSubCatId:a},o.video={context:S.a,durationSeconds:Math.floor(e.rtb.video.duration_ms/1e3)}}if(e.renderer_url){var u=m.deepAccess(n.bids[0],"renderer.options");i(o,{adResponse:t,renderer:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=y.a.install({id:e.renderer_id,url:e.renderer_url,config:n,loaded:!1,adUnitCode:t});try{r.setRender(b)}catch(t){m.logWarn("Prebid Error calling setRender on renderer",t)}return r.setEventHandlers({impression:function(){return m.logMessage("AppNexus outstream video impression event")},loaded:function(){return m.logMessage("AppNexus outstream video loaded event")},ended:function(){m.logMessage("AppNexus outstream renderer video event"),document.querySelector("#".concat(t)).style.display="none"}}),r}(o.adUnitCode,e,u)}),o.adResponse.ad=o.adResponse.ads[0],o.adResponse.ad.video=o.adResponse.ad.rtb.video}}else if(e.rtb[S.c]){var s=e.rtb[S.c];o[S.c]={title:s.title,body:s.desc,body2:s.desc2,cta:s.ctatext,rating:s.rating,sponsoredBy:s.sponsored,privacyLink:s.privacy_link,address:s.address,downloads:s.downloads,likes:s.likes,phone:s.phone,price:s.price,salePrice:s.saleprice,clickUrl:s.link.url,displayUrl:s.displayurl,clickTrackers:s.link.click_trackers,impressionTrackers:s.impression_trackers,javascriptTrackers:s.javascript_trackers},s.main_img&&(o.native.image={url:s.main_img.url,height:s.main_img.height,width:s.main_img.width}),s.icon&&(o.native.icon={url:s.icon.url,height:s.icon.height,width:s.icon.width})}else{i(o,{width:e.rtb.banner.width,height:e.rtb.banner.height,ad:e.rtb.banner.content});try{var c=e.rtb.trackers[0].impression_urls[0],f=m.createTrackPixelHtml(c);o.ad+=f}catch(t){m.logError("Error appending tracking pixel",t)}}return o}(t,e,r);a.mediaType=function(t){var e=t.ad_type;return e===S.d?S.d:e===S.c?S.c:S.b}(e),o.push(a)}}),t.debug&&t.debug.debug_info){var u="AppNexus Debug Auction for Prebidnn"+t.debug.debug_info;u=u.replace(/(|)/gm,"t").replace(/(|)/gm,"n").replace(/^
/gm,"").replace(/(
n|
)/gm,"n").replace(/

(.*)

/gm,"nn===== $1 =====nn").replace(/(.*)/gm,"nn*** $1 ***nn").replace(/(]+)>)/gim,""),m.logMessage("https://console.appnexus.com/docs/understanding-the-debug-auction"),m.logMessage(u)}return o},getMappingFileInfo:function(){return{url:"//acdn.adnxs.com/prebid/appnexus-mapping/mappings.json",refreshInDays:7}},getUserSyncs:function(t){if(t.iframeEnabled)return[{type:"iframe",url:"//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html"}]},transformBidParams:function(t,e){return t=m.convertTypes({member:"string",invCode:"string",placementId:"number",keywords:m.transformBidderParamKeywords},t),e&&(t.use_pmt_rule="boolean"==typeof t.usePaymentRule&&t.usePaymentRule,t.usePaymentRule&&delete t.usePaymentRule,a(t.keywords)&&t.keywords.forEach(u),Object.keys(t).forEach(function(e){var n=m.convertCamelToUnderscore(e);n!==e&&(t[n]=t[e],delete t[e])})),t}};Object(E.registerBidder)(B)}},[194]),pbjsChunk([2],{249:function(t,e,n){t.exports=n(250)},250:function _(module,__webpack_exports__,__webpack_require__){"use strict";function publisherTagAvailable(){return"undefined"!=typeof Criteo&&Criteo.PubTag&&Criteo.PubTag.Adapters&&Criteo.PubTag.Adapters.Prebid}function buildContext(t){var e=__WEBPACK_IMPORTED_MODULE_3__src_utils__.getTopWindowUrl(),n=Object(__WEBPACK_IMPORTED_MODULE_2__src_url__.c)(e).search,r={url:e,debug:"1"===n.pbt_debug,noLog:"1"===n.pbt_nolog,integrationMode:void 0};return t.forEach(function(t){t.params.integrationMode&&(r.integrationMode=t.params.integrationMode)}),r}function buildCdbUrl(t){var e=CDB_ENDPOINT;return e+="?profileId="+PROFILE_ID_INLINE, e+="&av="+String(ADAPTER_VERSION),e+="&wv="+encodeURIComponent("2.8.0"),e+="&cb="+String(Math.floor(99999999999*Math.random())),t.integrationMode in INTEGRATION_MODES&&(e+="&im="+INTEGRATION_MODES[t.integrationMode]),t.debug&&(e+="&debug=1"),t.noLog&&(e+="&nolog=1"),e}function buildCdbRequest(t,e,n){var r,i={publisher:{url:t.url},slots:e.map(function(t){r=t.params.networkId||r;var e={impid:t.adUnitCode,transactionid:t.transactionId,auctionId:t.auctionId,sizes:t.sizes.map(function(t){return t[0]+"x"+t[1]})};return t.params.zoneId&&(e.zoneid=t.params.zoneId),t.params.publisherSubId&&(e.publishersubid=t.params.publisherSubId),t.params.nativeCallback&&(e.native=!0),e})};return r&&(i.publisher.networkid=r),n&&n.gdprConsent&&(i.gdprConsent={},void 0!==n.gdprConsent.gdprApplies&&(i.gdprConsent.gdprApplies=!!n.gdprConsent.gdprApplies),n.gdprConsent.vendorData&&n.gdprConsent.vendorData.vendorConsents&&void 0!==n.gdprConsent.vendorData.vendorConsents[CRITEO_VENDOR_ID.toString(10)]&&(i.gdprConsent.consentGiven=!!n.gdprConsent.vendorData.vendorConsents[CRITEO_VENDOR_ID.toString(10)]),void 0!==n.gdprConsent.consentString&&(i.gdprConsent.consentData=n.gdprConsent.consentString)),i}function createNativeAd(t,e,n){return window.criteo_prebid_native_slots=window.criteo_prebid_native_slots||{},window.criteo_prebid_native_slots[t]={callback:n,payload:e},'n var win = window;n for (var i = 0; i < 10; ++i) {n win = win.parent;n if (win.criteo_prebid_native_slots) {n var responseSlot = win.criteo_prebid_native_slots["'.concat(t,'"];n responseSlot.callback(responseSlot.payload);n break;n }n }n ')}function cryptoVerify(t,e,n){var r=new __WEBPACK_IMPORTED_MODULE_5_jsencrypt_bin_jsencrypt___default.a;return r.setPublicKey(t),r.verify(n,e,__WEBPACK_IMPORTED_MODULE_6_crypto_js_sha256___default.a)}function validateFastBid(t){var e=t.indexOf("n"),n=t.substr(0,e).trim();if("// Hash: "!==n.substr(0,9))return __WEBPACK_IMPORTED_MODULE_3__src_utils__.logWarn("No hash found in FastBid"),!1;var r=n.substr(9),i=t.substr(e+1);try{return cryptoVerify(FAST_BID_PUBKEY,r,i)}catch(t){return void __WEBPACK_IMPORTED_MODULE_3__src_utils__.logWarn("Failed to verify Criteo FastBid")}}function tryGetCriteoFastBid(){try{var fastBid=localStorage.getItem("criteo_fast_bid");null!==fastBid&&(!1===validateFastBid(fastBid)?(__WEBPACK_IMPORTED_MODULE_3__src_utils__.logWarn("Invalid Criteo FastBid found"),localStorage.removeItem("criteo_fast_bid")):(__WEBPACK_IMPORTED_MODULE_3__src_utils__.logInfo("Using Criteo FastBid"),eval(fastBid)))}catch(t){}}Object.defineProperty(__webpack_exports__,"__esModule",{value:!0}),__webpack_require__.d(__webpack_exports__,"FAST_BID_PUBKEY",function(){return FAST_BID_PUBKEY}),__webpack_require__.d(__webpack_exports__,"spec",function(){return spec}),__webpack_exports__.cryptoVerify=cryptoVerify;var __WEBPACK_IMPORTED_MODULE_0__src_adloader__=__webpack_require__(47),__WEBPACK_IMPORTED_MODULE_1__src_adapters_bidderFactory__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2__src_url__=__webpack_require__(11),__WEBPACK_IMPORTED_MODULE_3__src_utils__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_4_core_js_library_fn_array_find__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4_core_js_library_fn_array_find___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_core_js_library_fn_array_find__),__WEBPACK_IMPORTED_MODULE_5_jsencrypt_bin_jsencrypt__=__webpack_require__(251),__WEBPACK_IMPORTED_MODULE_5_jsencrypt_bin_jsencrypt___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_jsencrypt_bin_jsencrypt__),__WEBPACK_IMPORTED_MODULE_6_crypto_js_sha256__=__webpack_require__(252),__WEBPACK_IMPORTED_MODULE_6_crypto_js_sha256___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_crypto_js_sha256__),ADAPTER_VERSION=16,BIDDER_CODE="criteo",CDB_ENDPOINT="//bidder.criteo.com/cdb",CRITEO_VENDOR_ID=91,INTEGRATION_MODES={amp:1},PROFILE_ID_INLINE=207,PROFILE_ID_PUBLISHERTAG=185,PUBLISHER_TAG_URL="//static.criteo.net/js/ld/publishertag.prebid.js",FAST_BID_PUBKEY="-----BEGIN PUBLIC KEY-----nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDO1BjAITkFTtP0IMzmF7qsqhpuny1dGaTPHnjMU9mRZsrnfR3C0sEN5pYEzEcFRPnkJjJuhH8Rnh5+CE+LcKg0Z8ZZ7nOmOSj0/qnYTAYCu0cR5LiyWG79KlIgUyMbp92ulGg24gAyGrVn4+v/4c53WlOEUpn4YWvb82G0CD5NcDNpQIDAQABn-----END PUBLIC KEY-----",spec={code:BIDDER_CODE,isBidRequestValid:function(t){return!(!t||!t.params||!t.params.zoneId&&!t.params.networkId)},buildRequests:function(t,e){var n,r;if(publisherTagAvailable()||(window.Criteo=window.Criteo||{},window.Criteo.usePrebidEvents=!1,tryGetCriteoFastBid(),setTimeout(function(){Object(__WEBPACK_IMPORTED_MODULE_0__src_adloader__.a)(PUBLISHER_TAG_URL,BIDDER_CODE)},e.timeout)),publisherTagAvailable()){var i=new Criteo.PubTag.Adapters.Prebid(PROFILE_ID_PUBLISHERTAG,ADAPTER_VERSION,t,e,"2.8.0");n=i.buildCdbUrl(),r=i.buildCdbRequest()}else{var o=buildContext(t);n=buildCdbUrl(o),r=buildCdbRequest(o,t,e)}if(r)return{method:"POST",url:n,data:r,bidRequests:t}},interpretResponse:function(t,e){var n=t.body||t;if(publisherTagAvailable()){var r=Criteo.PubTag.Adapters.Prebid.GetAdapter(e);if(r)return r.interpretResponse(n,e)}var i=[];return n&&n.slots&&__WEBPACK_IMPORTED_MODULE_3__src_utils__.isArray(n.slots)&&n.slots.forEach(function(t){var n=__WEBPACK_IMPORTED_MODULE_4_core_js_library_fn_array_find___default()(e.bidRequests,function(e){return e.adUnitCode===t.impid&&(!e.params.zoneId||parseInt(e.params.zoneId)===t.zoneid)}),r=n.bidId,o={requestId:r,adId:t.bidId||__WEBPACK_IMPORTED_MODULE_3__src_utils__.getUniqueIdentifierStr(),cpm:t.cpm,currency:t.currency,netRevenue:!0,ttl:t.ttl||60,creativeId:r,width:t.width,height:t.height};t.native?o.ad=createNativeAd(r,t.native,n.params.nativeCallback):o.ad=t.creative,i.push(o)}),i},onTimeout:function(t){publisherTagAvailable()&&Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleBidTimeout()},onBidWon:function(t){publisherTagAvailable()&&Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleBidWon(t)},onSetTargeting:function(t){publisherTagAvailable()&&Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleSetTargeting(t)}};Object(__WEBPACK_IMPORTED_MODULE_1__src_adapters_bidderFactory__.registerBidder)(spec)},251:function(t,e,n){!function(t){"use strict";function e(t){return _.charAt(t)}function n(t,e){return t&e}function r(t,e){return t|e}function i(t,e){return t^e}function o(t,e){return t&~e}function a(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function u(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function s(t){var e,n,r="";for(e=0;e+3>6)+E.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=E.charAt(n<>2)+E.charAt((3&n)<<4));0<(3&r.length);)r+="=";return r}function c(t){var n,r="",i=0,o=0;for(n=0;n<t.length&&"="!=t.charAt(n);++n){var a=E.indexOf(t.charAt(n));a>2),o=3&a,1):1==i?(r+=e(o<>4),o=15&a,2):2==i?(r+=e(o),r+=e(a>>2),o=3&a,3):(r+=e(o<>4),r+=e(15&a),0))}return 1==i&&(r+=e(o<e&&(t=t.substring(0,e)+I),t}function d(){return new k(null)}function l(t,e){return new k(t,e)}function p(t,e){var n=V[t.charCodeAt(e)];return null==n?-1:n}function h(t){var e=d();return e.fromInt(t),e}function g(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function v(){if(null==F){for(F=new G;W<H;){var t=Math.floor(65536*Math.random());K[W++]=255&t}for(F.init(K),W=0;W<K.length;++W)K[W]=0;W=0}return F.next()}var b,y,m,_="0123456789abcdefghijklmnopqrstuvwxyz",E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},w=function(t){var e;if(void 0===b){var n="0123456789ABCDEF",r=" fnrt u2028u2029";for(b={},e=0;e<16;++e)b[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)b[n.charAt(e)]=e;for(e=0;e<r.length;++e)b[r.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;e<t.length;++e){var u=t.charAt(e);if("="==u)break;if(-1!=(u=b[u])){if(void 0===u)throw new Error("Illegal character at offset "+e);o|=u,2<=++a?(i[i.length]=o,a=o=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i},T={decode:function(t){var e;if(void 0===y){var n="= fnrt u2028u2029";for(y=Object.create(null),e=0;e<64;++e)y["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;e<n.length;++e)y[n.charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=y[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);i|=a,4>16,r[r.length]=i>>8&255,r[r.length]=255&i,o=i=0):i<>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+/=s]+)-----END [^-]+-----|begin-base64[^n]+n([A-Za-z0-9+/=s]+)====/,unarmor:function(t){var e=T.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return T.decode(t)}},A=1e13,x=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*t+e)<A?e=0:r-=(e=0|r/A)*A,i[n]=r;0<e&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)t=(n=r[e]-t)<0?(n+=A,1):0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;0<=r;--r)n+=(A+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||176<r)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):191<i&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;o<e;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?O:j).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=127<r,o=i?255:0,a="";r==o&&++t<e;)r=this.get(t);if(0==(n=e-t))return i?-1:0;if(4<n){for(a=r,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)n"}i&&(r-=256);for(var u=new x(r),s=t+1;s<e;++s)u.mulAdd(256,this.get(s));return a+u.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)n",o="",a=t+1;a<e;++a){for(var u=this.get(a),s=a==e-1?r:0,c=7;s>c&1?"1":"0";if(o.length>n)return i+f(o,n)}return i+o},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return f(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)n";(n/=2)<r&&(e=t+n);for(var o=t;o<e;++o)i+=this.hexByte(this.get(o));return n<r&&(i+=I),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new x,o=0,a=t;a<e;++a){var u=this.get(a);if(i.mulAdd(128,127&u),o+=7,!(128&u)){if(""===r)if((i=i.simplify())instanceof x)i.sub(80),r="2."+i.toString();else{var s=i<80?in)return f(r,n);i=new x,o=0}}return 0<o&&(r+=".incomplete"),r},t}(),D=function(){function t(t,e,n,r,i){if(!(r instanceof R))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return f(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return f(this.stream.parseStringISO(e,e+n),t);case 30:return f(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(6<n)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0==n)return null;for(var r=e=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof C?e:new C(e,0);var r=new C(n),i=new R(n),o=t.decodeLength(n),a=n.pos,u=a-r.pos,s=null,c=function(){var e=[];if(null!==o){for(var r=a+o;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=a-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return e};if(i.tagConstructed)s=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var f=0;f>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var n=new x;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],P=(1<<26)/B[B.length-1],k=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var n;if(16==t)n=4;else if(8==t)n=3;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return this.toRadix(t);n=2}var r,i=(1<<n)-1,o=!1,a="",u=this.t,s=this.DB-u*this.DB%n;if(0<u--)for(s<this.DB&&0>s)&&(o=!0,a=e(r));0<=u;)s<n?(r=(this[u]&(1<<s)-1)<>(s+=this.DB-n)):(r=this[u]>>(s-=n)&i,s<=0&&(s+=this.DB,--u)),0<r&&(o=!0),o&&(a+=e(r));return o?a:"0"},t.prototype.negate=function(){var e=d();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;0<=--n;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+g(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=d();return this.abs().divRemTo(e,null,n),this.s<0&&0<n.compareTo(t.ZERO)&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new U(e):new M(e),this.exp(t,n)},t.prototype.clone=function(){var t=d();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(0<t--)for(r>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);0<=t;)r<8?(n=(this[t]&(1<<r)-1)<>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0<i||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return 0<this.compareTo(t)?this:t},t.prototype.and=function(t){var e=d();return this.bitwiseTo(t,n,e),e},t.prototype.or=function(t){var e=d();return this.bitwiseTo(t,r,e),e},t.prototype.xor=function(t){var e=d();return this.bitwiseTo(t,i,e),e},t.prototype.andNot=function(t){var e=d();return this.bitwiseTo(t,o,e),e},t.prototype.not=function(){for(var t=d(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=d();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=d();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+a(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,r)},t.prototype.clearBit=function(t){return this.changeBit(t,o)},t.prototype.flipBit=function(t){return this.changeBit(t,i)},t.prototype.add=function(t){var e=d();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=d();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=d();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=d();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=d();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=d(),n=d();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=h(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new U(e):e.isEven()?new z(e):new M(e);var a=[],u=3,s=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),1<n){var f=d();for(r.sqrTo(a[1],f);u<=c;)a[u]=d(),r.mulTo(f,a[u-2],a[u]),u+=2}var l,p,v=t.t-1,b=!0,y=d();for(i=g(t[v])-1;0<=v;){for(s>i-s&c:(l=(t[v]&(1<<i+1)-1)<<s-i,0>this.DB+i-s)),u=n;0==(1&l);)l>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)a[l].copyTo(o),b=!1;else{for(;1<u;)r.sqrTo(o,y),r.sqrTo(y,o),u-=2;0<u?r.sqrTo(o,y):(p=o,o=y,y=p),r.mulTo(y,a[l],o)}for(;0<=v&&0==(t[v]&1<<i);)r.sqrTo(o,y),p=o,o=y,y=p,--i<0&&(i=this.DB-1,--v)}return r.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=h(1),a=h(0),u=h(0),s=h(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(u.isEven()&&s.isEven()||(u.addTo(this,u),s.subTo(e,s)),u.rShiftTo(1,u)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);0<=r.compareTo(i)?(r.subTo(i,r),n&&o.subTo(u,o),a.subTo(s,a)):(i.subTo(r,i),n&&u.subTo(o,u),s.subTo(a,s))}return 0!=i.compareTo(t.ONE)?t.ZERO:0<=s.compareTo(e)?s.subtract(e):s.signum()<0?(s.addTo(e,s),s.signum()<0?s.add(e):s):s},t.prototype.pow=function(t){return this.exp(t,new N)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),0<o&&(e.rShiftTo(o,e),n.rShiftTo(o,n));0<e.signum();)0<(i=e.getLowestSetBit())&&e.rShiftTo(i,e),0<(i=n.getLowestSetBit())&&n.rShiftTo(i,n),0<=e.compareTo(n)?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return 0<o&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=B[B.length-1]){for(e=0;e<B.length;++e)if(n[0]==B[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<B.length;){for(var r=B[e],i=e+1;i<B.length&&r<P;)r*=B[i++];for(r=n.modInt(r);e<i;)if(r%B[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;0<=--i;){var u=8==r?255&+e[i]:p(e,i);uthis.DB?(this[this.t-1]|=(u&(1<<this.DB-a)-1)<>this.DB-a):this[this.t-1]|=u<=this.DB&&(a-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,0<a&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,u=this.t-1;0>r|a,a=(this[u]&i)<<n;for(u=o-1;0=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<>r;for(var a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<>r;0<r&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n>=this.DB;if(t.t<this.t){for(r-=t.s;n>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:0<r&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;0<=--o;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;0<=--n;)t[n]=0;for(n=0;n=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=d());var a=d(),u=this.s,s=e.s,c=this.DB-g(i[i.t-1]);0<c?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var f=a.t,l=a[f-1];if(0!=l){var p=l*(1<<this.F1)+(1>this.F2:0),h=this.FV/p,v=(1<<this.F1)/p,b=1<<this.F2,y=r.t,m=y-f,_=null==n?d():n;for(a.dlShiftTo(m,_),0<=r.compareTo(_)&&(r[r.t++]=1,r.subTo(_,r)),t.ONE.dlShiftTo(f,_),_.subTo(a,a);a.t<f;)a[a.t++]=0;for(;0<=--m;){var E=r[--y]==l?this.DM:Math.floor(r[y]*h+(r[y-1]+b)*v);if((r[y]+=a.am(0,E,r,m,0,f))<E)for(a.dlShiftTo(m,_),r.subTo(_,r);r[y]<--E;)r.subTo(_,r)}null!=n&&(r.drShiftTo(f,n),u!=s&&t.ZERO.subTo(n,n)),r.t=f,r.clamp(),0<c&&r.rShiftTo(c,r),u<0&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return 0<(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},t.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(4294967295<e||e<1)return t.ONE;var r=d(),i=d(),o=n.convert(this),a=g(e)-1;for(o.copyTo(r);0<=--a;)if(n.sqrTo(r,i),0<(e&1<<a))n.mulTo(i,o,r);else{var u=r;r=i,i=u}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=h(n),i=d(),o=d(),a="";for(this.divRemTo(r,i,o);0<i.signum();)a=(n+o.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(t)+a},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,u=0,s=0;s<e.length;++s){var c=p(e,s);c=r&&(this.dMultiply(i),this.dAddOffset(u,0),u=a=0))}0<a&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(u,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,i){if("number"==typeof n)if(ee&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var o=[],a=7&e;o.length=1+(e>>3),n.nextBytes(o),0<a?o[0]&=(1<<a)-1:o[0]=0,this.fromString(o,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n>=this.DB;if(t.t<this.t){for(r+=t.s;n>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=r<0?-1:0,0<r?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;0<r;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;0<=--r;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(0<this.t)if(0==e)n=this[0]%t;else for(var r=this.t-1;0<=r;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);B.length>1)&&(e=B.length);for(var o=d(),a=0;a<e;++a){o.fromInt(B[Math.floor(Math.random()*B.length)]);var u=o.modPow(i,this);if(0!=u.compareTo(t.ONE)&&0!=u.compareTo(n)){for(var s=1;s++<r&&0!=u.compareTo(n);)if(0==(u=u.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=u.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=d();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit() ;if(a<0)e(n);else{o<a&&(a=o),0<a&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var u=function t(){0<(o=n.getLowestSetBit())&&n.rShiftTo(o,n),0<(o=r.getLowestSetBit())&&r.rShiftTo(o,r),0<=n.compareTo(r)?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),0<n.signum()?setTimeout(t,0):(0<a&&r.lShiftTo(a,r),setTimeout(function(){e(r)},0))};setTimeout(u,10)}},t.prototype.fromNumberAsync=function(e,n,i,o){if("number"==typeof n)if(ee&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(n)?setTimeout(function(){o()},0):setTimeout(r,0)};setTimeout(u,0)}else{var s=[],c=7&e;s.length=1+(e>>3),n.nextBytes(s),0<c?s[0]&=(1<<c)-1:s[0]=0,this.fromString(s,256)}},t}(),N=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),U=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||0>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=d();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(k.ZERO)&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=d();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),z=function(){function t(t){this.m=t,this.r2=d(),this.q3=d(),k.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0>15;0>15,f=u*s+c*a;i=((s=a*s+((32767&f)<>>30)+(f>>>15)+u*c+(i>>>30),n[r++]=1073741823&s}return i},30):"Netscape"!=navigator.appName?(k.prototype.am=function(t,e,n,r,i,o){for(;0>14;0>14,f=u*s+c*a;i=((s=a*s+((16383&f)<>28)+(f>>14)+u*c,n[r++]=268435455&s}return i},28),k.prototype.DB=m,k.prototype.DM=(1<<m)-1,k.prototype.DV=1<<m,k.prototype.FV=Math.pow(2,52),k.prototype.F1=52-m,k.prototype.F2=2*m-52;var q,L,V=[];for(q="0".charCodeAt(0),L=0;L<=9;++L)V[q++]=L;for(q="a".charCodeAt(0),L=10;L<36;++L)V[q++]=L;for(q="A".charCodeAt(0),L=10;L<36;++L)V[q++]=L;k.ZERO=h(0),k.ONE=h(1);var F,W,G=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(e=n=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),H=256,K=null;if(null==K){K=[];var $=void(W=0);if(window.crypto&&window.crypto.getRandomValues){var Y=new Uint32Array(256);for(window.crypto.getRandomValues(Y),$=0;$<Y.length;++$)K[W++]=255&Y[$]}var J=function t(e){if(this.count=this.count||0,256<=this.count||H<=W)window.removeEventListener?window.removeEventListener("mousemove",t,!1):window.detachEvent&&window.detachEvent("onmousemove",t);else try{var n=e.x+e.y;K[W++]=255&n,this.count+=1}catch(e){}};window.addEventListener?window.addEventListener("mousemove",J,!1):window.attachEvent&&window.attachEvent("onmousemove",J)}var Z=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=v()},t}(),Q=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=l(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;0<=r&&0<e;){var i=t.charCodeAt(r--);i<128?n[--e]=i:127<i&&i>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new Z,a=[];2>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=l(t,16),this.e=parseInt(e,16),this.d=l(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,a,u){null!=t&&null!=e&&0<t.length&&0>1;this.e=parseInt(e,16);for(var i=new k(e,16);;){for(;this.p=new k(t-r,1,n),0!=this.p.subtract(k.ONE).gcd(i).compareTo(k.ONE)||!this.p.isProbablePrime(10););for(;this.q=new k(r,1,n),0!=this.q.subtract(k.ONE).gcd(i).compareTo(k.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(k.ONE),u=this.q.subtract(k.ONE),s=a.multiply(u);if(0==s.gcd(i).compareTo(k.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=l(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),r=0;r=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):191<o&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<>3)},t.prototype.generateAsync=function(t,e,n){var r=new Z,i=t>>1;this.e=parseInt(e,16);var o=new k(e,16),a=this,u=function e(){var u=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q,a.q=t}var r=a.p.subtract(k.ONE),i=a.q.subtract(k.ONE),u=r.multiply(i);0==u.gcd(o).compareTo(k.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(u),a.dmp1=a.d.mod(r),a.dmq1=a.d.mod(i),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(e,0)},s=function t(){a.q=d(),a.q.fromNumberAsync(i,1,r,function(){a.q.subtract(k.ONE).gcda(o,function(e){0==e.compareTo(k.ONE)&&a.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(t,0)})})},c=function e(){a.p=d(),a.p.fromNumberAsync(t-i,1,r,function(){a.p.subtract(k.ONE).gcda(o,function(t){0==t.compareTo(k.ONE)&&a.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(e,0)})})};setTimeout(c,0)};setTimeout(u,0)},t.prototype.sign=function(t,e,n){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return l("0001"+r+"00"+t,16)}(function(t){return X[t]||""}(n)+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},t.prototype.verify=function(t,e,n){var r=l(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in X)if(X.hasOwnProperty(e)){var n=X[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}(i.toString(16).replace(/^1f+00/,""))==n(t).toString()},t}(),X={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;i<a.length;i+=1){var n=a[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new k(r,16).xor(t).add(k.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,o=e.DEROctetString,a=e.DERNull,u=e.DERObjectIdentifier,s=e.DEREnumerated,c=e.DERUTF8String,f=e.DERNumericString,d=e.DERPrintableString,l=e.DERTeletexString,p=e.DERIA5String,h=e.DERUTCTime,g=e.DERGeneralizedTime,v=e.DERSequence,b=e.DERSet,y=e.DERTaggedObject,m=e.ASN1Util.newObject,_=Object.keys(t);if(1!=_.length)throw"key of param shall be only one.";var E=_[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+E+":"))throw"undefined key: "+E;if("bool"==E)return new n(t[E]);if("int"==E)return new r(t[E]);if("bitstr"==E)return new i(t[E]);if("octstr"==E)return new o(t[E]);if("null"==E)return new a(t[E]);if("oid"==E)return new u(t[E]);if("enum"==E)return new s(t[E]);if("utf8str"==E)return new c(t[E]);if("numstr"==E)return new f(t[E]);if("prnstr"==E)return new d(t[E]);if("telstr"==E)return new l(t[E]);if("ia5str"==E)return new p(t[E]);if("utctime"==E)return new h(t[E]);if("gentime"==E)return new g(t[E]);if("seq"==E){for(var S=t[E],w=[],T=0;T<S.length;T++){var A=m(S[T]);w.push(A)}return new v({array:w})}if("set"==E){for(S=t[E],w=[],T=0;T<S.length;T++)A=m(S[T]),w.push(A);return new b({array:w})}if("tag"==E){var x=t[E];if("[object Array]"===Object.prototype.toString.call(x)&&3==x.length){var I=m(x[2]);return new y({tag:x[0],explicit:x[1],obj:I})}var O={};if(void 0!==x.explicit&&(O.explicit=x.explicit),void 0!==x.tag&&(O.tag=x.tag),void 0===x.obj)throw"obj shall be specified for 'tag'.";return O.obj=m(x.obj),new y(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var o=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);r+=o.substr(1,7),"0"==o.substr(0,1)&&(e=e+"."+new k(r,2).toString(10),r="")}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",r=t.split("."),i=40*parseInt(r[0])+parseInt(r[1]);n+=e(i),r.splice(0,2);for(var o=0;o<r.length;o++)n+=function(t){var n="",r=new k(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var u=r.substr(a,7);a!=r.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n}(r[o]);return n},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(15=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var a=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new k(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new k(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var u=r.substr(a,7);a!=r.length-7&&(u="1"+u),n+=e(parseInt(u,2))}return n};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new k(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return function(t,e){function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^s*(?:[0-9A-Fa-f][0-9A-Fa-f]s*)+$/.test(t)?w(t):T.unarmor(t),i=D.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=l(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=l(o,16);var a=i.sub[4].getHexStringValue();this.p=l(a,16);var u=i.sub[5].getHexStringValue();this.q=l(u,16);var s=i.sub[6].getHexStringValue();this.dmp1=l(s,16);var c=i.sub[7].getHexStringValue();this.dmq1=l(c,16);var f=i.sub[8].getHexStringValue();this.coeff=l(f,16)}else{if(2!==i.sub.length)return!1;var d=i.sub[1].sub[0];e=d.sub[0].getHexStringValue(),this.n=l(e,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]};return new et.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return s(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new et.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return s(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(Q),rt=function(){function t(t){t=t||{},this.default_key_size=parseInt(t.default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(c(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return s(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return s(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,c(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=rt,t.JSEncrypt=rt,t.default=rt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},252:function(t,e,n){var r;r=function(t){return function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,u=[],s=[];!function(){function t(t){return 4294967296*(t-(0|t))|0}for(var n=2,r=0;r<64;)(function(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0})(n)&&(r<8&&(u[r]=t(e.pow(n,.5))),s[r]=t(e.pow(n,1/3)),r++),n++}();var c=[],f=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(u.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],f=n[5],d=n[6],l=n[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var h=c[p-15],g=(h<>>7)^(h<>>18)^h>>>3,v=c[p-2],b=(v<>>17)^(v<>>19)^v>>>10;c[p]=g+c[p-7]+b+c[p-16]}var y=r&i^r&o^i&o,m=(r<>>2)^(r<>>13)^(r<>>22),_=l+((u<>>6)^(u<>>11)^(u<>>25))+(u&f^~u&d)+s[p]+c[p];l=d,d=f,f=u,u=a+_|0,a=o,o=i,i=r,r=_+(m+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+f|0,n[6]=n[6]+d|0,n[7]=n[7]+l|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<>>9<>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),t.SHA256},t.exports=r(n(253))},253:function(t,e,n){var r;r=function(){var t,e,n,r,i,o,a,u,s,c,f,d,l=l||(t=Math,e=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r=(n={}).lib={},i=r.Base={extend:function(t){var n=e(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),(n.init.prototype=n).$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],i=0;i>16)&r)<>16)&r)&r;return i/=4294967296,(i+=.5)*(.5<t.random()?1:-1)}}(4294967296*(n||t.random())) ;n=987654071*a(),r.push(4294967296*a()|0)}return new o.init(r,e)}}),a=n.enc={},u=a.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new o.init(n,e/2)}},s=a.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new o.init(n,e)}},c=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return s.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,u=i/(4*a),s=(u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*a,c=t.min(4*s,i);if(s){for(var f=0;f<s;f+=a)this._doProcessBlock(r,f);var d=r.splice(0,s);n.sigBytes-=c}return new o.init(d,c)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),r.Hasher=f.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new d.HMAC.init(t,n).finalize(e)}}}),d=n.algo={},n);return l},t.exports=r()}},[249]),pbjsChunk([0],{328:function(t,e,n){t.exports=n(329)},329:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof(t)})(t)}function i(t){return c()(t)&&2===t.length&&d()(t[0])&&d()(t[1])}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"spec",function(){return g});var o=n(0),a=n(2),u=n(3),s=n(330),c=n.n(s),f=n(332),d=n.n(f),l=n(1),p=[a.b],h={JPY:1},g={code:"ix",supportedMediaTypes:p,isBidRequestValid:function(t){if(!i(t.params.size))return!1;if(!function(t,e){if(i(t))return t[0]===e[0]&&t[1]===e[1];for(var n=0;n<t.length;n++)if(t[n][0]===e[0]&&t[n][1]===e[1])return!0;return!1}(t.sizes,t.params.size))return!1;if(t.hasOwnProperty("mediaType")&&"banner"!==t.mediaType)return!1;if(t.hasOwnProperty("mediaTypes")&&!o.deepAccess(t,"mediaTypes.banner.sizes"))return!1;if("string"!=typeof t.params.siteId&&"number"!=typeof t.params.siteId)return!1;var e=t.params.hasOwnProperty("bidFloor"),n=t.params.hasOwnProperty("bidFloorCur");return!e&&!n||e&&n&&function(t,e){return Boolean("number"==typeof t&&"string"==typeof e&&e.match(/^[A-Z]{3}$/))}(t.params.bidFloor,t.params.bidFloorCur)},buildRequests:function(t,e){for(var n,i,a=[],s=null,c=null,f="https://as-sec.casalemedia.com/cygnus",d=0;d<t.length;d++)s=t[d],i=void 0,(i={}).id=(n=s).bidId,i.banner={},i.banner.w=n.params.size[0],i.banner.h=n.params.size[1],i.banner.topframe=o.inIframe()?0:1,i.ext={},i.ext.siteID=n.params.siteId,!n.params.hasOwnProperty("id")||"string"!=typeof n.params.id&&"number"!=typeof n.params.id?i.ext.sid="".concat(n.params.size[0],"x").concat(n.params.size[1]):i.ext.sid=String(n.params.id),n.params.hasOwnProperty("bidFloor")&&n.params.hasOwnProperty("bidFloorCur")&&(i.bidfloor=n.params.bidFloor,i.bidfloorcur=n.params.bidFloorCur),c=i,a.push(c);var l={};if(l.id=t[0].bidderRequestId,l.imp=a,l.site={},l.ext={},l.ext.source="prebid",document.referrer&&""!==document.referrer&&(l.site.ref=document.referrer),e){if(e.gdprConsent){var p=e.gdprConsent;p.hasOwnProperty("gdprApplies")&&(l.regs={ext:{gdpr:p.gdprApplies?1:0}}),p.hasOwnProperty("consentString")&&(l.user={ext:{consent:p.consentString||""}})}e.refererInfo&&(l.site.page=e.refererInfo.referer,e.refererInfo.referer&&0!==e.refererInfo.referer.indexOf("https")&&(f="http://as.casalemedia.com/cygnus"))}var h={},g=u.config.getConfig("ix");if(g){if("object"===r(g.firstPartyData)){var v=g.firstPartyData,b="?";for(var y in v)v.hasOwnProperty(y)&&(b+="".concat(encodeURIComponent(y),"=").concat(encodeURIComponent(v[y]),"&"));b=b.slice(0,-1),l.site.page+=b}"number"==typeof g.timeout&&(h.t=g.timeout)}return h.s=t[0].params.siteId,h.v=7.2,h.r=JSON.stringify(l),h.ac="j",h.sd=1,{method:"GET",url:f,data:h}},interpretResponse:function(t){var e=[],n=null;if(!t.hasOwnProperty("body")||!t.body.hasOwnProperty("seatbid"))return e;for(var r,i,a,u=t.body,s=u.seatbid,c=0;c<s.length;c++)if(s[c].hasOwnProperty("bid"))for(var f=s[c].bid,d=0;d<f.length;d++)r=f[d],i=u.cur,a=void 0,a={},h.hasOwnProperty(i)?a.cpm=r.price/h[i]:a.cpm=r.price/100,a.requestId=r.impid,a.width=r.w,a.height=r.h,a.ad=r.adm,a.dealId=o.deepAccess(r,"ext.dealid"),a.ttl=35,a.netRevenue=!0,a.currency=i,a.creativeId=r.hasOwnProperty("crid")?r.crid:"-",a.meta={},a.meta.networkId=o.deepAccess(r,"ext.dspid"),a.meta.brandId=o.deepAccess(r,"ext.advbrandid"),a.meta.brandName=o.deepAccess(r,"ext.advbrand"),n=a,e.push(n);return e},transformBidParams:function(t,e){return o.convertTypes({siteID:"number"},t)}};Object(l.registerBidder)(g)},330:function(t,e,n){n(331),t.exports=n(14).Array.isArray},331:function(t,e,n){var r=n(13);r(r.S,"Array",{isArray:n(55)})},332:function(t,e,n){n(333),t.exports=n(14).Number.isInteger},333:function(t,e,n){var r=n(13);r(r.S,"Number",{isInteger:n(334)})},334:function(t,e,n){var r=n(16),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}}},[328]),pbjsChunk([106],{395:function(t,e,n){t.exports=n(396)},396:function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){for(var e in t)t.hasOwnProperty(e)&&(t[e]||delete t[e]);return c._map(Object.keys(t),function(e){return"".concat(e,"=").concat(t[e])}).join("&")}function o(t,e){var n,r=c.inIframe();if(n={ju:u.config.getConfig("pageUrl")||c.getTopWindowUrl(),jr:c.getTopWindowReferrer(),ch:document.charSet||document.characterSet,res:"".concat(screen.width,"x").concat(screen.height,"x").concat(screen.colorDepth),ifr:r,tz:(new Date).getTimezoneOffset(),tws:function(t){var e,n,r,i=window,o=document,a=o.documentElement;if(t){try{i=window.top,o=window.top.document}catch(t){return}a=o.documentElement,r=o.body,e=i.innerWidth||a.clientWidth||r.clientWidth,n=i.innerHeight||a.clientHeight||r.clientHeight}else a=o.documentElement,e=i.innerWidth||a.clientWidth,n=i.innerHeight||a.clientHeight;return"".concat(e,"x").concat(n)}(r),be:1,bc:t[0].params.bc||"".concat(g,"_").concat(v),dddid:c._map(t,function(t){return t.transactionId}).join(","),nocache:(new Date).getTime()},t[0].params.platform&&(n.ph=t[0].params.platform),c.deepAccess(e,"gdprConsent")){var i=e.gdprConsent;void 0!==i.consentString&&(n.gdpr_consent=i.consentString),void 0!==i.gdprApplies&&(n.gdpr=i.gdprApplies?1:0),"iab"===u.config.getConfig("consentManagement.cmpApi")&&(n.x_gdpr_f=1)}return t[0].crumbs&&t[0].crumbs.pubcid&&(n.pubcid=t[0].crumbs.pubcid),n}function a(t,e,n){if(b){b=!1;var r,o=u.config.getConfig("bidderTimeout");window.PREBID_TIMEOUT&&(o=Math.min(window.PREBID_TIMEOUT,o));var a={bd:+new Date-n,bp:e.pub_rev,br:"0",bs:c.getTopWindowLocation().hostname,bt:o,ts:e.ts};if(a.br=a.bt<a.bd?"t":"p",t===d.d){var s=Object(l.c)(e.colo);a.ph=e.ph,r="//".concat(s.hostname,"/w/1.0/bo?").concat(i(a))}else{var p=c.deepAccess(e,"creative.0.tracking.impression").match(/([^?]+/)ri?/);p&&1<p.length&&(r="".concat(p[1],"bo?").concat(i(a)))}r&&f.a.registerSync("image",h,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.resetBoPixel=function(){b=!0},n.d(e,"spec",function(){return y});var u=n(3),s=n(1),c=n(0),f=n(27),d=n(2),l=n(11),p=[d.b,d.d],h="openx",g="hb_pb",v="2.1.6",b=!0,y={code:h,supportedMediaTypes:p,isBidRequestValid:function(t){var e=t.params.delDomain||t.params.platform;return c.deepAccess(t,"mediaTypes.banner")&&e?!!t.params.unit||0<c.deepAccess(t,"mediaTypes.banner.sizes.length"):!(!t.params.unit||!e)},buildRequests:function(t,e){if(0===t.length)return[];var n=[],i=r(function(t){return t.reduce(function(t,e){return function(t){return c.deepAccess(t,"mediaTypes.video")||t.mediaType===d.d}(e)?t[0].push(e):t[1].push(e),t},[[],[]])}(t),2),a=i[0],u=i[1];return 0<u.length&&n.push(function(t,e){var n=[],r=!1,i=o(t,e),a=c._map(t,function(t){return t.params.unit});i.aus=c._map(t,function(t){return c.parseSizesInput(t.sizes).join(",")}).join("|"),i.divIds=c._map(t,function(t){return encodeURIComponent(t.adUnitCode)}).join(","),a.some(function(t){return t})&&(i.auid=a.join(",")),t.some(function(t){return t.params.doNotTrack})&&(i.ns=1),t.some(function(t){return t.params.coppa})&&(i.tfcd=1),t.forEach(function(t){if(t.params.customParams){var e=c._map(Object.keys(t.params.customParams),function(e){return function(t,e){var n=e[t];return c.isArray(n)&&(n=n.join(",")),(t.toLowerCase()+"="+n.toLowerCase()).replace("+",".").replace("/","_")}(e,t.params.customParams)}),i=window.btoa(e.join("&"));r=!0,n.push(i)}else n.push("")}),r&&(i.tps=n.join(","));var u=[],s=!1;return t.forEach(function(t){t.params.customFloor?(u.push(Math.round(100*t.params.customFloor)/100*1e3),s=!0):u.push(0)}),s&&(i.aumfs=u.join(",")),{method:"GET",url:i.ph?"//u.openx.net/w/1.0/arj":"//".concat(t[0].params.delDomain,"/w/1.0/arj"),data:i,payload:{bids:t,startTime:new Date}}}(u,e)),0<a.length&&a.forEach(function(t){n.push(function(t,e){var n=function(t,e){var n,r,i=o([t],e),a=c.deepAccess(t,"params.video")||{},u=c.deepAccess(t,"mediaTypes.video.context"),s=c.deepAccess(t,"mediaTypes.video.playerSize");return c.isArray(t.sizes)&&2===t.sizes.length&&!c.isArray(t.sizes[0])?(n=parseInt(t.sizes[0],10),r=parseInt(t.sizes[1],10)):c.isArray(t.sizes)&&c.isArray(t.sizes[0])&&2===t.sizes[0].length?(n=parseInt(t.sizes[0][0],10),r=parseInt(t.sizes[0][1],10)):c.isArray(s)&&2===s.length&&(n=parseInt(s[0],10),r=parseInt(s[1],10)),Object.keys(a).forEach(function(t){"openrtb"===t?(a[t].w=n||a[t].w,a[t].v=r||a[t].v,i[t]=JSON.stringify(a[t])):t in i||"url"===t||(i[t]=a[t])}),i.auid=t.params.unit,i.vwd=n||a.vwd,i.vht=r||a.vht,"outstream"===u&&(i.vos="101"),a.mimes&&(i.vmimes=a.mimes),i}(t,e);return{method:"GET",url:n.ph?"//u.openx.net/v/1.0/avjp":"//".concat(t.params.delDomain,"/v/1.0/avjp"),data:n,payload:{bid:t,startTime:new Date}}}(t,e))}),n},interpretResponse:function(t,e){var n=t.body;return function(t){return/avjp$/.test(t.url)?d.d:d.b}(e)===d.d?function(t,e){var n=e.bid,r=e.startTime,i=[];if(void 0!==t&&""!==t.vastUrl&&""!==t.pub_rev){var o=Object(l.c)(t.vastUrl).search||{},u={};u.requestId=n.bidId,u.ttl=300,u.netRevenue=!0,u.currency=t.currency,u.cpm=Number(t.pub_rev)/1e3,u.width=t.width,u.height=t.height,u.creativeId=t.adid,u.vastUrl=t.vastUrl,u.mediaType=d.d,t.ph=o.ph,t.colo=o.colo,t.ts=o.ts,i.push(u),a(d.d,t,r)}return i}(n,e.payload):function(t,e){for(var n=e.bids,r=e.startTime,i=t.ads.ad,o=[],u=0;u<i.length;u++){var s=i[u],c=parseInt(s.idx,10),f={};if(f.requestId=n[c].bidId,s.pub_rev){f.cpm=Number(s.pub_rev)/1e3;var l=s.creative[0];l&&(f.width=l.width,f.height=l.height),f.creativeId=l.id,f.ad=s.html,s.deal_id&&(f.dealId=s.deal_id),f.ttl=300,f.netRevenue=!0,f.currency=s.currency,s.tbd&&(f.tbd=s.tbd),f.ts=s.ts,f.meta={},s.brand_id&&(f.meta.brandId=s.brand_id),o.push(f),a(d.b,s,r)}}return o}(n,e.payload)},getUserSyncs:function(t,e){if(t.iframeEnabled||t.pixelEnabled)return[{type:t.iframeEnabled?"iframe":"image",url:c.deepAccess(e,"0.body.ads.pixels")||c.deepAccess(e,"0.body.pixels")||"//u.openx.net/w/1.0/pd"}]},transformBidParams:function(t,e){return c.convertTypes({unit:"string",customFloor:"number"},t)}};Object(s.registerBidder)(y)}},[395]),pbjsChunk([75],{472:function(t,e,n){t.exports=n(473)},473:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(t){return(o="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof(t)})(t)}function a(){return"https:"===location.protocol}function u(t,e){var n=y.config.getConfig("pageUrl");return t.params.referrer?n=t.params.referrer:n||(n=e.refererInfo.referer),t.params.secure?n.replace(/^http:/i,"https:"):n}function s(t,e){var n=t.params;if("video"===e){var r=[];return n.video&&n.video.playerWidth&&n.video.playerHeight?r=[n.video.playerWidth,n.video.playerHeight]:Array.isArray(v.deepAccess(t,"mediaTypes.video.playerSize"))&&1===t.mediaTypes.video.playerSize.length?r=t.mediaTypes.video.playerSize[0]:Array.isArray(t.sizes)&&0<t.sizes.length&&Array.isArray(t.sizes[0])&&1<t.sizes[0].length&&(r=t.sizes[0]),r}var i=[];return Array.isArray(n.sizes)?i=n.sizes:void 0!==v.deepAccess(t,"mediaTypes.banner.sizes")?i=c(t.mediaTypes.banner.sizes):Array.isArray(t.sizes)&&0<t.sizes.length?i=c(t.sizes):v.logWarn("Warning: no sizes are setup or found"),l(i)}function c(t){return v.parseSizesInput(t).reduce(function(t,e){var n=parseInt(w[e],10);return n&&t.push(n),t},[])}function f(t){return"object"===o(v.deepAccess(t,"params.video"))&&void 0!==v.deepAccess(t,"mediaTypes.".concat(m.d))}function d(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return f(t)?-1===["outstream","instream"].indexOf(v.deepAccess(t,"mediaTypes.".concat(m.d,".context")))?void(e&&v.logError("Rubicon bid adapter requires mediaTypes.video.context to be one of outstream or instream")):s(t,"video").length<2?void(e&&v.logError("Rubicon bid adapter could not determine the playerSize of the videonplayerWidth and playerHeight are inferred from one of params.playerWidth/playerHeight or mediaTypes.video.playerSize or adUnit.sizes, in that order")):(e&&v.logMessage("Rubicon bid adapter making video request for adUnit",t.adUnitCode),"video"):0===s(t,"banner").length?void(e&&v.logError("Rubicon bid adapter could not determine the sizes for a banner requestnThey are inferred from one of params.sizes or mediaTypes.banner.sizes or adUnit.sizes, in that order")):(e&&v.logMessage("Rubicon bid adapter making banner request for adUnit",t.adUnitCode),"banner")}function l(t){var e=[15,2,9];return t.sort(function(t,n){var r=e.indexOf(t),i=e.indexOf(n);return-1<r||-1<i?-1===r?1:-1===i?-1:r-i:t-n})}function p(t){var e=parseInt(v.deepAccess(t,"params.video.size_id"));return isNaN(e)?"outstream"===v.deepAccess(t,"mediaTypes.".concat(m.d,".context"))?203:201:e}function h(t){return{ranges:{low:[{max:5,increment:.5}],medium:[{max:20,increment:.1}],high:[{max:20,increment:.01}],auto:[{max:5,increment:.05},{min:5,max:10,increment:.1},{min:10,max:20,increment:.5}],dense:[{max:3,increment:.01},{min:3,max:8,increment:.05},{min:8,max:20,increment:.5}],custom:t.getConfig("customPriceBucket")&&t.getConfig("customPriceBucket").buckets}[t.getConfig("priceGranularity")]}}function g(t){var e=!0,n=Object.prototype.toString.call([]),r=Object.prototype.toString.call(0),i={mimes:n,protocols:n,maxduration:r,linearity:r,api:n};return Object.keys(i).forEach(function(n){Object.prototype.toString.call(v.deepAccess(t,"mediaTypes.video."+n))!==i[n]&&(e=!1,v.logError("Rubicon Bid Adapter: mediaTypes.video."+n+" is required and must be of type: "+i[n]))}),e}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"FASTLANE_ENDPOINT",function(){return _}),n.d(e,"VIDEO_ENDPOINT",function(){return E}),n.d(e,"SYNC_ENDPOINT",function(){return S}),n.d(e,"spec",function(){return T}),e.hasVideoMediaType=f,e.masSizeOrdering=l,e.determineRubiconVideoSizeId=p,e.getPriceGranularity=h,e.hasValidVideoParams=g,e.resetUserSync=function(){A=!1};var v=n(0),b=n(1),y=n(3),m=n(2),_="//fastlane.rubiconproject.com/a/api/fastlane.json",E="//prebid-server.rubiconproject.com/openrtb2/auction",S="https://eus.rubiconproject.com/usync.html",w={1:"468x60",2:"728x90",5:"120x90",8:"120x600",9:"160x600",10:"300x600",13:"200x200",14:"250x250",15:"300x250",16:"336x280",19:"300x100",31:"980x120",32:"250x360",33:"180x500",35:"980x150",37:"468x400",38:"930x180",39:"750x100",40:"750x200",41:"750x300",43:"320x50",44:"300x50",48:"300x300",53:"1024x768",54:"300x1050",55:"970x90",57:"970x250",58:"1000x90",59:"320x80",60:"320x150",61:"1000x1000",64:"580x500",65:"640x480",66:"930x600",67:"320x480",68:"1800x1000",72:"320x320",73:"320x160",78:"980x240",79:"980x300",80:"980x400",83:"480x300",94:"970x310",96:"970x210",101:"480x320",102:"768x1024",103:"480x280",105:"250x800",108:"320x240",113:"1000x300",117:"320x100",125:"800x250",126:"200x600",144:"980x600",145:"980x150",159:"320x250",179:"250x600",195:"600x300",198:"640x360",199:"640x200",213:"1030x590",214:"980x360",229:"320x180",232:"580x400",257:"400x600"};v._each(w,function(t,e){return w[t]=e});var T={code:"rubicon",supportedMediaTypes:[m.b,m.d],isBidRequestValid:function(t){if("object"!==o(t.params))return!1;for(var e=0,n=["accountId","siteId","zoneId"];e<n.length;e++)if(t.params[n[e]]=parseInt(t.params[n[e]]),isNaN(t.params[n[e]]))return v.logError("Rubicon bid adapter Error: wrong format of accountId or siteId or zoneId."),!1;var r=d(t,!0);return!!r&&("video"!==r||g(t))},buildRequests:function(t,e){var n=[],i=t.filter(function(t){return"video"===d(t)}).map(function(t){t.startTime=(new Date).getTime();var n={id:t.transactionId,test:y.config.getConfig("debug")?1:0,cur:["USD"],source:{tid:t.transactionId},tmax:y.config.getConfig("TTL")||1e3,imp:[{exp:300,id:t.adUnitCode,secure:a()||t.params.secure?1:0,ext:{rubicon:t.params},video:v.deepAccess(t,"mediaTypes.video")||{}}],ext:{prebid:{cache:{vastxml:{returnCreative:!1}},targeting:{includewinners:!0,includebidderkeys:!1,priceGranularity:h(y.config)}}}};n.imp[0].ext.rubicon.video.size_id=p(t),function(t,e,n){t&&("object"===o(y.config.getConfig("app"))?t.app=y.config.getConfig("app"):t.site={page:u(e,n)},"object"===o(y.config.getConfig("device"))&&(t.device=y.config.getConfig("device")),e.params.video.language&&["site","device"].forEach(function(n){t[n]&&(t[n].content=r({language:e.params.video.language},t[n].content))}))}(n,t,e),function(t,e){"object"===o(t.imp[0].video)&&void 0===t.imp[0].video.skip&&(t.imp[0].video.skip=e.params.video.skip),"object"===o(t.imp[0].video)&&void 0===t.imp[0].video.skipafter&&(t.imp[0].video.skipafter=e.params.video.skipdelay),"object"===o(t.imp[0].video)&&void 0===t.imp[0].video.pos&&(t.imp[0].video.pos="atf"===e.params.position?1:"btf"===e.params.position?3:0);var n=s(e,"video");t.imp[0].video.w=n[0],t.imp[0].video.h=n[1]}(n,t);var i=function(){var t=function(){var t=window.DigiTrust&&(y.config.getConfig("digiTrustId")||window.DigiTrust.getUser({member:"T9QSFKPDN9"}));return t&&t.success&&t.identity||null}();return!t||t.privacy&&t.privacy.optout?null:{id:t.id,keyv:t.keyv,pref:0}}();if(i&&(n.user={ext:{digitrust:i}}),e.gdprConsent){var c;"boolean"==typeof e.gdprConsent.gdprApplies&&(c=e.gdprConsent.gdprApplies?1:0),n.regs?n.regs.ext?n.regs.ext.gdpr=c:n.regs.ext={gdpr:c}:n.regs={ext:{gdpr:c}};var f=e.gdprConsent.consentString;n.user?n.user.ext?n.user.ext.consent=f:n.user.ext={consent:f}:n.user={ext:{consent:f}}}return{method:"POST",url:E,data:n,bidRequest:t}});if(!0!==y.config.getConfig("rubicon.singleRequest"))n=i.concat(t.filter(function(t){return"banner"===d(t)}).map(function(t){var n=T.createSlotParams(t,e);return{method:"GET",url:_,data:T.getOrderedParams(n).reduce(function(t,e){var r=n[e];return v.isStr(r)&&""!==r||v.isNumber(r)?"".concat(t).concat(e,"=").concat(encodeURIComponent(r),"&"):t},"")+"slots=1&rand=".concat(Math.random()),bidRequest:t}}));else{var c=t.filter(function(t){return"banner"===d(t)}).reduce(function(t,e){return(t[e.params.siteId]=t[e.params.siteId]||[]).push(e),t},{});n=i.concat(Object.keys(c).map(function(t){var n=c[t];10<n.length&&(v.logWarn("Rubicon bid adapter Warning: single request mode has a limit of 10 bids: ".concat(n.length-10," bids were not sent")),n=n.slice(0,10));var r=T.combineSlotUrlParams(n.map(function(t){return T.createSlotParams(t,e)}));return{method:"GET",url:_,data:T.getOrderedParams(r).reduce(function(t,e){var n=r[e];return v.isStr(n)&&""!==n||v.isNumber(n)?"".concat(t).concat(e,"=").concat(encodeURIComponent(n),"&"):t},"")+"slots=".concat(n.length,"&rand=").concat(Math.random()),bidRequest:n}}))}return n},getOrderedParams:function(t){var e=/^tg_v/,n=/^tg_i/,r=["account_id","site_id","zone_id","size_id","alt_size_ids","p_pos","gdpr","gdpr_consent","rf","dt.id","dt.keyv","dt.pref","p_geo.latitude","p_geo.longitude","kw"].concat(Object.keys(t).filter(function(t){return e.test(t)})).concat(Object.keys(t).filter(function(t){return n.test(t)})).concat(["tk_flint","x_source.tid","p_screen_res","rp_floor","rp_secure","tk_user_key"]);return r.concat(Object.keys(t).filter(function(t){return-1===r.indexOf(t)}))},combineSlotUrlParams:function(t){if(1===t.length)return t[0];var e=t.reduce(function(e,n,r){return Object.keys(n).forEach(function(i){e.hasOwnProperty(i)||(e[i]=new Array(t.length)),e[i].splice(r,1,n[i])}),e},{}),n=new RegExp("^([^;]*)(;\1)+$");return Object.keys(e).forEach(function(t){var r=e[t].join(";"),i=r.match(n);e[t]=i?i[1]:r}),e},createSlotParams:function(t,e){t.startTime=(new Date).getTime();var n=t.params,r=s(t,"banner"),c=i(n.latLong||[],2),f=c[0],d=c[1],l={account_id:n.accountId,site_id:n.siteId,zone_id:n.zoneId,size_id:r[0],alt_size_ids:r.slice(1).join(",")||void 0,p_pos:"atf"===n.position||"btf"===n.position?n.position:"unknown",rp_floor:.01<(n.floor=parseFloat(n.floor))?n.floor:.01,rp_secure:a()?"1":"0",tk_flint:"pbjs_lite_v2.8.0","x_source.tid":t.transactionId,p_screen_res:[window.screen.width,window.screen.height].join("x"),kw:Array.isArray(n.keywords)?n.keywords.join(","):"",tk_user_key:n.userId,"p_geo.latitude":isNaN(parseFloat(f))?void 0:parseFloat(f).toFixed(4),"p_geo.longitude":isNaN(parseFloat(d))?void 0:parseFloat(d).toFixed(4),"tg_fl.eid":t.code,rf:u(t,e)};e.gdprConsent&&("boolean"==typeof e.gdprConsent.gdprApplies&&(l.gdpr=Number(e.gdprConsent.gdprApplies)),l.gdpr_consent=e.gdprConsent.consentString),null!==n.visitor&&"object"===o(n.visitor)&&Object.keys(n.visitor).forEach(function(t){null!=n.visitor[t]&&(l["tg_v.".concat(t)]=n.visitor[t].toString())}),null!==n.inventory&&"object"===o(n.inventory)&&Object.keys(n.inventory).forEach(function(t){null!=n.inventory[t]&&(l["tg_i.".concat(t)]=n.inventory[t].toString())});var p=function(){var t=function(){var t=window.DigiTrust&&(y.config.getConfig("digiTrustId")||window.DigiTrust.getUser({member:"T9QSFKPDN9"}));return t&&t.success&&t.identity||null}();return!t||t.privacy&&t.privacy.optout?[]:{"dt.id":t.id,"dt.keyv":t.keyv,"dt.pref":0}}();return Object.keys(p).forEach(function(t){l[t]=p[t]}),l},interpretResponse:function(t,e){var n=e.bidRequest;if(!(t=t.body)||"object"!==o(t))return[];if(t.seatbid){var r=v.deepAccess(t,"ext.errors.rubicon");Array.isArray(r)&&0<r.length&&r.forEach(function(t){v.logError("Got error from PBS Java openRTB: "+t)});var a=[];return t.seatbid.forEach(function(e){(e.bid||[]).forEach(function(r){var i={requestId:n.bidId,currency:t.cur||"USD",creativeId:r.crid,cpm:r.price||0,bidderCode:e.seat,ttl:300,netRevenue:y.config.getConfig("rubicon.netRevenue")||!1,width:r.w||v.deepAccess(n,"mediaTypes.video.w")||v.deepAccess(n,"params.video.playerWidth"),height:r.h||v.deepAccess(n,"mediaTypes.video.h")||v.deepAccess(n,"params.video.playerHeight")};r.dealid&&(i.dealId=r.dealid);var u=v.deepAccess(t,"ext.responsetimemillis.rubicon");if(n&&u&&(n.serverResponseTimeMs=u),v.deepAccess(r,"ext.prebid.type")===m.d){i.mediaType=m.d;var s=v.deepAccess(r,"ext.prebid.targeting");s&&"object"===o(s)&&(i.adserverTargeting=s),r.ext.prebid.cache&&"object"===o(r.ext.prebid.cache.vastXml)&&r.ext.prebid.cache.vastXml.cacheId&&r.ext.prebid.cache.vastXml.url?(i.videoCacheKey=r.ext.prebid.cache.vastXml.cacheId,i.vastUrl=r.ext.prebid.cache.vastXml.url):s&&s.hb_uuid&&s.hb_cache_host&&s.hb_cache_path&&(i.videoCacheKey=s.hb_uuid,i.vastUrl="https://".concat(s.hb_cache_host).concat(s.hb_cache_path,"?uuid=").concat(s.hb_uuid)),r.adm&&(i.vastXml=r.adm),r.nurl&&(i.vastUrl=r.nurl),!i.vastUrl&&r.nurl&&(i.vastUrl=r.nurl)}else v.logError("Prebid Server Java openRTB returns response with media type other than video for video request.");a.push(i)})}),a}var u=t.ads;return"object"!==o(n)||Array.isArray(n)||"video"!==d(n)||"object"!==o(u)||(u=u[n.adUnitCode]),!Array.isArray(u)||u.length<1?[]:u.reduce(function(e,r,a){if("ok"!==r.status)return e;var u=Array.isArray(n)?n[a]:n;if(u&&"object"===o(u)){var s={requestId:u.bidId,currency:"USD",creativeId:r.creative_id||"".concat(r.network||"","-").concat(r.advertiser||""),cpm:r.cpm||0,dealId:r.deal,ttl:300,netRevenue:y.config.getConfig("rubicon.netRevenue")||!1,rubicon:{advertiserId:r.advertiser,networkId:r.network}};if(r.creative_type&&(s.mediaType=r.creative_type),r.creative_type===m.d)s.width=u.params.video.playerWidth,s.height=u.params.video.playerHeight,s.vastUrl=r.creative_depot_url,s.impression_id=r.impression_id,s.videoCacheKey=r.impression_id;else{s.ad=function(t,e){return"ninDapIF=true;nnx3c!-- Rubicon Project Ad Tag --x3en
n").concat(t,"nnn

")}(r.script,r.impression_id);var c=i(w[r.size_id].split("x").map(function(t){return Number(t)}),2);s.width=c[0],s.height=c[1]}s.rubiconTargeting=(Array.isArray(r.targeting)?r.targeting:[]).reduce(function(t,e){return t[e.key]=e.values[0],t},{rpfl_elemid:u.adUnitCode}),e.push(s)}else v.logError("Rubicon bid adapter Error: bidRequest undefined at index position:".concat(a),n,t);return e},[]).sort(function(t,e){return(e.cpm||0)-(t.cpm||0)})},getUserSyncs:function(t,e,n){if(!A&&t.iframeEnabled){var r="";return n&&"string"==typeof n.consentString&&("boolean"==typeof n.gdprApplies?r+="?gdpr=".concat(Number(n.gdprApplies),"&gdpr_consent=").concat(n.consentString):r+="?gdpr_consent=".concat(n.consentString)),A=!0,{type:"iframe",url:S+r}}},transformBidParams:function(t,e){return v.convertTypes({accountId:"number",siteId:"number",zoneId:"number"},t)}},A=!1;Object(b.registerBidder)(T)}},[472]),pbjsChunk([49],{530:function(t,e,n){t.exports=n(531)},531:function(t,e,n){"use strict";function r(t){t.renderer.push(function(){window.ANOutstreamVideo.renderAd({targetId:t.adUnitCode,adResponse:t.adResponse})})}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"spec",function(){return s});var i=n(0),o=n(1),a=n(12),u=n(2),s={code:"trustx",supportedMediaTypes:[u.b,u.d],isBidRequestValid:function(t){return!!t.params.uid},buildRequests:function(t,e){var n,r=[],o={},a={},u={},s="net";(t||[]).forEach(function(t){"gross"===t.params.priceType&&(s="gross"),n=t.bidderRequestId;var e=t.params.uid,c=t.adUnitCode;r.push(e);var f=i.parseSizesInput(t.sizes);a[e]||(a[e]={});var d=a[e];d[c]?d[c].bids.push(t):d[c]={adUnitCode:c,bids:[t],parents:[]};var l=d[c];f.forEach(function(t){u[t]=!0,o[e]||(o[e]={}),o[e][t]?o[e][t].push(l):o[e][t]=[l],l.parents.push({parent:o[e],key:t,uid:e})})});var c={u:i.getTopWindowUrl(),pt:s,auids:r.join(","),sizes:i.getKeys(u).join(","),r:n};return e&&(e.timeout&&(c.wtimeout=e.timeout),e.gdprConsent&&(e.gdprConsent.consentString&&(c.gdpr_consent=e.gdprConsent.consentString),c.gdpr_applies="boolean"==typeof e.gdprConsent.gdprApplies?Number(e.gdprConsent.gdprApplies):1)),{method:"GET",url:"//sofia.trustx.org/hb",data:i.parseQueryStringParameters(c).replace(/&$/,""),bidsMap:o}},interpretResponse:function(t,e){var n=2-1}});var instance=window.Layzr({threshold:100});instance.on("src:before",function(t){t.addEventListener("load",function(e){t.parentElement.classList.add("loaded")})}),document.addEventListener("DOMContentLoaded",function(t){instance.update().check().handlers(!0)}),DS.service("teadsBackfill",["$window",function(t){t.teadsNoFill=function(t){var e,n=window.innerWidth>969,r=window.innerWidthe?t:e}function a(){E.forEach(c)}function u(t,e){var n=e.visiblePx,r=e.visiblePercent;n&&r>=t.shownThreshold&&!t.seen?(t.seen=!0,setTimeout(function(){t.trigger("shown",new _("shown",e))},15)):(!n||r=0&&r.left>=0&&r.bottom1&&(a+=g(o,Math.floor(e/r),n-1,r)),a}function v(t,e){return i(e,o(t.bottom,0))-i(o(t.top,0),e)}function b(t){for(var e=t.offsetLeft,n=t.offsetTop;t=t.offsetParent;)e+=t.offsetLeft,n+=t.offsetTop;return{left:e,top:n}}function y(e,r){var i,o;return e=e.split(","),o=n.filter(n.map(e,function(e){return(i=t.querySelector(e))&&new m(i).on("shown",function(){n.invokeMap(o,"destroy"),r()})}))}var m,_,E=[];m=function(t,e){e=e||{},this.el=t,this.seen=!1,this.preload=!1,this.preloadThreshhold=e&&e.preloadThreshhold||0,this.shownThreshold=e&&e.shownThreshold||0,this.hiddenThreshold=e&&i(e.shownThreshold,e.hiddenThreshold)||0,E.push(this),c(this)},m.prototype={destroy:function(){E.splice(E.indexOf(this),1)}},r.enable(m.prototype),_=function(t,e){this.type=t,n.assign(this,e)},t.addEventListener("scroll",n.throttle(a,200)),this.getPageOffset=b,this.getLinearSpacialHash=g,this.getVerticallyVisiblePixels=v,this.getViewportHeight=f,this.getViewportWidth=d,this.isElementNotHidden=l,this.isElementInViewport=p,this.watchForAny=y,this.Visible=m}]);"use strict";var _typeof="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};!function(){function e(t,n,o){function r(c,s){if(!n[c]){if(!t[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[c]={exports:{}};t[c][0].call(l.exports,function(e){return r(t[c][1][e]||e)},l,l.exports,e,t,n,o)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;c1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u]));return document.cookie=t+"="+r+a}t||(c={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,f=0;f-1&&(console.log("removing serviceworker"),a.unregister())}}catch(r){t=!0,n=r}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}});var e=r("../../services/client/analytics-js");window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(r){},function(r){console.error("ServiceWorker registration failed: ",r)})}),window.addEventListener("beforeinstallprompt",function(r){r.userChoice.then(function(r){"dismissed"===r.outcome?e.track("PWA - dismissed install prompt"):e.track("PWA - Added to Home Screen")})})}}()},{"../../services/client/analytics-js":2}],2:[function(r,e,t){var n=function(r){r=r||document.querySelectorAll("script.js-analytics-js-data")[0];var e=r.textContent;return JSON.parse(e)},i=function(r,e,t,i){var o=n(),a={};Object.assign(a,o,e),analytics.track(r,a,t,i)};e.exports.getDomEventData=n,e.exports.track=i},{}]},{},[1]);"use strict";var _typeof="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};!function(){function e(t,o,n){function r(s,c){if(!o[s]){if(!t[s]){var u="function"==typeof require&&require;if(!c&&u)return u(s,!0);if(i)return i(s,!0);var a=new Error("Cannot find module '"+s+"'");throw a.code="MODULE_NOT_FOUND",a}var f=o[s]={exports:{}};t[s][0].call(f.exports,function(e){return r(t[s][1][e]||e)},f,f.exports,e,t,o,n)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;st&&o-t1){if(i=e({path:"/"},n.defaults,i),"number"==typeof i.expires){var c=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*i.expires),i.expires=c}i.expires=i.expires?i.expires.toUTCString():"";try{s=JSON.stringify(r),/^[{[]/.test(s)&&(r=s)}catch(e){}r=o.write?o.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var u="";for(var a in i)i[a]&&(u+="; "+a,!0!==i[a]&&(u+="="+i[a]));return document.cookie=t+"="+r+u}t||(s={});for(var f=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,p=0;p-1&&(e.gdprConsent="1"),analytics.page(null,"pageView",e,{integrations:{All:!1,comScore:!0}})}function f(){var t=e("../../services/universal/membership");if(t.isMember())return t.getMembershipType()}function d(){return!window.sessionStorage.getItem("visitstarted")&&(window.sessionStorage.setItem("visitstarted","1"),!0)}function p(){var e=void 0;try{e=o.getJSON(D)}catch(e){return console.error(e),{}}return e||(e={pv:0,first:null}),e}function v(e){var t=p(),n=t.pv,r=t.first;if(n=parseInt(n,10),isNaN(n))return null;var i=(new Date).getTime();return r&&i-r>2592e6&&(n=0),["article","plus","coverstory"].includes(e)&&(n+=1),1===n&&(r=i),o.set(D,{pv:n,first:r},{expires:365}),n}function m(e,n){_(function(){function o(e){var t=document.body.querySelector("."+e);if(t){var n=t.dataset.uri;if(n&&n.split("/")[2]===e)return t}}var a=window.amplitude.getInstance(),u=n||0,l=a.options&&a.options.deviceId;if(!l&&u0&&(p["Affiliate Link"]="✅"),o("product")&&(p["Product Component"]="✅");var w=o("newsletter-signup");p["Includes Newsletter Signup"]=r(w),w&&(p["Newsletter Signup Placement"]="In Content"),analytics.page(p,{integrations:{All:!0,"Google Analytics":!1,comScore:!1}}),t.removeFromLocation()})}function g(e){var t=f();t&&(e.plan=t)}function y(e){var t=window.Scroll&&Scroll.config.detected;t&&(e.scrollUser=t)}function w(e){var t=window.Krux&&window.Krux.kuid;t&&(e.kuid=t)}function b(e){var t=o.get("AB");e.abTest=A(t)?t:"0"}function h(){var e=document.querySelector(".slate-paragraph--tombstone");if(e){var t=n.once(function(){C.track("Completed article"),document.removeEventListener("scroll",o)}),o=n.throttle(function(){var n="scrollY"in window?window.scrollY:window.pageYOffset;e.offsetTop+e.offsetHeightI?void console.error("RETRY LIMIT EXCEEDED"):void setTimeout(function(){e(t,n+1)},T)},N=void 0,D="mpv";return x}])},{"../../services/client/adblock-detector":3,"../../services/client/analytics-js":4,"../../services/universal/abTesting":5,"../../services/universal/membership":6}],2:[function(e,t,n){!function(e){var o=!1;if("function"==typeof define&&define.amd&&(define(e),o=!0),"object"===(void 0===n?"undefined":_typeof(n))&&(t.exports=e(),o=!0),!o){var r=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=r,i}}}(function(){function e(){for(var e=0,t={};e1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var s="";for(var u in i)i[u]&&(s+="; "+u,!0!==i[u]&&(s+="="+i[u]));return document.cookie=t+"="+r+s}t||(c={});for(var l=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,d=0;d':e?'':void 0}function n(e){var n=e.getAttribute("data-publicId"),r=e.getAttribute("data-slatePlusEpId");e.innerHTML=t(n,r)||""}var r=e("../../services/universal/membership"),o=r.isMember(),i="https://player.megaphone.fm/";return n}])},{"../../services/universal/membership":3}],2:[function(e,t,n){!function(e){var r=!1;if("function"==typeof define&&define.amd&&(define(e),r=!0),"object"===(void 0===n?"undefined":_typeof(n))&&(t.exports=e(),r=!0),!r){var o=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=o,i}}}(function(){function e(){for(var e=0,t={};e1){if(i=e({path:"/"},r.defaults,i),"number"==typeof i.expires){var u=new Date;u.setMilliseconds(u.getMilliseconds()+864e5*i.expires),i.expires=u}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(o),/^[{[]/.test(c)&&(o=c)}catch(e){}o=n.write?n.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=t+"="+o+f}t||(c={});for(var a=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,l=0;l1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[{[]/.test(c)&&(r=c)}catch(e){}r=t.write?t.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[()]/g,escape);var u="";for(var a in i)i[a]&&(u+="; "+a,!0!==i[a]&&(u+="="+i[a]));return document.cookie=n+"="+r+u}n||(c={});for(var d=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,f=0;f1){if(i=e({path:"/"},r.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(o),/^[{[]/.test(c)&&(o=c)}catch(e){}o=n.write?n.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var u="";for(var s in i)i[s]&&(u+="; "+s,!0!==i[s]&&(u+="="+i[s]));return document.cookie=t+"="+o+u}t||(c={});for(var f=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,d=0;d

Expansion Bolt, Anchor Bolt, Double End Bolt, Strength Bolt - Ji Luo Fastener,https://www.jiluofasteners.com/