{"version":3,"sources":["../../.yarn/cache/browser-pack-npm-6.1.0-67557e011b-9e5993d3ee.zip/node_modules/browser-pack/_prelude.js","../../.yarn/cache/querystring-es3-npm-0.2.1-f4632f2760-691e8d6b8b.zip/node_modules/querystring-es3/decode.js","../../.yarn/cache/querystring-es3-npm-0.2.1-f4632f2760-691e8d6b8b.zip/node_modules/querystring-es3/encode.js","../../.yarn/cache/querystring-es3-npm-0.2.1-f4632f2760-691e8d6b8b.zip/node_modules/querystring-es3/index.js","../../.yarn/cache/underscore-npm-1.13.6-3ebe9d92fb-d5cedd14a9.zip/node_modules/underscore/underscore-umd.js","business-objects/RoomFilters.js","business-objects/SubjectParameters.js","business-objects/preferences.js","models/media/Color.js","models/media/Constraints.js","models/media/ContentRatings.js","models/media/CoverArt.js","models/media/Covers.js","models/media/Creator.js","models/media/IdNamePair.js","models/media/Imprint.js","models/media/Language.js","models/media/Level.js","models/media/Link.js","models/media/MaturityLevel.js","models/media/MediaDetail.js","models/media/NaughtyScore.js","models/media/Publisher.js","models/media/RGB.js","models/media/ReviewCounts.js","models/media/Subject.js","models/media/Type.js","public/ecmascript/components/common/HashManager.js","public/ecmascript/components/subjects/SubjectsPage.js","public/ecmascript/components/subjects/collections/FormatCollection.js","public/ecmascript/components/subjects/collections/SubjectCollection.js","public/ecmascript/components/subjects/models/FormatModel.js","public/ecmascript/components/subjects/models/SubjectCollectionModel.js","public/ecmascript/components/subjects/models/SubjectModel.js","public/ecmascript/components/subjects/templates/SubjectsView.html.js","public/ecmascript/components/subjects/views/FormatNavigationView.js","public/ecmascript/components/subjects/views/SeeAllLinkView.js","public/ecmascript/components/subjects/views/SubjectCollectionView.js","public/ecmascript/components/subjects/views/SubjectItemView.js","public/ecmascript/pages/browse.js","public/ecmascript/util/keycodes.js"],"names":[],"mappings":"AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1/DA,IAAM,IAAI,QAAQ,YAAR,CAAV;;AAEA,IAAM,cAAc,QAAQ,6BAAR,CAApB;;AAEA;;;;;IAIM,W;AACF,yBAAY,KAAZ,EAAmB;AAAA;;AACf;AACA,aAAK,QAAL,GAAsB,EAAtB,CAFe,CAEW;AAC1B,aAAK,cAAL,GAAsB,EAAtB,CAHe,CAGW;AAC1B,aAAK,QAAL,GAAsB,EAAtB,CAJe,CAIW;AAC1B,aAAK,SAAL,GAAsB,EAAtB,CALe,CAKW;;AAE1B,aAAK,UAAL,CAAgB,KAAhB;;AAEA;AACA,aAAK,kBAAL,GAA0B;AACtB,sBAAkB,GADI;AAEtB,wBAAkB,GAFI;AAGtB,4BAAkB,GAHI;AAItB,uBAAkB;AAJI,SAA1B;AAMH;;;;mCAEU,K,EA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R;AAIH,0BAAU,WAJP;AAKH,uBAAO;AALJ,aAAP;AAOH;;;;EAjC+B,SAAS,I;;qBAgL9B,qB;;;;;;;;;;;;;;;;;ACzLf,IAAM,WAAY,OAAO,QAAzB;;IAEM,e;;;;;;;;;;;qCAEW;AACT,iBAAK,QAAL,GAAgB,EAAE,QAAF,ywBAAhB;AAcA,iBAAK,MAAL;AACH;;;iCAEQ;AACL,iBAAK,GAAL,CAAS,IAAT,CAAc,KAAK,QAAL,CAAc,KAAK,KAAL,CAAW,MAAX,EAAd,CAAd;AACH;;;;EAtByB,SAAS,I;;qBAyBxB,e;;;;;AC3Bf;;;;;;AAEA,EAAE,YAAM;AACJ,SAAM,IAAI,yBAAJ,CAAiB,EAAE,IAAI,mBAAN,EAAjB,CAAN;AACH,CAFD;;;;;;;;ACFA,IAAM,OAAO,OAAO,MAAP,CAAc;AACvB,SAAK,CADkB;AAEvB,WAAO,EAFgB;AAGvB,UAAM,EAHiB;AAIvB,QAAI,EAJmB;AAKvB,WAAO,EALgB;AAMvB,UAAM,EANiB;AAOvB,WAAO,EAPgB;AAQvB,SAAK;AARkB,CAAd,CAAb;qBAUe,I","file":"browse.bundle.min.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define('underscore', factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n var current = global._;\n var exports = global._ = factory();\n exports.noConflict = function () { global._ = current; return exports; };\n }()));\n}(this, (function () {\n // Underscore.js 1.13.6\n // https://underscorejs.org\n // (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors\n // Underscore may be freely distributed under the MIT license.\n\n // Current version.\n var VERSION = '1.13.6';\n\n // Establish the root object, `window` (`self`) in the browser, `global`\n // on the server, or `this` in some virtual machines. We use `self`\n // instead of `window` for `WebWorker` support.\n var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global) ||\n Function('return this')() ||\n {};\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // Modern feature detection.\n var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n supportsDataView = typeof DataView !== 'undefined';\n\n // All **ECMAScript 5+** native function implementations that we hope to use\n // are declared here.\n var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create,\n nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n // Create references to these builtin functions because we override them.\n var _isNaN = isNaN,\n _isFinite = isFinite;\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n // The largest integer that can be represented exactly.\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n\n // Some functions take a variable number of arguments, or a few expected\n // arguments at the beginning and then a variable number of values to operate\n // on. This helper accumulates all remaining arguments past the function’s\n // argument length (or an explicit `startIndex`), into an array that becomes\n // the last argument. Similar to ES6’s \"rest parameter\".\n function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n }\n\n // Is a given variable an object?\n function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n }\n\n // Is a given value equal to null?\n function isNull(obj) {\n return obj === null;\n }\n\n // Is a given variable undefined?\n function isUndefined(obj) {\n return obj === void 0;\n }\n\n // Is a given value a boolean?\n function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n }\n\n // Is a given value a DOM element?\n function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }\n\n // Internal function for creating a `toString`-based type tester.\n function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n }\n\n var isString = tagTester('String');\n\n var isNumber = tagTester('Number');\n\n var isDate = tagTester('Date');\n\n var isRegExp = tagTester('RegExp');\n\n var isError = tagTester('Error');\n\n var isSymbol = tagTester('Symbol');\n\n var isArrayBuffer = tagTester('ArrayBuffer');\n\n var isFunction = tagTester('Function');\n\n // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n var nodelist = root.document && root.document.childNodes;\n if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n var isFunction$1 = isFunction;\n\n var hasObjectTag = tagTester('Object');\n\n // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n // In IE 11, the most common among them, this problem also applies to\n // `Map`, `WeakMap` and `Set`.\n var hasStringTagBug = (\n supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))\n ),\n isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n\n var isDataView = tagTester('DataView');\n\n // In IE 10 - Edge 13, we need a different heuristic\n // to determine whether an object is a `DataView`.\n function ie10IsDataView(obj) {\n return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);\n }\n\n var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);\n\n // Is a given value an array?\n // Delegates to ECMA5's native `Array.isArray`.\n var isArray = nativeIsArray || tagTester('Array');\n\n // Internal function to check whether `key` is an own property name of `obj`.\n function has$1(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n }\n\n var isArguments = tagTester('Arguments');\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n (function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return has$1(obj, 'callee');\n };\n }\n }());\n\n var isArguments$1 = isArguments;\n\n // Is a given object a finite number?\n function isFinite$1(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n }\n\n // Is the given value `NaN`?\n function isNaN$1(obj) {\n return isNumber(obj) && _isNaN(obj);\n }\n\n // Predicate-generating function. Often useful outside of Underscore.\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n // Common internal logic for `isArrayLike` and `isBufferLike`.\n function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n }\n\n // Internal helper to generate a function to obtain property `key` from `obj`.\n function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n }\n\n // Internal helper to obtain the `byteLength` property of an object.\n var getByteLength = shallowProperty('byteLength');\n\n // Internal helper to determine whether we should spend extensive checks against\n // `ArrayBuffer` et al.\n var isBufferLike = createSizePropertyCheck(getByteLength);\n\n // Is a given value a typed array?\n var typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\n function isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n }\n\n var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);\n\n // Internal helper to obtain the `length` property of an object.\n var getLength = shallowProperty('length');\n\n // Internal helper to create a simple lookup structure.\n // `collectNonEnumProps` used to depend on `_.contains`, but this led to\n // circular imports. `emulatedSet` is a one-off solution that only works for\n // arrays of strings.\n function emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n }\n\n // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n // be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n // needed.\n function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`.\n function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has$1(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n }\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments$1(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n }\n\n // Returns whether an object has a given set of `key:value` pairs.\n function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n }\n\n // If Underscore is called as a function, it returns a wrapped object that can\n // be used OO-style. This wrapper holds altered versions of all functions added\n // through `_.mixin`. Wrapped objects may be chained.\n function _$1(obj) {\n if (obj instanceof _$1) return obj;\n if (!(this instanceof _$1)) return new _$1(obj);\n this._wrapped = obj;\n }\n\n _$1.VERSION = VERSION;\n\n // Extracts the result from a wrapped and chained object.\n _$1.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxies for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;\n\n _$1.prototype.toString = function() {\n return String(this._wrapped);\n };\n\n // Internal function to wrap or shallow-copy an ArrayBuffer,\n // typed array or DataView to a new view, reusing the buffer.\n function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n }\n\n // We use this string twice, so give it a name for minification.\n var tagDataView = '[object DataView]';\n\n // Internal recursive comparison function for `_.isEqual`.\n function eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n }\n\n // Internal recursive comparison function for `_.isEqual`.\n function deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _$1) a = a._wrapped;\n if (b instanceof _$1) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {\n if (!isDataView$1(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray$1(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&\n isFunction$1(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n }\n\n // Perform a deep comparison to check if two objects are equal.\n function isEqual(a, b) {\n return eq(a, b);\n }\n\n // Retrieve all the enumerable property names of an object.\n function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n }\n\n // Since the regular `Object.prototype.toString` type tests don't work for\n // some types in IE 11, we use a fingerprinting heuristic instead, based\n // on the methods. It's not great, but it's the best we got.\n // The fingerprint method lists are defined below.\n function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction$1(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);\n };\n }\n\n // In the interest of compact minification, we write\n // each string in the fingerprints only once.\n var forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n // `Map`, `WeakMap` and `Set` each have slightly different\n // combinations of the above sublists.\n var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n\n var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n\n var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n\n var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n\n var isWeakSet = tagTester('WeakSet');\n\n // Retrieve the values of an object's properties.\n function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }\n\n // Convert an object into a list of `[key, value]` pairs.\n // The opposite of `_.object` with one argument.\n function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n }\n\n // Invert the keys and values of an object. The values must be serializable.\n function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n }\n\n // Return a sorted list of the function names available on the object.\n function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction$1(obj[key])) names.push(key);\n }\n return names.sort();\n }\n\n // An internal function for creating assigner functions.\n function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n }\n\n // Extend a given object with all the properties in passed-in object(s).\n var extend = createAssigner(allKeys);\n\n // Assigns a given object with all the own properties in the passed-in\n // object(s).\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n var extendOwn = createAssigner(keys);\n\n // Fill in a given object with default properties.\n var defaults = createAssigner(allKeys, true);\n\n // Create a naked function reference for surrogate-prototype-swapping.\n function ctor() {\n return function(){};\n }\n\n // An internal function for creating a new object that inherits from another.\n function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n }\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n }\n\n // Create a (shallow-cloned) duplicate of an object.\n function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n }\n\n // Invokes `interceptor` with the `obj` and then returns `obj`.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n }\n\n // Normalize a (deep) property `path` to array.\n // Like `_.iteratee`, this function can be customized.\n function toPath$1(path) {\n return isArray(path) ? path : [path];\n }\n _$1.toPath = toPath$1;\n\n // Internal wrapper for `_.toPath` to enable minification.\n // Similar to `cb` for `_.iteratee`.\n function toPath(path) {\n return _$1.toPath(path);\n }\n\n // Internal function to obtain a nested property in `obj` along `path`.\n function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }\n\n // Get the value of the (deep) property on `path` from `object`.\n // If any property in `path` does not exist or if the value is\n // `undefined`, return `defaultValue` instead.\n // The `path` is normalized through `_.toPath`.\n function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n }\n\n // Shortcut function for checking if an object has a given property directly on\n // itself (in other words, not on a prototype). Unlike the internal `has`\n // function, this public version can also traverse nested properties.\n function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has$1(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }\n\n // Keep the identity function around for default iteratees.\n function identity(value) {\n return value;\n }\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n }\n\n // Creates a function that, when passed an object, will traverse that object’s\n // properties down the given `path`, specified as an array of keys or indices.\n function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n }\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n }\n\n // An internal function to generate callbacks that can be applied to each\n // element in a collection, returning the desired result — either `_.identity`,\n // an arbitrary callback, a property matcher, or a property accessor.\n function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction$1(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n }\n\n // External wrapper for our callback generator. Users may customize\n // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n // This abstraction hides the internal-only `argCount` argument.\n function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n }\n _$1.iteratee = iteratee;\n\n // The function we call internally to generate a callback. It invokes\n // `_.iteratee` if overridden, otherwise `baseIteratee`.\n function cb(value, context, argCount) {\n if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n }\n\n // Returns the results of applying the `iteratee` to each element of `obj`.\n // In contrast to `_.map` it returns an object.\n function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n }\n\n // Predicate-generating function. Often useful outside of Underscore.\n function noop(){}\n\n // Generates a function for a given object that returns a given property.\n function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n }\n\n // Run a function **n** times.\n function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n }\n\n // Return a random integer between `min` and `max` (inclusive).\n function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n }\n\n // A (possibly faster) way to get the current timestamp as an integer.\n var now = Date.now || function() {\n return new Date().getTime();\n };\n\n // Internal helper to generate functions for escaping and unescaping strings\n // to/from HTML interpolation.\n function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n }\n\n // Internal list of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n\n // Function for escaping strings to HTML interpolation.\n var _escape = createEscaper(escapeMap);\n\n // Internal list of HTML entities for unescaping.\n var unescapeMap = invert(escapeMap);\n\n // Function for unescaping strings from HTML interpolation.\n var _unescape = createEscaper(unescapeMap);\n\n // By default, Underscore uses ERB-style template delimiters. Change the\n // following template settings to use alternative delimiters.\n var templateSettings = _$1.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `_.templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n function escapeChar(match) {\n return '\\\\' + escapes[match];\n }\n\n // In order to prevent third-party code injection through\n // `_.templateSettings.variable`, we test it against the following regular\n // expression. It is intentionally a bit more liberal than just matching valid\n // identifiers, but still prevents possible loopholes through defaults or\n // destructuring assignment.\n var bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _$1.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _$1);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n }\n\n // Traverses the children of `obj` along `path`. If a child is a function, it\n // is invoked with its parent as context. Returns the value of the final\n // child, or `fallback` if any child is undefined.\n function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n }\n\n // Start chaining a wrapped Underscore object.\n function chain(obj) {\n var instance = _$1(obj);\n instance._chain = true;\n return instance;\n }\n\n // Internal function to execute `sourceFunc` bound to `context` with optional\n // `args`. Determines whether to execute a function as a constructor or as a\n // normal function.\n function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n }\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. `_` acts\n // as a placeholder by default, allowing any combination of arguments to be\n // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n var partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n });\n\n partial.placeholder = _$1;\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally).\n var bind = restArguments(function(func, context, args) {\n if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n });\n\n // Internal helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object.\n // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var isArrayLike = createSizePropertyCheck(getLength);\n\n // Internal implementation of a recursive `flatten` function.\n function flatten$1(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten$1(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n }\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n var bindAll = restArguments(function(obj, keys) {\n keys = flatten$1(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n });\n\n // Memoize an expensive function by storing its results.\n function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n }\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n var delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n });\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n var defer = partial(delay, _$1, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n }\n\n // When a sequence of calls of the returned function ends, the argument\n // function is triggered. The end of a sequence is defined by the `wait`\n // parameter. If `immediate` is passed, the argument function will be\n // triggered at the beginning of the sequence instead of at the end.\n function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n }\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n function wrap(func, wrapper) {\n return partial(wrapper, func);\n }\n\n // Returns a negated version of the passed-in predicate.\n function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n }\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n }\n\n // Returns a function that will only be executed on and after the Nth call.\n function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n // Returns a function that will only be executed up to (but not including) the\n // Nth call.\n function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n }\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n var once = partial(before, 2);\n\n // Returns the first key on an object that passes a truth test.\n function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n }\n\n // Internal function to generate `_.findIndex` and `_.findLastIndex`.\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a truth test.\n var findIndex = createPredicateIndexFinder(1);\n\n // Returns the last index on an array-like that passes a truth test.\n var findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n }\n\n // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN$1);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n var indexOf = createIndexFinder(1, findIndex, sortedIndex);\n\n // Return the position of the last occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n var lastIndexOf = createIndexFinder(-1, findLastIndex);\n\n // Return the first value which passes a truth test.\n function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }\n\n // Convenience version of a common use case of `_.find`: getting the first\n // object containing specific `key:value` pairs.\n function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n }\n\n // The cornerstone for collection functions, an `each`\n // implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n }\n\n // Return the results of applying the iteratee to each element.\n function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n }\n\n // Internal helper to create a reducing function, iterating left or right.\n function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n var reduce = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n var reduceRight = createReduce(-1);\n\n // Return all the elements that pass a truth test.\n function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }\n\n // Return all the elements for which a truth test fails.\n function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n }\n\n // Determine whether all of the elements pass a truth test.\n function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n }\n\n // Determine if at least one element in the object passes a truth test.\n function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n }\n\n // Determine if the array or object contains a given item (using `===`).\n function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n }\n\n // Invoke a method (with arguments) on every item in a collection.\n var invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction$1(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n });\n\n // Convenience version of a common use case of `_.map`: fetching a property.\n function pluck(obj, key) {\n return map(obj, property(key));\n }\n\n // Convenience version of a common use case of `_.filter`: selecting only\n // objects containing specific `key:value` pairs.\n function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n }\n\n // Return the maximum element (or element-based computation).\n function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }\n\n // Return the minimum element (or element-based computation).\n function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || (computed === Infinity && result === Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }\n\n // Safely create a real, live array from anything iterable.\n var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n }\n\n // Sample **n** random values from a collection using the modern version of the\n // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `_.map`.\n function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n }\n\n // Shuffle a collection.\n function shuffle(obj) {\n return sample(obj, Infinity);\n }\n\n // Sort the object's values by a criterion produced by an iteratee.\n function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n }\n\n // An internal function used for aggregate \"group by\" operations.\n function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n }\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n var groupBy = group(function(result, value, key) {\n if (has$1(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n // when you know that your index values will be unique.\n var indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n var countBy = group(function(result, value, key) {\n if (has$1(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Split a collection into two arrays: one whose elements all pass the given\n // truth test, and one whose elements all do not pass the truth test.\n var partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n }, true);\n\n // Return the number of elements in a collection.\n function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n }\n\n // Internal `_.pick` helper function to determine whether `key` is an enumerable\n // property name of `obj`.\n function keyInObj(value, key, obj) {\n return key in obj;\n }\n\n // Return a copy of the object only containing the allowed properties.\n var pick = restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction$1(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten$1(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n });\n\n // Return a copy of the object without the disallowed properties.\n var omit = restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction$1(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten$1(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n });\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n }\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. The **guard** check allows it to work with `_.map`.\n function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n }\n\n // Returns everything but the first entry of the `array`. Especially useful on\n // the `arguments` object. Passing an **n** will return the rest N values in the\n // `array`.\n function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n }\n\n // Trim out all falsy values from an array.\n function compact(array) {\n return filter(array, Boolean);\n }\n\n // Flatten out an array, either recursively (by default), or up to `depth`.\n // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\n function flatten(array, depth) {\n return flatten$1(array, depth, false);\n }\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n var difference = restArguments(function(array, rest) {\n rest = flatten$1(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n });\n\n // Return a version of the array that does not contain the specified value(s).\n var without = restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n });\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // The faster algorithm will not work with an iteratee if the iteratee\n // is not a one-to-one function, so providing an iteratee will disable\n // the faster algorithm.\n function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n }\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n var union = restArguments(function(arrays) {\n return uniq(flatten$1(arrays, true, true));\n });\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n }\n\n // Complement of zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices.\n function unzip(array) {\n var length = (array && max(array, getLength).length) || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n }\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n var zip = restArguments(unzip);\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values. Passing by pairs is the reverse of `_.pairs`.\n function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n }\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](https://docs.python.org/library/functions.html#range).\n function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n }\n\n // Chunk a single array into multiple arrays, each containing `count` or fewer\n // items.\n function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n }\n\n // Helper function to continue chaining intermediate results.\n function chainResult(instance, obj) {\n return instance._chain ? _$1(obj).chain() : obj;\n }\n\n // Add your own custom functions to the Underscore object.\n function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _$1[name] = obj[name];\n _$1.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_$1, args));\n };\n });\n return _$1;\n }\n\n // Add all mutator `Array` functions to the wrapper.\n each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _$1.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n });\n\n // Add all accessor `Array` functions to the wrapper.\n each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _$1.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n });\n\n // Named Exports\n\n var allExports = {\n __proto__: null,\n VERSION: VERSION,\n restArguments: restArguments,\n isObject: isObject,\n isNull: isNull,\n isUndefined: isUndefined,\n isBoolean: isBoolean,\n isElement: isElement,\n isString: isString,\n isNumber: isNumber,\n isDate: isDate,\n isRegExp: isRegExp,\n isError: isError,\n isSymbol: isSymbol,\n isArrayBuffer: isArrayBuffer,\n isDataView: isDataView$1,\n isArray: isArray,\n isFunction: isFunction$1,\n isArguments: isArguments$1,\n isFinite: isFinite$1,\n isNaN: isNaN$1,\n isTypedArray: isTypedArray$1,\n isEmpty: isEmpty,\n isMatch: isMatch,\n isEqual: isEqual,\n isMap: isMap,\n isWeakMap: isWeakMap,\n isSet: isSet,\n isWeakSet: isWeakSet,\n keys: keys,\n allKeys: allKeys,\n values: values,\n pairs: pairs,\n invert: invert,\n functions: functions,\n methods: functions,\n extend: extend,\n extendOwn: extendOwn,\n assign: extendOwn,\n defaults: defaults,\n create: create,\n clone: clone,\n tap: tap,\n get: get,\n has: has,\n mapObject: mapObject,\n identity: identity,\n constant: constant,\n noop: noop,\n toPath: toPath$1,\n property: property,\n propertyOf: propertyOf,\n matcher: matcher,\n matches: matcher,\n times: times,\n random: random,\n now: now,\n escape: _escape,\n unescape: _unescape,\n templateSettings: templateSettings,\n template: template,\n result: result,\n uniqueId: uniqueId,\n chain: chain,\n iteratee: iteratee,\n partial: partial,\n bind: bind,\n bindAll: bindAll,\n memoize: memoize,\n delay: delay,\n defer: defer,\n throttle: throttle,\n debounce: debounce,\n wrap: wrap,\n negate: negate,\n compose: compose,\n after: after,\n before: before,\n once: once,\n findKey: findKey,\n findIndex: findIndex,\n findLastIndex: findLastIndex,\n sortedIndex: sortedIndex,\n indexOf: indexOf,\n lastIndexOf: lastIndexOf,\n find: find,\n detect: find,\n findWhere: findWhere,\n each: each,\n forEach: each,\n map: map,\n collect: map,\n reduce: reduce,\n foldl: reduce,\n inject: reduce,\n reduceRight: reduceRight,\n foldr: reduceRight,\n filter: filter,\n select: filter,\n reject: reject,\n every: every,\n all: every,\n some: some,\n any: some,\n contains: contains,\n includes: contains,\n include: contains,\n invoke: invoke,\n pluck: pluck,\n where: where,\n max: max,\n min: min,\n shuffle: shuffle,\n sample: sample,\n sortBy: sortBy,\n groupBy: groupBy,\n indexBy: indexBy,\n countBy: countBy,\n partition: partition,\n toArray: toArray,\n size: size,\n pick: pick,\n omit: omit,\n first: first,\n head: first,\n take: first,\n initial: initial,\n last: last,\n rest: rest,\n tail: rest,\n drop: rest,\n compact: compact,\n flatten: flatten,\n without: without,\n uniq: uniq,\n unique: uniq,\n union: union,\n intersection: intersection,\n difference: difference,\n unzip: unzip,\n transpose: unzip,\n zip: zip,\n object: object,\n range: range,\n chunk: chunk,\n mixin: mixin,\n 'default': _$1\n };\n\n // Default Export\n\n // Add all of the Underscore functions to the wrapper object.\n var _ = mixin(allExports);\n // Legacy Node.js API.\n _._ = _;\n\n return _;\n\n})));\n//# sourceMappingURL=underscore-umd.js.map\n","const _ = require('underscore');\n\nconst MediaDetail = require('../models/media/MediaDetail');\n\n/**\n * Room filter model from Thunder with some Lighting logic\n * ref: OverDrive.Thunder.Models.GenericModels.RoomFilters\n */\nclass RoomFilters {\n constructor(props) {\n // All the properties are defined as List thunder side ...\n this.subjects = []; // 'int', 'int', etc.\n this.maturityLevels = []; // 'generalcontent', 'juvenile', 'youngadult', 'adultonly'\n this.language = []; // 'en', 'gb', etc.\n this.mediaType = []; // 'ebook', 'audiobook', 'video', 'periodicals'\n\n this._safeApply(props);\n\n // Made up numerical values so that we can do value based comparisons\n this._maturityLevelRank = {\n juvenile : 100,\n youngadult : 200,\n generalcontent : 300,\n adultonly : 400\n };\n }\n\n _safeApply(props) {\n let parameters = _.pick(props, _.keys(this));\n\n _.each(parameters, (value, key) => {\n if (value) {\n this[key] = _.isArray(value) ? value.slice() : [value];\n }\n });\n }\n\n /**\n * Returns passed collection of titles with only titles that meet the filter criteria\n * @param {MediaDetail[]} titles\n */\n filter(titles = []) {\n return titles.filter((title) => {\n return this._filterBySubject (title, this.subjects)\n && this._filterByMaturityLevel (title, this.maturityLevels)\n && this._filterByLanguage (title, this.language)\n && this._filterByMediaType (title, this.mediaType);\n });\n }\n\n _filterBySubject(title, subjectsToFilterBy = []) {\n let titleSubjects = _(title.subjects || []).pluck('id');\n\n return _(subjectsToFilterBy).isEmpty()\n || _(subjectsToFilterBy).every((filter) => _(titleSubjects).contains(filter));\n }\n\n _filterByLanguage(title, languagesToFilterBy = []) {\n let titleLanguages = _(title.languages || []).pluck('id');\n\n return _(languagesToFilterBy).isEmpty()\n || _(languagesToFilterBy).every((filter) => _(titleLanguages).contains(filter));\n }\n\n _filterByMediaType(title, mediaTypesToFilterBy = []) {\n return _(mediaTypesToFilterBy).isEmpty()\n || _(mediaTypesToFilterBy).contains(title.type.id);\n }\n\n // LHTNG-1547 - Maturity level is a a threshold check, not a set/contains match\n _filterByMaturityLevel(title, maturityLevelsToFilterBy = []) {\n if (_(maturityLevelsToFilterBy).isEmpty()) {\n return true; // No filter provided, approve the title\n }\n\n // Collect the maturityLevel assigned to the title\n let titleMaturityLevel = title.ratings.maturityLevel && title.ratings.maturityLevel.id || 'generalcontent';\n\n // Convert it to a numerical value we made up in this filter class\n let titleMaturityRank = _(this._maturityLevelRank).result(titleMaturityLevel, this._maturityLevelRank.generalcontent);\n\n // Find the minimum (youngest) audience that we are wanting to permit per the passed in filter\n let maturityFilterRanks = _(maturityLevelsToFilterBy).map((filter) => _(this._maturityLevelRank).result(filter, this._maturityLevelRank.generalcontent))\n\n // Where the title maturity is apropreate filters applied for the target room\n return titleMaturityRank <= _.max(maturityFilterRanks);\n }\n\n get hasMaturityLevelFilter() {\n return !_(this.maturityLevels).isEmpty();\n }\n}\n\nmodule.exports = RoomFilters;\n","'use strict';\nconst _ = require('underscore');\n\nconst Preferences = require('./preferences');\nconst RoomFilters = require('./RoomFilters');\n\n/**\n * Model to represent input parameters for: GET /v2/libraries/{libraryKey}/subjects\n */\nclass SubjectParameters {\n\n /**\n * List of valid maturityLevels\n */\n static getValidMaturityLevels() {\n // This feels like it should come from thunder but I dont think they provide it\n return ['generalcontent', 'juvenile', 'youngadult', 'adultonly'];\n }\n\n static getValidMediaTypes() {\n // 'all' is not technically a legal media type but this model's .serialize knows how to handle it correctly\n return ['all', 'ebook', 'audiobook', 'magazine', 'video'];\n }\n\n constructor(props) {\n // This is concerning that we treat is as singular when the thunder interface treats it as a collection\n this.mediaType = 'all';\n this.subject = [];\n this.maturityLevel = [];\n this.language = [];\n this.showOnlyAvailable = false;\n\n this._safeApply(props);\n }\n\n _safeApply(props) {\n let parameters = _.pick(props, _.keys(this));\n\n _.each(parameters, (value, key) => {\n // mediaType is alywas a single value\n if (key === 'mediaType' && value) {\n this.mediaType = value;\n }\n else if (key === 'showOnlyAvailable' && value) {\n this.showOnlyAvailable = true;\n }\n // All other parameters need to be arrays\n else if (value) {\n this[key] = _.isArray(value) ? value.slice() : [value];\n }\n });\n }\n\n /**\n * Applies user profile AudienceSettings to the current parameter set\n * @param {Preferences} userPreferences\n * @param {RoomFilters} roomFilters\n */\n applyApplicationFilters(userPreferences, currentRoom) {\n // The order of these matter since room settings override any profile level settings\n this._applyProfileSettings(userPreferences);\n\n if (currentRoom) {\n this._applyRoomFilters(currentRoom.filters);\n }\n }\n\n /**\n * Applies filter constraints from a room to the current parameters instance\n * @param {RoomFilters} roomFilters\n */\n _applyRoomFilters(roomFilters) {\n if (!roomFilters) { return; }\n\n var filters = new RoomFilters(roomFilters);\n\n this.mediaType = _(filters.mediaType).first() || this.mediaType;\n this.subject = filters.subjects;\n this.language = filters.language;\n\n // LHTNG-1318 Apply room maturity filter when present\n if (!_(filters.maturityLevels).isEmpty()) {\n this.maturityLevel = filters.maturityLevels;\n }\n }\n\n /**\n * Applies user profile preferences to the current instance\n * @param {Preferences} userPreferences\n */\n _applyProfileSettings(preferences) {\n var profileMaturityFilters = preferences.getAudienceSettingsArray();\n\n if (!_(profileMaturityFilters).contains('all')) {\n this.maturityLevel = profileMaturityFilters;\n }\n else {\n this.maturityLevel = [];\n }\n }\n\n /**\n * Returns a formatted object suitable for passing through QueryString.stringify() for mkaing a Thunder request.\n */\n serialize() {\n let response = _.extend({}, this);\n\n // Scrub all empty properties from the response object to generate a clean query string (was causing trailing &)\n if (!response.mediaType || response.mediaType === 'all') {\n delete response.mediaType;\n }\n\n _.isEmpty(response.subject) && delete response.subject;\n _.isEmpty(response.maturityLevel) && delete response.maturityLevel;\n _.isEmpty(response.language) && delete response.language;\n\n return response;\n }\n}\n\nmodule.exports = SubjectParameters;\n","var _ = require('underscore');\nvar qs = require('querystring');\n\nvar Preferences = function Preferences(props, details, disabled) {\n this.featureManager = details && details.featureManager;\n this.audienceSettings = !disabled && props.audienceSettings || Preferences.defaultAudiencePreferences;\n};\n\nPreferences.defaultAudiencePreferences = {\n all: true,\n juvenile: false,\n youngadult: false,\n generalcontent: false,\n adultonly: false\n};\n\nPreferences.prototype.isSafeItem = function (item) {\n if (this.audienceSettings.all) {\n return true;\n }\n var itemMaturityLevels = _.object(_.pluck(item, 'id'), _.pluck(item, 'isApplied'));\n return _.isMatch(this.audienceSettings, itemMaturityLevels);\n};\n\nPreferences.prototype.getAppropriateAudienceList = function(audienceList) {\n var audienceListArray = _.isArray(audienceList) ? audienceList : [audienceList];\n if (this.audienceSettings.all) {\n return audienceListArray;\n }\n return audienceListArray.filter(item => this.audienceSettings[item]);\n};\n\nPreferences.prototype.getAudienceSettingsArray = function () {\n return _.keys(_.pick(this.audienceSettings, val => !!val));\n};\n\nPreferences.prototype.getAudienceRestrictions = function() {\n var audienceRestrictions = [];\n if (this.audienceSettings.juvenile) {\n audienceRestrictions.push('juvenile');\n }\n if (this.audienceSettings.youngadult) {\n audienceRestrictions.push('young adult');\n }\n if (this.audienceSettings.generalcontent) {\n audienceRestrictions.push('general adult');\n }\n if (this.audienceSettings.adultonly) {\n audienceRestrictions.push('mature adult');\n }\n return audienceRestrictions;\n};\n\nPreferences.prototype.getMaturityQueryString = function () {\n if (!this.audienceSettings.all) {\n var array = this.getAudienceSettingsArray();\n return '?' + qs.stringify({maturityLevel: array});\n }\n return '?';\n};\n\nPreferences.parseReq = function(req) {\n return Preferences.parseProfile(req && req.profile);\n};\n\nPreferences.parseProfile = function(profile) {\n return {\n audienceSettings: profile && profile.settings && profile.settings['audience-setting']\n };\n};\n\nmodule.exports = Preferences;\n","let RGB = require('./RGB');\n\nmodule.exports = class Color {\n constructor() {\n /** @type {String} */ this.hex = null;\n /** @type {RGB} */ this.rgb = null;\n }\n}\n","module.exports = class Constraints {\n constructor() {\n /** @type {Boolean} */ this.IsDisneyEulaRequired = null;\n /** @type {Number} */ this.WatchExpirationHours = null;\n }\n};\n","module.exports = class ContentRatings {\n constructor() {\n /** @type {IdNamePair} */\n this.maturityLevel = null;\n\n /** @type {IdNamePair} */\n this.mpaa = null;\n\n /** @type {IdNamePair} */\n this.naughtyScore = null;\n\n /** @type {IdNamePair} */\n this.norbit = null;\n\n /** @type {IdNamePair} */\n this.TV = null;\n }\n}\n","let Color = require('./Color');\n\nmodule.exports = class CoverArt {\n constructor() {\n /** @type {String} */ this.href = null;\n /** @type {Number} */ this.height = null;\n /** @type {Number} */ this.width = null;\n\n /** @type {Color} */\n this.primaryColor = null;\n }\n};\n","let CoverArt = require('./CoverArt');\n\nmodule.exports = class Covers {\n constructor() {\n /** @type {CoverArt} */ this.cover150Wide = null;\n /** @type {CoverArt} */ this.cover300Wide = null;\n /** @type {CoverArt} */ this.cover510Wide = null;\n }\n};\n","module.exports = class Creator {\n constructor() {\n this.id = 0;\n this.role = '';\n this.name = '';\n }\n};\n","module.exports = class IdNamePair {\n constructor() {\n this.id = 0;\n this.name = '';\n }\n};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class Imprint extends IdNamePair {};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class Language extends IdNamePair {};\n","module.exports = class Level {\n constructor() {\n this.id = 0;\n this.name = '';\n this.value = '';\n }\n};\n","module.exports = class Link {\n constructor() {\n this.href = '';\n }\n};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class MaturityLevel extends IdNamePair {};\n","// Models the Thunder V2/Responses/MediaDetailsResponse.cs model\n\nlet Type = require('./Type');\nlet Covers = require('./Covers');\nlet Link = require('./Link');\nlet Language = require('./Language');\nlet Imprint = require('./Imprint');\nlet MaturityLevel = require('./MaturityLevel');\nlet NaughtyScore = require('./NaughtyScore');\nlet Publisher = require('./Publisher');\nlet Level = require('./Level');\nlet Creator = require('./Creator');\nlet Subject = require('./Subject');\nlet Constraints = require('./Constraints');\nlet ContentRatings = require('./ContentRatings');\nlet ReviewCounts = require('./ReviewCounts');\n\nmodule.exports = class MediaDetail {\n constructor() {\n this.id = 0;\n this.reserveId = '';\n this.title = '';\n this.subtitle = '';\n\n this.isAvailable = false;\n this.isPreReleaseTitle = false;\n this.isFastlane = false;\n this.isOwned = false;\n this.isHoldable = false;\n this.isBundledChild = false;\n\n /** @type {Type} */\n this.type = null;\n /** @type {Publisher} */\n this.publisher = null;\n /** @type {Imprint} */\n this.imprint = null;\n\n this.firstCreatorId = 0;\n this.firstCreatorName = '';\n\n /** @type {Creator[]} */\n this.creators = [];\n /** @type {Subject[]} */\n this.subjects = [];\n /** @type {Format[]} */\n this.formats = [];\n /** @type {Language[]} */\n this.languages = [];\n /** @type {string[]} */\n this.bisacCodes = [];\n /** @type {Level[]} */\n this.levels = [];\n\n /** @type {ContentRatings} */\n this.ratings = null;\n /** @type {ReviewCounts} */\n this.reviewCounts = null;\n /** @type {Constraints} */\n this.constraints = null;\n\n /** @type {Link} */\n this.sample = null;\n\n /** @type {Covers} */\n this.covers = null;\n\n this.description = '';\n\n this.estimatedReleaseDate = '';\n this.starRating = 0;\n this.starRatingCount = 0;\n\n Object.assign(this, ...arguments);\n }\n};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class NaughtyScore extends IdNamePair {};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class Publisher extends IdNamePair {};\n","module.exports = class RGB {\n constructor() {\n this.red = 0;\n this.green = 0;\n this.blue = 0;\n }\n};\n","module.exports = class ReviewCounts {\n constructor() {\n this.premium = 0;\n this.publisherSupplier = 0;\n }\n};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class Subejct extends IdNamePair {};\n","let IdNamePair = require('./IdNamePair');\n\nmodule.exports = class Type extends IdNamePair {};\n","import QueryString from 'querystring';\n\nexport default class HashManager {\n\n static parse() {\n let hashObject = QueryString.parse(location.hash.substr(1));\n\n _.keys(hashObject).forEach((key) => {\n hashObject[key] = _.flatten([hashObject[key] || []]);\n });\n\n return hashObject;\n }\n\n static update(object) {\n let newHash = QueryString.stringify(object);\n if (newHash !== '&'){\n location.hash = newHash;\n }\n }\n\n static get(key) {\n let response = this.parse();\n\n if (_.isString(key)) {\n return response[key];\n }\n\n return response;\n }\n\n static set(key, value) {\n let hash = this.parse();\n\n hash[key] = _.flatten([value]);\n\n this.update(hash);\n }\n\n static push(key, value) {\n let hash = this.parse();\n\n hash[key] = hash[key] || [];\n hash[key].push(value);\n\n this.update(hash);\n }\n\n static remove(key) {\n let hash = this.parse();\n\n hash[key] && delete hash[key];\n\n this.update(hash);\n }\n}\n","import HashManager from '../common/HashManager';\n\nimport FormatCollection from './collections/FormatCollection';\nimport FormatNavigationView from './views/FormatNavigationView';\nimport SeeAllLinkView from './views/SeeAllLinkView';\n\nimport SubjectCollection from './collections/SubjectCollection';\nimport SubjectCollectionView from './views/SubjectCollectionView';\nimport SubjectsViewTemplate from './templates/SubjectsView.html';\n\nclass SubjectsPage extends Backbone.View {\n template = SubjectsViewTemplate;\n\n mediaTypeProperty = 'format';\n\n initialize() {\n this.$el.html(SubjectsViewTemplate);\n\n this.formatCollection = new FormatCollection();\n this.subjectCollection = new SubjectCollection();\n\n this.seeAllLinkView = new SeeAllLinkView({\n collection: this.formatCollection,\n el: this.$('.js-seeAll'),\n });\n this.formatNavigationView = new FormatNavigationView({\n collection: this.formatCollection,\n });\n\n this.subjectCollectionView = new SubjectCollectionView({\n collection: this.subjectCollection,\n el: this.$('.js-subjects'),\n });\n\n this.tabPanel = this.$('[role=\"tabpanel\"]');\n\n this.$formats = this.$('.js-formats');\n this.$formats.html(this.formatNavigationView.el);\n\n // Set up application state management event handler\n this.listenTo(this.formatCollection, 'format:select', (formatModel) => {\n this.formatCollection.selectMediaTypeByFormat(formatModel);\n\n let mediaType = formatModel.get('mediaType');\n this.tabPanel.attr('aria-labelledby', `format-${mediaType}-tab`);\n this.tabPanel.attr('id', `format-${mediaType}-panel`);\n this.displaySubjectsByMediaType(mediaType);\n this.setMediaTypeOnPath(mediaType);\n });\n\n $(window).on('hashchange', () => {\n let initialFormat = this.getInitialFormat();\n initialFormat.trigger('format:select', initialFormat);\n });\n\n // Trigger initial load\n this.formatCollection.fetch().done(() => {\n let initialFormat = this.getInitialFormat(true);\n initialFormat.trigger('format:select', initialFormat);\n });\n }\n\n displaySubjectsByMediaType(mediaType) {\n this.subjectCollection.fetch({ data: { mediaType } });\n }\n\n getInitialFormat(initialLoad = false) {\n // Attempt to locate the desired mediaType if provided on path, eg: /browse#format=ebook\n let activeFormats = _(this.formatCollection.activeFormats());\n\n let formatFromPath = activeFormats.find(\n (format) => format.get('mediaType') === this.getMediaTypeFromPath()\n );\n var firstFormat = activeFormats.first();\n\n if (window.OverDrive.isTolinoDevice && initialLoad) {\n firstFormat = activeFormats.find(\n (format) => format.get('mediaType') === 'ebook'\n );\n }\n\n return formatFromPath || firstFormat;\n }\n\n getMediaTypeFromPath() {\n return _(HashManager.get(this.mediaTypeProperty) || []).first();\n }\n\n setMediaTypeOnPath(mediaType) {\n // Clear the # when 'all' is selected\n HashManager.set(\n this.mediaTypeProperty,\n mediaType === 'all' ? [] : mediaType\n );\n }\n}\n\nexport default SubjectsPage;\n","const html = window.html;\nconst routes = window.routes;\n\nconst Backbone = window.Backbone;\n\nimport QueryString from 'querystring';\nimport SubjectParameters from '../../../../../business-objects/SubjectParameters';\n\nimport FormatModel from '../models/FormatModel';\n\nconst FormatCollection = Backbone.Collection.extend({\n model: FormatModel,\n\n url() {\n return window.url(routes.rest.subjects.getCountByMediaType);\n },\n\n // Converts subject mediatype responses into their localized display value keys for use with html()\n labelMap: {\n all: 'all',\n ebook: 'ebooks',\n audiobook: 'audiobooks',\n magazine: 'magazines',\n video: 'videos',\n },\n\n // Transforms a moidifed SubjectCollection model into a flat model for use with the FormatNavigationView\n parse(response) {\n return _.map(response, (subjectCollection) => {\n let params = new SubjectParameters(\n subjectCollection.subjectParameters\n );\n\n // LHTNG-1320 See all link sort by 'Newly Added'\n params.sortBy = 'newlyadded';\n\n delete params.showOnlyAvailable;\n\n // LHTNG-4281 Use mediaTypes for url instead of mediaType\n if (params.mediaType !== 'all') {\n params.mediaTypes = params.mediaType;\n delete params.mediaType;\n }\n\n return {\n mediaType: subjectCollection.subjectParameters.mediaType,\n count: subjectCollection.uniqueTitles,\n label: html(\n this.labelMap[\n subjectCollection.subjectParameters.mediaType.toLowerCase()\n ]\n ),\n href: `${window.url(routes.search)}?${QueryString.stringify(\n params.serialize()\n )}`,\n selected: false,\n };\n });\n },\n\n selectMediaTypeByFormat(formatModel) {\n let currentFormatModel = this.findWhere({ selected: true });\n if (currentFormatModel) {\n currentFormatModel.set({ selected: false });\n }\n\n formatModel.set({ selected: true });\n },\n\n /**\n * Returns a collection of format models that have 1 or more titles and handles single format display logic\n */\n activeFormats() {\n let response = this.filter(\n (formatModel) => formatModel.get('count') > 0\n );\n\n let allFormat = this.findWhere({ mediaType: 'all' });\n\n // LHTNG-1316 - If the only two options are \"All\" and the only format that is active on the site\n if (response.length === 2 && _(response).contains(allFormat)) {\n // Remove the \"All\" option\n response = _(response).without(allFormat);\n }\n\n return response;\n },\n});\n\nexport default FormatCollection;\n","const Backbone = window.Backbone;\nconst routes = window.routes;\n\nimport SubjectCollectionModel from '../models/SubjectCollectionModel';\n\nclass SubjectCollection extends Backbone.Collection {\n\n get model() { return SubjectCollectionModel; }\n\n get url() { return window.url(routes.rest.subjects.getGroupedByParent); }\n}\n\nexport default SubjectCollection;\n","const Backbone = window.Backbone;\n\nconst FormatModel = Backbone.Model.extend({\n idAttribute: 'mediaType',\n\n defaults() {\n return {\n mediaType : 'all',\n label : 'All',\n count : 0,\n selected : false\n };\n }\n});\n\nexport default FormatModel;\n","const Backbone = window.Backbone;\n\nimport SubjectParameters from '../../../../../business-objects/SubjectParameters';\n\nconst SubjectCollectionModel = Backbone.Model.extend({\n defaults() {\n return {\n subjectParameters : new SubjectParameters(),\n subjects : [],\n uniqueTitles : 0\n };\n }\n});\n\nexport default SubjectCollectionModel;\n","const html = window.html;\nconst routes = window.routes;\n\nconst Backbone = window.Backbone;\n\nimport QueryString from 'querystring';\nimport SubjectParameters from '../../../../../business-objects/SubjectParameters';\n\nconst SubjectModel = Backbone.Model.extend({\n defaults() {\n return {\n id : 0,\n titleCount : 0,\n name : '',\n format : ''\n };\n },\n\n toViewModel(subjectParams) {\n // Take a snapshot of the current model\n let data = this.toJSON();\n\n // Create a search parameters object with the current subject ID mixed in so we get correct search results\n let params = new SubjectParameters(subjectParams);\n params.subject.push(data.id);\n\n params.sortBy = 'newlyadded';\n\n params.maturityLevel = [];\n\n delete params.showOnlyAvailable;\n\n let viewModel = {\n count : data.titleCount,\n subjectID : data.id,\n subject : data.name,\n format : data.format,\n subjectLabel : (html(`subjects.${data.id}`) || ''),\n subjectSubLabel : '',\n href : `${window.url(routes.search)}?${QueryString.stringify(params.serialize())}`\n };\n\n // Generate the two part subject label if the subejct contains the ' - ' delimter\n let subjectParts = viewModel.subjectLabel.split(' - ');\n if (subjectParts.length > 1) {\n viewModel.subjectLabel = subjectParts[1];\n viewModel.subjectSubLabel = subjectParts[0];\n }\n\n return viewModel;\n }\n});\n\nexport default SubjectModel;\n","const { html } = window;\n\nexport default () => `\n
\n
\n

${html('browseSubjects.title')}

\n
\n
\n\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n`;\n","const html = window.html;\nconst Backbone = window.Backbone;\n\nconst FormatItemView = Backbone.View.extend({\n template: _.template(`\n \n \n `),\n\n events: {\n click: 'onClick',\n },\n\n initialize() {\n this.listenTo(this.model, 'change', this.render);\n\n this.setElement(this.template());\n this.$label = this.$('span');\n\n this.render();\n },\n\n onClick() {\n this.model.trigger('format:select', this.model);\n },\n\n render() {\n let model = this.model.toJSON();\n this.$label.text(model.label);\n\n this.$el.attr('id', `format-${model.mediaType}-tab`);\n this.$el.attr('aria-controls', `format-${model.mediaType}-panel`);\n\n // Some of the CSS transition styling depends on adding and removing the 'is-active' class so we are\n // incrementally updating the element instead of wiping out the display and re-rendering on update\n if (model.selected) {\n this.$el.addClass('is-active');\n this.$el.attr('aria-selected', 'true');\n } else {\n this.$el.removeClass('is-active');\n this.$el.attr('aria-selected', 'false');\n }\n },\n});\n\nconst FormatNavigationView = Backbone.View.extend({\n template: `
`,\n\n initialize() {\n this.listenTo(this.collection, 'sync', () => {\n this.setup();\n });\n },\n\n setup() {\n let $template = $(this.template);\n\n let activeFormats = this.collection.activeFormats();\n\n _(activeFormats).each((formatItem) => {\n $template.append(new FormatItemView({ model: formatItem }).el);\n });\n\n this.$el.empty().append($template);\n },\n});\n\nexport default FormatNavigationView;\n","const Backbone = window.Backbone;\n\nconst SeeAllLinkView = Backbone.View.extend({\n\n template: _.template(`\n `),\n\n initialize() {\n this.listenTo(this.collection, 'sync', () => { this.render(); });\n this.listenTo(this.collection, 'change', () => { this.render(); });\n },\n\n render() {\n let model = this._getActiveFormatModel();\n this.$el.html(this.template(model.toJSON()));\n },\n\n labelMap: {\n all : '',\n ebook : 'ebook',\n audiobook : 'audiobook',\n video : 'video',\n magazine : 'magazine'\n },\n\n _getActiveFormatModel() {\n let activeFormats = this.collection.activeFormats();\n\n let formatModel = this.collection.findWhere({ selected: true }) || _(activeFormats).first();\n\n let model = formatModel.toJSON();\n\n // LHTNG-1314 - Override the label to the singular form\n model.label = this.labelMap[model.mediaType];\n\n // LHTNG-1314 - Remove the format label all together if there is only one option\n if (activeFormats.length === 1) {\n model.label = '';\n }\n\n if (model.label) {\n model.label = window.html(model.label);\n }\n\n return new this.collection.model(model); // eslint-disable-line new-cap\n }\n});\n\nexport default SeeAllLinkView;\n","const html = window.html;\nconst Backbone = window.Backbone;\nconst smallScreen =\n window.OverDrive.isTolinoDevice || $(document).width() <= 870;\n\nimport SubjectModel from '../models/SubjectModel';\nimport SubjectItemView from './SubjectItemView';\nimport keys from '../../../util/keycodes';\n\nclass SubjectCollectionView extends Backbone.View {\n template(model) {\n let expanded = !smallScreen || this.collection.length === 1;\n let headerId = `acc-header-${model.cid}`;\n let contentId = `acc-content-${model.cid}`;\n return `\n
  • \n
    \n
    \n

    ${model.title}

    \n \n
    \n
    \n
      \n
      \n
      \n
    • `;\n }\n\n // Converts subject mediatype responses into their localized display value keys for use with html()\n get labelMap() {\n return {\n all: 'all',\n ebook: 'ebooks',\n audiobook: 'audiobooks',\n magazine: 'magazines',\n video: 'videos',\n };\n }\n\n initialize() {\n this.listenTo(this.collection, 'update', this.render);\n }\n\n render() {\n let $temp = $('