Merge branch 'MDL-42959-master' of git://github.com/andrewnicols/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 10 Dec 2013 21:34:17 +0000 (10:34 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 10 Dec 2013 21:34:17 +0000 (10:34 +1300)
lib/yuilib/3.13.0/io-upload-iframe/io-upload-iframe-coverage.js
lib/yuilib/3.13.0/io-upload-iframe/io-upload-iframe-debug.js
lib/yuilib/3.13.0/io-upload-iframe/io-upload-iframe-min.js
lib/yuilib/3.13.0/io-upload-iframe/io-upload-iframe.js

index b6a84b7..e405752 100644 (file)
@@ -7,7 +7,7 @@ http://yuilibrary.com/license/
 
 if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
 if (!__coverage__['build/io-upload-iframe/io-upload-iframe.js']) {
-   __coverage__['build/io-upload-iframe/io-upload-iframe.js'] = {"path":"build/io-upload-iframe/io-upload-iframe.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":28},"end":{"line":1,"column":47}}},"2":{"name":"_cFrame","line":27,"loc":{"start":{"line":27,"column":0},"end":{"line":27,"column":27}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":17},"end":{"line":34,"column":28}}},"4":{"name":"_dFrame","line":45,"loc":{"start":{"line":45,"column":0},"end":{"line":45,"column":21}}},"5":{"name":"(anonymous_5)","line":61,"loc":{"start":{"line":61,"column":14},"end":{"line":61,"column":29}}},"6":{"name":"(anonymous_6)","line":92,"loc":{"start":{"line":92,"column":17},"end":{"line":92,"column":32}}},"7":{"name":"(anonymous_7)","line":110,"loc":{"start":{"line":110,"column":15},"end":{"line":110,"column":36}}},"8":{"name":"(anonymous_8)","line":131,"loc":{"start":{"line":131,"column":17},"end":{"line":131,"column":32}}},"9":{"name":"(anonymous_9)","line":132,"loc":{"start":{"line":132,"column":25},"end":{"line":132,"column":40}}},"10":{"name":"(anonymous_10)","line":152,"loc":{"start":{"line":152,"column":25},"end":{"line":152,"column":40}}},"11":{"name":"(anonymous_11)","line":156,"loc":{"start":{"line":156,"column":12},"end":{"line":156,"column":23}}},"12":{"name":"(anonymous_12)","line":171,"loc":{"start":{"line":171,"column":25},"end":{"line":171,"column":38}}},"13":{"name":"(anonymous_13)","line":187,"loc":{"start":{"line":187,"column":21},"end":{"line":187,"column":36}}},"14":{"name":"(anonymous_14)","line":217,"loc":{"start":{"line":217,"column":22},"end":{"line":217,"column":33}}},"15":{"name":"(anonymous_15)","line":230,"loc":{"start":{"line":230,"column":13},"end":{"line":230,"column":33}}},"16":{"name":"(anonymous_16)","line":257,"loc":{"start":{"line":257,"column":19},"end":{"line":257,"column":30}}},"17":{"name":"(anonymous_17)","line":269,"loc":{"start":{"line":269,"column":26},"end":{"line":269,"column":37}}},"18":{"name":"(anonymous_18)","line":276,"loc":{"start":{"line":276,"column":12},"end":{"line":276,"column":32}}},"19":{"name":"(anonymous_19)","line":281,"loc":{"start":{"line":281,"column":9},"end":{"line":281,"column":39}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":302,"column":53}},"2":{"start":{"line":11,"column":0},"end":{"line":15,"column":30}},"3":{"start":{"line":27,"column":0},"end":{"line":35,"column":1}},"4":{"start":{"line":28,"column":4},"end":{"line":28,"column":104}},"5":{"start":{"line":29,"column":8},"end":{"line":29,"column":44}},"6":{"start":{"line":30,"column":8},"end":{"line":30,"column":38}},"7":{"start":{"line":31,"column":8},"end":{"line":31,"column":39}},"8":{"start":{"line":32,"column":8},"end":{"line":32,"column":37}},"9":{"start":{"line":34,"column":4},"end":{"line":34,"column":80}},"10":{"start":{"line":34,"column":30},"end":{"line":34,"column":55}},"11":{"start":{"line":45,"column":0},"end":{"line":48,"column":1}},"12":{"start":{"line":46,"column":1},"end":{"line":46,"column":48}},"13":{"start":{"line":47,"column":1},"end":{"line":47,"column":53}},"14":{"start":{"line":50,"column":0},"end":{"line":299,"column":9}},"15":{"start":{"line":64,"column":8},"end":{"line":66,"column":9}},"16":{"start":{"line":65,"column":12},"end":{"line":65,"column":43}},"17":{"start":{"line":68,"column":8},"end":{"line":70,"column":17}},"18":{"start":{"line":72,"column":8},"end":{"line":78,"column":9}},"19":{"start":{"line":73,"column":12},"end":{"line":73,"column":44}},"20":{"start":{"line":74,"column":12},"end":{"line":74,"column":33}},"21":{"start":{"line":75,"column":12},"end":{"line":75,"column":70}},"22":{"start":{"line":76,"column":12},"end":{"line":76,"column":111}},"23":{"start":{"line":77,"column":12},"end":{"line":77,"column":32}},"24":{"start":{"line":80,"column":8},"end":{"line":80,"column":17}},"25":{"start":{"line":93,"column":8},"end":{"line":93,"column":17}},"26":{"start":{"line":95,"column":8},"end":{"line":97,"column":9}},"27":{"start":{"line":96,"column":12},"end":{"line":96,"column":32}},"28":{"start":{"line":112,"column":8},"end":{"line":115,"column":10}},"29":{"start":{"line":117,"column":8},"end":{"line":117,"column":38}},"30":{"start":{"line":118,"column":8},"end":{"line":118,"column":41}},"31":{"start":{"line":119,"column":8},"end":{"line":119,"column":52}},"32":{"start":{"line":120,"column":8},"end":{"line":120,"column":89}},"33":{"start":{"line":132,"column":8},"end":{"line":139,"column":11}},"34":{"start":{"line":133,"column":12},"end":{"line":138,"column":13}},"35":{"start":{"line":134,"column":16},"end":{"line":134,"column":37}},"36":{"start":{"line":137,"column":16},"end":{"line":137,"column":37}},"37":{"start":{"line":153,"column":8},"end":{"line":153,"column":22}},"38":{"start":{"line":155,"column":8},"end":{"line":161,"column":26}},"39":{"start":{"line":157,"column":16},"end":{"line":157,"column":29}},"40":{"start":{"line":158,"column":16},"end":{"line":158,"column":41}},"41":{"start":{"line":159,"column":16},"end":{"line":159,"column":34}},"42":{"start":{"line":160,"column":16},"end":{"line":160,"column":29}},"43":{"start":{"line":172,"column":8},"end":{"line":172,"column":22}},"44":{"start":{"line":174,"column":8},"end":{"line":174,"column":40}},"45":{"start":{"line":175,"column":8},"end":{"line":175,"column":31}},"46":{"start":{"line":188,"column":8},"end":{"line":191,"column":14}},"47":{"start":{"line":193,"column":8},"end":{"line":195,"column":9}},"48":{"start":{"line":194,"column":12},"end":{"line":194,"column":41}},"49":{"start":{"line":197,"column":2},"end":{"line":210,"column":3}},"50":{"start":{"line":198,"column":3},"end":{"line":206,"column":4}},"51":{"start":{"line":201,"column":4},"end":{"line":201,"column":33}},"52":{"start":{"line":202,"column":4},"end":{"line":202,"column":57}},"53":{"start":{"line":205,"column":4},"end":{"line":205,"column":30}},"54":{"start":{"line":209,"column":3},"end":{"line":209,"column":26}},"55":{"start":{"line":212,"column":8},"end":{"line":212,"column":26}},"56":{"start":{"line":213,"column":8},"end":{"line":213,"column":21}},"57":{"start":{"line":217,"column":8},"end":{"line":217,"column":56}},"58":{"start":{"line":217,"column":35},"end":{"line":217,"column":49}},"59":{"start":{"line":231,"column":8},"end":{"line":233,"column":19}},"60":{"start":{"line":237,"column":8},"end":{"line":237,"column":35}},"61":{"start":{"line":238,"column":8},"end":{"line":240,"column":9}},"62":{"start":{"line":239,"column":12},"end":{"line":239,"column":44}},"63":{"start":{"line":244,"column":8},"end":{"line":246,"column":9}},"64":{"start":{"line":245,"column":12},"end":{"line":245,"column":41}},"65":{"start":{"line":249,"column":8},"end":{"line":249,"column":19}},"66":{"start":{"line":250,"column":8},"end":{"line":250,"column":23}},"67":{"start":{"line":251,"column":8},"end":{"line":253,"column":9}},"68":{"start":{"line":252,"column":12},"end":{"line":252,"column":38}},"69":{"start":{"line":255,"column":8},"end":{"line":273,"column":10}},"70":{"start":{"line":258,"column":16},"end":{"line":258,"column":29}},"71":{"start":{"line":259,"column":16},"end":{"line":259,"column":39}},"72":{"start":{"line":260,"column":16},"end":{"line":267,"column":17}},"73":{"start":{"line":261,"column":20},"end":{"line":261,"column":34}},"74":{"start":{"line":262,"column":20},"end":{"line":262,"column":38}},"75":{"start":{"line":263,"column":20},"end":{"line":263,"column":33}},"76":{"start":{"line":266,"column":20},"end":{"line":266,"column":33}},"77":{"start":{"line":270,"column":16},"end":{"line":270,"column":65}},"78":{"start":{"line":277,"column":8},"end":{"line":277,"column":28}},"79":{"start":{"line":278,"column":8},"end":{"line":278,"column":39}},"80":{"start":{"line":282,"column":8},"end":{"line":282,"column":21}},"81":{"start":{"line":284,"column":8},"end":{"line":295,"column":9}},"82":{"start":{"line":285,"column":12},"end":{"line":285,"column":31}},"83":{"start":{"line":287,"column":12},"end":{"line":294,"column":13}},"84":{"start":{"line":288,"column":16},"end":{"line":288,"column":26}},"85":{"start":{"line":291,"column":16},"end":{"line":291,"column":91}},"86":{"start":{"line":293,"column":16},"end":{"line":293,"column":62}},"87":{"start":{"line":297,"column":8},"end":{"line":297,"column":52}}},"branchMap":{"1":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":12},"end":{"line":13,"column":26}},{"start":{"line":13,"column":30},"end":{"line":13,"column":49}}]},"2":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":64,"column":8}},{"start":{"line":64,"column":8},"end":{"line":64,"column":8}}]},"3":{"line":76,"type":"cond-expr","locations":[{"start":{"line":76,"column":41},"end":{"line":76,"column":53}},{"start":{"line":76,"column":56},"end":{"line":76,"column":110}}]},"4":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":42},"end":{"line":120,"column":52}},{"start":{"line":120,"column":55},"end":{"line":120,"column":64}}]},"5":{"line":120,"type":"binary-expr","locations":[{"start":{"line":120,"column":23},"end":{"line":120,"column":30}},{"start":{"line":120,"column":34},"end":{"line":120,"column":39}}]},"6":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"7":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":8},"end":{"line":193,"column":8}},{"start":{"line":193,"column":8},"end":{"line":193,"column":8}}]},"8":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":3},"end":{"line":198,"column":3}},{"start":{"line":198,"column":3},"end":{"line":198,"column":3}}]},"9":{"line":202,"type":"cond-expr","locations":[{"start":{"line":202,"column":27},"end":{"line":202,"column":40}},{"start":{"line":202,"column":43},"end":{"line":202,"column":56}}]},"10":{"line":232,"type":"cond-expr","locations":[{"start":{"line":232,"column":50},"end":{"line":232,"column":77}},{"start":{"line":232,"column":80},"end":{"line":232,"column":89}}]},"11":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]},"12":{"line":244,"type":"if","locations":[{"start":{"line":244,"column":8},"end":{"line":244,"column":8}},{"start":{"line":244,"column":8},"end":{"line":244,"column":8}}]},"13":{"line":251,"type":"if","locations":[{"start":{"line":251,"column":8},"end":{"line":251,"column":8}},{"start":{"line":251,"column":8},"end":{"line":251,"column":8}}]},"14":{"line":260,"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":260,"column":16}},{"start":{"line":260,"column":16},"end":{"line":260,"column":16}}]},"15":{"line":270,"type":"cond-expr","locations":[{"start":{"line":270,"column":52},"end":{"line":270,"column":56}},{"start":{"line":270,"column":59},"end":{"line":270,"column":64}}]},"16":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"17":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":12},"end":{"line":287,"column":12}},{"start":{"line":287,"column":12},"end":{"line":287,"column":12}}]},"18":{"line":287,"type":"binary-expr","locations":[{"start":{"line":287,"column":16},"end":{"line":287,"column":20}},{"start":{"line":287,"column":24},"end":{"line":287,"column":35}}]},"19":{"line":291,"type":"cond-expr","locations":[{"start":{"line":291,"column":55},"end":{"line":291,"column":80}},{"start":{"line":291,"column":83},"end":{"line":291,"column":90}}]}},"code":["(function () { YUI.add('io-upload-iframe', function (Y, NAME) {","","/**","Extends the IO  to enable file uploads, with HTML forms","using an iframe as the transport medium.","@module io","@submodule io-upload-iframe","@for IO","**/","","var w = Y.config.win,","    d = Y.config.doc,","    _std = (d.documentMode && d.documentMode >= 8),","    _d = decodeURIComponent,","    _end = Y.IO.prototype.end;","","/**"," * Creates the iframe transported used in file upload"," * transactions, and binds the response event handler."," *"," * @method _cFrame"," * @private"," * @param {Object} o Transaction object generated by _create()."," * @param {Object} c Configuration object passed to YUI.io()."," * @param {Object} io"," */","function _cFrame(o, c, io) {","    var i = Y.Node.create('<iframe src=\"#\" id=\"io_iframe' + o.id + '\" name=\"io_iframe' + o.id + '\" />');","        i._node.style.position = 'absolute';","        i._node.style.top = '-1000px';","        i._node.style.left = '-1000px';","        Y.one('body').appendChild(i);","    // Bind the onload handler to the iframe to detect the file upload response.","    Y.on(\"load\", function() { io._uploadComplete(o, c); }, '#io_iframe' + o.id);","}","","/**"," * Removes the iframe transport used in the file upload"," * transaction."," *"," * @method _dFrame"," * @private"," * @param {Number} id The transaction ID used in the iframe's creation."," */","function _dFrame(id) {","\tY.Event.purgeElement('#io_iframe' + id, false);","\tY.one('body').removeChild(Y.one('#io_iframe' + id));","}","","Y.mix(Y.IO.prototype, {","   /**","    * Parses the POST data object and creates hidden form elements","    * for each key-value, and appends them to the HTML form object.","    * @method _addData","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {String} s The key-value POST data.","    * @return {Array} o Array of created fields.","    */","    _addData: function(f, s) {","        // Serialize an object into a key-value string using","        // querystring-stringify-simple.","        if (Y.Lang.isObject(s)) {","            s = Y.QueryString.stringify(s);","        }","","        var o = [],","            m = s.split('='),","            i, l;","","        for (i = 0, l = m.length - 1; i < l; i++) {","            o[i] = d.createElement('input');","            o[i].type = 'hidden';","            o[i].name = _d(m[i].substring(m[i].lastIndexOf('&') + 1));","            o[i].value = (i + 1 === l) ? _d(m[i + 1]) : _d(m[i + 1].substring(0, (m[i + 1].lastIndexOf('&'))));","            f.appendChild(o[i]);","        }","","        return o;","    },","","   /**","    * Removes the custom fields created to pass additional POST","    * data, along with the HTML form fields.","    * @method _removeData","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} o HTML form fields created from configuration.data.","    */","    _removeData: function(f, o) {","        var i, l;","","        for (i = 0, l = o.length; i < l; i++) {","            f.removeChild(o[i]);","        }","    },","","   /**","    * Sets the appropriate attributes and values to the HTML","    * form, in preparation of a file upload transaction.","    * @method _setAttrs","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} id The Transaction ID.","    * @param {Object} uri Qualified path to transaction resource.","    */","    _setAttrs: function(f, id, uri) {","        // Track original HTML form attribute values.","        this._originalFormAttrs = {","            action: f.getAttribute('action'),","            target: f.getAttribute('target')","        };","","        f.setAttribute('action', uri);","        f.setAttribute('method', 'POST');","        f.setAttribute('target', 'io_iframe' + id );","        f.setAttribute(Y.UA.ie && !_std ? 'encoding' : 'enctype', 'multipart/form-data');","    },","","   /**","    * Reset the HTML form attributes to their original values.","    * @method _resetAttrs","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} a Object of original attributes.","    */","    _resetAttrs: function(f, a) {","        Y.Object.each(a, function(v, p) {","            if (v) {","                f.setAttribute(p, v);","            }","            else {","                f.removeAttribute(p);","            }","        });","    },","","   /**","    * Starts timeout count if the configuration object","    * has a defined timeout property.","    *","    * @method _startUploadTimeout","    * @private","    * @static","    * @param {Object} o Transaction object generated by _create().","    * @param {Object} c Configuration object passed to YUI.io().","    */","    _startUploadTimeout: function(o, c) {","        var io = this;","","        io._timeout[o.id] = w.setTimeout(","            function() {","                o.status = 0;","                o.statusText = 'timeout';","                io.complete(o, c);","                io.end(o, c);","            }, c.timeout);","    },","","   /**","    * Clears the timeout interval started by _startUploadTimeout().","    * @method _clearUploadTimeout","    * @private","    * @static","    * @param {Number} id - Transaction ID.","    */","    _clearUploadTimeout: function(id) {","        var io = this;","","        w.clearTimeout(io._timeout[id]);","        delete io._timeout[id];","    },","","   /**","    * Bound to the iframe's Load event and processes","    * the response data.","    * @method _uploadComplete","    * @private","    * @static","    * @param {Object} o The transaction object","    * @param {Object} c Configuration object for the transaction.","    */","    _uploadComplete: function(o, c) {","        var io = this,","            d = Y.one('#io_iframe' + o.id).get('contentWindow.document'),","            b = d.one('body'),","            p;","","        if (c.timeout) {","            io._clearUploadTimeout(o.id);","        }","","\t\ttry {","\t\t\tif (b) {","\t\t\t\t// When a response Content-Type of \"text/plain\" is used, Firefox and Safari","\t\t\t\t// will wrap the response string with <pre></pre>.","\t\t\t\tp = b.one('pre:first-child');","\t\t\t\to.c.responseText = p ? p.get('text') : b.get('text');","\t\t\t}","\t\t\telse {","\t\t\t\to.c.responseXML = d._node;","\t\t\t}","\t\t}","\t\tcatch (e) {","\t\t\to.e = \"upload failure\";","\t\t}","","        io.complete(o, c);","        io.end(o, c);","        // The transaction is complete, so call _dFrame to remove","        // the event listener bound to the iframe transport, and then","        // destroy the iframe.","        w.setTimeout( function() { _dFrame(o.id); }, 0);","    },","","   /**","    * Uploads HTML form data, inclusive of files/attachments,","    * using the iframe created in _create to facilitate the transaction.","    * @method _upload","    * @private","    * @static","    * @param {Object} o The transaction object","    * @param {Object} uri Qualified path to transaction resource.","    * @param {Object} c Configuration object for the transaction.","    */","    _upload: function(o, uri, c) {","        var io = this,","            f = (typeof c.form.id === 'string') ? d.getElementById(c.form.id) : c.form.id,","            fields;","","        // Initialize the HTML form properties in case they are","        // not defined in the HTML form.","        io._setAttrs(f, o.id, uri);","        if (c.data) {","            fields = io._addData(f, c.data);","        }","","        // Start polling if a callback is present and the timeout","        // property has been defined.","        if (c.timeout) {","            io._startUploadTimeout(o, c);","        }","","        // Start file upload.","        f.submit();","        io.start(o, c);","        if (c.data) {","            io._removeData(f, fields);","        }","","        return {","            id: o.id,","            abort: function() {","                o.status = 0;","                o.statusText = 'abort';","                if (Y.one('#io_iframe' + o.id)) {","                    _dFrame(o.id);","                    io.complete(o, c);","                    io.end(o, c);","                }","                else {","                    return false;","                }","            },","            isInProgress: function() {","                return Y.one('#io_iframe' + o.id) ? true : false;","            },","            io: io","        };","    },","","    upload: function(o, uri, c) {","        _cFrame(o, c, this);","        return this._upload(o, uri, c);","    },","","    end: function(transaction, config) {","        var form, io;","","        if (config) {","            form = config.form;","","            if (form && form.upload) {","                io = this;","","                // Restore HTML form attributes to their original values.","                form = (typeof form.id === 'string') ? d.getElementById(form.id) : form.id;","","                io._resetAttrs(form, this._originalFormAttrs);","            }","        }","","        return _end.call(this, transaction, config);","    }","}, true);","","","}, '3.13.0', {\"requires\": [\"io-base\", \"node-base\"]});","","}());"]};
+   __coverage__['build/io-upload-iframe/io-upload-iframe.js'] = {"path":"build/io-upload-iframe/io-upload-iframe.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":28},"end":{"line":1,"column":47}}},"2":{"name":"_cFrame","line":27,"loc":{"start":{"line":27,"column":0},"end":{"line":27,"column":27}}},"3":{"name":"(anonymous_3)","line":34,"loc":{"start":{"line":34,"column":17},"end":{"line":34,"column":28}}},"4":{"name":"_dFrame","line":45,"loc":{"start":{"line":45,"column":0},"end":{"line":45,"column":21}}},"5":{"name":"(anonymous_5)","line":61,"loc":{"start":{"line":61,"column":14},"end":{"line":61,"column":29}}},"6":{"name":"(anonymous_6)","line":92,"loc":{"start":{"line":92,"column":17},"end":{"line":92,"column":32}}},"7":{"name":"(anonymous_7)","line":110,"loc":{"start":{"line":110,"column":15},"end":{"line":110,"column":36}}},"8":{"name":"(anonymous_8)","line":131,"loc":{"start":{"line":131,"column":17},"end":{"line":131,"column":32}}},"9":{"name":"(anonymous_9)","line":132,"loc":{"start":{"line":132,"column":25},"end":{"line":132,"column":40}}},"10":{"name":"(anonymous_10)","line":152,"loc":{"start":{"line":152,"column":25},"end":{"line":152,"column":40}}},"11":{"name":"(anonymous_11)","line":156,"loc":{"start":{"line":156,"column":12},"end":{"line":156,"column":23}}},"12":{"name":"(anonymous_12)","line":171,"loc":{"start":{"line":171,"column":25},"end":{"line":171,"column":38}}},"13":{"name":"(anonymous_13)","line":187,"loc":{"start":{"line":187,"column":21},"end":{"line":187,"column":36}}},"14":{"name":"(anonymous_14)","line":217,"loc":{"start":{"line":217,"column":22},"end":{"line":217,"column":33}}},"15":{"name":"(anonymous_15)","line":230,"loc":{"start":{"line":230,"column":13},"end":{"line":230,"column":33}}},"16":{"name":"(anonymous_16)","line":257,"loc":{"start":{"line":257,"column":19},"end":{"line":257,"column":30}}},"17":{"name":"(anonymous_17)","line":269,"loc":{"start":{"line":269,"column":26},"end":{"line":269,"column":37}}},"18":{"name":"(anonymous_18)","line":276,"loc":{"start":{"line":276,"column":12},"end":{"line":276,"column":32}}},"19":{"name":"(anonymous_19)","line":281,"loc":{"start":{"line":281,"column":9},"end":{"line":281,"column":39}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":305,"column":53}},"2":{"start":{"line":11,"column":0},"end":{"line":15,"column":30}},"3":{"start":{"line":27,"column":0},"end":{"line":35,"column":1}},"4":{"start":{"line":28,"column":4},"end":{"line":28,"column":104}},"5":{"start":{"line":29,"column":8},"end":{"line":29,"column":44}},"6":{"start":{"line":30,"column":8},"end":{"line":30,"column":38}},"7":{"start":{"line":31,"column":8},"end":{"line":31,"column":39}},"8":{"start":{"line":32,"column":8},"end":{"line":32,"column":37}},"9":{"start":{"line":34,"column":4},"end":{"line":34,"column":80}},"10":{"start":{"line":34,"column":30},"end":{"line":34,"column":55}},"11":{"start":{"line":45,"column":0},"end":{"line":48,"column":1}},"12":{"start":{"line":46,"column":1},"end":{"line":46,"column":48}},"13":{"start":{"line":47,"column":1},"end":{"line":47,"column":53}},"14":{"start":{"line":50,"column":0},"end":{"line":302,"column":9}},"15":{"start":{"line":64,"column":8},"end":{"line":66,"column":9}},"16":{"start":{"line":65,"column":12},"end":{"line":65,"column":43}},"17":{"start":{"line":68,"column":8},"end":{"line":70,"column":17}},"18":{"start":{"line":72,"column":8},"end":{"line":78,"column":9}},"19":{"start":{"line":73,"column":12},"end":{"line":73,"column":44}},"20":{"start":{"line":74,"column":12},"end":{"line":74,"column":33}},"21":{"start":{"line":75,"column":12},"end":{"line":75,"column":70}},"22":{"start":{"line":76,"column":12},"end":{"line":76,"column":111}},"23":{"start":{"line":77,"column":12},"end":{"line":77,"column":32}},"24":{"start":{"line":80,"column":8},"end":{"line":80,"column":17}},"25":{"start":{"line":93,"column":8},"end":{"line":93,"column":17}},"26":{"start":{"line":95,"column":8},"end":{"line":97,"column":9}},"27":{"start":{"line":96,"column":12},"end":{"line":96,"column":32}},"28":{"start":{"line":112,"column":8},"end":{"line":115,"column":10}},"29":{"start":{"line":117,"column":8},"end":{"line":117,"column":38}},"30":{"start":{"line":118,"column":8},"end":{"line":118,"column":41}},"31":{"start":{"line":119,"column":8},"end":{"line":119,"column":52}},"32":{"start":{"line":120,"column":8},"end":{"line":120,"column":89}},"33":{"start":{"line":132,"column":8},"end":{"line":139,"column":11}},"34":{"start":{"line":133,"column":12},"end":{"line":138,"column":13}},"35":{"start":{"line":134,"column":16},"end":{"line":134,"column":37}},"36":{"start":{"line":137,"column":16},"end":{"line":137,"column":37}},"37":{"start":{"line":153,"column":8},"end":{"line":153,"column":22}},"38":{"start":{"line":155,"column":8},"end":{"line":161,"column":26}},"39":{"start":{"line":157,"column":16},"end":{"line":157,"column":29}},"40":{"start":{"line":158,"column":16},"end":{"line":158,"column":41}},"41":{"start":{"line":159,"column":16},"end":{"line":159,"column":34}},"42":{"start":{"line":160,"column":16},"end":{"line":160,"column":29}},"43":{"start":{"line":172,"column":8},"end":{"line":172,"column":22}},"44":{"start":{"line":174,"column":8},"end":{"line":174,"column":40}},"45":{"start":{"line":175,"column":8},"end":{"line":175,"column":31}},"46":{"start":{"line":188,"column":8},"end":{"line":191,"column":14}},"47":{"start":{"line":193,"column":8},"end":{"line":195,"column":9}},"48":{"start":{"line":194,"column":12},"end":{"line":194,"column":41}},"49":{"start":{"line":197,"column":2},"end":{"line":210,"column":3}},"50":{"start":{"line":198,"column":3},"end":{"line":206,"column":4}},"51":{"start":{"line":201,"column":4},"end":{"line":201,"column":33}},"52":{"start":{"line":202,"column":4},"end":{"line":202,"column":57}},"53":{"start":{"line":205,"column":4},"end":{"line":205,"column":30}},"54":{"start":{"line":209,"column":3},"end":{"line":209,"column":26}},"55":{"start":{"line":212,"column":8},"end":{"line":212,"column":26}},"56":{"start":{"line":213,"column":8},"end":{"line":213,"column":21}},"57":{"start":{"line":217,"column":8},"end":{"line":217,"column":56}},"58":{"start":{"line":217,"column":35},"end":{"line":217,"column":49}},"59":{"start":{"line":231,"column":8},"end":{"line":233,"column":19}},"60":{"start":{"line":237,"column":8},"end":{"line":237,"column":35}},"61":{"start":{"line":238,"column":8},"end":{"line":240,"column":9}},"62":{"start":{"line":239,"column":12},"end":{"line":239,"column":44}},"63":{"start":{"line":244,"column":8},"end":{"line":246,"column":9}},"64":{"start":{"line":245,"column":12},"end":{"line":245,"column":41}},"65":{"start":{"line":249,"column":8},"end":{"line":249,"column":19}},"66":{"start":{"line":250,"column":8},"end":{"line":250,"column":23}},"67":{"start":{"line":251,"column":8},"end":{"line":253,"column":9}},"68":{"start":{"line":252,"column":12},"end":{"line":252,"column":38}},"69":{"start":{"line":255,"column":8},"end":{"line":273,"column":10}},"70":{"start":{"line":258,"column":16},"end":{"line":258,"column":29}},"71":{"start":{"line":259,"column":16},"end":{"line":259,"column":39}},"72":{"start":{"line":260,"column":16},"end":{"line":267,"column":17}},"73":{"start":{"line":261,"column":20},"end":{"line":261,"column":34}},"74":{"start":{"line":262,"column":20},"end":{"line":262,"column":38}},"75":{"start":{"line":263,"column":20},"end":{"line":263,"column":33}},"76":{"start":{"line":266,"column":20},"end":{"line":266,"column":33}},"77":{"start":{"line":270,"column":16},"end":{"line":270,"column":65}},"78":{"start":{"line":277,"column":8},"end":{"line":277,"column":28}},"79":{"start":{"line":278,"column":8},"end":{"line":278,"column":39}},"80":{"start":{"line":282,"column":8},"end":{"line":282,"column":21}},"81":{"start":{"line":284,"column":8},"end":{"line":298,"column":9}},"82":{"start":{"line":285,"column":12},"end":{"line":285,"column":31}},"83":{"start":{"line":287,"column":12},"end":{"line":297,"column":13}},"84":{"start":{"line":288,"column":16},"end":{"line":288,"column":26}},"85":{"start":{"line":291,"column":16},"end":{"line":291,"column":91}},"86":{"start":{"line":294,"column":16},"end":{"line":296,"column":17}},"87":{"start":{"line":295,"column":20},"end":{"line":295,"column":66}},"88":{"start":{"line":300,"column":8},"end":{"line":300,"column":52}}},"branchMap":{"1":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":12},"end":{"line":13,"column":26}},{"start":{"line":13,"column":30},"end":{"line":13,"column":49}}]},"2":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":64,"column":8}},{"start":{"line":64,"column":8},"end":{"line":64,"column":8}}]},"3":{"line":76,"type":"cond-expr","locations":[{"start":{"line":76,"column":41},"end":{"line":76,"column":53}},{"start":{"line":76,"column":56},"end":{"line":76,"column":110}}]},"4":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":42},"end":{"line":120,"column":52}},{"start":{"line":120,"column":55},"end":{"line":120,"column":64}}]},"5":{"line":120,"type":"binary-expr","locations":[{"start":{"line":120,"column":23},"end":{"line":120,"column":30}},{"start":{"line":120,"column":34},"end":{"line":120,"column":39}}]},"6":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"7":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":8},"end":{"line":193,"column":8}},{"start":{"line":193,"column":8},"end":{"line":193,"column":8}}]},"8":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":3},"end":{"line":198,"column":3}},{"start":{"line":198,"column":3},"end":{"line":198,"column":3}}]},"9":{"line":202,"type":"cond-expr","locations":[{"start":{"line":202,"column":27},"end":{"line":202,"column":40}},{"start":{"line":202,"column":43},"end":{"line":202,"column":56}}]},"10":{"line":232,"type":"cond-expr","locations":[{"start":{"line":232,"column":50},"end":{"line":232,"column":77}},{"start":{"line":232,"column":80},"end":{"line":232,"column":89}}]},"11":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]},"12":{"line":244,"type":"if","locations":[{"start":{"line":244,"column":8},"end":{"line":244,"column":8}},{"start":{"line":244,"column":8},"end":{"line":244,"column":8}}]},"13":{"line":251,"type":"if","locations":[{"start":{"line":251,"column":8},"end":{"line":251,"column":8}},{"start":{"line":251,"column":8},"end":{"line":251,"column":8}}]},"14":{"line":260,"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":260,"column":16}},{"start":{"line":260,"column":16},"end":{"line":260,"column":16}}]},"15":{"line":270,"type":"cond-expr","locations":[{"start":{"line":270,"column":52},"end":{"line":270,"column":56}},{"start":{"line":270,"column":59},"end":{"line":270,"column":64}}]},"16":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"17":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":12},"end":{"line":287,"column":12}},{"start":{"line":287,"column":12},"end":{"line":287,"column":12}}]},"18":{"line":287,"type":"binary-expr","locations":[{"start":{"line":287,"column":16},"end":{"line":287,"column":20}},{"start":{"line":287,"column":24},"end":{"line":287,"column":35}}]},"19":{"line":291,"type":"cond-expr","locations":[{"start":{"line":291,"column":55},"end":{"line":291,"column":80}},{"start":{"line":291,"column":83},"end":{"line":291,"column":90}}]},"20":{"line":294,"type":"if","locations":[{"start":{"line":294,"column":16},"end":{"line":294,"column":16}},{"start":{"line":294,"column":16},"end":{"line":294,"column":16}}]}},"code":["(function () { YUI.add('io-upload-iframe', function (Y, NAME) {","","/**","Extends the IO  to enable file uploads, with HTML forms","using an iframe as the transport medium.","@module io","@submodule io-upload-iframe","@for IO","**/","","var w = Y.config.win,","    d = Y.config.doc,","    _std = (d.documentMode && d.documentMode >= 8),","    _d = decodeURIComponent,","    _end = Y.IO.prototype.end;","","/**"," * Creates the iframe transported used in file upload"," * transactions, and binds the response event handler."," *"," * @method _cFrame"," * @private"," * @param {Object} o Transaction object generated by _create()."," * @param {Object} c Configuration object passed to YUI.io()."," * @param {Object} io"," */","function _cFrame(o, c, io) {","    var i = Y.Node.create('<iframe src=\"#\" id=\"io_iframe' + o.id + '\" name=\"io_iframe' + o.id + '\" />');","        i._node.style.position = 'absolute';","        i._node.style.top = '-1000px';","        i._node.style.left = '-1000px';","        Y.one('body').appendChild(i);","    // Bind the onload handler to the iframe to detect the file upload response.","    Y.on(\"load\", function() { io._uploadComplete(o, c); }, '#io_iframe' + o.id);","}","","/**"," * Removes the iframe transport used in the file upload"," * transaction."," *"," * @method _dFrame"," * @private"," * @param {Number} id The transaction ID used in the iframe's creation."," */","function _dFrame(id) {","\tY.Event.purgeElement('#io_iframe' + id, false);","\tY.one('body').removeChild(Y.one('#io_iframe' + id));","}","","Y.mix(Y.IO.prototype, {","   /**","    * Parses the POST data object and creates hidden form elements","    * for each key-value, and appends them to the HTML form object.","    * @method _addData","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {String} s The key-value POST data.","    * @return {Array} o Array of created fields.","    */","    _addData: function(f, s) {","        // Serialize an object into a key-value string using","        // querystring-stringify-simple.","        if (Y.Lang.isObject(s)) {","            s = Y.QueryString.stringify(s);","        }","","        var o = [],","            m = s.split('='),","            i, l;","","        for (i = 0, l = m.length - 1; i < l; i++) {","            o[i] = d.createElement('input');","            o[i].type = 'hidden';","            o[i].name = _d(m[i].substring(m[i].lastIndexOf('&') + 1));","            o[i].value = (i + 1 === l) ? _d(m[i + 1]) : _d(m[i + 1].substring(0, (m[i + 1].lastIndexOf('&'))));","            f.appendChild(o[i]);","        }","","        return o;","    },","","   /**","    * Removes the custom fields created to pass additional POST","    * data, along with the HTML form fields.","    * @method _removeData","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} o HTML form fields created from configuration.data.","    */","    _removeData: function(f, o) {","        var i, l;","","        for (i = 0, l = o.length; i < l; i++) {","            f.removeChild(o[i]);","        }","    },","","   /**","    * Sets the appropriate attributes and values to the HTML","    * form, in preparation of a file upload transaction.","    * @method _setAttrs","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} id The Transaction ID.","    * @param {Object} uri Qualified path to transaction resource.","    */","    _setAttrs: function(f, id, uri) {","        // Track original HTML form attribute values.","        this._originalFormAttrs = {","            action: f.getAttribute('action'),","            target: f.getAttribute('target')","        };","","        f.setAttribute('action', uri);","        f.setAttribute('method', 'POST');","        f.setAttribute('target', 'io_iframe' + id );","        f.setAttribute(Y.UA.ie && !_std ? 'encoding' : 'enctype', 'multipart/form-data');","    },","","   /**","    * Reset the HTML form attributes to their original values.","    * @method _resetAttrs","    * @private","    * @static","    * @param {Object} f HTML form object.","    * @param {Object} a Object of original attributes.","    */","    _resetAttrs: function(f, a) {","        Y.Object.each(a, function(v, p) {","            if (v) {","                f.setAttribute(p, v);","            }","            else {","                f.removeAttribute(p);","            }","        });","    },","","   /**","    * Starts timeout count if the configuration object","    * has a defined timeout property.","    *","    * @method _startUploadTimeout","    * @private","    * @static","    * @param {Object} o Transaction object generated by _create().","    * @param {Object} c Configuration object passed to YUI.io().","    */","    _startUploadTimeout: function(o, c) {","        var io = this;","","        io._timeout[o.id] = w.setTimeout(","            function() {","                o.status = 0;","                o.statusText = 'timeout';","                io.complete(o, c);","                io.end(o, c);","            }, c.timeout);","    },","","   /**","    * Clears the timeout interval started by _startUploadTimeout().","    * @method _clearUploadTimeout","    * @private","    * @static","    * @param {Number} id - Transaction ID.","    */","    _clearUploadTimeout: function(id) {","        var io = this;","","        w.clearTimeout(io._timeout[id]);","        delete io._timeout[id];","    },","","   /**","    * Bound to the iframe's Load event and processes","    * the response data.","    * @method _uploadComplete","    * @private","    * @static","    * @param {Object} o The transaction object","    * @param {Object} c Configuration object for the transaction.","    */","    _uploadComplete: function(o, c) {","        var io = this,","            d = Y.one('#io_iframe' + o.id).get('contentWindow.document'),","            b = d.one('body'),","            p;","","        if (c.timeout) {","            io._clearUploadTimeout(o.id);","        }","","\t\ttry {","\t\t\tif (b) {","\t\t\t\t// When a response Content-Type of \"text/plain\" is used, Firefox and Safari","\t\t\t\t// will wrap the response string with <pre></pre>.","\t\t\t\tp = b.one('pre:first-child');","\t\t\t\to.c.responseText = p ? p.get('text') : b.get('text');","\t\t\t}","\t\t\telse {","\t\t\t\to.c.responseXML = d._node;","\t\t\t}","\t\t}","\t\tcatch (e) {","\t\t\to.e = \"upload failure\";","\t\t}","","        io.complete(o, c);","        io.end(o, c);","        // The transaction is complete, so call _dFrame to remove","        // the event listener bound to the iframe transport, and then","        // destroy the iframe.","        w.setTimeout( function() { _dFrame(o.id); }, 0);","    },","","   /**","    * Uploads HTML form data, inclusive of files/attachments,","    * using the iframe created in _create to facilitate the transaction.","    * @method _upload","    * @private","    * @static","    * @param {Object} o The transaction object","    * @param {Object} uri Qualified path to transaction resource.","    * @param {Object} c Configuration object for the transaction.","    */","    _upload: function(o, uri, c) {","        var io = this,","            f = (typeof c.form.id === 'string') ? d.getElementById(c.form.id) : c.form.id,","            fields;","","        // Initialize the HTML form properties in case they are","        // not defined in the HTML form.","        io._setAttrs(f, o.id, uri);","        if (c.data) {","            fields = io._addData(f, c.data);","        }","","        // Start polling if a callback is present and the timeout","        // property has been defined.","        if (c.timeout) {","            io._startUploadTimeout(o, c);","        }","","        // Start file upload.","        f.submit();","        io.start(o, c);","        if (c.data) {","            io._removeData(f, fields);","        }","","        return {","            id: o.id,","            abort: function() {","                o.status = 0;","                o.statusText = 'abort';","                if (Y.one('#io_iframe' + o.id)) {","                    _dFrame(o.id);","                    io.complete(o, c);","                    io.end(o, c);","                }","                else {","                    return false;","                }","            },","            isInProgress: function() {","                return Y.one('#io_iframe' + o.id) ? true : false;","            },","            io: io","        };","    },","","    upload: function(o, uri, c) {","        _cFrame(o, c, this);","        return this._upload(o, uri, c);","    },","","    end: function(transaction, config) {","        var form, io;","","        if (config) {","            form = config.form;","","            if (form && form.upload) {","                io = this;","","                // Restore HTML form attributes to their original values.","                form = (typeof form.id === 'string') ? d.getElementById(form.id) : form.id;","","                // Check whether the form still exists before resetting it.","                if (form) {","                    io._resetAttrs(form, this._originalFormAttrs);","                }","            }","        }","","        return _end.call(this, transaction, config);","    }","}, true);","","","}, '3.13.0', {\"requires\": [\"io-base\", \"node-base\"]});","","}());"]};
 }
 var __cov_qyKMyH$gi2n6_r8dBYGRlg = __coverage__['build/io-upload-iframe/io-upload-iframe.js'];
-__cov_qyKMyH$gi2n6_r8dBYGRlg.s['1']++;YUI.add('io-upload-iframe',function(Y,NAME){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['1']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['2']++;var w=Y.config.win,d=Y.config.doc,_std=(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['1'][0]++,d.documentMode)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['1'][1]++,d.documentMode>=8),_d=decodeURIComponent,_end=Y.IO.prototype.end;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['3']++;function _cFrame(o,c,io){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['2']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['4']++;var i=Y.Node.create('<iframe src="#" id="io_iframe'+o.id+'" name="io_iframe'+o.id+'" />');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['5']++;i._node.style.position='absolute';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['6']++;i._node.style.top='-1000px';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['7']++;i._node.style.left='-1000px';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['8']++;Y.one('body').appendChild(i);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['9']++;Y.on('load',function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['3']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['10']++;io._uploadComplete(o,c);},'#io_iframe'+o.id);}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['11']++;function _dFrame(id){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['4']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['12']++;Y.Event.purgeElement('#io_iframe'+id,false);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['13']++;Y.one('body').removeChild(Y.one('#io_iframe'+id));}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['14']++;Y.mix(Y.IO.prototype,{_addData:function(f,s){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['5']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['15']++;if(Y.Lang.isObject(s)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['2'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['16']++;s=Y.QueryString.stringify(s);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['2'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['17']++;var o=[],m=s.split('='),i,l;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['18']++;for(i=0,l=m.length-1;i<l;i++){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['19']++;o[i]=d.createElement('input');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['20']++;o[i].type='hidden';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['21']++;o[i].name=_d(m[i].substring(m[i].lastIndexOf('&')+1));__cov_qyKMyH$gi2n6_r8dBYGRlg.s['22']++;o[i].value=i+1===l?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['3'][0]++,_d(m[i+1])):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['3'][1]++,_d(m[i+1].substring(0,m[i+1].lastIndexOf('&'))));__cov_qyKMyH$gi2n6_r8dBYGRlg.s['23']++;f.appendChild(o[i]);}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['24']++;return o;},_removeData:function(f,o){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['6']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['25']++;var i,l;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['26']++;for(i=0,l=o.length;i<l;i++){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['27']++;f.removeChild(o[i]);}},_setAttrs:function(f,id,uri){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['7']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['28']++;this._originalFormAttrs={action:f.getAttribute('action'),target:f.getAttribute('target')};__cov_qyKMyH$gi2n6_r8dBYGRlg.s['29']++;f.setAttribute('action',uri);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['30']++;f.setAttribute('method','POST');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['31']++;f.setAttribute('target','io_iframe'+id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['32']++;f.setAttribute((__cov_qyKMyH$gi2n6_r8dBYGRlg.b['5'][0]++,Y.UA.ie)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['5'][1]++,!_std)?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['4'][0]++,'encoding'):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['4'][1]++,'enctype'),'multipart/form-data');},_resetAttrs:function(f,a){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['8']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['33']++;Y.Object.each(a,function(v,p){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['9']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['34']++;if(v){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['6'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['35']++;f.setAttribute(p,v);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['6'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['36']++;f.removeAttribute(p);}});},_startUploadTimeout:function(o,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['10']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['37']++;var io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['38']++;io._timeout[o.id]=w.setTimeout(function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['11']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['39']++;o.status=0;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['40']++;o.statusText='timeout';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['41']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['42']++;io.end(o,c);},c.timeout);},_clearUploadTimeout:function(id){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['12']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['43']++;var io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['44']++;w.clearTimeout(io._timeout[id]);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['45']++;delete io._timeout[id];},_uploadComplete:function(o,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['13']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['46']++;var io=this,d=Y.one('#io_iframe'+o.id).get('contentWindow.document'),b=d.one('body'),p;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['47']++;if(c.timeout){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['7'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['48']++;io._clearUploadTimeout(o.id);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['7'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['49']++;try{__cov_qyKMyH$gi2n6_r8dBYGRlg.s['50']++;if(b){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['8'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['51']++;p=b.one('pre:first-child');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['52']++;o.c.responseText=p?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['9'][0]++,p.get('text')):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['9'][1]++,b.get('text'));}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['8'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['53']++;o.c.responseXML=d._node;}}catch(e){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['54']++;o.e='upload failure';}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['55']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['56']++;io.end(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['57']++;w.setTimeout(function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['14']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['58']++;_dFrame(o.id);},0);},_upload:function(o,uri,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['15']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['59']++;var io=this,f=typeof c.form.id==='string'?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['10'][0]++,d.getElementById(c.form.id)):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['10'][1]++,c.form.id),fields;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['60']++;io._setAttrs(f,o.id,uri);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['61']++;if(c.data){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['11'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['62']++;fields=io._addData(f,c.data);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['11'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['63']++;if(c.timeout){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['12'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['64']++;io._startUploadTimeout(o,c);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['12'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['65']++;f.submit();__cov_qyKMyH$gi2n6_r8dBYGRlg.s['66']++;io.start(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['67']++;if(c.data){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['13'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['68']++;io._removeData(f,fields);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['13'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['69']++;return{id:o.id,abort:function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['16']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['70']++;o.status=0;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['71']++;o.statusText='abort';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['72']++;if(Y.one('#io_iframe'+o.id)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['14'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['73']++;_dFrame(o.id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['74']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['75']++;io.end(o,c);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['14'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['76']++;return false;}},isInProgress:function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['17']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['77']++;return Y.one('#io_iframe'+o.id)?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['15'][0]++,true):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['15'][1]++,false);},io:io};},upload:function(o,uri,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['18']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['78']++;_cFrame(o,c,this);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['79']++;return this._upload(o,uri,c);},end:function(transaction,config){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['19']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['80']++;var form,io;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['81']++;if(config){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['16'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['82']++;form=config.form;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['83']++;if((__cov_qyKMyH$gi2n6_r8dBYGRlg.b['18'][0]++,form)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['18'][1]++,form.upload)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['17'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['84']++;io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['85']++;form=typeof form.id==='string'?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['19'][0]++,d.getElementById(form.id)):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['19'][1]++,form.id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['86']++;io._resetAttrs(form,this._originalFormAttrs);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['17'][1]++;}}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['16'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['87']++;return _end.call(this,transaction,config);}},true);},'3.13.0',{'requires':['io-base','node-base']});
+__cov_qyKMyH$gi2n6_r8dBYGRlg.s['1']++;YUI.add('io-upload-iframe',function(Y,NAME){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['1']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['2']++;var w=Y.config.win,d=Y.config.doc,_std=(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['1'][0]++,d.documentMode)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['1'][1]++,d.documentMode>=8),_d=decodeURIComponent,_end=Y.IO.prototype.end;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['3']++;function _cFrame(o,c,io){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['2']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['4']++;var i=Y.Node.create('<iframe src="#" id="io_iframe'+o.id+'" name="io_iframe'+o.id+'" />');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['5']++;i._node.style.position='absolute';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['6']++;i._node.style.top='-1000px';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['7']++;i._node.style.left='-1000px';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['8']++;Y.one('body').appendChild(i);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['9']++;Y.on('load',function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['3']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['10']++;io._uploadComplete(o,c);},'#io_iframe'+o.id);}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['11']++;function _dFrame(id){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['4']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['12']++;Y.Event.purgeElement('#io_iframe'+id,false);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['13']++;Y.one('body').removeChild(Y.one('#io_iframe'+id));}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['14']++;Y.mix(Y.IO.prototype,{_addData:function(f,s){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['5']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['15']++;if(Y.Lang.isObject(s)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['2'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['16']++;s=Y.QueryString.stringify(s);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['2'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['17']++;var o=[],m=s.split('='),i,l;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['18']++;for(i=0,l=m.length-1;i<l;i++){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['19']++;o[i]=d.createElement('input');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['20']++;o[i].type='hidden';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['21']++;o[i].name=_d(m[i].substring(m[i].lastIndexOf('&')+1));__cov_qyKMyH$gi2n6_r8dBYGRlg.s['22']++;o[i].value=i+1===l?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['3'][0]++,_d(m[i+1])):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['3'][1]++,_d(m[i+1].substring(0,m[i+1].lastIndexOf('&'))));__cov_qyKMyH$gi2n6_r8dBYGRlg.s['23']++;f.appendChild(o[i]);}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['24']++;return o;},_removeData:function(f,o){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['6']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['25']++;var i,l;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['26']++;for(i=0,l=o.length;i<l;i++){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['27']++;f.removeChild(o[i]);}},_setAttrs:function(f,id,uri){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['7']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['28']++;this._originalFormAttrs={action:f.getAttribute('action'),target:f.getAttribute('target')};__cov_qyKMyH$gi2n6_r8dBYGRlg.s['29']++;f.setAttribute('action',uri);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['30']++;f.setAttribute('method','POST');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['31']++;f.setAttribute('target','io_iframe'+id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['32']++;f.setAttribute((__cov_qyKMyH$gi2n6_r8dBYGRlg.b['5'][0]++,Y.UA.ie)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['5'][1]++,!_std)?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['4'][0]++,'encoding'):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['4'][1]++,'enctype'),'multipart/form-data');},_resetAttrs:function(f,a){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['8']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['33']++;Y.Object.each(a,function(v,p){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['9']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['34']++;if(v){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['6'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['35']++;f.setAttribute(p,v);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['6'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['36']++;f.removeAttribute(p);}});},_startUploadTimeout:function(o,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['10']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['37']++;var io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['38']++;io._timeout[o.id]=w.setTimeout(function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['11']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['39']++;o.status=0;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['40']++;o.statusText='timeout';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['41']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['42']++;io.end(o,c);},c.timeout);},_clearUploadTimeout:function(id){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['12']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['43']++;var io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['44']++;w.clearTimeout(io._timeout[id]);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['45']++;delete io._timeout[id];},_uploadComplete:function(o,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['13']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['46']++;var io=this,d=Y.one('#io_iframe'+o.id).get('contentWindow.document'),b=d.one('body'),p;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['47']++;if(c.timeout){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['7'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['48']++;io._clearUploadTimeout(o.id);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['7'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['49']++;try{__cov_qyKMyH$gi2n6_r8dBYGRlg.s['50']++;if(b){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['8'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['51']++;p=b.one('pre:first-child');__cov_qyKMyH$gi2n6_r8dBYGRlg.s['52']++;o.c.responseText=p?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['9'][0]++,p.get('text')):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['9'][1]++,b.get('text'));}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['8'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['53']++;o.c.responseXML=d._node;}}catch(e){__cov_qyKMyH$gi2n6_r8dBYGRlg.s['54']++;o.e='upload failure';}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['55']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['56']++;io.end(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['57']++;w.setTimeout(function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['14']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['58']++;_dFrame(o.id);},0);},_upload:function(o,uri,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['15']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['59']++;var io=this,f=typeof c.form.id==='string'?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['10'][0]++,d.getElementById(c.form.id)):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['10'][1]++,c.form.id),fields;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['60']++;io._setAttrs(f,o.id,uri);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['61']++;if(c.data){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['11'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['62']++;fields=io._addData(f,c.data);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['11'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['63']++;if(c.timeout){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['12'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['64']++;io._startUploadTimeout(o,c);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['12'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['65']++;f.submit();__cov_qyKMyH$gi2n6_r8dBYGRlg.s['66']++;io.start(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['67']++;if(c.data){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['13'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['68']++;io._removeData(f,fields);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['13'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['69']++;return{id:o.id,abort:function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['16']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['70']++;o.status=0;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['71']++;o.statusText='abort';__cov_qyKMyH$gi2n6_r8dBYGRlg.s['72']++;if(Y.one('#io_iframe'+o.id)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['14'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['73']++;_dFrame(o.id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['74']++;io.complete(o,c);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['75']++;io.end(o,c);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['14'][1]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['76']++;return false;}},isInProgress:function(){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['17']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['77']++;return Y.one('#io_iframe'+o.id)?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['15'][0]++,true):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['15'][1]++,false);},io:io};},upload:function(o,uri,c){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['18']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['78']++;_cFrame(o,c,this);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['79']++;return this._upload(o,uri,c);},end:function(transaction,config){__cov_qyKMyH$gi2n6_r8dBYGRlg.f['19']++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['80']++;var form,io;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['81']++;if(config){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['16'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['82']++;form=config.form;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['83']++;if((__cov_qyKMyH$gi2n6_r8dBYGRlg.b['18'][0]++,form)&&(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['18'][1]++,form.upload)){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['17'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['84']++;io=this;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['85']++;form=typeof form.id==='string'?(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['19'][0]++,d.getElementById(form.id)):(__cov_qyKMyH$gi2n6_r8dBYGRlg.b['19'][1]++,form.id);__cov_qyKMyH$gi2n6_r8dBYGRlg.s['86']++;if(form){__cov_qyKMyH$gi2n6_r8dBYGRlg.b['20'][0]++;__cov_qyKMyH$gi2n6_r8dBYGRlg.s['87']++;io._resetAttrs(form,this._originalFormAttrs);}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['20'][1]++;}}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['17'][1]++;}}else{__cov_qyKMyH$gi2n6_r8dBYGRlg.b['16'][1]++;}__cov_qyKMyH$gi2n6_r8dBYGRlg.s['88']++;return _end.call(this,transaction,config);}},true);},'3.13.0',{'requires':['io-base','node-base']});
index 23c4526..5e029e8 100644 (file)
@@ -305,7 +305,10 @@ Y.mix(Y.IO.prototype, {
                 // Restore HTML form attributes to their original values.
                 form = (typeof form.id === 'string') ? d.getElementById(form.id) : form.id;
 
-                io._resetAttrs(form, this._originalFormAttrs);
+                // Check whether the form still exists before resetting it.
+                if (form) {
+                    io._resetAttrs(form, this._originalFormAttrs);
+                }
             }
         }
 
index ba2a8d1..f39f257 100644 (file)
@@ -5,4 +5,4 @@ Licensed under the BSD License.
 http://yuilibrary.com/license/
 */
 
-YUI.add("io-upload-iframe",function(e,t){function u(t,n,r){var i=e.Node.create('<iframe src="#" id="io_iframe'+t.id+'" name="io_iframe'+t.id+'" />');i._node.style.position="absolute",i._node.style.top="-1000px",i._node.style.left="-1000px",e.one("body").appendChild(i),e.on("load",function(){r._uploadComplete(t,n)},"#io_iframe"+t.id)}function a(t){e.Event.purgeElement("#io_iframe"+t,!1),e.one("body").removeChild(e.one("#io_iframe"+t))}var n=e.config.win,r=e.config.doc,i=r.documentMode&&r.documentMode>=8,s=decodeURIComponent,o=e.IO.prototype.end;e.mix(e.IO.prototype,{_addData:function(t,n){e.Lang.isObject(n)&&(n=e.QueryString.stringify(n));var i=[],o=n.split("="),u,a;for(u=0,a=o.length-1;u<a;u++)i[u]=r.createElement("input"),i[u].type="hidden",i[u].name=s(o[u].substring(o[u].lastIndexOf("&")+1)),i[u].value=u+1===a?s(o[u+1]):s(o[u+1].substring(0,o[u+1].lastIndexOf("&"))),t.appendChild(i[u]);return i},_removeData:function(e,t){var n,r;for(n=0,r=t.length;n<r;n++)e.removeChild(t[n])},_setAttrs:function(t,n,r){this._originalFormAttrs={action:t.getAttribute("action"),target:t.getAttribute("target")},t.setAttribute("action",r),t.setAttribute("method","POST"),t.setAttribute("target","io_iframe"+n),t.setAttribute(e.UA.ie&&!i?"encoding":"enctype","multipart/form-data")},_resetAttrs:function(t,n){e.Object.each(n,function(e,n){e?t.setAttribute(n,e):t.removeAttribute(n)})},_startUploadTimeout:function(e,t){var r=this;r._timeout[e.id]=n.setTimeout(function(){e.status=0,e.statusText="timeout",r.complete(e,t),r.end(e,t)},t.timeout)},_clearUploadTimeout:function(e){var t=this;n.clearTimeout(t._timeout[e]),delete t._timeout[e]},_uploadComplete:function(t,r){var i=this,s=e.one("#io_iframe"+t.id).get("contentWindow.document"),o=s.one("body"),u;r.timeout&&i._clearUploadTimeout(t.id);try{o?(u=o.one("pre:first-child"),t.c.responseText=u?u.get("text"):o.get("text")):t.c.responseXML=s._node}catch(f){t.e="upload failure"}i.complete(t,r),i.end(t,r),n.setTimeout(function(){a(t.id)},0)},_upload:function(t,n,i){var s=this,o=typeof i.form.id=="string"?r.getElementById(i.form.id):i.form.id,u;return s._setAttrs(o,t.id,n),i.data&&(u=s._addData(o,i.data)),i.timeout&&s._startUploadTimeout(t,i),o.submit(),s.start(t,i),i.data&&s._removeData(o,u),{id:t.id,abort:function(){t.status=0,t.statusText="abort";if(!e.one("#io_iframe"+t.id))return!1;a(t.id),s.complete(t,i),s.end(t,i)},isInProgress:function(){return e.one("#io_iframe"+t.id)?!0:!1},io:s}},upload:function(e,t,n){return u(e,n,this),this._upload(e,t,n)},end:function(e,t){var n,i;return t&&(n=t.form,n&&n.upload&&(i=this,n=typeof n.id=="string"?r.getElementById(n.id):n.id,i._resetAttrs(n,this._originalFormAttrs))),o.call(this,e,t)}},!0)},"3.13.0",{requires:["io-base","node-base"]});
+YUI.add("io-upload-iframe",function(e,t){function u(t,n,r){var i=e.Node.create('<iframe src="#" id="io_iframe'+t.id+'" name="io_iframe'+t.id+'" />');i._node.style.position="absolute",i._node.style.top="-1000px",i._node.style.left="-1000px",e.one("body").appendChild(i),e.on("load",function(){r._uploadComplete(t,n)},"#io_iframe"+t.id)}function a(t){e.Event.purgeElement("#io_iframe"+t,!1),e.one("body").removeChild(e.one("#io_iframe"+t))}var n=e.config.win,r=e.config.doc,i=r.documentMode&&r.documentMode>=8,s=decodeURIComponent,o=e.IO.prototype.end;e.mix(e.IO.prototype,{_addData:function(t,n){e.Lang.isObject(n)&&(n=e.QueryString.stringify(n));var i=[],o=n.split("="),u,a;for(u=0,a=o.length-1;u<a;u++)i[u]=r.createElement("input"),i[u].type="hidden",i[u].name=s(o[u].substring(o[u].lastIndexOf("&")+1)),i[u].value=u+1===a?s(o[u+1]):s(o[u+1].substring(0,o[u+1].lastIndexOf("&"))),t.appendChild(i[u]);return i},_removeData:function(e,t){var n,r;for(n=0,r=t.length;n<r;n++)e.removeChild(t[n])},_setAttrs:function(t,n,r){this._originalFormAttrs={action:t.getAttribute("action"),target:t.getAttribute("target")},t.setAttribute("action",r),t.setAttribute("method","POST"),t.setAttribute("target","io_iframe"+n),t.setAttribute(e.UA.ie&&!i?"encoding":"enctype","multipart/form-data")},_resetAttrs:function(t,n){e.Object.each(n,function(e,n){e?t.setAttribute(n,e):t.removeAttribute(n)})},_startUploadTimeout:function(e,t){var r=this;r._timeout[e.id]=n.setTimeout(function(){e.status=0,e.statusText="timeout",r.complete(e,t),r.end(e,t)},t.timeout)},_clearUploadTimeout:function(e){var t=this;n.clearTimeout(t._timeout[e]),delete t._timeout[e]},_uploadComplete:function(t,r){var i=this,s=e.one("#io_iframe"+t.id).get("contentWindow.document"),o=s.one("body"),u;r.timeout&&i._clearUploadTimeout(t.id);try{o?(u=o.one("pre:first-child"),t.c.responseText=u?u.get("text"):o.get("text")):t.c.responseXML=s._node}catch(f){t.e="upload failure"}i.complete(t,r),i.end(t,r),n.setTimeout(function(){a(t.id)},0)},_upload:function(t,n,i){var s=this,o=typeof i.form.id=="string"?r.getElementById(i.form.id):i.form.id,u;return s._setAttrs(o,t.id,n),i.data&&(u=s._addData(o,i.data)),i.timeout&&s._startUploadTimeout(t,i),o.submit(),s.start(t,i),i.data&&s._removeData(o,u),{id:t.id,abort:function(){t.status=0,t.statusText="abort";if(!e.one("#io_iframe"+t.id))return!1;a(t.id),s.complete(t,i),s.end(t,i)},isInProgress:function(){return e.one("#io_iframe"+t.id)?!0:!1},io:s}},upload:function(e,t,n){return u(e,n,this),this._upload(e,t,n)},end:function(e,t){var n,i;return t&&(n=t.form,n&&n.upload&&(i=this,n=typeof n.id=="string"?r.getElementById(n.id):n.id,n&&i._resetAttrs(n,this._originalFormAttrs))),o.call(this,e,t)}},!0)},"3.13.0",{requires:["io-base","node-base"]});
index 51aa4bb..abc4ef6 100644 (file)
@@ -297,7 +297,10 @@ Y.mix(Y.IO.prototype, {
                 // Restore HTML form attributes to their original values.
                 form = (typeof form.id === 'string') ? d.getElementById(form.id) : form.id;
 
-                io._resetAttrs(form, this._originalFormAttrs);
+                // Check whether the form still exists before resetting it.
+                if (form) {
+                    io._resetAttrs(form, this._originalFormAttrs);
+                }
             }
         }