diff --git a/dist/lang/en.js b/dist/lang/en.js index 45e6b656..776a8b72 100644 --- a/dist/lang/en.js +++ b/dist/lang/en.js @@ -21,6 +21,7 @@ window.SwaggerTranslator.learn({ "Response Code":"Response Code", "Response Headers":"Response Headers", "Hide Response":"Hide Response", + "Headers":"Headers", "Try it out!":"Try it out!", "Show/Hide":"Show/Hide", "List Operations":"List Operations", diff --git a/dist/lang/pt.js b/dist/lang/pt.js index 1cc25363..f2e7c13d 100644 --- a/dist/lang/pt.js +++ b/dist/lang/pt.js @@ -20,6 +20,7 @@ window.SwaggerTranslator.learn({ "Response Body":"Corpo da resposta", "Response Code":"Código da resposta", "Response Headers":"Cabeçalho da resposta", + "Headers":"Cabeçalhos", "Hide Response":"Esconder resposta", "Try it out!":"Tente agora!", "Show/Hide":"Mostrar/Esconder", diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index 731fa61b..7d08a18c 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -4,337 +4,607 @@ * @link http://swagger.io * @license Apache-2.0 */ -(function(){this["Handlebars"] = this["Handlebars"] || {}; -this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {}; -this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return "\n
\n
\n
\n \n \n
\n
\n"; -},"useData":true}); -this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - return "
\n
\n
\n
\n \n
\n \n \n
\n
\n\n"; - },"useData":true}); -this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, buffer = " \n"; -},"4":function(depth0,helpers,partials,data) { - return " \n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; -},"useData":true}); -'use strict'; +(function(){'use strict'; +window.SwaggerUi = Backbone.Router.extend({ -$(function() { - - // Helper function for vertically aligning DOM elements - // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ - $.fn.vAlign = function() { - return this.each(function(){ - var ah = $(this).height(); - var ph = $(this).parent().height(); - var mh = (ph - ah) / 2; - $(this).css('margin-top', mh); - }); - }; + dom_id: 'swagger_ui', - $.fn.stretchFormtasticInputWidthToParent = function() { - return this.each(function(){ - var p_width = $(this).closest("form").innerWidth(); - var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10); - var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); - $(this).css('width', p_width - p_padding - this_padding); - }); - }; + // Attributes + options: null, + api: null, + headerView: null, + mainView: null, - $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); + // SwaggerUi accepts all the same options as SwaggerApi + initialize: function(options) { + options = options || {}; + if(!options.highlightSizeThreshold) { + options.highlightSizeThreshold = 100000; + } - // Vertically center these paragraphs - // Parent may need a min-height for this to work.. - $('ul.downplayed li div.content p').vAlign(); + // Allow dom_id to be overridden + if (options.dom_id) { + this.dom_id = options.dom_id; + delete options.dom_id; + } - // When a sandbox form is submitted.. - $("form.sandbox").submit(function(){ + if (!options.supportedSubmitMethods){ + options.supportedSubmitMethods = [ + 'get', + 'put', + 'post', + 'delete', + 'head', + 'options', + 'patch' + ]; + } - var error_free = true; + if (typeof options.oauth2RedirectUrl === 'string') { + window.oAuthRedirectUrl = options.redirectUrl; + } - // Cycle through the forms required inputs - $(this).find("input.required").each(function() { + // Create an empty div which contains the dom_id + if (! $('#' + this.dom_id).length){ + $('body').append('
') ; + } - // Remove any existing error styles from the input - $(this).removeClass('error'); + this.options = options; - // Tack the error style on if the input is empty.. - if ($(this).val() === '') { - $(this).addClass('error'); - $(this).wiggle(); - error_free = false; - } + // set marked options + marked.setOptions({gfm: true}); - }); + // Set the callbacks + var that = this; + this.options.success = function() { return that.render(); }; + this.options.progress = function(d) { return that.showMessage(d); }; + this.options.failure = function(d) { return that.onLoadFailure(d); }; - return error_free; - }); + // Create view to handle the header inputs + this.headerView = new SwaggerUi.Views.HeaderView({el: $('#header')}); -}); + // Event handler for when the baseUrl/apiKey is entered by user + this.headerView.on('update-swagger-ui', function(data) { + return that.updateSwaggerUi(data); + }); + }, -function clippyCopiedCallback() { - $('#api_key_copied').fadeIn().delay(1000).fadeOut(); + // Set an option after initializing + setOption: function(option, value) { + this.options[option] = value; + }, - // var b = $("#clippy_tooltip_" + a); - // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { - // b.attr("title", "copy to clipboard") - // }, - // 500)) -} + // Get the value of a previously set option + getOption: function(option) { + return this.options[option]; + }, -// Logging function that accounts for browsers that don't have window.console -function log(){ - log.history = log.history || []; - log.history.push(arguments); - if(this.console){ - console.log( Array.prototype.slice.call(arguments)[0] ); - } -} + // Event handler for when url/key is received from user + updateSwaggerUi: function(data){ + this.options.url = data.url; + this.load(); + }, -// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) -if (Function.prototype.bind && console && typeof console.log === "object") { - [ - "log","info","warn","error","assert","dir","clear","profile","profileEnd" - ].forEach(function (method) { - console[method] = this.bind(console[method], console); - }, Function.prototype.call); -} + // Create an api and render + load: function(){ + // Initialize the API object + if (this.mainView) { + this.mainView.clear(); + } + var url = this.options.url; + if (url && url.indexOf('http') !== 0) { + url = this.buildUrl(window.location.href.toString(), url); + } + if(this.api) { + this.options.authorizations = this.api.clientAuthorizations.authz; + } + this.options.url = url; + this.headerView.update(url); -window.Docs = { + this.api = new SwaggerClient(this.options); + }, - shebang: function() { + // collapse all sections + collapseAll: function(){ + Docs.collapseEndpointListForResource(''); + }, - // If shebang has an operation nickname in it.. - // e.g. /docs/#!/words/get_search - var fragments = $.param.fragment().split('/'); - fragments.shift(); // get rid of the bang + // list operations for all sections + listAll: function(){ + Docs.collapseOperationsForResource(''); + }, - switch (fragments.length) { - case 1: - if (fragments[0].length > 0) { // prevent matching "#/" - // Expand all operations for the resource and scroll to it - var dom_id = 'resource_' + fragments[0]; + // expand operations for all sections + expandAll: function(){ + Docs.expandOperationsForResource(''); + }, - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - } - break; - case 2: - // Refer to the endpoint DOM element, e.g. #words_get_search + // This is bound to success handler for SwaggerApi + // so it gets called when SwaggerApi completes loading + render: function(){ + this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...'); + this.mainView = new SwaggerUi.Views.MainView({ + model: this.api, + el: $('#' + this.dom_id), + swaggerOptions: this.options, + router: this + }).render(); + this.showMessage(); + switch (this.options.docExpansion) { + case 'full': + this.expandAll(); break; + case 'list': + this.listAll(); break; + default: + break; + } + this.renderGFM(); - // Expand Resource - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); + if (this.options.onComplete){ + this.options.onComplete(this.api, this); + } - // Expand operation - var li_dom_id = fragments.join('_'); - var li_content_dom_id = li_dom_id + "_content"; + setTimeout(Docs.shebang.bind(this), 100); + }, + buildUrl: function(base, url){ + if (url.indexOf('/') === 0) { + var parts = base.split('/'); + base = parts[0] + '//' + parts[2]; + return base + url; + } else { + var endOfPath = base.length; - Docs.expandOperation($('#'+li_content_dom_id)); - $('#'+li_dom_id).slideto({highlight: false}); - break; - } + if (base.indexOf('?') > -1){ + endOfPath = Math.min(endOfPath, base.indexOf('?')); + } - }, - - toggleEndpointListForResource: function(resource) { - var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); - if (elem.is(':visible')) { - Docs.collapseEndpointListForResource(resource); - } else { - Docs.expandEndpointListForResource(resource); - } - }, - - // Expand resource - expandEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideDown(); - return; - } - - $('li#resource_' + resource).addClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideDown(); - }, + if (base.indexOf('#') > -1){ + endOfPath = Math.min(endOfPath, base.indexOf('#')); + } - // Collapse resource and mark as explicitly closed - collapseEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideUp(); - return; - } + base = base.substring(0, endOfPath); - $('li#resource_' + resource).removeClass('active'); + if (base.indexOf('/', base.length - 1 ) !== -1){ + return base + url; + } - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideUp(); - }, + return base + '/' + url; + } + }, - expandOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); + // Shows message on topbar of the ui + showMessage: function(data){ + if (data === undefined) { + data = ''; + } + var $msgbar = $('#message-bar'); + $msgbar.removeClass('message-fail'); + $msgbar.addClass('message-success'); + $msgbar.html(data); + if(window.SwaggerTranslator) { + window.SwaggerTranslator.translate($msgbar); + } + }, - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideDown(); - return; - } + // shows message in red + onLoadFailure: function(data){ + if (data === undefined) { + data = ''; + } + $('#message-bar').removeClass('message-success'); + $('#message-bar').addClass('message-fail'); - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.expandOperation($(this)); - }); - }, + var val = $('#message-bar').text(data); - collapseOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); + if (this.options.onFailure) { + this.options.onFailure(data); + } - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideUp(); - return; - } + return val; + }, - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.collapseOperation($(this)); - }); - }, + // Renders GFM for elements with 'markdown' class + renderGFM: function(){ + $('.markdown').each(function(){ + $(this).html(marked($(this).html())); + }); - escapeResourceName: function(resource) { - return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); - }, + $('.propDesc', '.model-signature .description').each(function () { + $(this).html(marked($(this).html())).addClass('markdown'); + }); + } - expandOperation: function(elem) { - elem.slideDown(); - }, +}); - collapseOperation: function(elem) { - elem.slideUp(); - } -}; +window.SwaggerUi.Views = {}; -'use strict'; +// don't break backward compatibility with previous versions and warn users to upgrade their code +(function(){ + window.authorizations = { + add: function() { + warn('Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add().'); -Handlebars.registerHelper('sanitize', function(html) { - // Strip the script tags from the html, and return it as a Handlebars.SafeString - html = html.replace(/)<[^<]*)*<\/script>/gi, ''); - return new Handlebars.SafeString(html); -}); + if (typeof window.swaggerUi === 'undefined') { + throw new TypeError('window.swaggerUi is not defined'); + } -Handlebars.registerHelper('renderTextParam', function(param) { - var result, type = 'text', idAtt = ''; - var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple; - var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; + if (window.swaggerUi instanceof SwaggerUi) { + window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations, arguments); + } + } + }; - var dataVendorExtensions = Object.keys(param).filter(function(property) { - // filter X-data- properties - return property.match(/^X-data-/i) !== null; - }).reduce(function(result, property) { - // remove X- from property name, so it results in html attributes like data-foo='bar' - return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; - }, ''); + window.ApiKeyAuthorization = function() { + warn('window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization.'); + SwaggerClient.ApiKeyAuthorization.apply(window, arguments); + }; - if (typeof defaultValue === 'undefined') { - defaultValue = ''; - } + window.PasswordAuthorization = function() { + warn('window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization.'); + SwaggerClient.PasswordAuthorization.apply(window, arguments); + }; - if(param.format && param.format === 'password') { - type = 'password'; + function warn(message) { + if ('console' in window && typeof window.console.warn === 'function') { + console.warn(message); } + } +})(); - if(param.valueId) { - idAtt = ' id=\'' + param.valueId + '\''; - } - if(isArray) { - result = ''; +// UMD +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['b'], function (b) { + return (root.SwaggerUi = factory(b)); + }); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require('b')); } else { - var parameterClass = 'parameter'; - if(param.required) { - parameterClass += ' required'; - } - result = ''; + // Browser globals + root.SwaggerUi = factory(root.b); } - return new Handlebars.SafeString(result); -}); +}(this, function () { + return SwaggerUi; +})); -this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) - + "
\n
"; - stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0); - if (stack1 != null) { buffer += stack1; } - buffer += "
\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " "; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}); +this["Handlebars"] = this["Handlebars"] || {}; +this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {}; +this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return "\n
\n
\n
\n \n \n
\n
\n"; +},"useData":true}); +this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "
\n
\n
\n
\n \n
\n \n \n
\n
\n\n"; + },"useData":true}); +this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { + var stack1, buffer = ""; + stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); + return buffer; +},"2":function(depth0,helpers,partials,data) { + var stack1, lambda=this.lambda, buffer = " \n"; },"4":function(depth0,helpers,partials,data) { + return " \n"; + },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; +},"useData":true}); +'use strict'; + + +$(function() { + + // Helper function for vertically aligning DOM elements + // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ + $.fn.vAlign = function() { + return this.each(function(){ + var ah = $(this).height(); + var ph = $(this).parent().height(); + var mh = (ph - ah) / 2; + $(this).css('margin-top', mh); + }); + }; + + $.fn.stretchFormtasticInputWidthToParent = function() { + return this.each(function(){ + var p_width = $(this).closest("form").innerWidth(); + var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10); + var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); + $(this).css('width', p_width - p_padding - this_padding); + }); + }; + + $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); + + // Vertically center these paragraphs + // Parent may need a min-height for this to work.. + $('ul.downplayed li div.content p').vAlign(); + + // When a sandbox form is submitted.. + $("form.sandbox").submit(function(){ + + var error_free = true; + + // Cycle through the forms required inputs + $(this).find("input.required").each(function() { + + // Remove any existing error styles from the input + $(this).removeClass('error'); + + // Tack the error style on if the input is empty.. + if ($(this).val() === '') { + $(this).addClass('error'); + $(this).wiggle(); + error_free = false; + } + + }); + + return error_free; + }); + +}); + +function clippyCopiedCallback() { + $('#api_key_copied').fadeIn().delay(1000).fadeOut(); + + // var b = $("#clippy_tooltip_" + a); + // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { + // b.attr("title", "copy to clipboard") + // }, + // 500)) +} + +// Logging function that accounts for browsers that don't have window.console +function log(){ + log.history = log.history || []; + log.history.push(arguments); + if(this.console){ + console.log( Array.prototype.slice.call(arguments)[0] ); + } +} + +// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) +if (Function.prototype.bind && console && typeof console.log === "object") { + [ + "log","info","warn","error","assert","dir","clear","profile","profileEnd" + ].forEach(function (method) { + console[method] = this.bind(console[method], console); + }, Function.prototype.call); +} + +window.Docs = { + + shebang: function() { + + // If shebang has an operation nickname in it.. + // e.g. /docs/#!/words/get_search + var fragments = $.param.fragment().split('/'); + fragments.shift(); // get rid of the bang + + switch (fragments.length) { + case 1: + if (fragments[0].length > 0) { // prevent matching "#/" + // Expand all operations for the resource and scroll to it + var dom_id = 'resource_' + fragments[0]; + + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + } + break; + case 2: + // Refer to the endpoint DOM element, e.g. #words_get_search + + // Expand Resource + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + + // Expand operation + var li_dom_id = fragments.join('_'); + var li_content_dom_id = li_dom_id + "_content"; + + + Docs.expandOperation($('#'+li_content_dom_id)); + $('#'+li_dom_id).slideto({highlight: false}); + break; + } + + }, + + toggleEndpointListForResource: function(resource) { + var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); + if (elem.is(':visible')) { + Docs.collapseEndpointListForResource(resource); + } else { + Docs.expandEndpointListForResource(resource); + } + }, + + // Expand resource + expandEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + if (resource == '') { + $('.resource ul.endpoints').slideDown(); + return; + } + + $('li#resource_' + resource).addClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideDown(); + }, + + // Collapse resource and mark as explicitly closed + collapseEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + if (resource == '') { + $('.resource ul.endpoints').slideUp(); + return; + } + + $('li#resource_' + resource).removeClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideUp(); + }, + + expandOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + if (resource == '') { + $('.resource ul.endpoints li.operation div.content').slideDown(); + return; + } + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.expandOperation($(this)); + }); + }, + + collapseOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + if (resource == '') { + $('.resource ul.endpoints li.operation div.content').slideUp(); + return; + } + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.collapseOperation($(this)); + }); + }, + + escapeResourceName: function(resource) { + return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); + }, + + expandOperation: function(elem) { + elem.slideDown(); + }, + + collapseOperation: function(elem) { + elem.slideUp(); + } +}; + +'use strict'; + +Handlebars.registerHelper('sanitize', function(html) { + // Strip the script tags from the html, and return it as a Handlebars.SafeString + html = html.replace(/)<[^<]*)*<\/script>/gi, ''); + return new Handlebars.SafeString(html); +}); + +Handlebars.registerHelper('renderTextParam', function(param) { + var result, type = 'text', idAtt = ''; + var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple; + var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; + + var dataVendorExtensions = Object.keys(param).filter(function(property) { + // filter X-data- properties + return property.match(/^X-data-/i) !== null; + }).reduce(function(result, property) { + // remove X- from property name, so it results in html attributes like data-foo='bar' + return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; + }, ''); + + if (typeof defaultValue === 'undefined') { + defaultValue = ''; + } + + if(param.format && param.format === 'password') { + type = 'password'; + } + + if(param.valueId) { + idAtt = ' id=\'' + param.valueId + '\''; + } + + if(isArray) { + result = ''; + } else { + var parameterClass = 'parameter'; + if(param.required) { + parameterClass += ' required'; + } + result = ''; + } + return new Handlebars.SafeString(result); +}); + +this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { + var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
" + + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) + + "
\n
"; + stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0); + if (stack1 != null) { buffer += stack1; } + buffer += "
\n"; + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += " "; + stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += "\n "; + stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + return buffer + "\n"; +},"2":function(depth0,helpers,partials,data) { + var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; + return "

" + + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1), depth0)) + + "

\n " + + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0)) + + "\n"; +},"4":function(depth0,helpers,partials,data) { + var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; + return ""; +},"6":function(depth0,helpers,partials,data) { + var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; + return "
Created by " + + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0)) + + "
"; +},"8":function(depth0,helpers,partials,data) { var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return ""; -},"6":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "
Created by " - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0)) - + "
"; -},"8":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; return "
See more at " @@ -417,13 +687,13 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper))) + ")\n

\n
\n
\n
\n \n \n"; },"useData":true}); +this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { + var stack1, buffer = ""; + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); + if (stack1 != null) { buffer += stack1; } + return buffer; +},"2":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " \n
\n"; +},"4":function(depth0,helpers,partials,data) { + var stack1, buffer = ""; + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); + if (stack1 != null) { buffer += stack1; } + return buffer; +},"5":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " \n
\n
\n"; +},"7":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " \n
\n
\n"; +},"9":function(depth0,helpers,partials,data) { + var stack1, buffer = ""; + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data}); + if (stack1 != null) { buffer += stack1; } + return buffer; +},"10":function(depth0,helpers,partials,data) { + var stack1, helperMissing=helpers.helperMissing, buffer = ""; + stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data})); + if (stack1 != null) { buffer += stack1; } + return buffer; +},"11":function(depth0,helpers,partials,data) { + return ""; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n\n"; + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); + if (stack1 != null) { buffer += stack1; } + buffer += "\n\n"; + stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); + if (stack1 != null) { buffer += stack1; } + buffer += "\n"; + stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); + if (stack1 != null) { buffer += stack1; } + return buffer + "\n\n \n\n"; +},"useData":true}); this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { return " required"; },"3":function(depth0,helpers,partials,data) { @@ -561,9 +892,9 @@ this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":functio if (stack1 != null) { buffer += stack1; } return buffer + "\n\n"; },"useData":true}); -this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { +this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n
\n"; -},"7":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n
\n"; -},"9":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"10":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; -},"12":function(depth0,helpers,partials,data) { - var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"13":function(depth0,helpers,partials,data) { - return ""; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data}); if (stack1 != null) { buffer += stack1; } - buffer += "\n\n "; + buffer += "\n"; stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); if (stack1 != null) { buffer += stack1; } - buffer += "\n\n"; + buffer += "\n"; stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); if (stack1 != null) { buffer += stack1; } return buffer + "\n\n"; },"useData":true}); -this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { +this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { var stack1, buffer = ""; stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); if (stack1 != null) { buffer += stack1; } @@ -714,7 +977,7 @@ this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(dep + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + "' id='" + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'/>\n
\n"; + + "'/>\n"; },"4":function(depth0,helpers,partials,data) { var stack1, buffer = ""; stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); @@ -722,47 +985,54 @@ this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(dep return buffer; },"5":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n
\n"; },"7":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n
\n"; },"9":function(depth0,helpers,partials,data) { var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data}); + stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data}); if (stack1 != null) { buffer += stack1; } return buffer; },"10":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " \n"; +},"12":function(depth0,helpers,partials,data) { var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data})); + stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data})); if (stack1 != null) { buffer += stack1; } return buffer; -},"11":function(depth0,helpers,partials,data) { +},"13":function(depth0,helpers,partials,data) { return ""; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); if (stack1 != null) { buffer += stack1; } - buffer += "\n\n"; + buffer += "\n\n "; stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); if (stack1 != null) { buffer += stack1; } - buffer += "\n"; + buffer += "\n\n"; stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n \n\n"; + return buffer + "\n\n"; },"useData":true}); this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { var stack1, buffer = ""; @@ -842,7 +1112,7 @@ this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({ },"4":function(depth0,helpers,partials,data) { return " \n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n \n
\n
\n"},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'
\n
\n
\n
\n \n
\n \n \n
\n
\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),Handlebars.registerHelper("renderTextParam",function(e){var t,n="text",r="",i="array"===e.type.toLowerCase()||e.allowMultiple,a=i&&Array.isArray(e["default"])?e["default"].join("\n"):e["default"],o=Object.keys(e).filter(function(e){return null!==e.match(/^X-data-/i)}).reduce(function(t,n){return t+=" "+n.substring(2,n.length)+"='"+e[n]+"'"},"");if("undefined"==typeof a&&(a=""),e.format&&"password"===e.format&&(n="password"),e.valueId&&(r=" id='"+e.valueId+"'"),i)t="";else{var s="parameter";e.required&&(s+=" required"),t=""}return new Handlebars.SafeString(t)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s='
'+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'
\n
';return i=a(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(s+=i),s+="
\n",i=t["if"].call(e,null!=e?e.externalDocs:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+=" ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.termsOfServiceUrl:i,{name:"if",hash:{},fn:this.program(4,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,{name:"if",hash:{},fn:this.program(6,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.url:i,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,{name:"if",hash:{},fn:this.program(10,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.license:i,{name:"if",hash:{},fn:this.program(12,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+"\n"},2:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"

"+o(a(null!=(i=null!=e?e.externalDocs:e)?i.description:i,e))+'

\n '+o(a(null!=(i=null!=e?e.externalDocs:e)?i.url:i,e))+"\n"},4:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return''},6:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"
Created by "+o(a(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,e))+"
"},8:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return""},10:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"'},12:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return""},14:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return' , api version: '+o(a(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n "},16:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="
\n";return i=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="
\n
\n
    \n\n
    \n

    [ base url: "+l((a=null!=(a=t.basePath||(null!=e?e.basePath:e))?a:s,typeof a===o?a.call(e,{name:"basePath",hash:{},data:r}):a))+"\n",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.version:i,{name:"if",hash:{},fn:this.program(14,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="]\n",i=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(16,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+"

    \n
    \n
    \n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,r){return"deprecated"},3:function(e,t,n,r){return"

    Warning: Deprecated

    \n"},5:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l='

    Implementation Notes

    \n
    ';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(l+=i),l+"
    \n"},7:function(e,t,n,r){return'
    \n '},9:function(e,t,n,r){var i,a='
    \n';return i=t.each.call(e,e,{name:"each",hash:{},fn:this.program(10,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a+"
    \n"},10:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s="
    "+o(a(null!=e?e.scope:e,e))+"
    \n"},12:function(e,t,n,r){return"
    "},14:function(e,t,n,r){return'
    \n \n
    \n'},16:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"

    Response Class (Status "+s((i=null!=(i=t.successCode||(null!=e?e.successCode:e))?i:o,typeof i===a?i.call(e,{name:"successCode",hash:{},data:r}):i))+')

    \n

    \n
    \n
    \n'},18:function(e,t,n,r){return'

    Parameters

    \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ParameterValueDescriptionParameter TypeData Type
    \n'},20:function(e,t,n,r){return"
    \n

    Response Messages

    \n \n \n \n \n \n \n \n \n \n \n\n \n
    HTTP Status CodeReasonResponse ModelHeaders
    \n"},22:function(e,t,n,r){return""},24:function(e,t,n,r){return"
    \n \n \n \n
    \n"},26:function(e,t,n,r){return"

    Request Headers

    \n
    \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="\n
      \n
    • \n \n \n
    • \n
    \n"},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,r){return" required"},3:function(e,t,n,r){return' multiple="multiple"'},5:function(e,t,n,r){return" required "},7:function(e,t,n,r){var i,a=" \n"},8:function(e,t,n,r){return' selected="" '},10:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n \n\n"},11:function(e,t,n,r){return' selected="" '},13:function(e,t,n,r){return" (default) "},15:function(e,t,n,r){return""},17:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n \n\n',i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(15,r),inverse:this.noop,data:r}),null!=i&&(u+=i),a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(17,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='\n',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='\n',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n
    \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n
    \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,r),inverse:this.program(12,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},12:function(e,t,n,r){var i,a=t.helperMissing,o="";return i=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(13,r),inverse:this.noop,data:r}),null!=i&&(o+=i),o},13:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='\n\n ',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n
    \n'},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n
    \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n
    \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(10,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a=t.helperMissing,o="";return i=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(11,r),inverse:this.noop,data:r}),null!=i&&(o+=i),o},11:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='\n\n',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n \n\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({1:function(e,t,n,r){return" : "},3:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
  • \n Raw\n
  • \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="
    \n

    \n '+u((a=null!=(a=t.name||(null!=e?e.name:e))?a:l,typeof a===s?a.call(e,{name:"name",hash:{},data:r}):a))+" ";return a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,o={name:"summary",hash:{},fn:this.program(1,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.summary||(i=c.call(e,i,o)),null!=i&&(p+=i),a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,i=typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a,null!=i&&(p+=i),p+="\n

    \n \n
    \n\n"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    \n\n
    \n\n
    \n
    \n ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,i=typeof a===o?a.call(e,{name:"signature",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n
    \n\n
    \n
    '+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:r}):a))+'
    \n \n
    \n
    \n\n'},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({1:function(e,t,n,r){var i=this.lambda,a=this.escapeExpression;return" \n "+a(i(r&&r.key,e))+"\n "+a(i(null!=e?e.description:e,e))+"\n "+a(i(null!=e?e.type:e,e))+"\n \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=""+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:r}):a))+'\n';return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,i=typeof a===o?a.call(e,{name:"message",hash:{},data:r}):a,null!=i&&(u+=i),u+='\n\n\n \n \n',i=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+" \n
    \n"},useData:!0}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var e;return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;on;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(e,t,n){"use strict";var r=e("btoa"),i=e("cookiejar"),a={each:e("lodash-compat/collection/each"),includes:e("lodash-compat/collection/includes"),isObject:e("lodash-compat/lang/isObject"),isArray:e("lodash-compat/lang/isArray")},o=t.exports.SwaggerAuthorizations=function(e){this.authz=e||{}};o.prototype.add=function(e,t){if(e&&"object"==typeof e)for(var n in e)this.authz[n]=e[n];else"string"==typeof e&&(this.authz[e]=t);return t},o.prototype.remove=function(e){return delete this.authz[e]},o.prototype.apply=function(e,t){var n=null,r=!t,i=[];return a.each(t,function(e,t){"string"==typeof t&&i.push(t),a.each(e,function(e,t){i.push(t)})}),a.each(this.authz,function(t,o){(r||a.includes(i,o))&&(n=n||!!t.apply(e))}),n};var s=t.exports.ApiKeyAuthorization=function(e,t,n){this.name=e,this.value=t,this.type=n};s.prototype.apply=function(e){return"query"===this.type?(e.url=e.url.indexOf("?")>0?e.url+"&"+this.name+"="+this.value:e.url+"?"+this.name+"="+this.value,!0):"header"===this.type?(e.headers[this.name]=this.value,!0):void 0};var l=t.exports.CookieAuthorization=function(e){this.cookie=e};l.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new i,e.cookieJar.setCookie(this.cookie),!0};var u=t.exports.PasswordAuthorization=function(e,t,n){this.name=e,this.username=t,this.password=n};u.prototype.apply=function(e){return e.headers.Authorization="Basic "+r(this.username+":"+this.password),!0}},{btoa:17,cookiejar:18,"lodash-compat/collection/each":54,"lodash-compat/collection/includes":57,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],3:[function(e,t,n){"use strict";var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),f=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","fail","failure","finish","help","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","url","useJQuery"],h=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],d=["delete","get","head","options","patch","post","put"],m=t.exports=function(e,t){return this.authorizations=null,this.authorizationScheme=null,this.basePath=null,this.debug=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,this.clientAuthorizations=new i.SwaggerAuthorizations,"undefined"!=typeof e?this.initialize(e,t):this};m.prototype.initialize=function(e,t){this.models={},this.sampleModels={},"string"==typeof e?this.url=e:"object"==typeof e&&(t=e,this.url=t.url),t=t||{},this.clientAuthorizations.add(t.authorizations),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.modelPropertyMacro||null,"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(){},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),"function"==typeof t.success&&(this.ready=!0,this.build())},m.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url);var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t.fail("http"!==t.url.substring(0,4)?"Please specify the protocol for "+t.url:0===e.status?"Can't read from server. It may not have the appropriate access-control-origin settings.":404===e.status?"Can't read swagger JSON from "+t.url:e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj;if(!n)return t.fail("failed to parse JSON/YAML response");if(t.swaggerVersion=n.swaggerVersion,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.url,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,function(e){(new u).resolve(e,t.url,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)setTimeout(function(){(new u).resolve(t.spec,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this},m.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t-1?"_"+e:e,i=r.indexOf(h,e)>-1?"_"+e:e,o=m[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),r.indexOf(h,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"._"+c+"' instead of 'client.apis."+i+"."+c+"'."),c="_"+c,p.nickname=c),r.isUndefined(o)){o=m[t]=m.apis[i]={},o.operations={},o.label=i,o.apis={};var s=n[e];r.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),m[t].help=r.bind(m.help,o),m.apisArray.push(new l(e,o.description,o.externalDocs,p))}r.isFunction(o.help)||(o.help=r.bind(m.help,o)),m.apis[i][c]=o[c]=r.bind(p.execute,p),m.apis[i][c].help=o[c].help=r.bind(p.help,p),m.apis[i][c].asCurl=o[c].asCurl=r.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=r.find(m.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})}),this.isBuilt=!0,this.success&&(this.isValid=!0,this.isBuilt=!0,this.success()),this},m.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4].replace(":",""),host:n[11],port:n[12],path:n[15]}},m.prototype.help=function(e){var t="";return this instanceof m?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+=" * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+=" * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},m.prototype.tagFromLabel=function(e){return e},m.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},m.prototype.fail=function(e){throw this.failure(e),e}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":7,"./types/model":8,"./types/operation":9,"./types/operationGroup":10,"lodash-compat/array/indexOf":51,"lodash-compat/collection/find":55,"lodash-compat/collection/forEach":56,"lodash-compat/function/bind":60,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isFunction":146,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isUndefined":152}],4:[function(e,t,n){(function(n){"use strict";var r={isPlainObject:e("lodash-compat/lang/isPlainObject")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return''+e+":"+t+""};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},s=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=o(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=s(e.items||e.$ref||{}):(n+="Array[",n+=s(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?o(e.$ref):e.type,n}}).call(this,e("_process"))},{_process:16,"lodash-compat/lang/isPlainObject":149}],5:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("jquery"),a=e("superagent"),o=e("js-yaml"),s=function(){},l=function(){},u=t.exports=function(){};u.prototype.execute=function(e,t){var n;n=t&&t.client?t.client:new l(t),(e&&e.useJQuery===!0||this.isInternetExplorer())&&(n=new s(t));var r=e.on.response,i=function(e){t&&t.responseInterceptor&&(e=t.responseInterceptor.apply(e)),r(e)};e.on.response=function(e){i(e)},e&&"object"==typeof e.body&&(e.body.type&&"formData"===e.body.type?(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]):e.body=JSON.stringify(e.body)),n.execute(e)},u.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},s.prototype.execute=function(e){var t=e.on,n=e;return e.type=e.method,e.cache=!1,delete e.useJQuery,e.data=e.body,delete e.body,e.complete=function(e){for(var i={},a=e.getAllResponseHeaders().split("\n"),s=0;s=200&&e.status<300)t.response(f);else{if(!(0===e.status||e.status>=400&&e.status<599))return t.response(f);t.error(f)}},i.support.cors=!0,i.ajax(e)},l.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,i=e.headers||{},s=a[t](e.url);for(n in i)s.set(n,i[n]);e.body&&s.send(e.body),"function"==typeof s.buffer&&s.buffer(),s.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var i,a={url:e.url,method:e.method,headers:n.headers};if(!t&&n.error&&(t=n.error),t&&e.on&&e.on.error)a.obj=t,a.status=n?n.status:500,a.statusText=n?n.text:t.message,i=e.on.error;else if(n&&e.on&&e.on.response){var s;if(n.body&&Object.keys(n.body).length>0)s=n.body;else try{s=o.safeLoad(n.text),s="string"==typeof s?null:s}catch(l){r.log("cannot parse JSON/YAML content")}a.obj=s||null,a.status=n.status,a.statusText=n.text,i=e.on.response}a.data=a.statusText,i&&i(a)})}},{"./helpers":4,jquery:19,"js-yaml":20,superagent:163}],6:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){};i.prototype.resolve=function(e,t,n,i){var a,o,s=t,l=n,u=i;"function"==typeof t&&(s=null,l=t,u=n);var c=s;this.scope=u||this,this.iteration=this.iteration||0;var p,f,h,d,m=0,g={},y={},v=[];for(p in e.definitions){var b=e.definitions[p];for(d in b.properties)h=b.properties[d],this.resolveTo(s,h,v,"/definitions");if(b.allOf){var w=b.allOf;for(w.sort(function(e,t){return e.$ref&&t.$ref?0:e.$ref?-1:1}),o=0;o=0){for(var N=0;N0&&(P+="/"),P+=L[_];O.root=P,T.push(O)}else{var $=O.key.split("#");if(2===$.length){(0===$[0].indexOf("http://")||0===$[0].indexOf("https://"))&&(O.root=$[0]),a=$[1].split("/");var M,R=e;for(_=0;_1){s=null;break}c.length>0&&(s=s[c])}var p=a.key;l=a.key.split("/");var f=l[l.length-1];f.indexOf("#")>=0&&(f=f.split("#")[1]),null!==s&&"undefined"!=typeof s?r[p]={name:f,obj:s,key:a.key,root:a.root}:i[p]={root:a.root,location:a.location}},i.prototype.finish=function(e,t,n,r,i,a){var o;for(o in n){var s=n[o],l=s.key,u=r[l];if(u)if(e.definitions=e.definitions||{},"ref"===s.resolveAs)e.definitions[u.name]=u.obj,s.obj.$ref="#/definitions/"+u.name;else if("inline"===s.resolveAs){var c=s.obj;c["x-resolved-from"]=[s.key],delete c.$ref;for(l in u.obj){var p=this.retainRoot(u.obj[l],s.root);c[l]=p}}}var f=this.countUnresolvedRefs(e);0===f.length||this.iteration>5?(this.resolveAllOf(e.definitions),a.call(this.scope,e,i)):(this.iteration+=1,this.resolve(e,t,a,this.scope))},i.prototype.countUnresolvedRefs=function(e){var t,n=this.getRefs(e),r=[],i=[];for(t in n)0===t.indexOf("#")?r.push(t.substring(1)):i.push(t);for(t in r){var a=r[t],o=a.split("/"),s=e;for(var l in o){var u=o[l];if(""!==u&&(s=s[u],"undefined"==typeof s)){i.push(a);break}}}return i.length},i.prototype.getRefs=function(e,t){t=t||e;var n={};for(var r in t){var i=t[r];if("$ref"===r&&"string"==typeof i)n[i]=null;else if("object"==typeof i){var a=this.getRefs(i);for(var o in a)n[o]=null}}return n},i.prototype.retainRoot=function(e,t){for(var n in e){var r=e[n];"$ref"===n&&"string"==typeof r?0!==r.indexOf("http://")&&0!==r.indexOf("https://")&&(0!==r.indexOf("#")&&(r="#"+r),r=(t||"")+r,e[n]=r):"object"==typeof r&&this.retainRoot(r,t)}return e},i.prototype.resolveInline=function(e,t,n,r,i,a){var o,s,l,u,c=n.$ref,p=n.$ref,f=!1;if(p){if(0===p.indexOf("../")){for(s=p.split("../"),l=e.split("/"),p="",o=0;o0&&(e+="/"),e+=l[o];f=!0}if(p.indexOf("#")>=0)if(0===p.indexOf("/"))u=p.split("#"),s=e.split("//"),l=s[1].split("/"),e=s[0]+"//"+l[0]+u[0],a=u[1];else{if(u=p.split("#"),""!==u[0]){if(l=e.split("/"),l=l.slice(0,l.length-1),!f){e="";for(var h=0;h0&&(e+="/"),e+=l[h]}e+="/"+p.split("#")[0]}a=u[1]}0===p.indexOf("http")?(p.indexOf("#")>=0?(e=p.split("#")[0],a=p.split("#")[1]):(e=p,a=""),r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})):0===p.indexOf("#")?(a=p.split("#")[1],r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})):r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else"array"===n.type&&this.resolveTo(e,n.items,r,a)},i.prototype.resolveTo=function(e,t,n,r){var i=t.$ref;if(i)i.indexOf("#")>=0&&(r=i.split("#")[1]),n.push({obj:t,resolveAs:"ref",root:e,key:i,location:r});else if("array"===t.type){var a=t.items;this.resolveTo(e,a,n,r)}},i.prototype.resolveAllOf=function(e,t,n){n=n||0,t=t||e;var r;for(var i in t){var a=t[i];if(a&&"undefined"!=typeof a.allOf){var o=a.allOf;if(Array.isArray(o)){var s={};s["x-composed"]=!0;for(var l=0;l0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):0===e.basePath.indexOf("https://")?(i=e.basePath.substring("https://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):t.basePath=e.basePath;var o;if(e.authorizations&&(o=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),"object"==typeof e)for(n in e.models){var s=e.models[n],l=s.id||n;this.modelMap[l]=n}for(r=0;r0&&(o["enum"]=a),o.required=i.required,t.definitions[n]=o}}},i.prototype.extractTag=function(e){var t=e||"default";return(0===t.indexOf("http:")||0===t.indexOf("https:"))&&(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},i.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1; +(function(){"use strict";function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},e.highlightSizeThreshold||(e.highlightSizeThreshold=1e5),e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),"string"==typeof e.oauth2RedirectUrl&&(window.oAuthRedirectUrl=e.redirectUrl),$("#"+this.dom_id).length||$("body").append('
    '),this.options=e,marked.setOptions({gfm:!0});var t=this;this.options.success=function(){return t.render()},this.options.progress=function(e){return t.showMessage(e)},this.options.failure=function(e){return t.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return t.updateSwaggerUi(e)})},setOption:function(e,t){this.options[e]=t},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.api&&(this.options.authorizations=this.api.clientAuthorizations.authz),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,t){if(0===t.indexOf("/")){var n=e.split("/");return e=n[0]+"//"+n[2],e+t}var r=e.length;return e.indexOf("?")>-1&&(r=Math.min(r,e.indexOf("?"))),e.indexOf("#")>-1&&(r=Math.min(r,e.indexOf("#"))),e=e.substring(0,r),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t},showMessage:function(e){void 0===e&&(e="");var t=$("#message-bar");t.removeClass("message-fail"),t.addClass("message-success"),t.html(e),window.SwaggerTranslator&&window.SwaggerTranslator.translate(t)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var t=$("#message-bar").text(e);return this.options.onFailure&&this.options.onFailure(e),t},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))}),$(".propDesc",".model-signature .description").each(function(){$(this).html(marked($(this).html())).addClass("markdown")})}}),window.SwaggerUi.Views={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),function(e,t){"function"==typeof define&&define.amd?define(["b"],function(n){return e.SwaggerUi=t(n)}):"object"==typeof exports?module.exports=t(require("b")):e.SwaggerUi=t(e.b)}(this,function(){return SwaggerUi}),this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"\n
    \n
    \n
    \n \n \n
    \n
    \n"},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),Handlebars.registerHelper("renderTextParam",function(e){var t,n="text",r="",i="array"===e.type.toLowerCase()||e.allowMultiple,a=i&&Array.isArray(e["default"])?e["default"].join("\n"):e["default"],o=Object.keys(e).filter(function(e){return null!==e.match(/^X-data-/i)}).reduce(function(t,n){return t+=" "+n.substring(2,n.length)+"='"+e[n]+"'"},"");if("undefined"==typeof a&&(a=""),e.format&&"password"===e.format&&(n="password"),e.valueId&&(r=" id='"+e.valueId+"'"),i)t="";else{var s="parameter";e.required&&(s+=" required"),t=""}return new Handlebars.SafeString(t)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s='
    '+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'
    \n
    ';return i=a(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(s+=i),s+="
    \n",i=t["if"].call(e,null!=e?e.externalDocs:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+=" ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.termsOfServiceUrl:i,{name:"if",hash:{},fn:this.program(4,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,{name:"if",hash:{},fn:this.program(6,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.url:i,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,{name:"if",hash:{},fn:this.program(10,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+="\n ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.license:i,{name:"if",hash:{},fn:this.program(12,r),inverse:this.noop,data:r}),null!=i&&(s+=i),s+"\n"},2:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"

    "+o(a(null!=(i=null!=e?e.externalDocs:e)?i.description:i,e))+'

    \n '+o(a(null!=(i=null!=e?e.externalDocs:e)?i.url:i,e))+"\n"},4:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return''},6:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"
    Created by "+o(a(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,e))+"
    "},8:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return""},10:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"'},12:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return""},14:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return' , api version: '+o(a(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n "},16:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="
    \n";return i=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="
    \n
    \n
      \n\n
      \n

      [ base url: "+l((a=null!=(a=t.basePath||(null!=e?e.basePath:e))?a:s,typeof a===o?a.call(e,{name:"basePath",hash:{},data:r}):a))+"\n",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.version:i,{name:"if",hash:{},fn:this.program(14,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="]\n",i=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(16,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+"

      \n
      \n
      \n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,r){return"deprecated"},3:function(e,t,n,r){return"

      Warning: Deprecated

      \n"},5:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l='

      Implementation Notes

      \n
      ';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(l+=i),l+"
      \n"},7:function(e,t,n,r){return'
      \n '},9:function(e,t,n,r){var i,a='
      \n';return i=t.each.call(e,e,{name:"each",hash:{},fn:this.program(10,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a+"
      \n"},10:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s="
      "+o(a(null!=e?e.scope:e,e))+"
      \n"},12:function(e,t,n,r){return"
      "},14:function(e,t,n,r){return'
      \n \n
      \n'},16:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"

      Response Class (Status "+s((i=null!=(i=t.successCode||(null!=e?e.successCode:e))?i:o,typeof i===a?i.call(e,{name:"successCode",hash:{},data:r}):i))+')

      \n

      \n
      \n
      \n'},18:function(e,t,n,r){return'

      Parameters

      \n \n \n \n \n \n \n \n \n \n \n \n\n \n
      ParameterValueDescriptionParameter TypeData Type
      \n'},20:function(e,t,n,r){return"
      \n

      Response Messages

      \n \n \n \n \n \n \n \n \n \n \n\n \n
      HTTP Status CodeReasonResponse ModelHeaders
      \n"},22:function(e,t,n,r){return""},24:function(e,t,n,r){return"
      \n \n \n \n
      \n"},26:function(e,t,n,r){return"

      Request Headers

      \n
      \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="\n
        \n
      • \n \n \n
      • \n
      \n"},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n
      \n'},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(10,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a=t.helperMissing,o="";return i=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(11,r),inverse:this.noop,data:r}),null!=i&&(o+=i),o},11:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='\n\n',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n \n\n'},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,r){return" required"},3:function(e,t,n,r){return' multiple="multiple"'},5:function(e,t,n,r){return" required "},7:function(e,t,n,r){var i,a=" \n"},8:function(e,t,n,r){return' selected="" '},10:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n \n\n"},11:function(e,t,n,r){return' selected="" '},13:function(e,t,n,r){return" (default) "},15:function(e,t,n,r){return""},17:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n \n\n',i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(15,r),inverse:this.noop,data:r}),null!=i&&(u+=i),a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(17,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='\n', +a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='\n',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,r),inverse:this.program(12,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},12:function(e,t,n,r){var i,a=t.helperMissing,o="";return i=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(13,r),inverse:this.noop,data:r}),null!=i&&(o+=i),o},13:function(e,t,n,r){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='\n\n ',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(u+=i),u+="\n\n",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,i=typeof a===o?a.call(e,{name:"paramType",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({1:function(e,t,n,r){return" : "},3:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
    • \n Raw\n
    • \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="
      \n

      \n '+u((a=null!=(a=t.name||(null!=e?e.name:e))?a:l,typeof a===s?a.call(e,{name:"name",hash:{},data:r}):a))+" ";return a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,o={name:"summary",hash:{},fn:this.program(1,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.summary||(i=c.call(e,i,o)),null!=i&&(p+=i),a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,i=typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a,null!=i&&(p+=i),p+="\n

      \n \n
      \n\n"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='\n\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      \n\n
      \n\n
      \n
      \n ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,i=typeof a===o?a.call(e,{name:"signature",hash:{},data:r}):a,null!=i&&(u+=i),u+'\n
      \n\n
      \n
      '+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:r}):a))+'
      \n \n
      \n
      \n\n'},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({1:function(e,t,n,r){var i=this.lambda,a=this.escapeExpression;return" \n "+a(i(r&&r.key,e))+"\n "+a(i(null!=e?e.description:e,e))+"\n "+a(i(null!=e?e.type:e,e))+"\n \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=""+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:r}):a))+'\n';return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,i=typeof a===o?a.call(e,{name:"message",hash:{},data:r}):a,null!=i&&(u+=i),u+='\n\n\n \n \n',i=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+" \n
      \n"},useData:!0}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var e;return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;on;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(e,t,n){var r=e("btoa"),i=e("cookiejar"),a={each:e("lodash-compat/collection/each"),includes:e("lodash-compat/collection/includes"),isObject:e("lodash-compat/lang/isObject"),isArray:e("lodash-compat/lang/isArray")},o=t.exports.SwaggerAuthorizations=function(e){this.authz=e||{}};o.prototype.add=function(e,t){if(e&&"object"==typeof e)for(var n in e)this.authz[n]=e[n];else"string"==typeof e&&(this.authz[e]=t);return t},o.prototype.remove=function(e){return delete this.authz[e]},o.prototype.apply=function(e,t){var n=null,r=!t,i=[];return a.each(t,function(e,t){"string"==typeof t&&i.push(t),a.each(e,function(e,t){i.push(t)})}),a.each(this.authz,function(t,o){(r||a.includes(i,o))&&(n=n||!!t.apply(e))}),n};var s=t.exports.ApiKeyAuthorization=function(e,t,n){this.name=e,this.value=t,this.type=n};s.prototype.apply=function(e){return"query"===this.type?(e.url=e.url.indexOf("?")>0?e.url+"&"+this.name+"="+this.value:e.url+"?"+this.name+"="+this.value,!0):"header"===this.type?(e.headers[this.name]=this.value,!0):void 0};var l=t.exports.CookieAuthorization=function(e){this.cookie=e};l.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new i,e.cookieJar.setCookie(this.cookie),!0};var u=t.exports.PasswordAuthorization=function(e,t,n){this.name=e,this.username=t,this.password=n};u.prototype.apply=function(e){return e.headers.Authorization="Basic "+r(this.username+":"+this.password),!0}},{btoa:17,cookiejar:18,"lodash-compat/collection/each":54,"lodash-compat/collection/includes":57,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],3:[function(e,t,n){var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),f=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","fail","failure","finish","help","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","url","useJQuery"],h=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],d=["delete","get","head","options","patch","post","put"],m=t.exports=function(e,t){return this.authorizations=null,this.authorizationScheme=null,this.basePath=null,this.debug=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,this.clientAuthorizations=new i.SwaggerAuthorizations,"undefined"!=typeof e?this.initialize(e,t):this};m.prototype.initialize=function(e,t){this.models={},this.sampleModels={},"string"==typeof e?this.url=e:"object"==typeof e&&(t=e,this.url=t.url),t=t||{},this.clientAuthorizations.add(t.authorizations),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.modelPropertyMacro||null,"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(){},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),"function"==typeof t.success&&(this.ready=!0,this.build())},m.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url);var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t.fail("http"!==t.url.substring(0,4)?"Please specify the protocol for "+t.url:0===e.status?"Can't read from server. It may not have the appropriate access-control-origin settings.":404===e.status?"Can't read swagger JSON from "+t.url:e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj;if(!n)return t.fail("failed to parse JSON/YAML response");if(t.swaggerVersion=n.swaggerVersion,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.url,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,function(e){(new u).resolve(e,t.url,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)setTimeout(function(){(new u).resolve(t.spec,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this},m.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t-1?"_"+e:e,i=r.indexOf(h,e)>-1?"_"+e:e,o=m[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),r.indexOf(h,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"._"+c+"' instead of 'client.apis."+i+"."+c+"'."),c="_"+c,p.nickname=c),r.isUndefined(o)){o=m[t]=m.apis[i]={},o.operations={},o.label=i,o.apis={};var s=n[e];r.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),m[t].help=r.bind(m.help,o),m.apisArray.push(new l(e,o.description,o.externalDocs,p))}r.isFunction(o.help)||(o.help=r.bind(m.help,o)),m.apis[i][c]=o[c]=r.bind(p.execute,p),m.apis[i][c].help=o[c].help=r.bind(p.help,p),m.apis[i][c].asCurl=o[c].asCurl=r.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=r.find(m.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})}),this.isBuilt=!0,this.success&&(this.isValid=!0,this.isBuilt=!0,this.success()),this},m.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4].replace(":",""),host:n[11],port:n[12],path:n[15]}},m.prototype.help=function(e){var t="";return this instanceof m?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+=" * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+=" * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},m.prototype.tagFromLabel=function(e){return e},m.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},m.prototype.fail=function(e){throw this.failure(e),e}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":7,"./types/model":8,"./types/operation":9,"./types/operationGroup":10,"lodash-compat/array/indexOf":51,"lodash-compat/collection/find":55,"lodash-compat/collection/forEach":56,"lodash-compat/function/bind":60,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isFunction":146,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isUndefined":152}],4:[function(e,t,n){(function(n){var r={isPlainObject:e("lodash-compat/lang/isPlainObject")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return''+e+":"+t+""};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},s=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=o(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=s(e.items||e.$ref||{}):(n+="Array[",n+=s(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?o(e.$ref):e.type,n}}).call(this,e("_process"))},{_process:16,"lodash-compat/lang/isPlainObject":149}],5:[function(e,t,n){var r=e("./helpers"),i=e("jquery"),a=e("superagent"),o=e("js-yaml"),s=function(){},l=function(){},u=t.exports=function(){};u.prototype.execute=function(e,t){var n;n=t&&t.client?t.client:new l(t),(e&&e.useJQuery===!0||this.isInternetExplorer())&&(n=new s(t));var r=e.on.response,i=function(e){t&&t.responseInterceptor&&(e=t.responseInterceptor.apply(e)),r(e)};e.on.response=function(e){i(e)},e&&"object"==typeof e.body&&(e.body.type&&"formData"===e.body.type?(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]):e.body=JSON.stringify(e.body)),n.execute(e)},u.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},s.prototype.execute=function(e){var t=e.on,n=e;return e.type=e.method,e.cache=!1,delete e.useJQuery,e.data=e.body,delete e.body,e.complete=function(e){for(var i={},a=e.getAllResponseHeaders().split("\n"),s=0;s=200&&e.status<300)t.response(f);else{if(!(0===e.status||e.status>=400&&e.status<599))return t.response(f);t.error(f)}},i.support.cors=!0,i.ajax(e)},l.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,i=e.headers||{},s=a[t](e.url);for(n in i)s.set(n,i[n]);e.body&&s.send(e.body),"function"==typeof s.buffer&&s.buffer(),s.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var i,a={url:e.url,method:e.method,headers:n.headers};if(!t&&n.error&&(t=n.error),t&&e.on&&e.on.error)a.obj=t,a.status=n?n.status:500,a.statusText=n?n.text:t.message,i=e.on.error;else if(n&&e.on&&e.on.response){var s;if(n.body&&Object.keys(n.body).length>0)s=n.body;else try{s=o.safeLoad(n.text),s="string"==typeof s?null:s}catch(l){r.log("cannot parse JSON/YAML content")}a.obj=s||null,a.status=n.status,a.statusText=n.text,i=e.on.response}a.data=a.statusText,i&&i(a)})}},{"./helpers":4,jquery:19,"js-yaml":20,superagent:163}],6:[function(e,t,n){var r=e("./http"),i=t.exports=function(){};i.prototype.resolve=function(e,t,n,i){var a,o,s=t,l=n,u=i;"function"==typeof t&&(s=null,l=t,u=n);var c=s;this.scope=u||this,this.iteration=this.iteration||0;var p,f,h,d,m=0,g={},y={},v=[];for(p in e.definitions){var b=e.definitions[p];for(d in b.properties)h=b.properties[d],this.resolveTo(s,h,v,"/definitions");if(b.allOf){var w=b.allOf;for(w.sort(function(e,t){return e.$ref&&t.$ref?0:e.$ref?-1:1}),o=0;o=0){for(var N=0;N0&&(P+="/"),P+=L[_];O.root=P,T.push(O)}else{var $=O.key.split("#");if(2===$.length){(0===$[0].indexOf("http://")||0===$[0].indexOf("https://"))&&(O.root=$[0]),a=$[1].split("/");var M,R=e;for(_=0;_1){s=null;break}c.length>0&&(s=s[c])}var p=a.key;l=a.key.split("/");var f=l[l.length-1];f.indexOf("#")>=0&&(f=f.split("#")[1]),null!==s&&"undefined"!=typeof s?r[p]={name:f,obj:s,key:a.key,root:a.root}:i[p]={root:a.root,location:a.location}},i.prototype.finish=function(e,t,n,r,i,a){var o;for(o in n){var s=n[o],l=s.key,u=r[l];if(u)if(e.definitions=e.definitions||{},"ref"===s.resolveAs)e.definitions[u.name]=u.obj,s.obj.$ref="#/definitions/"+u.name;else if("inline"===s.resolveAs){var c=s.obj;c["x-resolved-from"]=[s.key],delete c.$ref;for(l in u.obj){var p=this.retainRoot(u.obj[l],s.root);c[l]=p}}}var f=this.countUnresolvedRefs(e);0===f.length||this.iteration>5?(this.resolveAllOf(e.definitions),a.call(this.scope,e,i)):(this.iteration+=1,this.resolve(e,t,a,this.scope))},i.prototype.countUnresolvedRefs=function(e){var t,n=this.getRefs(e),r=[],i=[];for(t in n)0===t.indexOf("#")?r.push(t.substring(1)):i.push(t);for(t in r){var a=r[t],o=a.split("/"),s=e;for(var l in o){var u=o[l];if(""!==u&&(s=s[u],"undefined"==typeof s)){i.push(a);break}}}return i.length},i.prototype.getRefs=function(e,t){t=t||e;var n={};for(var r in t){var i=t[r];if("$ref"===r&&"string"==typeof i)n[i]=null;else if("object"==typeof i){var a=this.getRefs(i);for(var o in a)n[o]=null}}return n},i.prototype.retainRoot=function(e,t){for(var n in e){var r=e[n];"$ref"===n&&"string"==typeof r?0!==r.indexOf("http://")&&0!==r.indexOf("https://")&&(0!==r.indexOf("#")&&(r="#"+r),r=(t||"")+r,e[n]=r):"object"==typeof r&&this.retainRoot(r,t)}return e},i.prototype.resolveInline=function(e,t,n,r,i,a){ +var o,s,l,u,c=n.$ref,p=n.$ref,f=!1;if(p){if(0===p.indexOf("../")){for(s=p.split("../"),l=e.split("/"),p="",o=0;o0&&(e+="/"),e+=l[o];f=!0}if(p.indexOf("#")>=0)if(0===p.indexOf("/"))u=p.split("#"),s=e.split("//"),l=s[1].split("/"),e=s[0]+"//"+l[0]+u[0],a=u[1];else{if(u=p.split("#"),""!==u[0]){if(l=e.split("/"),l=l.slice(0,l.length-1),!f){e="";for(var h=0;h0&&(e+="/"),e+=l[h]}e+="/"+p.split("#")[0]}a=u[1]}0===p.indexOf("http")?(p.indexOf("#")>=0?(e=p.split("#")[0],a=p.split("#")[1]):(e=p,a=""),r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})):0===p.indexOf("#")?(a=p.split("#")[1],r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})):r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else"array"===n.type&&this.resolveTo(e,n.items,r,a)},i.prototype.resolveTo=function(e,t,n,r){var i=t.$ref;if(i)i.indexOf("#")>=0&&(r=i.split("#")[1]),n.push({obj:t,resolveAs:"ref",root:e,key:i,location:r});else if("array"===t.type){var a=t.items;this.resolveTo(e,a,n,r)}},i.prototype.resolveAllOf=function(e,t,n){n=n||0,t=t||e;var r;for(var i in t){var a=t[i];if(a&&"undefined"!=typeof a.allOf){var o=a.allOf;if(Array.isArray(o)){var s={};s["x-composed"]=!0;for(var l=0;l0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):0===e.basePath.indexOf("https://")?(i=e.basePath.substring("https://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):t.basePath=e.basePath;var o;if(e.authorizations&&(o=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),"object"==typeof e)for(n in e.models){var s=e.models[n],l=s.id||n;this.modelMap[l]=n}for(r=0;r0&&(o["enum"]=a),o.required=i.required,t.definitions[n]=o}}},i.prototype.extractTag=function(e){var t=e||"default";return(0===t.indexOf("http:")||0===t.indexOf("https:"))&&(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},i.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1;for(a=0;ai;i++){var u=e.apis[i],c=u.path,p=this.getAbsolutePath(e.swaggerVersion,this.docLocation,c);u.description&&(t.tags=t.tags||[],t.tags.push({name:this.extractTag(u.path),description:u.description||""}));var f={url:p,headers:{accept:"application/json"},on:{},method:"get"};f.on.response=function(e){a+=1;var t=e.obj;t&&o.declaration(t,l),a===s&&o.finish(n,l)},f.on.error=function(e){console.error(e),a+=1,a===s&&o.finish(n,l)},this.clientAuthorizations&&"function"==typeof this.clientAuthorizations.apply&&this.clientAuthorizations.apply(f),(new r).execute(f)}},i.prototype.getAbsolutePath=function(e,t,n){if("1.0"===e&&t.endsWith(".json")){var r=t.lastIndexOf("/");r>0&&(t=t.substring(0,r))}var i=t;return 0===n.indexOf("http://")||0===n.indexOf("https://")?i=n:(t.endsWith("/")&&(i=t.substring(0,t.length-1)),i+=n),i=i.replace("{format}","json")},i.prototype.securityDefinitions=function(e,t){if(e.authorizations){var n;for(n in e.authorizations){var r=!1,i={},a=e.authorizations[n];if("apiKey"===a.type)i.type="apiKey",i["in"]=a.passAs,i.name=a.keyname||n,r=!0;else if("oauth2"===a.type){var o,s=a.scopes||[],l={};for(o in s){var u=s[o];l[u.scope]=u.description}if(i.type="oauth2",o>0&&(i.scopes=l),a.grantTypes){if(a.grantTypes.implicit){var c=a.grantTypes.implicit;i.flow="implicit",i.authorizationUrl=c.loginEndpoint,r=!0}if(a.grantTypes.authorization_code&&!i.flow){var p=a.grantTypes.authorization_code;i.flow="accessCode",i.authorizationUrl=p.tokenRequestEndpoint.url,i.tokenUrl=p.tokenEndpoint.url,r=!0}}}r&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[n]=i)}}},i.prototype.apiInfo=function(e,t){if(e.info){var n=e.info;t.info={},n.contact&&(t.info.contact={},t.info.contact.email=n.contact),n.description&&(t.info.description=n.description),n.title&&(t.info.title=n.title),n.termsOfServiceUrl&&(t.info.termsOfService=n.termsOfServiceUrl),(n.license||n.licenseUrl)&&(t.license={},n.license&&(t.license.name=n.license),n.licenseUrl&&(t.license.url=n.licenseUrl))}else this.warnings.push("missing info section")},i.prototype.finish=function(e,t){e(t)}},{"./http":5}],8:[function(e,t,n){var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isString:e("lodash-compat/lang/isString"),isUndefined:e("lodash-compat/lang/isUndefined"),keys:e("lodash-compat/object/keys"),map:e("lodash-compat/collection/map")},i=e("../helpers"),a=e("js-yaml"),o=t.exports=function(e,t,n,r){return this.definition=t||{},this.isArray="array"===t.type,this.models=n||{},this.name=t.title||e||"Inline Model",this.modelPropertyMacro=r||function(e){return e["default"]},this},s=function(e,t,n,a){var s='',l="",u={},c=[],p=0,f=function(e,t,s){var l,c=t;return e.$ref?(c=e.title||i.simpleRef(e.$ref),l=n[c]):r.isUndefined(t)&&(c=e.title||"Inline Model "+ ++p,l=new o(c,e,n,a)),s!==!0&&(u[c]=r.isUndefined(l)?{}:l.definition),c},h=function(e){var t='',n=e.type||"object";return e.$ref?t+=f(e,i.simpleRef(e.$ref)):"object"===n?t+=r.isUndefined(e.properties)?"object":f(e):"array"===n?(t+="Array[",r.isArray(e.items)?t+=r.map(e.items,f).join(","):r.isPlainObject(e.items)?t+=r.isUndefined(e.items.$ref)?r.isUndefined(e.items.type)||-1!==r.indexOf(["array","object"],e.items.type)?f(e.items):e.items.type:f(e.items,i.simpleRef(e.items.$ref)):(i.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+=""},d=function(e,t){var n="",a=e.type||"object",o="array"===a;switch(o&&(a=r.isPlainObject(e.items)&&!r.isUndefined(e.items.type)?e.items.type:"object"),r.isUndefined(e["default"])||(n+=i.optionHtml("Default",e["default"])),a){case"string":e.minLength&&(n+=i.optionHtml("Min. Length",e.minLength)),e.maxLength&&(n+=i.optionHtml("Max. Length",e.maxLength)),e.pattern&&(n+=i.optionHtml("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=i.optionHtml("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=i.optionHtml("Exclusive Min.","true")),e.maximum&&(n+=i.optionHtml("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=i.optionHtml("Exclusive Max.","true")),e.multipleOf&&(n+=i.optionHtml("Multiple Of",e.multipleOf))}if(o&&(e.minItems&&(n+=i.optionHtml("Min. Items",e.minItems)),e.maxItems&&(n+=i.optionHtml("Max. Items",e.maxItems)),e.uniqueItems&&(n+=i.optionHtml("Unique Items","true")),e.collectionFormat&&(n+=i.optionHtml("Coll. Format",e.collectionFormat))),r.isUndefined(e.items)&&r.isArray(e["enum"])){var s;s="number"===a||"integer"===a?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=i.optionHtml("Enum",s)}return n.length>0&&(t=''+t+'"+n+"
      '+a+"
      "),t},m=function(e,t){var o=e.type||"object",u="array"===e.type,p=s+t+" "+(u?"[":"{")+l;return t&&c.push(t),u?r.isArray(e.items)?p+="
      "+r.map(e.items,function(e){var t=e.type||"object";return r.isUndefined(e.$ref)?r.indexOf(["array","object"],t)>-1?"object"===t&&r.isUndefined(e.properties)?"object":f(e):d(e,t):f(e,i.simpleRef(e.$ref))}).join(",
      "):r.isPlainObject(e.items)?p+=r.isUndefined(e.items.$ref)?r.indexOf(["array","object"],e.items.type||"object")>-1?(r.isUndefined(e.items.type)||"object"===e.items.type)&&r.isUndefined(e.items.properties)?"
      object
      ":"
      "+f(e.items)+"
      ":"
      "+d(e.items,e.items.type)+"
      ":"
      "+f(e.items,i.simpleRef(e.items.$ref))+"
      ":(i.log("Array type's 'items' property is not an array or an object, cannot process"),p+="
      object
      "):e.$ref?p+="
      "+f(e,t)+"
      ":"object"===o?(p+="
      ",r.isPlainObject(e.properties)&&(p+=r.map(e.properties,function(t,o){var s,l=r.indexOf(e.required,o)>=0,u=r.cloneDeep(t),c=l?"required":"",p=''+o+" (";return u["default"]=a(u),u=i.resolveSchema(u),r.isUndefined(u.$ref)||(s=n[i.simpleRef(u.$ref)],r.isUndefined(s)||-1!==r.indexOf([void 0,"array","object"],s.definition.type)||(u=i.resolveSchema(s.definition))),p+=h(u),l||(p+=', optional'),p+=")",r.isUndefined(u.description)||(p+=': '+u.description+""),u["enum"]&&(p+=' = [\''+u["enum"].join("', '")+"']"),d(u,p)}).join(",
      ")),p+="
      "):p+="
      "+d(e,o)+"
      ",p+s+(u?"]":"}")+l};t=i.resolveSchema(t);for(var g=m(t,e);r.keys(u).length>0;)r.forEach(u,function(e,t){var n=r.indexOf(c,t)>-1;delete u[t],n||(c.push(t),g+="
      "+m(e,t))});return g},l=function(e,t,n,a){e=i.resolveSchema(e);var o,s,u=e.type||"object",c=e.format;return e.example?s=e.example:r.isUndefined(e.items)&&r.isArray(e["enum"])&&(s=e["enum"][0]),r.isUndefined(s)&&(e.$ref?(o=t[i.simpleRef(e.$ref)],r.isUndefined(o)||(r.isUndefined(n[o.name])?(n[o.name]=o,s=l(o.definition,t,n,a),delete n[o.name]):s="array"===o.type?[]:{})):r.isUndefined(e["default"])?"string"===u?s="date-time"===c?(new Date).toISOString():"date"===c?(new Date).toISOString().split("T")[0]:"string":"integer"===u?s=0:"number"===u?s=0:"boolean"===u?s=!0:"object"===u?(s={},r.forEach(e.properties,function(e,i){var o=r.cloneDeep(e);o["default"]=a(e),s[i]=l(o,t,n,a)})):"array"===u&&(s=[],r.isArray(e.items)?r.forEach(e.items,function(e){s.push(l(e,t,n,a))}):r.isPlainObject(e.items)?s.push(l(e.items,t,n,a)):r.isUndefined(e.items)?s.push({}):i.log("Array type's 'items' property is not an array or an object, cannot process")):s=e["default"]),s};o.prototype.createJSONSample=o.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&r.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],r.isString(this.definition.example)&&(this.definition.example=a.safeLoad(this.definition.example))):this.definition.example||(this.definition.example=this.examples),l(this.definition,this.models,e,this.modelPropertyMacro)},o.prototype.getMockSignature=function(){return s(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../helpers":4,"js-yaml":20,"lodash-compat/array/indexOf":51,"lodash-compat/collection/forEach":56,"lodash-compat/collection/map":58,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isString":150,"lodash-compat/lang/isUndefined":152,"lodash-compat/object/keys":153}],9:[function(e,t,n){function r(e,t){if(i.isEmpty(t))return e[0];for(var n=0,r=t.length;r>n;n++)if(e.indexOf(t[n])>-1)return t[n];return e[0]}var i={cloneDeep:e("lodash-compat/lang/cloneDeep"),isUndefined:e("lodash-compat/lang/isUndefined"),isEmpty:e("lodash-compat/lang/isEmpty")},a=e("../helpers"),o=e("./model"),s=e("../http"),l=t.exports=function(e,t,n,r,i,a,s,l,u){var c=[];if(e=e||{},a=a||{},e&&e.options&&(this.client=e.options.client||null,this.responseInterceptor=e.options.responseInterceptor||null),this.authorizations=a.security,this.basePath=e.basePath||"/",this.clientAuthorizations=u,this.consumes=a.consumes||e.consumes||["application/json"],this.produces=a.produces||e.produces||["application/json"],this.deprecated=a.deprecated,this.description=a.description,this.host=e.host||"localhost",this.method=r||c.push("Operation "+n+" is missing method."),this.models=l||{},this.nickname=n||c.push("Operations must have a nickname."),this.operation=a,this.operations={},this.parameters=null!==a?a.parameters||[]:{},this.parent=e,this.path=i||c.push("Operation "+this.nickname+" is missing path."),this.responses=a.responses||{},this.scheme=t||e.scheme||"http",this.schemes=e.schemes,this.security=a.security,this.summary=a.summary||"",this.type=null,this.useJQuery=e.useJQuery,this.parameterMacro=e.parameterMacro||function(e){return e["default"]},this.inlineModels=[],"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.deprecated=Boolean(this.deprecated)}var p,f;if(s){var h;for(h in s)f=new o(h,s[h],this.models,e.modelPropertyMacro),f&&(this.models[h]=f)}for(p=0;p0&&this.resource&&this.resource.api&&this.resource.api.fail&&this.resource.api.fail(c),this};l.prototype.isDefaultArrayItemValue=function(e,t){return t["default"]&&Array.isArray(t["default"])?-1!==t["default"].indexOf(e):e===t["default"]},l.prototype.getType=function(e){var t,n=e.type,r=e.format,i=!1;"integer"===n&&"int32"===r?t="integer":"integer"===n&&"int64"===r?t="long":"integer"===n?t="integer":"string"===n?t="date-time"===r?"date-time":"date"===r?"date":"string":"number"===n&&"float"===r?t="float":"number"===n&&"double"===r?t="double":"number"===n?t="double":"boolean"===n?t="boolean":"array"===n&&(i=!0,e.items&&(t=this.getType(e.items))),e.$ref&&(t=a.simpleRef(e.$ref));var o=e.schema;if(o){var s=o.$ref;return s?(s=a.simpleRef(s),i?[s]:s):"object"===o.type?this.addInlineModel(o):this.getType(o)}return i?[t]:t},l.prototype.addInlineModel=function(e){var t=this.inlineModels.length,n=this.resolveModel(e,{});return n?(this.inlineModels.push(n),"Inline Model "+t):null},l.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},l.prototype.resolveModel=function(e,t){if("undefined"!=typeof e.$ref){var n=e.$ref;if(0===n.indexOf("#/definitions/")&&(n=n.substring("#/definitions/".length)),t[n])return new o(n,t[n],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||i.isUndefined(e.type)))return new o(void 0,e,this.models,this.parent.modelPropertyMacro);return null},l.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",n=0;n=0&&n.useJQuery){var f=new FormData;f.type="formData";for(i in o)a=t[i],"undefined"!=typeof a&&("file"===a.type&&a.value?(delete e["Content-Type"],f.append(i,a.value)):f.append(i,a));r=f}return r},l.prototype.getModelSampleJSON=function(e,t){var n,r,i;if(t=t||{},n=e instanceof Array,i=n?e[0]:e,t[i]?r=t[i].createJSONSample():this.getInlineModel(i)&&(r=this.getInlineModel(i).createJSONSample()),r){if(r=n?[r]:r,"string"==typeof r)return r;if("object"==typeof r){var a=r;if(r instanceof Array&&r.length>0&&(a=r[0]),a.nodeName){var o=(new XMLSerializer).serializeToString(a);return this.formatXml(o)}return JSON.stringify(r,null,2)}return r}},l.prototype["do"]=function(e,t,n,r,i){return this.execute(e,t,n,r,i)},l.prototype.execute=function(e,t,n,r,i){var o,l,u=e||{},c={};"object"==typeof t&&(c=t,o=n,l=r),this.client&&(c.client=this.client),this.responseInterceptor&&(c.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(o=t,l=n),o=o||this.parent.defaultSuccessCallback||a.log,l=l||this.parent.defaultErrorCallback||a.log,"undefined"==typeof c.useJQuery&&(c.useJQuery=this.useJQuery);var p=this.getMissingParams(u);if(p.length>0){var f="missing required params: "+p;return a.fail(f),void l(f)}var h,d=this.getHeaderParams(u),m=this.setContentTypes(u,c),g={};for(h in d)g[h]=d[h];for(h in m)g[h]=m[h];var y=this.getBody(m,u,c),v=this.urlify(u);if(v.indexOf(".{format}")>0&&g){var b=g.Accept||g.accept;b&&b.indexOf("json")>0?v=v.replace(".{format}",".json"):b&&b.indexOf("xml")>0&&(v=v.replace(".{format}",".xml"))}var w={url:v,method:this.method.toUpperCase(),body:y,useJQuery:c.useJQuery,headers:g,on:{response:function(e){return o(e,i)},error:function(e){return l(e,i)}}};return this.clientAuthorizations.apply(w,this.operation.security),c.mock===!0?w:void(new s).execute(w,c)},l.prototype.setContentTypes=function(e,t){var n,i,o=this.parameters,s=e.parameterContentType||r(this.consumes,["application/json","application/yaml"]),l=t.responseContentType||r(this.produces,["application/json","application/yaml"]),u=[],c=[],p={};for(i=0;i0&&(s=t.requestContentType?t.requestContentType:u.length>0?"multipart/form-data":"application/x-www-form-urlencoded")):s=null,s&&this.consumes&&-1===this.consumes.indexOf(s)&&a.log("server doesn't consume "+s+", try "+JSON.stringify(this.consumes)),this.matchesAccept(l)||a.log("server can't produce "+l),(s&&""!==n||"application/x-www-form-urlencoded"===s)&&(p["Content-Type"]=s),l&&(p.Accept=l),p},l.prototype.matchesAccept=function(e){return e&&this.produces?-1!==this.produces.indexOf(e)||-1!==this.produces.indexOf("*/*"):!0},l.prototype.asCurl=function(e){var t=this.execute(e,{mock:!0});this.clientAuthorizations.apply(t);var n=[];if(n.push("-X "+this.method.toUpperCase()),t.headers){var r;for(r in t.headers)n.push('--header "'+r+": "+t.headers[r]+'"')}if(t.body){var i;i="object"==typeof t.body?JSON.stringify(t.body):t.body,n.push('-d "'+i.replace(/"/g,'\\"')+'"')}return"curl "+n.join(" ")+' "'+t.url+'"'},l.prototype.encodePathCollection=function(e,t,n){var r,i="",a="";for(a="ssv"===e?"%20":"tsv"===e?"\\t":"pipes"===e?"|":",",r=0;r0&&(i+="&"),i+=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[r]);else{var a="";if("csv"===e)a=",";else if("ssv"===e)a="%20";else if("tsv"===e)a="\\t";else if("pipes"===e)a="|";else if("brackets"===e)for(r=0;rM)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");0>i?i=0:i>>>=0,r.TYPED_ARRAY_SUPPORT?n=r._augment(new Uint8Array(i)):(n.length=i,n._isBuffer=!0);var o;if(r.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)n._set(e);else if(E(e))if(r.isBuffer(e))for(o=0;i>o;o++)n[o]=e.readUInt8(o);else for(o=0;i>o;o++)n[o]=(e[o]%256+256)%256;else if("string"===a)n.write(e,0,t);else if("number"===a&&!r.TYPED_ARRAY_SUPPORT)for(o=0;i>o;o++)n[o]=0;return i>0&&i<=r.poolSize&&(n.parent=R),n}function i(e,t){if(!(this instanceof i))return new i(e,t);var n=new r(e,t);return delete n.parent,n}function a(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function o(e,t,n,r){var i=D(T(t,e.length-n),e,n,r);return i}function s(e,t,n,r){var i=D(I(t),e,n,r);return i}function l(e,t,n,r){return s(e,t,n,r)}function u(e,t,n,r){var i=D(_(t),e,n,r);return i}function c(e,t,n,r){var i=D(O(t,e.length-n),e,n,r);return i}function p(e,t,n){return P.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function f(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var a=t;n>a;a++)e[a]<=127?(r+=L(i)+String.fromCharCode(e[a]),i=""):i+="%"+e[a].toString(16);return r+L(i)}function h(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function d(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function m(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",a=t;n>a;a++)i+=j(e[a]);return i}function g(e,t,n){for(var r=e.slice(t,n),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function v(e,t,n,i,a,o){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>a||o>t)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function b(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);a>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function w(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);a>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function x(e,t,n,r,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function S(e,t,n,r,i){return i||x(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),N.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,i){return i||x(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),N.write(e,t,n,r,52,8),n+8}function C(e){if(e=k(e).replace(U,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function k(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function E(e){return $(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function j(e){return 16>e?"0"+e.toString(16):e.toString(16)}function T(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;r>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){ +(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&((t-=3)>-1&&a.push(239,191,189),i=null);if(128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(2097152>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function I(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function _(e){return P.toByteArray(C(e))}function D(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function L(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var P=e("base64-js"),N=e("ieee754"),$=e("is-array");n.Buffer=r,n.SlowBuffer=i,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var M=1073741823,R={};r.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);o>a&&e[a]===t[a];a++);return a!==o&&(n=e[a],i=t[a]),i>n?-1:n>i?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!$(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new r(0);if(1===e.length)return e[0];var n;if(void 0===t)for(t=0,n=0;n>>1;break;case"utf8":case"utf-8":n=T(e).length;break;case"base64":n=_(e).length;break;default:n=e.length}return n},r.prototype.length=void 0,r.prototype.parent=void 0,r.prototype.toString=function(e,t,n){var r=!1;if(t>>>=0,n=void 0===n||n===1/0?this.length:n>>>0,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return m(this,t,n);case"utf8":case"utf-8":return f(this,t,n);case"ascii":return h(this,t,n);case"binary":return d(this,t,n);case"base64":return p(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},r.prototype.compare=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:r.compare(this,e)},r.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,i=0;n+i2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(r.isBuffer(e))return n(this,e,t);if("number"==typeof e)return r.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var i=r;r=t,t=n,n=i}if(t=Number(t)||0,0>n||0>t||t>this.length)throw new RangeError("attempt to write outside buffer bounds");var p=this.length-t;n?(n=Number(n),n>p&&(n=p)):n=p,r=String(r||"utf8").toLowerCase();var f;switch(r){case"hex":f=a(this,e,t,n);break;case"utf8":case"utf-8":f=o(this,e,t,n);break;case"ascii":f=s(this,e,t,n);break;case"binary":f=l(this,e,t,n);break;case"base64":f=u(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":f=c(this,e,t,n);break;default:throw new TypeError("Unknown encoding: "+r)}return f},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var i;if(r.TYPED_ARRAY_SUPPORT)i=r._augment(this.subarray(e,t));else{var a=t-e;i=new r(a,void 0);for(var o=0;a>o;o++)i[o]=this[o+e]}return i.length&&(i.parent=this.parent||this),i},r.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||y(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||y(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||y(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||y(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},r.prototype.readInt8=function(e,t){return t||y(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||y(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||y(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||y(e,4,this.length),N.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||y(e,4,this.length),N.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||y(e,8,this.length),N.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||y(e,8,this.length),N.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||v(this,e,t,n,Math.pow(2,8*n),0);var i=1,a=0;for(this[t]=255&e;++a>>0&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||v(this,e,t,n,Math.pow(2,8*n),0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a>>>0&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):w(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):w(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){e=+e,t>>>=0,r||v(this,e,t,n,Math.pow(2,8*n-1)-1,-Math.pow(2,8*n-1));var i=0,a=1,o=0>e?1:0;for(this[t]=255&e;++i>0)-o&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){e=+e,t>>>=0,r||v(this,e,t,n,Math.pow(2,8*n-1)-1,-Math.pow(2,8*n-1));var i=n-1,a=1,o=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=(e/a>>0)-o&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):b(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):b(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):w(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||v(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):w(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return S(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return S(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-ta||!r.TYPED_ARRAY_SUPPORT)for(var o=0;a>o;o++)e[o+t]=this[o+n];else e._set(this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=T(e.toString()),a=i.length;for(r=t;n>r;r++)this[r]=i[r%a]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var F=r.prototype;r._augment=function(e){return e.constructor=r,e._isBuffer=!0,e._set=e.set,e.get=F.get,e.set=F.set,e.write=F.write,e.toString=F.toString,e.toLocaleString=F.toString,e.toJSON=F.toJSON,e.equals=F.equals,e.compare=F.compare,e.indexOf=F.indexOf,e.copy=F.copy,e.slice=F.slice,e.readUIntLE=F.readUIntLE,e.readUIntBE=F.readUIntBE,e.readUInt8=F.readUInt8,e.readUInt16LE=F.readUInt16LE,e.readUInt16BE=F.readUInt16BE,e.readUInt32LE=F.readUInt32LE,e.readUInt32BE=F.readUInt32BE,e.readIntLE=F.readIntLE,e.readIntBE=F.readIntBE,e.readInt8=F.readInt8,e.readInt16LE=F.readInt16LE,e.readInt16BE=F.readInt16BE,e.readInt32LE=F.readInt32LE,e.readInt32BE=F.readInt32BE,e.readFloatLE=F.readFloatLE,e.readFloatBE=F.readFloatBE,e.readDoubleLE=F.readDoubleLE,e.readDoubleBE=F.readDoubleBE,e.writeUInt8=F.writeUInt8,e.writeUIntLE=F.writeUIntLE,e.writeUIntBE=F.writeUIntBE,e.writeUInt16LE=F.writeUInt16LE,e.writeUInt16BE=F.writeUInt16BE,e.writeUInt32LE=F.writeUInt32LE,e.writeUInt32BE=F.writeUInt32BE,e.writeIntLE=F.writeIntLE,e.writeIntBE=F.writeIntBE,e.writeInt8=F.writeInt8,e.writeInt16LE=F.writeInt16LE,e.writeInt16BE=F.writeInt16BE,e.writeInt32LE=F.writeInt32LE,e.writeInt32BE=F.writeInt32BE,e.writeFloatLE=F.writeFloatLE,e.writeFloatBE=F.writeFloatBE,e.writeDoubleLE=F.writeDoubleLE,e.writeDoubleBE=F.writeDoubleBE,e.fill=F.fill,e.inspect=F.inspect,e.toArrayBuffer=F.toArrayBuffer,e};var U=/[^+\/0-9A-z\-]/g},{"base64-js":13,ieee754:14,"is-array":15}],13:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){function t(e){var t=e.charCodeAt(0);return t===o||t===p?62:t===s||t===f?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var r,i,o,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new a(3*e.length/4-l),o=l>0?e.length-4:e.length;var p=0;for(r=0,i=0;o>r;r+=4,i+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,a,o,s=e.length%3,l="";for(i=0,o=e.length-s;o>i;i+=3)a=(e[i]<<16)+(e[i+1]<<8)+e[i+2],l+=n(a);switch(s){case 1:a=e[e.length-1],l+=t(a>>2),l+=t(a<<4&63),l+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],l+=t(a>>10),l+=t(a>>4&63),l+=t(a<<2&63),l+="="}return l}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),f="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],14:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,c=-7,p=n?i-1:0,f=n?-1:1,h=e[t+p];for(p+=f,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:(h?-1:1)*(1/0);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,d=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?f/l:f*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(o=o<0;e[n+h]=255&o,h+=d,o/=256,u-=8);e[n+h-d]|=128*m}},{}],15:[function(e,t,n){var r=Array.isArray,i=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],16:[function(e,t,n){function r(){if(!s){s=!0;for(var e,t=o.length;t;){e=o,o=[];for(var n=-1;++n0&&t-1 in e}function i(e,t,n){if(ee.isFunction(t))return ee.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ee.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(le.test(t))return ee.filter(t,e,n);t=ee.filter(t,e)}return ee.grep(e,function(e){return J.call(t,e)>=0!==n})}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=me[e]={};return ee.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){G.removeEventListener("DOMContentLoaded",s,!1),t.removeEventListener("load",s,!1),ee.ready()}function l(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=ee.expando+l.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(xe,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:we.test(n)?ee.parseJSON(n):n}catch(i){}be.set(e,t,n)}else n=void 0;return n}function c(){return!0}function p(){return!1}function f(){try{return G.activeElement}catch(e){}}function h(e,t){return ee.nodeName(e,"table")&&ee.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function m(e){var t=Me.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function y(e,t){var n,r,i,a,o,s,l,u;if(1===t.nodeType){if(ve.hasData(e)&&(a=ve.access(e),o=ve.set(t,a),u=a.events)){delete o.handle,o.events={};for(i in u)for(n=0,r=u[i].length;r>n;n++)ee.event.add(t,i,u[i][n])}be.hasData(e)&&(s=be.access(e),l=ee.extend({},s),be.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ee.nodeName(e,t)?ee.merge([e],n):n}function b(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ke.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function w(e,n){var r,i=ee(n.createElement(e)).appendTo(n.body),a=t.getDefaultComputedStyle&&(r=t.getDefaultComputedStyle(i[0]))?r.display:ee.css(i[0],"display");return i.detach(),a}function x(e){var t=G,n=Be[e];return n||(n=w(e,t),"none"!==n&&n||(Ue=(Ue||ee("