/** * ios-books-app * Copyright © 2017-2023 Apple Inc. All rights reserved. * Acknowledgements: **/ !function(){"use strict";let e;function t(){return"iosbundle"==e.environment}function r(){return"test"===e.environment}globalThis.debug={},e=true?{ "resources": { "loc_keys.json": "resources/af72814604874c847e9bb1de13027ebd/loc_keys.json", "images/ios_store_flowcase_autogen_singlebook_stageeffects.png": "resources/images/75f8c5141537695095afef8e7786af4e/ios_store_flowcase_autogen_singlebook_stageeffects.png", "images/mangaStaffPickBackground@3x.png": "resources/images/564427eaca7b75edca15f69e8854100f/mangaStaffPickBackground@3x.png", "localization/ar-ae.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-ae.json", "localization/ar-bh.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-bh.json", "localization/ar-dz.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-dz.json", "localization/ar-eg.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-eg.json", "localization/ar-iq.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-iq.json", "localization/ar-jo.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-jo.json", "localization/ar-kw.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-kw.json", "localization/ar-lb.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-lb.json", "localization/ar-ly.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-ly.json", "localization/ar-ma.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-ma.json", "localization/ar-om.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-om.json", "localization/ar-qa.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-qa.json", "localization/ar-sa.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-sa.json", "localization/ar-sd.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-sd.json", "localization/ar-sy.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-sy.json", "localization/ar-tn.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-tn.json", "localization/ar-ye.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar-ye.json", "localization/ar.json": "resources/localization/82eb680b6e837b27dd22a7ce57b98c37/ar.json", "localization/ca-es.json": "resources/localization/b85d366880147a2dbafaac1f8f488570/ca-es.json", "localization/ca.json": "resources/localization/b85d366880147a2dbafaac1f8f488570/ca.json", "localization/cs-cz.json": "resources/localization/d3cb67f8d2b54daf71f5de7635d35421/cs-cz.json", "localization/cs.json": "resources/localization/d3cb67f8d2b54daf71f5de7635d35421/cs.json", "localization/da-dk.json": "resources/localization/59b862da684e583eefc6c64d23165dde/da-dk.json", "localization/da.json": "resources/localization/59b862da684e583eefc6c64d23165dde/da.json", "localization/de-ch.json": "resources/localization/7f751fce4c10628b43e4aa258f0c0b34/de-ch.json", "localization/de-de.json": "resources/localization/7f751fce4c10628b43e4aa258f0c0b34/de-de.json", "localization/de.json": "resources/localization/7f751fce4c10628b43e4aa258f0c0b34/de.json", "localization/dev.json": "resources/localization/99914b932bd37a50b983c5e7c90ae93b/dev.json", "localization/el-gr.json": "resources/localization/c79fec718fd5386921c298c48a0b16fe/el-gr.json", "localization/el.json": "resources/localization/c79fec718fd5386921c298c48a0b16fe/el.json", "localization/en-au.json": "resources/localization/b782639c7e82633cd20a8a1100799c12/en-au.json", "localization/en-ca.json": "resources/localization/ccf17f171266900ba8d593ed59b7e814/en-ca.json", "localization/en-gb.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/en-gb.json", "localization/en-us.json": "resources/localization/6237b6119669f2a6e2b822e420c7e76f/en-us.json", "localization/en.json": "resources/localization/6237b6119669f2a6e2b822e420c7e76f/en.json", "localization/es-419.json": "resources/localization/5d24e6378335ee8a1b485b2197eae4e7/es-419.json", "localization/es-es.json": "resources/localization/5d24e6378335ee8a1b485b2197eae4e7/es-es.json", "localization/es-mx.json": "resources/localization/a1b4c1fdaba9a66289fd17b88341555a/es-mx.json", "localization/es-xl.json": "resources/localization/a1b4c1fdaba9a66289fd17b88341555a/es-xl.json", "localization/es.json": "resources/localization/5d24e6378335ee8a1b485b2197eae4e7/es.json", "localization/et-ee.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/et-ee.json", "localization/fi-fi.json": "resources/localization/0260fa61207ca5381ed93506631aa19e/fi-fi.json", "localization/fi.json": "resources/localization/0260fa61207ca5381ed93506631aa19e/fi.json", "localization/fr-ca.json": "resources/localization/6495c292ae637ce8ecdaa2c8c9477399/fr-ca.json", "localization/fr-fr.json": "resources/localization/bbd431a4d2db1942e80102802b591c62/fr-fr.json", "localization/fr.json": "resources/localization/bbd431a4d2db1942e80102802b591c62/fr.json", "localization/he-il.json": "resources/localization/6e63e3ffcf37e0433ef5a1a80de37496/he-il.json", "localization/he.json": "resources/localization/6e63e3ffcf37e0433ef5a1a80de37496/he.json", "localization/hi-in.json": "resources/localization/9019e1c56b8c260d91f55265561cd363/hi-in.json", "localization/hi.json": "resources/localization/9019e1c56b8c260d91f55265561cd363/hi.json", "localization/hr-hr.json": "resources/localization/2ea3317943f7ee5a9d860169b01571db/hr-hr.json", "localization/hr.json": "resources/localization/2ea3317943f7ee5a9d860169b01571db/hr.json", "localization/hu-hu.json": "resources/localization/a92b069b1da7e663e779c3919a66fcde/hu-hu.json", "localization/hu.json": "resources/localization/a92b069b1da7e663e779c3919a66fcde/hu.json", "localization/id-id.json": "resources/localization/b4f279f6c7d24a6179628a798c7147f7/id-id.json", "localization/id.json": "resources/localization/b4f279f6c7d24a6179628a798c7147f7/id.json", "localization/is-is.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/is-is.json", "localization/is.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/is.json", "localization/it-it.json": "resources/localization/a3f68ec69f1ed4b72a57bbb09edd8ac7/it-it.json", "localization/it.json": "resources/localization/a3f68ec69f1ed4b72a57bbb09edd8ac7/it.json", "localization/iw-il.json": "resources/localization/6e63e3ffcf37e0433ef5a1a80de37496/iw-il.json", "localization/ja-jp.json": "resources/localization/927e75b84a165b58e7a0c928f4f2bab2/ja-jp.json", "localization/ja.json": "resources/localization/927e75b84a165b58e7a0c928f4f2bab2/ja.json", "localization/ko-kr.json": "resources/localization/bcc4fede90cf0e28c0b8641e7021e6ba/ko-kr.json", "localization/ko.json": "resources/localization/bcc4fede90cf0e28c0b8641e7021e6ba/ko.json", "localization/lt-lt.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/lt-lt.json", "localization/lt.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/lt.json", "localization/lv-lv.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/lv-lv.json", "localization/lv.json": "resources/localization/433ecc9e90e779c4495550d0f838bf86/lv.json", "localization/ms-my.json": "resources/localization/12b3a5d17e7f8718011eda8c68eec614/ms-my.json", "localization/ms.json": "resources/localization/12b3a5d17e7f8718011eda8c68eec614/ms.json", "localization/nb-no.json": "resources/localization/f27ca41f395c586850cd17f5f11a232c/nb-no.json", "localization/nb.json": "resources/localization/f27ca41f395c586850cd17f5f11a232c/nb.json", "localization/nl-nl.json": "resources/localization/af9dfecc48618d2f8fdcf1c0f5594d1c/nl-nl.json", "localization/nl.json": "resources/localization/af9dfecc48618d2f8fdcf1c0f5594d1c/nl.json", "localization/no-nb.json": "resources/localization/f27ca41f395c586850cd17f5f11a232c/no-nb.json", "localization/no-no.json": "resources/localization/f27ca41f395c586850cd17f5f11a232c/no-no.json", "localization/no.json": "resources/localization/f27ca41f395c586850cd17f5f11a232c/no.json", "localization/pl-pl.json": "resources/localization/65f1d14e6ec98fc4b55eb46dfb81658f/pl-pl.json", "localization/pl.json": "resources/localization/65f1d14e6ec98fc4b55eb46dfb81658f/pl.json", "localization/pt-br.json": "resources/localization/8cd994a24a1500e82117b95265c716b5/pt-br.json", "localization/pt-pt.json": "resources/localization/f73166139a30059fc3e9152d6b9accd0/pt-pt.json", "localization/pt.json": "resources/localization/f73166139a30059fc3e9152d6b9accd0/pt.json", "localization/ro-ro.json": "resources/localization/0ec695597649d6c0b5847a7c85901edc/ro-ro.json", "localization/ro.json": "resources/localization/0ec695597649d6c0b5847a7c85901edc/ro.json", "localization/ru-ru.json": "resources/localization/9d7a012cec1c25149bd4e49f30781ea7/ru-ru.json", "localization/ru.json": "resources/localization/9d7a012cec1c25149bd4e49f30781ea7/ru.json", "localization/sk-sk.json": "resources/localization/bb1cf9bdbc2ec0b67e1a7059089a5ad5/sk-sk.json", "localization/sk.json": "resources/localization/bb1cf9bdbc2ec0b67e1a7059089a5ad5/sk.json", "localization/sv-se.json": "resources/localization/cfe26d80348afe9421e7db72cbe80a22/sv-se.json", "localization/sv.json": "resources/localization/cfe26d80348afe9421e7db72cbe80a22/sv.json", "localization/th-th.json": "resources/localization/1725c94d62e7722c761cab23bdfcb438/th-th.json", "localization/th.json": "resources/localization/1725c94d62e7722c761cab23bdfcb438/th.json", "localization/tr-tr.json": "resources/localization/f67e4cbafb715ab4237a6280af9f70f1/tr-tr.json", "localization/tr.json": "resources/localization/f67e4cbafb715ab4237a6280af9f70f1/tr.json", "localization/uk-ua.json": "resources/localization/cbbc58f88c8a76786a3332ea66148c2a/uk-ua.json", "localization/uk.json": "resources/localization/cbbc58f88c8a76786a3332ea66148c2a/uk.json", "localization/vi-vi.json": "resources/localization/9ba92fe4de2741b722359f07846894b9/vi-vi.json", "localization/vi-vn.json": "resources/localization/9ba92fe4de2741b722359f07846894b9/vi-vn.json", "localization/vi.json": "resources/localization/9ba92fe4de2741b722359f07846894b9/vi.json", "localization/zh-cn.json": "resources/localization/026499d99b12d449508932e5fa34b5fc/zh-cn.json", "localization/zh-hans-cn.json": "resources/localization/026499d99b12d449508932e5fa34b5fc/zh-hans-cn.json", "localization/zh-hans.json": "resources/localization/026499d99b12d449508932e5fa34b5fc/zh-hans.json", "localization/zh-hant-hk.json": "resources/localization/c231da2ca2f5b71e6668ccefbcc315f3/zh-hant-hk.json", "localization/zh-hant-tw.json": "resources/localization/b5affd424b14be366971f852a67a5b15/zh-hant-tw.json", "localization/zh-hant.json": "resources/localization/b5affd424b14be366971f852a67a5b15/zh-hant.json", "localization/zh-hk.json": "resources/localization/c231da2ca2f5b71e6668ccefbcc315f3/zh-hk.json", "localization/zh-tw.json": "resources/localization/b5affd424b14be366971f852a67a5b15/zh-tw.json", "localization/zh.json": "resources/localization/026499d99b12d449508932e5fa34b5fc/zh.json", "templates/product-feed.zip": "resources/templates/5362adde8d5e5ac33e0e19bec6271b7e/product-feed.zip", "templates/reading-now.zip": "resources/templates/48bfe6c8bffa677a4086cb823018b9da/reading-now.zip", "templates/search-feed.zip": "resources/templates/6f215727cb66f3a66f4b915e33dec627/search-feed.zip", "templates/shared.zip": "resources/templates/07380f4dbd0813c66678a5c3c9e100a8/shared.zip", "templates/store-feed.zip": "resources/templates/385db8b9c5a98493d4061df63bdb4c67/store-feed.zip" }, "version": "5.400.20-v5" } :require("../tmp/resource-manifest.json"),e.environment="production",e.version="5.400.20-v5";var n=e,o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var c=a((function(e,t){!function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,s="object"==typeof o&&o;s.global!==s&&s.window!==s&&s.self!==s||(r=s);var a,c,u=2147483647,l=36,d=/^xn--/,h=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,y=String.fromCharCode;function m(e){throw RangeError(g[e])}function _(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function E(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+_((e=e.replace(p,".")).split("."),t).join(".")}function S(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=y((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=y(e)})).join("")}function D(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?f(e/700):e>>1,e+=f(e/t);e>455;n+=l)e=f(e/35);return f(n+36*e/(e+38))}function b(e){var t,r,n,o,i,s,a,c,d,h,p,g=[],y=e.length,_=0,E=128,S=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&m("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=y&&m("invalid-input"),((c=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||c>f((u-_)/s))&&m("overflow"),_+=c*s,!(c<(d=a<=S?1:a>=S+26?26:a-S));a+=l)s>f(u/(h=l-d))&&m("overflow"),s*=h;S=w(_-i,t=g.length+1,0==i),f(_/t)>u-E&&m("overflow"),E+=f(_/t),_%=t,g.splice(_++,0,E)}return I(g)}function A(e){var t,r,n,o,i,s,a,c,d,h,p,g,_,E,I,b=[];for(g=(e=S(e)).length,t=128,r=0,i=72,s=0;s=t&&pf((u-r)/(_=n+1))&&m("overflow"),r+=(a-t)*_,t=a,s=0;su&&m("overflow"),p==t){for(c=r,d=l;!(c<(h=d<=i?1:d>=i+26?26:d-i));d+=l)I=c-h,E=l-h,b.push(y(D(h+I%E,0))),c=f(I/E);b.push(y(D(c,0))),i=w(r,_,n==o),r=0,++n}++r,++t}return b.join("")}if(a={version:"1.3.2",ucs2:{decode:S,encode:I},decode:b,encode:A,toASCII:function(e){return E(e,(function(e){return h.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return E(e,(function(e){return d.test(e)?b(e.slice(4).toLowerCase()):e}))}},n&&i)if(e.exports==n)i.exports=a;else for(c in a)a.hasOwnProperty(c)&&(n[c]=a[c]);else r.punycode=a}(o)})),u=function(e){return"string"==typeof e},l=function(e){return"object"==typeof e&&null!==e},d=function(e){return null===e},p=function(e){return null==e};function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var f=function(e,t,r,n){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(t);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var a=e.length;s>0&&a>s&&(a=s);for(var c=0;c=0?(u=p.substr(0,f),l=p.substr(f+1)):(u=p,l=""),d=decodeURIComponent(u),h=decodeURIComponent(l),g(o,d)?Array.isArray(o[d])?o[d].push(h):o[d]=[o[d],h]:o[d]=h}return o},y=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},m=function(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){var o=encodeURIComponent(y(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(y(e))})).join(t):o+encodeURIComponent(y(e[n]))})).join(t):n?encodeURIComponent(y(n))+r+encodeURIComponent(y(e)):""},_=a((function(e,t){t.decode=t.parse=f,t.encode=t.stringify=m})),E=(_.decode,_.parse,_.encode,_.stringify,M),S=function(e,t){return M(e,!1,!0).resolve(t)},I=function(e,t){return e?M(e,!1,!0).resolveObject(t):t},D=function(e){u(e)&&(e=M(e));return e instanceof b?e.format():b.prototype.format.call(e)},w=b;function b(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var A=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,R=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),P=["'"].concat(T),O=["%","/","?",";","#"].concat(P),C=["/","?","#"],k=/^[+a-z0-9A-Z_-]{0,63}$/,N=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,B={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function M(e,t,r){if(e&&l(e)&&e instanceof b)return e;var n=new b;return n.parse(e,t,r),n}b.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n127?w+="x":w+=D[b];if(!w.match(k)){var T=S.slice(0,y),M=S.slice(y+1),V=D.match(N);V&&(T.push(V[1]),M.unshift(V[2])),M.length&&(s="/"+M.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=c.toASCII(this.hostname));var U=this.port?":"+this.port:"",x=this.hostname||"";this.host=x+U,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!B[d])for(y=0,I=P.length;y0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!D.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=D.slice(-1)[0],v=(r.host||e.host||D.length>1)&&("."===A||".."===A)||""===A,R=0,T=D.length;T>=0;T--)"."===(A=D[T])?D.splice(T,1):".."===A?(D.splice(T,1),R++):R&&(D.splice(T,1),R--);if(!S&&!I)for(;R--;R)D.unshift("..");!S||""===D[0]||D[0]&&"/"===D[0].charAt(0)||D.unshift(""),v&&"/"!==D.join("/").substr(-1)&&D.push("");var P,O=""===D[0]||D[0]&&"/"===D[0].charAt(0);w&&(r.hostname=r.host=O?"":D.length?D.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(S=S||r.host&&D.length)&&!O&&D.unshift(""),D.length?r.pathname=D.join("/"):(r.pathname=null,r.path=null),d(r.pathname)&&d(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},b.prototype.parseHost=function(){var e=this.host,t=v.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var V={parse:E,resolve:S,resolveObject:I,format:D,Url:w};const U=Object.freeze({silent:0,error:1,warn:2,log:3,info:4,debug:5,group:6,groupCollapsed:6,groupEnd:6,everything:100});function x(e,t){return e===t||e!=e&&t!=t}function G(e,t){for(var r=e.length;r--;)if(x(e[r][0],t))return r;return-1}var H=Array.prototype.splice;function j(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},j.prototype.set=function(e,t){var r=this.__data__,n=G(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var q="object"==typeof global&&global&&global.Object===Object&&global,z="object"==typeof self&&self&&self.Object===Object&&self,W=q||z||Function("return this")(),Y=W.Symbol,K=Object.prototype,$=K.hasOwnProperty,X=K.toString,Q=Y?Y.toStringTag:void 0;var J=Object.prototype.toString;var Z=Y?Y.toStringTag:void 0;function ee(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=$.call(e,Q),r=e[Q];try{e[Q]=void 0;var n=!0}catch(e){}var o=X.call(e);return n&&(t?e[Q]=r:delete e[Q]),o}(e):function(e){return J.call(e)}(e)}function te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function re(e){if(!te(e))return!1;var t=ee(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ne,oe=W["__core-js_shared__"],ie=(ne=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||""))?"Symbol(src)_1."+ne:"";var se=Function.prototype.toString;function ae(e){if(null!=e){try{return se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ce=/^\[object .+?Constructor\]$/,ue=Function.prototype,le=Object.prototype,de=ue.toString,he=le.hasOwnProperty,pe=RegExp("^"+de.call(he).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ge(e){return!(!te(e)||function(e){return!!ie&&ie in e}(e))&&(re(e)?pe:ce).test(ae(e))}function fe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ge(r)?r:void 0}var ye=fe(W,"Map"),me=fe(Object,"create");var _e=Object.prototype.hasOwnProperty;var Ee=Object.prototype.hasOwnProperty;function Se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}var We={};function Ye(e){return function(t){return e(t)}}We["[object Float32Array]"]=We["[object Float64Array]"]=We["[object Int8Array]"]=We["[object Int16Array]"]=We["[object Int32Array]"]=We["[object Uint8Array]"]=We["[object Uint8ClampedArray]"]=We["[object Uint16Array]"]=We["[object Uint32Array]"]=!0,We["[object Arguments]"]=We["[object Array]"]=We["[object ArrayBuffer]"]=We["[object Boolean]"]=We["[object DataView]"]=We["[object Date]"]=We["[object Error]"]=We["[object Function]"]=We["[object Map]"]=We["[object Number]"]=We["[object Object]"]=We["[object RegExp]"]=We["[object Set]"]=We["[object String]"]=We["[object WeakMap]"]=!1;var Ke="object"==typeof exports&&exports&&!exports.nodeType&&exports,$e=Ke&&"object"==typeof module&&module&&!module.nodeType&&module,Xe=$e&&$e.exports===Ke&&q.process,Qe=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Je=Qe&&Qe.isTypedArray,Ze=Je?Ye(Je):function(e){return Ce(e)&&ze(e.length)&&!!We[ee(e)]},et=Object.prototype.hasOwnProperty;function tt(e,t){var r=Me(e),n=!r&&Fe(e),o=!r&&!n&&He(e),i=!r&&!n&&!o&&Ze(e),s=r||n||o||i,a=s?Oe(e.length,String):[],c=a.length;for(var u in e)!t&&!et.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qe(u,c))||a.push(u);return a}var rt=Object.prototype;function nt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||rt)}function ot(e,t){return function(r){return e(t(r))}}var it=ot(Object.keys,Object),st=Object.prototype.hasOwnProperty;function at(e){if(!nt(e))return it(e);var t=[];for(var r in Object(e))st.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ct(e){return null!=e&&ze(e.length)&&!re(e)}function ut(e){return ct(e)?tt(e):at(e)}function lt(e,t){return e&&Pe(t,ut(t),e)}var dt=Object.prototype.hasOwnProperty;function ht(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=nt(e),r=[];for(var n in e)("constructor"!=n||!t&&dt.call(e,n))&&r.push(n);return r}function pt(e){return ct(e)?tt(e,!0):ht(e)}var gt="object"==typeof exports&&exports&&!exports.nodeType&&exports,ft=gt&&"object"==typeof module&&module&&!module.nodeType&&module,yt=ft&&ft.exports===gt?W.Buffer:void 0,mt=yt?yt.allocUnsafe:void 0;function _t(e,t){if(t)return e.slice();var r=e.length,n=mt?mt(r):new e.constructor(r);return e.copy(n),n}function Et(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r ${e}`),Bn=e,Nn&&Nn.updateValue(e),fr.getInstance().post(Cn,{[kn.IsReachable]:e})}const Mn="BagChangeNotification",Vn=new Map;let Un;function xn(){return Un||(Un=nn.getInstance().values),Un}function Gn(){return!!xn()}function Hn(e,t){const r=xn();return r&&e in r?r[e]:t}function jn(e,t,r){const n=Hn(r);null!=n?e(n):t(new Error(`${r} not found in bag`))}function qn(){Ds.log("Bag arrived from JSAProfileBagManager"),Un=nn.getInstance().values,0==Object.keys(Un).length&&(Un=null),Vn.forEach(((e,t)=>{e(),clearTimeout(t)})),Vn.clear(),fr.getInstance().post(Mn)}function zn(e){return new Promise(((t,r)=>{if(xn())jn(t,r,e);else if(Ln()){const n=setTimeout((()=>{Vn.delete(n),r(new Error("Waiting for bag timed out."))}),3e4);Vn.set(n,(()=>{jn(t,r,e)}))}else r(new Error("Network not reachable"))}))}const Wn="ApplicationInitiateBecomeActiveNotification",Yn=!wr,Kn="notification-extension"==wr,$n="extension"==wr;let Xn=null;const Qn=new Promise((e=>Xn=e));let Jn=!1;function Zn(){return Jn?Promise.reject():(Jn=!0,new Promise((e=>{App.downloadAndCacheScript((()=>(Jn=!1,e())))})))}const eo="RestrictionChangeNotification",to=Object.freeze({Changes:Symbol("Changes")}),ro=Object.freeze({AllowsAccountModification:Symbol("AllowsAccountModification"),AllowsErotica:Symbol("AllowsErotica"),AllowsStore:Symbol("AllowsStore"),IsRunningInStoreDemoMode:Symbol("IsRunningInStoreDemoMode")});let no=null;function oo(){return null==no&&(no=_n.getInstance()),no}let io=!0,so=!0,ao=!0,co=!1;function uo(){return io}function lo(){return so}function ho(){return ao}function po(e=!1){return Hn("isBooksStoreEnabled",!e||void 0)}function go(){return zn("isBooksStoreEnabled").then(null,(e=>{if(Kn)return!0;throw e}))}function fo(){const e=new Set,t=oo().allowsAccountModification;io!=t&&(io=t,e.add(ro.AllowsAccountModification));const r=oo().allowsErotica;so!=r&&(so=r,e.add(ro.AllowsErotica));const n=oo().allowsStore;ao!=n&&(ao=n,e.add(ro.AllowsStore));const o=void 0!==Object.getOwnPropertyDescriptor(_n.prototype,"isRunningInStoreDemoMode")&&oo().isRunningInStoreDemoMode;return co!=o&&(co=o,e.add(ro.IsRunningInStoreDemoMode)),e}function yo(){const e=fo();e.size&&fr.getInstance().post(eo,{[to.Changes]:e})}function mo(e){return"symbol"==typeof e||Ce(e)&&"[object Symbol]"==ee(e)}var _o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eo=/^\w*$/;function So(e,t){if(Me(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!mo(e))||(Eo.test(e)||!_o.test(e)||null!=t&&e in Object(t))}function Io(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Io.Cache||De),r}Io.Cache=De;var Do=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wo=/\\(\\)?/g,bo=function(e){var t=Io(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Do,(function(e,r,n,o){t.push(n?o.replace(wo,"$1"):r||e)})),t}));function Ao(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r=200&&this.status<300}get output(){return this._output}get performanceMetrics(){return this._performanceMetrics}json(){return Object.assign({xhrMetrics:this.performanceMetrics},this.output)}toJSON(e){return e?this[e]:{url:this._url,status:this._status,error:this._error.message||this._error,output:this._output}}}var Vo=function(e,t,r){r=r||console;return{getResourceUrl:function(n){n=n.replace(/^\.?\/?/,"");var o=e[n];if(o)return t+o;r&&"function"==typeof r.warn&&r.warn('resource-util.getResourceUrl: "'+n+'" not found.')}}};const Uo=console;let xo;function Go(e,t=!1,r={}){const n=Jo();return r.useGrouping=t,Number(e).toLocaleString(n,r)}const Ho={generateRandomID:function(){let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r<5;r++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},formattedDuration:function(e){let t=Math.round(e),r=1==t?"Books.Duration.Unit.Second":"Books.Duration.Unit.Seconds";return t>=60&&(t=Math.round(e/60),r=1==t?"Books.Duration.Unit.Minute":"Books.Duration.Unit.Minutes"),t>=60&&(t=Math.round(e/60/60),r=1==t?"Books.Duration.Unit.Hour":"Books.Duration.Unit.Hours"),ds(r,{duration:t})},formattedFileSizeAndUnit:function(e){let t,r,n=1;return e>=Math.pow(2,30)?(t=(e/Math.pow(2,30)).toFixed(1),r=ds("Books.FileSize.Unit.GB")):e>=Math.pow(2,20)?(t=(e/Math.pow(2,20)).toFixed(1),r=ds("Books.FileSize.Unit.MB")):e>=Math.pow(2,10)?(t=(e/Math.pow(2,10)).toFixed(1),r=ds("Books.FileSize.Unit.KB")):e>1?(t=String(e),r=ds("Books.FileSize.Unit.bytes"),n=0):(t=String(e),r=ds("Books.FileSize.Unit.byte"),n=0),{formattedSize:Go(t,!1,{minimumFractionDigits:n,maximumFractionDigits:1}),unit:r}},resources:{getResourceUrl:function(){if(!xo){const e=br.replace(/[^/]+$/,"");xo=Vo(n.resources,e,Uo)}return xo.getResourceUrl.apply(null,arguments)}},color:{hexToRgb:function(e,t=1){if(!e)return"";let r="";const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),o=n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),t]:null;return o&&(r=`rgba(${o.join(",")})`),r},luminance:function(e){const t=this.hexToRgb(e).match(/\d+/g);return Math.sqrt(.299*t[0]*t[0]+.587*t[1]*t[1]+.114*t[2]*t[2])},isDark:function(e){return this.luminance(e)<205},calculateTheme:function(e){let t="light";return e&&this.isDark(e)&&(t="dark"),t}},string:{toPlainText:function(e,t=!0){return e?(e=(e=(e=(e=(e=e.replace(/\s+/gi," ")).replace(/\s*\s*/gi,"\n")).replace(/\s*<\/?p(\s[^>]*)?>\s*/gi,"\n")).replace(/(.*?)<\/a>/gi," $2 (Link->$1) ")).replace(/<(?:.|\s)*?>/g,""),t||(e=e.replace(/\s*\n+\s*/gi," ")),e):""}},splitItemsIntoArrays:function(e,t,r){const n=[],o=Math.min(e.length,r||e.length);for(let r=0;r{r=function(e,t,r){let n=e;return n&&("string"!=typeof n&&(n=String(n)),n=n.split(t).join(r)),n}(r,`@@${e}@@`,t[e])})),r}function Ko(e){return Wo.has(e)}function $o(){return Wo.size}function Xo(){return jo||Hn("language-tag")}function Qo(){const e=Xo();return e?Promise.resolve(e):zn("language-tag")}function Jo(){return Xo()||qo||function(){if(!oi){const e=Nr.preferredLocalizations?Nr.preferredLocalizations():[];if(e.length){const t=e[0],r=function(e){if(!e)return null;const t=e.toLowerCase().replace("_","-");if(!t.startsWith("zh"))return"en"==t?"en-us":ii(t,["ar-dz","ar-bh","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sd","ar-sy","ar-tn","ar-ae","ar-ye","he-il","iw-il","ca-es","cs-cz","da-dk","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-us","es-419","es-es","es-mx","es-xl","et-ee","fi-fi","fr-ca","fr-fr","hi-in","hr-hr","hu-hu","id-id","is-is","it-it","iw-il","ja-jp","ko-kr","lt-lt","lv-lv","ms-my","nl-nl","no-no","no-nb","nb-no","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sv-se","th-th","tr-tr","uk-ua","vi-vi","vi-vn","zh-cn","zh-hans","zh-hant","zh-hk","zh-tw","ar","ca","cs","da","de","el","en","es","fi","fr","hi","hr","hu","id","is","it","ja","ko","lt","lv","ms","nb","nl","no","pl","pt","ro","ru","sk","sv","th","tr","uk","vi","zh"]);switch(t){case"zh-hans":case"zh-cn":return"zh-cn";case"zh-hant":case"zh-tw":return"zh-tw";case"zh-hant-hk":case"zh-hk":return"zh-hk";default:return"zh"}}(t);r&&(oi=r,Ds.info(`[Fallback Localization] Resolved Device's "${t}" to AMP's "${oi}"`))}oi||(oi="en-us",Ds.error(`[Fallback Localization] Using ${oi} as we're unable to resolve any from device's preferred localizations: ${e}`))}return oi}()}function Zo(e,t){return Yo(Wo.get(e),t)}function ei(e){const t=Jo();return null==e?null:e.toLocaleUpperCase(t)}function ti(e){for(const t in e)Wo.set(t,e[t])}function ri(e,t){Wo.set(e,t)}function ni(){Wo.clear()}let oi;function ii(e,t){if(!e||!t)return;const r=e.toLowerCase();if(t.includes(r))return r;const n=r.split("-")[0];if(t.includes(n))return n;for(const e of t)if(e.startsWith(n))return e;return null}let si=null;function ai(){return null==si&&(si=en.localStorage()),si}const ci="loc_last_successful_version",ui="loc_last_successful_language",li="loc_last_successful_path";class di{get pathMapByVersion(){return this._pathMapByVersion||(this._pathMapByVersion=new Map),this._pathMapByVersion}get lastUsedLocale(){return ai().getItem(ui)}_computeURL(e,t){let r=null;if("development"==e&&t.startsWith("en")&&(r=Ho.resources.getResourceUrl("loc_keys.json")),!r){const e=ii(n=t,["ar-dz","ar-bh","ar-eg","ar-iq","ar-jo","ar-kw","ar-lb","ar-ly","ar-ma","ar-om","ar-qa","ar-sa","ar-sd","ar-sy","ar-tn","ar-ae","ar-ye","he-il","iw-il","ca-es","cs-cz","da-dk","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-us","es-419","es-es","es-mx","es-xl","et-ee","fi-fi","fr-ca","fr-fr","hi-in","hr-hr","hu-hu","id-id","is-is","it-it","iw-il","ja-jp","ko-kr","lt-lt","lv-lv","ms-my","nl-nl","no-no","no-nb","nb-no","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sv-se","th-th","tr-tr","uk-ua","vi-vi","vi-vn","zh-cn","zh-hans","zh-hant","zh-hk","zh-tw","ar","ca","cs","da","de","el","en","es","fi","fr","hi","hr","hu","id","is","it","ja","ko","lt","lv","ms","nb","nl","no","pl","pt","ro","ru","sk","sv","th","tr","uk","vi","zh"])||n;r=Ho.resources.getResourceUrl(`localization/${e}.json`)}var n;return Ds.log(`Computed path ${r} for version ${e} and language ${t}`),r}install(e,t,r){r&&(e+="-bundled");let n=this.pathMapByVersion.get(e);n||(n=new Map,this.pathMapByVersion.set(e,n));const o=n.get(t);if(o)return Ds.log(`Using cached localization keys for version ${e} and language ${t}`),Promise.resolve(o);{const n=n=>{if(n&&!r){ai().setItem(ci,e),ai().setItem(ui,t);const r=this._computeURL(e,t);ai().setItem(li,r),Ds.log(`Persisted to localStorage known good localization keys: version ${e}, language ${t}, path ${r}.`)}return n},o=e=>{if(!e){const t=ai().getItem(ci),r=ai().getItem(ui),n=ai().getItem(li);t&&r&&n&&(Ds.log(`Falling back to ${n} for version ${t} and language ${r} obtained from localStorage.`),e=this._getLocStrings(t,r,n))}return e},i="en-us",s=()=>t==i?this._getLocStrings(null,i):Promise.all([this._getLocStrings(null,t),this._getLocStrings(null,i)]).then((([e,t])=>Object.assign({},t,e)));return this._getLocStrings(e,t).then(n).then(o).then((r=>{const n=t==i?null:this._getLocStrings(e,i);return Promise.all([r,n])})).then((([e,t])=>{if(!e)return null;if(!t)return e;const r=Object.assign({},t,e);return Ds.log(`Merging localization keys from a+b with ${Object.keys(t||{}).length} baseline keys from c.`),r})).then((e=>e||(Ds.log("Falling back to bundled strings from localizations.zip"),s()))).then((e=>{if(0==Object.keys(e).length)throw"[LocalizationManager] Failed to initialize after all fallback mechanisms";return e}))}}_getLocStrings(e,t,r){return new Promise((n=>{const o=r||this._computeURL(e,t);Ds.log(`Installing localization keys at ${o} for version ${e} and language ${t}`),qr.getInstance().install(e,t,o,((r,i)=>{if(!i&&r){for(const e in r)r[e]==`**${e}**`&&delete r[e];let o=this.pathMapByVersion.get(e);o||(o=new Map,this.pathMapByVersion.set(e,o)),o.set(t,r);const i=Object.keys(r).slice(0,3).map((e=>`${e}=${r[e]}`)).join(",");Ds.log(`Got ${Object.keys(r).length} localization keys for version ${e} and language ${t}, e.g. ${i}`),n(r)}else Ds.error(`Cannot install bundle for version "${e}" and language "${t}" at path "${o}, error=`,i),n(null)}))}))}}const hi={};hi.hasLocalizedValue=Ko;const pi={} ;pi.loc=Zo,pi.formatNumber=(e,t={})=>{const r=Jo();return void 0===t.useGrouping&&(t=Object.assign({},t,{useGrouping:!1})),Number(e).toLocaleString(r,t)},pi.isDefined=e=>void 0!==e,pi.locWithCount=function(e,t,r){var n,o,i=null;return 0==t&&(n=`${e}.zero`,hi.hasLocalizedValue(n)&&(i=n)),null===i&&(i=e,"other"!==(o=hi.pluralCategory(t))&&(n=`${e}.${o}`,hi.hasLocalizedValue(n)&&(i=n))),r||(r={}),pi.isDefined(r.count)||(r.count=pi.formatNumber(t)),pi.loc(i,r)},hi._pluralCategoryDefault=function(e){return"other"},hi._pluralCategoryOne=function(e){return 1==e?"one":"other"},hi._pluralCategoryArabic=function(e){var t=e>>0;if(t!=e)return"other";if(0===t)return"zero";if(1===t)return"one";if(2===t)return"two";var r=t%100;return r>=11?"many":r>=3?"few":"other"},hi._pluralCategoryCroatian=function(e){var t=e>>0;if(t!=e)return"other";var r=t%10;if(r>=5||0==r)return"other";var n=t%100;return n<=14&&n>=11?"other":1==r?"one":"few"},hi._pluralCategoryCzech=function(e){var t=e>>0;return t!=e?"many":1===t?"one":t<=4&&t>=2?"few":"other"},hi._pluralCategoryFrench=function(e){return e<2&&e>=0?"one":"other"},hi._pluralCategoryHebrew=function(e){var t=e>>0;return t!=e?"other":1===t?"one":2===t?"two":0==t%10&&t>10?"many":"other"},hi._pluralCategoryPolish=function(e){var t=e>>0;if(t!=e)return"other";if(1===t)return"one";var r=t%10;if(r<=4&&r>=2){var n=t%100;if(n>14||n<12)return"few"}return"many"},hi._pluralCategoryRomanian=function(e){var t=e>>0;if(t!=e)return"few";if(0===t)return"few";if(1===t)return"one";var r=e%100;return r<=19&&r>=1?"few":"other"},hi._pluralCategoryRussian=function(e){var t=e>>0;if(t!=e)return"other";var r=t%10;if(r>=5||0==r)return"many";var n=t%100;return n<=14&&n>=11?"many":1==r?"one":"few"},hi._pluralCategoryFnByLanguage={zh:hi._pluralCategoryDefault,id:hi._pluralCategoryDefault,ja:hi._pluralCategoryDefault,ko:hi._pluralCategoryDefault,ms:hi._pluralCategoryDefault,th:hi._pluralCategoryDefault,vi:hi._pluralCategoryDefault,en:hi._pluralCategoryOne,ca:hi._pluralCategoryOne,da:hi._pluralCategoryOne,nl:hi._pluralCategoryOne,de:hi._pluralCategoryOne,el:hi._pluralCategoryOne,fi:hi._pluralCategoryOne,hu:hi._pluralCategoryOne,it:hi._pluralCategoryOne,nb:hi._pluralCategoryOne,no:hi._pluralCategoryOne,pt:hi._pluralCategoryOne,es:hi._pluralCategoryOne,sv:hi._pluralCategoryOne,tr:hi._pluralCategoryOne,ar:hi._pluralCategoryArabic,hr:hi._pluralCategoryCroatian,cs:hi._pluralCategoryCzech,sk:hi._pluralCategoryCzech,fr:hi._pluralCategoryFrench,he:hi._pluralCategoryHebrew,iw:hi._pluralCategoryHebrew,hi:hi._pluralCategoryFrench,pl:hi._pluralCategoryPolish,ro:hi._pluralCategoryRomanian,ru:hi._pluralCategoryRussian,uk:hi._pluralCategoryRussian};let gi,fi,yi,mi,_i=!1;function Ei(){return null==fi&&(fi=Nr.productType()),fi}function Si(){return null==yi&&(yi=Nr.model()),yi}hi.pluralCategory=function(e){const t=Jo().substr(0,2);return hi._pluralCategoryFnByLanguage[t]?hi._pluralCategoryFnByLanguage[t](e):(_i||(Ds.error(`Missing plural category definition for ${t}`),_i=!0),"other")};Object.freeze({ASCENDING:0,SAME:1,DESCENDING:2,UNDEFINED:3});function Ii(){return Ei().startsWith("iPhone")}function Di(){const e=Ei();return e.startsWith("iPhone")||e.startsWith("iPod")}let wi;function bi(){return null==wi&&(wi="mac"==Si()),wi}function Ai(...e){return Dr?Dr.signpostBegin(...e):null}function vi(...e){Dr&&Dr.signpostEnd(...e)}const{isMultiUser:Ri}=yr,Ti="AccountChangeNotification",Pi="NewAccountId";let Oi=null,Ci=!1,ki=null;function Ni(){return!!Bi()}function Bi(){return Oi||(Oi=_n.getInstance().account.uniqueIdentifier),Oi}function Li(){const e=_n.getInstance().account.accountName;return e||""}function Fi(){return!!_n.getInstance().account.isManagedAppleID}function Mi(){return!!Ri&&Ri()}function Vi(e){Ci=!0,mr.getInstance().signOut((t=>{t||(Ci=!1),e()}))}function Ui(e){Ci=!0,mr.getInstance().signIn((t=>{"Success"!==t&&(Ci=!1),Hi(t,e)}))}function xi(){return Ci}function Gi(e,t){mr.getInstance().reauthenticateSignIn(e,(e=>{Hi(e,t)}))}function Hi(e,t){"StoreFrontChange"===e?ts().then((()=>{t&&t(e)})).catch((r=>{Ds.error(r),t&&t(e)})):("Unknown"===e&&Ds.error("The sign in response not expected to be unknown"),t&&t(e))}let ji=0;function qi(e,t={}){ji+=1,mr.getInstance().showAccountViewControllerWithUrl(e,(()=>{ji-=1,Wi()}),t)}const zi=new Set;function Wi(){if(0==ji){for(const e of zi)e();zi.clear()}}function Yi(){Ci=!1;const e=_n.getInstance().account.uniqueIdentifier;Oi!=e&&(Oi=e,ki&&ki.updateValue(!!e),fr.getInstance().post(Ti,{[Pi]:e}))}var Ki={isUserSignedIn:Ni,getUserDSIDSync:Bi,getAccountName:Li,isManagedAppleID:Fi,isMultiUser:Mi,signOut:Vi,unregisterOnAccountChange:function(e){_n.getInstance().unregisterOnAccountChange(e)},signIn:Ui,signInPromise:function(){return new Promise(((e,t)=>{Ui((r=>{"Success"===r?e(r):t(new Error(r))}))}))},isSigningInOrOut:xi,reauthenticateSignIn:Gi};let $i=!Dr;const Xi=new Set;function Qi(){return $i?Promise.resolve():(Ds.info("Task blocked by TabBarController initialization"),new Promise((e=>{Xi.add(e)})))}let Ji=!1;const Zi=new Set;function es(){return Dr?new Promise((e=>{Ji?Zi.add(e):e()})):Promise.resolve()}function ts(){return Dr?new Promise((e=>{Ji||(Ji=!0,Ds.debug("[Reload] Waiting for all acount pages to be dismissed..."),new Promise((e=>{0==ji?e():zi.add(e)})).then((()=>{Ds.debug("[Reload] Dismissing presented VCs"),Dr.dismissPresentedViewController(!0,(()=>{Ds.debug("[Reload] Reloading tabs"),Dr.reloadTabsWithBagChangeAnimated(!0,(()=>{Ds.debug("[Reload] Reload done, calling completion...");for(const e of Zi)e();Zi.clear(),Ji=!1}))}))}))),Zi.add(e)})):Promise.resolve()}function rs(e){e&&(Ds.debug(`[TabBarController] Selecting tab ${e}...`),Dr.selectTabWithIdentifier(e))}function ns(){return new Promise((e=>{Ds.debug("[TabBarController] Dismissing all cards..."),Dr.dismissCardsForSelectedTab(!0,e)}))}function os(){return new Promise((e=>{Dr.topViewControllerInSelectedTab((t=>{e(t)}))}))}function is(e,t=!1){return os().then((r=>(Ds.debug(`[TabBarController] Popping navigations from ${r}...`),!e&&r&&r.feedController?new Promise((e=>r.feedController().popToRootViewController(t,e))):ss(e||(()=>!1),t))))}function ss(e,t,r=null,n=0){return os().then((o=>{if(Ds.debug(`[TabBarController] Popping ${o}, previous=${r}`),o==r)return n>1?o:null;return!e(o.trackerName)&&o.feedController?new Promise((r=>{o.feedController().popViewController(t,(()=>{r(ss(e,t,o,n+1))}))})):void 0}))}let as=!1;const cs=new Set;function us(e){return new Promise((t=>{as?t(as):(Ds.info(`Blocked by localization: ${e}`),t._name=e,cs.add(t))}))}globalThis.debug.overrideLocale=(e,t)=>{!function(e){jo=e}(e),ls(),t&&ts()};async function ls(){const e=n.version,r=t();let o=Ai("Loc init");as=!1;const i=new di;zo(i.lastUsedLocale);try{Xo()||(Ds.log("Localization initialization waiting for bag..."),await Promise.race([Qo(),new Promise(((e,t)=>setTimeout(t,2e3)))]))}catch(e){e?Ds.error("Error while getting language tag",e):Ds.log("Timed out while waiting for bag, proceeding with last used locale")}let s=Jo().toLowerCase();const a=s.match(/^(zh-)(\w*-)(\w*)$/);if(a){const e=a[1]+a[3];Ds.log(`Replacing bag locale ${s} as ${e}`),s=e}zo(s),vi(o,"Loc init"),Ds.log(`Initializing localization for version ${e} and locale ${s}`),o=Ai("Loc install");const c=await i.install(e,s,r);vi(o,"Loc install"),o=Ai("Loc updateTranslation"),ni(),ti(c),vi(o,"Loc updateTranslation"),Ds.log(`LocalizationManager initialized with ${$o()} keys.`),as=!0;for(const e of cs)e(as);cs.clear()}function ds(e,t){const r=`${e}.mac`;if(bi()&&Ko(r))return Zo(r,t);if(Ko(e))return Zo(e,t);{const t=`**${e}**`;return Ds.error(`Missing string when localizing "${e}" for "${Jo()}".`),ri(e,t),t}}function hs(e,t,r){const n=`${e}.mac`;if(bi()&&Ko(n))return pi.locWithCount(n,t,r);if(Ko(e))return pi.locWithCount(e,t,r);{const t=`**${e}**`;return Ds.error(`Missing string when localizing "${e}" for "${Jo()}".`),ri(e,t),t}}function ps(e,t){if(null==e)return null;let r=e.substring(0,2);return t&&(r=r.toUpperCase()),r}function gs(e,t={},r=!0){const n=t.method?t.method:"GET",o=t.headers?t.headers:{},i=t.body,s=t.timeout?t.timeout:30,a=t.queryItems,c=t.shouldSuppressResponseDialogs,u=t.allowResponseDialogs&&!c,l=t.shouldSuppressMetrics,d=t.retryCount,h={url:e,method:n,headers:o,body:i,timeout:s,queryItems:a,shouldSuppressResponseDialogs:c,shouldSuppressMetrics:l,retryCount:d},p=Object.assign(new Sn,h),g=a?`queryString=${JSON.stringify(a)}`:"";Ds.groupCollapsed(`[Fetch] Request: ${n} ${e} `),i?Ds.log(g,`body=${i}`):Ds.log(g),Ds.groupEnd();return{promise:new Promise(((t,o)=>{const i=()=>{p.onResponse=function(r){const i=new Mo(r,{url:e}),s=i&&i.output?i.output.dialog:null;i&&i.ok&&(u||!s)?(Ds.groupCollapsed(`[Fetch] Response: ${n} ${e}`),Ds.log(g,"response=",r),Ds.groupEnd(),t(i)):(Ds.warn(`[Fetch] Response: ${n} ${e}`),Ds.log(g,"response=",r),o(new Fo("",h,i)))};const r=a?a.l:null;r?Qo().then((e=>{r!=e?o(new Error("Storefront changed. The request is no longer valid.")):p.send()})).catch(o):p.send()};e?po(!0)||!r?i():go().then((e=>{e?i():o(new Lo("Rejecting request on a disabled storefront"))})).catch(o):o(new Error("Missing url for fetch"))})),request:p}}function fs(e,t,r=!0){return gs(e,t,r).promise}function ys(e,t,r=!0){return fs(e,t,r).then((e=>e.json()))}function ms(e){const t=[];for(const[r,n]of e)t.push(`${encodeURIComponent(r)}=${encodeURIComponent(n)}`);return t.join("&")}const _s={senderName:"ITSClient",version:"3.1"},Es=Symbol("session");function Ss(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var Is={createUUID:Ss};const Ds=new class extends class{constructor(e){const t=globalThis.logger||console;this.level=U.silent,Object.assign(this,e);for(const e of["debug","info","log","warn","error","group","groupCollapsed","groupEnd"]){"function"==typeof t[e]?this[e]=function(){this.level>=U[e]&&t[e].apply(t,arguments)}.bind(this):t.error(`Missing function ${e} in logger!`,t)}}}{constructor(...e){if(super(...e), this.splunkServer||(this.splunkServer=_s),this.lottery=!0,!r()){const e=this.error,t=(...t)=>{this.splunkEnabled&&this.lottery?(e.call(this,...t,this.sessionId),this.logging_splunk(...t).catch((()=>{}))):e.call(this,...t)};this.error=t}}get sessionId(){return this[Es]}set sessionId(e){this[Es]=e}logging_splunk(...e){const t=e.map((e=>String(e))).join(" "),r=e.findIndex((e=>e instanceof Error)),n=-1!==r,o=n&&e[r].eventType||"lager",i=((n?e[r].stack:(new Error).stack)||"").split("\n").slice(3),{version:s,senderName:a}=this.splunkServer,c={deliveryVersion:"1.0",postTime:Date.now(),events:[{message:t,eventType:o,ITSLogger_version:s,currentManifestVersion:this.appVersion||"unknown",ITSLogger_loggerName:"appleBooksMain",ITSLogger_loggingThreshold:4,clientCorrelationKey:this.sessionId,sender:a,trace1:i[0],trace2:i[1],trace3:i[2]}]};return ys("https://xp.apple.com/report/2/xp_amp_legacy_log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)},!1)}}({level:U.everything,splunkEnabled:!0,appVersion:n.version,sessionId:Is.createUUID()});function ws(){const e=new Date;return`${e.toTimeString().substr(0,8)}.${`${e.getMilliseconds()}`.padStart(3,"0")}`}const bs=Object.freeze({BOOKS:"#for_you_page_books",AUDIOBOOKS:"#for_you_page_audiobooks",MANGA:"#for_you_page_manga"}),As="audiobooks-homepage",vs="bookstore-homepage",Rs="end-of-book-card",Ts="hidden-purchases",Ps="notification-settings-page",Os="reading-now-homepage",Cs="search-homepage",ks="influencer-page",Ns="top_charts",Bs="mapped-book-exposure",Ls="RatingsChangedNotification",Fs="ReviewReportedNotification",Ms="SharedWithYouContentChangedNotification",Vs=Object.freeze({AUDIOBOOKS:"audiobooks",MANGA:"manga",BOOKS:"books",BOOK_STORE:"book_store",CHARTS:"charts",FEATURED:"featured",LIBRARY:"library",READING:"reading",READING_NOW:"reading_now",SEARCH:"search"}),Us=Object.freeze({HEIGHT:57,WIDTH:355,MARGIN:16,LEFT_MARGIN:48}),xs=(Object.freeze({LEFT:0,CENTER:1,RIGHT:2}),Object.freeze({DEFAULT:0,OFFLINE:1,STORE_DISALLOWED:2})),Gs=Object.freeze({NEVER:0,COMPACT_ONLY:1,REGULAR_ONLY:2,ALWAYS:3}),Hs=Object.freeze({NONE:0,DAILY_READING_INCOMPLETE:1,DAILY_READING_COMPLETE:2,BOOKS_FINISHED_INCOMPLETE:3,BOOKS_FINISHED_COMPLETE:4,STREAK_ONGOING:5,STREAK_NEW_RECORD:6,STREAK_LONGEST:7,BOOKS_FINISHED_PREVIOUS_YEAR:8}),js=Object.freeze({NONE:0,DAILY_READING:1,BOOKS_FINISHED:2,STREAK:3}),qs=Object.freeze({BOOKS_FINISHED:0,DAILY_READING:1}),zs=Object.freeze({NOT_VOTED:0,UP_VOTED:1,DOWN_VOTED:2}),Ws=Object.freeze({NONE:0,ASSET:1}),Ys=Object.freeze({NONE:0,UP:1,DOWN:2,LEFT:4,RIGHT:8,ANY:15}),Ks=Object.freeze({PRODUCT_FEED:"product-feed",STORE_FEED:"store-feed",READING_NOW:"reading-now",SEARCH_FEED:"search-feed",SHARED:"shared"}),$s=Object.freeze({DEFAULT:"default"}),Xs=(Object.freeze({EPUB:"11",AUDIOBOOK:"3"}),["zh-hant","zh-tw","zh-hk","ja","ar","he","arc","az","dv","ku","fa","ur"]),Qs=Object.freeze({CALLER:"P6",LOCKUP_GROUPING_PROFILE:"lockup-grouping",LOCKUP_PROFILE:"lockup",REDOWNLOAD_LOCKUP_PROFILE:"redownload-lockup",PRODUCT_DV_PROFILE:"product-dv",REDOWNLOAD_IMAGE_ITEM_PROFILE:"redownload-image-tracklist-item",VERSION:"2"}),Js=Object.freeze({NAV_BAR_VISIBILITY:"navigationBarVisibility",NAV_BAR_STYLE:"navigationBarStyle",NAV_BAR_INITIAL_BACKGROUND_OPACITY:"navigationBarInitialBackgroundOpacity",NAV_BAR_TINT_COLOR:"navigationBarTintColor",NAV_BAR_TINT_OPACITY:"navigationBarTintOpacity",NAV_BAR_HORIZONTAL_LAYOUT_INSET:"navigationBarHorizontalLayoutInset",DAY_BACKGROUND_COLOR:"dayBackgroundColor",DAY_BACKGROUND_OPACITY:"dayBackgroundOpacity",NIGHT_BACKGROUND_COLOR:"nightBackgroundColor",NIGHT_BACKGROUND_OPACITY:"nightBackgroundOpacity",TITLE:"title",TRACKER_NAME:"trackerName",ACCESSIBILITY_SUMMARY:"accessibilitySummary",SHOWS_VERTICAL_SCROLL_INDICATOR:"showsVerticalScrollIndicator",MESSAGE_PLACEMENTS:"messagePlacements"}),Zs=Object.freeze({IPAD:"iPad",IPHONE:"iPhone",IPOD:"iPod",MAC:"mac"}),ea=Object.freeze({UNKNOWN:0,EPUB:1,TXT:2,PDF:3,IBA:4,CONTAINER:5,AUDIOBOOK:6}),ta=Object.freeze({FULL_SCREEN:0,PAGE_SHEET:1,FORM_SHEET:2,CURRENT_CONTEXT:3,CUSTOM:4,OVER_FULL_SCREEN:5,OVER_CURRENT_CONTEXT:6,POPOVER:7,NONE:-1}),ra=Object.freeze({EXPANDED:0,COLLAPSED:1,EXCLUDED:2}),na=Object.freeze({COVER_VERTICAL:0,FLIP_HORIZONTAL:1,CROSS_DISSOLVE:2,PARTIAL_CURL:3}),oa=(Object.freeze({257:"header",258:"carousel",259:"carouselItem",260:"shelf",261:"editorial",262:"editorialItem",256:"stack",265:"links",266:"quicklinks",267:"genresStack",271:"tabSet",55:"radioShelf",268:"trackShelf",381:"recommendations"}),"https://su.itunes.apple.com/WebObjects/MZSoftwareUpdate.woa/wa/viewBookUpdates"),ia="https://se-edge.itunes.apple.com/WebObjects/MZStoreElements.woa/wa/purchases",sa="https://se-edge.itunes.apple.com/WebObjects/MZStoreElements.woa/wa/purchasesGenre",aa="Want_To_Read_Collection_ID",ca="sections-categories-page",ua="family-member-page",la="UNHIDDEN",da=Object.freeze({NOT_PURCHASED:"notPurchased",LIBRARY:"library",PURCHASING:"purchasing",PREORDERED:"preordered",PURCHASED:"purchased"}),ha=Object.freeze({CLOUD:"cloud",DOWNLOADING:"downloading",LOCAL:"local"}),pa=(Object.freeze({AUTOMATIC:0,NEVER:1,ALWAYS:2}),"recent_searches"),ga="recent_viewed",fa="oprah-book-club-grouping-id",ya="oprah-book-club-id",ma=0,_a=1,Ea=2,Sa=Object.freeze({PAID:"top-paid",FREE:"top-free",NYT_FICTION:"nyt-fiction",NYT_NON_FICTION:"nyt-non-fiction",MANGA_PAID:"top-paid-manga",MANGA_FREE:"top-free-manga",NON_MANGA_PAID:"top-paid-non-manga",NON_MANGA_FREE:"top-free-non-manga",TOP_AUDIOBOOK:"top",NEW_YORK_TIMES_SELECTION_KEY:"NEW_YORK_TIMES_SELECTION_KEY"}),Ia=Object.freeze({"include[personal-recommendation]":"contents","sparseLimit[personal-recommendation:contents]":"3","meta[personal-recommendation]":"metrics"}),Da=Object.freeze({"include[audio-books]":"audio-book-series","meta[audio-books:audio-book-series]":"seriesInfo"}),wa=Object.freeze({extend:"sellerInfo,publisherInfo"}),ba={Print:"com.apple.UIKit.activity.Print",AssignToContact:"com.apple.UIKit.activity.AssignToContact",SaveToCameraRoll:"com.apple.UIKit.activity.SaveToCameraRoll",PostToFlickr:"com.apple.UIKit.activity.PostToFlickr",PostToVimeo:"com.apple.UIKit.activity.PostToVimeo",OpenInIBooks:"com.apple.UIKit.activity.OpenInIBooks",MarkupAsPDF:"com.apple.UIKit.activity.MarkupAsPDF",CloudSharing:"com.apple.UIKit.activity.CloudSharing",PostToFacebook:"com.apple.UIKit.activity.PostToFacebook",PostToTwitter:"com.apple.UIKit.activity.PostToTwitter",PostToWeibo:"com.apple.UIKit.activity.PostToWeibo",Message:"com.apple.UIKit.activity.Message",Mail:"com.apple.UIKit.activity.Mail",PostToTencentWeibo:"com.apple.UIKit.activity.TencentWeibo",AirDrop:"com.apple.UIKit.activity.AirDrop",AddToReadingList:"com.apple.UIKit.activity.AddToReadingList",CopyToPasteboard:"com.apple.UIKit.activity.CopyToPasteboard",ShareAlbum:"com.apple.mobileslideshow.StreamShareService",AddToiCloudDrive:"com.apple.CloudDocsUI.AddToiCloudDrive",CreateWatchFace:"com.apple.NanoTimeKitCompanion.CreateWatchFace"},Aa=Object.freeze({BUY:0,OPEN:1,DOWNLOAD:2,CANCEL_DOWNLOAD:3}),va=Object.freeze({READING_GOALS:"readingGoals",READING_GOALS_COACHING:"readingGoalsCoaching",RECOMMENDATIONS:"recommendations",BOOK_CLUB:"bookClub"}),Ra=Object.freeze({NOTIFICATION_SETTINGS_VISITED:"notificationSettingsOpen",PRODUCT_PAGE_VIEWED:"productPageViewed",ADD_TO_WTR_USED:"addToWTRButtonInteraction"}),Ta=Object.freeze({SIGN_IN:"ibooks://um/signin",ABOUT_CARPLAY:"ibooks://um/aboutCarplay",CUSTOMIZE_WATCH_APP:"ibooks://um/customizeWatchApp",TURN_ON_COACHING:"ibooks://um/turnOnCoachingSettings",GO_TO_IN_APP_NOTIFICATION_SETTINGS:"ibooks://um/goToInAppNotificationSettings",GO_TO_NOTIFICATION_SETTINGS:"ibooks://um/goToNotificationSettings"}),Pa=Object.freeze({ABOUT_CARPLAY:"https://support.apple.com/ht205634?cid=ot-ols-booksapp-article_ht205634-ios_ui-07202021",CUSTOMIZE_WATCH_APP:"bridge:root=com.apple.NanoBooks.BridgeSettings"}),Oa="prefs:root=NOTIFICATIONS_ID&path=com.apple.iBooks",Ca="x-apple.systempreferences:com.apple.Notifications-Settings.extension?id=com.apple.iBooksX",ka="BooksVoices";function Na(e){return e.pageData.unAvailableContentIds||{}}function Ba(e,t){const r={id:e,adamId:e,missing:!0};return t&&t.lockup&&t.lookup.push(r),r}function La(e){if(!e.unAvailableContentIds[e.adamId])return e.storePlatformData[e.adamId]?e.storePlatformData[e.adamId]:Ba(e.adamId,e.parsed)}function Fa(e,t){return{type:"tabSet",name:e,children:t||[]}}function Ma(e,t,r){return{type:"shelf",name:e,seeAllUrl:t,content:r||[]}}function Va(e,t,r){const n=Fa(e.shortTitle,[Ma(e.shortTitle,e.seeAllUrl)]),o=Na(r);for(let i=0;i{t.output&&(t.output.data||r.suppressParsing||(t.parsedOutput=Ya(t.output,e,o),t.parsedOutput.pageData&&(t.parsedOutput.pageData.sourceUrl=e))),n&&n(t)})).catch((e=>{n&&n({error:e})})),i.request}fetchMZStoreWithOptionsPromise(e,t,r,n){return new Promise(((o,i)=>{this.fetchMZStoreWithOptions(e,t,r,(e=>{e.ok?o(e):i(e.error)}),n)}))}postReviewRequest(e,t,r){if(e)if(void 0!==tn){const n=new tn;t.submitURL=e,n.metadata=t,n.onResponse=function(e){r(e)},n.send()}else r({error:!0,reason:"PostReviewRequest is not defined"});else r({error:!0,reason:"No URL provided for fetchMZStore"})}lookupIDs(e,t){const r={},n=this.getCachedStorePlatformData(t);for(let t=0;t{t(e)})),o}fetchReviewsOverview(e,t){return this.fetchMZStore(e,null,(e=>{if(e.ok&&e.output&&e.output.userReviewsRowUrl&&e.output.adamId&&e.output.kindId){const r=1;this.fetchReviews(e.output.userReviewsRowUrl,{"displayable-kind":e.output.kindId,id:e.output.adamId,startIndex:0,endIndex:20,sort:r},(n=>{n.parsedOutput&&(n.parsedOutput.pageData.sort=e.output.userReviewsSortOptions.find((e=>e.sortId==r))),t&&t(e,n)}))}else t&&t(e)}))}fetchReviews(e,t,r){return this.fetchMZStore(e,t,(e=>{r&&r(e)}))}}function Xa(e){return new Promise((t=>{const r=e.itemIdentifiers,n=e.requestOptions.p;e.onResponse=e=>{if(e&&e.results){const o=$a.client();o.cacheStorePlatformData(e,n),t(o.lookupIDs(r,n))}else t({error:!0,reason:"Could not make lookup request"})},e.send()}))}function Qa(e,t){const r=new En;return r.requestOptions={p:t||Qs.LOCKUP_PROFILE,version:Qs.VERSION,caller:Qs.CALLER},r.itemIdentifiers=e,r}function Ja(e,t,r){const n=Math.ceil(e.length/200);let o;const i=[];for(let r=0;r{const t=e.reduce(((e,t)=>Object.assign(e,t)));r(t)})),o}const Za=$a.client(),ec="its_id",tc="data-metrics",rc="sequential",nc="isAppLaunch",oc="clientCorrelationKey",ic="launchCorrelationKey",sc="preloadStatus",ac="pageRequestTime",cc="interstitialPageAppearTime",uc="pageAppearTime",lc="pageUserInteractiveTime",dc="pageEndTime",hc="pageInterruptTime",pc="primaryDataRequestStartTime",gc="primaryDataResponseStartTime",fc="primaryDataResponseEndTime",yc="isPrimaryDataResponseCached",mc="primaryDataParseStartTime",_c="primaryDataParseEndTime",Ec="modelConstructionStartTime",Sc="modelConstructionEndTime",Ic="modelRenderStartTime",Dc="modelRenderEndTime",wc="resourceRequestStartTime",bc="onScreenResourcesAppearEndTime",Ac="resourceRequestEndTime",vc="TemplateUI:parsingInterval",Rc="TemplateUI:instantiateInterval",Tc="TemplateUI:layoutInterval",Pc="TemplateUI:renderInterval";function Oc(e,t={}){if(e){const r=r=>Object.prototype.hasOwnProperty.call(t,r)?t[r]:No(e,`_pageRenderMetrics.${r}`),n=(t,r,n=!1)=>{null!=r&&(e._pageRenderMetrics[t]=n?!!r:r)},o=r(nc),i=r(oc),s=r(ic),a=r(sc),c=r(ac),u=r(cc),l=r(uc),d=r(lc),h=r(dc),p=r(hc),g=r(pc),f=r(gc),y=r(fc),m=r(yc),_=r(mc),E=r(_c),S=r(Ec),I=r(Sc),D=r(Ic),w=r(Dc),b=r(wc),A=r(bc),v=r(Ac),R=r(vc),T=r(Rc),P=r(Tc),O=r(Pc);e._pageRenderMetrics=e._pageRenderMetrics||{},n(nc,o,!0),n(oc,i),n(ic,s),n(sc,a),n(ac,c),n(cc,u),n(uc,l),n(lc,d),n(dc,h),n(hc,p),n(pc,g),n(gc,f),n(fc,y),n(yc,m),n(mc,_),n(_c,E),n(Ec,S),n(Sc,I),n(Ic,D),n(Dc,w),n(wc,b),n(bc,A),n(Ac,v),n(vc,R),n(Rc,T),n(Tc,P),n(Pc,O)}}const Cc=-1;function kc({id:e,index:t=Cc,name:r,parentId:n,parentImpressionPath:o,impressionType:i,reorderedFlag:s=!1,preReorderIndex:a,rankerId:c,artistName:u,kind:l,narratorName:d,narratorType:h}={}){const p=t,g={id:e,idType:ec,impressionIndex:p,impressionType:i||"lockup",impressionQueueTag:tc,name:r,artistName:u,kind:l,narratorName:d,narratorType:h};return c&&(g.impressionPreReorderIndex=a,g.impressionRankerId=c),g.impressionReorderedFlag=s,-1!=n&&(g.impressionParentAdamId=n),o&&(g.impressionPath=Mc(o,p)),g}function Nc(e){const{index:t,name:r,parentId:n,parentImpressionPath:o,impressionType:i}=e;return{id:t,idType:ec,name:r,impressionIndex:t,impressionType:i,impressionParentAdamId:n,impressionQueueTag:tc,impressionPath:Mc(o,t),parentImpressionPath:o,sectionDataOptional:!0}}function Bc(e,t,r,n,o){const i={impressionPath:Mc(t.feedID,r.entryID),impressionIndex:e,impressionParentAdamId:t?.pageFieldMetrics?.pageId,impressionType:r.figaroLocationType,impressionQueueTag:tc,name:n||r.figaroImpressionName,narratorName:r.figaroImpressionNarratorName,narratorType:r.figaroImpressionNarratorType},s=o||r.figaroImpressionId;return s?(i.id=s,i.idType=ec):(i.id=e,i.idType=rc),i.isLibraryBased=r.constructor.isLibraryBased,i.excludeFigaroImpression=r.constructor.excludeFigaroImpression,i.isSection=!0,i.sectionDataOptional=!0,i}function Lc(e={}){ const{entry:t={},index:r=Cc,id:n,parentImpressionPath:o,impressionType:i,sectionData:s,name:a,reorderedFlag:c,genrePreferenceAvailable:u,preReorderIndex:l,rankerId:d,odpData:h}=e,p=r==Cc?No(t,"currentRootImpression.impressionIndex"):r,g=o?Mc(o,p):t.currentRootImpressionPath||Mc(-1,t.entryID),f={id:n||No(t,"_resource.id")||t.figaroImpressionId,idType:ec,impressionPath:g,impressionIndex:p,impressionType:i||"lockup",impressionQueueTag:tc,name:a};return f.impressionReorderedFlag=c,f.impressionGenrePreferenceAvailable=u,f.impressionPreReorderIndex=l||p,f.impressionRankerId=d,h&&(f.odpData=h),f.isRootElement=!0,f.isLibraryBased=t.constructor.isLibraryBased,f.excludeFigaroImpression=t.constructor.excludeFigaroImpression,Object.assign(f,s),f}function Fc({feed:e,name:t,pageId:r,rankerMetrics:n,narratorName:o,narratorType:i}={}){const s={impressionPath:`${e.feedID}`,impressionIndex:0,impressionType:"page",impressionQueueTag:tc,name:t,rankerMetrics:n,narratorName:o,narratorType:i},a=r||e?.pageFieldMetrics?.pageId;return a?(s.id=a,s.idType=ec):(s.id=0,s.idType=rc),s}function Mc(e,t){return[e,t].join("/")}function Vc(e){return e?e.split("/")[0]:null}function Uc(e){return e?e.split("/").slice(0,2).join("/"):null} /* object-assign (c) Sindre Sorhus @license MIT */var xc=Object.getOwnPropertySymbols,Gc=Object.prototype.hasOwnProperty,Hc=Object.prototype.propertyIsEnumerable;function jc(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var qc=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=jc(e),i=1;i=i)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e}})),c=o[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"\x1b["+s.colors[r][0]+"m"+e+"\x1b["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&D(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return y(o)||(o=u(e,o,n)),o}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(f(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),I(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(D(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(I(r))return l(r)}var E,w="",b=!1,A=["{","}"];(h(r)&&(b=!0,A=["[","]"]),D(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(w=" "+RegExp.prototype.toString.call(r)),S(r)&&(w=" "+Date.prototype.toUTCString.call(r)),I(r)&&(w=" "+l(r)),0!==s.length||b&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),E=b?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(E,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),R(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=g(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function f(e){return"number"==typeof e}function y(e){return"string"==typeof e}function m(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===w(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===w(e)}function I(e){return E(e)&&("[object Error]"===w(e)||e instanceof Error)}function D(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function b(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(n)&&(n=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(n)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=f,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=_,t.isObject=E,t.isDate=S,t.isError=I,t.isFunction=D,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=zc;var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function v(){var e=new Date,t=[b(e.getHours()),b(e.getMinutes()),b(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",v(),t.format.apply(t,arguments))},t.inherits=Wc,t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}})),Kc=(Yc.format,Yc.deprecate,Yc.debuglog,Yc.inspect,Yc.isArray,Yc.isBoolean,Yc.isNull,Yc.isNullOrUndefined,Yc.isNumber,Yc.isString,Yc.isSymbol,Yc.isUndefined,Yc.isRegExp,Yc.isObject,Yc.isDate,Yc.isError,Yc.isFunction,Yc.isPrimitive,Yc.isBuffer,Yc.log,Yc.inherits,Yc._extend,a((function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ function t(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o=0;c--)if(u[c]!==l[c])return!1;for(c=u.length-1;c>=0;c--)if(!y(e[a=u[c]],t[a],r,n))return!1;return!0}(e,n,o,s))}return o?e===n:e==n}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&g(o,r,"Missing expected exception"+n);var i="string"==typeof n,s=!e&&o&&!r;if((!e&&Yc.isError(o)&&i&&_(o,r)||s)&&g(o,r,"Got unwanted exception"+n),e&&o&&r&&!_(o,r)||!e&&o)throw o}u.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(p(e.actual),128)+" "+e.operator+" "+h(p(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,o=d(t),i=n.indexOf("\n"+o);if(i>=0){var s=n.indexOf("\n",i+1);n=n.substring(s+1)}this.stack=n}}},Yc.inherits(u.AssertionError,Error),u.fail=g,u.ok=f,u.equal=function(e,t,r){e!=t&&g(e,t,r,"==",u.equal)},u.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",u.notEqual)},u.deepEqual=function(e,t,r){y(e,t,!1)||g(e,t,r,"deepEqual",u.deepEqual)},u.deepStrictEqual=function(e,t,r){y(e,t,!0)||g(e,t,r,"deepStrictEqual",u.deepStrictEqual)},u.notDeepEqual=function(e,t,r){y(e,t,!1)&&g(e,t,r,"notDeepEqual",u.notDeepEqual)},u.notDeepStrictEqual=function e(t,r,n){y(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},u.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",u.strictEqual)},u.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",u.notStrictEqual)},u.throws=function(e,t,r){E(!0,e,t,r)},u.doesNotThrow=function(e,t,r){E(!1,e,t,r)},u.ifError=function(e){if(e)throw e},u.strict=qc((function e(t,r){t||g(t,!0,r,"==",e)}),u,{equal:u.strictEqual,deepEqual:u.deepStrictEqual,notEqual:u.notStrictEqual,notDeepEqual:u.notDeepStrictEqual}),u.strict.strict=u.strict;var S=Object.keys||function(e){var t=[];for(var r in e)n.call(e,r)&&t.push(r);return t}})));class $c{constructor(e,t,r){this._propertyName=e,this.typeVerifier=t,this.value=r}get shouldAddToDictionary(){return!0}static supportDynamic(e){return e.supportDynamic=!0,e}set value(e){if(e instanceof Lr){const t=e.getValue();Kc(this.typeVerifier(t),`DynamicValue('${t}') cannot be set to property '${this._propertyName}' which has type '${this.constructor.name}'`)}else Kc(this.typeVerifier(e),`Value '${e}' cannot be set to property '${this._propertyName}' which has type '${this.constructor.name}'`);this._value=e}get value(){return this._value}toDictionary(){return this.value}get propertyName(){return this._propertyName}}class Xc{constructor(e=[]){this._properties={},e.forEach((e=>{Kc(e instanceof $c,"All properties must be specified and be an instance of ConfigProperty."),this._properties[e.propertyName]=e}))}dictionaryConformsToConfig(e){for(const t in this._properties){const r=e[t];if(null!=r){const n=this._properties[t];if(r instanceof Lr||r instanceof Br)return!0;if("Object"==e[t].constructor.name&&n.value.dictionaryConformsToConfig){if(!n.value.dictionaryConformsToConfig(r))return!1}else if(!n.typeVerifier(r))return!1}else if(this._properties[t].shouldAddToDictionary)return!1}return!0}toDictionary(){const e={};for(const t in this._properties){const r=this._properties[t];r.shouldAddToDictionary&&(e[t]=r.toDictionary())}return e}_getProperty(e){return Kc(this._properties[e],`Trying to access the property ${e} in a config where no property exists`),this._properties[e]}getPropertyValue(e){return this._getProperty(e).value}setPropertyValue(e,t){this._getProperty(e).value=t}propertyExists(e){return!!this._properties[e]}}class Qc extends $c{constructor(e,t=!1){super(e,(e=>"boolean"==typeof e||"number"==typeof e&&(1==e||0==e)),t)}}class Jc extends $c{constructor(e,t=null){super(e,(e=>"string"==typeof e||null==e),t)}get shouldAddToDictionary(){return!!this.value}}class Zc extends $c{constructor(e,t,r){const n=e=>Zc.isValid(t,e);Kc(n(r),"defaultType for a EnumProperty must be provided and valid."),super(e,n,r)}static isValid(e,t){for(const r in e)if(e[r]===t)return!0;return!1}}class eu extends $c{constructor(e,t,r){Kc(t.prototype instanceof Xc,"configClass provided in ConfigClassProperty constructor must be a subclass of BaseConfig"),super(e,(e=>e instanceof t||!("Object"!=e.constructor.name||!this.value.dictionaryConformsToConfig)&&this.value.dictionaryConformsToConfig(e)),r||new t)}toDictionary(){return this.value instanceof Lr?this.value:this.value.toDictionary()}}class tu extends $c{constructor(e,t=0){super(e,(e=>"number"==typeof e&&e>=0),t)}}class ru extends Xc{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Qc("toShow"),new tu("width"),new tu("height"),new Jc("url")]))}}const nu=Object.freeze({DRILL_IN:1,PREHEADER:2}),ou=Object.freeze({GOTO_ROOM:1,GOTO_URL:2,HANDLE_SEE_ALL:3,CUSTOM:4}),iu=Object.freeze({SECTION_HEADER:1,SMALL_SECTION_HEADER:2,CHART_HEADER:3,PREHEADER:4,SUBHEADER:5,TITLE_3_SERIF_EMPH:6}),su=Object.freeze({TEXT:1,TEXT_SUBDUED:2}),au=Object.freeze({DEFAULT:1,FOOTNOTE:2}),cu=Object.freeze({AUTOMATIC:1,VIBRANT:2}),uu=Object.freeze({XXXS:1,XXS:2,XS:3,S:4,M:5,L:6,XL:7,XXL:8,XXXL:9,XXXXL:10}),lu=Object.freeze({SPACER_XXXL:uu.XXXL,HEAD1:1001,HEAD2:1002,HEAD3:1003,HEAD4:1004,NONE:1005,AUTOMATIC:1006}),du=Object.freeze({TAIL1:1,TAIL2:2,TAIL3:3,TAIL4:4});class hu extends Xc{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Qc("showDivider"),new eu("upperImage",ru),new Qc("showPreheader"),new Jc("preheader"),new Qc("showSeeAll"),new Qc("seeAllEnabled",!0),new Zc("seeAllFont",nu,nu.DRILL_IN),new Zc("seeAllAction",ou,ou.GOTO_ROOM),new Jc("seeAllUrl"),new Jc("customSeeAllBehavior"),new Jc("seeAllLabel",ds("Books.Swoosh.seeAll")),new Qc("showTitle"),new Qc("titleEnabled",!0),Jc.supportDynamic(new Jc("title")),new Zc("titleFont",iu,iu.SECTION_HEADER),new Zc("titleColor",su,su.TEXT),new Qc("isCurrentOrRecent",!1),Qc.supportDynamic(new Qc("showSubheader")),new Qc("subHeaderEnabled",!0),Jc.supportDynamic(new Jc("subheader")),new Zc("subheaderFont",au,au.DEFAULT),new Zc("subheaderColor",cu,cu.AUTOMATIC),new Qc("showSectionSubdivider"),new Qc("showSubdividerText"),new Jc("subdividerText"),new Zc("compactHead",lu,lu.AUTOMATIC),new Zc("notCompactHead",lu,lu.AUTOMATIC),new Zc("compactHeadAX",lu,lu.AUTOMATIC),new Zc("notCompactHeadAX",lu,lu.AUTOMATIC),new Qc("showTail"),new Zc("tailSize",du,du.TAIL2),new Qc("showSeeAllChevron",!bi()),new Jc("linkID")]))}setHead(e){this.setPropertyValue("compactHead",e),this.setPropertyValue("notCompactHead",e),this.setHeadAX(e)}setHeadAX(e){this.setPropertyValue("compactHeadAX",e),this.setPropertyValue("notCompactHeadAX",e)}setSeeAllUrl(e){e&&(this.setPropertyValue("seeAllUrl",e),this.setPropertyValue("seeAllAction",hu.SEE_ALL_ACTIONS.GOTO_URL))}static get SEE_ALL_FONTS(){return nu}static get SEE_ALL_ACTIONS(){return ou}static get TITLE_FONTS(){return iu}static get TITLE_COLORS(){return su}static get SUBHEADER_FONTS(){return au}static get SUBHEADER_COLORS(){return cu}static get HEAD_SPACING(){return lu}static get TAIL_SPACING(){return du}toDictionary(){const e=super.toDictionary();if(this.getPropertyValue("showTitle")&&this.getPropertyValue("showSeeAll")){const t=this.getPropertyValue("title");/^[A-Za-z\u00C0-\u024F]+$/g.test(t)&&(e.latin1WordTitle=!0)}return e}}const pu=Object.freeze({ GOTO_EXTERNAL:0,GOTO_ROOM:1,GOTO_URL:2,HANDLE_SEE_ALL:3});class gu extends Xc{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Qc("showSeeMore"),new Zc("seeMoreAction",pu,pu.GOTO_ROOM),new Jc("seeMoreTitle",ds("Books.Swoosh.seeAll")),new Jc("title"),new Jc("seeAllDetailText"),new Jc("seeMoreUrl"),new Qc("showDivider"),new Jc("seeMoreSymbol","chevron.forward"),new eu("itemConfig",wu),new Qc("showRelatedItemLink",!1),new Qc("hideTopDivider"),new Qc("showMargin",!0),new Qc("hideBottomMargin",!1)]))}setSeeMore(e,t){e&&(this.setPropertyValue("seeMoreUrl",e),this.setPropertyValue("seeMoreAction",pu.GOTO_URL)),t&&this.setPropertyValue("title",t)}static get SEE_MORE_ACTIONS(){return pu}}class fu extends $c{constructor(e,t,r=0,n=Number.MAX_SAFE_INTEGER,o=[]){Kc(t instanceof $c,"configProperty provided in ArrayProperty constructor must be a subclass of ConfigProperty"),super(e,(e=>{const o=e=>e>=r&&e<=n;if(e instanceof Array){if(!o(e.length))return!1;for(const r of e)if(!t.typeVerifier(r))return!1;return!0}if(e instanceof Br){const r=e.length;if(!o(r))return!1;for(let n=0;nt.map((t=>t instanceof Xc?t.toDictionary():t instanceof Array?e(t):t));return this._value instanceof Br?this._value:e(this._value)}}class yu extends $c{constructor(e,t={}){super(e,(e=>"object"==typeof e),t)}get value(){return super.value}set value(e){(void 0!==this.value||null!=e&&Object.keys(e).length)&&(e.sectionData||e.sectionDataOptional||Ds.warn("Impression without sectionData will be dropped during submission",e)),super.value=e}}class mu extends ru{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Jc("id"),new Qc("isAudiobook"),new Qc("isRTL"),new Jc("coverFilterDay"),new Jc("coverFilterNight")])),this.isPDF=!1,this.isRestricted=!1,this.isFlowcase=!1,this.isInnerStack=!1,this.isTopStack=!1,this.useDarkShadow=!1}configureCoverFilters(){this.coverFiltersConfigured=!0;const e=this.coverFilterKeys(!1);this.setPropertyValue("coverFilterDay",e);const t=this.coverFilterKeys(!0);this.setPropertyValue("coverFilterNight",t)}inferIsRTLFromBagLanguage(){const e=Jo().toLowerCase(),t=Xs.some((t=>e==t||e.startsWith(`${t}-`)));this.setPropertyValue("isRTL",t)}coverFilterKeys(e){let t="cover";return this.getPropertyValue("isAudiobook")?t+="::audiobook":this.isPDF?t+="::pdf":(t+="::book::binding",this.getPropertyValue("isRTL")?t+="::rtl":t+="::ltr"),e?t+="::night":this.useDarkShadow&&(t+="::darkShadow"),this.isInnerStack&&(t+="::innerStack"),this.isTopStack&&(t+="::topStack"),this.isFlowcase&&(t+="::flowcase"),this.isRestricted&&(t+="::restricted"),t}toDictionary(){return this.coverFiltersConfigured||this.configureCoverFilters(),super.toDictionary()}}class _u extends Xc{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Jc("assetID"),new Jc("author"),new tu("fileSize"),new Jc("fileURL"),new Qc("isRestricted"),new Qc("isSample"),new Zc("kind",ea,ea.UNKNOWN),new Jc("title"),new Jc("storeURL"),new Jc("storeID")]))}}const Eu=Object.freeze({NONE:0,APPEARING:1,UPDATE:2,DISAPPEARING:3,REAPPEARING:4});class Su extends ru{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Qc("toShow"),new Jc("videoId"),new Jc("posterFrameUrl")]))}}class Iu extends Xc{constructor(e=[],t=Ws.NONE){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),Kc(Zc.isValid(Ws,t),"listItemKind must be provided as a valid LIST_ITEM_KIND enum in ListItemConfig's constructor"),super(e.concat([new Zc("listItemKind",Ws,t)]))}}const Du=Object.freeze({DEFAULT:0,EDITORIAL_REVIEW:1,OPRAH_REVIEW:2});class wu extends Iu{constructor(e=[]){Kc(e instanceof Array,"properties provided in constructor must either be not defined or an Array"),super(e.concat([new Jc("id"),new Jc("uniqueID"),new Jc("title"),new Jc("subtitle"),new Jc("description"),new Jc("url"),new Jc("primaryDescription"),new Jc("preheader"),new Jc("language"),new Jc("version"),new Jc("narratedBy"),new Jc("narratorName"),new tu("descriptionType",Du.DEFAULT),new tu("ratingValue"),new tu("ratingCount"),new Jc("readingProgress"),new tu("rawReadingProgress"),new Qc("isAudiobook"),new Qc("isSG",!1),new Qc("isStoreData"),new Qc("isStoreAsset"),new Qc("hasStoreData"),new Qc("isRestricted"),new Qc("isEbook",!0),new Qc("isPDF"),new Qc("isForeignLanguage"),new Qc("isNew"),new Qc("isFinished"),new Qc("isSample"),new Qc("isMemberOfSamplesCollection"),new Qc("isLocal"),new Qc("isPreorder",!1),new Jc("preorderMessage"),new eu("artwork",mu),new eu("video",Su),new Jc("bookSampleDownloadUrl"),new Jc("sequenceDisplayLabel"),new Qc("hasOffer"),new Jc("priceFormatted"),new Jc("buttonActionText"),new Jc("pillActionText"),new Jc("buyParams"),new Jc("offerType"),new Qc("isRedownload"),new tu("offerReleaseDate"),new tu("price"),new fu("audiobookTrackIds",new Jc("audiobookTrackId")),new Jc("accessibilityTitleAndAuthor"),new Jc("accessibilityRecentlyOpenedSwooshLabel"),new Jc("accessibilityCoverLabel"),new Jc("accessibilityRatingStars"),new eu("dragInfo",_u),new Zc("searchItemStatus",Eu,Eu.APPEARING),new tu("previousMatchIndex"),new Jc("finishedText",ds("Books.ReadingNow.FinishedPill")),new Jc("restrictedText",ds("Books.Store.Restricted")),new yu("impression"),new Jc("debugInfo"),new Qc("showDebugInfo",!1),new Jc("socialHighlightID"),new Qc("showSocialHighlight",!1)]),Ws.ASSET)}}class bu extends Xc{constructor(e=[]){super(e.concat([new Jc("id"),new eu("headerConfig",hu),new eu("tailConfig",gu),new fu("items",new eu("item",wu)),new tu("itemsCount"),new yu("impression"),new tu("index")]));const t=this.getPropertyValue("headerConfig");t.setPropertyValue("showDivider",!0),t.setPropertyValue("showTitle",!0),t.setPropertyValue("titleFont",hu.TITLE_FONTS.PREHEADER),t.setHead(hu.HEAD_SPACING.HEAD3),t.setHeadAX(hu.HEAD_SPACING.HEAD1)}}const Au=Object.freeze({NONE:0,DEFAULT_SOLID:1,DEFAULT_GRADIENT:2,BLACK_GRADIENT:3,TEAL_GRADIENT:4,RED_GRADIENT:5,BLUE_GRADIENT:6,DEFAULT_GRADIENT_END_SOLID:7,CUSTOM_SOLID:8,CUSTOM_GRADIENT:9}),vu=new Map;function Ru(e){return vu.get(e)}const Tu=e=>class extends e{constructor(...e){super(...e),this._impressionObservers=new Set,this._impressions=[],this._analytics_isVisible=!1}analyticsVisibilityDidAppear(){this._analytics_isVisible=!0,super.analyticsVisibilityDidAppear&&super.analyticsVisibilityDidAppear(),this._fetchedImpressions=!1,this._waitingForImpressions=!1}analyticsVisibilityWillDisappear(){this._analytics_isVisible=!1,super.analyticsVisibilityWillDisappear&&super.analyticsVisibilityWillDisappear(),this._waitingForImpressions||(this._waitingForImpressions=!0,this.collectImpressions())}willUnload(){var e;this._logger.info(`Cleaning up impressions for feed ${this.feedID}`),e=this.feedID,vu.delete(e)}willExecuteEntryBehavior(e,t,r){this._capturedVisibleEntries=this.visibleEntries,super.willExecuteEntryBehavior&&super.willExecuteEntryBehavior(e,t,r)}recordClickEventForProductPageSwipe(){}collectImpressions(){const e=this.captureImpressionMetadataSnapshot(),t=this.visibleEntries;this.collectImpressionsAndNotifyObservers(e,t)}collectImpressionsAndNotifyObservers(e,t){return this._collectAndFlushAccumulatedImpressionsWithCompletion(!0).then((r=>{this._logger.debug(`YO: Adding impressions for feed ${this.feedID}`,r.map((e=>e.data)));const n=new Map;for(const e of r){const t=e.data;if(t.sectionData){const r=e.size,{width:o,height:i}=r,s={sectionType:t.sectionData.sectionType,sectionID:`${t.impressionParentAdamId||t.sectionData.sectionID}`,sectionName:t.sectionData.name,subSectionID:t.subSectionID||t.sectionData.subSectionID,subSectionName:t.subSectionName,subSectionPosition:t.subSectionPosition,positionInSection:`${t.impressionIndex}`,cellSize:`${Math.round(o)},${Math.round(i)}`};n.set(e.data.impressionPath,s)}}var o,i;o=this.feedID,i=n,vu.set(o,i),this._impressions=r,this._impressionMetadataSnapshot=e,this._capturedVisibleEntries=t,this._fetchedImpressions=!0;for(const e of this._impressionObservers)e(pr(r));this._impressionObservers.clear()}))}onImpressionsReady(){return new Promise((e=>{this._fetchedImpressions?e(pr(this._impressions)):this._impressionObservers.add(e)}))}captureImpressionMetadataSnapshot(){const e=this.impressionMetadataSnapshot||{},t={};for(const e of this.entries||[]){const r=e.currentRootImpressionPath,n=e.impressionMetadataSnapshot;r&&n&&(t[r]=n)}return e.entries=t,e}get visibleEntries(){const e=this.entries?.filter((e=>!e.ignoreEntryForFigaro&&e.isVisible&&Object.keys(e.data).length>=0));return e}resetImpressionsState(){this._fetchedImpressions=!1}_collectAndFlushAccumulatedImpressionsWithCompletion(e){return new Promise((t=>{this.feedController&&this.feedController.collectAndFlushAccumulatedImpressionsWithCompletion?this.feedController.collectAndFlushAccumulatedImpressionsWithCompletion(e,t):(Ds.error("Trying to collectAndFlushAccumulatedImpressionsWithCompletion for a feed without a parentController"),t([]))}))}_locationPositionForEntry(e){if(!this._capturedVisibleEntries)return this._logger.error(" Visible entries were not captured before executing behavior, cannot compute entry position. Returning -1"),-1;const t=this._capturedVisibleEntries.indexOf(e);return-1!=t||e.constructor.isLibraryBased||e.constructor.excludeFigaroImpression||this._logger.error(` Could not find entry in feed, using -1 for locationPosition, entry: ${e.constructor.name}`),t} _figaroActionType(e,t){return{ALERT_UNAVAILABLE_BOOK:"dialog",ALLOW_STORE_SEARCH:"enable",APPROVE_IN_PERSON:"approve",APPROVE_PURCHASE_REQUEST:"approve",BUY_ITEM:t.proposedFigaroIntent,CANCEL_INPUT:bi()?"delete":"cancel",CHANGED_INPUT:null,CLEAR_INPUT:"delete",CLEAR_RECENT:"clear",CLOSE:"dismiss",DECLINE_PURCHASE_REQUEST:"decline",DONE:"dismiss",GIFT:"navigate",GOTO_ACCOUNT:"navigate",GOTO_ALL_GENRES:"navigate",GOTO_APPLE_ID_MENU:"dialog",GOTO_ARTIST:"navigate",GOTO_BOOK:"navigate",GOTO_CATEGORY_LIST:"navigate",GOTO_EXTERNAL:"open",GOTO_FAMILY_MEMBER:"navigate",GOTO_INFLUENCER:"navigate",GOTO_MANAGE_HIDDEN:"navigate",GOTO_PRODUCT_PAGE_IN_APP:"navigate",GOTO_PURCHASE_CATEGORY:"navigate",GOTO_REDEEM:"navigate",GOTO_ROOM:"navigate",GOTO_SERIES:"navigate",GOTO_URL:"navigate",HANDLE_ACTION:"dismiss",HANDLE_BOOK:t.proposedFigaroIntent,HANDLE_SEE_ALL:"navigate",LEARN_MORE_SG:"sgAlert",LOAD_MORE_REVIEWS:"navigate",MARK_FINISHED:"move",MORE:"more",OPEN_BOOK:"open",SHARE_ACHIEVEMENT:"share",RETRY:"reload",RETURN_INPUT:"submit",SAMPLE:t.isAudiobook?"audioSample":"readSample",SEARCH_TERM:"search",SET_NEW_GOAL:"sheet",SHOW_SCREENSHOTS:"navigate",SHOW_SECTIONS_CATEGORIES:"navigate",SHOW_SECTION_CATEGORY:"navigate",SIGN_OUT:"signOut",SORT_BY:"sheet",SUPPLEMENTAL_CONTENT:"viewPDFAlert",TOGGLE_FOLLOW:"toggleFollow",TOGGLE_WANT_TO_READ:t.proposedFigaroIntent,UNHIDE_ITEM:"unhide",UPDATE_ALL:"update",WRITE_REVIEW:"navigate",ACTION_PLAY:"videoPlay",ACTION_PAUSE:"videoPause",ACTION_MUTE:"videoMute",ACTION_UNMUTE:"videoUnmute",ACTION_ENTER_FULLSCREEN:"videoEnterFullscreen",ACTION_EXIT_FULLSCREEN:"videoExitFullscreen",SHARE:"shareClub",SELECT_GROUP:"navigate"}[e]}_figaroActionDetails(e,t,r){return"buy"==e?{buyParams:r?.asset?.buyParams||""}:null}_entryIndexForImpression(e){if(!this._capturedVisibleEntries)return this._logger.error(" Visible entries were not captured before collecting impressions, cannot compute entry position. Returning -1"),-1;const t=No(e,"sectionData.sectionID")||e.impressionParentAdamId||e.id;if(!t)return this._logger.error(` Unexpected missing id from impression, using -1 for exposureIndex, impression: ${JSON.stringify(e)}`),-1;const r=Uc(e.impressionPath),n=this._capturedVisibleEntries.findIndex((e=>No(e,"data.impression.id")==t||e.appAnalyticsSectionId==t||r==No(e,"data.impression.impressionPath")));return-1==n&&this._logger.error(` Cannot figure out what section this belongs to, using -1 for exposureIndex, impression: ${JSON.stringify(e)}`),n}},Pu=(Object.freeze({accountUserAction:{type:"AccountUserAction",required:!0},accountType:{type:"AccountType",required:!0}}),Object.freeze({accountData:{type:"AccountData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}));class Ou{static get properties(){return Pu}}Object.freeze({unknown:"unknown",iCloud:"iCloud",iTunes:"iTunes"}),Object.freeze({unknown:"unknown",logIn:"logIn",logOut:"logOut"}),Object.freeze({unknown:"unknown",messageTap:"messageTap",buyButtonTap:"buyButtonTap",wantListAdd:"wantListAdd",viewInStore:"viewInStore",startReading:"startReading",startListening:"startListening"}),Object.freeze({collectionData:{type:"CollectionData",required:!0},contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}});const Cu=Object.freeze({altContentType:{type:"ContentType",required:!0},altContentID:{type:"[String]",required:!0},exposureType:{type:"ExposureType",required:!0},exposureTypeView:{type:"ExposureTypeView",required:!0},altPricePoint:{type:"String",required:!1},altPriceCurrency:{type:"String",required:!1},productionType:{type:"ProductionType",required:!1}});class ku{get altContentType(){return this._properties.altContentType}get altContentID(){return this._properties.altContentID}get exposureType(){return this._properties.exposureType}get exposureTypeView(){return this._properties.exposureTypeView}get altPricePoint(){return this._properties.altPricePoint}get altPriceCurrency(){return this._properties.altPriceCurrency}get productionType(){return this._properties.productionType}static get properties(){return Cu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Nu=Object.freeze({treatmentIDs:{type:"[String]",required:!0}});class Bu{get treatmentIDs(){return this._properties.treatmentIDs}static get properties(){return Nu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({contentData:{type:"ContentData",required:!0},viewData:{type:"ViewData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},viewData:{type:"ViewData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({appVersion:{type:"String",required:!0},appBundleVersion:{type:"Number",required:!0},jsAppVersion:{type:"String",required:!0}}),Object.freeze({eventData:{type:"AAEventData",required:!0}}),Object.freeze({eventData:{type:"AAEventData",required:!0}}),Object.freeze({sessionReadingData:{type:"SessionReadingData",required:!1},sessionListeningData:{type:"SessionListeningData",required:!1},sessionEndReasonData:{type:"SessionEndReasonData",required:!1},ampTreatmentData:{type:"AmpTreatmentData",required:!1},booksTreatmentData:{type:"BooksTreatmentData",required:!1},orientationData:{type:"OrientationData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({orientationData:{type:"OrientationData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},audioPlaybackSpeedData:{type:"AudioPlaybackSpeedData",required:!0},listeningSessionData:{type:"ListeningSessionData",required:!0},listeningActionSourceData:{type:"ListeningActionSourceData",required:!0},bitRateData:{type:"BitRateData",required:!0},errorData:{type:"ErrorData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({playbackSpeed:{type:"Number",required:!0},previousPlaybackSpeed:{type:"Number",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},skipData:{type:"SkipData",required:!0},listeningActionSourceData:{type:"ListeningActionSourceData",required:!0},bitRateData:{type:"BitRateData",required:!0},errorData:{type:"ErrorData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({autoNightThemeStatus:{type:"AutoNightThemeStatus",required:!0}}),Object.freeze({unknown:"unknown",on:"on",off:"off"}),Object.freeze({unknown:"unknown",white:"white",sepia:"sepia",grey:"grey",black:"black"}),Object.freeze({backgroundColor:{type:"BackgroundColor",required:!0}}),Object.freeze({prevBitRate:{type:"Number",required:!1},bitRate:{type:"Number",required:!0}}),Object.freeze({booksCompletedCnt:{type:"Number",required:!0},lastBookCompletedDate:{type:"Number",required:!0},audioBooksCompletedCnt:{type:"Number",required:!0},lastAudioBookCompletedDate:{type:"Number",required:!0}}),Object.freeze({remoteConfigNamespaceData:{type:"[RemoteConfigNamespaceData]",required:!0}});const Lu=Object.freeze({name:{type:"String",required:!0},positionInSection:{type:"Number",required:!0},brickID:{type:"String",required:!0}});class Fu{get name(){return this._properties.name}get positionInSection(){return this._properties.positionInSection}get brickID(){return this._properties.brickID}static get properties(){return Lu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Mu=Object.freeze({sectionData:{type:"SectionData",required:!0},linkData:{type:"LinkData",required:!0},brickData:{type:"BrickData",required:!0},pageData:{type:"PageData",required:!0},mediaData:{type:"MediaData",required:!1},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class Vu{static get properties(){return Mu}}Object.freeze({brightnessLevel:{type:"Number",required:!0}}),Object.freeze({collectionSummaryData:{type:"CollectionSummaryData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});const Uu=Object.freeze({eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class xu{static get properties(){return Uu}}Object.freeze({campaignId:{type:"String",required:!0},fCampaignToken:{type:"String",required:!1},fAffiliateId:{type:"String",required:!1},fItsCampaignToken:{type:"String",required:!1},fItsCampaignGroup:{type:"String",required:!1}}),Object.freeze({preCellularRadioAccessTechnology:{type:"CellularRadioAccessTechnology",required:!0},cellularRadioAccessTechnology:{type:"CellularRadioAccessTechnology",required:!0}}),Object.freeze({unknown:"unknown",gprs:"gprs",edge:"edge",wcdma:"wcdma",hsdpa:"hsdpa",hsupa:"hsupa",cdma1x:"cdma1x",cdmaevdorev0:"cdmaevdorev0",cdmaevdorevA:"cdmaevdorevA",cdmaevdorevB:"cdmaevdorevB",ehrpd:"ehrpd",lte:"lte",wifi:"wifi",notReachable:"notReachable",nrnsa:"nrnsa",nr:"nr"}),Object.freeze({cellularData:{type:"CellularData",required:!0},eventData:{type:"AAEventData",required:!0}});const Gu=Object.freeze({clearedData:{type:"ClearedData",required:!1},eventData:{type:"AAEventData",required:!0}});class Hu{static get properties(){return Gu}}const ju=Object.freeze({recentSearches:"recentSearches",recentlyViewed:"recentlyViewed"});class qu{static get ENUM(){return ju}constructor(e){this._value=e}toHash(){return this._value}}const zu=Object.freeze({clearType:{type:"ClearType",required:!0}});class Wu{get clearType(){return this._properties.clearType}static get properties(){return zu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){ const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({});const Yu=Object.freeze({clickID:{type:"String",required:!1},linkActionType:{type:"LinkActionType",required:!0},targetType:{type:"String",required:!0},index:{type:"Number",required:!0},outBoundURL:{type:"String",required:!1}});class Ku{get clickID(){return this._properties.clickID}get linkActionType(){return this._properties.linkActionType}get targetType(){return this._properties.targetType}get index(){return this._properties.index}get outBoundURL(){return this._properties.outBoundURL}static get properties(){return Yu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const $u=Object.freeze({clickData:{type:"ClickData",required:!0},pageData:{type:"PageData",required:!0},sectionData:{type:"SectionData",required:!0},flowcaseData:{type:"FlowcaseData",required:!1},brickData:{type:"BrickData",required:!1},contentData:{type:"ContentData",required:!1},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});class Xu{static get properties(){return $u}}Object.freeze({singleCollectionData:{type:"SingleCollectionData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({collectionID:{type:"String",required:!0}}),Object.freeze({collectionData:{type:"CollectionData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({collectionID:{type:"String",required:!0},countPerCollection:{type:"Number",required:!0}}),Object.freeze({singleCollectionData:{type:"SingleCollectionData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({singleCollectionData:{type:"SingleCollectionData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({collectionSummary:{type:"[CollectionIDData]",required:!0}}),Object.freeze({unknown:"unknown",storeBought:"storeBought",nonStoreBought:"nonStoreBought"});const Qu=Object.freeze({contentID:{type:"String",required:!0},contentType:{type:"ContentType",required:!0},contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentAcquisitionType:{type:"ContentAcquisitionType",required:!1},contentSubType:{type:"ContentSubType",required:!1},contentLength:{type:"Number",required:!1},supplementalContentCount:{type:"Number",required:!1},seriesType:{type:"SeriesType",required:!1},productionType:{type:"ProductionType",required:!1}});class Ju{get contentID(){return this._properties.contentID}get contentType(){return this._properties.contentType}get contentPrivateID(){return this._properties.contentPrivateID}get contentUserID(){return this._properties.contentUserID}get contentAcquisitionType(){return this._properties.contentAcquisitionType}get contentSubType(){return this._properties.contentSubType}get contentLength(){return this._properties.contentLength}get supplementalContentCount(){return this._properties.supplementalContentCount}get seriesType(){return this._properties.seriesType}get productionType(){return this._properties.productionType}static get properties(){return Qu}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Zu=Object.freeze({contentData:{type:"ContentData",required:!1},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},maxScrollDepthData:{type:"MaxScrollDepthData",required:!1},altContentTypeExposureData:{type:"AltContentTypeExposureData",required:!1},prevAltContentExposureData:{type:"PrevAltContentExposureData",required:!1},linkData:{type:"LinkData",required:!0},flowcaseData:{type:"FlowcaseData",required:!1},pageData:{type:"PageData",required:!1},upSellData:{type:"UpSellData",required:!1},onDevicePersonalizationPropertyData:{type:"OnDevicePersonalizationPropertyData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class el{static get properties(){return Zu}}Object.freeze({contentData:{type:"ContentData",required:!0},scrollData:{type:"ScrollData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",qa:"qa",staging:"staging",prod:"prod"});const tl=Object.freeze({sectionType:{type:"String",required:!0},sectionID:{type:"String",required:!0},sectionName:{type:"String",required:!0},positionInSection:{type:"String",required:!0},cellSize:{type:"String",required:!0},positionInSubSection:{type:"Number",required:!1},subSectionID:{type:"Number",required:!1},subSectionName:{type:"String",required:!1},subSectionPosition:{type:"Number",required:!1},hasLanguageTag:{type:"Boolean",required:!1}});class rl{get sectionType(){return this._properties.sectionType}get sectionID(){return this._properties.sectionID}get sectionName(){return this._properties.sectionName}get positionInSection(){return this._properties.positionInSection}get cellSize(){return this._properties.cellSize}get positionInSubSection(){return this._properties.positionInSubSection}get subSectionID(){return this._properties.subSectionID}get subSectionName(){return this._properties.subSectionName}get subSectionPosition(){return this._properties.subSectionPosition}get hasLanguageTag(){return this._properties.hasLanguageTag}static get properties(){return tl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const nl=Object.freeze({sectionData:{type:"SectionData",required:!0},contentData:{type:"ContentData",required:!0},contentExposureData:{type:"ContentExposureData",required:!1},flowcaseData:{type:"FlowcaseData",required:!1},linkData:{type:"LinkData",required:!0},pageData:{type:"PageData",required:!0},mediaData:{type:"MediaData",required:!1},upSellData:{type:"UpSellData",required:!1},onDevicePersonalizationPropertyData:{type:"OnDevicePersonalizationPropertyData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class ol{static get properties(){return nl}}Object.freeze({bookmarkCount:{type:"Number",required:!0},noteCount:{type:"Number",required:!0},highlightCount:{type:"Number",required:!0}}),Object.freeze({unknown:"unknown",purchased:"purchased",sideloaded:"sideloaded",preorder:"preorder",sample:"sample",unownedStore:"unownedStore",familyPurchase:"familyPurchase",managed:"managed"});const il=Object.freeze({currency:{type:"String",required:!1},version:{type:"String",required:!1},pricePoint:{type:"String",required:!0},rating:{type:"String",required:!1},ratingsCount:{type:"Number",required:!1}});class sl{get currency(){return this._properties.currency}get version(){return this._properties.version}get pricePoint(){return this._properties.pricePoint}get rating(){return this._properties.rating}get ratingsCount(){return this._properties.ratingsCount}static get properties(){return il}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({unknown:"unknown",rmt:"rmt",fixedlayout:"fixedlayout",traditional:"traditional"});const al=Object.freeze({unknown:"unknown",book:"book",audiobook:"audiobook",PDF:"PDF",TXT:"TXT",IBA:"IBA",itunesGiftCard:"itunesGiftCard"});class cl{static get ENUM(){return al}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({contentData:{type:"ContentData",required:!0},linkData:{type:"LinkData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({defaultReadingGoal:{type:"DefaultReadingGoal",required:!0},dailyReadingGoalDuration:{type:"Number",required:!0}}),Object.freeze({NA:"NA",reached:"reached",inProgress:"inProgress",notStarted:"notStarted"}),Object.freeze({name:{type:"String",required:!0}}),Object.freeze({NA:"NA",Y:"Y",N:"N"}),Object.freeze({deviceModel:{type:"String",required:!0},devicePlatform:{type:"String",required:!0},osInstallVariant:{type:"OsInstallVariant",required:!0},osVersion:{type:"String",required:!0},osBundleVersion:{type:"String",required:!0}}),Object.freeze({unknown:"unknown",portrait:"portrait",landscape:"landscape"});const ul=Object.freeze({dialogActionType:{type:"String",required:!0}});class ll{get dialogActionType(){return this._properties.dialogActionType}static get properties(){return ul}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const dl=Object.freeze({dialogData:{type:"DialogData",required:!0},dialogActionData:{type:"DialogActionData",required:!0},eventData:{type:"AAEventData",required:!0}});class hl{static get properties(){return dl}}const pl=Object.freeze({unknown:"unknown",updateNow:"updateNow",updateLater:"updateLater",ok:"ok",viewAccountSettings:"viewAccountSettings",signOut:"signOut",iForgot:"iForgot",cancel:"cancel",sortMostHelpful:"sortMostHelpful",sortMostFavorable:"sortMostFavorable",sortMostCritical:"sortMostCritical",sortMostRecent:"sortMostRecent",none:"none",settings:"settings",removeRatingAndReview:"removeRatingAndReview"});class gl{static get ENUM(){return pl}constructor(e){this._value=e}toHash(){return this._value}}const fl=Object.freeze({dialogType:{type:"DialogType",required:!0}});class yl{get dialogType(){return this._properties.dialogType}static get properties(){return fl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const ml=Object.freeze({dialogData:{type:"DialogData",required:!0},linkData:{type:"LinkData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class _l{static get properties(){return ml}}const El=Object.freeze({unknown:"unknown", bookUpdateAvailable:"bookUpdateAvailable",bookUnavailable:"bookUnavailable",viewAppleID:"viewAppleID",enterNickname:"enterNickname",sortReviews:"sortReviews",reviewSubmissionError:"reviewSubmissionError",notification:"notification",removeRatingAndReviewConfirmation:"removeRatingAndReviewConfirmation"});class Sl{static get ENUM(){return El}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",grid:"grid",list:"list"}),Object.freeze({startStatus:{type:"DoNotDisturbStatus",required:!0},endStatus:{type:"DoNotDisturbStatus",required:!0}}),Object.freeze({unknown:"unknown",on:"on",off:"off"}),Object.freeze({dragDropSummary:{type:"[DragDropItemData]",required:!0}}),Object.freeze({dragDropData:{type:"DragDropData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentID:{type:"String",required:!0}}),Object.freeze({unknown:"unknown",success:"success",cancel:"cancel"}),Object.freeze({unknown:"unknown",share:"share",addToCollection:"addToCollection",remove:"remove"}),Object.freeze({unknown:"unknown",backgrounded:"backgrounded",listeningBackgroundInactiveThresholdMet:"listeningBackgroundInactiveThresholdMet",identifierReset:"identifierReset"}),Object.freeze({errorCode:{type:"String",required:!0},errorDescription:{type:"String",required:!0}}),Object.freeze({eventID:{type:"String",required:!0},eventTimestamp:{type:"Number",required:!0},eventPath:{type:"String",required:!0},sessionID:{type:"String",required:!0}}),Object.freeze({externalLinkData:{type:"ExternalLinkData",required:!0},eventData:{type:"AAEventData",required:!0}});const Il=Object.freeze({unknown:"unknown",purchase:"purchase",viewContentDetails:"viewContentDetails"});class Dl{static get ENUM(){return Il}constructor(e){this._value=e}toHash(){return this._value}}const wl=Object.freeze({unknown:"unknown",single:"single",many:"many"});class bl{static get ENUM(){return wl}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({externalUrl:{type:"String",required:!0}}),Object.freeze({unknown:"unknown",enabled:"enabled",disabled:"disabled"});const Al=Object.freeze({eventData:{type:"AAEventData",required:!0}});class vl{static get properties(){return Al}}const Rl=Object.freeze({name:{type:"String",required:!0},positionInSection:{type:"Number",required:!0},flowcaseID:{type:"String",required:!0}});class Tl{get name(){return this._properties.name}get positionInSection(){return this._properties.positionInSection}get flowcaseID(){return this._properties.flowcaseID}static get properties(){return Rl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Pl=Object.freeze({sectionData:{type:"SectionData",required:!0},flowcaseData:{type:"FlowcaseData",required:!0},linkData:{type:"LinkData",required:!0},pageData:{type:"PageData",required:!0},mediaData:{type:"MediaData",required:!1},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class Ol{static get properties(){return Pl}}Object.freeze({font:{type:"String",required:!0}}),Object.freeze({fontSize:{type:"Number",required:!0}}),Object.freeze({getStartedActionType:{type:"GetStartedActionType",required:!0}}),Object.freeze({getStartedActionData:{type:"GetStartedActionData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",continue:"continue",dataManage:"dataManage"}),Object.freeze({eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({giftFailureReason:{type:"GiftFailureReason",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},giftFailData:{type:"GiftFailData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",failureCode1:"failureCode1",falureCode2:"falureCode2"}),Object.freeze({goalType:{type:"GoalType",required:!0}}),Object.freeze({goalAdjustTypeData:{type:"GoalAdjustTypeData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingGoalsData:{type:"ReadingGoalsData",required:!1},booksGoalsData:{type:"BooksGoalsData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",readingGoal:"readingGoal",booksGoal:"booksGoal"}),Object.freeze({contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",on:"on",off:"off"}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},searchData:{type:"SearchData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({libraryData:{type:"LibraryData",required:!1},readingNowData:{type:"ReadingNowData",required:!1},collectionSummaryData:{type:"CollectionSummaryData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({unknown:"unknown",cold:"cold",warm:"warm"}),Object.freeze({librarySummary:{type:"[LibraryItemTypeData]",required:!0}}),Object.freeze({libraryEditData:{type:"LibraryEditData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({displayType:{type:"DisplayType",required:!0}}),Object.freeze({contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentID:{type:"String",required:!0}}),Object.freeze({editSummary:{type:"[LibraryEditActionData]",required:!0},editActionType:{type:"EditActionType",required:!0},editActionResult:{type:"EditActionResult",required:!0}}),Object.freeze({contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentType:{type:"ContentType",required:!0},contentID:{type:"String",required:!0},isSample:{type:"Boolean",required:!0}}),Object.freeze({sortType:{type:"SortType",required:!0}}),Object.freeze({libraryData:{type:"LibraryData",required:!0},libraryDisplayData:{type:"LibraryDisplayData",required:!0},librarySortData:{type:"LibrarySortData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});const Cl=Object.freeze({unknown:"unknown",titleClick:"titleClick",click:"click",swipe:"swipe",altContentTypeCellTap:"altContentTypeCellTap",follow:"follow"});class kl{static get ENUM(){return Cl}constructor(e){this._value=e}toHash(){return this._value}}const Nl=Object.freeze({previousSectionID:{type:"String",required:!0},previousSectionName:{type:"String",required:!1},previousContentID:{type:"String",required:!1},linkActionType:{type:"LinkActionType",required:!0}});class Bl{get previousSectionID(){return this._properties.previousSectionID}get previousSectionName(){return this._properties.previousSectionName}get previousContentID(){return this._properties.previousContentID}get linkActionType(){return this._properties.linkActionType}static get properties(){return Nl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({listeningSessionData:{type:"ListeningSessionData",required:!0},contentData:{type:"ContentData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({listeningActionSourceType:{type:"ListeningActionSourceType",required:!0},listeningRoutedTo:{type:"ListeningRoutedTo",required:!0}}),Object.freeze({unknown:"unknown",inApp:"inApp",whileAppBackgrounded:"whileAppBackgrounded",carPlay:"carPlay",nowPlaying:"nowPlaying",blueTooth:"blueTooth",usb:"usb",watch:"watch"}),Object.freeze({unknown:"unknown",device:"device",carPlay:"carPlay",carAudio:"carAudio",headphones:"headphones",airPods:"airPods",homePod:"homePod",appleTV:"appleTV"}),Object.freeze({startTime:{type:"Number",required:!1},endTime:{type:"Number",required:!1},playbackSpeed:{type:"Number",required:!0},listeningID:{type:"String",required:!1},isPreview:{type:"Boolean",required:!0},isStreaming:{type:"Boolean",required:!0},remainingBufferTime:{type:"Number",required:!1},isBackgrounded:{type:"Boolean",required:!0},percentCompletionEnd:{type:"Number",required:!1}});const Ll=Object.freeze({unknown:"unknown",deviceSettings:"deviceSettings",welcome:"welcome",appAccountSettings:"appAccountSettings"});class Fl{static get ENUM(){return Ll}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({maxScrollPosition:{type:"Number",required:!0}});const Ml=Object.freeze({mediaID:{type:"String",required:!0},mediaType:{type:"String",required:!0},mediaDuration:{type:"Number",required:!0}});class Vl{get mediaID(){return this._properties.mediaID}get mediaType(){return this._properties.mediaType}get mediaDuration(){return this._properties.mediaDuration}static get properties(){return Ml}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Ul=Object.freeze({mediaData:{type:"MediaData",required:!0},mediaEngagementData:{type:"MediaEngagementData",required:!0},sectionData:{type:"SectionData",required:!1},pageData:{type:"PageData",required:!1},eventData:{type:"AAEventData", required:!0},timedData:{type:"AATimedData",required:!1},linkData:{type:"LinkData",required:!1}});class xl{static get properties(){return Ul}}const Gl=Object.freeze({mediaPlayMethod:{type:"String",required:!0},mediaTimePlayed:{type:"Number",required:!0},mediaUserAction:{type:"String",required:!0},videoMode:{type:"String",required:!0},muteStatus:{type:"String",required:!0},isBuffering:{type:"Boolean",required:!0},isFailed:{type:"Boolean",required:!0},isMediaCompleted:{type:"Boolean",required:!0},isPlaying:{type:"String",required:!0}});class Hl{get mediaPlayMethod(){return this._properties.mediaPlayMethod}get mediaTimePlayed(){return this._properties.mediaTimePlayed}get mediaUserAction(){return this._properties.mediaUserAction}get videoMode(){return this._properties.videoMode}get muteStatus(){return this._properties.muteStatus}get isBuffering(){return this._properties.isBuffering}get isFailed(){return this._properties.isFailed}get isMediaCompleted(){return this._properties.isMediaCompleted}get isPlaying(){return this._properties.isPlaying}static get properties(){return Gl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({notificationContentID:{type:"[String]",required:!1},notificationID:{type:"String",required:!0},notificationType:{type:"NotificationType",required:!0},recoType:{type:"RecoType",required:!0},goalType:{type:"GoalType",required:!0},titleCode:{type:"String",required:!1},title:{type:"String",required:!0},messageCode:{type:"String",required:!1},message:{type:"String",required:!1}}),Object.freeze({actionType:{type:"ActionType",required:!0},actionUrl:{type:"String",required:!0},targetID:{type:"[String]",required:!1},targetType:{type:"TargetType",required:!0}}),Object.freeze({notificationData:{type:"NotificationData",required:!0},notificationEngagementData:{type:"NotificationEngagementData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({notificationData:{type:"NotificationData",required:!0},eventData:{type:"AAEventData",required:!0}});const jl=Object.freeze({userAction:{type:"UserAction",required:!0}});class ql{get userAction(){return this._properties.userAction}static get properties(){return jl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const zl=Object.freeze({notificationOptInActionData:{type:"NotificationOptInActionData",required:!0},notificationOptInLocationData:{type:"NotificationOptInLocationData",required:!0},notificationOptInTypeData:{type:"NotificationOptInTypeData",required:!1},eventData:{type:"AAEventData",required:!0}});class Wl{static get properties(){return zl}}const Yl=Object.freeze({location:{type:"Location",required:!0}});class Kl{get location(){return this._properties.location}static get properties(){return Yl}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const $l=Object.freeze({type:{type:"Type",required:!0}});class Xl{get type(){return this._properties.type}static get properties(){return $l}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({unknown:"unknown",reco:"reco",goal:"goal",unifiedMessage:"unifiedMessage"});const Ql=Object.freeze({isEligible:{type:"Boolean",required:!0},lockedIn:{type:"Number",required:!0},isLocked:{type:"Boolean",required:!0},onDevicePersonalizationUserStatus:{type:"OnDevicePersonalizationUserStatus",required:!0},genrePreferenceAvailable:{type:"Boolean",required:!1},isReordered:{type:"Boolean",required:!1},lockedInCount:{type:"Number",required:!1}});class Jl{get isEligible(){return this._properties.isEligible}get lockedIn(){return this._properties.lockedIn}get isLocked(){return this._properties.isLocked}get onDevicePersonalizationUserStatus(){return this._properties.onDevicePersonalizationUserStatus}get genrePreferenceAvailable(){return this._properties.genrePreferenceAvailable}get isReordered(){return this._properties.isReordered}get lockedInCount(){return this._properties.lockedInCount}static get properties(){return Ql}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Zl=Object.freeze({notEligible:"notEligible",eligible:"eligible",books:"books",audiobooks:"audiobooks"});class ed{static get ENUM(){return Zl}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({deviceOrientation:{type:"DeviceOrientation",required:!0},screenHeight:{type:"Number",required:!0},screenWidth:{type:"Number",required:!0},windowHeight:{type:"Number",required:!0},windowWidth:{type:"Number",required:!0}}),Object.freeze({unknown:"unknown",internal:"internal",external:"external"});const td=Object.freeze({pageID:{type:"String",required:!1},pageType:{type:"String",required:!0}});class rd{get pageID(){return this._properties.pageID}get pageType(){return this._properties.pageType}static get properties(){return td}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const nd=Object.freeze({pageData:{type:"PageData",required:!0},linkData:{type:"LinkData",required:!1},contentData:{type:"ContentData",required:!1},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});class od{static get properties(){return nd}}Object.freeze({contentData:{type:"ContentData",required:!0},listeningSessionData:{type:"ListeningSessionData",required:!0},listeningActionSourceData:{type:"ListeningActionSourceData",required:!0},bitRateData:{type:"BitRateData",required:!0},errorData:{type:"ErrorData",required:!0},upSellData:{type:"UpSellData",required:!1},doNotDisturbData:{type:"DoNotDisturbData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},listeningSessionData:{type:"ListeningSessionData",required:!0},listeningActionSourceData:{type:"ListeningActionSourceData",required:!0},bitRateData:{type:"BitRateData",required:!0},errorData:{type:"ErrorData",required:!0},upSellData:{type:"UpSellData",required:!1},doNotDisturbData:{type:"DoNotDisturbData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},eventData:{type:"AAEventData",required:!0}});const id=Object.freeze({prevExposureType:{type:"ExposureType",required:!0},prevExposureTypeView:{type:"ExposureTypeView",required:!0}});class sd{get prevExposureType(){return this._properties.prevExposureType}get prevExposureTypeView(){return this._properties.prevExposureTypeView}static get properties(){return id}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const ad=Object.freeze({unknown:"unknown",sgProduction:"sgProduction",nonSGProduction:"nonSGProduction"});class cd{static get ENUM(){return ad}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({altContentTypeExposureData:{type:"AltContentTypeExposureData",required:!1},contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},prevAltContentExposureData:{type:"PrevAltContentExposureData",required:!1},purchaseData:{type:"PurchaseData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({purchaseAttemptID:{type:"String",required:!0},purchaseMethod:{type:"PurchaseMethod",required:!1},isPreorder:{type:"Boolean",required:!0},pricingParameters:{type:"String",required:!0}}),Object.freeze({purchaseFailureReason:{type:"PurchaseFailureReason",required:!0},errorCode:{type:"Number",required:!1},errorDescription:{type:"String",required:!1}}),Object.freeze({altContentTypeExposureData:{type:"AltContentTypeExposureData",required:!1},contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},prevAltContentExposureData:{type:"PrevAltContentExposureData",required:!1},purchaseData:{type:"PurchaseData",required:!0},purchaseFailData:{type:"PurchaseFailData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({unknown:"unknown",error:"error",canceled:"canceled"}),Object.freeze({unknown:"unknown",creditCard:"creditCard",redemptionCode:"redemptionCode"}),Object.freeze({altContentTypeExposureData:{type:"AltContentTypeExposureData",required:!1},contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},prevAltContentExposureData:{type:"PrevAltContentExposureData",required:!1},purchaseData:{type:"PurchaseData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});const ud=Object.freeze({unknown:"unknown",1:"1",2:"2",3:"3",4:"4",5:"5"});class ld{static get ENUM(){return ud}constructor(e){this._value=e}toHash(){return this._value}} const dd=Object.freeze({rating:{type:"Rating",required:!0}});class hd{get rating(){return this._properties.rating}static get properties(){return dd}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const pd=Object.freeze({contentData:{type:"ContentData",required:!0},ratingData:{type:"RatingData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});class gd{static get properties(){return pd}}Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},readingSettingsData:{type:"ReadingSettingsData",required:!0},upSellData:{type:"UpSellData",required:!1},contentSettingsData:{type:"ContentSettingsData",required:!1},orientationData:{type:"OrientationData",required:!1},doNotDisturbData:{type:"DoNotDisturbData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},autoNightThemeSettingData:{type:"AutoNightThemeSettingData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},backgroundColorData:{type:"BackgroundColorData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},brightnessData:{type:"BrightnessData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},fontData:{type:"FontData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},fontSizeData:{type:"FontSizeData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingGoalsDurationData:{type:"ReadingGoalsDurationData",required:!1},readingGoalYearlyData:{type:"ReadingGoalYearlyData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({dailyGoalsReachedData:{type:"DailyGoalsReachedData",required:!0},yearlyGoalsReachedData:{type:"YearlyGoalsReachedData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({currentYearlyGoal:{type:"Number",required:!0},prevYearlyGoal:{type:"Number",required:!0}}),Object.freeze({defaultReadingGoal:{type:"DefaultReadingGoal",required:!0},defaultReadingGoalChangeDate:{type:"Number",required:!0},dailyReadingGoalDuration:{type:"Number",required:!0},dailyReadingGoalStatus:{type:"DailyReadingGoalStatus",required:!0},weeklyGoalsStatus:{type:"Number",required:!0},longestGoalReachedDays:{type:"Number",required:!0},lastLongestGoalReachedDate:{type:"Number",required:!0},defaultYearlyReadingGoal:{type:"DefaultReadingGoal",required:!0},defaultYearlyReadingGoalChangeDate:{type:"Number",required:!0},yearlyReadingGoalCount:{type:"Number",required:!0},yearlyReadingGoalStatus:{type:"DailyReadingGoalStatus",required:!0}}),Object.freeze({currentGoalDuration:{type:"Number",required:!0},prevGoalDuration:{type:"Number",required:!0}}),Object.freeze({readingNowSummary:{type:"[ReadingNowItemTypeData]",required:!0}}),Object.freeze({contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentType:{type:"ContentType",required:!0},completionRate:{type:"Number",required:!0},contentID:{type:"String",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},orientationData:{type:"OrientationData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({readingSessionData:{type:"ReadingSessionData",required:!0},contentData:{type:"ContentData",required:!0},scrollViewSettingData:{type:"ScrollViewSettingData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({percentCompletionStart:{type:"Number",required:!1},percentCompletionEnd:{type:"Number",required:!1},isFreeSample:{type:"Boolean",required:!0}}),Object.freeze({scrollViewStatus:{type:"ScrollViewStatus",required:!0},autoNightThemeStatus:{type:"AutoNightThemeStatus",required:!0},backgroundColor:{type:"BackgroundColor",required:!0},font:{type:"String",required:!0},fontSize:{type:"Number",required:!0},brightnessLevel:{type:"Number",required:!0}}),Object.freeze({unknown:"unknown",nextInSeries:"nextInSeries",moreFromAuthor:"moreFromAuthor",readingHistory:"readingHistory",previousPurchase:"previousPurchase"}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({redownloadFailureReason:{type:"RedownloadFailureReason",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},sectionData:{type:"SectionData",required:!1},redownloadFailData:{type:"RedownloadFailData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({unknown:"unknown",failureCode1:"failureCode1",falureCode2:"falureCode2"}),Object.freeze({referringApplication:{type:"String",required:!1},referringInboundUrl:{type:"String",required:!0}}),Object.freeze({remoteConfigNamespaceData:{type:"RemoteConfigNamespaceData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({name:{type:"String",required:!1},treatmentIDs:{type:"[String]",required:!1},segmentIDs:{type:"[String]",required:!1},segmentSetIDs:{type:"[String]",required:!1},previousTreatmentIDs:{type:"[String]",required:!1},previousSegmentIDs:{type:"[String]",required:!1},previousSegmentSetIDs:{type:"[String]",required:!1}}),Object.freeze({unknown:"unknown",removeFromWantList:"removeFromWantList",removeDownload:"removeDownload"}),Object.freeze({collectionData:{type:"CollectionData",required:!0},contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({wantListRemovalData:{type:"WantListRemovalData",required:!0},wantListRemovalTypeData:{type:"WantListRemovalTypeData",required:!0},eventData:{type:"AAEventData",required:!0}});const fd=Object.freeze({contentData:{type:"ContentData",required:!0},reviewTypeData:{type:"ReviewTypeData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});class yd{static get properties(){return fd}}Object.freeze({eventData:{type:"AAEventData",required:!0}});const md=Object.freeze({unknown:"unknown",rating:"rating",review:"review",reviewAndRating:"reviewAndRating"});class _d{static get ENUM(){return md}constructor(e){this._value=e}toHash(){return this._value}}const Ed=Object.freeze({reviewType:{type:"ReviewType",required:!0}});class Sd{get reviewType(){return this._properties.reviewType}static get properties(){return Ed}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Id=Object.freeze({roomID:{type:"String",required:!0},roomParentSection:{type:"String",required:!0},roomType:{type:"RoomType",required:!0},roomName:{type:"String",required:!1}});class Dd{get roomID(){return this._properties.roomID}get roomParentSection(){return this._properties.roomParentSection}get roomType(){return this._properties.roomType}get roomName(){return this._properties.roomName}static get properties(){return Id}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const wd=Object.freeze({unknown:"unknown",superRoom:"superRoom",simpleRoom:"simpleRoom",detailedListRoom:"detailedListRoom",orderedListRoom:"orderedListRoom",groupingPage:"groupingPage"});class bd{static get ENUM(){return wd}constructor(e){this._value=e}toHash(){return this._value}}const Ad=Object.freeze({roomData:{type:"RoomData",required:!0},linkData:{type:"LinkData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class vd{static get properties(){return Ad}}Object.freeze({verticalScrollPositionStarting:{type:"Number",required:!0},verticalScrollPositionEnding:{type:"Number",required:!0}}),Object.freeze({scrollViewStatus:{type:"ScrollViewStatus",required:!0}}),Object.freeze({unknown:"unknown",on:"on",off:"off"}),Object.freeze({startPosition:{type:"Number",required:!0},endPosition:{type:"Number",required:!0},totalLength:{type:"Number",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},readingSettingsData:{type:"ReadingSettingsData",required:!0},scrubData:{type:"ScrubData",required:!0},eventData:{type:"AAEventData",required:!0}});const Rd=Object.freeze({searchData:{type:"SearchData",required:!1},searchMethodData:{type:"SearchMethodData",required:!0},searchSuggestionData:{type:"SearchSuggestionData",required:!1},searchSuggestionSelectionData:{type:"SearchSuggestionSelectionData",required:!1},eventData:{type:"AAEventData",required:!0}});class Td{static get properties(){return Rd}}const Pd=Object.freeze({searchString:{type:"String",required:!0},searchSessionID:{type:"String",required:!0}});class Od{get searchString(){return this._properties.searchString}get searchSessionID(){return this._properties.searchSessionID}static get properties(){return Pd}constructor(e={}){this._properties=e}toHash(){const e={} ;for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Cd=Object.freeze({searchEndMethod:{type:"SearchEndMethod",required:!0}});class kd{get searchEndMethod(){return this._properties.searchEndMethod}static get properties(){return Cd}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Nd=Object.freeze({searchData:{type:"SearchData",required:!1},searchEndData:{type:"SearchEndData",required:!0},searchSuggestionData:{type:"SearchSuggestionData",required:!1},eventData:{type:"AAEventData",required:!0}});class Bd{static get properties(){return Nd}}const Ld=Object.freeze({unknown:"unknown",cancelButtonTap:"cancelButtonTap",searchFieldCleared:"searchFieldCleared",abandoned:"abandoned"});class Fd{static get ENUM(){return Ld}constructor(e){this._value=e}toHash(){return this._value}}const Md=Object.freeze({searchData:{type:"SearchData",required:!1},eventData:{type:"AAEventData",required:!0}});class Vd{static get properties(){return Md}}const Ud=Object.freeze({searchMethodData:{type:"SearchMethodData",required:!0},eventData:{type:"AAEventData",required:!0}});class xd{static get properties(){return Ud}}const Gd=Object.freeze({unknown:"unknown",searchButtonTap:"searchButtonTap",fetchedSuggestion:"fetchedSuggestion",noFetchSuggestion:"noFetchSuggestion",landingPageFallback:"landingPageFallback",canceledLandingPageFallback:"canceledLandingPageFallback",suggestedTerm:"suggestedTerm",correctedTerm:"correctedTerm"});class Hd{static get ENUM(){return Gd}constructor(e){this._value=e}toHash(){return this._value}}const jd=Object.freeze({searchMethod:{type:"SearchMethod",required:!0}});class qd{get searchMethod(){return this._properties.searchMethod}static get properties(){return jd}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const zd=Object.freeze({searchData:{type:"SearchData",required:!0},searchSelectionData:{type:"SearchSelectionData",required:!0},searchResultsData:{type:"SearchResultsData",required:!0},contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}});class Wd{static get properties(){return zd}}const Yd=Object.freeze({searchResultsSummary:{type:"[SearchResultsItemTypeData]",required:!0}});class Kd{get searchResultsSummary(){return this._properties.searchResultsSummary}static get properties(){return Yd}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const $d=Object.freeze({resultsReturnedStrings:{type:"String",required:!0},position:{type:"Number",required:!0},contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentID:{type:"String",required:!0},positionInSection:{type:"Number",required:!0},section:{type:"String",required:!0}});class Xd{get resultsReturnedStrings(){return this._properties.resultsReturnedStrings}get position(){return this._properties.position}get contentPrivateID(){return this._properties.contentPrivateID}get contentUserID(){return this._properties.contentUserID}get contentID(){return this._properties.contentID}get positionInSection(){return this._properties.positionInSection}get section(){return this._properties.section}static get properties(){return $d}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const Qd=Object.freeze({searchData:{type:"SearchData",required:!1},searchResultsData:{type:"SearchResultsData",required:!0},eventData:{type:"AAEventData",required:!0}});class Jd{static get properties(){return Qd}}const Zd=Object.freeze({selectedResultString:{type:"String",required:!0},selectionType:{type:"SelectionType",required:!0},selectedResultSection:{type:"SelectedResultSection",required:!0},selectedResultPosition:{type:"Number",required:!0},resultsReturnedCount:{type:"String",required:!0}});class eh{get selectedResultString(){return this._properties.selectedResultString}get selectionType(){return this._properties.selectionType}get selectedResultSection(){return this._properties.selectedResultSection}get selectedResultPosition(){return this._properties.selectedResultPosition}get resultsReturnedCount(){return this._properties.resultsReturnedCount}static get properties(){return Zd}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const th=Object.freeze({suggestionsReturnedCount:{type:"Number",required:!0},searchSuggestionSummary:{type:"[SearchSuggestionItemTypeData]",required:!0}});class rh{get suggestionsReturnedCount(){return this._properties.suggestionsReturnedCount}get searchSuggestionSummary(){return this._properties.searchSuggestionSummary}static get properties(){return th}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const nh=Object.freeze({suggestionString:{type:"String",required:!0},suggestionPosition:{type:"Number",required:!0},suggestionType:{type:"SuggestionType",required:!0}});class oh{get suggestionString(){return this._properties.suggestionString}get suggestionPosition(){return this._properties.suggestionPosition}get suggestionType(){return this._properties.suggestionType}static get properties(){return nh}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const ih=Object.freeze({selectedSuggestionString:{type:"String",required:!0},selectedSuggestionPosition:{type:"Number",required:!0},selectedSuggestionType:{type:"SelectedSuggestionType",required:!0}});class sh{get selectedSuggestionString(){return this._properties.selectedSuggestionString}get selectedSuggestionPosition(){return this._properties.selectedSuggestionPosition}get selectedSuggestionType(){return this._properties.selectedSuggestionType}static get properties(){return ih}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const ah=Object.freeze({searchData:{type:"SearchData",required:!0},searchSuggestionData:{type:"SearchSuggestionData",required:!0},eventData:{type:"AAEventData",required:!0}});class ch{static get properties(){return ah}}const uh=Object.freeze({sectionType:{type:"SectionType",required:!0},exposureIndex:{type:"Number",required:!0},name:{type:"String",required:!0},cellSize:{type:"String",required:!0},componentContained:{type:"String",required:!0},subSectionID:{type:"String",required:!1},subSectionName:{type:"String",required:!1},subSectionPosition:{type:"Number",required:!1},sectionID:{type:"String",required:!0}});class lh{get sectionType(){return this._properties.sectionType}get exposureIndex(){return this._properties.exposureIndex}get name(){return this._properties.name}get cellSize(){return this._properties.cellSize}get componentContained(){return this._properties.componentContained}get subSectionID(){return this._properties.subSectionID}get subSectionName(){return this._properties.subSectionName}get subSectionPosition(){return this._properties.subSectionPosition}get sectionID(){return this._properties.sectionID}static get properties(){return uh}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}const dh=Object.freeze({sectionData:{type:"SectionData",required:!0},linkData:{type:"LinkData",required:!0},readingGoalsData:{type:"ReadingGoalsData",required:!1},booksGoalsData:{type:"BooksGoalsData",required:!1},pageData:{type:"PageData",required:!0},upSellData:{type:"UpSellData",required:!1},onDevicePersonalizationPropertyData:{type:"OnDevicePersonalizationPropertyData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class hh{static get properties(){return dh}}const ph=Object.freeze({unknown:"unknown",swoosh:"swoosh",brick:"brick",singleBookWidget:"singleBookWidget",flowcase:"flowcase",goals:"goals",browse:"browse"});class gh{static get ENUM(){return ph}constructor(e){this._value=e}toHash(){return this._value}}const fh=Object.freeze({unknown:"unknown",library:"library",bookStore:"bookStore",audiobookStore:"audiobookStore",all:"all"});class yh{static get ENUM(){return fh}constructor(e){this._value=e}toHash(){return this._value}}const mh=Object.freeze({unknown:"unknown",recent:"recent",trending:"trending",fetched:"fetched",suggestedTerm:"suggestedTerm",correctedTerm:"correctedTerm",top:"top",lastSearchBasedFetch:"lastSearchBasedFetch"});class _h{static get ENUM(){return mh}constructor(e){this._value=e}toHash(){return this._value}}const Eh=Object.freeze({unknown:"unknown",book:"book",audiobook:"audiobook"});class Sh{static get ENUM(){return Eh}constructor(e){this._value=e}toHash(){return this._value}}const Ih=Object.freeze({nonSeries:"nonSeries",ordered:"ordered",unOrdered:"unOrdered"});class Dh{static get ENUM(){return Ih}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({utcOffset:{type:"Number",required:!0},countryCode:{type:"String",required:!0},languageCode:{type:"String",required:!0},iCloudAccountState:{type:"Boolean",required:!0},iTunesAccountState:{type:"Boolean",required:!0},startMethod:{type:"StartMethod",required:!0},productType:{type:"String",required:!0},cellularRadioAccessTechnology:{type:"CellularRadioAccessTechnology",required:!0},iCloudDriveStatus:{type:"ICloudDriveStatus",required:!0},notificationOptInStatus:{type:"FeatureEnabled",required:!0},readingGoal:{type:"FeatureEnabled",required:!0},onDevicePersonalization:{type:"Boolean",required:!0}, launchType:{type:"LaunchType",required:!0},isParallel:{type:"Boolean",required:!0},isMainWindow:{type:"Boolean",required:!0}}),Object.freeze({endReasonType:{type:"EndReasonType",required:!1}}),Object.freeze({timeSpentListening:{type:"Number",required:!0},uniqueAudiobooksListened:{type:"Number",required:!1}}),Object.freeze({timeSpentReading:{type:"Number",required:!0},uniqueBooksRead:{type:"Number",required:!0}}),Object.freeze({contentData:{type:"ContentData",required:!0},eventData:{type:"AAEventData",required:!0}}),Object.freeze({collectionID:{type:"String",required:!0},collectionItemCount:{type:"Number",required:!0}}),Object.freeze({unknown:"unknown",buttonTap:"buttonTap",scrubbing:"scrubbing",coverDrag:"coverDrag"}),Object.freeze({startTime:{type:"Number",required:!0},endTime:{type:"Number",required:!0},skipInterval:{type:"Number",required:!1},skipDirection:{type:"SkipDirection",required:!0},skipActionType:{type:"SkipActionType",required:!0},listeningID:{type:"String",required:!1},isBackgrounded:{type:"Boolean",required:!0}}),Object.freeze({unknown:"unknown",forward:"forward",back:"back"}),Object.freeze({unknown:"unknown",recent:"recent",title:"title",author:"author",manual:"manual"}),Object.freeze({unknown:"unknown",externalLink:"externalLink",homeScreenTap:"homeScreenTap",forceTouch:"forceTouch",listeningFromBackground:"listeningFromBackground",productPageExtension:"productPageExtension",notification:"notification"}),Object.freeze({contentData:{type:"ContentData",required:!0},bitRateData:{type:"BitRateData",required:!0},errorData:{type:"ErrorData",required:!0},eventData:{type:"AAEventData",required:!0}});const wh=Object.freeze({unknown:"unknown",recent:"recent",trending:"trending",fetched:"fetched",suggestedTerm:"suggestedTerm",correctedTerm:"correctedTerm",lastSearchBasedFetch:"lastSearchBasedFetch"});class bh{static get ENUM(){return wh}constructor(e){this._value=e}toHash(){return this._value}}const Ah=Object.freeze({sectionData:{type:"SectionData",required:!0},linkData:{type:"LinkData",required:!0},pageData:{type:"PageData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});class vh{static get properties(){return Ah}}Object.freeze({tabType:{type:"TabType",required:!0}}),Object.freeze({unknown:"unknown",readingNow:"readingNow",library:"library",bookstore:"bookstore",audiobooks:"audiobooks",search:"search",manga:"manga"}),Object.freeze({tabData:{type:"TabData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({unknown:"unknown",contentDetailsPage:"contentDetailsPage",contentDetailsPurchaseAuth:"contentDetailsPurchaseAuth"}),Object.freeze({startTimestamp:{type:"Number",required:!0},endTimestamp:{type:"Number",required:!0},duration:{type:"Number",required:!0}}),Object.freeze({tipFeature:{type:"String",required:!0},tipDescription:{type:"String",required:!0}}),Object.freeze({toolTipData:{type:"ToolTipData",required:!0},pageData:{type:"PageData",required:!1},eventData:{type:"AAEventData",required:!0}});const Rh=Object.freeze({unknown:"unknown",global:"global",recommendations:"recommendations",goals:"goals",bookclub:"bookclub",readingCoaching:"readingCoaching"});class Th{static get ENUM(){return Rh}constructor(e){this._value=e}toHash(){return this._value}}const Ph=Object.freeze({upSellLocation:{type:"UpSellLocation",required:!0},upSellVariant:{type:"UpSellVariant",required:!0},upSellVariantVersion:{type:"String",required:!0}});class Oh{get upSellLocation(){return this._properties.upSellLocation}get upSellVariant(){return this._properties.upSellVariant}get upSellVariantVersion(){return this._properties.upSellVariantVersion}static get properties(){return Ph}constructor(e={}){this._properties=e}toHash(){const e={};for(const t in this._properties){const r=this._properties[t];e[t]=r&&r.toHash?r.toHash():r}return e}}Object.freeze({unknown:"unknown",NA:"NA",eobReading:"eobReading",readingNow:"readingNow"}),Object.freeze({unknown:"unknown",endOfContent:"endOfContent",endOfBook:"endOfBook"});const Ch=Object.freeze({unknown:"unknown",optIn:"optIn",optOut:"optOut"});class kh{static get ENUM(){return Ch}constructor(e){this._value=e}toHash(){return this._value}}Object.freeze({userStorefrontID:{type:"String",required:!0},userID:{type:"String",required:!0}}),Object.freeze({unknown:"unknown",altContentTypeCellTap:"altContentTypeCellTap",swipe:"swipe",contentCellExposureTap:"contentCellExposureTap",tabSelection:"tabSelection",add:"add",remove:"remove"}),Object.freeze({viewType:{type:"ViewType",required:!0},viewAction:{type:"ViewAction",required:!0},viewLocation:{type:"ViewLocation",required:!0}}),Object.freeze({unknown:"unknown",fromTOC:"fromTOC",fromReading:"fromReading"}),Object.freeze({unknown:"unknown",top:"top",bookmark:"bookmark",notes:"notes",highlights:"highlights"}),Object.freeze({contentData:{type:"ContentData",required:!0},contentStoreData:{type:"ContentStoreData",required:!1},contentExposureData:{type:"ContentExposureData",required:!1},notificationData:{type:"NotificationData",required:!1},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}}),Object.freeze({removalSummary:{type:"[WantListRemovalItemData]",required:!0}}),Object.freeze({contentPrivateID:{type:"String",required:!0},contentUserID:{type:"String",required:!0},contentType:{type:"ContentType",required:!0},contentID:{type:"String",required:!0}}),Object.freeze({removalType:{type:"RemovalType",required:!0}}),Object.freeze({welcomeActionType:{type:"WelcomeActionType",required:!0}}),Object.freeze({welcomeScreenData:{type:"WelcomeScreenData",required:!0},welcomeActionData:{type:"WelcomeActionData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}}),Object.freeze({unknown:"unknown",skip:"skip",continue:"continue"}),Object.freeze({welcomeScreenType:{type:"WelcomeScreenType",required:!0},welcomeScreenPosition:{type:"Number",required:!0}}),Object.freeze({unknown:"unknown",welcome:"welcome",discover:"discover",escape:"escape",grow:"grow"}),Object.freeze({welcomeScreenData:{type:"WelcomeScreenData",required:!0},eventData:{type:"AAEventData",required:!0},timedData:{type:"AATimedData",required:!0}});const Nh=Object.freeze({contentData:{type:"ContentData",required:!0},upSellData:{type:"UpSellData",required:!1},eventData:{type:"AAEventData",required:!0}});class Bh{static get properties(){return Nh}}Object.freeze({defaultYearlyReadingGoal:{type:"DefaultReadingGoal",required:!0},yearlyReadingGoalCount:{type:"Number",required:!0}});function Lh(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new De;++ta))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var l=-1,d=!0,h=2&r?new Lh:void 0;for(i.set(e,t),i.set(t,e);++lclass extends e{set appAnalyticsSectionId(e){this._appAnalyticsSectionId=e}get appAnalyticsSectionId(){return this._appAnalyticsSectionId}get effectiveAppAnalyticsSectionId(){return ap(No(this,"fcResource.chart"))||No(this,"fcResource.id")||this.appAnalyticsSectionId}_appAnalyticsSectionData(e,t,r,n,o){return sp(e,t,r,n||this.effectiveAppAnalyticsSectionId,o)}static _appAnalyticsSectionData(e,t,r,n,o){return sp(e,t,r,n,o)}};function lp(e,t){return e?t&&t.privateContentData?new Promise(((r,n)=>{t.privateContentData(e,(t=>{t&&t.contentUserID&&t.contentPrivateID?r([t.contentPrivateID,t.contentUserID]):n(new Error(`Invalid private content IDs payload "[${t.contentPrivateID}, ${t.contentUserID}]" for contentID "${e}"`))}))})):Promise.reject(`Unable to retrieve private contentIDs due to invalid tracker "${t}"`):Promise.reject(`Unable to retrieve private contentIDs due to invalid contentID: "${e}"`)}class dp{add(e=[]){for(let t=0;t=4&&!Ep.value(mp.DISABLE_AUDIOBOOK_SERIES)}static useMediaAPI(){return Yr>=4&&!Ep.value(mp.DISABLE_USE_MEDIA_API)}static showNewSearchItemUI(){if(Yr<4)return!1;const e=Ep.value(mp.DEBUG_OVERRIDE_SWOOSH_ITEM_INFO_UI_SEARCH);return null!=e?!!e:Ip.isFeatureEnabled(Sp.ENABLE_SWOOSH_ITEM_INFO_UI_SEARCH)}static showNewStoreItemUI(){if(Yr<4)return!1;const e=Ep.value(mp.DEBUG_OVERRIDE_SWOOSH_ITEM_INFO_UI_STORE);return null!=e?!!e:Ip.isFeatureEnabled(Sp.ENABLE_SWOOSH_ITEM_INFO_UI_STORE)}static showContextMenu(){return Yr>=5&&!Ep.value(mp.DISABLE_CONTEXT_MENU)&&!bi()}}const Dp="ODP_CACHE_KEY_PROFILE",wp=Object.freeze({unknown:"unknown",eligible:"eligible",booksOnly:"booksOnly",audiobooksOnly:"audiobooksOnly",notEligible:"notEligible"});let bp;class Ap{static eligibilityStatus(e){let t;if(Ip.isODPEnabled()){const r=e||No(this.cachedProfile,"results");if(r)if(No(r,"tasteProfiles.length",0)>0){let e=!1,n=!1;r.tasteProfiles.forEach((t=>{3==t.kindId?e=!0:17==t.kindId&&(n=!0)})),e&&n?t=wp.eligible:e?t=wp.booksOnly:n&&(t=wp.audiobooksOnly)}else t=wp.notEligible;else t=wp.unknown}else t=wp.notEligible;return t}static appAnalyticsEligibilityStatus(e){const t=Ap.eligibilityStatus(e);return t==wp.eligible?ed.ENUM.eligible:t==wp.booksOnly?ed.ENUM.books:t==wp.audiobooksOnly?ed.ENUM.audiobooks:ed.ENUM.notEligible}static profile(){return this.fethProfile()}static fethProfile(){return this._path.then((e=>pp.client().get(e))).then((e=>{ if(e.ok)return this.saveProfile(e.output),e.output;throw e}))}static get _path(){return fp().then((e=>(e=>{let t=null;Ep.value(mp.ITMS_6_MAPI)?t="999999000098678315":Ep.value(mp.ITMS_7_MAPI)&&(t="999999000098678457");let r=`/v1/recommendations/${e}/profile?clientVersion=1.1&with=tasteProfiles,rankers`;return t&&(r=`${r}&dsid=${t}`),r})(e)))}static saveProfile(e){en.localStorage().setItem(Dp,e),bp=e}static get cachedProfile(){return bp||(bp=en.localStorage().getItem(Dp)),bp||null}static invalidateCache(){return bp=void 0,this.saveProfile(!1)}}class vp{constructor(e={}){this.isResourceSet=!0,this.href=e.href,this.nextHref=e.next,this.groupId=e.groupId,this.name=e.name,this.attributes=e.attributes,this.meta=e.meta,this.shortName=e.shortName,this.chart=e.chart,this.pathToResources=e.pathToResources,this.pathToResourceGroups=e.pathToResourceGroups,this.type="resource-set",this._indexToLoad=0,this.additionalParams=e.additionalParams,this._appendResourcesFromData(e.data)}filter(e){const t=new vp({href:this.href,next:this.nextHref,groupId:this.groupId,name:this.name,attributes:this.attributes,meta:this.meta,shortName:this.shortName,chart:this.chart,pathToResources:this.pathToResources,pathToResourceGroups:this.pathToResourceGroups,type:this.type});return t._resources=this.resources.filter(e),t}get resources(){return this._resources||(this._resources=[]),this._resources}_updateIndexToLoad(){const e=this.resources;this._indexToLoad=e.findIndex(((e,t)=>t>=this._indexToLoad&&!e.hidden&&!e.loaded)),-1==this._indexToLoad&&(this._indexToLoad=e.length)}get resourcesToDisplay(){return this._updateIndexToLoad(),this.resources.slice(0,this._indexToLoad).filter((e=>!e.hidden&&e.loaded))}get hasAtLeastOneResourceLoaded(){let e=!1;return this.resources&&this.resources.length&&(e=this.resources.length>this.missingResources.length),e}get missingResources(){const e=[];for(let t=0;t0&&0==this.missingResources.length?Promise.resolve(this):this._fetch(this.href,e)}async loadRemaining(e){if(this._isLoadingRemaining)throw new Error("An earlier loadRemaining() hasn't finished yet");if(this.isFullyLoaded)return;let t=this._indexToLoad;const r=this.resources,n=r.slice(t).filter((e=>!e.hidden&&!e.loaded)).slice(0,e);if(n.length){Ds.log(`Loading remaining resources in resources set. Limit: ${e}, remaining: ${this.remainingCount}`),this._isLoadingRemaining=!0;try{const e=await Rg.fetchAll(n);let o=0;for(;t