!function(t,i){"function"==typeof define&&define.amd?define([],i):"object"==typeof module&&module.exports?module.exports=i():t.ViewportExtra=i()}("undefined"!=typeof self?self:this,function(){"use strict";var t;return(t=function(t){if(this.minWidth=this.maxWidth=null,"number"==typeof t)this.minWidth=t;else{if("object"!=typeof t)throw new Error("ViewportExtra requires an argument that is number or object");if("number"==typeof t.minWidth&&(this.minWidth=t.minWidth),"number"==typeof t.maxWidth&&(this.maxWidth=t.maxWidth),"number"==typeof this.minWidth&&"number"==typeof this.maxWidth&&this.minWidth>this.maxWidth)throw new Error("ViewportExtra requires that maxWidth is not less than minWidth")}this.applyToElement()}).prototype.applyToElement=function(){if("undefined"!=typeof window){var i=t.createContent(this,window);i&&t.element.setAttribute("content",i)}},t.createContent=function(t,i){var e,n,r;return e=n="",r=[],null!=t.minWidth&&t.minWidth===t.maxWidth?(e="width="+t.minWidth,n="initial-scale="+i.innerWidth/t.minWidth):null!=t.minWidth&&i.innerWidtht.maxWidth&&(e="width="+t.maxWidth,n="initial-scale="+i.innerWidth/t.maxWidth),[e,n].forEach(function(t){t&&r.push(t)}),r.join(",")},t.createElement=function(){var t=document.createElement("meta");return t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width,initial-scale=1"),document.head.insertBefore(t,null),t},t.element="undefined"==typeof window?null:document.querySelector('[name="viewport"]')||t.createElement(),t});