diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index 1250228..f311410 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -3,7 +3,7 @@ name: Appliance Dev Deployment on: push: branches: - - all-0.5 + - all-0.6 jobs: deploy: @@ -37,7 +37,3 @@ jobs: - name: Deploy to S3 Bucket run: | aws s3 sync ./dist/y/ s3://sballappliance - - - name: Invalidate CloudFront Cache - run: | - aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*" diff --git a/.gitignore b/.gitignore index 681b621..42c2786 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ # Only exists if Bazel was run /bazel-out .angular/cache/ +/src/assets/sb-all/ +/src/assets/games/ # dependencies **/node_modules diff --git a/src/assets/games/asset-manifest.json b/src/assets/games/asset-manifest.json deleted file mode 100644 index f1d38b0..0000000 --- a/src/assets/games/asset-manifest.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "files": { - "main.css": "./static/css/main.58d558c4.css", - "main.js": "./static/js/main.60432f80.js", - "static/js/787.f8217a87.chunk.js": "./static/js/787.f8217a87.chunk.js", - "static/media/turn2.png": "./static/media/turn2.4b40ec04128a619ac2d9.png", - "static/media/turn1.png": "./static/media/turn1.00ecc8a971f1eda97011.png", - "static/media/main.png": "./static/media/main.5169fee2caf0ba2682ec.png", - "static/media/elephant.png": "./static/media/elephant.b55f3755c0cf639d1921.png", - "static/media/sweet_sour.png": "./static/media/sweet_sour.5d52aad4b8f06d2c0497.png", - "static/media/avatar.png": "./static/media/avatar.89c66c75f1dcc6e758cf.png", - "static/media/p2win.png": "./static/media/p2win.1612b3018a6b18519b09.png", - "static/media/story14.png": "./static/media/story14.edcdf79670e08e703ba4.png", - "static/media/story13.png": "./static/media/story13.e08adf8bee7be54223f0.png", - "static/media/story11.png": "./static/media/story11.572b948ad72174a837c4.png", - "static/media/story16.png": "./static/media/story16.4da4196586df3cbc8b55.png", - "static/media/story10.png": "./static/media/story10.ccd34e1616a0eda4bdbb.png", - "static/media/story12.png": "./static/media/story12.592cf68ce89503a1f6a6.png", - "static/media/story15.png": "./static/media/story15.808f108379b4d5257f42.png", - "static/media/story21.png": "./static/media/story21.afe507b6c5784cd38459.png", - "static/media/story20.png": "./static/media/story20.32afa6704c99797a46ae.png", - "static/media/story17.png": "./static/media/story17.39c1ab5089f1d17e65a5.png", - "static/media/story24.png": "./static/media/story24.912ce4221725cb7a7284.png", - "static/media/story25.png": "./static/media/story25.1d44624099b041329c4f.png", - "static/media/story22.png": "./static/media/story22.7c64bb5d3e3243879328.png", - "static/media/story23.png": "./static/media/story23.23e0ad279ccd3d0a0414.png", - "static/media/mobilemain.svg": "./static/media/mobilemain.a18037aea105a03f0806.svg", - "static/media/draw.png": "./static/media/draw.6c1f808d7accc970aaa9.png", - "static/media/S6.m4a": "./static/media/S6.9534ebaa01b6834977b2.m4a", - "static/media/over.png": "./static/media/over.07e5b626f0fcb7214e78.png", - "static/media/story8.png": "./static/media/story8.07e5b626f0fcb7214e78.png", - "static/media/S1.m4a": "./static/media/S1.6768149750c8f6073776.m4a", - "static/media/S5.m4a": "./static/media/S5.c2d22ac7291b1b69c3e9.m4a", - "static/media/S2.m4a": "./static/media/S2.4f421f90490d14c6d78a.m4a", - "static/media/S4.m4a": "./static/media/S4.a5f40a09791db69d2b9f.m4a", - "static/media/S3.m4a": "./static/media/S3.2c8124e7d26dee6c02e8.m4a", - "static/media/V5.m4a": "./static/media/V5.e8e615a6d617c274b714.m4a", - "static/media/V4.m4a": "./static/media/V4.f54d977bf95bd7977586.m4a", - "static/media/V2.m4a": "./static/media/V2.ae476c82fd8a61da90dc.m4a", - "static/media/V7.m4a": "./static/media/V7.437da67e03abadbc1bd1.m4a", - "static/media/satya.png": "./static/media/satya.4fd7c902b2340259a901.png", - "static/media/V1.m4a": "./static/media/V1.ca83ff731e34b2176cf0.m4a", - "static/media/helping.png": "./static/media/helping.e37a70e233f0a0fe03e4.png", - "static/media/singing.png": "./static/media/singing.c41ab5c69edd2cda6e26.png", - "static/media/found.png": "./static/media/found.2c8af5ef059a5ba2ff3c.png", - "static/media/V6.m4a": "./static/media/V6.2c48d69c7c37a71fd5fd.m4a", - "static/media/win.mp3": "./static/media/win.37b45d4b4b0828435ef4.mp3", - "static/media/V3.m4a": "./static/media/V3.2f9859320f25cb7a36b4.m4a", - "static/media/selectplayer.mp3": "./static/media/selectplayer.b6ba29659cf55d571cc0.mp3", - "static/media/p1win.png": "./static/media/p1win.2557e91180bee3eec4c9.png", - "static/media/p2.png": "./static/media/p2.3072f2d32702f6cd5e7c.png", - "static/media/V8.m4a": "./static/media/V8.db9d7d7b922bda5a3e90.m4a", - "static/media/p4.png": "./static/media/p4.3aeade315a6fa5581201.png", - "static/media/mode.png": "./static/media/mode.5a34c2ba627db1d52d60.png", - "static/media/story.png": "./static/media/story.b37f6d4798672cc50932.png", - "static/media/ps2.png": "./static/media/ps2.667aa15fc9699023bb88.png", - "static/media/ps4.png": "./static/media/ps4.6f76494722b88eafaed9.png", - "static/media/p1.png": "./static/media/p1.4e0394882f313a71ed60.png", - "static/media/p3.png": "./static/media/p3.77a7c0db4407165f293a.png", - "static/media/ps1.png": "./static/media/ps1.44fbb00d3dba4bbc01c9.png", - "static/media/ps3.png": "./static/media/ps3.af6a77e84626f76d33e7.png", - "static/media/trophy2.png": "./static/media/trophy2.16816c37af764d3b2144.png", - "static/media/logo.png": "./static/media/logo.2fec8c17bc95b1ab1227.png", - "static/media/p2s.png": "./static/media/p2s.da3d9f34642a44fd9197.png", - "static/media/p1s.png": "./static/media/p1s.9cdd5ced8800cbdcaecf.png", - "static/media/trophy.png": "./static/media/trophy.3b283ec8d382b5c6bf3d.png", - "static/media/total.png": "./static/media/total.fd2810be2f3a2db89f70.png", - "static/media/gt1.png": "./static/media/gt1.0bbfd9af7f97ea5c6a0d.png", - "static/media/checkresult.png": "./static/media/checkresult.290e47b47dd6124e5384.png", - "static/media/coin.mp3": "./static/media/coin.f9f1bc3d8573b0b56e70.mp3", - "static/media/home.png": "./static/media/home.cbc316c7e8d4384eb0d5.png", - "static/media/mic.png": "./static/media/mic.d4d4580e37a3db8dc917.png", - "static/media/next.png": "./static/media/next.901e22c11b3e54798515.png", - "static/media/mobileGameBar.svg": "./static/media/mobileGameBar.f8996823297078247341e8029e055df8.svg", - "index.html": "./index.html", - "main.58d558c4.css.map": "./static/css/main.58d558c4.css.map", - "main.60432f80.js.map": "./static/js/main.60432f80.js.map", - "787.f8217a87.chunk.js.map": "./static/js/787.f8217a87.chunk.js.map" - }, - "entrypoints": [ - "static/css/main.58d558c4.css", - "static/js/main.60432f80.js" - ] -} \ No newline at end of file diff --git a/src/assets/games/favicon.ico b/src/assets/games/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/src/assets/games/favicon.ico and /dev/null differ diff --git a/src/assets/games/index.html b/src/assets/games/index.html deleted file mode 100644 index b3b47f3..0000000 --- a/src/assets/games/index.html +++ /dev/null @@ -1 +0,0 @@ -Netskill-English Learning App
\ No newline at end of file diff --git a/src/assets/games/logo.png b/src/assets/games/logo.png deleted file mode 100644 index 025c3fd..0000000 Binary files a/src/assets/games/logo.png and /dev/null differ diff --git a/src/assets/games/logo192.png b/src/assets/games/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/src/assets/games/logo192.png and /dev/null differ diff --git a/src/assets/games/logo512.png b/src/assets/games/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/src/assets/games/logo512.png and /dev/null differ diff --git a/src/assets/games/manifest.json b/src/assets/games/manifest.json deleted file mode 100644 index acfee10..0000000 --- a/src/assets/games/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "Netskill-English Learning App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/src/assets/games/robots.txt b/src/assets/games/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/src/assets/games/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/src/assets/games/static/css/main.58d558c4.css b/src/assets/games/static/css/main.58d558c4.css deleted file mode 100644 index 9a1c9cf..0000000 --- a/src/assets/games/static/css/main.58d558c4.css +++ /dev/null @@ -1,2 +0,0 @@ -body,html{margin:0;padding:0}*{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:url(../../static/media/main.5169fee2caf0ba2682ec.png);background-position:bottom;background-repeat:no-repeat;background-size:cover;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;height:100%}@media only screen and (max-width:600px){body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:url(../../static/media/mobilemain.a18037aea105a03f0806.svg);background-position:bottom;background-repeat:no-repeat;background-size:cover;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;height:100%}}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hide{display:none}.mic_stop_record{background-color:green;border-radius:50%;padding:5px}.Snowflake{-webkit-animation:fall 16s linear infinite;animation:fall 16s linear infinite;color:snow;display:inline-block;font-size:120px;margin:0;opacity:0;padding:0;width:.1%}@-webkit-keyframes fall{0%{opacity:0}3%{opacity:.9}90%{opacity:.9}to{opacity:0;-webkit-transform:translateY(97vh);transform:translateY(97vh)}}@keyframes fall{0%{opacity:0}3%{opacity:.9}90%{opacity:.9}to{opacity:0;-webkit-transform:translateY(97vh);transform:translateY(97vh)}}.snow-container{display:flex;height:100vh;justify-content:space-between;margin:0;overflow:hidden;padding:0;position:absolute;width:97vw}.main-container{height:100vh;margin:0 auto;overflow:hidden;text-align:center}.top-header{box-sizing:border-box;display:flex;justify-content:space-between;padding:0 0 0 30px;position:absolute;top:20px;width:97%}.player-container{flex-direction:column;height:50vh;justify-content:center}.footerNext,.player-container{align-items:center;display:flex}.footerNext{bottom:50px;font-weight:500;margin:0 auto;position:fixed;right:25px}.grid{grid-gap:10px;grid-template-columns:repeat(3,1fr);width:70%}.grid,.grid-av{align-items:end;display:grid;gap:10px;height:70vh;margin:0 auto}.grid-av{grid-gap:10px;grid-template-columns:repeat(2,1fr);width:40%}@media only screen and (min-width:767px) and (max-width:905px){.progress{width:43%!important}.read-img-over{height:190px!important}.btn-result{left:44%!important}.coin{height:30px!important}}@media only screen and (min-width:767px){.mobile-bar-container{display:none!important}.playPlayerTitle{height:60px}.coin{height:30px;width:auto}.total-coin-heading{height:50px;width:auto}.btn-result{bottom:35px;cursor:pointer;font-weight:600;left:47%;position:fixed;width:110px}}@media only screen and (max-width:600px){.playPlayerTitle{height:40px}.coin{height:20px;width:20px}.total-coin-heading{height:45px;width:145px}.btn-result{bottom:100px;cursor:pointer;font-weight:600;left:38%;position:fixed;width:110px}.play-grid-mobile{align-items:center;display:flex;flex-direction:column;gap:10px;margin:0 auto;width:10%}.mobile-game-bar{-webkit-animation:grow 1.5s ease-out forwards;animation:grow 1.5s ease-out forwards;background:linear-gradient(180deg,#ffc600,#ffde69);border-radius:0 16px 16px 0;box-shadow:0 0 18px rgba(0,0,0,.25);box-sizing:border-box;height:8px;left:19px;position:absolute;top:28px}.mobile-bar-container{display:flex;flex-direction:row;margin-top:10px;padding-left:12px}.main-container{height:100vh;margin:0 auto;overflow:hidden;text-align:center}.avatar-heading{width:90%}.grid-av{grid-gap:10px;align-items:end;display:grid;gap:10px;grid-template-columns:repeat(2,1fr);height:10vh;margin:0 auto;width:40%}.desktop-progress{display:none}.read-img{height:36vh!important}.read-img,.read-img-over{margin-top:35px;width:89vw}.read-img-over{height:85px!important}.game-action-button{left:34%!important;width:37%!important}}.grid-item{background:#0f0f0f;border-radius:24px;color:#fff;cursor:pointer;font-size:12px;height:181px;margin:20px auto 10px;padding-bottom:10px;width:162px}.grid-item-av{cursor:pointer;margin-bottom:40px}.title{align-items:center;display:flex;font-family:Englebert;height:30px;justify-content:center}.footer1{bottom:38px}.footer1,.footer2{align-items:center;color:#fff;display:flex;font-size:12px;font-weight:500;margin:0 auto;padding-left:20px;position:fixed}.footer2{bottom:15px}.logo-img{height:12px;padding:4px 5px 0}.btn{background:#fc3;border-radius:6px;bottom:50px;cursor:pointer;height:32px;justify-content:center;position:fixed;right:74px;width:100px}.btn,.btn-play{align-items:center;display:flex}.btn-play{background:#000;border-radius:50%;height:15px;justify-content:space-around;margin-right:4px;padding-left:2px;width:14px}.play-grid{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(3,1fr);margin:0 auto;width:90%}.read-img{height:350px;margin-top:35px}.read-img-over{height:250px;margin-top:35px}.progress{width:25%}.barcontainer{background:linear-gradient(180deg,#ffeb3b61,#ffde6978);border-radius:16px 16px 0 0;height:320px;margin:0 auto;position:relative}.bar,.barcontainer{box-shadow:0 0 18px rgba(0,0,0,.25);width:12px}.bar{-webkit-animation:grow 1.5s ease-out forwards;animation:grow 1.5s ease-out forwards;background:linear-gradient(180deg,#ffc600,#ffde69);border-radius:0 0 16px 16px;bottom:0;box-sizing:border-box;position:absolute;-webkit-transform-origin:bottom;transform-origin:bottom}.barcontainer2{background:linear-gradient(180deg,#ffeb3b61,#ffde6978);border-radius:16px 16px 0 0;height:320px;margin:0 27px 0 auto;position:relative}.bar2,.barcontainer2{box-shadow:0 0 18px rgba(0,0,0,.25);width:12px}.bar2{-webkit-animation:grow 1.5s ease-out forwards;animation:grow 1.5s ease-out forwards;background:linear-gradient(180deg,#ffc600,#ffde69);border-radius:0 0 16px 16px;bottom:0;box-sizing:border-box;position:absolute;-webkit-transform-origin:bottom;transform-origin:bottom}.flex{align-items:center;display:flex;justify-content:space-around;margin:35px 0}.coins{-webkit-text-fill-color:transparent;background:linear-gradient(180deg,#ffc600,#ffde69);-webkit-background-clip:text;background-clip:text;font-family:Englebert;font-size:65px;font-weight:400;justify-content:center;text-shadow:0 0 18px rgba(0,0,0,.25);text-transform:uppercase}.coins,.story-txt{align-items:center;display:flex;font-style:normal}.story-txt{bottom:50%;color:#000;font-size:20px;margin:0 auto;position:relative;text-align:justify;text-transform:capitalize;width:330px}.fluency,.story-txt{font-family:Poppins;font-weight:500}.fluency{color:#ffdd28;font-size:22px}.fluency,.result{font-style:normal}.result{font-family:Poppins;font-size:26px;font-weight:600;line-height:28px}.btn-check{align-items:center;background:#fc3;border-radius:6px;bottom:35px;color:#fff;cursor:pointer;display:flex;font-size:14px;font-weight:600;height:31px;justify-content:center;left:47%;position:fixed;width:110px}@media only screen and (max-width:600px){.btn{bottom:55px;right:30px}.grid{grid-template-columns:repeat(2,1fr);width:100%}.footer1{bottom:50px;padding-left:2px}.footer2{bottom:30px;padding-left:2px}.grid-av{grid-template-columns:repeat(2,1fr);margin:40px auto;width:100%}.top-header{padding:0;width:96%}}.wrapper{bottom:36%;-webkit-column-gap:10px;column-gap:10px;display:flex;left:45%;position:absolute}@media only screen and (max-width:600px){.wrapper{left:35%}}.wrapper .dot{-webkit-animation:animate 1s ease-in-out infinite alternate;animation:animate 1s ease-in-out infinite alternate;background:#008ae6;border-radius:50%;box-shadow:0 5px 10px rgba(0,0,0,.1);height:20px;width:20px}.dot:first-child{-webkit-animation-delay:-.25s;animation-delay:-.25s}.dot:nth-child(2){-webkit-animation-delay:-.5s;animation-delay:-.5s;background:#e60000}.dot:nth-child(3){-webkit-animation-delay:-.75s;animation-delay:-.75s;background:#fc0}.dot:nth-child(4){-webkit-animation-delay:-1s;animation-delay:-1s;background:#080}@-webkit-keyframes animate{0%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}to{-webkit-transform:translateY(5px);transform:translateY(5px)}}@keyframes animate{0%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}to{-webkit-transform:translateY(5px);transform:translateY(5px)}}@-webkit-keyframes quiet{25%{-webkit-transform:scaleY(.6);transform:scaleY(.6)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(.8);transform:scaleY(.8)}}@keyframes quiet{25%{-webkit-transform:scaleY(.6);transform:scaleY(.6)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(.8);transform:scaleY(.8)}}@-webkit-keyframes normal{25%{-webkit-transform:scaleY(1);transform:scaleY(1)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(.6);transform:scaleY(.6)}}@keyframes normal{25%{-webkit-transform:scaleY(1);transform:scaleY(1)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(.6);transform:scaleY(.6)}}@-webkit-keyframes loud{25%{-webkit-transform:scaleY(1);transform:scaleY(1)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(1.2);transform:scaleY(1.2)}}@keyframes loud{25%{-webkit-transform:scaleY(1);transform:scaleY(1)}50%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}75%{-webkit-transform:scaleY(1.2);transform:scaleY(1.2)}}.boxContainer{--boxSize:8px;--gutter:4px;display:flex;height:55px;justify-content:space-between;margin:0 auto;width:calc((var(--boxSize) + var(--gutter))*5)}.box{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;background:#12e2dc;border-radius:8px;height:100%;-webkit-transform:scaleY(.4);transform:scaleY(.4);width:var(--boxSize)}.box1{-webkit-animation-name:quiet;animation-name:quiet}.box2{-webkit-animation-name:normal;animation-name:normal}.box3{-webkit-animation-name:quiet;animation-name:quiet}.box4{-webkit-animation-name:loud;animation-name:loud}.box5{-webkit-animation-name:quiet;animation-name:quiet} -/*# sourceMappingURL=main.58d558c4.css.map*/ \ No newline at end of file diff --git a/src/assets/games/static/css/main.58d558c4.css.map b/src/assets/games/static/css/main.58d558c4.css.map deleted file mode 100644 index 634af47..0000000 --- a/src/assets/games/static/css/main.58d558c4.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.58d558c4.css","mappings":"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","sources":["index.css","components/index.css","utility/Loader.css","utility/SoundWave.css"],"sourcesContent":["body,\nhtml {\n margin: 0;\n padding: 0;\n}\n* {\n box-sizing: border-box;\n}\nbody {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: url(\"./assets/main.png\");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: bottom;\n height: 100%;\n}\n\n@media only screen and (max-width: 600px) {\n body {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\",\n \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\",\n \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: url(\"./assets/mobilemain.svg\");\n background-size: cover;\n background-repeat: no-repeat;\n background-position: bottom;\n height: 100%;\n }\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n\n.hide {\n display: none;\n}\n\n.mic_stop_record {\n background-color: green;\n padding: 5px;\n border-radius: 50%;\n}\n\n.Snowflake {\n display: inline-block;\n width: 0.1%;\n color: #fffafa;\n opacity: 0;\n font-size: 120px;\n margin: 0;\n padding: 0;\n animation: fall 16s linear infinite;\n}\n\n@keyframes fall {\n 0% {\n opacity: 0;\n }\n\n 3% {\n opacity: 0.9;\n }\n\n 90% {\n opacity: 0.9;\n }\n\n 100% {\n transform: translate(0, 97vh);\n opacity: 0;\n }\n}\n\n.snow-container {\n display: flex;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n overflow: hidden;\n height: 100vh;\n position: absolute;\n width: 97vw;\n}\n",".main-container {\n text-align: center;\n margin: 0 auto;\n height: 100vh;\n overflow: hidden;\n}\n\n.top-header{\n display: flex;\n width: 97%;\n box-sizing: border-box;\n top: 20px;\n justify-content: space-between;\n padding: 0 0 0 30px;\n position: absolute;\n}\n\n.player-container{\n display: flex;\n flex-direction: column;\n height: 50vh;\n align-items: center;\n justify-content: center;\n}\n\n.footerNext{\n display: flex;\n font-weight: 500;\n align-items: center;\n margin: 0 auto;\n position: fixed;\n bottom: 50px;\n right:25px\n}\n\n.grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n width: 70%;\n height: 70vh;\n align-items: end;\n margin: 0px auto;\n}\n\n.grid-av {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 10px;\n width: 40%;\n height: 70vh;\n align-items: end;\n margin: 0px auto;\n}\n@media only screen and (min-width: 767px) and (max-width:905px) {\n.progress{\n width:43% !important;\n \n}\n.read-img-over{\n height: 190px !important;\n}\n.btn-result{\n left:44% !important\n}\n.coin{\n height:30px !important\n}\n}\n@media only screen and (min-width: 767px) {\n .mobile-bar-container {\n display: none !important;\n }\n .playPlayerTitle {\n height: 60px;\n }\n\n .coin {\n width: auto;\n height: 30px;\n }\n\n .total-coin-heading {\n width: auto;\n height: 50px;\n }\n .btn-result {\n width: 110px;\n left: 47%;\n bottom: 35px;\n font-weight: 600;\n position: fixed;\n cursor: pointer;\n }\n}\n\n@media only screen and (max-width: 600px) {\n .playPlayerTitle {\n height: 40px;\n }\n\n .coin {\n width: 20px;\n height: 20px;\n }\n\n .total-coin-heading {\n width: 145px;\n height: 45px;\n }\n\n .btn-result {\n width: 110px;\n left: 38%;\n bottom: 100px;\n font-weight: 600;\n position: fixed;\n cursor: pointer;\n }\n\n .play-grid-mobile {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 10%;\n margin: 0px auto;\n align-items: center;\n }\n .mobile-game-bar {\n position: absolute;\n box-sizing: border-box;\n animation: grow 1.5s ease-out forwards;\n /* width: 70px; */\n height: 8px;\n background: linear-gradient(180deg, #ffc600 0%, #ffde69 100%);\n box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.25);\n border-radius: 0px 16px 16px 0px;\n left: 19px;\n top: 28px;\n }\n\n .mobile-bar-container {\n flex-direction: row;\n display: flex;\n padding-left: 12px;\n margin-top: 10px;\n }\n\n .main-container {\n text-align: center;\n margin: 0 auto;\n height: 100vh;\n overflow: hidden;\n }\n .avatar-heading {\n width: 90%;\n }\n .grid-av {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 10px;\n width: 40%;\n height: 10vh;\n align-items: end;\n margin: 0px auto;\n }\n .desktop-progress {\n display: none;\n }\n .read-img {\n height: 36vh !important;\n width: 89vw;\n margin-top: 35px;\n }\n .read-img-over {\n height: 85px !important;\n width: 89vw;\n margin-top: 35px;\n }\n .game-action-button {\n left: 34% !important;\n width:37% !important;\n }\n}\n\n.grid-item {\n width: 162px;\n background: #0f0f0f;\n margin: 10px auto;\n color: white;\n font-size: 12px;\n padding-bottom: 10px;\n border-radius: 24px;\n height: 181px;\n margin-top: 20px;\n cursor: pointer;\n}\n\n.grid-item-av {\n margin-bottom: 40px;\n cursor: pointer;\n}\n\n.title {\n font-family: \"Englebert\";\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.footer1 {\n color: white;\n font-size: 12px;\n display: flex;\n font-weight: 500;\n align-items: center;\n padding-left: 20px;\n margin: 0 auto;\n position: fixed;\n bottom: 38px;\n}\n\n.footer2 {\n color: white;\n font-size: 12px;\n display: flex;\n font-weight: 500;\n align-items: center;\n padding-left: 20px;\n margin: 0 auto;\n position: fixed;\n bottom: 15px;\n}\n\n.logo-img {\n height: 12px;\n padding: 4px 5px 0px;\n}\n\n.btn {\n width: 100px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 6px;\n background: #ffcc33;\n right: 74px;\n bottom: 50px;\n position: fixed;\n cursor: pointer;\n}\n\n.btn-play {\n background: black;\n width: 14px;\n display: flex;\n border-radius: 50%;\n height: 15px;\n justify-content: space-around;\n align-items: center;\n margin-right: 4px;\n padding-left: 2px;\n}\n\n.play-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n width: 90%;\n margin: 0px auto;\n}\n\n.read-img {\n height: 350px;\n margin-top: 35px;\n}\n\n.read-img-over {\n height: 250px;\n margin-top: 35px;\n}\n\n.progress {\n width: 25%;\n}\n\n.barcontainer {\n background: linear-gradient(180deg, #ffeb3b61 0%, #ffde6978 100%);\n box-shadow: 0px 0px 18px rgb(0 0 0 / 25%);\n border-radius: 16px 16px 0px 0px;\n width: 12px;\n height: 320px;\n position: relative;\n margin: 0 auto;\n}\n\n.bar {\n position: absolute;\n bottom: 0;\n width: 12px;\n /* height: 80%; */\n box-sizing: border-box;\n animation: grow 1.5s ease-out forwards;\n transform-origin: bottom;\n background: linear-gradient(180deg, #ffc600 0%, #ffde69 100%);\n box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.25);\n border-radius: 0px 0px 16px 16px;\n}\n\n.barcontainer2 {\n background: linear-gradient(180deg, #ffeb3b61 0%, #ffde6978 100%);\n box-shadow: 0px 0px 18px rgb(0 0 0 / 25%);\n border-radius: 16px 16px 0px 0px;\n width: 12px;\n height: 320px;\n position: relative;\n margin: 0 27px 0 auto;\n}\n\n.bar2 {\n position: absolute;\n bottom: 0;\n width: 12px;\n /* height: 30%; */\n box-sizing: border-box;\n animation: grow 1.5s ease-out forwards;\n transform-origin: bottom;\n background: linear-gradient(180deg, #ffc600 0%, #ffde69 100%);\n box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.25);\n border-radius: 0px 0px 16px 16px;\n}\n\n.flex {\n display: flex;\n justify-content: space-around;\n align-items: center;\n margin: 35px 0;\n}\n\n.coins {\n font-family: \"Englebert\";\n font-style: normal;\n font-weight: 400;\n font-size: 65px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: uppercase;\n background: linear-gradient(180deg, #ffc600 0%, #ffde69 100%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n background-clip: text;\n text-shadow: 0px 0px 18px rgb(0 0 0 / 25%);\n}\n\n.story-txt {\n text-align: justify;\n width: 330px;\n margin: 0 auto;\n font-family: \"Poppins\";\n font-style: normal;\n font-weight: 500;\n font-size: 20px;\n position: relative;\n display: flex;\n align-items: center;\n text-transform: capitalize;\n color: #000000;\n bottom: 50%;\n}\n\n.fluency {\n color: #ffdd28;\n font-family: \"Poppins\";\n font-style: normal;\n font-weight: 500;\n font-size: 22px;\n}\n\n.result {\n font-family: \"Poppins\";\n font-style: normal;\n font-weight: 600;\n font-size: 26px;\n line-height: 28px;\n}\n\n.btn-check {\n width: 110px;\n height: 31px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 6px;\n background: #ffcc33;\n left: 47%;\n bottom: 35px;\n font-size: 14px;\n font-weight: 600;\n color: white;\n position: fixed;\n cursor: pointer;\n}\n@media only screen and (max-width: 600px) {\n .btn {\n right: 30px;\n bottom: 55px;\n }\n\n .grid {\n grid-template-columns: repeat(2, 1fr);\n width: 100%;\n }\n\n .footer1 {\n padding-left: 2px;\n bottom: 50px;\n }\n\n .footer2 {\n padding-left: 2px;\n bottom: 30px;\n }\n\n .grid-av {\n grid-template-columns: repeat(2, 1fr);\n width: 100%;\n margin: 40px auto;\n }\n .top-header{\n padding:0;\n width:96%\n }\n}\n",".wrapper {\n display: flex;\n column-gap: 10px;\n position:absolute;\n bottom: 36%;\n left: 45%\n}\n@media only screen and (max-width: 600px) {\n .wrapper {\n left:35%\n }\n}\n.wrapper .dot {\n height: 20px;\n width: 20px;\n border-radius: 50%;\n background: #008ae6;\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);\n animation: animate 1s ease-in-out infinite alternate;\n}\n.dot:nth-child(1) {\n animation-delay: -0.25s;\n}\n.dot:nth-child(2) {\n background: #e60000;\n animation-delay: -0.5s;\n}\n.dot:nth-child(3) {\n background: #ffcc00;\n animation-delay: -0.75s;\n}\n.dot:nth-child(4) {\n background: #008800;\n animation-delay: -1s;\n}\n\n@keyframes animate {\n 0% {\n transform: translateY(-10px);\n }\n 100% {\n transform: translateY(5px);\n }\n}\n","@keyframes quiet {\n 25%{\n transform: scaleY(.6);\n }\n 50%{\n transform: scaleY(.4);\n }\n 75%{\n transform: scaleY(.8);\n }\n }\n \n @keyframes normal {\n 25%{\n transform: scaleY(1);\n }\n 50%{\n transform: scaleY(.4);\n }\n 75%{\n transform: scaleY(.6);\n }\n }\n @keyframes loud {\n 25%{\n transform: scaleY(1);\n }\n 50%{\n transform: scaleY(.4);\n }\n 75%{\n transform: scaleY(1.2);\n }\n }\n \n \n .boxContainer{\n display: flex;\n justify-content: space-between;\n height: 55px;\n margin: 0 auto;\n --boxSize: 8px;\n --gutter: 4px;\n width: calc((var(--boxSize) + var(--gutter)) * 5);\n }\n \n .box{\n transform: scaleY(.4);\n height: 100%;\n width: var(--boxSize);\n background: #12E2DC;\n animation-duration: 1.2s;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n border-radius: 8px;\n }\n \n .box1{\n animation-name: quiet;\n }\n \n .box2{\n animation-name: normal;\n }\n \n .box3{\n animation-name: quiet;\n }\n \n .box4{\n animation-name: loud;\n }\n \n .box5{\n animation-name: quiet;\n }"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/src/assets/games/static/js/787.f8217a87.chunk.js b/src/assets/games/static/js/787.f8217a87.chunk.js deleted file mode 100644 index c124c45..0000000 --- a/src/assets/games/static/js/787.f8217a87.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunknetsill_gaming_app=self.webpackChunknetsill_gaming_app||[]).push([[787],{787:function(e,n,t){t.r(n),t.d(n,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,n){return{name:e,value:void 0===n?-1:n,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var t=new PerformanceObserver((function(e){return e.getEntries().map(n)}));return t.observe({type:e,buffered:!0}),t}}catch(e){}},f=function(e,n){var t=function t(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},s=function(e){addEventListener("pageshow",(function(n){n.persisted&&e(n)}),!0)},m=function(e,n,t){var i;return function(r){n.value>=0&&(r||t)&&(n.delta=n.value-(i||0),(n.delta||void 0===i)&&(i=n.value,e(n)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){f((function(e){var n=e.timeStamp;v=n}),!0)},l=function(){return v<0&&(v=p(),d(),s((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,n){var t,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime-1&&e(n)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var n=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-n.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,t())}},p=c("layout-shift",v);p&&(t=m(i,r,n),f((function(){p.takeRecords().map(v),t(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),t=m(i,r,n)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,n){i||(i=n,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){L(e,n),r()},i=function(){r()},r=function(){removeEventListener("pointerup",t,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",t,E),addEventListener("pointercancel",i,E)}(n,e):L(n,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,b,E)}))},C=function(e,n){var t,a=l(),v=u("FID"),p=function(e){e.startTimeperformance.now())return;t.entries=[n],e(t)}catch(e){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("load",(function(){return setTimeout(n,0)}))}}}]); -//# sourceMappingURL=787.f8217a87.chunk.js.map \ No newline at end of file diff --git a/src/assets/games/static/js/787.f8217a87.chunk.js.map b/src/assets/games/static/js/787.f8217a87.chunk.js.map deleted file mode 100644 index e4f5e98..0000000 --- a/src/assets/games/static/js/787.f8217a87.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/787.f8217a87.chunk.js","mappings":"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","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},u=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},c=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),u((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},d=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=c(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),u((function(){s=0,l=-1,f=r(\"CLS\",0),n=c(i,f,t)})))},T={passive:!0,capture:!0},y=new Date,g=function(i,r){e||(e=r,t=i,n=new Date,w(removeEventListener),E())},E=function(){if(t>=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){g(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,T),removeEventListener(\"pointercancel\",i,T)};addEventListener(\"pointerup\",n,T),addEventListener(\"pointercancel\",i,T)}(t,e):g(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,S,T)}))},L=function(n,f){var s,m=v(),d=r(\"FID\"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"load\",(function(){return setTimeout(t,0)}))};export{h as getCLS,d as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","u","persisted","c","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","d","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","p","l","h","hadRecentInput","length","takeRecords","T","passive","capture","y","g","w","E","entryType","target","cancelable","processingStart","forEach","S","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""} \ No newline at end of file diff --git a/src/assets/games/static/js/main.60432f80.js b/src/assets/games/static/js/main.60432f80.js deleted file mode 100644 index b5b06a6..0000000 --- a/src/assets/games/static/js/main.60432f80.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.60432f80.js.LICENSE.txt */ -!function(){var e={4491:function(e,t,n){"use strict";n(2791);t.Z=n.p+"static/media/mobileGameBar.f8996823297078247341e8029e055df8.svg"},888:function(e,t,n){"use strict";var r=n(9047);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},426:function(e){var t=function(){function e(){function t(e){return new Int8Array(e)}function n(e){return new Int16Array(e)}function r(e){return new Int32Array(e)}function a(e){return new Float32Array(e)}function i(e){return new Float64Array(e)}function o(e){if(1==e.length)return a(e[0]);var t=e[0];e=e.slice(1);for(var n=[],r=0;r>=1;0!=e--;)a[i++]=o>n[r++]?0:1,a[i++]=o>n[r++]?0:1}function i(t,n,r,a,i,o){var s=(t>>=1)%2;for(t>>=1;0!=t--;){var l,u,c,f,d,p,h,m;l=r[a++]*n,u=r[a++]*n,d=0|l,c=r[a++]*n,p=0|u,f=r[a++]*n,h=0|c,l+=e.adj43[d],m=0|f,u+=e.adj43[p],i[o++]=0|l,c+=e.adj43[h],i[o++]=0|u,f+=e.adj43[m],i[o++]=0|c,i[o++]=0|f}0!=s&&(d=0|(l=r[a++]*n),p=0|(u=r[a++]*n),l+=e.adj43[d],u+=e.adj43[p],i[o++]=0|l,i[o++]=0|u)}var o=[1,2,5,7,7,10,10,13,13,13,13,13,13,13,13];function s(e,t,n,r){var a=function(e,t,n){var r=0,a=0;do{var i=e[t++],o=e[t++];r>=16)>i&&(s=i,r++),a.bits+=s,r}(e,t,n,o[a-1],r);case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:return function(e,t,n,r,a){var i=0,o=0,s=0,l=E.ht[r].xlen,u=E.ht[r].hlen,c=E.ht[r+1].hlen,f=E.ht[r+2].hlen;do{var d=e[t+0]*l+e[t+1];t+=2,i+=u[d],o+=c[d],s+=f[d]}while(to&&(i=o,p++),i>s&&(i=s,p=r+2),a.bits+=i,p}(e,t,n,o[a-1],r);default:if(a>O.IXMAX_VAL)return r.bits=O.LARGE_BITS,-1;var i,s;for(a-=15,i=24;i<32&&!(E.ht[i].linmax>=a);i++);for(s=i-8;s<24&&!(E.ht[s].linmax>=a);s++);return function(e,t,n,r,a,i){var o,s=65536*E.ht[r].xlen+E.ht[a].xlen,l=0;do{var u=e[t++],c=e[t++];0!=u&&(u>14&&(u=15,l+=s),u*=16),0!=c&&(c>14&&(c=15,l+=s),u+=c),l+=E.largetbl[u]}while(t>=16)>o&&(l=o,r=a),i.bits+=l,r}(e,t,n,s,i,r)}}function l(e,n,r,a,i,o,l,u){for(var c=n.big_values,f=2;f=c)break;var p=i[f-2]+n.count1bits;if(r.part2_3_length<=p)break;var h=new t(p),m=s(a,d,c,h);p=h.bits,r.part2_3_length<=p||(r.assign(n),r.part2_3_length=p,r.region0_count=o[f-2],r.region1_count=f-2-o[f-2],r.table_select[0]=l[f-2],r.table_select[1]=u[f-2],r.table_select[2]=m)}}this.noquant_count_bits=function(e,n,r){var a=n.l3_enc,i=Math.min(576,n.max_nonzero_coeff+2>>1<<1);for(null!=r&&(r.sfb_count1=0);i>1&&0==(a[i-1]|a[i-2]);i-=2);n.count1=i;for(var o=0,l=0;i>3;i-=4){var u;if((2147483647&(a[i-1]|a[i-2]|a[i-3]|a[i-4]))>1)break;u=2*(2*(2*a[i-4]+a[i-3])+a[i-2])+a[i-1],o+=E.t32l[u],l+=E.t33l[u]}var c=o;if(n.count1table_select=0,o>l&&(c=l,n.count1table_select=1),n.count1bits=c,n.big_values=i,0==i)return c;if(n.block_type==V.SHORT_TYPE)(o=3*e.scalefac_band.s[3])>n.big_values&&(o=n.big_values),l=n.big_values;else if(n.block_type==V.NORM_TYPE){if(o=n.region0_count=e.bv_scf[i-2],l=n.region1_count=e.bv_scf[i-1],l=e.scalefac_band.l[o+l+2],o=e.scalefac_band.l[o+1],l(l=i)&&(o=l);if(o=Math.min(o,i),l=Math.min(l,i),0l)return O.LARGE_BITS;if(function(t,n,r,o,s){var l,u,f,d=0,p=0,h=0,m=0,g=n,v=0,b=g,_=0,A=t,y=0;for(f=null!=s&&o.global_gain==s.global_gain,u=o.block_type==V.SHORT_TYPE?38:21,l=0;l<=u;l++){var w=-1;if((f||o.block_type==V.NORM_TYPE)&&(w=o.global_gain-(o.scalefac[l]+(0!=o.preflag?e.pretab[l]:0)<o.max_nonzero_coeff&&(S=o.max_nonzero_coeff-d+1,c.fill(n,o.max_nonzero_coeff,576,0),(x=S)<0&&(x=0),l=u+1),0==p&&0==h&&(b=g,_=v,A=t,y=m),null!=s&&s.sfb_count1>0&&l>=s.sfb_count1&&s.step[l]>0&&w>=s.step[l]?(0!=p&&(i(p,r,A,y,b,_),p=0,b=g,_=v,A=t,y=m),h+=x):(0!=h&&(a(h,r,A,y,b,_),h=0,b=g,_=v,A=t,y=m),p+=x),x<=0){0!=h&&(a(h,r,A,y,b,_),h=0),0!=p&&(i(p,r,A,y,b,_),p=0);break}}l<=u&&(v+=o.width[l],m+=o.width[l],d+=o.width[l])}0!=p&&(i(p,r,A,y,b,_),p=0),0!=h&&(a(h,r,A,y,b,_),h=0)}(n,s,e.IPOW20(r.global_gain),r,o),0!=(2&t.substep_shaping))for(var u=0,f=r.global_gain+r.scalefac_scale,d=.634521682242439/e.IPOW20(f),p=0;p=d?s[h]:0}return this.noquant_count_bits(t,r,o)},this.best_huffman_divide=function(e,n){var a=new L,i=n.l3_enc,o=r(23),u=r(23),c=r(23),f=r(23);if(n.block_type!=V.SHORT_TYPE||1!=e.mode_gr){a.assign(n),n.block_type==V.NORM_TYPE&&(!function(e,n,r,a,i,o,l){for(var u=n.big_values,c=0;c<=22;c++)a[c]=O.LARGE_BITS;for(c=0;c<16;c++){var f=e.scalefac_band.l[c+1];if(f>=u)break;var d=0,p=new t(d),h=s(r,0,f,p);d=p.bits;for(var m=0;m<8;m++){var g=e.scalefac_band.l[c+m+2];if(g>=u)break;var v=d,b=s(r,f,g,p=new t(v));v=p.bits,a[c+m]>v&&(a[c+m]=v,i[c+m]=c,o[c+m]=h,l[c+m]=b)}}}(e,n,i,o,u,c,f),l(e,a,n,i,o,u,c,f));var d=a.big_values;if(!(0==d||(i[d-2]|i[d-1])>1)&&!((d=n.count1+2)>576)){a.assign(n),a.count1=d;for(var p=0,h=0;d>a.big_values;d-=4){var m=2*(2*(2*i[d-4]+i[d-3])+i[d-2])+i[d-1];p+=E.t32l[m],h+=E.t33l[m]}if(a.big_values=d,a.count1table_select=0,p>h&&(p=h,a.count1table_select=1),a.count1bits=p,a.block_type==V.NORM_TYPE)l(e,a,n,i,o,u,c,f);else{if(a.part2_3_length=p,(p=e.scalefac_band.l[8])>d&&(p=d),p>0){var g=new t(a.part2_3_length);a.table_select[0]=s(i,0,p,g),a.part2_3_length=g.bits}if(d>p){g=new t(a.part2_3_length);a.table_select[1]=s(i,p,d,g),a.part2_3_length=g.bits}n.part2_3_length>a.part2_3_length&&n.assign(a)}}}};var u=[1,1,1,1,8,2,2,2,4,4,4,8,8,8,16,16],d=[1,2,4,8,1,2,4,8,2,4,8,2,4,8,4,8],p=[0,0,0,0,3,1,1,1,2,2,2,3,3,3,4,4],h=[0,1,2,3,0,1,2,3,1,2,3,1,2,3,2,3];b.slen1_tab=p,b.slen2_tab=h,this.best_scalefac_store=function(t,n,r,a){var i,o,s,l,c=a.tt[n][r],f=0;for(s=0,i=0;i0&&(g|=c.scalefac[i]);if(0==(1&g)&&0!=g){for(i=0;i0&&(c.scalefac[i]>>=1);c.scalefac_scale=f=1}}if(0==c.preflag&&c.block_type!=V.SHORT_TYPE&&2==t.mode_gr){for(i=11;i0&&(c.scalefac[i]-=e.pretab[i]);c.preflag=f=1}}for(o=0;o<4;o++)a.scfsi[r][o]=0;for(2==t.mode_gr&&1==n&&a.tt[0][r].block_type!=V.SHORT_TYPE&&a.tt[1][r].block_type!=V.SHORT_TYPE&&(!function(e,t){for(var n,r=t.tt[1][e],a=t.tt[0][e],i=0;i=0);n++);if(n==E.scfsi_band[i+1]){for(n=E.scfsi_band[i];nf&&(r.part2_length=f,r.scalefac_compress=i)}}(r,a),f=0),i=0;ia[n]&&(t.part2_length=a[n],t.scalefac_compress=n);return t.part2_length==O.LARGE_BITS};var _=[[15,15,7,7],[15,15,7,0],[7,3,0,0],[15,31,31,0],[7,7,7,0],[3,3,0,0]];this.scale_bitcount_lsf=function(t,n){var a,i,o,s,l,u,c,d,p=r(4),h=n.scalefac;for(a=0!=n.preflag?2:0,c=0;c<4;c++)p[c]=0;if(n.block_type==V.SHORT_TYPE){i=1;var m=e.nr_of_sfb_block[a][i];for(d=0,o=0;o<4;o++)for(s=m[o]/3,c=0;cp[o]&&(p[o]=h[3*d+l])}else{i=0;m=e.nr_of_sfb_block[a][i];for(d=0,o=0;o<4;o++)for(s=m[o],c=0;cp[o]&&(p[o]=h[d])}for(u=!1,o=0;o<4;o++)p[o]>_[a][o]&&(u=!0);if(!u){var g,v,b,y;for(n.sfb_partition_table=e.nr_of_sfb_block[a][i],o=0;o<4;o++)n.slen[o]=A[p[o]];switch(g=n.slen[0],v=n.slen[1],b=n.slen[2],y=n.slen[3],a){case 0:n.scalefac_compress=(5*g+v<<4)+(b<<2)+y;break;case 1:n.scalefac_compress=400+(5*g+v<<2)+b;break;case 2:n.scalefac_compress=500+3*g+v;break;default:f.err.printf("intensity stereo not implemented yet\n")}}if(!u)for(n.part2_length=0,o=0;o<4;o++)n.part2_length+=n.slen[o]*n.sfb_partition_table[o];return u};var A=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];this.huffman_init=function(e){for(var t=2;t<=576;t+=2){for(var r,a=0;e.scalefac_band.l[++a]t;)r--;for(r<0&&(r=n[a][0]),e.bv_scf[t-2]=r,r=n[a][1];e.scalefac_band.l[r+e.bv_scf[t-2]+2]>t;)r--;r<0&&(r=n[a][1]),e.bv_scf[t-1]=r}}}function _(){var e=64.82,t=(_.YULE_ORDER,.95),n=(_.MAX_SAMP_FREQ,_.RMS_WINDOW_TIME_NUMERATOR),r=_.RMS_WINDOW_TIME_DENOMINATOR,a=(_.MAX_SAMPLES_PER_WINDOW,[[.038575994352,-3.84664617118067,-.02160367184185,7.81501653005538,-.00123395316851,-11.34170355132042,-9291677959e-14,13.05504219327545,-.01655260341619,-12.28759895145294,.02161526843274,9.4829380631979,-.02074045215285,-5.87257861775999,.00594298065125,2.75465861874613,.00306428023191,-.86984376593551,.00012025322027,.13919314567432,.00288463683916],[.0541865640643,-3.47845948550071,-.02911007808948,6.36317777566148,-.00848709379851,-8.54751527471874,-.00851165645469,9.4769360780128,-.00834990904936,-8.81498681370155,.02245293253339,6.85401540936998,-.02596338512915,-4.39470996079559,.01624864962975,2.19611684890774,-.00240879051584,-.75104302451432,.00674613682247,.13149317958808,-.00187763777362],[.15457299681924,-2.37898834973084,-.09331049056315,2.84868151156327,-.06247880153653,-2.64577170229825,.02163541888798,2.23697657451713,-.05588393329856,-1.67148153367602,.04781476674921,1.00595954808547,.00222312597743,-.45953458054983,.03174092540049,.16378164858596,-.01390589421898,-.05032077717131,.00651420667831,.0234789740702,-.00881362733839],[.30296907319327,-1.61273165137247,-.22613988682123,1.0797749225997,-.08587323730772,-.2565625775407,.03282930172664,-.1627671912044,-.00915702933434,-.22638893773906,-.02364141202522,.39120800788284,-.00584456039913,-.22138138954925,.06276101321749,.04500235387352,-828086748e-14,.02005851806501,.00205861885564,.00302439095741,-.02950134983287],[.33642304856132,-1.49858979367799,-.2557224142557,.87350271418188,-.11828570177555,.12205022308084,.11921148675203,-.80774944671438,-.07834489609479,.47854794562326,-.0046997791438,-.12453458140019,-.0058950022444,-.04067510197014,.05724228140351,.08333755284107,.00832043980773,-.04237348025746,-.0163538138454,.02977207319925,-.0176017656815],[.4491525660845,-.62820619233671,-.14351757464547,.29661783706366,-.22784394429749,-.372563729424,-.01419140100551,.00213767857124,.04078262797139,-.42029820170918,-.12398163381748,.22199650564824,.04097565135648,.00613424350682,.10478503600251,.06747620744683,-.01863887810927,.05784820375801,-.03193428438915,.03222754072173,.00541907748707],[.56619470757641,-1.04800335126349,-.75464456939302,.29156311971249,.1624213774223,-.26806001042947,.16744243493672,.00819999645858,-.18901604199609,.45054734505008,.3093178284183,-.33032403314006,-.27562961986224,.0673936833311,.00647310677246,-.04784254229033,.08647503780351,.01639907836189,-.0378898455484,.01807364323573,-.00588215443421],[.58100494960553,-.51035327095184,-.53174909058578,-.31863563325245,-.14289799034253,-.20256413484477,.17520704835522,.1472815413433,.02377945217615,.38952639978999,.15558449135573,-.23313271880868,-.25344790059353,-.05246019024463,.01628462406333,-.02505961724053,.06920467763959,.02442357316099,-.03721611395801,.01818801111503,-.00749618797172],[.53648789255105,-.2504987195602,-.42163034350696,-.43193942311114,-.00275953611929,-.03424681017675,.04267842219415,-.04678328784242,-.10214864179676,.26408300200955,.14590772289388,.15113130533216,-.02459864859345,-.17556493366449,-.11202315195388,-.18823009262115,-.04060034127,.05477720428674,.0478866554818,.0470440968812,-.02217936801134]]),i=[[.98621192462708,-1.97223372919527,-1.97242384925416,.97261396931306,.98621192462708],[.98500175787242,-1.96977855582618,-1.97000351574484,.9702284756635,.98500175787242],[.97938932735214,-1.95835380975398,-1.95877865470428,.95920349965459,.97938932735214],[.97531843204928,-1.95002759149878,-1.95063686409857,.95124613669835,.97531843204928],[.97316523498161,-1.94561023566527,-1.94633046996323,.94705070426118,.97316523498161],[.96454515552826,-1.92783286977036,-1.92909031105652,.93034775234268,.96454515552826],[.96009142950541,-1.91858953033784,-1.92018285901082,.92177618768381,.96009142950541],[.95856916599601,-1.9154210807478,-1.91713833199203,.91885558323625,.95856916599601],[.94597685600279,-1.88903307939452,-1.89195371200558,.89487434461664,.94597685600279]];function o(e,t,n,r,a,i){for(;0!=a--;)n[r]=1e-10+e[t+0]*i[0]-n[r-1]*i[1]+e[t-1]*i[2]-n[r-2]*i[3]+e[t-2]*i[4]-n[r-3]*i[5]+e[t-3]*i[6]-n[r-4]*i[7]+e[t-4]*i[8]-n[r-5]*i[9]+e[t-5]*i[10]-n[r-6]*i[11]+e[t-6]*i[12]-n[r-7]*i[13]+e[t-7]*i[14]-n[r-8]*i[15]+e[t-8]*i[16]-n[r-9]*i[17]+e[t-9]*i[18]-n[r-10]*i[19]+e[t-10]*i[20],++r,++t}function s(e,t,n,r,a,i){for(;0!=a--;)n[r]=e[t+0]*i[0]-n[r-1]*i[1]+e[t-1]*i[2]-n[r-2]*i[3]+e[t-2]*i[4],++r,++t}function l(e){return e*e}this.InitGainAnalysis=function(e,t){return function(e,t){for(var a=0;a0;){b=v>e.sampleWindow-e.totsamp?e.sampleWindow-e.totsamp:v,AMAX_ORDER-A&&(b=MAX_ORDER-A)):(p=n+A,h=t,m=u+A,g=r),o(h,p,e.lstepbuf,e.lstep+e.totsamp,b,a[e.reqindex]),o(g,m,e.rstepbuf,e.rstep+e.totsamp,b,a[e.reqindex]),s(e.lstepbuf,e.lstep+e.totsamp,e.loutbuf,e.lout+e.totsamp,b,i[e.reqindex]),s(e.rstepbuf,e.rstep+e.totsamp,e.routbuf,e.rout+e.totsamp,b,i[e.reqindex]),p=e.lout+e.totsamp,h=e.loutbuf,m=e.rout+e.totsamp,g=e.routbuf;for(var y=b%8;0!=y--;)e.lsum+=l(h[p++]),e.rsum+=l(g[m++]);for(y=b/8;0!=y--;)e.lsum+=l(h[p+0])+l(h[p+1])+l(h[p+2])+l(h[p+3])+l(h[p+4])+l(h[p+5])+l(h[p+6])+l(h[p+7]),p+=8,e.rsum+=l(g[m+0])+l(g[m+1])+l(g[m+2])+l(g[m+3])+l(g[m+4])+l(g[m+5])+l(g[m+6])+l(g[m+7]),m+=8;if(v-=b,A+=b,e.totsamp+=b,e.totsamp==e.sampleWindow){var w=10*_.STEPS_per_dB*Math.log10((e.lsum+e.rsum)/e.totsamp*.5+1e-37),S=w<=0?0:0|w;S>=e.A.length&&(S=e.A.length-1),e.A[S]++,e.lsum=e.rsum=0,f.arraycopy(e.loutbuf,e.totsamp,e.loutbuf,0,MAX_ORDER),f.arraycopy(e.routbuf,e.totsamp,e.routbuf,0,MAX_ORDER),f.arraycopy(e.lstepbuf,e.totsamp,e.lstepbuf,0,MAX_ORDER),f.arraycopy(e.rstepbuf,e.totsamp,e.rstepbuf,0,MAX_ORDER),e.totsamp=0}if(e.totsamp>e.sampleWindow)return GAIN_ANALYSIS_ERROR}return c0&&!((o-=n[a])<=0););return e-a/_.STEPS_per_dB}(n.A,n.A.length),a=0;at&&(n=-1,t=0);90||(e.quant_comp=u.quant_comp),0!=n?e.quant_comp_short=u.quant_comp_s:Math.abs(e.quant_comp_short- -1)>0||(e.quant_comp_short=u.quant_comp_s),0!=u.expY&&(e.experimentalY=0!=u.expY),0!=n?e.internal_flags.nsPsy.attackthre=u.st_lrm:Math.abs(e.internal_flags.nsPsy.attackthre- -1)>0||(e.internal_flags.nsPsy.attackthre=u.st_lrm),0!=n?e.internal_flags.nsPsy.attackthre_s=u.st_s:Math.abs(e.internal_flags.nsPsy.attackthre_s- -1)>0||(e.internal_flags.nsPsy.attackthre_s=u.st_s),0!=n?e.maskingadjust=u.masking_adj:Math.abs(e.maskingadjust-0)>0||(e.maskingadjust=u.masking_adj),0!=n?e.maskingadjust_short=u.masking_adj_short:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=u.masking_adj_short),0!=n?e.ATHlower=-u.ath_lower/10:Math.abs(10*-e.ATHlower-0)>0||(e.ATHlower=-u.ath_lower/10),0!=n?e.ATHcurve=u.ath_curve:Math.abs(e.ATHcurve- -1)>0||(e.ATHcurve=u.ath_curve),0!=n?e.athaa_sensitivity=u.ath_sensitivity:Math.abs(e.athaa_sensitivity- -1)>0||(e.athaa_sensitivity=u.ath_sensitivity),u.interch>0&&(0!=n?e.interChRatio=u.interch:Math.abs(e.interChRatio- -1)>0||(e.interChRatio=u.interch)),u.safejoint>0&&(e.exp_nspsytune=e.exp_nspsytune|u.safejoint),u.sfb21mod>0&&(e.exp_nspsytune=e.exp_nspsytune|u.sfb21mod<<20),0!=n?e.msfix=u.msfix:Math.abs(e.msfix- -1)>0||(e.msfix=u.msfix),0==n&&(e.VBR_q=t,e.VBR_q_frac=o)}var o=[new t(8,9,9,0,0,6.6,145,0,.95,0,-30,11,.0012,1),new t(16,9,9,0,0,6.6,145,0,.95,0,-25,11,.001,1),new t(24,9,9,0,0,6.6,145,0,.95,0,-20,11,.001,1),new t(32,9,9,0,0,6.6,145,0,.95,0,-15,11,.001,1),new t(40,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new t(48,9,9,0,0,6.6,145,0,.95,0,-10,11,9e-4,1),new t(56,9,9,0,0,6.6,145,0,.95,0,-6,11,8e-4,1),new t(64,9,9,0,0,6.6,145,0,.95,0,-2,11,8e-4,1),new t(80,9,9,0,0,6.6,145,0,.95,0,0,8,7e-4,1),new t(96,9,9,0,2.5,6.6,145,0,.95,0,1,5.5,6e-4,1),new t(112,9,9,0,2.25,6.6,145,0,.95,0,2,4.5,5e-4,1),new t(128,9,9,0,1.95,6.4,140,0,.95,0,3,4,2e-4,1),new t(160,9,9,1,1.79,6,135,0,.95,-2,5,3.5,0,1),new t(192,9,9,1,1.49,5.6,125,0,.97,-4,7,3,0,0),new t(224,9,9,1,1.25,5.2,125,0,.98,-6,9,2,0,0),new t(256,9,9,1,.97,5.2,125,0,1,-8,10,1,0,0),new t(320,9,9,1,.9,5.2,125,0,1,-10,12,0,0,0)];function s(e,t,r){var a=t,i=n.nearestBitrateFullIndex(t);if(e.VBR=m.vbr_abr,e.VBR_mean_bitrate_kbps=a,e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,320),e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.brate=e.VBR_mean_bitrate_kbps,e.VBR_mean_bitrate_kbps>320&&(e.disable_reservoir=!0),o[i].safejoint>0&&(e.exp_nspsytune=2|e.exp_nspsytune),o[i].sfscale>0&&(e.internal_flags.noise_shaping=2),Math.abs(o[i].nsbass)>0){var s=int(4*o[i].nsbass);s<0&&(s+=64),e.exp_nspsytune=e.exp_nspsytune|s<<2}return 0!=r?e.quant_comp=o[i].quant_comp:Math.abs(e.quant_comp- -1)>0||(e.quant_comp=o[i].quant_comp),0!=r?e.quant_comp_short=o[i].quant_comp_s:Math.abs(e.quant_comp_short- -1)>0||(e.quant_comp_short=o[i].quant_comp_s),0!=r?e.msfix=o[i].nsmsfix:Math.abs(e.msfix- -1)>0||(e.msfix=o[i].nsmsfix),0!=r?e.internal_flags.nsPsy.attackthre=o[i].st_lrm:Math.abs(e.internal_flags.nsPsy.attackthre- -1)>0||(e.internal_flags.nsPsy.attackthre=o[i].st_lrm),0!=r?e.internal_flags.nsPsy.attackthre_s=o[i].st_s:Math.abs(e.internal_flags.nsPsy.attackthre_s- -1)>0||(e.internal_flags.nsPsy.attackthre_s=o[i].st_s),0!=r?e.scale=o[i].scale:Math.abs(e.scale- -1)>0||(e.scale=o[i].scale),0!=r?e.maskingadjust=o[i].masking_adj:Math.abs(e.maskingadjust-0)>0||(e.maskingadjust=o[i].masking_adj),o[i].masking_adj>0?0!=r?e.maskingadjust_short=.9*o[i].masking_adj:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=.9*o[i].masking_adj):0!=r?e.maskingadjust_short=1.1*o[i].masking_adj:Math.abs(e.maskingadjust_short-0)>0||(e.maskingadjust_short=1.1*o[i].masking_adj),0!=r?e.ATHlower=-o[i].ath_lower/10:Math.abs(10*-e.ATHlower-0)>0||(e.ATHlower=-o[i].ath_lower/10),0!=r?e.ATHcurve=o[i].ath_curve:Math.abs(e.ATHcurve- -1)>0||(e.ATHcurve=o[i].ath_curve),0!=r?e.interChRatio=o[i].interch:Math.abs(e.interChRatio- -1)>0||(e.interChRatio=o[i].interch),t}this.apply_preset=function(e,t,n){switch(t){case q.R3MIX:t=q.V3,e.VBR=m.vbr_mtrh;break;case q.MEDIUM:t=q.V4,e.VBR=m.vbr_rh;break;case q.MEDIUM_FAST:t=q.V4,e.VBR=m.vbr_mtrh;break;case q.STANDARD:t=q.V2,e.VBR=m.vbr_rh;break;case q.STANDARD_FAST:t=q.V2,e.VBR=m.vbr_mtrh;break;case q.EXTREME:t=q.V0,e.VBR=m.vbr_rh;break;case q.EXTREME_FAST:t=q.V0,e.VBR=m.vbr_mtrh;break;case q.INSANE:return t=320,e.preset=t,s(e,t,n),e.VBR=m.vbr_off,t}switch(e.preset=t,t){case q.V9:return i(e,9,n),t;case q.V8:return i(e,8,n),t;case q.V7:return i(e,7,n),t;case q.V6:return i(e,6,n),t;case q.V5:return i(e,5,n),t;case q.V4:return i(e,4,n),t;case q.V3:return i(e,3,n),t;case q.V2:return i(e,2,n),t;case q.V1:return i(e,1,n),t;case q.V0:return i(e,0,n),t}return 8<=t&&t<=320?s(e,t,n):(e.preset=0,t)}}function y(){var e;this.setModules=function(t){e=t},this.ResvFrameBegin=function(t,n){var r,a=t.internal_flags,i=a.l3_side,o=e.getframebits(t);n.bits=(o-8*a.sideinfo_len)/a.mode_gr;var s=2048*a.mode_gr-8;t.brate>320?r=8*int(1e3*t.brate/(t.out_samplerate/1152)/8+.5):(r=11520,t.strict_ISO&&(r=8*int(32e4/(t.out_samplerate/1152)/8+.5))),a.ResvMax=r-o,a.ResvMax>s&&(a.ResvMax=s),(a.ResvMax<0||t.disable_reservoir)&&(a.ResvMax=0);var l=n.bits*a.mode_gr+Math.min(a.ResvSize,a.ResvMax);return l>r&&(l=r),i.resvDrain_pre=0,null!=a.pinfo&&(a.pinfo.mean_bits=n.bits/2,a.pinfo.resvsize=a.ResvSize),l},this.ResvMaxBits=function(e,t,n,r){var a,i=e.internal_flags,o=i.ResvSize,s=i.ResvMax;0!=r&&(o+=t),0!=(1&i.substep_shaping)&&(s*=.9),n.bits=t,10*o>9*s?(a=o-9*s/10,n.bits+=a,i.substep_shaping|=128):(a=0,i.substep_shaping&=127,e.disable_reservoir||0!=(1&i.substep_shaping)||(n.bits-=.1*t));var l=o<6*i.ResvMax/10?o:6*i.ResvMax/10;return(l-=a)<0&&(l=0),l},this.ResvAdjust=function(e,t){e.ResvSize-=t.part2_3_length+t.part2_length},this.ResvFrameEnd=function(e,t){var n,r=e.l3_side;e.ResvSize+=t*e.mode_gr;var a=0;r.resvDrain_post=0,r.resvDrain_pre=0,0!=(n=e.ResvSize%8)&&(a+=n),(n=e.ResvSize-a-e.ResvMax)>0&&(a+=n);var i=Math.min(8*r.main_data_begin,a)/8;r.resvDrain_pre+=8*i,a-=8*i,e.ResvSize-=8*i,r.main_data_begin-=i,r.resvDrain_post+=a,e.ResvSize-=a}}function w(){var e,n,r;this.setModules=function(t,a,i){e=t,n=a,r=i};var a=w.NUMTOCENTRIES,i=w.MAXFRAMESIZE,o=a+4+4+4+4+4+9+1+1+8+1+1+3+1+1+2+4+2+2,s=128,l=64,u=32,d=null,h="Xing",g="Info",v=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];function b(e,t){var n=255&e[t+0];return n<<=8,n|=255&e[t+1],n<<=8,n|=255&e[t+2],n<<=8,n|=255&e[t+3]}function _(e,t,n){e[t+0]=255&n>>24,e[t+1]=255&n>>16,e[t+2]=255&n>>8,e[t+3]=255&n}function A(e,t,n){e[t+0]=255&n>>8,e[t+1]=255&n}function y(e,t,n){return 255&(e<>8^v[255&(t^e)]}this.addVbrFrame=function(e){var t=e.internal_flags,n=E.bitrate_table[e.version][t.bitrate_index];!function(e,t){if(e.nVbrNumFrames++,e.sum+=t,e.seen++,!(e.seen>3&1,i=e[n+2]>>2&3,o=e[n+3]>>6&3,s=e[n+2]>>4&15;if(s=E.bitrate_table[r][s],e[n+1]>>4==14?t.samprate=E.samplerate_table[2][i]:t.samprate=E.samplerate_table[r][i],!function(e,t){return new String(e,t,h.length(),d).equals(h)||new String(e,t,g.length(),d).equals(g)}(e,n+=0!=r?3!=o?36:21:3!=o?21:13))return null;n+=4,t.hId=r;var l=t.flags=b(e,n);if(n+=4,0!=(1&l)&&(t.frames=b(e,n),n+=4),0!=(2&l)&&(t.bytes=b(e,n),n+=4),0!=(4&l)){if(null!=t.toc)for(var u=0;u>4;var f=(15&e[n+1])<<8;return(c<0||c>3e3)&&(c=-1),((f+=255&e[n+2])<0||f>3e3)&&(f=-1),t.encDelay=c,t.encPadding=f,t},this.InitVbrTag=function(e){var r,a=e.internal_flags;r=1==e.version?s:e.out_samplerate<16e3?u:l,e.VBR==m.vbr_off&&(r=e.brate);var c=72e3*(e.version+1)*r/e.out_samplerate,f=a.sideinfo_len+o;if(a.VBR_seek_table.TotalFrameSize=c,ci)e.bWriteVbrTag=!1;else{a.VBR_seek_table.nVbrNumFrames=0,a.VBR_seek_table.nBytesWritten=0,a.VBR_seek_table.sum=0,a.VBR_seek_table.seen=0,a.VBR_seek_table.want=1,a.VBR_seek_table.pos=0,null==a.VBR_seek_table.bag&&(a.VBR_seek_table.bag=new int[400],a.VBR_seek_table.size=400);var d=t(i);S(e,d);for(var p=a.VBR_seek_table.TotalFrameSize,h=0;he.pos-1&&(i=e.pos-1);var o=0|256*e.bag[i]/e.sum;o>255&&(o=255),t[n]=255&o}}(o.VBR_seek_table,s);var u=o.sideinfo_len;e.error_protection&&(u-=2),e.VBR==m.vbr_off?(i[u++]=255&g.charAt(0),i[u++]=255&g.charAt(1),i[u++]=255&g.charAt(2),i[u++]=255&g.charAt(3)):(i[u++]=255&h.charAt(0),i[u++]=255&h.charAt(1),i[u++]=255&h.charAt(2),i[u++]=255&h.charAt(3)),_(i,u,15),_(i,u+=4,o.VBR_seek_table.nVbrNumFrames),u+=4;var d=o.VBR_seek_table.nBytesWritten+o.VBR_seek_table.TotalFrameSize;_(i,u,0|d),u+=4,f.arraycopy(s,0,i,u,s.length),u+=s.length,e.error_protection&&n.CRC_writeheader(o,i);var v=0;for(l=0;l255?255:e.lowpassfreq/100+.5),w=0,S=0,E=e.internal_flags.noise_shaping,k=0,B=0,R=0,C=0!=(1&e.exp_nspsytune),M=0!=(2&e.exp_nspsytune),T=!1,I=!1,P=e.internal_flags.nogap_total,O=e.internal_flags.nogap_current,N=e.ATHtype;switch(e.VBR){case vbr_abr:c=e.VBR_mean_bitrate_kbps;break;case vbr_off:c=e.brate;break;default:c=e.VBR_min_bitrate_kbps}switch(o=0+(e.VBR.ordinal()510&&(f.RadioGain=510),f.RadioGain<-510&&(f.RadioGain=-510),S=8192,S|=3072,f.RadioGain>=0?S|=f.RadioGain:(S|=512,S|=-f.RadioGain)),f.findPeakSample&&(w=Math.abs(0|f.PeakSample/32767*Math.pow(2,23)+.5)),-1!=P&&(O>0&&(I=!0),O48e3?3:1,(e.short_blocks==p.short_block_forced||e.short_blocks==p.short_block_dispensed||-1==e.lowpassfreq&&-1==e.highpassfreq||e.scale_lefte.scale_right||e.disable_reservoir&&e.brate<320||e.noATH||e.ATHonly||0==N||e.in_samplerate<=32e3)&&(B=1),s=E+(k<<2)+(B<<5)+(R<<6),l=f.nMusicCRC,_(n,a+d,g),d+=4;for(var L=0;L<9;L++)n[a+d+L]=255&v.charAt(L);n[a+(d+=9)]=255&o,n[a+ ++d]=255&y,_(n,a+ ++d,w),A(n,a+(d+=4),S),A(n,a+(d+=2),0),n[a+(d+=2)]=255&u,n[a+ ++d]=c>=255?255:255&c,n[a+ ++d]=255&h>>4,n[a+d+1]=255&(h<<4)+(m>>8),n[a+d+2]=255&m,n[a+(d+=3)]=255&s,d++,n[a+d++]=0,A(n,a+d,e.preset),_(n,a+(d+=2),t),A(n,a+(d+=4),l),d+=2;for(var j=0;ja.length?-1:(o<1||n.write(a,0,o),0)}}function S(){var e=this,n=32773,a=null,i=null,s=null,l=null;this.setModules=function(e,t,n,r){a=e,i=t,s=n,l=r};var u=null,d=0,p=0,h=0;function m(e){f.arraycopy(e.header[e.w_ptr].buf,0,u,p,e.sideinfo_len),p+=e.sideinfo_len,d+=8*e.sideinfo_len,e.w_ptr=e.w_ptr+1&G.MAX_HEADER_BUF-1}function g(e,t,n){for(;n>0;){var r;0==h&&(h=8,p++,e.header[e.w_ptr].write_timing==d&&m(e),u[p]=0),n-=r=Math.min(n,h),h-=r,u[p]|=t>>n<0;){var r;0==h&&(h=8,p++,u[p]=0),n-=r=Math.min(n,h),h-=r,u[p]|=t>>n<=8&&(g(r,76,8),t-=8),t>=8&&(g(r,65,8),t-=8),t>=8&&(g(r,77,8),t-=8),t>=8&&(g(r,69,8),t-=8),t>=32){var a=s.getLameShortVersion();if(t>=32)for(n=0;n=8;++n)t-=8,g(r,a.charAt(n),8)}for(;t>=1;t-=1)g(r,r.ancillary_flag,1),r.ancillary_flag^=e.disable_reservoir?0:1}function y(e,t,n){for(var r=e.header[e.h_ptr].ptr;n>0;){var a=Math.min(n,8-(7&r));n-=a,e.header[e.h_ptr].buf[r>>3]|=t>>n<<8-(7&r)-a,r+=a}e.header[e.h_ptr].ptr=r}function w(e,t){e<<=8;for(var r=0;r<8;r++)0!=(65536&((t<<=1)^(e<<=1)))&&(t^=n);return t}function S(e,t){var n,r=E.ht[t.count1table_select+32],a=0,i=t.big_values,o=t.big_values;for(n=(t.count1-t.big_values)/4;n>0;--n){var s=0,l=0;0!=t.l3_enc[i+0]&&(l+=8,t.xr[o+0]<0&&s++),0!=t.l3_enc[i+1]&&(l+=4,s*=2,t.xr[o+1]<0&&s++),0!=t.l3_enc[i+2]&&(l+=2,s*=2,t.xr[o+2]<0&&s++),0!=t.l3_enc[i+3]&&(l++,s*=2,t.xr[o+3]<0&&s++),i+=4,o+=4,g(e,s+r.table[l],r.hlen[l]),a+=r.hlen[l]}return a}function x(e,t,n,r,a){var i=E.ht[t],o=0;if(0==t)return o;for(var s=n;s15){if(p>14)d|=p-15<<1,u=c,p=15;if(h>14)d<<=c,d|=h-15,u+=c,h=15;f=16}0!=h&&(d<<=1,a.xr[s+1]<0&&d++,l--),p=p*f+h,u-=l,l+=i.hlen[p],g(e,i.table[p],l),g(e,d,u),o+=l+u}return o}function k(e,t){var n=3*e.scalefac_band.s[3];n>t.big_values&&(n=t.big_values);var r=x(e,t.table_select[0],0,n,t);return r+=x(e,t.table_select[1],n,t.big_values,t)}function B(e,t){var n,r,a,i;n=t.big_values;var o=t.region0_count+1;return a=e.scalefac_band.l[o],o+=t.region1_count+1,a>n&&(a=n),(i=e.scalefac_band.l[o])>n&&(i=n),r=x(e,t.table_select[0],0,a,t),r+=x(e,t.table_select[1],a,i,t),r+=x(e,t.table_select[2],i,n,t)}function R(){this.total=0}function C(t,n){var r,a,i,o,s,l=t.internal_flags;return s=l.w_ptr,-1==(o=l.h_ptr-1)&&(o=G.MAX_HEADER_BUF-1),r=l.header[o].write_timing-d,n.total=r,r>=0&&(a=1+o-s,o>8),t[5]=byte(255&n)},this.flush_bitstream=function(e){var t,n,r=e.internal_flags,i=r.h_ptr-1;if(-1==i&&(i=G.MAX_HEADER_BUF-1),t=r.l3_side,!((n=C(e,new R))<0)){if(A(e,n),r.ResvSize=0,t.main_data_begin=0,r.findReplayGain){var o=a.GetTitleGain(r.rgdata);r.RadioGain=0|Math.floor(10*o+.5)}r.findPeakSample&&(r.noclipGainChange=0|Math.ceil(20*Math.log10(r.PeakSample/32767)*10),r.noclipGainChange>0&&(EQ(e.scale,1)||EQ(e.scale,0))?r.noclipScale=Math.floor(32767/r.PeakSample*100)/100:r.noclipScale=-1)}},this.add_dummy_byte=function(e,t,n){for(var r,a=e.internal_flags;n-- >0;)for(v(0,t,8),r=0;r ResvSize"),8*t.main_data_begin!=n.ResvSize&&(f.err.printf("bit reservoir error: \nl3_side.main_data_begin: %d \nResvoir size: %d \nresv drain (post) %d \nresv drain (pre) %d \nheader and sideinfo: %d \ndata bits: %d \ntotal bits: %d (remainder: %d) \nbitsperframe: %d \n",8*t.main_data_begin,n.ResvSize,t.resvDrain_post,t.resvDrain_pre,8*n.sideinfo_len,a-t.resvDrain_post-8*n.sideinfo_len,a,a%8,r),f.err.println("This is a fatal error. It has several possible causes:"),f.err.println("90%% LAME compiled with buggy version of gcc using advanced optimizations"),f.err.println(" 9%% Your system is overclocked"),f.err.println(" 1%% bug in LAME encoding library"),n.ResvSize=8*t.main_data_begin),d>1e9){var i;for(i=0;is)return-1;if(f.arraycopy(u,0,t,n,d),p=-1,h=0,0!=c){var m=r(1);if(m[0]=e.nMusicCRC,l.updateMusicCRC(m,t,n,d),e.nMusicCRC=m[0],d>0&&(e.VBR_seek_table.nBytesWritten+=d),e.decode_on_the_fly)for(var g,v=o([2,1152]),b=d,A=-1;0!=A;)if(A=i.hip_decode1_unclipped(e.hip,t,n,b,v[0],v[1]),b=0,-1==A&&(A=0),A>0){if(e.findPeakSample){for(g=0;ge.PeakSample?e.PeakSample=v[0][g]:-v[0][g]>e.PeakSample&&(e.PeakSample=-v[0][g]);if(e.channels_out>1)for(g=0;ge.PeakSample?e.PeakSample=v[1][g]:-v[1][g]>e.PeakSample&&(e.PeakSample=-v[1][g])}if(e.findReplayGain&&a.AnalyzeSamples(e.rgdata,v[0],0,v[1],0,A,e.channels_out)==_.GAIN_ANALYSIS_ERROR)return-6}}return d},this.init_bit_stream_w=function(e){u=t(q.LAME_MAXMP3BUFFER),e.h_ptr=e.w_ptr=0,e.header[e.h_ptr].write_timing=0,p=-1,h=0,d=0}}function x(e,t,n,r){this.xlen=e,this.linmax=t,this.table=n,this.hlen=r}g.STEREO=new g(0),g.JOINT_STEREO=new g(1),g.DUAL_CHANNEL=new g(2),g.MONO=new g(3),g.NOT_SET=new g(4),_.STEPS_per_dB=100,_.MAX_dB=120,_.GAIN_NOT_ENOUGH_SAMPLES=-24601,_.GAIN_ANALYSIS_ERROR=0,_.GAIN_ANALYSIS_OK=1,_.INIT_GAIN_ANALYSIS_ERROR=0,_.INIT_GAIN_ANALYSIS_OK=1,_.YULE_ORDER=10,_.MAX_ORDER=_.YULE_ORDER,_.MAX_SAMP_FREQ=48e3,_.RMS_WINDOW_TIME_NUMERATOR=1,_.RMS_WINDOW_TIME_DENOMINATOR=20,_.MAX_SAMPLES_PER_WINDOW=_.MAX_SAMP_FREQ*_.RMS_WINDOW_TIME_NUMERATOR/_.RMS_WINDOW_TIME_DENOMINATOR+1,w.NUMTOCENTRIES=100,w.MAXFRAMESIZE=2880,S.EQ=function(e,t){return Math.abs(e)>Math.abs(t)?Math.abs(e-t)<=1e-6*Math.abs(e):Math.abs(e-t)<=1e-6*Math.abs(t)},S.NEQ=function(e,t){return!S.EQ(e,t)};var E={};function k(e){this.bits=e}function B(){this.over_noise=0,this.tot_noise=0,this.max_noise=0,this.over_count=0,this.over_SSD=0,this.bits=0}function R(){this.setModules=function(e,t){e,t}}function C(){this.useAdjust=0,this.aaSensitivityP=0,this.adjust=0,this.adjustLimit=0,this.decay=0,this.floor=0,this.l=a(V.SBMAX_l),this.s=a(V.SBMAX_s),this.psfb21=a(V.PSFB21),this.psfb12=a(V.PSFB12),this.cb_l=a(V.CBANDS),this.cb_s=a(V.CBANDS),this.eql_w=a(V.BLKSIZE/2)}function M(){this.class_id=0,this.num_samples=0,this.num_channels=0,this.in_samplerate=0,this.out_samplerate=0,this.scale=0,this.scale_left=0,this.scale_right=0,this.analysis=!1,this.bWriteVbrTag=!1,this.decode_only=!1,this.quality=0,this.mode=g.STEREO,this.force_ms=!1,this.free_format=!1,this.findReplayGain=!1,this.decode_on_the_fly=!1,this.write_id3tag_automatic=!1,this.brate=0,this.compression_ratio=0,this.copyright=0,this.original=0,this.extension=0,this.emphasis=0,this.error_protection=0,this.strict_ISO=!1,this.disable_reservoir=!1,this.quant_comp=0,this.quant_comp_short=0,this.experimentalY=!1,this.experimentalZ=0,this.exp_nspsytune=0,this.preset=0,this.VBR=null,this.VBR_q_frac=0,this.VBR_q=0,this.VBR_mean_bitrate_kbps=0,this.VBR_min_bitrate_kbps=0,this.VBR_max_bitrate_kbps=0,this.VBR_hard_min=0,this.lowpassfreq=0,this.highpassfreq=0,this.lowpasswidth=0,this.highpasswidth=0,this.maskingadjust=0,this.maskingadjust_short=0,this.ATHonly=!1,this.ATHshort=!1,this.noATH=!1,this.ATHtype=0,this.ATHcurve=0,this.ATHlower=0,this.athaa_type=0,this.athaa_loudapprox=0,this.athaa_sensitivity=0,this.short_blocks=null,this.useTemporal=!1,this.interChRatio=0,this.msfix=0,this.tune=!1,this.tune_value_a=0,this.version=0,this.encoder_delay=0,this.encoder_padding=0,this.framesize=0,this.frameNum=0,this.lame_allocated_gfp=0,this.internal_flags=null}function T(e){var t=e;this.quantize=t,this.iteration_loop=function(e,t,n,i){var o,s=e.internal_flags,l=a(j.SFBMAX),u=a(576),c=r(2),f=0,d=s.l3_side,p=new k(f);this.quantize.rv.ResvFrameBegin(e,p),f=p.bits;for(var h=0;h>2&63)>=32&&(n-=64),i=Math.pow(10,n/4/10),(n=t.exp_nspsytune>>8&63)>=32&&(n-=64),u=Math.pow(10,n/4/10),(n=t.exp_nspsytune>>14&63)>=32&&(n-=64),c=Math.pow(10,n/4/10),(n=t.exp_nspsytune>>20&63)>=32&&(n-=64),d=c*Math.pow(10,n/4/10),n=0;nG.MAX_BITS_PER_GRANULE&&(m=G.MAX_BITS_PER_GRANULE),l=0,u=0;u3*i/4&&(d[u]=3*i/4),d[u]<0&&(d[u]=0),d[u]+a[u]>G.MAX_BITS_PER_CHANNEL&&(d[u]=Math.max(0,G.MAX_BITS_PER_CHANNEL-a[u])),l+=d[u];if(l>h)for(u=0;uG.MAX_BITS_PER_GRANULE){for(u=0;u.5&&(a=.5);var i=0|.5*a*(e[0]+e[1]);i>G.MAX_BITS_PER_CHANNEL-e[0]&&(i=G.MAX_BITS_PER_CHANNEL-e[0]),i<0&&(i=0),e[1]>=125&&(e[1]-i>125?(e[0]r&&(e[0]=r*e[0]/i,e[1]=r*e[1]/i)},this.athAdjust=function(e,t,n){var r=90.30873362,a=d.FAST_LOG10_X(t,10),i=e*e,o=0;return a-=n,i>1e-20&&(o=1+d.FAST_LOG10_X(i,10/r)),o<0&&(o=0),a*=o,a+=n+r-94.82444863,Math.pow(10,.1*a)},this.calc_xmin=function(e,t,n,r){var a,o=0,s=e.internal_flags,l=0,u=0,c=s.ATH,f=n.xr,d=e.VBR==m.vbr_mtrh?1:0,p=s.masking_lower;for(e.VBR!=m.vbr_mtrh&&e.VBR!=m.vbr_mt||(p=1),a=0;a>1,B=0;do{B+=C=f[l]*f[l],x+=C0);if(B>y&&u++,a==V.SBPSY_l)x<(k=y*s.nsPsy.longfact[a])&&(x=k);if(0!=d&&(y=x),!e.ATHonly)if((E=t.en.l[a])>0)k=B*t.thm.l[a]*p/E,0!=d&&(k*=s.nsPsy.longfact[a]),y>1;w=A/b,x=i;do{var C,M;B+=C=f[l]*f[l],x+=C0);if(B>A&&u++,v==V.SBPSY_s)x<(k=A*s.nsPsy.shortfact[v])&&(x=k);if(y=0!=d?x:A,!e.ATHonly&&!e.ATHshort)if((E=t.en.s[v][_])>0)k=B*t.thm.s[v][_]*p/E,0!=d&&(k*=s.nsPsy.shortfact[v]),yr[o-3+1]&&(r[o-3+1]+=(r[o-3]-r[o-3+1])*s.decay),r[o-3+1]>r[o-3+2]&&(r[o-3+2]+=(r[o-3+1]-r[o-3+2])*s.decay))}return u},this.calc_noise_core=function(e,t,n,r){var i=0,o=t.s,s=e.l3_enc;if(o>e.count1)for(;0!=n--;){u=e.xr[o],o++,i+=u*u,u=e.xr[o],o++,i+=u*u}else if(o>e.big_values){var l=a(2);for(l[0]=0,l[1]=r;0!=n--;){u=Math.abs(e.xr[o])-l[s[o]],o++,i+=u*u,u=Math.abs(e.xr[o])-l[s[o]],o++,i+=u*u}}else for(;0!=n--;){var u;u=Math.abs(e.xr[o])-g[s[o]]*r,o++,i+=u*u,u=Math.abs(e.xr[o])-g[s[o]]*r,o++,i+=u*u}return t.s=o,i},this.calc_noise=function(e,t,n,r,a){var i,o,s=0,l=0,u=0,p=0,h=0,m=-20,g=0,v=e.scalefac,b=0;for(r.over_SSD=0,i=0;i>1,g+e.width[i]>e.max_nonzero_coeff)o=(S=e.max_nonzero_coeff-g+1)>0?S>>1:0;var E=new _(g);w=this.calc_noise_core(e,E,o,x),g=E.s,null!=a&&(a.step[i]=y,a.noise[i]=w),w=n[s++]=w/t[l++],w=d.FAST_LOG10(Math.max(w,1e-20)),null!=a&&(a.noise_log[i]=w)}if(null!=a&&(a.global_gain=e.global_gain),h+=w,w>0)A=Math.max(0|10*w+.5,1),r.over_SSD+=A*A,u++,p+=w;m=Math.max(m,w)}return r.over_count=u,r.tot_noise=h,r.over_noise=p,r.max_noise=m,u},this.set_pinfo=function(e,t,n,r,i){var o,s,l,u,f,d=e.internal_flags,p=0==t.scalefac_scale?.5:1,h=t.scalefac,m=a(j.SFBMAX),g=a(j.SFBMAX),v=new B;calc_xmin(e,n,t,m),calc_noise(t,m,g,v,null);var b=0;for(s=t.sfb_lmax,t.block_type!=V.SHORT_TYPE&&0==t.mixed_block_flag&&(s=22),o=0;o0&&!e.ATHonly?u/=n.en.l[o]:u=0,d.pinfo.thr[r][i][o]=f*Math.max(u*n.thm.l[o],d.ATH.l[o]),d.pinfo.LAMEsfb[r][i][o]=0,0!=t.preflag&&o>=11&&(d.pinfo.LAMEsfb[r][i][o]=-p*c[o]),o0?u/=n.en.s[o][w]:u=0,(e.ATHonly||e.ATHshort)&&(u=0),d.pinfo.thr_s[r][i][3*o+w]=f*Math.max(u*n.thm.s[o][w],d.ATH.s[o]),d.pinfo.LAMEsfb_s[r][i][3*o+w]=-2*t.subblock_gain[w],o0?(i=n.over_SSD<=t.over_SSD,n.over_SSD==t.over_SSD&&(i=n.bits.2||n.max_noise<=0&&t.max_noise<0&&t.max_noise>n.max_noise-.2&&n.tot_noise0&&t.max_noise>n.max_noise-.2&&n.tot_noise0&&t.max_noise>-.05&&t.max_noise>n.max_noise-.1&&n.tot_noise+n.over_noise0&&t.max_noise>-.1&&t.max_noise>n.max_noise-.15&&n.tot_noise+n.over_noise+n.over_noise1?s=Math.pow(s,.5):s*=.95;break;default:s>1?s=1:s*=.95}var c=0;for(l=0;lt.xrpow_max&&(t.xrpow_max=r[c+f]);if(2==o.noise_shaping_amp)return}}}(e,t,a,i,o);var u=s(t);return!u&&(!(u=2==l.mode_gr?r.scale_bitcount(t):r.scale_bitcount_lsf(l,t))||(l.noise_shaping>1&&(c.fill(l.pseudohalf,0),0==t.scalefac_scale?(!function(e,t){for(var r=0,a=0;ae.xrpow_max&&(e.xrpow_max=t[r+s])}e.scalefac[a]=o>>1}e.preflag=0,e.scalefac_scale=1}(t,i),u=!1):t.block_type==V.SHORT_TYPE&&l.subblock_gain>0&&(u=function(e,t,r){var a,i=t.scalefac;for(a=0;a=16)return!0;for(var o=0;o<3;o++){var s=0,l=0;for(a=t.sfb_lmax+o;a=7)return!0;t.subblock_gain[o]++;var u=e.scalefac_band.l[t.sfb_lmax];for(a=t.sfb_lmax+o;a>t.scalefac_scale)>=0)i[a]=f,u+=3*c;else{i[a]=0;var d=210+(f<t.xrpow_max&&(t.xrpow_max=r[u+p]);u+=c*(3-o-1)}}var h=n.IPOW20(202);for(u+=t.width[a]*(o+1),p=-t.width[a];p<0;p++)r[u+p]*=h,r[u+p]>t.xrpow_max&&(t.xrpow_max=r[u+p])}}return!1}(l,t,i)||s(t))),u||(u=2==l.mode_gr?r.scale_bitcount(t):r.scale_bitcount_lsf(l,t)),!u))}this.setModules=function(a,o,s,l){e=a,t=o,this.rv=o,n=s,this.qupvt=s,r=l,i.setModules(n,r)},this.ms_convert=function(e,t){for(var n=0;n<576;++n){var r=e.tt[t][0].xr[n],a=e.tt[t][1].xr[n];e.tt[t][0].xr[n]=(r+a)*(.5*d.SQRT2),e.tt[t][1].xr[n]=(r-a)*(.5*d.SQRT2)}},this.init_xrpow=function(e,t,n){var r=0,a=0|t.max_nonzero_coeff;if(t.xrpow_max=0,c.fill(n,a,576,0),r=function(e,t,n,r){r=0;for(var a=0;a<=n;++a){var i=Math.abs(e.xr[a]);r+=i,t[a]=Math.sqrt(i*Math.sqrt(i)),t[a]>e.xrpow_max&&(e.xrpow_max=t[a])}return r}(t,n,a,r),r>1e-20){var i=0;0!=(2&e.substep_shaping)&&(i=1);for(var o=0;o=0&&!i;o--){var s=e.scalefac_band.psfb21[o],l=e.scalefac_band.psfb21[o+1],u=n.athAdjust(r.adjust,r.psfb21[o],r.floor);e.nsPsy.longfact[21]>1e-12&&(u*=e.nsPsy.longfact[21]);for(var c=l-1;c>=s;c--){if(!(Math.abs(a[c])=0&&!i;o--){l=(s=3*e.scalefac_band.s[12]+(e.scalefac_band.s[13]-e.scalefac_band.s[12])*f+(e.scalefac_band.psfb12[o]-e.scalefac_band.psfb12[0]))+(e.scalefac_band.psfb12[o+1]-e.scalefac_band.psfb12[o]);var d=n.athAdjust(r.adjust,r.psfb12[o],r.floor);for(e.nsPsy.shortfact[12]>1e-12&&(d*=e.nsPsy.shortfact[12]),c=l-1;c>=s;c--){if(!(Math.abs(a[c])=1)&&(c.sort(o,l-g,g),!S.EQ(o[l-1],0))){d=(1-s[f])*i[f],p=0,m=0;do{var v;for(h=1;m+h0)}}while(++fn?(f==o.BINSEARCH_DOWN&&(u=!0),u&&(l/=2),f=o.BINSEARCH_UP,d=l):(f==o.BINSEARCH_UP&&(u=!0),u&&(l/=2),f=o.BINSEARCH_DOWN,d=-l),t.global_gain+=d,t.global_gain<0&&(t.global_gain=0,u=!0),t.global_gain>255&&(t.global_gain=255,u=!0)}for(;s>n&&t.global_gain<255;)t.global_gain++,s=r.count_bits(e,i,t,null);e.CurrentStep[a]=c-t.global_gain>=4?4:2,e.OldValue[a]=t.global_gain,t.part2_3_length=s}(p,t,d,c,s),0==p.noise_shaping)return 100;n.calc_noise(t,i,v,b,_),b.bits=t.part2_3_length,h.assign(t);var x=0;for(f.arraycopy(s,0,g,0,576);!y;){do{var E,k=new B,R=255;if(E=0!=(2&p.substep_shaping)?20:3,p.sfb21_extra){if(v[h.sfbmax]>1)break;if(h.block_type==V.SHORT_TYPE&&(v[h.sfbmax+1]>1||v[h.sfbmax+2]>1))break}if(!u(e,h,v,s,w))break;0!=h.scalefac_scale&&(R=254);var C=d-h.part2_length;if(C<=0)break;for(;(h.part2_3_length=r.count_bits(p,s,h,_))>C&&h.global_gain<=R;)h.global_gain++;if(h.global_gain>R)break;if(0==b.over_count){for(;(h.part2_3_length=r.count_bits(p,s,h,_))>A&&h.global_gain<=R;)h.global_gain++;if(h.global_gain>R)break}if(n.calc_noise(h,i,v,k,_),k.bits=h.part2_3_length,0!=(l(t.block_type!=V.SHORT_TYPE?e.quant_comp:e.quant_comp_short,b,k,h,v)?1:0))A=t.part2_3_length,b=k,t.assign(h),x=0,f.arraycopy(s,0,g,0,576);else if(0==p.full_outer_loop){if(++x>E&&0==b.over_count)break;if(3==p.noise_shaping_amp&&w&&x>30)break;if(3==p.noise_shaping_amp&&w&&h.global_gain-S>15)break}}while(h.global_gain+h.scalefac_scale<255);3==p.noise_shaping_amp?w?y=!0:(h.assign(t),f.arraycopy(g,0,s,0,576),x=0,S=h.global_gain,w=!0):y=!0}return e.VBR==m.vbr_rh||e.VBR==m.vbr_mtrh?f.arraycopy(g,0,s,0,576):0!=(1&p.substep_shaping)&&trancate_smallspectrums(p,t,i,s),b.over_count},this.iteration_finish_one=function(e,n,a){var i=e.l3_side,o=i.tt[n][a];r.best_scalefac_store(e,n,a,i),1==e.use_best_huffman&&r.best_huffman_divide(e,o),t.ResvAdjust(e,o)},this.VBR_encode_granule=function(e,t,n,r,i,o,s){var l,u=e.internal_flags,d=new L,p=a(576),h=s,m=s+1,g=(s+o)/2,v=0,b=u.sfb21_extra;c.fill(d.l3_enc,0);do{u.sfb21_extra=!(g>h-42)&&b,outer_loop(e,t,n,r,i,g)<=0?(v=1,m=t.part2_3_length,d.assign(t),f.arraycopy(r,0,p,0,576),l=(s=m-32)-o,g=(s+o)/2):(l=s-(o=g+32),g=(s+o)/2,0!=v&&(v=2,t.assign(d),f.arraycopy(p,0,r,0,576)))}while(l>12);u.sfb21_extra=b,2==v&&f.arraycopy(d.l3_enc,0,t.l3_enc,0,576)},this.get_framebits=function(n,r){var a=n.internal_flags;a.bitrate_index=a.VBR_min_bitrate;var i=e.getframebits(n);a.bitrate_index=1,i=e.getframebits(n);for(var o=1;o<=a.VBR_max_bitrate;o++){a.bitrate_index=o;var s=new k(i);r[o]=t.ResvFrameBegin(n,s),i=s.bits}},this.VBR_old_prepare=function(e,r,a,i,o,s,l,u,c){var f,d=e.internal_flags,p=0,h=1,m=0;d.bitrate_index=d.VBR_max_bitrate;var g=t.ResvFrameBegin(e,new k(0))/d.mode_gr;get_framebits(e,s);for(var v=0;vs[d.VBR_max_bitrate]&&(u[v][_]*=s[d.VBR_max_bitrate],u[v][_]/=m),l[v][_]>u[v][_]&&(l[v][_]=u[v][_]);return h},this.bitpressure_strategy=function(e,t,n,r){for(var a=0;al&&(s[h][m]*=l,s[h][m]/=d);return c},this.calc_target_bits=function(r,a,i,o,s,l){var u,c,f,d,p=r.internal_flags,h=p.l3_side,m=0;p.bitrate_index=p.VBR_max_bitrate;var g=new k(m);for(l[0]=t.ResvFrameBegin(r,g),m=g.bits,p.bitrate_index=1,m=e.getframebits(r)-8*p.sideinfo_len,s[0]=m/(p.mode_gr*p.channels_out),m=r.VBR_mean_bitrate_kbps*r.framesize*1e3,0!=(1&p.substep_shaping)&&(m*=1.09),m/=r.out_samplerate,m-=8*p.sideinfo_len,m/=p.mode_gr*p.channels_out,(u=.93+.07*(11-r.compression_ratio)/5.5)<.9&&(u=.9),u>1&&(u=1),c=0;c700){var b=int((a[c][f]-700)/1.4),_=h.tt[c][f];o[c][f]=int(u*m),_.block_type==V.SHORT_TYPE&&b3*m/2?b=3*m/2:b<0&&(b=0),o[c][f]+=b}o[c][f]>G.MAX_BITS_PER_CHANNEL&&(o[c][f]=G.MAX_BITS_PER_CHANNEL),v+=o[c][f]}if(v>G.MAX_BITS_PER_GRANULE)for(f=0;fG.MAX_BITS_PER_CHANNEL&&(o[c][f]=G.MAX_BITS_PER_CHANNEL),d+=o[c][f];if(d>l[0])for(c=0;c=0;--x){var I,P;I=A[y+x]*i[20+x]+A[y+-1-x]*o[28+x],P=A[y+x]*o[28+x]-A[y+-1-x]*i[20+x],A[y+-1-x]=I,A[y+x]=P}}}if(h=d,m=286,1==e.mode_gr)for(var O=0;O<18;O++)f.arraycopy(e.sb_sample[g][1][O],0,e.sb_sample[g][0][O],0,32)}}}function H(){this.thm=new Y,this.en=new Y}function V(){var e=V.FFTOFFSET,t=V.MPG_MD_MS_LR,n=null;this.psy=null;var i=null,s=null,l=null;this.setModules=function(e,t,r,a){n=e,this.psy=t,i=t,s=a,l=r};var c=new F;this.lame_encode_mp3_frame=function(d,p,h,v,b,_){var A,y=u([2,2]);y[0][0]=new H,y[0][1]=new H,y[1][0]=new H,y[1][1]=new H;var w,S=u([2,2]);S[0][0]=new H,S[0][1]=new H,S[1][0]=new H,S[1][1]=new H;var x,E,k,B=[null,null],R=d.internal_flags,C=o([2,4]),M=[.5,.5],T=[[0,0],[0,0]],I=[[0,0],[0,0]];if(B[0]=p,B[1]=h,0==R.lame_encode_frame_init&&function(e,t){var n,r,i=e.internal_flags;if(0==i.lame_encode_frame_init){var o,s,l=a(2014),u=a(2014);for(i.lame_encode_frame_init=1,o=0,s=0;o<286+576*(1+i.mode_gr);++o)o<576*i.mode_gr?(l[o]=0,2==i.channels_out&&(u[o]=0)):(l[o]=t[0][s],2==i.channels_out&&(u[o]=t[1][s]),++s);for(r=0;r0&&(M[k]=C[k][3]/M[k])),E=0;E.03125)e.ATH.adjust>=1?e.ATH.adjust=1:e.ATH.adjust=r?(e.ATH.adjust*=.075*r+.925,e.ATH.adjust=r?e.ATH.adjust=r:e.ATH.adjust>1,m=(h=a<<1)+(p=a),a=h<<1,o=(i=t)+g;do{S=e[i+0]-e[i+p],w=e[i+0]+e[i+p],B=e[i+h]-e[i+m],E=e[i+h]+e[i+m],e[i+h]=w-E,e[i+0]=w+E,e[i+m]=S-B,e[i+p]=S+B,S=e[o+0]-e[o+p],w=e[o+0]+e[o+p],B=d.SQRT2*e[o+m],E=d.SQRT2*e[o+h],e[o+h]=w-E,e[o+0]=w+E,e[o+m]=S-B,e[o+p]=S+B,o+=a,i+=a}while(i=0);r(n[l],u,V.BLKSIZE_s/2)}},this.fft_long=function(t,n,a,o,s){var l=V.BLKSIZE/8-1,u=V.BLKSIZE/2;do{var c,f,d,p,h,m=255&i[l];f=(c=e[m]*o[a][s+m])-(h=e[m+512]*o[a][s+m+512]),c+=h,p=(d=e[m+256]*o[a][s+m+256])-(h=e[m+768]*o[a][s+m+768]),d+=h,n[(u-=4)+0]=c+d,n[u+2]=c-d,n[u+1]=f+p,n[u+3]=f-p,f=(c=e[m+1]*o[a][s+m+1])-(h=e[m+513]*o[a][s+m+513]),c+=h,p=(d=e[m+257]*o[a][s+m+257])-(h=e[m+769]*o[a][s+m+769]),d+=h,n[u+V.BLKSIZE/2+0]=c+d,n[u+V.BLKSIZE/2+2]=c-d,n[u+V.BLKSIZE/2+1]=f+p,n[u+V.BLKSIZE/2+3]=f-p}while(--l>=0);r(n,u,V.BLKSIZE/2)},this.init_fft=function(n){for(var r=0;r=0;--h){var m=a[i+0][h],g=a[i+1][h];a[i+0][h]=(m+g)*d.SQRT2*.5,a[i+1][h]=(m-g)*d.SQRT2*.5}for(var v=2;v>=0;--v)for(h=V.BLKSIZE_s-1;h>=0;--h){m=o[s+0][v][h],g=o[s+1][v][h];o[s+0][v][h]=(m+g)*d.SQRT2*.5,o[s+1][v][h]=(m-g)*d.SQRT2*.5}}n[0]=a[i+0][0],n[0]*=n[0];for(h=V.BLKSIZE/2-1;h>=0;--h){var b=a[i+0][V.BLKSIZE/2-h],_=a[i+0][V.BLKSIZE/2+h];n[V.BLKSIZE/2-h]=.5*(b*b+_*_)}for(v=2;v>=0;--v){r[v][0]=o[s+0][v][0],r[v][0]*=r[v][0];for(h=V.BLKSIZE_s/2-1;h>=0;--h){b=o[s+0][v][V.BLKSIZE_s/2-h],_=o[s+0][v][V.BLKSIZE_s/2+h];r[v][V.BLKSIZE_s/2-h]=.5*(b*b+_*_)}}var y=0;for(h=11;he){if(!(t=t*S)return e+t;o=e/t}if(e+=t,r+3<=6){if(o>=w)return e;var s=0|d.FAST_LOG10_X(o,16);return e*M[s]}var l,u;s=0|d.FAST_LOG10_X(o,16);return t=0!=i?a.ATH.cb_s[n]*a.ATH.adjust:a.ATH.cb_l[n]*a.ATH.adjust,et?(l=1,s<=13&&(l=T[s]),u=d.FAST_LOG10_X(e/t,10/15),e*((C[s]-l)*u+l)):s>13?e:e*T[s]:e*C[s]}var P=[1.7782755904,1.35879*1.35879,1.38454*1.38454,1.39497*1.39497,1.40548*1.40548,1.3537*1.3537,1.6999465924,1.22321*1.22321,1.3169398564,1];function O(e,t,n){var r;if(e<0&&(e=0),t<0&&(t=0),e<=0)return t;if(t<=0)return e;if(r=t>e?t/e:e/t,-2<=n&&n<=2){if(r>=w)return e+t;var a=0|d.FAST_LOG10_X(r,16);return(e+t)*P[a]}return r=c){++i;break}var d=e.PSY.bo_s_weight[i],p=1-d;s=d*t[o],l=d*n[o],e.en[r].s[i][a]+=s,e.thm[r].s[i][a]+=l,s=p*t[o],l=p*n[o]}for(;i=u){++a;break}var f=e.PSY.bo_l_weight[a],d=1-f;o=f*t[i],s=f*n[i],e.en[r].l[a]+=o,e.thm[r].l[a]+=s,o=d*t[i],s=d*n[i]}for(;a=1?e:n<=0?t:t>0?Math.pow(e/t,n)*t:0}var F=[11.8,13.6,17.2,32,46.5,51.3,57.5,67.1,71.5,84.6,97.6,130];function H(e,n){for(var r=309.07,a=0;a0){var s=o*n,l=e.en.s[a][i];l>s&&(r+=l>1e10*s?F[a]*(10*t):F[a]*d.FAST_LOG10(l/s))}}return r}var z=[6.8,5.8,5.8,6.4,6.5,9.9,12.1,14.4,15,18.9,21.6,26.9,34.2,40.2,46.8,56.5,60.7,73.9,85.7,93.4,126.1];function Q(e,n){for(var r=281.0575,a=0;a0){var o=i*n,s=e.en.l[a];s>o&&(r+=s>1e10*o?z[a]*(10*t):z[a]*d.FAST_LOG10(s/o))}}return r}function Y(e,t,n,r,a){var i,o;for(i=o=0;i0?((s=t[i])a&&(l=a),r[i]=l):r[i]=0;for(i=1;i0)(s=t[i-1])a&&(l=a),r[i]=l;else r[i]=0}(o=n[i-1]+n[i])>0?((s=t[i-1])a&&(l=a),r[i]=l):r[i]=0}var G=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function W(t,n,r,a,i,o,s,l){var u=t.internal_flags;if(a<2)e.fft_long(u,s[l],a,n,r);else if(2==a)for(var c=V.BLKSIZE-1;c>=0;--c){var f=s[l+0][c],p=s[l+1][c];s[l+0][c]=(f+p)*d.SQRT2*.5,s[l+1][c]=(f-p)*d.SQRT2*.5}o[0]=s[l+0][0],o[0]*=o[0];for(c=V.BLKSIZE/2-1;c>=0;--c){var h=s[l+0][V.BLKSIZE/2-c],m=s[l+0][V.BLKSIZE/2+c];o[V.BLKSIZE/2-c]=.5*(h*h+m*m)}var g=0;for(c=11;c=0;--c){var f=s[l+0][i][c],p=s[l+1][i][c];s[l+0][i][c]=(f+p)*d.SQRT2*.5,s[l+1][i][c]=(f-p)*d.SQRT2*.5}o[i][0]=s[l+0][i][0],o[i][0]*=o[i][0];for(c=V.BLKSIZE_s/2-1;c>=0;--c){var h=s[l+0][i][V.BLKSIZE_s/2-c],m=s[l+0][i][V.BLKSIZE_s/2+c];o[i][V.BLKSIZE_s/2-c]=.5*(h*h+m*m)}}function Z(e,t,n,r){var a=e.internal_flags;2==e.athaa_loudapprox&&n<2&&(a.loudness_sq[t][n]=a.loudness_sq_save[n],a.loudness_sq_save[n]=A(r,a))}this.L3psycho_anal_ns=function(e,t,s,l,u,f,d,h,_,A){var w,S,x,E,k,B,C,M,T,P,O=e.internal_flags,F=o([2,V.BLKSIZE]),z=o([2,3,V.BLKSIZE_s]),X=a(V.CBANDS+1),W=a(V.CBANDS+1),q=a(V.CBANDS+2),Z=r(2),K=r(2),J=o([2,576]),$=r(V.CBANDS+2),ee=r(V.CBANDS+2);for(c.fill(ee,0),w=O.channels_out,e.mode==g.JOINT_STEREO&&(w=4),T=e.VBR==m.vbr_off?0==O.ResvMax?0:O.ResvSize/O.ResvMax*.5:e.VBR==m.vbr_rh||e.VBR==m.vbr_mtrh||e.VBR==m.vbr_mt?.6:1,S=0;S2&&(f[l][S].en.assign(O.en[S+2]),f[l][S].thm.assign(O.thm[S+2]))}for(S=0;Soe[E+3-2]?Ae/=oe[E+3-2]:Ae=oe[E+3-2]>10*Ae?oe[E+3-2]/(10*Ae):0,le[E+3]=Ae}if(e.analysis){var ye=le[0];for(E=1;E<12;E++)yeie&&(de[E/3]=E%3+1);for(E=1;E<4;E++){(se[E-1]>se[E]?se[E-1]/se[E]:se[E]/se[E-1])<1.7&&(de[E]=0,1==E&&(de[0]=0))}for(0!=de[0]&&0!=O.nsPsy.lastAttacks[S]&&(de[0]=0),3!=O.nsPsy.lastAttacks[S]&&de[0]+de[1]+de[2]+de[3]==0||(ue=0,0!=de[1]&&0!=de[0]&&(de[1]=0),0!=de[2]&&0!=de[1]&&(de[2]=0),0!=de[3]&&0!=de[2]&&(de[3]=0)),S<2?K[S]=ue:0==ue&&(K[0]=K[1]=0),_[S]=O.tot_ener[S],y(e,pe,he,F,1&S,z,1&S,l,S,t,s),Y(O,pe,X,ce,fe),U(O,ce,fe,$),M=0;M<3;M++){var we,Se;for(j(e,he,W,q,S,M),N(O,W,q,S,M),C=0;C=2||1==de[M+1]){var xe=0!=M?M-1:2;Ae=D(O.thm[S].s[C][xe],Se,.6*T);Se=Math.min(Se,Ae)}if(1==de[M]){xe=0!=M?M-1:2,Ae=D(O.thm[S].s[C][xe],Se,v*T);Se=Math.min(Se,Ae)}else if(0!=M&&3==de[M-1]||0==M&&3==O.nsPsy.lastAttacks[S]){xe=2!=M?M+1:0,Ae=D(O.thm[S].s[C][xe],Se,v*T);Se=Math.min(Se,Ae)}we=oe[3*M+3]+oe[3*M+4]+oe[3*M+5],6*oe[3*M+5]0&&function(e,t){var n=e.internal_flags;if(n.channels_out>1){for(var r=0;r1.58*e.thm[1].l[t]||e.thm[1].l[t]>1.58*e.thm[0].l[t])){var n=e.mld_l[t]*e.en[3].l[t],r=Math.max(e.thm[2].l[t],Math.min(e.thm[3].l[t],n));n=e.mld_l[t]*e.en[2].l[t];var a=Math.max(e.thm[3].l[t],Math.min(e.thm[2].l[t],n));e.thm[2].l[t]=r,e.thm[3].l[t]=a}for(t=0;t1.58*e.thm[1].s[t][i]||e.thm[1].s[t][i]>1.58*e.thm[0].s[t][i]||(n=e.mld_s[t]*e.en[3].s[t][i],r=Math.max(e.thm[2].s[t][i],Math.min(e.thm[3].s[t][i],n)),n=e.mld_s[t]*e.en[2].s[t][i],a=Math.max(e.thm[3].s[t][i],Math.min(e.thm[2].s[t][i],n)),e.thm[2].s[t][i]=r,e.thm[3].s[t][i]=a)}(O),P=e.msfix,Math.abs(P)>0&&function(e,t,n){var r=t,a=Math.pow(10,n);t*=2,r*=2;for(var i=0;i1?(Re=h,Te=-2,Ce=V.NORM_TYPE,A[0]!=V.SHORT_TYPE&&A[1]!=V.SHORT_TYPE||(Ce=V.SHORT_TYPE),Me=f[l][S-2]):(Re=d,Te=0,Ce=A[S],Me=u[l][S]),Ce==V.SHORT_TYPE?Re[Te+S]=H(Me,O.masking_lower):Re[Te+S]=Q(Me,O.masking_lower),e.analysis&&(O.pinfo.pe[l][S]=Re[Te+S])}return 0};var K=[-1730326e-23,-.01703172,-1349528e-23,.0418072,-673278e-22,-.0876324,-30835e-21,.1863476,-1104424e-22,-.627638];function J(e,t,n){if(0==n)for(var r=0;r0?((s=t[i])a&&(l=a),r[i]=l):r[i]=0,i=1;i0?((s=t[i-1])a&&(l=a),r[i]=l):r[i]=0}(o=n[i-1]+n[i])>0?((s=t[i-1])a&&(l=a),r[i]=l):r[i]=0}(c,f,d,p),l=u=0;uA&&(r[u]=A),c.masking_lower>1&&(r[u]*=c.masking_lower),r[u]>n[u]&&(r[u]=n[u]),c.masking_lower<1&&(r[u]*=c.masking_lower)}for(;u0?Math.min(m,w):Math.min(m,o[u]*v)}else{var S=i*e.nb_2[l][u],x=n*e.nb_1[l][u];S<=0&&(S=m),x<=0&&(x=m),w=e.blocktype_old[1&l]==V.NORM_TYPE?Math.min(x,S):x,s[u]=Math.min(m,w)}e.nb_2[l][u]=e.nb_1[l][u],e.nb_1[l][u]=m,h=c[u],h*=e.minval_l[u],h*=g,s[u]>h&&(s[u]=h),e.masking_lower>1&&(s[u]*=e.masking_lower),s[u]>o[u]&&(s[u]=o[u]),e.masking_lower<1&&(s[u]*=e.masking_lower)}for(;u0?Math.pow(10,a):1,f=0;f0){var A,y,w=r[f]*c;if(A=Math.min(Math.max(h,w),Math.max(m,w)),(y=(g=Math.max(l,w))+(v=Math.max(s,w)))>0&&A*ud&&(l=d),s>p&&(s=p),t[2][f]=l,t[3][f]=s}}function re(e,t){var n;return(n=e>=0?27*-e:e*t)<=-72?0:Math.exp(n*_)}function ae(e){var t,n,r=0;for(r=0;re(r,e)>1e-20;r-=1);for(a=r,i=0;Math.abs(i-a)>1e-12;)re(r=(i+a)/2,e)>0?i=r:a=r;t=a;var a,i;r=0;for(r=0;re(r,e)>1e-20;r+=1);for(a=0,i=r;Math.abs(i-a)>1e-12;)re(r=(i+a)/2,e)>0?a=r:i=r;n=i;var o,s=0,l=1e3;for(o=0;o<=l;++o){s+=re(r=t+o*(n-t)/l,e)}return(l+1)/(s*(n-t))}function ie(e){var t,n,r,a;return t=e,n=(t*=t>=0?3:1.5)>=.5&&t<=2.5?8*((a=t-.5)*a-2*a):0,(r=15.811389+7.5*(t+=.474)-17.5*Math.sqrt(1+t*t))<=-60?0:(t=Math.exp((n+r)*_),t/=.6609193)}function oe(e){return e<0&&(e=0),e*=.001,13*Math.atan(.76*e)+3.5*Math.atan(e*e/56.25)}function se(e,t,n,i,o,s,l,c,f,d,p,h){var m,g=a(V.CBANDS+1),v=c/(h>15?1152:384),b=r(V.HBLKSIZE);c/=f;var _=0,A=0;for(m=0;mf/2){_=f/2,++m;break}}g[m]=c*_;for(var w=0;wf/2&&(x=f/2),n[w]=(b[S]+b[x])/2,t[w]=b[x];var R=v*k;l[w]=(R-g[t[w]])/(g[t[w]+1]-g[t[w]]),l[w]<0?l[w]=0:l[w]>1&&(l[w]=1),B=oe(c*d[w]*p),B=Math.min(B,15.5)/15.5,s[w]=Math.pow(10,1.25*(1-Math.cos(Math.PI*B))-2.5)}_=0;for(var C=0;C0);l++);for(e[f][0]=l,l=t-1;l>0&&!(u[f][l]>0);l--);e[f][1]=l,c+=e[f][1]-e[f][0]+1}var m=a(c),g=0;for(f=0;f2&&(s[r][v].en.assign(p.en[v+2]),s[r][v].thm.assign(p.thm[v+2]))}for(v=0;v0;++A,--S){var T=d[0][A],I=d[1][A];d[0][A]=T+I,d[1][A]=T-I}for(A=0;A<3;A++)E[A]=p.nsPsy.last_en_subshort[v][A+6],x[A]=E[A]/p.nsPsy.last_en_subshort[v][A+4],k[0]+=E[A];for(A=0;A<9;A++){for(var P=R+64,O=1;RE[A+3-2]?O/=E[A+3-2]:O=E[A+3-2]>10*O?E[A+3-2]/(10*O):0,x[A+3]=O}for(A=0;A<3;++A){var N=E[3*A+3]+E[3*A+4]+E[3*A+5],L=1;6*E[3*A+5]C&&(c[v][A/3]=A%3+1);for(A=1;A<4;A++){var D=k[A-1],F=k[A];Math.max(D,F)<4e4&&D<1.7*F&&F<1.7*D&&(1==A&&c[v][0]<=c[v][A]&&(c[v][0]=0),c[v][A]=0)}c[v][0]<=p.nsPsy.lastAttacks[v]&&(c[v][0]=0),3!=p.nsPsy.lastAttacks[v]&&c[v][0]+c[v][1]+c[v][2]+c[v][3]==0||(M=0,0!=c[v][1]&&0!=c[v][0]&&(c[v][1]=0),0!=c[v][2]&&0!=c[v][1]&&(c[v][2]=0),0!=c[v][3]&&0!=c[v][2]&&(c[v][3]=0)),v<2?f[v]=M:0==M&&(f[0]=f[1]=0),l[v]=p.tot_ener[v]}}(e,t,n,i,s,l,f,x,E,k),function(e,t){var n=e.internal_flags;e.short_blocks!=p.short_block_coupled||0!=t[0]&&0!=t[1]||(t[0]=t[1]=0);for(var r=0;r=2||1==E[R][C+1]){var O=0!=C?C-1:2,j=D(h.thm[R].s[T][O],P,.36);P=Math.min(P,j)}else if(1==E[R][C]){O=0!=C?C-1:2,j=D(h.thm[R].s[T][O],P,.6*v);P=Math.min(P,j)}else if(0!=C&&3==E[R][C-1]||0==C&&3==h.nsPsy.lastAttacks[R]){O=2!=C?C+1:0,j=D(h.thm[R].s[T][O],P,.6*v);P=Math.min(P,j)}P*=x[R][C],I[C]=P}for(C=0;C<3;C++)h.thm[R].s[T][C]=I[C]}}for(R=0;R1?(F=c,z=-2,Y=V.NORM_TYPE,d[0]!=V.SHORT_TYPE&&d[1]!=V.SHORT_TYPE||(Y=V.SHORT_TYPE),U=l[i][R-2]):(F=u,z=0,Y=d[R],U=s[i][R]),Y==V.SHORT_TYPE?F[z+R]=H(U,h.masking_lower):F[z+R]=Q(U,h.masking_lower),e.analysis&&(h.pinfo.pe[i][R]=F[z+R])}return 0},this.psymodel_init=function(n){var r,i=n.internal_flags,o=!0,s=13,l=24,u=0,c=0,f=-8.25,d=-4.5,p=a(V.CBANDS),g=a(V.CBANDS),v=a(V.CBANDS),b=n.out_samplerate;switch(n.experimentalZ){default:case 0:o=!0;break;case 1:o=n.VBR!=m.vbr_mtrh&&n.VBR!=m.vbr_mt;break;case 2:o=!1;break;case 3:s=8,u=-1.75,c=-.0125,f=-8.25,d=-2.25}for(i.ms_ener_ratio_old=.25,i.blocktype_old[0]=i.blocktype_old[1]=V.NORM_TYPE,r=0;r<4;++r){for(var _=0;_=s&&(y=c*(p[r]-s)/(l-s)+u*(l-p[r])/(l-s)),v[r]=Math.pow(10,y/10),i.numlines_l[r]>0?i.rnumlines_l[r]=1/i.numlines_l[r]:i.rnumlines_l[r]=0}i.s3_ll=le(i.s3ind,i.npart_l,p,g,v,o);var R;_=0;for(r=0;r(I*=i.numlines_l[r])&&(T=I)}i.ATH.cb_l[r]=T,(T=20*p[r]/10-20)>6&&(T=100),T<-15&&(T=-15),T-=8,i.minval_l[r]=Math.pow(10,T/10)*i.numlines_l[r]}for(i.npart_s=se(i.numlines_s,i.bo_s,i.bm_s,p,g,i.mld_s,i.PSY.bo_s_weight,b,V.BLKSIZE_s,i.scalefac_band.s,V.BLKSIZE_s/384,V.SBMAX_s),_=0,r=0;r=s&&(y=d*(p[r]-s)/(l-s)+f*(l-p[r])/(l-s)),v[r]=Math.pow(10,y/10),T=h.MAX_VALUE;for(C=0;C(I*=i.numlines_s[r])&&(T=I)}i.ATH.cb_s[r]=T,T=7*p[r]/12-7,p[r]>12&&(T*=1+3.1*Math.log(1+T)),p[r]<12&&(T*=1+2.3*Math.log(1-T)),T<-15&&(T=-15),T-=8,i.minval_s[r]=Math.pow(10,T/10)*i.numlines_s[r]}i.s3_ss=le(i.s3ind_s,i.npart_s,p,g,v,o),w=Math.pow(10,(E+1)/16),S=Math.pow(10,(k+1)/16),x=Math.pow(10,B/10),e.init_fft(i),i.decay=Math.exp(-1*t/(.01*b/192)),R=3.5,0!=(2&n.exp_nspsytune)&&(R=1),Math.abs(n.msfix)>0&&(R=n.msfix),n.msfix=R;for(var P=0;Pi.npart_l-1&&(i.s3ind[P][1]=i.npart_l-1);var O=576*i.mode_gr/b;if(i.ATH.decay=Math.pow(10,-1.2*O),i.ATH.adjust=.01,i.ATH.adjustLimit=1,-1!=n.ATHtype){var N=n.out_samplerate/V.BLKSIZE,L=0;for(M=0,r=0;r=0;)i.ATH.eql_w[r]*=L}for(P=_=0;P1?0:e<=0?1:Math.cos(Math.PI/2*e)}function x(e,t){switch(e){case 44100:return t.version=1,0;case 48e3:return t.version=1,1;case 32e3:return t.version=1,2;case 22050:case 11025:return t.version=0,0;case 24e3:case 12e3:return t.version=0,1;case 16e3:case 8e3:return t.version=0,2;default:return t.version=0,-1}}function k(e,t,n){n<16e3&&(t=2);for(var r=E.bitrate_table[t][1],a=2;a<=14;a++)E.bitrate_table[t][a]>0&&Math.abs(E.bitrate_table[t][a]-e)0&&E.bitrate_table[t][r]==e)return r;return-1}function R(t,n){var r=[new A(8,2e3),new A(16,3700),new A(24,3900),new A(32,5500),new A(40,7e3),new A(48,7500),new A(56,1e4),new A(64,11e3),new A(80,13500),new A(96,15100),new A(112,15600),new A(128,17e3),new A(160,17500),new A(192,18600),new A(224,19400),new A(256,19700),new A(320,20500)],a=e.nearestBitrateFullIndex(n);t.lowerlimit=r[a].lowpass}function P(e){var t=V.BLKSIZE+e.framesize-V.FFTOFFSET;return t=Math.max(t,512+e.framesize-32)}function O(t,n,r,a,i,o){var s=e.enc.lame_encode_mp3_frame(t,n,r,a,i,o);return t.frameNum++,s}function N(){this.n_in=0,this.n_out=0}function L(){this.num_used=0}function j(e,t){return 0!=t?j(t,e%t):e}function D(e,t,n){var r=Math.PI*t;(e/=n)<0&&(e=0),e>1&&(e=1);var a=e-.5,i=.42-.5*Math.cos(2*e*Math.PI)+.08*Math.cos(4*e*Math.PI);return Math.abs(a)<1e-9?r/Math.PI:i*Math.sin(n*r*a)/(Math.PI*n*a)}function F(e,t,n,r,i,o,s,l,u){var c,f,d=e.internal_flags,p=0,h=e.out_samplerate/j(e.out_samplerate,e.in_samplerate);h>G.BPC&&(h=G.BPC);var m=Math.abs(d.resample_ratio-Math.floor(.5+d.resample_ratio))<1e-4?1:0,g=1/d.resample_ratio;g>1&&(g=1);var v=31;0==v%2&&--v;var b=(v+=m)+1;if(0==d.fill_buffer_resample_init){for(d.inbuf_old[0]=a(b),d.inbuf_old[1]=a(b),c=0;c<=2*h;++c)d.blackfilt[c]=a(b);for(d.itime[0]=0,d.itime[1]=0,p=0;p<=2*h;p++){var _=0,A=(p-h)/(2*h);for(c=0;c<=v;c++)_+=d.blackfilt[p][c]=D(c-A,g,v);for(c=0;c<=v;c++)d.blackfilt[p][c]/=_}d.fill_buffer_resample_init=1}var y=d.inbuf_old[u];for(f=0;f=s)break;A=w-d.itime[u]-(p+v%2*.5);S=0|Math.floor(2*A*h+h+.5);var x=0;for(c=0;c<=v;++c){var E=c+p-v/2;x+=(E<0?y[b+E]:i[o+E])*d.blackfilt[S][c]}t[n+f]=x}if(l.num_used=Math.min(s,v+p-v/2),d.itime[u]+=l.num_used-f*d.resample_ratio,l.num_used>=b)for(c=0;c1.0001)for(var s=0;se-r?n:a},this.lame_init_params=function(e){var a=e.internal_flags;if(a.Class_ID=0,null==a.ATH&&(a.ATH=new C),null==a.PSY&&(a.PSY=new v),null==a.rgdata&&(a.rgdata=new I),a.channels_in=e.num_channels,1==a.channels_in&&(e.mode=g.MONO),a.channels_out=e.mode==g.MONO?1:2,a.mode_ext=V.MPG_MD_MS_LR,e.mode==g.MONO&&(e.force_ms=!1),e.VBR==m.vbr_off&&128!=e.VBR_mean_bitrate_kbps&&0==e.brate&&(e.brate=e.VBR_mean_bitrate_kbps),e.VBR==m.vbr_off||e.VBR==m.vbr_mtrh||e.VBR==m.vbr_mt||(e.free_format=!1),e.VBR==m.vbr_off&&0==e.brate&&S.EQ(e.compression_ratio,0)&&(e.compression_ratio=11.025),e.VBR==m.vbr_off&&e.compression_ratio>0&&(0==e.out_samplerate&&(e.out_samplerate=map2MP3Frequency(int(.97*e.in_samplerate))),e.brate=0|16*e.out_samplerate*a.channels_out/(1e3*e.compression_ratio),a.samplerate_index=x(e.out_samplerate,e),e.free_format||(e.brate=k(e.brate,e.version,e.out_samplerate))),0!=e.out_samplerate&&(e.out_samplerate<16e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,64)):e.out_samplerate<32e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,160)):(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,32),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,320))),0==e.lowpassfreq){var l=16e3;switch(e.VBR){case m.vbr_off:R(A=new b,e.brate),l=A.lowerlimit;break;case m.vbr_abr:var A;R(A=new b,e.VBR_mean_bitrate_kbps),l=A.lowerlimit;break;case m.vbr_rh:var M=[19500,19e3,18600,18e3,17500,16e3,15600,14900,12500,1e4,3950];if(0<=e.VBR_q&&e.VBR_q<=9){var P=M[e.VBR_q],O=M[e.VBR_q+1],N=e.VBR_q_frac;l=linear_int(P,O,N)}else l=19500;break;default:M=[19500,19e3,18500,18e3,17500,16500,15500,14500,12500,9500,3950];if(0<=e.VBR_q&&e.VBR_q<=9){P=M[e.VBR_q],O=M[e.VBR_q+1],N=e.VBR_q_frac;l=linear_int(P,O,N)}else l=19500}e.mode!=g.MONO||e.VBR!=m.vbr_off&&e.VBR!=m.vbr_abr||(l*=1.5),e.lowpassfreq=0|l}if(0==e.out_samplerate&&(2*e.lowpassfreq>e.in_samplerate&&(e.lowpassfreq=e.in_samplerate/2),e.out_samplerate=function(e,t){var n=44100;return t>=48e3?n=48e3:t>=44100?n=44100:t>=32e3?n=32e3:t>=24e3?n=24e3:t>=22050?n=22050:t>=16e3?n=16e3:t>=12e3?n=12e3:t>=11025?n=11025:t>=8e3&&(n=8e3),-1==e?n:(e<=15960&&(n=44100),e<=15250&&(n=32e3),e<=11220&&(n=24e3),e<=9970&&(n=22050),e<=7230&&(n=16e3),e<=5420&&(n=12e3),e<=4510&&(n=11025),e<=3970&&(n=8e3),t44100?48e3:t>32e3?44100:t>24e3?32e3:t>22050?24e3:t>16e3?22050:t>12e3?16e3:t>11025?12e3:t>8e3?11025:8e3:n)}(0|e.lowpassfreq,e.in_samplerate)),e.lowpassfreq=Math.min(20500,e.lowpassfreq),e.lowpassfreq=Math.min(e.out_samplerate/2,e.lowpassfreq),e.VBR==m.vbr_off&&(e.compression_ratio=16*e.out_samplerate*a.channels_out/(1e3*e.brate)),e.VBR==m.vbr_abr&&(e.compression_ratio=16*e.out_samplerate*a.channels_out/(1e3*e.VBR_mean_bitrate_kbps)),e.bWriteVbrTag||(e.findReplayGain=!1,e.decode_on_the_fly=!1,a.findPeakSample=!1),a.findReplayGain=e.findReplayGain,a.decode_on_the_fly=e.decode_on_the_fly,a.decode_on_the_fly&&(a.findPeakSample=!0),a.findReplayGain&&t.InitGainAnalysis(a.rgdata,e.out_samplerate)==_.INIT_GAIN_ANALYSIS_ERROR)return e.internal_flags=null,-6;switch(a.decode_on_the_fly&&!e.decode_only&&(null!=a.hip&&d.hip_decode_exit(a.hip),a.hip=d.hip_decode_init()),a.mode_gr=e.out_samplerate<=24e3?1:2,e.framesize=576*a.mode_gr,e.encoder_delay=V.ENCDELAY,a.resample_ratio=e.in_samplerate/e.out_samplerate,e.VBR){case m.vbr_mt:case m.vbr_rh:case m.vbr_mtrh:e.compression_ratio=[5.7,6.5,7.3,8.2,10,11.9,13,14,15,16.5][e.VBR_q];break;case m.vbr_abr:e.compression_ratio=16*e.out_samplerate*a.channels_out/(1e3*e.VBR_mean_bitrate_kbps);break;default:e.compression_ratio=16*e.out_samplerate*a.channels_out/(1e3*e.brate)}if(e.mode==g.NOT_SET&&(e.mode=g.JOINT_STEREO),e.highpassfreq>0?(a.highpass1=2*e.highpassfreq,e.highpasswidth>=0?a.highpass2=2*(e.highpassfreq+e.highpasswidth):a.highpass2=2*e.highpassfreq,a.highpass1/=e.out_samplerate,a.highpass2/=e.out_samplerate):(a.highpass1=0,a.highpass2=0),e.lowpassfreq>0?(a.lowpass2=2*e.lowpassfreq,e.lowpasswidth>=0?(a.lowpass1=2*(e.lowpassfreq-e.lowpasswidth),a.lowpass1<0&&(a.lowpass1=0)):a.lowpass1=2*e.lowpassfreq,a.lowpass1/=e.out_samplerate,a.lowpass2/=e.out_samplerate):(a.lowpass1=0,a.lowpass2=0),function(e){var t=e.internal_flags,n=32,r=-1;if(t.lowpass1>0){for(var a=999,i=0;i<=31;i++)(u=i/31)>=t.lowpass2&&(n=Math.min(n,i)),t.lowpass10&&t.highpass2<.75/31*.9&&(t.highpass1=0,t.highpass2=0,f.err.println("Warning: highpass filter disabled. highpass frequency too small\n")),t.highpass2>0){var o=-1;for(i=0;i<=31;i++)(u=i/31)<=t.highpass1&&(r=Math.max(r,i)),t.highpass1t.highpass1?w((t.highpass2-u)/(t.highpass2-t.highpass1+1e-20)):1,l=t.lowpass2>t.lowpass1?w((u-t.lowpass1)/(t.lowpass2-t.lowpass1+1e-20)):1,t.amp_filter[i]=s*l}}(e),a.samplerate_index=x(e.out_samplerate,e),a.samplerate_index<0)return e.internal_flags=null,-1;if(e.VBR==m.vbr_off){if(e.free_format)a.bitrate_index=0;else if(e.brate=k(e.brate,e.version,e.out_samplerate),a.bitrate_index=B(e.brate,e.version,e.out_samplerate),a.bitrate_index<=0)return e.internal_flags=null,-1}else a.bitrate_index=1;e.analysis&&(e.bWriteVbrTag=!1),null!=a.pinfo&&(e.bWriteVbrTag=!1),n.init_bit_stream_w(a);for(var L,j=a.samplerate_index+3*e.version+6*(e.out_samplerate<16e3?1:0),D=0;D5&&(e.quality=5),a.PSY.mask_adjust=e.maskingadjust,a.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?a.sfb21_extra=!1:a.sfb21_extra=e.out_samplerate>44e3,a.iteration_loop=new VBRNewIterationLoop(o);break;case m.vbr_rh:r.apply_preset(e,500-10*e.VBR_q,0),a.PSY.mask_adjust=e.maskingadjust,a.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?a.sfb21_extra=!1:a.sfb21_extra=e.out_samplerate>44e3,e.quality>6&&(e.quality=6),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),a.iteration_loop=new VBROldIterationLoop(o);break;default:var z;a.sfb21_extra=!1,e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),(z=e.VBR)==m.vbr_off&&(e.VBR_mean_bitrate_kbps=e.brate),r.apply_preset(e,e.VBR_mean_bitrate_kbps,0),e.VBR=z,a.PSY.mask_adjust=e.maskingadjust,a.PSY.mask_adjust_short=e.maskingadjust_short,z==m.vbr_off?a.iteration_loop=new T(o):a.iteration_loop=new ABRIterationLoop(o)}if(e.VBR!=m.vbr_off){if(a.VBR_min_bitrate=1,a.VBR_max_bitrate=14,e.out_samplerate<16e3&&(a.VBR_max_bitrate=8),0!=e.VBR_min_bitrate_kbps&&(e.VBR_min_bitrate_kbps=k(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),a.VBR_min_bitrate=B(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),a.VBR_min_bitrate<0))return-1;if(0!=e.VBR_max_bitrate_kbps&&(e.VBR_max_bitrate_kbps=k(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),a.VBR_max_bitrate=B(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),a.VBR_max_bitrate<0))return-1;e.VBR_min_bitrate_kbps=E.bitrate_table[e.version][a.VBR_min_bitrate],e.VBR_max_bitrate_kbps=E.bitrate_table[e.version][a.VBR_max_bitrate],e.VBR_mean_bitrate_kbps=Math.min(E.bitrate_table[e.version][a.VBR_max_bitrate],e.VBR_mean_bitrate_kbps),e.VBR_mean_bitrate_kbps=Math.max(E.bitrate_table[e.version][a.VBR_min_bitrate],e.VBR_mean_bitrate_kbps)}return e.tune&&(a.PSY.mask_adjust+=e.tune_value_a,a.PSY.mask_adjust_short+=e.tune_value_a),function(e){var t=e.internal_flags;switch(e.quality){default:case 9:t.psymodel=0,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 8:e.quality=7;case 7:t.psymodel=1,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 6:case 5:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=0,t.full_outer_loop=0;break;case 4:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 3:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 2:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 1:case 0:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=2,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0}}(e),e.athaa_type<0?a.ATH.useAdjust=3:a.ATH.useAdjust=e.athaa_type,a.ATH.aaSensitivityP=Math.pow(10,e.athaa_sensitivity/-10),null==e.short_blocks&&(e.short_blocks=p.short_block_allowed),e.short_blocks!=p.short_block_allowed||e.mode!=g.JOINT_STEREO&&e.mode!=g.STEREO||(e.short_blocks=p.short_block_coupled),e.quant_comp<0&&(e.quant_comp=1),e.quant_comp_short<0&&(e.quant_comp_short=0),e.msfix<0&&(e.msfix=0),e.exp_nspsytune=1|e.exp_nspsytune,e.internal_flags.nsPsy.attackthre<0&&(e.internal_flags.nsPsy.attackthre=W.NSATTACKTHRE),e.internal_flags.nsPsy.attackthre_s<0&&(e.internal_flags.nsPsy.attackthre_s=W.NSATTACKTHRE_S),e.scale<0&&(e.scale=1),e.ATHtype<0&&(e.ATHtype=4),e.ATHcurve<0&&(e.ATHcurve=4),e.athaa_loudapprox<0&&(e.athaa_loudapprox=2),e.interChRatio<0&&(e.interChRatio=0),null==e.useTemporal&&(e.useTemporal=!0),a.slot_lag=a.frac_SpF=0,e.VBR==m.vbr_off&&(a.slot_lag=a.frac_SpF=72e3*(e.version+1)*e.brate%e.out_samplerate|0),i.iteration_init(e),h.psymodel_init(e),0},this.lame_encode_flush=function(e,t,r,a){var i,o,s,u,f=e.internal_flags,d=l([2,1152]),p=0,h=f.mf_samples_to_encode-V.POSTDELAY,m=P(e);if(f.mf_samples_to_encode<1)return 0;for(i=0,e.in_samplerate!=e.out_samplerate&&(h+=16*e.out_samplerate/e.in_samplerate),(s=e.framesize-h%e.framesize)<576&&(s+=e.framesize),e.encoder_padding=s,u=(h+s)/e.framesize;u>0&&p>=0;){var g=m-f.mf_size,v=e.frameNum;g*=e.in_samplerate,(g/=e.out_samplerate)>1152&&(g=1152),g<1&&(g=1),o=a-i,0==a&&(o=0),r+=p=this.lame_encode_buffer(e,d[0],d[1],g,t,r,o),i+=p,u-=v!=e.frameNum?1:0}if(f.mf_samples_to_encode=0,p<0)return p;if(o=a-i,0==a&&(o=0),n.flush_bitstream(e),(p=n.copy_buffer(f,t,r,o,1))<0)return p;if(r+=p,o=a-(i+=p),0==a&&(o=0),e.write_id3tag_automatic){if(c.id3tag_write_v1(e),(p=n.copy_buffer(f,t,r,o,0))<0)return p;i+=p}return i},this.lame_encode_buffer=function(e,r,i,o,s,l,u){var c=e.internal_flags,f=[null,null];if(c.Class_ID!=y)return-3;if(0==o)return 0;!function(e,t){(null==e.in_buffer_0||e.in_buffer_nsamples1&&(f[1][d]=i[d]);return function(e,r,a,i,o,s,l){var u,c,f,d,p,h=e.internal_flags,m=0,g=[null,null],v=[null,null];if(h.Class_ID!=y)return-3;if(0==i)return 0;if(p=n.copy_buffer(h,o,s,l,0),p<0)return p;if(s+=p,m+=p,v[0]=r,v[1]=a,S.NEQ(e.scale,0)&&S.NEQ(e.scale,1))for(c=0;c0;){var A=[null,null],w=0,x=0;A[0]=v[0],A[1]=v[1];var E=new N;if(H(e,g,A,b,i,E),w=E.n_in,x=E.n_out,h.findReplayGain&&!h.decode_on_the_fly&&t.AnalyzeSamples(h.rgdata,g[0],h.mf_size,g[1],h.mf_size,x,h.channels_out)==_.GAIN_ANALYSIS_ERROR)return-6;if(i-=w,b+=w,h.channels_out,h.mf_size+=x,h.mf_samples_to_encode<1&&(h.mf_samples_to_encode=V.ENCDELAY+V.POSTDELAY),h.mf_samples_to_encode+=x,h.mf_size>=d){var k=l-m;if(0==l&&(k=0),(u=O(e,g[0],g[1],o,s,k))<0)return u;for(s+=u,m+=u,h.mf_size-=e.framesize,h.mf_samples_to_encode-=e.framesize,f=0;fB&&(B=n.length,C=t(R=0|1.25*B+7200));var i=a.lame_encode_buffer(k,n,r,n.length,C,0,R);return new Int8Array(C.subarray(0,i))},this.flush=function(){var e=a.lame_encode_flush(k,C,0,R);return new Int8Array(C.subarray(0,e))}},e.WavHeader=ee}e();var t,n,r,a,i,o,s=1152,l=function(){i=[]},u=function(e){i.push(new Int8Array(e))};self.onmessage=function(c){switch(c.data.cmd){case"init":f=c.data.config,a=f||{},l();break;case"encode":!function(i){if(n=e.WavHeader.readHeader(new DataView(i))){var l=new Int16Array(i,n.dataOffset,n.dataLen/2);if(r=1===n.channels?l:new Int16Array(n.dataLen/(2*n.channels)),o=2===n.channels?new Int16Array(n.dataLen/(2*n.channels)):void 0,n.channels>1)for(var c=0;c=s;c+=s){var d,p=r.subarray(c,c+s);o&&(d=o.subarray(c,c+s));var h=t.encodeBuffer(p,d);u(h),f-=s,self.postMessage({cmd:"progress",progress:1-f/r.length})}}else self.postMessage({cmd:"error",msg:"Specified file is not a Wave file"})}(c.data.rawInput);break;case"finish":!function(){if(n){var e=t.flush();u(e),self.postMessage({cmd:"end",buf:i}),l()}}()}var f}}.toString();t=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));var n=new Blob([t],{type:"application/javascript"}),r=URL.createObjectURL(n);e.exports=r},4463:function(e,t,n){"use strict";var r=n(2791),a=n(5296);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n