diff --git a/kolibri/core/content/static/h5p/h5p-099b06808d1909a3cba4.css b/kolibri/core/content/static/h5p/h5p-099b06808d1909a3cba4.css new file mode 100644 index 00000000000..c05294a9c82 --- /dev/null +++ b/kolibri/core/content/static/h5p/h5p-099b06808d1909a3cba4.css @@ -0,0 +1 @@ +@font-face{font-family:h5p;font-style:normal;font-weight:400;src:url(h5p-core-30-e56c8e46d3671f073422.eot);src:url(h5p-core-30-e56c8e46d3671f073422.eot#iefix) format("embedded-opentype"),url(h5p-core-30-fafaddeb6a2d6501f173.ttf) format("truetype"),url(h5p-core-30-53117a8758d6c0b7b71a.woff) format("woff"),url(h5p-core-30-29b394a9fedbc3f0afc1.svg#h5p-core-30) format("svg")}html.h5p-iframe,html.h5p-iframe>body{font-family:Sans-Serif;height:100%;margin:0;padding:0;width:100%}.h5p-fullscreen,.h5p-semi-fullscreen,html.h5p-iframe .h5p-container{overflow:hidden}.h5p-content{background:#fefefe;border:1px solid #eee;border-bottom:none;box-sizing:border-box;-moz-box-sizing:border-box;position:relative}.h5p-noselect{-khtml-user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}html.h5p-iframe .h5p-content{font-size:16px;height:auto;line-height:1.5em;width:100%;-webkit-text-size-adjust:none;text-size-adjust:none}html.h5p-iframe .h5p-fullscreen .h5p-content,html.h5p-iframe .h5p-semi-fullscreen .h5p-content{height:100%}.h5p-content.h5p-no-frame,.h5p-fullscreen .h5p-content,.h5p-semi-fullscreen .h5p-content{border:0}.h5p-container{position:relative;z-index:1}.h5p-iframe-wrapper.h5p-fullscreen{background-color:#000}.h5p-container.h5p-semi-fullscreen,body.h5p-semi-fullscreen{height:100%;position:fixed;width:100%}.h5p-container.h5p-semi-fullscreen{background-color:#fff;left:0;top:0;z-index:101}.h5p-content-controls{margin:0;position:absolute;right:0;top:0;z-index:3}.h5p-fullscreen .h5p-content-controls{display:none}.h5p-content-controls>a:link,.h5p-content-controls>a:visited,a.h5p-disable-fullscreen:link,a.h5p-disable-fullscreen:visited{color:#e5eef6}.h5p-enable-fullscreen:before{content:"\e88c";font-family:H5P}.h5p-disable-fullscreen:before{content:"\e891";font-family:H5P}.h5p-disable-fullscreen,.h5p-enable-fullscreen{background:#000;background:rgba(0,0,0,.3);color:#eee;cursor:pointer;font-size:2em;height:1em;line-height:.975em;text-indent:.04em;width:1.125em}.h5p-disable-fullscreen{height:.9em;line-height:.925em;width:1.1em}.h5p-disable-fullscreen:focus,.h5p-enable-fullscreen:focus{outline-offset:.25em;outline-style:solid;outline-width:1px}.h5p-disable-fullscreen:hover,.h5p-enable-fullscreen:hover{background:rgba(0,0,0,.5)}.h5p-semi-fullscreen .h5p-enable-fullscreen{display:none}div.h5p-fullscreen{height:100%;width:100%}.h5p-iframe-wrapper{height:auto;width:auto}.h5p-fullscreen .h5p-iframe-wrapper,.h5p-semi-fullscreen .h5p-iframe-wrapper{height:100%;width:100%}.h5p-iframe-wrapper.h5p-semi-fullscreen{background:#000;bottom:0;height:auto;left:0;position:fixed;right:0;top:0;width:auto;z-index:100001}.h5p-iframe-wrapper.h5p-semi-fullscreen .buttons{position:absolute;right:0;top:0;z-index:20}.h5p-iframe-wrapper iframe.h5p-iframe{border:0;display:block;height:100%;min-width:100%;overflow:hidden;width:10px;*width:100%;z-index:10}.h5p-content ul.h5p-actions{background:#fafafa;border-bottom:1px solid #eee;border-top:1px solid #eee;box-sizing:border-box;-moz-box-sizing:border-box;clear:both;font-family:Sans-Serif;font-size:12px;height:25px;list-style:none;margin:0;padding:0 10px}.h5p-fullscreen .h5p-actions,.h5p-semi-fullscreen .h5p-actions{display:none}.h5p-actions>.h5p-button{background:none;color:#707070;cursor:pointer;float:left;line-height:22px;margin:0 .5em 0 0;outline:none;padding:0 .75em 0 .25em;text-decoration:none;vertical-align:top}.h5p-actions button:hover{color:#333}.h5p-actions .h5p-link:active,.h5p-actions .h5p-link:focus,.h5p-actions button:active,.h5p-actions button:focus{color:#666}.h5p-actions button{background:none;border:none;color:#6a6a6a;cursor:pointer;display:inline-flex;font:inherit;line-height:2;margin:0;padding:0;position:relative}.h5p-actions .h5p-link:focus,.h5p-actions button:focus{outline-color:#5981a1;outline-offset:-2px;outline-style:solid;outline-width:thin}.h5p-actions button:before{font-family:H5P;font-size:20px;line-height:23px;padding-right:0;vertical-align:bottom}.h5p-actions>.h5p-button.h5p-export>button:before{content:"\e90b"}.h5p-actions>.h5p-button.h5p-copyrights>button:before{content:"\e88f"}.h5p-actions>.h5p-button.h5p-embed>button:before{content:"\e892"}.h5p-actions .h5p-link{color:#6a6a6a;float:right;font-size:2em;line-height:23px;margin-right:0;outline:none;position:relative;text-decoration:none}.h5p-actions .h5p-link:before{content:"\e88e";font-family:H5P;vertical-align:bottom}.h5p-actions>li{list-style:none;margin:0}.h5p-popup-dialog{background:#000;background:rgba(0,0,0,.75);box-sizing:border-box;-moz-box-sizing:border-box;left:0;min-height:100%;opacity:0;padding:2em;position:absolute;top:0;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;width:100%;z-index:100}.h5p-popup-dialog.h5p-open{opacity:1}.h5p-popup-dialog .h5p-inner{background:#fff;box-sizing:border-box;-moz-box-sizing:border-box;height:100%;max-height:100%;position:relative}.h5p-popup-dialog .h5p-inner>h2{background:#eee;border-bottom:1px solid #ccc;box-sizing:border-box;-moz-box-sizing:border-box;color:#656565;display:block;font-size:1.25em;line-height:1.25em;margin:0;padding:.325em .5em .25em;position:absolute;width:100%;z-index:2}.h5p-popup-dialog .h5p-inner>h2>a{font-size:12px;margin-left:1em}.h5p-content-user-data-reset-dialog .h5p-inner,.h5p-embed-dialog .h5p-inner,.h5p-reuse-dialog .h5p-inner{left:50%;max-width:400px;min-width:316px;top:50%;transform:translateX(-50%)}.h5p-embed-dialog .h5p-embed-code-container,.h5p-embed-size{background:#f5f5f5;border:1px solid #ccc;box-shadow:inset 0 1px 2px 0 #d0d0d0;box-sizing:border-box;-moz-box-sizing:border-box;font-family:sans-serif;font-size:.875em;height:2.0714em;letter-spacing:.065em;line-height:1.5em;margin:0;outline:none;overflow:hidden;padding:.375em .5em .25em;resize:none;white-space:pre;width:100%}.h5p-embed-dialog .h5p-embed-code-container:focus{height:5em}.h5p-embed-size{line-height:2em;margin:.5em 0;text-align:right;width:3.5em}.h5p-popup-dialog .h5p-scroll-content{border-top:2.25em solid transparent;box-sizing:border-box;-moz-box-sizing:border-box;color:#555;padding:1em;z-index:1}.h5p-popup-dialog.h5p-open .h5p-scroll-content{height:100%;overflow:auto;overflow-x:hidden;overflow-y:auto}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar{width:8px}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar-track{background:#e0e0e0}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar-thumb{border-radius:4px;box-shadow:inset 0 0 10px #000}.h5p-popup-dialog .h5p-close{color:#656565;cursor:pointer;font-size:2em;height:1.125em;line-height:1.125em;position:absolute;right:0;text-indent:-.065em;top:0;width:1.125em;z-index:3}.h5p-popup-dialog .h5p-close:after{content:"\e894";font-family:H5P}.h5p-popup-dialog .h5p-close:focus:after,.h5p-popup-dialog .h5p-close:hover:after{color:#454545}.h5p-popup-dialog .h5p-close:active:after{color:#252525}.h5p-poopup-dialog h2{margin:.25em 0 .5em}.h5p-popup-dialog h3{margin:.75em 0 .25em}.h5p-popup-dialog dl{margin:.25em 0 .75em}.h5p-popup-dialog dt{float:left;margin:0 .75em 0 0}.h5p-popup-dialog dt:after{content:":"}.h5p-popup-dialog dd{margin:0}.h5p-expander{cursor:pointer;display:inline-block;font-size:1.125em;margin:.5em 0 0}.h5p-expander:before{content:"+";display:inline-block;font-weight:700;width:1em}.h5p-expander.h5p-open:before{content:"-";text-indent:.125em}.h5p-expander:focus,.h5p-expander:hover{color:#303030}.h5p-expander:active{color:#202020}.h5p-expander-content{display:none}.h5p-expander-content p{margin:.5em 0}.h5p-content-copyrights{border-left:.25em solid #d0d0d0;margin-left:.25em;padding-left:.25em}.h5p-throbber{background:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7) 10px no-repeat;line-height:30px;min-height:30px;padding-left:38px}.h5p-dialog-ok-button{background:#eee;border:2px solid #ccc;cursor:default;float:right;outline:none;padding:.25em .75em .125em}.h5p-dialog-ok-button:focus,.h5p-dialog-ok-button:hover{background:#fafafa}.h5p-dialog-ok-button:active{background:#efe}.h5p-big-button{background:linear-gradient(#fff,#f1f1f2);border:1px solid #dedede;border-radius:.25em;cursor:pointer;display:block;line-height:1.25;padding:1em 1em 1em 3.75em;position:relative;text-align:left;width:100%}.h5p-big-button:before{color:#2747f7;content:"\e893";font-family:h5p;font-size:3em;left:.125em;line-height:1;position:absolute;top:.125em}.h5p-copy-button:before{content:"\e905"}.h5p-big-button:hover{background:#eff1fe;border:1px solid #2747f7}.h5p-big-button:active{background:#dfe4fe;border:1px solid #dedede}.h5p-button-title{color:#2747f7;font-size:15px;font-weight:700;margin-bottom:.5em}.h5p-button-description{color:#757575}.h5p-horizontal-line-text{border-top:1px solid #dadada;color:#474747;line-height:1;margin:1.25em 0;position:relative;text-align:center}.h5p-horizontal-line-text>span{background:#fff;left:50%;padding:.5em;position:absolute;top:-1em;transform:translateX(-50%)}.h5p-toast{background-color:rgba(0,0,0,.9);border-radius:4px;color:#fff;font-size:.75em;line-height:2;opacity:1;padding:0 .5em;pointer-events:none;position:absolute;top:0;transition:opacity 1s;visibility:visible;white-space:nowrap;z-index:110}.h5p-toast-disabled{opacity:0;visibility:hidden}.h5p-content code,.h5peditor code{background:#e0e0e0;border-radius:2px;color:#3d3d3d;padding:0 5px}.h5p-content pre>code,.h5peditor pre>code{background-color:#fafafa;border:1px solid #c7c7c7;border-left-width:4px;display:block;line-height:normal;max-width:100%;overflow:auto;padding:5px;white-space:pre}.h5peditor-semi-fullscreen{bottom:0;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:101}iframe.h5peditor-semi-fullscreen{background:#fff;z-index:100001}.h5p-content.using-mouse :not(textarea):focus{outline:none!important}@keyframes rotate{to{transform:rotate(1turn)}}button.h5p-core-button,button.h5p-core-button:link,button.h5p-core-button:visited{background:#2579c6;border:none;border-radius:2em;box-shadow:none;color:#fff;cursor:pointer;display:inline-block;font-family:Open Sans,sans-serif;font-size:1em;font-weight:600;line-height:1.2;outline:none;padding:.5em 1.25em;text-align:center;text-decoration:none;text-shadow:none;-webkit-transition:initial;transition:initial;vertical-align:initial}button.h5p-core-button:focus{background:#1f67a8}button.h5p-core-button:hover{background:rgba(31,103,168,.83)}button.h5p-core-button:active{background:#104888}button.h5p-core-button:before{font-family:H5P;font-size:1.5em;line-height:.7;padding-right:.15em;vertical-align:middle}button.h5p-core-cancel-button,button.h5p-core-cancel-button:link,button.h5p-core-cancel-button:visited{background:none;border:none;color:#a00;cursor:pointer;font-size:1em;margin-right:1em;text-decoration:none}button.h5p-core-cancel-button:focus,button.h5p-core-cancel-button:hover{background:none;border:none;color:#e40000}.h5p-confirmation-dialog-background{background:rgba(44,44,44,.9);height:100%;left:0;opacity:1;position:fixed;top:0;-webkit-transition:opacity .1s,0s linear,visibility 0s linear 0s;transition:opacity .1s linear 0s,visibility 0s linear 0s;visibility:visible;width:100%;z-index:201}.h5p-confirmation-dialog-background.hidden{display:none}.h5p-confirmation-dialog-background.hiding{opacity:0;-webkit-transition:opacity .1s,0s linear,visibility 0s linear .1s;transition:opacity .1s linear 0s,visibility 0s linear .1s;visibility:hidden}.h5p-confirmation-dialog-popup:focus{outline:none}.h5p-confirmation-dialog-popup{box-shadow:0 0 6px 6px hsla(0,0%,4%,.3);box-sizing:border-box;color:#555;display:flex;flex-direction:column;justify-content:center;left:50%;max-width:35em;min-width:25em;position:absolute;top:2em;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);-webkit-transition:transform .1s ease-in;transition:transform .1s ease-in}.h5p-confirmation-dialog-popup.hidden{-webkit-transform:translate(-50%,50%);-ms-transform:translate(-50%,50%);transform:translate(-50%,50%)}.h5p-confirmation-dialog-header{background:#fff;color:#356593;padding:1.5em}.h5p-confirmation-dialog-header-text{font-size:1.25em}.h5p-confirmation-dialog-body{background:#fafbfc;border-top:1px solid #dde0e9;padding:1.25em 1.5em}.h5p-confirmation-dialog-text{margin-bottom:1.5em}.h5p-confirmation-dialog-buttons{float:right}button.h5p-confirmation-dialog-exit,button.h5p-confirmation-dialog-exit:link,button.h5p-confirmation-dialog-exit:visited{background:none;border:none;color:#fff;cursor:pointer;font-size:2.5em;position:absolute;right:-1.15em;text-decoration:none;top:-.9em}button.h5p-confirmation-dialog-exit:focus,button.h5p-confirmation-dialog-exit:hover{color:#e4ecf5}.h5p-confirmation-dialog-exit:before{content:"\e890";font-family:H5P}.h5p-core-button.h5p-confirmation-dialog-confirm-button{@media screen and (max-width:576px){padding-left:1.5rem;span{display:none}}margin-bottom:0;padding-left:.75em}.h5p-core-button.h5p-confirmation-dialog-confirm-button:before{content:"\e601";display:inline-block;margin-top:-6px}.h5p-confirmation-dialog-popup.offline .h5p-confirmation-dialog-buttons{float:none;text-align:center}.h5p-confirmation-dialog-popup.offline .count-down{color:#000;font-family:Arial;margin-top:.15em}.h5p-confirmation-dialog-popup.offline .h5p-confirmation-dialog-confirm-button:before{content:"\e90b";font-weight:400;vertical-align:text-bottom}.throbber-wrapper{background:rgba(44,44,44,.9);display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.throbber-wrapper.show{display:block}.throbber-wrapper .throbber-container{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.throbber-wrapper .sending-requests-throbber{left:50%;position:absolute;top:7em;transform:translateX(-50%)}.throbber-wrapper .sending-requests-throbber:before{animation:request-throbber 1.5s linear infinite;color:#fff;content:"\e90b";display:block;font-family:H5P;font-size:10em}@keyframes request-throbber{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@media (prefers-reduced-motion){.h5p-confirmation-dialog-background{-webkit-transition:none;transition:none;.h5p-confirmation-dialog-popup{-webkit-transition:none;transition:none}&.hiding{.h5p-confirmation-dialog-popup{opacity:0}}}} \ No newline at end of file diff --git a/kolibri/core/content/static/h5p/h5p-cb2da982f548c25c69d2.html b/kolibri/core/content/static/h5p/h5p-0e26ca3f5bd40f703a08.html similarity index 73% rename from kolibri/core/content/static/h5p/h5p-cb2da982f548c25c69d2.html rename to kolibri/core/content/static/h5p/h5p-0e26ca3f5bd40f703a08.html index fc636bc89df..eeeaabe4fff 100644 --- a/kolibri/core/content/static/h5p/h5p-cb2da982f548c25c69d2.html +++ b/kolibri/core/content/static/h5p/h5p-0e26ca3f5bd40f703a08.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/kolibri/core/content/static/h5p/h5p-4cf664c4ad5b091bd9b2.css b/kolibri/core/content/static/h5p/h5p-4cf664c4ad5b091bd9b2.css deleted file mode 100644 index a2400939a61..00000000000 --- a/kolibri/core/content/static/h5p/h5p-4cf664c4ad5b091bd9b2.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:h5p;font-style:normal;font-weight:400;src:url(h5p-core-27-7a1c5248f2f9a25c212a.eot);src:url(h5p-core-27-7a1c5248f2f9a25c212a.eot#iefix) format("embedded-opentype"),url(h5p-core-27-1a73ec4a9bee9445f152.ttf) format("truetype"),url(h5p-core-27-9e30e42e32b655ae0ee6.woff) format("woff"),url(h5p-core-27-98b03255974cc2077c75.svg#h5p-core-27) format("svg")}html.h5p-iframe,html.h5p-iframe>body{font-family:Sans-Serif;height:100%;margin:0;padding:0;width:100%}.h5p-fullscreen,.h5p-semi-fullscreen,html.h5p-iframe .h5p-container{overflow:hidden}.h5p-content{background:#fefefe;border:1px solid #eee;border-bottom:none;box-sizing:border-box;-moz-box-sizing:border-box;position:relative}.h5p-noselect{-khtml-user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}html.h5p-iframe .h5p-content{font-size:16px;height:auto;line-height:1.5em;width:100%}html.h5p-iframe .h5p-fullscreen .h5p-content,html.h5p-iframe .h5p-semi-fullscreen .h5p-content{height:100%}.h5p-content.h5p-no-frame,.h5p-fullscreen .h5p-content,.h5p-semi-fullscreen .h5p-content{border:0}.h5p-container{position:relative;z-index:1}.h5p-iframe-wrapper.h5p-fullscreen{background-color:#000}.h5p-container.h5p-semi-fullscreen,body.h5p-semi-fullscreen{height:100%;position:fixed;width:100%}.h5p-container.h5p-semi-fullscreen{background-color:#fff;left:0;top:0;z-index:101}.h5p-content-controls{margin:0;position:absolute;right:0;top:0;z-index:3}.h5p-fullscreen .h5p-content-controls{display:none}.h5p-content-controls>a:link,.h5p-content-controls>a:visited,a.h5p-disable-fullscreen:link,a.h5p-disable-fullscreen:visited{color:#e5eef6}.h5p-enable-fullscreen:before{content:"\e88c";font-family:H5P}.h5p-disable-fullscreen:before{content:"\e891";font-family:H5P}.h5p-disable-fullscreen,.h5p-enable-fullscreen{background:#000;background:rgba(0,0,0,.3);color:#eee;cursor:pointer;font-size:2em;height:1em;line-height:.975em;text-indent:.04em;width:1.125em}.h5p-disable-fullscreen{height:.9em;line-height:.925em;width:1.1em}.h5p-disable-fullscreen:focus,.h5p-enable-fullscreen:focus{outline-offset:.25em;outline-style:solid;outline-width:1px}.h5p-disable-fullscreen:hover,.h5p-enable-fullscreen:hover{background:rgba(0,0,0,.5)}.h5p-semi-fullscreen .h5p-enable-fullscreen{display:none}div.h5p-fullscreen{height:100%;width:100%}.h5p-iframe-wrapper{height:auto;width:auto}.h5p-fullscreen .h5p-iframe-wrapper,.h5p-semi-fullscreen .h5p-iframe-wrapper{height:100%;width:100%}.h5p-iframe-wrapper.h5p-semi-fullscreen{background:#000;bottom:0;height:auto;left:0;position:fixed;right:0;top:0;width:auto;z-index:100001}.h5p-iframe-wrapper.h5p-semi-fullscreen .buttons{position:absolute;right:0;top:0;z-index:20}.h5p-iframe-wrapper iframe.h5p-iframe{border:0;display:block;height:100%;min-width:100%;overflow:hidden;width:10px;*width:100%;z-index:10}.h5p-content ul.h5p-actions{background:#fafafa;border-bottom:1px solid #eee;border-top:1px solid #eee;box-sizing:border-box;-moz-box-sizing:border-box;clear:both;font-family:Sans-Serif;font-size:12px;height:25px;list-style:none;margin:0;overflow:hidden;padding:0 10px}.h5p-fullscreen .h5p-actions,.h5p-semi-fullscreen .h5p-actions{display:none}.h5p-actions>.h5p-button{background:none;color:#707070;cursor:pointer;float:left;line-height:22px;margin:0 .5em 0 0;outline:none;padding:0 .75em 0 .25em;text-decoration:none;vertical-align:top}.h5p-actions>.h5p-button:hover{color:#333}.h5p-actions .h5p-link:active,.h5p-actions .h5p-link:focus,.h5p-actions>.h5p-button:active,.h5p-actions>.h5p-button:focus{color:#666}.h5p-actions .h5p-link:focus,.h5p-actions>.h5p-button:focus{outline-color:#9ecaed;outline-offset:-2px;outline-style:solid;outline-width:thin}.h5p-actions>.h5p-button:before{font-family:H5P;font-size:20px;line-height:23px;padding-right:0;vertical-align:bottom}.h5p-actions>.h5p-button.h5p-export:before{content:"\e90b"}.h5p-actions>.h5p-button.h5p-copyrights:before{content:"\e88f"}.h5p-actions>.h5p-button.h5p-embed:before{content:"\e892"}.h5p-actions .h5p-link{color:#999;float:right;font-size:2em;line-height:23px;margin-right:0;outline:none;overflow:hidden;text-decoration:none}.h5p-actions .h5p-link:before{content:"\e88e";font-family:H5P;vertical-align:bottom}.h5p-actions>li{list-style:none;margin:0}.h5p-popup-dialog{background:#000;background:rgba(0,0,0,.75);box-sizing:border-box;-moz-box-sizing:border-box;left:0;min-height:100%;opacity:0;padding:2em;position:absolute;top:0;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;width:100%;z-index:100}.h5p-popup-dialog.h5p-open{opacity:1}.h5p-popup-dialog .h5p-inner{background:#fff;box-sizing:border-box;-moz-box-sizing:border-box;height:100%;max-height:100%;position:relative}.h5p-popup-dialog .h5p-inner>h2{background:#eee;border-bottom:1px solid #ccc;box-sizing:border-box;-moz-box-sizing:border-box;color:#656565;display:block;font-size:1.25em;line-height:1.25em;margin:0;padding:.325em .5em .25em;position:absolute;width:100%;z-index:2}.h5p-popup-dialog .h5p-inner>h2>a{font-size:12px;margin-left:1em}.h5p-content-user-data-reset-dialog .h5p-inner,.h5p-embed-dialog .h5p-inner,.h5p-reuse-dialog .h5p-inner{left:50%;max-width:400px;min-width:316px;top:50%;transform:translateX(-50%)}.h5p-embed-dialog .h5p-embed-code-container,.h5p-embed-size{background:#f5f5f5;border:1px solid #ccc;box-shadow:inset 0 1px 2px 0 #d0d0d0;box-sizing:border-box;-moz-box-sizing:border-box;font-family:sans-serif;font-size:.875em;height:2.0714em;letter-spacing:.065em;line-height:1.5em;margin:0;outline:none;overflow:hidden;padding:.375em .5em .25em;resize:none;white-space:pre;width:100%}.h5p-embed-dialog .h5p-embed-code-container:focus{height:5em}.h5p-embed-size{line-height:2em;margin:.5em 0;text-align:right;width:3.5em}.h5p-popup-dialog .h5p-scroll-content{border-top:2.25em solid transparent;box-sizing:border-box;-moz-box-sizing:border-box;color:#555;padding:1em;z-index:1}.h5p-popup-dialog.h5p-open .h5p-scroll-content{height:100%;overflow:auto;overflow-x:hidden;overflow-y:auto}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar{width:8px}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar-track{background:#e0e0e0}.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar-thumb{border-radius:4px;box-shadow:inset 0 0 10px #000}.h5p-popup-dialog .h5p-close{color:#656565;cursor:pointer;font-size:2em;height:1.125em;line-height:1.125em;position:absolute;right:0;text-indent:-.065em;top:0;width:1.125em;z-index:3}.h5p-popup-dialog .h5p-close:after{content:"\e894";font-family:H5P}.h5p-popup-dialog .h5p-close:focus:after,.h5p-popup-dialog .h5p-close:hover:after{color:#454545}.h5p-popup-dialog .h5p-close:active:after{color:#252525}.h5p-poopup-dialog h2{margin:.25em 0 .5em}.h5p-popup-dialog h3{margin:.75em 0 .25em}.h5p-popup-dialog dl{margin:.25em 0 .75em}.h5p-popup-dialog dt{float:left;margin:0 .75em 0 0}.h5p-popup-dialog dt:after{content:":"}.h5p-popup-dialog dd{margin:0}.h5p-expander{cursor:pointer;display:inline-block;font-size:1.125em;margin:.5em 0 0}.h5p-expander:before{content:"+";display:inline-block;font-weight:700;width:1em}.h5p-expander.h5p-open:before{content:"-";text-indent:.125em}.h5p-expander:focus,.h5p-expander:hover{color:#303030}.h5p-expander:active{color:#202020}.h5p-expander-content{display:none}.h5p-expander-content p{margin:.5em 0}.h5p-content-copyrights{border-left:.25em solid #d0d0d0;margin-left:.25em;padding-left:.25em}.h5p-throbber{background:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7) 10px no-repeat;line-height:30px;min-height:30px;padding-left:38px}.h5p-dialog-ok-button{background:#eee;border:2px solid #ccc;cursor:default;float:right;outline:none;padding:.25em .75em .125em}.h5p-dialog-ok-button:focus,.h5p-dialog-ok-button:hover{background:#fafafa}.h5p-dialog-ok-button:active{background:#efe}.h5p-big-button{background:linear-gradient(#fff,#f1f1f2);border:1px solid #dedede;border-radius:.25em;cursor:pointer;display:block;line-height:1.25;padding:1em 1em 1em 3.75em;position:relative;text-align:left;width:100%}.h5p-big-button:before{color:#2747f7;content:"\e893";font-family:h5p;font-size:3em;left:.125em;line-height:1;position:absolute;top:.125em}.h5p-copy-button:before{content:"\e905"}.h5p-big-button:hover{background:#eff1fe;border:1px solid #2747f7}.h5p-big-button:active{background:#dfe4fe;border:1px solid #dedede}.h5p-button-title{color:#2747f7;font-size:15px;font-weight:700;margin-bottom:.5em}.h5p-button-description{color:#757575}.h5p-horizontal-line-text{border-top:1px solid #dadada;color:#474747;line-height:1;margin:1.25em 0;position:relative;text-align:center}.h5p-horizontal-line-text>span{background:#fff;left:50%;padding:.5em;position:absolute;top:-1em;transform:translateX(-50%)}.h5p-toast{background-color:rgba(0,0,0,.9);border-radius:4px;color:#fff;font-size:.75em;line-height:2;opacity:1;padding:0 .5em;pointer-events:none;position:absolute;top:0;transition:opacity 1s;visibility:visible;white-space:nowrap;z-index:110}.h5p-toast-disabled{opacity:0;visibility:hidden}.h5p-content code,.h5peditor code{background:#e0e0e0;border-radius:2px;color:#3d3d3d;padding:0 5px}.h5p-content pre>code,.h5peditor pre>code{background-color:#fafafa;border:1px solid #c7c7c7;border-left-width:4px;display:block;line-height:normal;max-width:100%;overflow:auto;padding:5px;white-space:pre}.h5peditor-semi-fullscreen{bottom:0;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:101}iframe.h5peditor-semi-fullscreen{background:#fff;z-index:100001}.h5p-content.using-mouse :not(textarea):focus{outline:none!important}@keyframes rotate{to{transform:rotate(1turn)}}button.h5p-core-button,button.h5p-core-button:link,button.h5p-core-button:visited{background:#2579c6;border:none;border-radius:2em;box-shadow:none;color:#fff;cursor:pointer;display:inline-block;font-family:Open Sans,sans-serif;font-size:1em;font-weight:600;line-height:1.2;outline:none;padding:.5em 1.25em;text-align:center;text-decoration:none;text-shadow:none;-webkit-transition:initial;transition:initial;vertical-align:initial}button.h5p-core-button:focus{background:#1f67a8}button.h5p-core-button:hover{background:rgba(31,103,168,.83)}button.h5p-core-button:active{background:#104888}button.h5p-core-button:before{font-family:H5P;font-size:1.5em;line-height:.7;padding-right:.15em;vertical-align:middle}button.h5p-core-cancel-button,button.h5p-core-cancel-button:link,button.h5p-core-cancel-button:visited{background:none;border:none;color:#a00;cursor:pointer;font-size:1em;margin-right:1em;text-decoration:none}button.h5p-core-cancel-button:focus,button.h5p-core-cancel-button:hover{background:none;border:none;color:#e40000}.h5p-confirmation-dialog-background{background:rgba(44,44,44,.9);height:100%;left:0;opacity:1;position:fixed;top:0;-webkit-transition:opacity .1s,0s linear,visibility 0s linear 0s;transition:opacity .1s linear 0s,visibility 0s linear 0s;visibility:visible;width:100%;z-index:201}.h5p-confirmation-dialog-background.hidden{display:none}.h5p-confirmation-dialog-background.hiding{opacity:0;-webkit-transition:opacity .1s,0s linear,visibility 0s linear .1s;transition:opacity .1s linear 0s,visibility 0s linear .1s;visibility:hidden}.h5p-confirmation-dialog-popup:focus{outline:none}.h5p-confirmation-dialog-popup{box-shadow:0 0 6px 6px hsla(0,0%,4%,.3);box-sizing:border-box;color:#555;display:flex;flex-direction:column;justify-content:center;left:50%;max-width:35em;min-width:25em;position:absolute;top:2em;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);-webkit-transition:transform .1s ease-in;transition:transform .1s ease-in}.h5p-confirmation-dialog-popup.hidden{-webkit-transform:translate(-50%,50%);-ms-transform:translate(-50%,50%);transform:translate(-50%,50%)}.h5p-confirmation-dialog-header{background:#fff;color:#356593;padding:1.5em}.h5p-confirmation-dialog-header-text{font-size:1.25em}.h5p-confirmation-dialog-body{background:#fafbfc;border-top:1px solid #dde0e9;padding:1.25em 1.5em}.h5p-confirmation-dialog-text{margin-bottom:1.5em}.h5p-confirmation-dialog-buttons{float:right}button.h5p-confirmation-dialog-exit,button.h5p-confirmation-dialog-exit:link,button.h5p-confirmation-dialog-exit:visited{background:none;border:none;color:#fff;cursor:pointer;font-size:2.5em;position:absolute;right:-1.15em;text-decoration:none;top:-.9em}button.h5p-confirmation-dialog-exit:focus,button.h5p-confirmation-dialog-exit:hover{color:#e4ecf5}.h5p-confirmation-dialog-exit:before{content:"\e890";font-family:H5P}.h5p-core-button.h5p-confirmation-dialog-confirm-button{margin-bottom:0;padding-left:.75em}.h5p-core-button.h5p-confirmation-dialog-confirm-button:before{content:"\e601";display:inline-block;margin-top:-6px}.h5p-confirmation-dialog-popup.offline .h5p-confirmation-dialog-buttons{float:none;text-align:center}.h5p-confirmation-dialog-popup.offline .count-down{color:#000;font-family:Arial;margin-top:.15em}.h5p-confirmation-dialog-popup.offline .h5p-confirmation-dialog-confirm-button:before{content:"\e90b";font-weight:400;vertical-align:text-bottom}.throbber-wrapper{background:rgba(44,44,44,.9);display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.throbber-wrapper.show{display:block}.throbber-wrapper .throbber-container{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.throbber-wrapper .sending-requests-throbber{left:50%;position:absolute;top:7em;transform:translateX(-50%)}.throbber-wrapper .sending-requests-throbber:before{animation:request-throbber 1.5s linear infinite;color:#fff;content:"\e90b";display:block;font-family:H5P;font-size:10em}@keyframes request-throbber{0%{transform:rotate(0)}to{transform:rotate(359deg)}} \ No newline at end of file diff --git a/kolibri/core/content/static/h5p/h5p-core-27-7a1c5248f2f9a25c212a.eot b/kolibri/core/content/static/h5p/h5p-core-27-7a1c5248f2f9a25c212a.eot deleted file mode 100644 index c2b599f0b78..00000000000 Binary files a/kolibri/core/content/static/h5p/h5p-core-27-7a1c5248f2f9a25c212a.eot and /dev/null differ diff --git a/kolibri/core/content/static/h5p/h5p-core-27-98b03255974cc2077c75.svg b/kolibri/core/content/static/h5p/h5p-core-27-98b03255974cc2077c75.svg deleted file mode 100644 index 51f556a2a1b..00000000000 --- a/kolibri/core/content/static/h5p/h5p-core-27-98b03255974cc2077c75.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -{ - "fontFamily": "h5p-core-26", - "description": "Font generated by IcoMoon.", - "majorVersion": 1, - "minorVersion": 1, - "copyright": "H5P", - "fontURL": "", - "version": "Version 1.1", - "fontId": "h5p-core-26", - "psName": "h5p-core-26", - "subFamily": "Regular", - "fullName": "h5p-core-26" -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kolibri/core/content/static/h5p/h5p-core-27-9e30e42e32b655ae0ee6.woff b/kolibri/core/content/static/h5p/h5p-core-27-9e30e42e32b655ae0ee6.woff deleted file mode 100644 index c5187235262..00000000000 --- a/kolibri/core/content/static/h5p/h5p-core-27-9e30e42e32b655ae0ee6.woff +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d6c1d21d0783541c57660daab662807912a8d60fd0489b68b49e9b22ddf134a -size 25676 diff --git a/kolibri/core/content/static/h5p/h5p-core-30-29b394a9fedbc3f0afc1.svg b/kolibri/core/content/static/h5p/h5p-core-30-29b394a9fedbc3f0afc1.svg new file mode 100644 index 00000000000..8be85fa677b --- /dev/null +++ b/kolibri/core/content/static/h5p/h5p-core-30-29b394a9fedbc3f0afc1.svg @@ -0,0 +1,123 @@ + + + + + + +{ + "fontFamily": "h5p-core-30", + "description": "Font generated by IcoMoon.", + "copyright": "H5P", + "majorVersion": 1, + "minorVersion": 9, + "version": "Version 1.9", + "fontId": "h5p-core-30", + "psName": "h5p-core-30", + "subFamily": "Regular", + "fullName": "h5p-core-30" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kolibri/core/content/static/h5p/h5p-core-30-53117a8758d6c0b7b71a.woff b/kolibri/core/content/static/h5p/h5p-core-30-53117a8758d6c0b7b71a.woff new file mode 100644 index 00000000000..f7c612aed17 --- /dev/null +++ b/kolibri/core/content/static/h5p/h5p-core-30-53117a8758d6c0b7b71a.woff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5eea868e312999802ec2b8d356a57495bd15fdc7c1abc28e839db9e777d31bb4 +size 29576 diff --git a/kolibri/core/content/static/h5p/h5p-core-30-e56c8e46d3671f073422.eot b/kolibri/core/content/static/h5p/h5p-core-30-e56c8e46d3671f073422.eot new file mode 100644 index 00000000000..0ec19be77b7 Binary files /dev/null and b/kolibri/core/content/static/h5p/h5p-core-30-e56c8e46d3671f073422.eot differ diff --git a/kolibri/core/content/static/h5p/h5p-b73def83bce3738b7612.js b/kolibri/core/content/static/h5p/h5p-d373c7020a7f59b06af7.js similarity index 69% rename from kolibri/core/content/static/h5p/h5p-b73def83bce3738b7612.js rename to kolibri/core/content/static/h5p/h5p-d373c7020a7f59b06af7.js index e929b91f49e..418767cbcc4 100644 --- a/kolibri/core/content/static/h5p/h5p-b73def83bce3738b7612.js +++ b/kolibri/core/content/static/h5p/h5p-d373c7020a7f59b06af7.js @@ -1,2 +1,2 @@ -/*! For license information please see h5p-b73def83bce3738b7612.js.LICENSE.txt */ -!function(){var __webpack_modules__={320:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}module=__webpack_require__.nmd(module),function(global,factory){"use strict";"object"===_typeof(module)&&"object"===_typeof(module.exports)?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,(function(window,noGlobal){"use strict";var arr=[],getProto=Object.getPrototypeOf,_slice=arr.slice,flat=arr.flat?function(array){return arr.flat.call(array)}:function(array){return arr.concat.apply([],array)},push=arr.push,indexOf=arr.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,fnToString=hasOwn.toString,ObjectFunctionString=fnToString.call(Object),support={},isFunction=function(obj){return"function"==typeof obj&&"number"!=typeof obj.nodeType},isWindow=function(obj){return null!=obj&&obj===obj.window},document=window.document,preservedScriptAttributes={type:!0,src:!0,nonce:!0,noModule:!0};function DOMEval(code,node,doc){var i,val,script=(doc=doc||document).createElement("script");if(script.text=code,node)for(i in preservedScriptAttributes)(val=node[i]||node.getAttribute&&node.getAttribute(i))&&script.setAttribute(i,val);doc.head.appendChild(script).parentNode.removeChild(script)}function toType(obj){return null==obj?obj+"":"object"===_typeof(obj)||"function"==typeof obj?class2type[toString.call(obj)]||"object":_typeof(obj)}var _jQuery2=function(selector,context){return new _jQuery2.fn.init(selector,context)};function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);return!isFunction(obj)&&!isWindow(obj)&&("array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj)}_jQuery2.fn=_jQuery2.prototype={jquery:"3.5.1",constructor:_jQuery2,length:0,toArray:function(){return _slice.call(this)},get:function(num){return null==num?_slice.call(this):num<0?this[num+this.length]:this[num]},pushStack:function(elems){var ret=_jQuery2.merge(this.constructor(),elems);return ret.prevObject=this,ret},each:function(callback){return _jQuery2.each(this,callback)},map:function(callback){return this.pushStack(_jQuery2.map(this,(function(elem,i){return callback.call(elem,i,elem)})))},slice:function(){return this.pushStack(_slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_jQuery2.grep(this,(function(_elem,i){return(i+1)%2})))},odd:function(){return this.pushStack(_jQuery2.grep(this,(function(_elem,i){return i%2})))},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},rhtml=/HTML$/i,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),funescape=function(escape,nonHex){var high="0x"+escape.slice(1)-65536;return nonHex||(high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320))},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){return asCodePoint?"\0"===ch?"�":ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ":"\\"+ch},unloadHandler=function(){setDocument()},inDisabledFieldset=addCombinator((function(elem){return!0===elem.disabled&&"fieldset"===elem.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){pushNative.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;if(results=results||[],"string"!=typeof selector||!selector||1!==nodeType&&9!==nodeType&&11!==nodeType)return results;if(!seed&&(setDocument(context),context=context||document,documentIsHTML)){if(11!==nodeType&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(9===nodeType){if(!(elem=context.getElementById(m)))return results;if(elem.id===m)return results.push(elem),results}else if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&!nonnativeSelectorCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))&&(1!==nodeType||"object"!==context.nodeName.toLowerCase())){if(newSelector=selector,newContext=context,1===nodeType&&(rdescend.test(selector)||rcombinators.test(selector))){for((newContext=rsibling.test(selector)&&testContext(context.parentNode)||context)===context&&support.scope||((nid=context.getAttribute("id"))?nid=nid.replace(rcssescape,fcssescape):context.setAttribute("id",nid=expando)),i=(groups=tokenize(selector)).length;i--;)groups[i]=(nid?"#"+nid:":scope")+" "+toSelector(groups[i]);newSelector=groups.join(",")}try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){nonnativeSelectorCache(selector,!0)}finally{nid===expando&&context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];return function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el)}catch(e){return!1}finally{el.parentNode&&el.parentNode.removeChild(el),el=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=arr.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){return"input"===elem.nodeName.toLowerCase()&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){return"form"in elem?elem.parentNode&&!1===elem.disabled?"label"in elem?"label"in elem.parentNode?elem.parentNode.disabled===disabled:elem.disabled===disabled:elem.isDisabled===disabled||elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled:elem.disabled===disabled:"label"in elem&&elem.disabled===disabled}}function createPositionalPseudo(fn){return markFunction((function(argument){return argument=+argument,markFunction((function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))}))}))}function testContext(context){return context&&void 0!==context.getElementsByTagName&&context}for(i in support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var namespace=elem.namespaceURI,docElem=(elem.ownerDocument||elem).documentElement;return!rhtml.test(namespace||docElem&&docElem.nodeName||"HTML")},setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;return doc!=document&&9===doc.nodeType&&doc.documentElement?(docElem=(document=doc).documentElement,documentIsHTML=!isXML(document),preferredDoc!=document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow&&(subWindow.addEventListener?subWindow.addEventListener("unload",unloadHandler,!1):subWindow.attachEvent&&subWindow.attachEvent("onunload",unloadHandler)),support.scope=assert((function(el){return docElem.appendChild(el).appendChild(document.createElement("div")),void 0!==el.querySelectorAll&&!el.querySelectorAll(":scope fieldset div").length})),support.attributes=assert((function(el){return el.className="i",!el.getAttribute("className")})),support.getElementsByTagName=assert((function(el){return el.appendChild(document.createComment("")),!el.getElementsByTagName("*").length})),support.getElementsByClassName=rnative.test(document.getElementsByClassName),support.getById=assert((function(el){return docElem.appendChild(el).id=expando,!document.getElementsByName||!document.getElementsByName(expando).length})),support.getById?(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}},Expr.find.ID=function(id,context){if(void 0!==context.getElementById&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}):(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=void 0!==elem.getAttributeNode&&elem.getAttributeNode("id");return node&&node.value===attrId}},Expr.find.ID=function(id,context){if(void 0!==context.getElementById&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){if((node=elem.getAttributeNode("id"))&&node.value===id)return[elem];for(elems=context.getElementsByName(id),i=0;elem=elems[i++];)if((node=elem.getAttributeNode("id"))&&node.value===id)return[elem]}return[]}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return void 0!==context.getElementsByTagName?context.getElementsByTagName(tag):support.qsa?context.querySelectorAll(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(void 0!==context.getElementsByClassName&&documentIsHTML)return context.getElementsByClassName(className)},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(document.querySelectorAll))&&(assert((function(el){var input;docElem.appendChild(el).innerHTML="",el.querySelectorAll("[msallowcapture^='']").length&&rbuggyQSA.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),el.querySelectorAll("[selected]").length||rbuggyQSA.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+booleans+")"),el.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~="),(input=document.createElement("input")).setAttribute("name",""),el.appendChild(input),el.querySelectorAll("[name='']").length||rbuggyQSA.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),el.querySelectorAll(":checked").length||rbuggyQSA.push(":checked"),el.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]"),el.querySelectorAll("\\\f"),rbuggyQSA.push("[\\r\\n\\f]")})),assert((function(el){el.innerHTML="";var input=document.createElement("input");input.setAttribute("type","hidden"),el.appendChild(input).setAttribute("name","D"),el.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==el.querySelectorAll(":enabled").length&&rbuggyQSA.push(":enabled",":disabled"),docElem.appendChild(el).disabled=!0,2!==el.querySelectorAll(":disabled").length&&rbuggyQSA.push(":enabled",":disabled"),el.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")}))),(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert((function(el){support.disconnectedMatch=matches.call(el,"*"),matches.call(el,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)})),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare||(1&(compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1)||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a==document||a.ownerDocument==preferredDoc&&contains(preferredDoc,a)?-1:b==document||b.ownerDocument==preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0:4&compare?-1:1)}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a==document?-1:b==document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]==preferredDoc?-1:bp[i]==preferredDoc?1:0},document):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)},Sizzle.matchesSelector=function(elem,expr){if(setDocument(elem),support.matchesSelector&&documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){nonnativeSelectorCache(expr,!0)}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!=document&&setDocument(context),contains(context,elem)},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!=document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape)},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+className+"("+whitespace+"|$)"))&&classCache(className,(function(elem){return pattern.test("string"==typeof elem.className&&elem.className||void 0!==elem.getAttribute&&elem.getAttribute("class")||"")}))},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:!operator||(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:"|="===operator&&(result===check||result.slice(0,check.length+1)===check+"-"))}},CHILD:function(type,what,_argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,_context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=!1;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(diff=(nodeIndex=(cache=(uniqueCache=(outerCache=(node=parent)[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]||[])[0]===dirruns&&cache[1])&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(diff=nodeIndex=(cache=(uniqueCache=(outerCache=(node=elem)[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]||[])[0]===dirruns&&cache[1]),!1===diff)for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&((uniqueCache=(outerCache=node[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]=[dirruns,diff]),node!==elem)););return(diff-=last)===first||diff%first==0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction((function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)seed[idx=indexOf(seed,matched[i])]=!(matches[idx]=matched[i])})):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction((function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction((function(seed,matches,_context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))})):function(elem,_context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}})),has:markFunction((function(selector){return function(elem){return Sizzle(selector,elem).length>0}})),contains:markFunction((function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||getText(elem)).indexOf(text)>-1}})),lang:markFunction((function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return(elemLang=elemLang.toLowerCase())===lang||0===elemLang.indexOf(lang+"-")}while((elem=elem.parentNode)&&1===elem.nodeType);return!1}})),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(!1),disabled:createDisabledPseudo(!0),checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,!0===elem.selected},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo((function(){return[0]})),last:createPositionalPseudo((function(_matchIndexes,length){return[length-1]})),eq:createPositionalPseudo((function(_matchIndexes,length,argument){return[argument<0?argument+length:argument]})),even:createPositionalPseudo((function(matchIndexes,length){for(var i=0;ilength?length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes})),gt:createPositionalPseudo((function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;i-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)}))}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator((function(elem){return elem===checkContext}),implicitRelative,!0),matchAnyContext=addCombinator((function(elem){return indexOf(checkContext,elem)>-1}),implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context==document||context||outermost);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0,context||elem.ownerDocument==document||(setDocument(elem),xml=!documentIsHTML);matcher=elementMatchers[j++];)if(matcher(elem,context||document,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}(elementMatchers,setMatchers)),cached.selector=selector}return cached},select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if((tokens=match[0]=match[0].slice(0)).length>2&&"ID"===(token=tokens[0]).type&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(!(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0]))return results;compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),!(selector=seed.length&&toSelector(tokens)))return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context),results},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert((function(el){return 1&el.compareDocumentPosition(document.createElement("fieldset"))})),assert((function(el){return el.innerHTML="","#"===el.firstChild.getAttribute("href")}))||addHandle("type|href|height|width",(function(elem,name,isXML){if(!isXML)return elem.getAttribute(name,"type"===name.toLowerCase()?1:2)})),support.attributes&&assert((function(el){return el.innerHTML="",el.firstChild.setAttribute("value",""),""===el.firstChild.getAttribute("value")}))||addHandle("value",(function(elem,_name,isXML){if(!isXML&&"input"===elem.nodeName.toLowerCase())return elem.defaultValue})),assert((function(el){return null==el.getAttribute("disabled")}))||addHandle(booleans,(function(elem,name,isXML){var val;if(!isXML)return!0===elem[name]?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null})),Sizzle}(window);_jQuery2.find=Sizzle,_jQuery2.expr=Sizzle.selectors,_jQuery2.expr[":"]=_jQuery2.expr.pseudos,_jQuery2.uniqueSort=_jQuery2.unique=Sizzle.uniqueSort,_jQuery2.text=Sizzle.getText,_jQuery2.isXMLDoc=Sizzle.isXML,_jQuery2.contains=Sizzle.contains,_jQuery2.escapeSelector=Sizzle.escape;var dir=function(elem,_dir,until){for(var matched=[],truncate=void 0!==until;(elem=elem[_dir])&&9!==elem.nodeType;)if(1===elem.nodeType){if(truncate&&_jQuery2(elem).is(until))break;matched.push(elem)}return matched},_siblings=function(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched},rneedsContext=_jQuery2.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(elements,qualifier,not){return isFunction(qualifier)?_jQuery2.grep(elements,(function(elem,i){return!!qualifier.call(elem,i,elem)!==not})):qualifier.nodeType?_jQuery2.grep(elements,(function(elem){return elem===qualifier!==not})):"string"!=typeof qualifier?_jQuery2.grep(elements,(function(elem){return indexOf.call(qualifier,elem)>-1!==not})):_jQuery2.filter(qualifier,elements,not)}_jQuery2.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?_jQuery2.find.matchesSelector(elem,expr)?[elem]:[]:_jQuery2.find.matches(expr,_jQuery2.grep(elems,(function(elem){return 1===elem.nodeType})))},_jQuery2.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if("string"!=typeof selector)return this.pushStack(_jQuery2(selector).filter((function(){for(i=0;i1?_jQuery2.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?_jQuery2(selector):selector||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_jQuery2.fn.init=function(selector,context,root){var match,elem;if(!selector)return this;if(root=root||rootjQuery,"string"==typeof selector){if(!(match="<"===selector[0]&&">"===selector[selector.length-1]&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector))||!match[1]&&context)return!context||context.jquery?(context||root).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof _jQuery2?context[0]:context,_jQuery2.merge(this,_jQuery2.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&_jQuery2.isPlainObject(context))for(match in context)isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}return(elem=document.getElementById(match[2]))&&(this[0]=elem,this.length=1),this}return selector.nodeType?(this[0]=selector,this.length=1,this):isFunction(selector)?void 0!==root.ready?root.ready(selector):selector(_jQuery2):_jQuery2.makeArray(selector,this)}).prototype=_jQuery2.fn,rootjQuery=_jQuery2(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}_jQuery2.fn.extend({has:function(target){var targets=_jQuery2(target,this),l=targets.length;return this.filter((function(){for(var i=0;i-1:1===cur.nodeType&&_jQuery2.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?_jQuery2.uniqueSort(matched):matched)},index:function(elem){return elem?"string"==typeof elem?indexOf.call(_jQuery2(elem),this[0]):indexOf.call(this,elem.jquery?elem[0]:elem):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(_jQuery2.uniqueSort(_jQuery2.merge(this.get(),_jQuery2(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),_jQuery2.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,_i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,_i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,_i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return _siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return _siblings(elem.firstChild)},contents:function(elem){return null!=elem.contentDocument&&getProto(elem.contentDocument)?elem.contentDocument:(nodeName(elem,"template")&&(elem=elem.content||elem),_jQuery2.merge([],elem.childNodes))}},(function(name,fn){_jQuery2.fn[name]=function(until,selector){var matched=_jQuery2.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(matched=_jQuery2.filter(selector,matched)),this.length>1&&(guaranteedUnique[name]||_jQuery2.uniqueSort(matched),rparentsprev.test(name)&&matched.reverse()),this.pushStack(matched)}}));var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{value&&isFunction(method=value.promise)?method.call(value).done(resolve).fail(reject):value&&isFunction(method=value.then)?method.call(value,resolve,reject):resolve.apply(void 0,[value].slice(noValue))}catch(value){reject.apply(void 0,[value])}}_jQuery2.Callbacks=function(options){options="string"==typeof options?function(options){var object={};return _jQuery2.each(options.match(rnothtmlwhite)||[],(function(_,flag){object[flag]=!0})),object}(options):_jQuery2.extend({},options);var firing,memory,_fired,_locked,list=[],queue=[],firingIndex=-1,fire=function(){for(_locked=_locked||options.once,_fired=firing=!0;queue.length;firingIndex=-1)for(memory=queue.shift();++firingIndex-1;)list.splice(index,1),index<=firingIndex&&firingIndex--})),this},has:function(fn){return fn?_jQuery2.inArray(fn,list)>-1:list.length>0},empty:function(){return list&&(list=[]),this},disable:function(){return _locked=queue=[],list=memory="",this},disabled:function(){return!list},lock:function(){return _locked=queue=[],memory||firing||(list=memory=""),this},locked:function(){return!!_locked},fireWith:function(context,args){return _locked||(args=[context,(args=args||[]).slice?args.slice():args],queue.push(args),firing||fire()),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!_fired}};return self},_jQuery2.extend({Deferred:function(func){var tuples=[["notify","progress",_jQuery2.Callbacks("memory"),_jQuery2.Callbacks("memory"),2],["resolve","done",_jQuery2.Callbacks("once memory"),_jQuery2.Callbacks("once memory"),0,"resolved"],["reject","fail",_jQuery2.Callbacks("once memory"),_jQuery2.Callbacks("once memory"),1,"rejected"]],_state="pending",_promise={state:function(){return _state},always:function(){return deferred.done(arguments).fail(arguments),this},catch:function(fn){return _promise.then(null,fn)},pipe:function(){var fns=arguments;return _jQuery2.Deferred((function(newDefer){_jQuery2.each(tuples,(function(_i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]]((function(){var returned=fn&&fn.apply(this,arguments);returned&&isFunction(returned.promise)?returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject):newDefer[tuple[0]+"With"](this,fn?[returned]:arguments)}))})),fns=null})).promise()},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(!(depth=maxDepth&&(handler!==Thrower&&(that=void 0,args=[e]),deferred.rejectWith(that,args))}};depth?process():(_jQuery2.Deferred.getStackHook&&(process.stackTrace=_jQuery2.Deferred.getStackHook()),window.setTimeout(process))}}return _jQuery2.Deferred((function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith)),tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity)),tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower))})).promise()},promise:function(obj){return null!=obj?_jQuery2.extend(obj,_promise):_promise}},deferred={};return _jQuery2.each(tuples,(function(i,tuple){var list=tuple[2],stateString=tuple[5];_promise[tuple[1]]=list.add,stateString&&list.add((function(){_state=stateString}),tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock),list.add(tuple[3].fire),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?void 0:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith})),_promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=_slice.call(arguments),master=_jQuery2.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this,resolveValues[i]=arguments.length>1?_slice.call(arguments):value,--remaining||master.resolveWith(resolveContexts,resolveValues)}};if(remaining<=1&&(adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining),"pending"===master.state()||isFunction(resolveValues[i]&&resolveValues[i].then)))return master.then();for(;i--;)adoptValue(resolveValues[i],updateFunc(i),master.reject);return master.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_jQuery2.Deferred.exceptionHook=function(error,stack){window.console&&window.console.warn&&error&&rerrorNames.test(error.name)&&window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack)},_jQuery2.readyException=function(error){window.setTimeout((function(){throw error}))};var readyList=_jQuery2.Deferred();function completed(){document.removeEventListener("DOMContentLoaded",completed),window.removeEventListener("load",completed),_jQuery2.ready()}_jQuery2.fn.ready=function(fn){return readyList.then(fn).catch((function(error){_jQuery2.readyException(error)})),this},_jQuery2.extend({isReady:!1,readyWait:1,ready:function(wait){(!0===wait?--_jQuery2.readyWait:_jQuery2.isReady)||(_jQuery2.isReady=!0,!0!==wait&&--_jQuery2.readyWait>0||readyList.resolveWith(document,[_jQuery2]))}}),_jQuery2.ready.then=readyList.then,"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(_jQuery2.ready):(document.addEventListener("DOMContentLoaded",completed),window.addEventListener("load",completed));var _access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=null==key;if("object"===toType(key))for(i in chainable=!0,key)_access(elems,fn,i,key[i],!0,emptyGet,raw);else if(void 0!==value&&(chainable=!0,isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,_key,value){return bulk.call(_jQuery2(elem),value)})),fn))for(;i1,null,!0)},removeData:function(key){return this.each((function(){dataUser.remove(this,key)}))}}),_jQuery2.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=dataPriv.get(elem,type),data&&(!queue||Array.isArray(data)?queue=dataPriv.access(elem,type,_jQuery2.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=_jQuery2.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=_jQuery2._queueHooks(elem,type);"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,(function(){_jQuery2.dequeue(elem,type)}),hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:_jQuery2.Callbacks("once memory").add((function(){dataPriv.remove(elem,[type+"queue",key])}))})}}),_jQuery2.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length\x20\t\r\n\f]*)/i,rscriptType=/^$|^module$|\/(?:java|ecma)script/i;div=document.createDocumentFragment().appendChild(document.createElement("div")),(input=document.createElement("input")).setAttribute("type","radio"),input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,div.innerHTML="",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,div.innerHTML="",support.option=!!div.lastChild;var wrapMap={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function getAll(context,tag){var ret;return ret=void 0!==context.getElementsByTagName?context.getElementsByTagName(tag||"*"):void 0!==context.querySelectorAll?context.querySelectorAll(tag||"*"):[],void 0===tag||tag&&nodeName(context,tag)?_jQuery2.merge([context],ret):ret}function setGlobalEval(elems,refElements){for(var i=0,l=elems.length;i",""]);var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){for(var elem,tmp,tag,wrap,attached,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;i-1)ignored&&ignored.push(elem);else if(attached=isAttached(elem),tmp=getAll(fragment.appendChild(elem),"script"),attached&&setGlobalEval(tmp),scripts)for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return fragment}var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return!0}function returnFalse(){return!1}function expectSync(elem,type){return elem===function(){try{return document.activeElement}catch(err){}}()==("focus"===type)}function _on(elem,types,selector,data,fn,one){var origFn,type;if("object"===_typeof(types)){for(type in"string"!=typeof selector&&(data=data||selector,selector=void 0),types)_on(elem,type,selector,data,types[type],one);return elem}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),!1===fn)fn=returnFalse;else if(!fn)return elem;return 1===one&&(origFn=fn,fn=function(event){return _jQuery2().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=_jQuery2.guid++)),elem.each((function(){_jQuery2.event.add(this,types,fn,data,selector)}))}function leverageNative(el,type,expectSync){expectSync?(dataPriv.set(el,type,!1),_jQuery2.event.add(el,type,{namespace:!1,handler:function(event){var notAsync,result,saved=dataPriv.get(this,type);if(1&event.isTrigger&&this[type]){if(saved.length)(_jQuery2.event.special[type]||{}).delegateType&&event.stopPropagation();else if(saved=_slice.call(arguments),dataPriv.set(this,type,saved),notAsync=expectSync(this,type),this[type](),saved!==(result=dataPriv.get(this,type))||notAsync?dataPriv.set(this,type,!1):result={},saved!==result)return event.stopImmediatePropagation(),event.preventDefault(),result.value}else saved.length&&(dataPriv.set(this,type,{value:_jQuery2.event.trigger(_jQuery2.extend(saved[0],_jQuery2.Event.prototype),saved.slice(1),this)}),event.stopImmediatePropagation())}})):void 0===dataPriv.get(el,type)&&_jQuery2.event.add(el,type,returnTrue)}_jQuery2.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(acceptData(elem))for(handler.handler&&(handler=(handleObjIn=handler).handler,selector=handleObjIn.selector),selector&&_jQuery2.find.matchesSelector(documentElement,selector),handler.guid||(handler.guid=_jQuery2.guid++),(events=elemData.events)||(events=elemData.events=Object.create(null)),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return void 0!==_jQuery2&&_jQuery2.event.triggered!==e.type?_jQuery2.event.dispatch.apply(elem,arguments):void 0}),t=(types=(types||"").match(rnothtmlwhite)||[""]).length;t--;)type=origType=(tmp=rtypenamespace.exec(types[t])||[])[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=_jQuery2.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=_jQuery2.event.special[type]||{},handleObj=_jQuery2.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&_jQuery2.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||((handlers=events[type]=[]).delegateCount=0,special.setup&&!1!==special.setup.call(elem,data,namespaces,eventHandle)||elem.addEventListener&&elem.addEventListener(type,eventHandle)),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),_jQuery2.event.global[type]=!0)},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(elemData&&(events=elemData.events)){for(t=(types=(types||"").match(rnothtmlwhite)||[""]).length;t--;)if(type=origType=(tmp=rtypenamespace.exec(types[t])||[])[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=_jQuery2.event.special[type]||{},handlers=events[type=(selector?special.delegateType:special.bindType)||type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&!1!==special.teardown.call(elem,namespaces,elemData.handle)||_jQuery2.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)_jQuery2.event.remove(elem,type+types[t],handler,selector,!0);_jQuery2.isEmptyObject(events)&&dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),event=_jQuery2.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=_jQuery2.event.special[event.type]||{};for(args[0]=event,i=1;i=1))for(;cur!==this;cur=cur.parentNode||this)if(1===cur.nodeType&&("click"!==event.type||!0!==cur.disabled)){for(matchedHandlers=[],matchedSelectors={},i=0;i-1:_jQuery2.find(sel,this,null,[cur]).length),matchedSelectors[sel]&&matchedHandlers.push(handleObj);matchedHandlers.length&&handlerQueue.push({elem:cur,handlers:matchedHandlers})}return cur=this,delegateCount<_handlers.length&&handlerQueue.push({elem:cur,handlers:_handlers.slice(delegateCount)}),handlerQueue},addProp:function(name,hook){Object.defineProperty(_jQuery2.Event.prototype,name,{enumerable:!0,configurable:!0,get:isFunction(hook)?function(){if(this.originalEvent)return hook(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[name]},set:function(value){Object.defineProperty(this,name,{enumerable:!0,configurable:!0,writable:!0,value:value})}})},fix:function(originalEvent){return originalEvent[_jQuery2.expando]?originalEvent:new _jQuery2.Event(originalEvent)},special:{load:{noBubble:!0},click:{setup:function(data){var el=this||data;return rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")&&leverageNative(el,"click",returnTrue),!1},trigger:function(data){var el=this||data;return rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")&&leverageNative(el,"click"),!0},_default:function(event){var target=event.target;return rcheckableType.test(target.type)&&target.click&&nodeName(target,"input")&&dataPriv.get(target,"click")||nodeName(target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&event.originalEvent&&(event.originalEvent.returnValue=event.result)}}}},_jQuery2.removeEvent=function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle)},_jQuery2.Event=function(src,props){if(!(this instanceof _jQuery2.Event))return new _jQuery2.Event(src,props);src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&!1===src.returnValue?returnTrue:returnFalse,this.target=src.target&&3===src.target.nodeType?src.target.parentNode:src.target,this.currentTarget=src.currentTarget,this.relatedTarget=src.relatedTarget):this.type=src,props&&_jQuery2.extend(this,props),this.timeStamp=src&&src.timeStamp||Date.now(),this[_jQuery2.expando]=!0},_jQuery2.Event.prototype={constructor:_jQuery2.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},_jQuery2.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(event){var button=event.button;return null==event.which&&rkeyEvent.test(event.type)?null!=event.charCode?event.charCode:event.keyCode:!event.which&&void 0!==button&&rmouseEvent.test(event.type)?1&button?1:2&button?3:4&button?2:0:event.which}},_jQuery2.event.addProp),_jQuery2.each({focus:"focusin",blur:"focusout"},(function(type,delegateType){_jQuery2.event.special[type]={setup:function(){return leverageNative(this,type,expectSync),!1},trigger:function(){return leverageNative(this,type),!0},delegateType:delegateType}})),_jQuery2.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(orig,fix){_jQuery2.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,related=event.relatedTarget,handleObj=event.handleObj;return related&&(related===this||_jQuery2.contains(this,related))||(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}})),_jQuery2.fn.extend({on:function(types,selector,data,fn){return _on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return _on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,_jQuery2(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"===_typeof(types)){for(type in types)this.off(type,selector,types[type]);return this}return!1!==selector&&"function"!=typeof selector||(fn=selector,selector=void 0),!1===fn&&(fn=returnFalse),this.each((function(){_jQuery2.event.remove(this,types,fn,selector)}))}});var rnoInnerhtml=/\s*$/g;function manipulationTarget(elem,content){return nodeName(elem,"table")&&nodeName(11!==content.nodeType?content:content.firstChild,"tr")&&_jQuery2(elem).children("tbody")[0]||elem}function disableScript(elem){return elem.type=(null!==elem.getAttribute("type"))+"/"+elem.type,elem}function restoreScript(elem){return"true/"===(elem.type||"").slice(0,5)?elem.type=elem.type.slice(5):elem.removeAttribute("type"),elem}function cloneCopyEvent(src,dest){var i,l,type,udataOld,udataCur,events;if(1===dest.nodeType){if(dataPriv.hasData(src)&&(events=dataPriv.get(src).events))for(type in dataPriv.remove(dest,"handle events"),events)for(i=0,l=events[type].length;i1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return collection.each((function(index){var self=collection.eq(index);valueIsFunction&&(args[0]=value.call(this,index,self.html())),domManip(self,args,callback,ignored)}));if(l&&(first=(fragment=buildFragment(args,collection[0].ownerDocument,!1,collection,ignored)).firstChild,1===fragment.childNodes.length&&(fragment=first),first||ignored)){for(hasScripts=(scripts=_jQuery2.map(getAll(fragment,"script"),disableScript)).length;i0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),clone},cleanData:function(elems){for(var data,elem,type,special=_jQuery2.event.special,i=0;void 0!==(elem=elems[i]);i++)if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events)for(type in data.events)special[type]?_jQuery2.event.remove(elem,type):_jQuery2.removeEvent(elem,type,data.handle);elem[dataPriv.expando]=void 0}elem[dataUser.expando]&&(elem[dataUser.expando]=void 0)}}}),_jQuery2.fn.extend({detach:function(selector){return _remove(this,selector,!0)},remove:function(selector){return _remove(this,selector)},text:function(value){return _access(this,(function(value){return void 0===value?_jQuery2.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=value)}))}),null,value,arguments.length)},append:function(){return domManip(this,arguments,(function(elem){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||manipulationTarget(this,elem).appendChild(elem)}))},prepend:function(){return domManip(this,arguments,(function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}}))},before:function(){return domManip(this,arguments,(function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)}))},after:function(){return domManip(this,arguments,(function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)}))},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++)1===elem.nodeType&&(_jQuery2.cleanData(getAll(elem,!1)),elem.textContent="");return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null!=dataAndEvents&&dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map((function(){return _jQuery2.clone(this,dataAndEvents,deepDataAndEvents)}))},html:function(value){return _access(this,(function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value&&1===elem.nodeType)return elem.innerHTML;if("string"==typeof value&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=_jQuery2.htmlPrefilter(value);try{for(;i3,documentElement.removeChild(table)),reliableTrDimensionsVal}}))}();var cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style,vendorProps={};function finalPropName(name){var final=_jQuery2.cssProps[name]||vendorProps[name];return final||(name in emptyStyle?name:vendorProps[name]=function(name){for(var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;i--;)if((name=cssPrefixes[i]+capName)in emptyStyle)return name}(name)||name)}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"};function setPositiveNumber(_elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i="width"===dimension?1:0,extra=0,delta=0;if(box===(isBorderBox?"border":"content"))return 0;for(;i<4;i+=2)"margin"===box&&(delta+=_jQuery2.css(elem,box+cssExpand[i],!0,styles)),isBorderBox?("content"===box&&(delta-=_jQuery2.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==box&&(delta-=_jQuery2.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(delta+=_jQuery2.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==box?delta+=_jQuery2.css(elem,"border"+cssExpand[i]+"Width",!0,styles):extra+=_jQuery2.css(elem,"border"+cssExpand[i]+"Width",!0,styles));return!isBorderBox&&computedVal>=0&&(delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-.5))||0),delta}function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),isBorderBox=(!support.boxSizingReliable()||extra)&&"border-box"===_jQuery2.css(elem,"boxSizing",!1,styles),valueIsBorderBox=isBorderBox,val=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);if(rnumnonpx.test(val)){if(!extra)return val;val="auto"}return(!support.boxSizingReliable()&&isBorderBox||!support.reliableTrDimensions()&&nodeName(elem,"tr")||"auto"===val||!parseFloat(val)&&"inline"===_jQuery2.css(elem,"display",!1,styles))&&elem.getClientRects().length&&(isBorderBox="border-box"===_jQuery2.css(elem,"boxSizing",!1,styles),(valueIsBorderBox=offsetProp in elem)&&(val=elem[offsetProp])),(val=parseFloat(val)||0)+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val)+"px"}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}_jQuery2.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(isCustomProp||(name=finalPropName(origName)),hooks=_jQuery2.cssHooks[name]||_jQuery2.cssHooks[origName],void 0===value)return hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name];"string"===(type=_typeof(value))&&(ret=rcssNum.exec(value))&&ret[1]&&(value=adjustCSS(elem,name,ret),type="number"),null!=value&&value==value&&("number"!==type||isCustomProp||(value+=ret&&ret[3]||(_jQuery2.cssNumber[origName]?"":"px")),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra))||(isCustomProp?style.setProperty(name,value):style[name]=value))}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name);return rcustomProp.test(name)||(name=finalPropName(origName)),(hooks=_jQuery2.cssHooks[name]||_jQuery2.cssHooks[origName])&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),!0===extra||isFinite(num)?num||0:val):val}}),_jQuery2.each(["height","width"],(function(_i,dimension){_jQuery2.cssHooks[dimension]={get:function(elem,computed,extra){if(computed)return!rdisplayswap.test(_jQuery2.css(elem,"display"))||elem.getClientRects().length&&elem.getBoundingClientRect().width?getWidthOrHeight(elem,dimension,extra):swap(elem,cssShow,(function(){return getWidthOrHeight(elem,dimension,extra)}))},set:function(elem,value,extra){var matches,styles=getStyles(elem),scrollboxSizeBuggy=!support.scrollboxSize()&&"absolute"===styles.position,isBorderBox=(scrollboxSizeBuggy||extra)&&"border-box"===_jQuery2.css(elem,"boxSizing",!1,styles),subtract=extra?boxModelAdjustment(elem,dimension,extra,isBorderBox,styles):0;return isBorderBox&&scrollboxSizeBuggy&&(subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",!1,styles)-.5)),subtract&&(matches=rcssNum.exec(value))&&"px"!==(matches[3]||"px")&&(elem.style[dimension]=value,value=_jQuery2.css(elem,dimension)),setPositiveNumber(0,value,subtract)}}})),_jQuery2.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,(function(elem,computed){if(computed)return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},(function(){return elem.getBoundingClientRect().left})))+"px"})),_jQuery2.each({margin:"",padding:"",border:"Width"},(function(prefix,suffix){_jQuery2.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}},"margin"!==prefix&&(_jQuery2.cssHooks[prefix+suffix].set=setPositiveNumber)})),_jQuery2.fn.extend({css:function(name,value){return _access(this,(function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){for(styles=getStyles(elem),len=name.length;i1)}}),_jQuery2.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||_jQuery2.easing._default,this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(_jQuery2.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.options.duration?this.pos=eased=_jQuery2.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):this.pos=eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return 1!==tween.elem.nodeType||null!=tween.elem[tween.prop]&&null==tween.elem.style[tween.prop]?tween.elem[tween.prop]:(result=_jQuery2.css(tween.elem,tween.prop,""))&&"auto"!==result?result:0},set:function(tween){_jQuery2.fx.step[tween.prop]?_jQuery2.fx.step[tween.prop](tween):1!==tween.elem.nodeType||!_jQuery2.cssHooks[tween.prop]&&null==tween.elem.style[finalPropName(tween.prop)]?tween.elem[tween.prop]=tween.now:_jQuery2.style(tween.elem,tween.prop,tween.now+tween.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},_jQuery2.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:"swing"},_jQuery2.fx=Tween.prototype.init,_jQuery2.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){inProgress&&(!1===document.hidden&&window.requestAnimationFrame?window.requestAnimationFrame(schedule):window.setTimeout(schedule,_jQuery2.fx.interval),_jQuery2.fx.tick())}function createFxNow(){return window.setTimeout((function(){fxNow=void 0})),fxNow=Date.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth)attrs["margin"+(which=cssExpand[i])]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;index1)},removeAttr:function(name){return this.each((function(){_jQuery2.removeAttr(this,name)}))}}),_jQuery2.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return void 0===elem.getAttribute?_jQuery2.prop(elem,name,value):(1===nType&&_jQuery2.isXMLDoc(elem)||(hooks=_jQuery2.attrHooks[name.toLowerCase()]||(_jQuery2.expr.match.bool.test(name)?boolHook:void 0)),void 0!==value?null===value?void _jQuery2.removeAttr(elem,name):hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:null==(ret=_jQuery2.find.attr(elem,name))?void 0:ret)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)elem.removeAttribute(name)}}),boolHook={set:function(elem,value,name){return!1===value?_jQuery2.removeAttr(elem,name):elem.setAttribute(name,name),name}},_jQuery2.each(_jQuery2.expr.match.bool.source.match(/\w+/g),(function(_i,name){var getter=attrHandle[name]||_jQuery2.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();return isXML||(handle=attrHandle[lowercaseName],attrHandle[lowercaseName]=ret,ret=null!=getter(elem,name,isXML)?lowercaseName:null,attrHandle[lowercaseName]=handle),ret}}));var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;function stripAndCollapse(value){return(value.match(rnothtmlwhite)||[]).join(" ")}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}function classesToArray(value){return Array.isArray(value)?value:"string"==typeof value&&value.match(rnothtmlwhite)||[]}_jQuery2.fn.extend({prop:function(name,value){return _access(this,_jQuery2.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each((function(){delete this[_jQuery2.propFix[name]||name]}))}}),_jQuery2.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return 1===nType&&_jQuery2.isXMLDoc(elem)||(name=_jQuery2.propFix[name]||name,hooks=_jQuery2.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=_jQuery2.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),support.optSelected||(_jQuery2.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&parent.parentNode&&parent.parentNode.selectedIndex,null},set:function(elem){var parent=elem.parentNode;parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex)}}),_jQuery2.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_jQuery2.propFix[this.toLowerCase()]=this})),_jQuery2.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value))return this.each((function(j){_jQuery2(this).addClass(value.call(this,j,getClass(this)))}));if((classes=classesToArray(value)).length)for(;elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&" "+stripAndCollapse(curValue)+" "){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");curValue!==(finalValue=stripAndCollapse(cur))&&elem.setAttribute("class",finalValue)}return this},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value))return this.each((function(j){_jQuery2(this).removeClass(value.call(this,j,getClass(this)))}));if(!arguments.length)return this.attr("class","");if((classes=classesToArray(value)).length)for(;elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&" "+stripAndCollapse(curValue)+" "){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>-1;)cur=cur.replace(" "+clazz+" "," ");curValue!==(finalValue=stripAndCollapse(cur))&&elem.setAttribute("class",finalValue)}return this},toggleClass:function(value,stateVal){var type=_typeof(value),isValidValue="string"===type||Array.isArray(value);return"boolean"==typeof stateVal&&isValidValue?stateVal?this.addClass(value):this.removeClass(value):isFunction(value)?this.each((function(i){_jQuery2(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)})):this.each((function(){var className,i,self,classNames;if(isValidValue)for(i=0,self=_jQuery2(this),classNames=classesToArray(value);className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else void 0!==value&&"boolean"!==type||((className=getClass(this))&&dataPriv.set(this,"__className__",className),this.setAttribute&&this.setAttribute("class",className||!1===value?"":dataPriv.get(this,"__className__")||""))}))},hasClass:function(selector){var className,elem,i=0;for(className=" "+selector+" ";elem=this[i++];)if(1===elem.nodeType&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1)return!0;return!1}});var rreturn=/\r/g;_jQuery2.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];return arguments.length?(valueIsFunction=isFunction(value),this.each((function(i){var val;1===this.nodeType&&(null==(val=valueIsFunction?value.call(this,i,_jQuery2(this).val()):value)?val="":"number"==typeof val?val+="":Array.isArray(val)&&(val=_jQuery2.map(val,(function(value){return null==value?"":value+""}))),(hooks=_jQuery2.valHooks[this.type]||_jQuery2.valHooks[this.nodeName.toLowerCase()])&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))}))):elem?(hooks=_jQuery2.valHooks[elem.type]||_jQuery2.valHooks[elem.nodeName.toLowerCase()])&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:"string"==typeof(ret=elem.value)?ret.replace(rreturn,""):null==ret?"":ret:void 0}}),_jQuery2.extend({valHooks:{option:{get:function(elem){var val=_jQuery2.find.attr(elem,"value");return null!=val?val:stripAndCollapse(_jQuery2.text(elem))}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type,values=one?null:[],max=one?index+1:options.length;for(i=index<0?max:one?index:0;i-1)&&(optionSet=!0);return optionSet||(elem.selectedIndex=-1),values}}}}),_jQuery2.each(["radio","checkbox"],(function(){_jQuery2.valHooks[this]={set:function(elem,value){if(Array.isArray(value))return elem.checked=_jQuery2.inArray(_jQuery2(elem).val(),value)>-1}},support.checkOn||(_jQuery2.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})})),support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};_jQuery2.extend(_jQuery2.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=lastElement=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+_jQuery2.event.triggered)&&(type.indexOf(".")>-1&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,(event=event[_jQuery2.expando]?event:new _jQuery2.Event(type,"object"===_typeof(event)&&event)).isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:_jQuery2.makeArray(data,[event]),special=_jQuery2.event.special[type]||{},onlyHandlers||!special.trigger||!1!==special.trigger.apply(elem,data))){if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)lastElement=cur,event.type=i>1?bubbleType:special.bindType||type,(handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle"))&&handle.apply(cur,data),(handle=ontype&&cur[ontype])&&handle.apply&&acceptData(cur)&&(event.result=handle.apply(cur,data),!1===event.result&&event.preventDefault());return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&!1!==special._default.apply(eventPath.pop(),data)||!acceptData(elem)||ontype&&isFunction(elem[type])&&!isWindow(elem)&&((tmp=elem[ontype])&&(elem[ontype]=null),_jQuery2.event.triggered=type,event.isPropagationStopped()&&lastElement.addEventListener(type,stopPropagationCallback),elem[type](),event.isPropagationStopped()&&lastElement.removeEventListener(type,stopPropagationCallback),_jQuery2.event.triggered=void 0,tmp&&(elem[ontype]=tmp)),event.result}},simulate:function(type,elem,event){var e=_jQuery2.extend(new _jQuery2.Event,event,{type:type,isSimulated:!0});_jQuery2.event.trigger(e,null,elem)}}),_jQuery2.fn.extend({trigger:function(type,data){return this.each((function(){_jQuery2.event.trigger(type,data,this)}))},triggerHandler:function(type,data){var elem=this[0];if(elem)return _jQuery2.event.trigger(type,data,elem,!0)}}),support.focusin||_jQuery2.each({focus:"focusin",blur:"focusout"},(function(orig,fix){var handler=function(event){_jQuery2.event.simulate(fix,event.target,_jQuery2.event.fix(event))};_jQuery2.event.special[fix]={setup:function(){var doc=this.ownerDocument||this.document||this,attaches=dataPriv.access(doc,fix);attaches||doc.addEventListener(orig,handler,!0),dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this.document||this,attaches=dataPriv.access(doc,fix)-1;attaches?dataPriv.access(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),dataPriv.remove(doc,fix))}}}));var location=window.location,nonce={guid:Date.now()},rquery=/\?/;_jQuery2.parseXML=function(data){var xml;if(!data||"string"!=typeof data)return null;try{xml=(new window.DOMParser).parseFromString(data,"text/xml")}catch(e){xml=void 0}return xml&&!xml.getElementsByTagName("parsererror").length||_jQuery2.error("Invalid XML: "+data),xml};var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj))_jQuery2.each(obj,(function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"===_typeof(v)&&null!=v?i:"")+"]",v,traditional,add)}));else if(traditional||"object"!==toType(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}_jQuery2.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(null==value?"":value)};if(null==a)return"";if(Array.isArray(a)||a.jquery&&!_jQuery2.isPlainObject(a))_jQuery2.each(a,(function(){add(this.name,this.value)}));else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&")},_jQuery2.fn.extend({serialize:function(){return _jQuery2.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var elements=_jQuery2.prop(this,"elements");return elements?_jQuery2.makeArray(elements):this})).filter((function(){var type=this.type;return this.name&&!_jQuery2(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))})).map((function(_i,elem){var val=_jQuery2(this).val();return null==val?null:Array.isArray(val)?_jQuery2.map(val,(function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}})):{name:elem.name,value:val.replace(rCRLF,"\r\n")}})).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType[0]?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;return inspected[dataType]=!0,_jQuery2.each(structure[dataType]||[],(function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)})),selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=_jQuery2.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&_jQuery2.extend(!0,target,deep),target}originAnchor.href=location.href,_jQuery2.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(location.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_jQuery2.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,_jQuery2.ajaxSettings),settings):ajaxExtend(_jQuery2.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){"object"===_typeof(url)&&(options=url,url=void 0),options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=_jQuery2.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?_jQuery2(callbackContext):_jQuery2.event,deferred=_jQuery2.Deferred(),completeDeferred=_jQuery2.Callbacks("once memory"),_statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2]);match=responseHeaders[key.toLowerCase()+" "]}return null==match?null:match.join(", ")},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){return null==completed&&(name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return null==completed&&(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(completed)jqXHR.always(map[jqXHR.status]);else for(code in map)_statusCode[code]=[_statusCode[code],map[code]];return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR),s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""],null==s.crossDomain){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url,urlAnchor.href=urlAnchor.href,s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!=urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=!0}}if(s.data&&s.processData&&"string"!=typeof s.data&&(s.data=_jQuery2.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),completed)return jqXHR;for(i in(fireGlobals=_jQuery2.event&&s.global)&&0==_jQuery2.active++&&_jQuery2.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url.replace(rhash,""),s.hasContent?s.data&&s.processData&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&(s.data=s.data.replace(r20,"+")):(uncached=s.url.slice(cacheURL.length),s.data&&(s.processData||"string"==typeof s.data)&&(cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),!1===s.cache&&(cacheURL=cacheURL.replace(rantiCache,"$1"),uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid+++uncached),s.url=cacheURL+uncached),s.ifModified&&(_jQuery2.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",_jQuery2.lastModified[cacheURL]),_jQuery2.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",_jQuery2.etag[cacheURL])),(s.data&&s.hasContent&&!1!==s.contentType||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]),s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(!1===s.beforeSend.call(callbackContext,jqXHR,s)||completed))return jqXHR.abort();if(strAbort="abort",completeDeferred.add(s.complete),jqXHR.done(s.success),jqXHR.fail(s.error),transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){if(jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),completed)return jqXHR;s.async&&s.timeout>0&&(timeoutTimer=window.setTimeout((function(){jqXHR.abort("timeout")}),s.timeout));try{completed=!1,transport.send(requestHeaders,done)}catch(e){if(completed)throw e;done(-1,e)}}else done(-1,"No Transport");function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;completed||(completed=!0,timeoutTimer&&window.clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&status<300||304===status,responses&&(response=function(s,jqXHR,responses){for(var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}if(finalDataType)return finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]}(s,jqXHR,responses)),!isSuccess&&_jQuery2.inArray("script",s.dataTypes)>-1&&(s.converters["text script"]=function(){}),response=function(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(!(conv=converters[prev+" "+current]||converters["* "+current]))for(conv2 in converters)if((tmp=conv2.split(" "))[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){!0===conv?conv=converters[conv2]:!0!==converters[conv2]&&(current=tmp[0],dataTypes.unshift(tmp[1]));break}if(!0!==conv)if(conv&&s.throws)response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&((modified=jqXHR.getResponseHeader("Last-Modified"))&&(_jQuery2.lastModified[cacheURL]=modified),(modified=jqXHR.getResponseHeader("etag"))&&(_jQuery2.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,isSuccess=!(error=response.error))):(error=statusText,!status&&statusText||(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(_statusCode),_statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--_jQuery2.active||_jQuery2.event.trigger("ajaxStop")))}return jqXHR},getJSON:function(url,data,callback){return _jQuery2.get(url,data,callback,"json")},getScript:function(url,callback){return _jQuery2.get(url,void 0,callback,"script")}}),_jQuery2.each(["get","post"],(function(_i,method){_jQuery2[method]=function(url,data,callback,type){return isFunction(data)&&(type=type||callback,callback=data,data=void 0),_jQuery2.ajax(_jQuery2.extend({url:url,type:method,dataType:type,data:data,success:callback},_jQuery2.isPlainObject(url)&&url))}})),_jQuery2.ajaxPrefilter((function(s){var i;for(i in s.headers)"content-type"===i.toLowerCase()&&(s.contentType=s.headers[i]||"")})),_jQuery2._evalUrl=function(url,options,doc){return _jQuery2.ajax({url:url,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(response){_jQuery2.globalEval(response,options,doc)}})},_jQuery2.fn.extend({wrapAll:function(html){var wrap;return this[0]&&(isFunction(html)&&(html=html.call(this[0])),wrap=_jQuery2(html,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map((function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem})).append(this)),this},wrapInner:function(html){return isFunction(html)?this.each((function(i){_jQuery2(this).wrapInner(html.call(this,i))})):this.each((function(){var self=_jQuery2(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)}))},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each((function(i){_jQuery2(this).wrapAll(htmlIsFunction?html.call(this,i):html)}))},unwrap:function(selector){return this.parent(selector).not("body").each((function(){_jQuery2(this).replaceWith(this.childNodes)})),this}}),_jQuery2.expr.pseudos.hidden=function(elem){return!_jQuery2.expr.pseudos.visible(elem)},_jQuery2.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)},_jQuery2.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=_jQuery2.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,_jQuery2.ajaxTransport((function(options){var _callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain)return{send:function(headers,complete){var i,xhr=options.xhr();if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];for(i in options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest"),headers)xhr.setRequestHeader(i,headers[i]);_callback=function(type){return function(){_callback&&(_callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null,"abort"===type?xhr.abort():"error"===type?"number"!=typeof xhr.status?complete(0,"error"):complete(xhr.status,xhr.statusText):complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,"text"!==(xhr.responseType||"text")||"string"!=typeof xhr.responseText?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders()))}},xhr.onload=_callback(),errorCallback=xhr.onerror=xhr.ontimeout=_callback("error"),void 0!==xhr.onabort?xhr.onabort=errorCallback:xhr.onreadystatechange=function(){4===xhr.readyState&&window.setTimeout((function(){_callback&&errorCallback()}))},_callback=_callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(_callback)throw e}},abort:function(){_callback&&_callback()}}})),_jQuery2.ajaxPrefilter((function(s){s.crossDomain&&(s.contents.script=!1)})),_jQuery2.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){return _jQuery2.globalEval(text),text}}}),_jQuery2.ajaxPrefilter("script",(function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET")})),_jQuery2.ajaxTransport("script",(function(s){var script,_callback2;if(s.crossDomain||s.scriptAttrs)return{send:function(_,complete){script=_jQuery2("".format( + hashi_injection + ) + ) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.content.decode("utf-8"), content) + + def test_range_request_large_file(self): + """Test range request on a larger file to verify streaming""" + large_str = "Large text file " * 1024 # ~16KB file + large_file = "large.txt" + + with zipfile.ZipFile(self.zip_path, "a") as zf: + zf.writestr(large_file, large_str) + + # Request middle section of file + start = 1024 + end = 2048 + response = self._get_file(large_file, HTTP_RANGE=f"bytes={start}-{end}") + + content = next(response.streaming_content).decode() + self.assertEqual(content, large_str[start : end + 1]) + self.assertEqual(response.status_code, 206) + self.assertEqual(response.headers["Content-Length"], str(end - start + 1)) + + def test_options_request_accept_ranges_html(self): + """Test OPTIONS request for HTML file returns Accept-Ranges: none""" + response = self._get_file(self.script_name, REQUEST_METHOD="OPTIONS") + self.assertEqual(response.headers["Accept-Ranges"], "none") + self.assertEqual(response.status_code, 200) + self.assertEqual(response.content.decode(), "") + + def test_options_request_accept_ranges_binary(self): + """Test OPTIONS request for non-HTML file returns Accept-Ranges: bytes""" + response = self._get_file( + self.test_name_1, REQUEST_METHOD="OPTIONS" # This is a .txt file + ) + self.assertEqual(response.headers["Accept-Ranges"], "bytes") + self.assertEqual(response.status_code, 200) + self.assertEqual(response.content.decode(), "") + + def test_accept_ranges_header_html(self): + """Test Accept-Ranges header is 'none' for HTML files""" + response = self._get_file(self.script_name) # HTML file + self.assertEqual(response.headers["Accept-Ranges"], "none") + + def test_accept_ranges_header_binary(self): + """Test Accept-Ranges header is 'bytes' for non-HTML files""" + response = self._get_file(self.test_name_1) # txt file + self.assertEqual(response.headers["Accept-Ranges"], "bytes") + @override_option("Deployment", "ZIP_CONTENT_URL_PATH_PREFIX", "prefix_test/") class UrlPrefixZipContentTestCase(ZipContentTestCase): diff --git a/kolibri/core/content/zip_wsgi.py b/kolibri/core/content/zip_wsgi.py index 1411ac246f0..c1e3492f5d8 100644 --- a/kolibri/core/content/zip_wsgi.py +++ b/kolibri/core/content/zip_wsgi.py @@ -2,6 +2,7 @@ import mimetypes import os import re +import sys import time import zipfile from urllib.parse import unquote @@ -20,6 +21,12 @@ from django.utils.cache import patch_response_headers from django.utils.encoding import force_str from django.utils.http import http_date +from le_utils.constants.file_formats import BLOOMD +from le_utils.constants.file_formats import BLOOMPUB +from le_utils.constants.file_formats import H5P +from le_utils.constants.file_formats import HTML5 +from le_utils.constants.file_formats import PERSEUS +from whitenoise.responders import StaticFile from kolibri.core.content.errors import InvalidStorageFilenameError from kolibri.core.content.utils.paths import get_content_storage_file_path @@ -32,6 +39,77 @@ logger = logging.getLogger(__name__) +def parse_byte_range(range_header, file_size): + """ + Parse Range header using whitenoise's implementation + Unlike whitenoise, this implementation returns None if the start is beyond EOF + and returns the start value and the length of the range, rather than the end. + """ + try: + # Use StaticFile's parse_byte_range to handle the parsing + # be aware that it can return a negative start value + # with an end value of None, rather than represent a content-range + # header that has no start value but an end value. + start, end = StaticFile.parse_byte_range(range_header) + if start >= file_size: + # If start is beyond EOF, return None to trigger full file response + return None + + if end is None: + end = file_size - 1 + else: + end = min(end, file_size - 1) + # Handle negative start values by adding them to file_size + if start < 0: + start = file_size + start + length = end - start + 1 + return start, length + except ValueError: + return None + + +class RangeZipFileObjectWrapper: + """ + A wrapper for a zip file object that supports byte range requests. + This is implemented for compatibility with Python 3.6, which does not + support seeking in file objects extracted from zip files. + This can be removed once Python 3.6 support is dropped. + """ + + CHUNK_SIZE = 8192 + + def __init__(self, file_object, start=0, length=None): + self.file_object = file_object + self.remaining = length + # Python 3.7+ zipfile has seek support + if sys.version_info >= (3, 7): + self.file_object.seek(start) + else: + # Read and discard data until we reach start position + while start > 0: + chunk_size = min(start, self.CHUNK_SIZE) + self.file_object.read(chunk_size) + start -= chunk_size + + def __iter__(self): + return self + + def __next__(self): + if self.remaining is not None and self.remaining <= 0: + raise StopIteration() + chunk = self.file_object.read( + min( + self.CHUNK_SIZE, + self.remaining if self.remaining is not None else self.CHUNK_SIZE, + ) + ) + if not chunk: + raise StopIteration() + if self.remaining is not None: + self.remaining -= len(chunk) + return chunk + + def add_security_headers(request, response): response.headers["Access-Control-Allow-Origin"] = "*" response.headers["Access-Control-Allow-Methods"] = "GET, OPTIONS" @@ -127,7 +205,9 @@ def parse_html(content): return content -def get_embedded_file(zipped_path, zipped_filename, embedded_filepath): +def get_embedded_file( + zipped_path, zipped_filename, embedded_filepath, range_header=None +): with zipfile.ZipFile(zipped_path) as zf: # if no path, or a directory, is being referenced, look for an index.html file if not embedded_filepath or embedded_filepath.endswith("/"): @@ -143,29 +223,57 @@ def get_embedded_file(zipped_path, zipped_filename, embedded_filepath): ) ) - # file size - file_size = 0 - # try to guess the MIME type of the embedded file being referenced content_type = ( mimetypes.guess_type(embedded_filepath)[0] or "application/octet-stream" ) - if embedded_filepath.endswith("htm") or embedded_filepath.endswith("html"): - content = zf.open(info).read() + zipped_file_object = zf.open(info) + + is_html = embedded_filepath.lower().endswith(("html", "htm")) + + if is_html: + content = zipped_file_object.read() html = parse_html(content) response = HttpResponse(html, content_type=content_type) file_size = len(response.content) else: # generate a streaming response object, pulling data from within the zip file - response = FileResponse(zf.open(info), content_type=content_type) + status = 200 file_size = info.file_size + range_response_header = None + + # handle byte-range requests + if range_header: + range_tuple = parse_byte_range(range_header, file_size) + if range_tuple: + start, length = range_tuple + zipped_file_object = RangeZipFileObjectWrapper( + zipped_file_object, start, length + ) + status = 206 + # Use the total file size of the object for the Content-Range header + range_response_header = ( + f"bytes {start}-{start + length - 1}/{file_size}" + ) + # Update the file size to the length of the requested range + file_size = length + response = FileResponse( + zipped_file_object, content_type=content_type, status=status + ) + if range_response_header: + response.headers["Content-Range"] = range_response_header + + # Only accept byte ranges for files that are not HTML + response.headers["Accept-Ranges"] = "none" if is_html else "bytes" # set the content-length header to the size of the embedded file - if file_size: - response.headers["Content-Length"] = file_size + response.headers["Content-Length"] = file_size return response +archive_file_types = (HTML5, H5P, BLOOMPUB, BLOOMD, PERSEUS) +archive_file_extension_match = "|".join(archive_file_types) + # Includes a prefix that is almost certain not to collide # with a filename embedded in a zip file. Prefix is: # @*._ followed by the encoded base url @@ -176,7 +284,11 @@ def get_embedded_file(zipped_path, zipped_filename, embedded_filepath): # the base URL, rather than having to load the entire zip file before # loading the HTML5 content. path_regex = re.compile( - r"/(?:(?P(?![a-f0-9]{32}\.zip)[^/]+)/)?(?P[a-f0-9]{32}\.zip)/(?P.*)" + r"/(?:(?P(?![a-f0-9]{32}\.(?:" + + archive_file_extension_match + + r"))[^/]+)/)?(?P[a-f0-9]{32}\.(?:" + + archive_file_extension_match + + r"))/(?P.*)" ) YEAR_IN_SECONDS = 60 * 60 * 24 * 365 @@ -208,11 +320,17 @@ def _zip_content_from_request(request): # noqa: C901 "Path not found: {path}".format(path=request.path_info) ) - if request.method == "OPTIONS": - return HttpResponse() - remote_baseurl, zipped_filename, embedded_filepath = match.groups() + if request.method == "OPTIONS": + response = HttpResponse() + # If path ends with html/htm, set Accept-Ranges to none + if embedded_filepath.lower().endswith(("html", "htm")): + response.headers["Accept-Ranges"] = "none" + else: + response.headers["Accept-Ranges"] = "bytes" + return response + try: # calculate the local file path to the zip file zipped_path = get_content_storage_file_path(zipped_filename) @@ -277,8 +395,12 @@ def _zip_content_from_request(request): # noqa: C901 if cached_response is not None: return cached_response + range_header = request.META.get("HTTP_RANGE") + try: - response = get_embedded_file(zipped_path, zipped_filename, embedded_filepath) + response = get_embedded_file( + zipped_path, zipped_filename, embedded_filepath, range_header=range_header + ) except Exception: if remote_baseurl: return create_error_response( @@ -288,9 +410,6 @@ def _zip_content_from_request(request): # noqa: C901 ) raise - # ensure the browser knows not to try byte-range requests, as we don't support them here - response.headers["Accept-Ranges"] = "none" - response.headers["Last-Modified"] = http_date(time.time()) patch_response_headers(response, cache_timeout=YEAR_IN_SECONDS) diff --git a/packages/hashi/.h5p-commit-sha b/packages/hashi/.h5p-commit-sha index 5795069afb9..eb0365ae006 100644 --- a/packages/hashi/.h5p-commit-sha +++ b/packages/hashi/.h5p-commit-sha @@ -1 +1 @@ -eeefc1228b4294d75288be341e5dea97a10927cb +fb5100a53517c4c9b5477aaa114338ce816c3e81 diff --git a/packages/hashi/downloadH5PVendor.js b/packages/hashi/downloadH5PVendor.js index fdd9bf1d6a8..b26e042a5a1 100644 --- a/packages/hashi/downloadH5PVendor.js +++ b/packages/hashi/downloadH5PVendor.js @@ -18,10 +18,8 @@ const h5pStaticFolder = path.resolve(__dirname, '../../kolibri/core/content/stat const logging = console; // eslint-disable-line no-console const fileManifest = [ - /styles\/h5p\.css/, - /styles\/h5p-core-button\.css/, - /styles\/h5p-confirmation-dialog\.css/, - /fonts\/h5p-core-[0-9]+\.(eot|svg|ttf|woff)/, + /styles\//, + /fonts\//, /images\/.*/, /js\/h5p-confirmation-dialog\.js/, /js\/h5p-content-type\.js/, diff --git a/packages/hashi/h5p_build.json b/packages/hashi/h5p_build.json index 9064b92e3ca..6316628c4e3 100644 --- a/packages/hashi/h5p_build.json +++ b/packages/hashi/h5p_build.json @@ -1 +1 @@ -{"filename":"h5p-cb2da982f548c25c69d2.html"} \ No newline at end of file +{"filename":"h5p-0e26ca3f5bd40f703a08.html"} \ No newline at end of file diff --git a/packages/kolibri-zip/src/fileUtils.js b/packages/kolibri-zip/src/fileUtils.js index 5d0e2d99323..9415aaecf45 100644 --- a/packages/kolibri-zip/src/fileUtils.js +++ b/packages/kolibri-zip/src/fileUtils.js @@ -31,33 +31,34 @@ export class Mapper { } // Looks for any URLs referenced inside url() -// Handle any query parameters separately. -const cssPathRegex = /(url\(['"]?)([^'"?]*(?:\([^'"?]*\)[^'"?]*)*)?(\?[^'"]+)?(['"]?\))/g; +const cssPathRegex = /url\((['"]?)(.*?)(? + return Array.from(fileContents.matchAll(cssPathRegex), ([, , p2]) => p2 - ? decodeURIComponent(p2) - // Replace placeholders with original quotes - .replace(/___ESCAPED_QUOTE___/g, "'") - .replace(/___ESCAPED_DQUOTE___/g, '"') + ? // Split first before decoding, in case ? is encoded in the URL + decodeURIComponent(unescapeCssString(p2.split('?')[0])) : '', ); } export function replaceCSSPaths(fileContents, packageFiles) { - return fileContents.replace(cssPathRegex, function (match, start, path, query, end) { + return fileContents.replace(cssPathRegex, function (match, start, path, end) { try { + // Split off any query parameter + path = unescapeCssString(path.split('?')[0]); // Look to see if there is a URL in our packageFiles mapping that // that has this as the source path. const newUrl = packageFiles[decodeURIComponent(path)]; if (newUrl) { // If so, replace the instance with the new URL. - return `${start}${newUrl}${end}`; + return `url(${start}${newUrl}${end})`; } } catch (e) { console.debug('Error during URL handling', e); // eslint-disable-line no-console diff --git a/packages/kolibri-zip/test/fileUtils.spec.js b/packages/kolibri-zip/test/fileUtils.spec.js index 779fcc9b4e8..0ac21f5e509 100644 --- a/packages/kolibri-zip/test/fileUtils.spec.js +++ b/packages/kolibri-zip/test/fileUtils.spec.js @@ -72,38 +72,54 @@ describe('File Path replacement', () => { it('should handle plus signs in CSS urls', () => { expect(getCSSPaths('url("./my%2Bfile.woff")')).toEqual(['./my+file.woff']); }); - test('handles URLs with parentheses in filename', () => { + test('handles URLs with parentheses in filename when quoted', () => { const css = ` background: url('image(1).png'); background-image: url("file(with)brackets.jpg"); + `; + const paths = getCSSPaths(css); + expect(paths).toEqual(['image(1).png', 'file(with)brackets.jpg']); + }); + test('does not handle URLs with parentheses in filename when not quoted', () => { + const css = ` border-image: url(filename(final).gif); `; const paths = getCSSPaths(css); - expect(paths).toEqual(['image(1).png', 'file(with)brackets.jpg', 'filename(final).gif']); + expect(paths).toEqual(['filename(final']); }); test('handles query parameters correctly with parentheses in filename', () => { const css = ` background: url('image(1).png?v=123'); background-image: url("file(with)brackets.jpg?version=2"); - border-image: url(filename(final).gif?x=1&y=2); `; const paths = getCSSPaths(css); - expect(paths).toEqual(['image(1).png', 'file(with)brackets.jpg', 'filename(final).gif']); + expect(paths).toEqual(['image(1).png', 'file(with)brackets.jpg']); }); test('handles complex filenames with multiple parentheses', () => { const css = ` background: url('path/to/image(1)(2).png'); background-image: url("file(with)(more)brackets.jpg"); - border-image: url(file(name(1))(v2).gif); `; const paths = getCSSPaths(css); - expect(paths).toEqual([ - 'path/to/image(1)(2).png', - 'file(with)(more)brackets.jpg', - 'file(name(1))(v2).gif', - ]); + expect(paths).toEqual(['path/to/image(1)(2).png', 'file(with)(more)brackets.jpg']); + }); + test('handles multiple filenames with no quotation marks', () => { + const css = ` + .h5p-question-plus-one { + background-image: url(../images/plus-one.svg); + } + .h5p-question-minus-one { + background-image: url(../images/minus-one.svg); + } + .h5p-question-hidden-one { + opacity: 0; + transform: translateY(100%); + } + `; + const paths = getCSSPaths(css); + expect(paths).toEqual(['../images/plus-one.svg', '../images/minus-one.svg']); }); test('handles mixed quotes and no quotes correctly', () => { const css = ` @@ -128,42 +144,57 @@ describe('File Path replacement', () => { const css = ` background: url('file\\'s.png'); background: url("file\\".png"); + background: url("file\\").png"); + background: url('file\\').png'); `; const paths = getCSSPaths(css); - expect(paths).toEqual(["file's.png", 'file".png']); + expect(paths).toEqual(["file's.png", 'file".png', 'file").png', "file').png"]); + }); + + test('handles escaped spaces', () => { + const css = ` + background: url('file\\ with\\ spaces.png'); + background: url("path\\ to\\ file.jpg"); + background: url('multiple\\ spaces.png'); + `; + const paths = getCSSPaths(css); + expect(paths).toEqual(['file with spaces.png', 'path to file.jpg', 'multiple spaces.png']); + }); + + test('handles multiple escaped backslashes', () => { + const css = ` + background: url('path\\\\.png'); + background: url("file\\\\\\\\.jpg"); + background: url('test\\\\\\\\\\\\.gif'); + `; + const paths = getCSSPaths(css); + expect(paths).toEqual(['path\\.png', 'file\\\\.jpg', 'test\\\\\\.gif']); }); test('handles complex combinations of parentheses and query params', () => { const css = ` background: url('img(v1)(final).png?v=(1)&x=(2)'); - background: url(img((1)(2)(3)).png?v=1); `; const paths = getCSSPaths(css); - expect(paths).toEqual(['img(v1)(final).png', 'img((1)(2)(3)).png']); + expect(paths).toEqual(['img(v1)(final).png']); }); test('handles URLs with spaces and special characters', () => { const css = ` background: url('my image (1).png'); background: url("path/to/image (v2).jpg"); - background: url(folder (old)/image.png); `; const paths = getCSSPaths(css); - expect(paths).toEqual([ - 'my image (1).png', - 'path/to/image (v2).jpg', - 'folder (old)/image.png', - ]); + expect(paths).toEqual(['my image (1).png', 'path/to/image (v2).jpg']); }); test('handles malformed but recoverable URLs', () => { const css = ` background: url('broken(but(fixable.png'); background: url("missing(paren.jpg?v=1"); - background: url(extra)paren).gif); `; const paths = getCSSPaths(css); - expect(paths).toEqual(['broken(but(fixable.png', 'missing(paren.jpg', 'extra)paren).gif']); + expect(paths).toEqual(['broken(but(fixable.png', 'missing(paren.jpg']); }); test('handles query parameters with special characters', () => { @@ -180,10 +211,9 @@ describe('File Path replacement', () => { const css = ` background: url('image((((1)))).jpg'); background: url("file(()()).png"); - background: url(multiple()()()().gif); `; const paths = getCSSPaths(css); - expect(paths).toEqual(['image((((1)))).jpg', 'file(()()).png', 'multiple()()()().gif']); + expect(paths).toEqual(['image((((1)))).jpg', 'file(()()).png']); }); }); describe('CSS path replacement', () => { @@ -264,6 +294,37 @@ describe('File Path replacement', () => { 'url("new-file.woff")', ); }); + test('handles multiple filenames with no quotation marks in replacements', () => { + const css = ` + .h5p-question-plus-one { + background-image: url(../images/plus-one.svg); + } + .h5p-question-minus-one { + background-image: url(../images/minus-one.svg); + } + .h5p-question-hidden-one { + opacity: 0; + transform: translateY(100%); + } + `; + const packageFiles = { + '../images/plus-one.svg': 'assets/plus.svg', + '../images/minus-one.svg': 'assets/minus.svg', + }; + const result = replaceCSSPaths(css, packageFiles); + expect(result).toBe(` + .h5p-question-plus-one { + background-image: url(assets/plus.svg); + } + .h5p-question-minus-one { + background-image: url(assets/minus.svg); + } + .h5p-question-hidden-one { + opacity: 0; + transform: translateY(100%); + } + `); + }); test('replaces paths containing parentheses correctly', () => { const css = ` background: url('image(1).png'); @@ -299,6 +360,67 @@ describe('File Path replacement', () => { border-image: url("new/double.gif"); `); }); + + test('handles escaped quotes in filename replacements', () => { + const css = ` + background: url('file\\'s.png'); + background: url("file\\".png"); + background: url("file\\").png"); + background: url('file\\').png'); + `; + const packageFiles = { + "file's.png": "new's.png", + 'file".png': 'new".png', + 'file").png': 'new").png', + "file').png": "new').png", + }; + const result = replaceCSSPaths(css, packageFiles); + /* eslint-disable no-useless-escape */ + expect(result).toBe(` + background: url('new's.png'); + background: url("new\".png"); + background: url("new\").png"); + background: url('new').png'); + `); + /* eslint-enable */ + }); + test('handles escaped spaces in replacements', () => { + const css = ` + background: url('file\\ with\\ spaces.png'); + background: url("path\\ to\\ file.jpg"); + background: url('multiple\\ spaces.png'); + `; + const packageFiles = { + 'file with spaces.png': 'new-spaces.png', + 'path to file.jpg': 'new-path.jpg', + 'multiple spaces.png': 'new-multiple.png', + }; + const result = replaceCSSPaths(css, packageFiles); + expect(result).toBe(` + background: url('new-spaces.png'); + background: url("new-path.jpg"); + background: url('new-multiple.png'); + `); + }); + + test('handles multiple escaped backslashes in replacements', () => { + const css = ` + background: url('path\\\\.png'); + background: url("file\\\\\\\\.jpg"); + background: url('test\\\\\\\\\\\\.gif'); + `; + const packageFiles = { + 'path\\.png': 'new1.png', + 'file\\\\.jpg': 'new2.jpg', + 'test\\\\\\.gif': 'new3.gif', + }; + const result = replaceCSSPaths(css, packageFiles); + expect(result).toBe(` + background: url('new1.png'); + background: url("new2.jpg"); + background: url('new3.gif'); + `); + }); }); const htmlTemplate = (attr, value) => ``;