4 lines
122 KiB
JavaScript
4 lines
122 KiB
JavaScript
(function(){this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_auth=Handlebars.template({1:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <span class="key_auth__value">'+o((i=null!=(i=t.value||(null!=e?e.value:e))?i:r,typeof i===s?i.call(e,{name:"value",hash:{},data:a}):i))+"</span>\n"},3:function(e,t,n,a){return' <input placeholder="api_key" class="auth_input input_apiKey_entry" name="apiKey" type="text"/>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='<div class="key_input_container">\n <h3 class="auth__title">Api key authorization</h3>\n <div class="auth__description">'+l((s=null!=(s=t.description||(null!=e?e.description:e))?s:o,typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s))+'</div>\n <div>\n <div class="key_auth__field">\n <span class="key_auth__label">name:</span>\n <span class="key_auth__value">'+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+'</span>\n </div>\n <div class="key_auth__field">\n <span class="key_auth__label">in:</span>\n <span class="key_auth__value">'+l((s=null!=(s=t["in"]||(null!=e?e["in"]:e))?s:o,typeof s===r?s.call(e,{name:"in",hash:{},data:a}):s))+'</span>\n </div>\n <div class="key_auth__field">\n <span class="key_auth__label">value:</span>\n';return i=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(u+=i),u+" </div>\n </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.auth_button_operation=Handlebars.template({1:function(e,t,n,a){return" authorize__btn_operation_login\n"},3:function(e,t,n,a){return" authorize__btn_operation_logout\n"},5:function(e,t,n,a){var i,s=' <ul class="authorize-scopes">\n';return i=t.each.call(e,null!=e?e.scopes:e,{name:"each",hash:{},fn:this.program(6,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+" </ul>\n"},6:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <li class="authorize__scope" title="'+o((i=null!=(i=t.description||(null!=e?e.description:e))?i:r,typeof i===s?i.call(e,{name:"description",hash:{},data:a}):i))+'">'+o((i=null!=(i=t.scope||(null!=e?e.scope:e))?i:r,typeof i===s?i.call(e,{name:"scope",hash:{},data:a}):i))+"</li>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s='<div class="authorize__btn authorize__btn_operation\n';return i=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(s+=i),s+='">\n',i=t["if"].call(e,null!=e?e.scopes:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+"</div>\n"},useData:!0}),this.Handlebars.templates.auth_button=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){return"<a class='authorize__btn' href=\"#\">Authorize</a>\n"},useData:!0}),this.Handlebars.templates.auth_view=Handlebars.template({1:function(e,t,n,a){return' <button type="button" class="auth__button auth_submit__button" data-sw-translate>Authorize</button>\n'},3:function(e,t,n,a){return' <button type="button" class="auth__button auth_logout__button" data-sw-translate>Logout</button>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s='<div class="auth_container">\n\n <div class="auth_inner"></div>\n <div class="auth_submit">\n';return i=t.unless.call(e,null!=e?e.isLogout:e,{name:"unless",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(s+=i),i=t["if"].call(e,null!=e?e.isAuthorized:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+" </div>\n\n</div>\n"},useData:!0}),this.Handlebars.templates.basic_auth=Handlebars.template({1:function(e,t,n,a){return" - authorized"},3:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <span class="basic_auth__value">'+o((i=null!=(i=t.username||(null!=e?e.username:e))?i:r,typeof i===s?i.call(e,{name:"username",hash:{},data:a}):i))+"</span>\n"},5:function(e,t,n,a){return' <input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>\n'},7:function(e,t,n,a){return' <div class="auth_label">\n <span class="basic_auth__label" data-sw-translate>password:</span>\n <input required placeholder="password" class="basic_auth__password auth_input" name="password" type="password"/></label>\n </div>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<div class='basic_auth_container'>\n <h3 class=\"auth__title\">Basic authentication";return i=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+='</h3>\n <form class="basic_input_container">\n <div class="auth__description">'+l((s=null!=(s=t.description||(null!=e?e.description:e))?s:o,typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s))+'</div>\n <div class="auth_label">\n <span class="basic_auth__label" data-sw-translate>username:</span>\n',i=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.program(5,a),data:a}),null!=i&&(u+=i),u+=" </div>\n",i=t.unless.call(e,null!=e?e.isLogout:e,{name:"unless",hash:{},fn:this.program(7,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </form>\n</div>\n"},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,a){var i,s="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return' <option value="'+s(i(e,e))+'">'+s(i(e,e))+"</option>\n"},4:function(e,t,n,a){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='<label data-sw-translate for="'+l((s=null!=(s=t.contentTypeId||(null!=e?e.contentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"contentTypeId",hash:{},data:a}):s))+'">Response Content Type</label>\n<select name="contentType" id="'+l((s=null!=(s=t.contentTypeId||(null!=e?e.contentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"contentTypeId",hash:{},data:a}):s))+'">\n';return i=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(u+=i),u+"</select>\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("_"),a=n+"_content";Docs.expandOperation($("#"+a)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),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()}},function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e,t,n=Array,a=n.prototype,i=Object,s=i.prototype,r=Function,o=r.prototype,l=String,u=l.prototype,p=Number,d=p.prototype,h=a.slice,c=a.splice,f=a.push,m=a.unshift,g=a.concat,v=a.join,y=o.call,w=o.apply,b=Math.max,x=Math.min,_=s.toString,S="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,$=Function.prototype.toString,O=/^\s*class /,T=function(e){try{var t=$.call(e),n=t.replace(/\/\/.*\n/g,""),a=n.replace(/\/\*[.\s\S]*\*\//g,""),i=a.replace(/\n/gm," ").replace(/ {2}/g," ");return O.test(i)}catch(s){return!1}},U=function(e){try{return T(e)?!1:($.call(e),!0)}catch(t){return!1}},I="[object Function]",M="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(S)return U(e);if(T(e))return!1;var t=_.call(e);return t===I||t===M},D=RegExp.prototype.exec,C=function(e){try{return D.call(e),!0}catch(t){return!1}},E="[object RegExp]";t=function(e){return"object"!=typeof e?!1:S?C(e):_.call(e)===E};var k,j=String.prototype.valueOf,A=function(e){try{return j.call(e),!0}catch(t){return!1}},V="[object String]";k=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:S?A(e):_.call(e)===V};var R=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),P=function(e){var t;return t=R?function(e,t,n,a){!a&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,a){!a&&t in e||(e[t]=n)},function(n,a,i){for(var s in a)e.call(a,s)&&t(n,s,a[s],i)}}(s.hasOwnProperty),N=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},H=p.isNaN||function(e){return e!==e},z={ToInteger:function(e){var t=+e;return H(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,a,i;if(N(t))return t;if(a=t.valueOf,e(a)&&(n=a.call(t),N(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),N(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},L=function(){};P(o,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var a,s=h.call(arguments,1),o=function(){if(this instanceof a){var e=w.call(n,this,g.call(s,h.call(arguments)));return i(e)===e?e:this}return w.call(n,t,g.call(s,h.call(arguments)))},l=b(0,n.length-s.length),u=[],p=0;l>p;p++)f.call(u,"$"+p);return a=r("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(o),n.prototype&&(L.prototype=n.prototype,a.prototype=new L,L.prototype=null),a}});var F=y.bind(s.hasOwnProperty),q=y.bind(s.toString),B=y.bind(h),J=w.bind(h),K=y.bind(u.slice),X=y.bind(u.split),Q=y.bind(u.indexOf),W=y.bind(f),G=y.bind(s.propertyIsEnumerable),Z=y.bind(a.sort),Y=n.isArray||function(e){return"[object Array]"===q(e)},ee=1!==[].unshift(0);P(a,{unshift:function(){return m.apply(this,arguments),this.length}},ee),P(n,{isArray:Y});var te=i("a"),ne="a"!==te[0]||!(0 in te),ae=function(e){var t=!0,n=!0,a=!1;if(e)try{e.call("foo",function(e,n,a){"object"!=typeof a&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){a=!0}return!!e&&!a&&t&&n};P(a,{forEach:function(t){var n,a=z.ToObject(this),i=ne&&k(this)?X(this,""):a,s=-1,r=z.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++s<r;)s in i&&("undefined"==typeof n?t(i[s],s,a):t.call(n,i[s],s,a))}},!ae(a.forEach)),P(a,{map:function(t){var a,i=z.ToObject(this),s=ne&&k(this)?X(this,""):i,r=z.ToUint32(s.length),o=n(r);if(arguments.length>1&&(a=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;r>l;l++)l in s&&("undefined"==typeof a?o[l]=t(s[l],l,i):o[l]=t.call(a,s[l],l,i));return o}},!ae(a.map)),P(a,{filter:function(t){var n,a,i=z.ToObject(this),s=ne&&k(this)?X(this,""):i,r=z.ToUint32(s.length),o=[];if(arguments.length>1&&(a=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;r>l;l++)l in s&&(n=s[l],("undefined"==typeof a?t(n,l,i):t.call(a,n,l,i))&&W(o,n));return o}},!ae(a.filter)),P(a,{every:function(t){var n,a=z.ToObject(this),i=ne&&k(this)?X(this,""):a,s=z.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var r=0;s>r;r++)if(r in i&&!("undefined"==typeof n?t(i[r],r,a):t.call(n,i[r],r,a)))return!1;return!0}},!ae(a.every)),P(a,{some:function(t){var n,a=z.ToObject(this),i=ne&&k(this)?X(this,""):a,s=z.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var r=0;s>r;r++)if(r in i&&("undefined"==typeof n?t(i[r],r,a):t.call(n,i[r],r,a)))return!0;return!1}},!ae(a.some));var ie=!1;a.reduce&&(ie="object"==typeof a.reduce.call("es5",function(e,t,n,a){return a})),P(a,{reduce:function(t){var n=z.ToObject(this),a=ne&&k(this)?X(this,""):n,i=z.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,r=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in a){s=a[r++];break}if(++r>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>r;r++)r in a&&(s=t(s,a[r],r,n));return s}},!ie);var se=!1;a.reduceRight&&(se="object"==typeof a.reduceRight.call("es5",function(e,t,n,a){return a})),P(a,{reduceRight:function(t){var n=z.ToObject(this),a=ne&&k(this)?X(this,""):n,i=z.ToUint32(a.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,r=i-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in a){s=a[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>r)return s;do r in a&&(s=t(s,a[r],r,n));while(r--);return s}},!se);var re=a.indexOf&&-1!==[0,1].indexOf(1,2);P(a,{indexOf:function(e){var t=ne&&k(this)?X(this,""):z.ToObject(this),n=z.ToUint32(t.length);if(0===n)return-1;var a=0;for(arguments.length>1&&(a=z.ToInteger(arguments[1])),a=a>=0?a:b(0,n+a);n>a;a++)if(a in t&&t[a]===e)return a;return-1}},re);var oe=a.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);P(a,{lastIndexOf:function(e){var t=ne&&k(this)?X(this,""):z.ToObject(this),n=z.ToUint32(t.length);if(0===n)return-1;var a=n-1;for(arguments.length>1&&(a=x(a,z.ToInteger(arguments[1]))),a=a>=0?a:n-Math.abs(a);a>=0;a--)if(a in t&&e===t[a])return a;return-1}},oe);var le=function(){var e=[1,2],t=e.splice();return 2===e.length&&Y(t)&&0===t.length}();P(a,{splice:function(e,t){return 0===arguments.length?[]:c.apply(this,arguments)}},!le);var ue=function(){var e={};return a.splice.call(e,0,0,1),1===e.length}();P(a,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(z.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=B(arguments),n.length<2?W(n,this.length-e):n[1]=z.ToInteger(t)),c.apply(this,n)}},!ue);var pe=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),de=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();P(a,{splice:function(e,t){for(var n,a=z.ToObject(this),i=[],s=z.ToUint32(a.length),r=z.ToInteger(e),o=0>r?b(s+r,0):x(r,s),u=x(b(z.ToInteger(t),0),s-o),p=0;u>p;)n=l(o+p),F(a,n)&&(i[p]=a[n]),p+=1;var d,h=B(arguments,2),c=h.length;if(u>c){p=o;for(var f=s-u;f>p;)n=l(p+u),d=l(p+c),F(a,n)?a[d]=a[n]:delete a[d],p+=1;p=s;for(var m=s-u+c;p>m;)delete a[p-1],p-=1}else if(c>u)for(p=s-u;p>o;)n=l(p+u-1),d=l(p+c-1),F(a,n)?a[d]=a[n]:delete a[d],p-=1;p=o;for(var g=0;g<h.length;++g)a[p]=h[g],p+=1;return a.length=s-u+c,i}},!pe||!de);var he,ce=a.join;try{he="1,2,3"!==Array.prototype.join.call("123",",")}catch(fe){he=!0}he&&P(a,{join:function(e){var t="undefined"==typeof e?",":e;return ce.call(k(this)?X(this,""):this,t)}},he);var me="1,2"!==[1,2].join(void 0);me&&P(a,{join:function(e){var t="undefined"==typeof e?",":e;return ce.call(this,t)}},me);var ge=function(e){for(var t=z.ToObject(this),n=z.ToUint32(t.length),a=0;a<arguments.length;)t[n+a]=arguments[a],a+=1;return t.length=n+a,n+a},ve=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!F(e,0)}();P(a,{push:function(e){return Y(this)?f.apply(this,arguments):ge.apply(this,arguments)}},ve);var ye=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!F(e,0)}();P(a,{push:ge},ye),P(a,{slice:function(e,t){var n=k(this)?X(this,""):this;return J(n,arguments)}},ne);var we=function(){try{return[1,2].sort(null),[1,2].sort({}),!0}catch(e){}return!1}(),be=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),xe=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();P(a,{sort:function(t){if("undefined"==typeof t)return Z(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return Z(this,t)}},we||!xe||!be);var _e=!G({toString:null},"toString"),Se=G(function(){},"prototype"),$e=!F("x","0"),Oe=function(e){var t=e.constructor;return t&&t.prototype===e},Te={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0},Ue=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!Te["$"+e]&&F(window,e)&&null!==window[e]&&"object"==typeof window[e]&&Oe(window[e])}catch(t){return!0}return!1}(),Ie=function(e){if("undefined"==typeof window||!Ue)return Oe(e);try{return Oe(e)}catch(t){return!1}},Me=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],De=Me.length,Ce=function(e){return"[object Arguments]"===q(e)},Ee=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!Y(t)&&e(t.callee)},ke=Ce(arguments)?Ce:Ee;P(i,{keys:function(t){var n=e(t),a=ke(t),i=null!==t&&"object"==typeof t,s=i&&k(t);if(!i&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var r=[],o=Se&&n;if(s&&$e||a)for(var u=0;u<t.length;++u)W(r,l(u));if(!a)for(var p in t)o&&"prototype"===p||!F(t,p)||W(r,l(p));if(_e)for(var d=Ie(t),h=0;De>h;h++){var c=Me[h];d&&"constructor"===c||!F(t,c)||W(r,c)}return r}});var je=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),Ae=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Ve=i.keys;P(i,{keys:function(e){return Ve(ke(e)?B(e):e)}},!je||Ae);var Re,Pe,Ne=0!==new Date(-0xc782b5b342b24).getUTCMonth(),He=new Date(-0x55d318d56a724),ze=new Date(14496624e5),Le="Mon, 01 Jan -45875 11:59:59 GMT"!==He.toUTCString(),Fe=He.getTimezoneOffset();-720>Fe?(Re="Tue Jan 02 -45875"!==He.toDateString(),Pe=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(ze.toString())):(Re="Mon Jan 01 -45875"!==He.toDateString(),Pe=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(ze.toString()));var qe=y.bind(Date.prototype.getFullYear),Be=y.bind(Date.prototype.getMonth),Je=y.bind(Date.prototype.getDate),Ke=y.bind(Date.prototype.getUTCFullYear),Xe=y.bind(Date.prototype.getUTCMonth),Qe=y.bind(Date.prototype.getUTCDate),We=y.bind(Date.prototype.getUTCDay),Ge=y.bind(Date.prototype.getUTCHours),Ze=y.bind(Date.prototype.getUTCMinutes),Ye=y.bind(Date.prototype.getUTCSeconds),et=y.bind(Date.prototype.getUTCMilliseconds),tt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],at=function(e,t){return Je(new Date(t,e,0))};P(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this);return 0>e&&Be(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Be(this);return 0>e&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Be(this),n=Je(this);if(0>e&&t>11){if(12===t)return n;var a=at(0,e+1);return a-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ke(this);return 0>e&&Xe(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ke(this),t=Xe(this);return 0>e&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ke(this),t=Xe(this),n=Qe(this);if(0>e&&t>11){if(12===t)return n;var a=at(0,e+1);return a-n+1}return n}},Ne),P(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=We(this),t=Qe(this),n=Xe(this),a=Ke(this),i=Ge(this),s=Ze(this),r=Ye(this);return tt[e]+", "+(10>t?"0"+t:t)+" "+nt[n]+" "+a+" "+(10>i?"0"+i:i)+":"+(10>s?"0"+s:s)+":"+(10>r?"0"+r:r)+" GMT"}},Ne||Le),P(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),a=this.getFullYear();return tt[e]+" "+nt[n]+" "+(10>t?"0"+t:t)+" "+a}},Ne||Re),(Ne||Pe)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),a=this.getFullYear(),i=this.getHours(),s=this.getMinutes(),r=this.getSeconds(),o=this.getTimezoneOffset(),l=Math.floor(Math.abs(o)/60),u=Math.floor(Math.abs(o)%60);return tt[e]+" "+nt[n]+" "+(10>t?"0"+t:t)+" "+a+" "+(10>i?"0"+i:i)+":"+(10>s?"0"+s:s)+":"+(10>r?"0"+r:r)+" GMT"+(o>0?"-":"+")+(10>l?"0"+l:l)+(10>u?"0"+u:u)},R&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var it=-621987552e5,st="-000001",rt=Date.prototype.toISOString&&-1===new Date(it).toISOString().indexOf(st),ot=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),lt=y.bind(Date.prototype.getTime);P(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(lt(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Ke(this),t=Xe(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),Ge(this),Ze(this),Ye(this)];e=(0>e?"-":e>9999?"+":"")+K("00000"+Math.abs(e),e>=0&&9999>=e?-4:-6);for(var a=0;a<n.length;++a)n[a]=K("00"+n[a],-2);return e+"-"+B(n,0,2).join("-")+"T"+B(n,2).join(":")+"."+K("000"+et(this),-3)+"Z"}},rt||ot);var ut=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(it).toJSON().indexOf(st)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ut||(Date.prototype.toJSON=function(t){var n=i(this),a=z.ToPrimitive(n);if("number"==typeof a&&!isFinite(a))return null;var s=n.toISOString;if(!e(s))throw new TypeError("toISOString property is not callable");return s.call(n)});var pt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),dt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||dt||!pt){var ct=Math.pow(2,31)-1,ft=H(new Date(1970,0,1,0,0,0,ct+1).getTime());Date=function(e){var t=function(n,a,i,s,r,o,u){var p,d=arguments.length;if(this instanceof e){var h=o,c=u;if(ft&&d>=7&&u>ct){var f=Math.floor(u/ct)*ct,m=Math.floor(f/1e3);h+=m,c-=1e3*m}p=1===d&&l(n)===n?new e(t.parse(n)):d>=7?new e(n,a,i,s,r,h,c):d>=6?new e(n,a,i,s,r,h):d>=5?new e(n,a,i,s,r):d>=4?new e(n,a,i,s):d>=3?new e(n,a,i):d>=2?new e(n,a):d>=1?new e(n instanceof e?+n:n):new e}else p=e.apply(this,arguments);return N(p)||P(p,{constructor:t},!0),p},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),a=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return a[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},s=function(t){var n=0,a=t;if(ft&&a>ct){var i=Math.floor(a/ct)*ct,s=Math.floor(i/1e3);n+=s,a-=1e3*s}return p(new e(1970,0,1,0,0,n,a))};for(var r in e)F(e,r)&&(t[r]=e[r]);P(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,P(t.prototype,{constructor:t},!0);var o=function(t){var a=n.exec(t);if(a){var r,o=p(a[1]),l=p(a[2]||1)-1,u=p(a[3]||1)-1,d=p(a[4]||0),h=p(a[5]||0),c=p(a[6]||0),f=Math.floor(1e3*p(a[7]||0)),m=Boolean(a[4]&&!a[8]),g="-"===a[9]?1:-1,v=p(a[10]||0),y=p(a[11]||0),w=h>0||c>0||f>0;return(w?24:25)>d&&60>h&&60>c&&1e3>f&&l>-1&&12>l&&24>v&&60>y&&u>-1&&u<i(o,l+1)-i(o,l)&&(r=60*(24*(i(o,l)+u)+d+v*g),r=1e3*(60*(r+h+y*g)+c)+f,m&&(r=s(r)),r>=-864e13&&864e13>=r)?r:NaN}return e.parse.apply(this,arguments)};return P(t,{parse:o}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var mt=d.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),gt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,a=t;++n<gt.size;)a+=e*gt.data[n],gt.data[n]=a%gt.base,a=Math.floor(a/gt.base)},divide:function(e){for(var t=gt.size,n=0;--t>=0;)n+=gt.data[t],gt.data[t]=Math.floor(n/e),n=n%e*gt.base},numToString:function(){for(var e=gt.size,t="";--e>=0;)if(""!==t||0===e||0!==gt.data[e]){var n=l(gt.data[e]);""===t?t=n:t+=K("0000000",0,7-n.length)+n}return t},pow:function Vt(e,t,n){return 0===t?n:t%2===1?Vt(e,t-1,n*e):Vt(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},vt=function(e){var t,n,a,i,s,r,o,u;if(t=p(e),t=H(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=p(this),H(n))return"NaN";if(-1e21>=n||n>=1e21)return l(n);if(a="",0>n&&(a="-",n=-n),i="0",n>1e-21)if(s=gt.log(n*gt.pow(2,69,1))-69,r=0>s?n*gt.pow(2,-s,1):n/gt.pow(2,s,1),r*=4503599627370496,s=52-s,s>0){for(gt.multiply(0,r),o=t;o>=7;)gt.multiply(1e7,0),o-=7;for(gt.multiply(gt.pow(10,o,1),0),o=s-1;o>=23;)gt.divide(1<<23),o-=23;gt.divide(1<<o),gt.multiply(1,1),gt.divide(2),i=gt.numToString()}else gt.multiply(0,r),gt.multiply(1<<-s,0),i=gt.numToString()+K("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=t>=u?a+K("0.0000000000000000000",0,t-u+2)+i:a+K(i,0,u-t)+"."+K(i,u-t)):i=a+i,i};P(d,{toFixed:vt},mt);var yt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),wt=d.toPrecision;P(d,{toPrecision:function(e){return"undefined"==typeof e?wt.call(this):wt.call(this,e)}},yt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(a,i){var s=String(this);if("undefined"==typeof a&&0===i)return[];if(!t(a))return X(this,a,i);var r,o,l,u,p=[],d=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),h=0,c=new RegExp(a.source,d+"g");e||(r=new RegExp("^"+c.source+"$(?!\\s)",d));var m="undefined"==typeof i?n:z.ToUint32(i);for(o=c.exec(s);o&&(l=o.index+o[0].length,!(l>h&&(W(p,K(s,h,o.index)),!e&&o.length>1&&o[0].replace(r,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(o[e]=void 0)}),o.length>1&&o.index<s.length&&f.apply(p,B(o,1)),u=o[0].length,h=l,p.length>=m)));)c.lastIndex===o.index&&c.lastIndex++,o=c.exec(s);return h===s.length?!u&&c.test("")||W(p,""):W(p,K(s,h)),p.length>m?B(p,0,m):p}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:X(this,e,t)});var bt=u.replace,xt=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){W(e,n)}),1===e.length&&"undefined"==typeof e[0]}();xt||(u.replace=function(n,a){var i=e(a),s=t(n)&&/\)[*?]/.test(n.source);if(i&&s){var r=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var s=n.exec(e)||[];return n.lastIndex=i,W(s,arguments[t-2],arguments[t-1]),a.apply(this,s)};return bt.call(this,n,r)}return bt.call(this,n,a)});var _t=u.substr,St="".substr&&"b"!=="0b".substr(-1);P(u,{substr:function(e,t){var n=e;return 0>e&&(n=b(this.length+e,0)),_t.call(this,n,t)}},St);var $t=" \n\x0B\f\r \u2028\u2029\ufeff",Ot="",Tt="["+$t+"]",Ut=new RegExp("^"+Tt+Tt+"*"),It=new RegExp(Tt+Tt+"*$"),Mt=u.trim&&($t.trim()||!Ot.trim());P(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Ut,"").replace(It,"")}},Mt);var Dt=y.bind(String.prototype.trim),Ct=u.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);P(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),a=arguments.length>1?p(arguments[1]):NaN,i=H(a)?1/0:z.ToInteger(a),s=x(b(i,0),t.length),r=n.length,o=s+r;o>0;){o=b(0,o-r);var u=Q(K(t,o,s+r),n);if(-1!==u)return o+u}return-1}},Ct);var Et=u.lastIndexOf;if(P(u,{lastIndexOf:function(e){return Et.apply(this,arguments)}},1!==u.lastIndexOf.length),8===parseInt($t+"08")&&22===parseInt($t+"0x16")||(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,a){var i=Dt(String(n)),s=p(a)||(t.test(i)?16:10);return e(i,s)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Dt(String(t)),a=e(n);return 0===a&&"-"===K(n,0,1)?-0:a}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var kt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),
|
||
e?t?e+": "+t:e:t};Error.prototype.toString=kt}if(R){var jt=function(e,t){if(G(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};jt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),jt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var At=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=At}}),Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),Handlebars.registerHelper("renderTextParam",function(e){var t,n="text",a="",i=e.type||e.schema.type||"",s="array"===i.toLowerCase()||e.allowMultiple,r=s&&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 r&&(r=""),e.format&&"password"===e.format&&(n="password"),e.valueId&&(a=" id='"+e.valueId+"'"),("string"==typeof r||r instanceof String)&&(r=r.replace(/'/g,"'")),s)t="<textarea class='body-textarea"+(e.required?" required":"")+"' name='"+e.name+"'"+a+o,t+=" placeholder='Provide multiple values in new lines"+(e.required?" (at least one required).":".")+"'>",t+=r+"</textarea>";else{var l="parameter";e.required&&(l+=" required"),t="<input class='"+l+"' minlength='"+(e.required?1:0)+"'",t+=" name='"+e.name+"' placeholder='"+(e.required?"(required)":"")+"'"+a+o,t+=" type='"+n+"' value='"+r+"'/>"}return new Handlebars.SafeString(t)}),Handlebars.registerHelper("ifCond",function(e,t,n,a){switch(t){case"==":return e==n?a.fn(this):a.inverse(this);case"===":return e===n?a.fn(this):a.inverse(this);case"<":return n>e?a.fn(this):a.inverse(this);case"<=":return n>=e?a.fn(this):a.inverse(this);case">":return e>n?a.fn(this):a.inverse(this);case">=":return e>=n?a.fn(this):a.inverse(this);case"&&":return e&&n?a.fn(this):a.inverse(this);case"||":return e||n?a.fn(this):a.inverse(this);default:return a.inverse(this)}}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression,o=' <div class="info_title">'+r(s(null!=(i=null!=e?e.info:e)?i.title:i,e))+'</div>\n <div class="info_description markdown">';return i=s(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(o+=i),o+="</div>\n",i=t["if"].call(e,null!=e?e.externalDocs:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+=" ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.termsOfServiceUrl:i,{name:"if",hash:{},fn:this.program(4,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+="\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,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+="\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,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+="\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,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+="\n ",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.license:i,{name:"if",hash:{},fn:this.program(12,a),inverse:this.noop,data:a}),null!=i&&(o+=i),o+"\n"},2:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return" <p>"+r(s(null!=(i=null!=e?e.externalDocs:e)?i.description:i,e))+'</p>\n <a href="'+r(s(null!=(i=null!=e?e.externalDocs:e)?i.url:i,e))+'" target="_blank">'+r(s(null!=(i=null!=e?e.externalDocs:e)?i.url:i,e))+"</a>\n"},4:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return'<div class="info_tos"><a target="_blank" href="'+r(s(null!=(i=null!=e?e.info:e)?i.termsOfServiceUrl:i,e))+'" data-sw-translate>Terms of service</a></div>'},6:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return"<div><div class='info_name' style=\"display: inline\" data-sw-translate>Created by </div> "+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,e))+"</div>"},8:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return"<div class='info_url' data-sw-translate>See more at <a href=\""+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.url:i,e))+'">'+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.url:i,e))+"</a></div>"},10:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return'<div class=\'info_email\'><a target="_parent" href="mailto:'+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,e))+"?subject="+r(s(null!=(i=null!=e?e.info:e)?i.title:i,e))+'" data-sw-translate>Contact the developer</a></div>'},12:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return"<div class='info_license'><a target=\"_blank\" href='"+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.license:i)?i.url:i,e))+"'>"+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.license:i)?i.name:i,e))+"</a></div>"},14:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return' , <span style="font-variant: small-caps" data-sw-translate>api version</span>: '+r(s(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n "},16:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <span style="float:right"><a target="_blank" href="'+o((i=null!=(i=t.validatorUrl||(null!=e?e.validatorUrl:e))?i:r,typeof i===s?i.call(e,{name:"validatorUrl",hash:{},data:a}):i))+"/debug?url="+o((i=null!=(i=t.url||(null!=e?e.url:e))?i:r,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+'"><img id="validator" src="'+o((i=null!=(i=t.validatorUrl||(null!=e?e.validatorUrl:e))?i:r,typeof i===s?i.call(e,{name:"validatorUrl",hash:{},data:a}):i))+"?url="+o((i=null!=(i=t.url||(null!=e?e.url:e))?i:r,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+'"></a>\n </span>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<div class='info' id='api_info'>\n";return i=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="</div>\n<div class='container' id='resources_container'>\n <div class='authorize-wrapper'></div>\n\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+l((s=null!=(s=t.basePath||(null!=e?e.basePath:e))?s:o,typeof s===r?s.call(e,{name:"basePath",hash:{},data:a}):s))+"\n",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.version:i,{name:"if",hash:{},fn:this.program(14,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="]\n",i=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(16,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </h4>\n </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.oauth2=Handlebars.template({1:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u=' <li>\n <input class="oauth-scope" type="checkbox" data-scope="'+l((s=null!=(s=t.scope||(null!=e?e.scope:e))?s:o,typeof s===r?s.call(e,{name:"scope",hash:{},data:a}):s))+'" oauthtype="'+l((s=null!=(s=t.OAuthSchemeKey||(null!=e?e.OAuthSchemeKey:e))?s:o,typeof s===r?s.call(e,{name:"OAuthSchemeKey",hash:{},data:a}):s))+'"/>\n <label>'+l((s=null!=(s=t.scope||(null!=e?e.scope:e))?s:o,typeof s===r?s.call(e,{name:"scope",hash:{},data:a}):s))+'</label><br/>\n <span class="api-scope-desc">'+l((s=null!=(s=t.description||(null!=e?e.description:e))?s:o,typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s))+"\n";return i=t["if"].call(e,null!=e?e.OAuthSchemeKey:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </span>\n </li>\n"},2:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" ("+o((i=null!=(i=t.OAuthSchemeKey||(null!=e?e.OAuthSchemeKey:e))?i:r,typeof i===s?i.call(e,{name:"OAuthSchemeKey",hash:{},data:a}):i))+")\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='<div>\n <h3 class="auth__title">Select OAuth2.0 Scopes</h3>\n <p>'+l((s=null!=(s=t.description||(null!=e?e.description:e))?s:o,typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s))+'</p>\n <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n <a href="#">Learn how to use</a>\n </p>\n <p><strong> '+l((s=null!=(s=t.appName||(null!=e?e.appName:e))?s:o,typeof s===r?s.call(e,{name:"appName",hash:{},data:a}):s))+" </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n <p>Authorization URL: "+l((s=null!=(s=t.authorizationUrl||(null!=e?e.authorizationUrl:e))?s:o,typeof s===r?s.call(e,{name:"authorizationUrl",hash:{},data:a}):s))+"</p>\n <p>flow: "+l((s=null!=(s=t.flow||(null!=e?e.flow:e))?s:o,typeof s===r?s.call(e,{name:"flow",hash:{},data:a}):s))+'</p>\n <ul class="api-popup-scopes">\n';return i=t.each.call(e,null!=e?e.scopes:e,{name:"each",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </ul>\n</div>"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,a){return"deprecated"},3:function(e,t,n,a){return" <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n"},5:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=' <h4><span data-sw-translate>Implementation Notes</span></h4>\n <div class="markdown">';return s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(l+=i),l+"</div>\n"},7:function(e,t,n,a){return" <div class='authorize-wrapper authorize-wrapper_operation'></div>\n"},9:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u=' <div class="response-class">\n <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> '+l((s=null!=(s=t.successCode||(null!=e?e.successCode:e))?s:o,typeof s===r?s.call(e,{name:"successCode",hash:{},data:a}):s))+")</h4>\n ";return i=t["if"].call(e,null!=e?e.successDescription:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+'\n <p><span class="model-signature" /></p>\n <br/>\n <div class="response-content-type" />\n </div>\n'},10:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l='<div class="markdown">';return s=null!=(s=t.successDescription||(null!=e?e.successDescription:e))?s:o,i=typeof s===r?s.call(e,{name:"successDescription",hash:{},data:a}):s,null!=i&&(l+=i),l+"</div>"},12:function(e,t,n,a){var i,s=' <h4 data-sw-translate>Headers</h4>\n <table class="headers">\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Header</th>\n <th style="width: 310px; max-width: 310px" data-sw-translate>Description</th>\n <th style="width: 200px; max-width: 200px" data-sw-translate>Type</th>\n <th style="width: 320px; max-width: 320px" data-sw-translate>Other</th>\n </tr>\n </thead>\n <tbody>\n';return i=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(13,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+" </tbody>\n </table>\n"},13:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return" <tr>\n <td>"+s(i(a&&a.key,e))+"</td>\n <td>"+s(i(null!=e?e.description:e,e))+"</td>\n <td>"+s(i(null!=e?e.type:e,e))+"</td>\n <td>"+s(i(null!=e?e.other:e,e))+"</td>\n </tr>\n"},15:function(e,t,n,a){return' <h4 data-sw-translate>Parameters</h4>\n <table class=\'fullwidth parameters\'>\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter</th>\n <th style="width: 310px; max-width: 310px" data-sw-translate>Value</th>\n <th style="width: 200px; max-width: 200px" data-sw-translate>Description</th>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter Type</th>\n <th style="width: 220px; max-width: 230px" data-sw-translate>Data Type</th>\n </tr>\n </thead>\n <tbody class="operation-params">\n\n </tbody>\n </table>\n'},17:function(e,t,n,a){return" <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth response-messages'>\n <thead>\n <tr>\n <th data-sw-translate>HTTP Status Code</th>\n <th data-sw-translate>Reason</th>\n <th data-sw-translate>Response Model</th>\n <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n </tbody>\n </table>\n"},19:function(e,t,n,a){return""},21:function(e,t,n,a){return" <div class='sandbox_header'>\n <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"},23:function(e,t,n,a){return" <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u=" <ul class='operations' >\n <li class='"+l((s=null!=(s=t.method||(null!=e?e.method:e))?s:o,typeof s===r?s.call(e,{name:"method",hash:{},data:a}):s))+" operation' id='"+l((s=null!=(s=t.parentId||(null!=e?e.parentId:e))?s:o,typeof s===r?s.call(e,{name:"parentId",hash:{},data:a}):s))+"_"+l((s=null!=(s=t.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/"+l((s=null!=(s=t.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+l((s=null!=(s=t.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+'\' class="toggleOperation">'+l((s=null!=(s=t.method||(null!=e?e.method:e))?s:o,typeof s===r?s.call(e,{name:"method",hash:{},data:a}):s))+"</a>\n </span>\n <span class='path'>\n <a href='#!/"+l((s=null!=(s=t.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+l((s=null!=(s=t.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"' class=\"toggleOperation ";return i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+='">'+l((s=null!=(s=t.path||(null!=e?e.path:e))?s:o,typeof s===r?s.call(e,{name:"path",hash:{},data:a}):s))+"</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/"+l((s=null!=(s=t.encodedParentId||(null!=e?e.encodedParentId:e))?s:o,typeof s===r?s.call(e,{name:"encodedParentId",hash:{},data:a}):s))+"/"+l((s=null!=(s=t.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+'\' class="toggleOperation">',s=null!=(s=t.summary||(null!=e?e.summary:e))?s:o,i=typeof s===r?s.call(e,{name:"summary",hash:{},data:a}):s,null!=i&&(u+=i),u+="</a>\n </li>\n </ul>\n </div>\n <div class='content' id='"+l((s=null!=(s=t.parentId||(null!=e?e.parentId:e))?s:o,typeof s===r?s.call(e,{name:"parentId",hash:{},data:a}):s))+"_"+l((s=null!=(s=t.nickname||(null!=e?e.nickname:e))?s:o,typeof s===r?s.call(e,{name:"nickname",hash:{},data:a}):s))+"_content' style='display:none'>\n",i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.security:e,{name:"if",hash:{},fn:this.program(7,a),inverse:this.noop,data:a}),null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="\n",i=t["if"].call(e,null!=e?e.headers:e,{name:"if",hash:{},fn:this.program(12,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n",i=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(15,a),inverse:this.noop,data:a}),null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(17,a),inverse:this.noop,data:a}),null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.isReadOnly:e,{name:"if",hash:{},fn:this.program(19,a),inverse:this.program(21,a),data:a}),null!=i&&(u+=i),u+=" </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n",i=t["if"].call(e,null!=e?e.showRequestHeaders:e,{name:"if",hash:{},fn:this.program(23,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,a){return" required"},3:function(e,t,n,a){return' multiple="multiple"'},5:function(e,t,n,a){return" required "},7:function(e,t,n,a){var i,s=" <option ";return i=t.unless.call(e,null!=e?e.hasDefault:e,{name:"unless",hash:{},fn:this.program(8,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s+" value=''></option>\n"},8:function(e,t,n,a){return' selected="" '},10:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="\n <option ";return i=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(11,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+=" value='"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:o,typeof s===r?s.call(e,{name:"value",hash:{},data:a}):s))+"'> "+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:o,typeof s===r?s.call(e,{name:"value",hash:{},data:a}):s))+" ",i=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(13,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </option>\n\n"},11:function(e,t,n,a){return' selected="" '},13:function(e,t,n,a){return" (default) "},15:function(e,t,n,a){return"<strong>"},17:function(e,t,n,a){return"</strong>"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td class='code";return i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="'><label for='"+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</label></td>\n<td>\n <select ",i=(t.isArray||e&&e.isArray||o).call(e,e,{name:"isArray",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+=' class="parameter ',i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+='" name="'+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+'" id="'+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+'">\n\n',i=t.unless.call(e,null!=e?e.required:e,{name:"unless",hash:{},fn:this.program(7,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="\n",i=t.each.call(e,null!=(i=null!=e?e.allowableValues:e)?i.descriptiveValues:i,{name:"each",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+='\n </select>\n</td>\n<td class="markdown">',i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(15,a),inverse:this.noop,data:a}),null!=i&&(u+=i),s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(17,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=t.paramType||(null!=e?e.paramType:e))?s:o,i=typeof s===r?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+"'>"+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"</textarea>\n"},3:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=i&&(s+=i),s},4:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" "+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"\n"},6:function(e,t,n,a){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td class='code required'><label for='"+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</label></td>\n<td>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td class="markdown">',s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=t.paramType||(null!=e?e.paramType:e))?s:o,i=typeof s===r?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+"'>"+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+'</textarea>\n <div class="parameter-content-type" />\n'},3:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=i&&(s+=i),s},4:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" "+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+"\n"},6:function(e,t,n,a){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td class='code'><label for='"+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</label></td>\n<td>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td class="markdown">',s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=t.paramType||(null!=e?e.paramType:e))?s:o,i=typeof s===r?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s},2:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <input type="file" name=\''+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+"'/>\n"},4:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=i&&(s+=i),s},5:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <div class=\"editor_holder\"></div>\n <textarea class='body-textarea required' placeholder='(required)' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id=\""+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+'">'+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <textarea class='body-textarea required' placeholder='(required)' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+'\'></textarea>\n <div class="editor_holder"></div>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=i&&(s+=i),s},10:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <input class='parameter' class='required' type='file' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+"'/>\n"},12:function(e,t,n,a){var i,s=t.helperMissing,r="";return i=(t.renderTextParam||e&&e.renderTextParam||s).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(13,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r},13:function(e,t,n,a){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td class='code required'><label for='"+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</label></td>\n<td>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=i&&(u+=i),u+='</td>\n<td>\n <strong><span class="markdown">',s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</span></strong>\n</td>\n<td>",s=null!=(s=t.paramType||(null!=e?e.paramType:e))?s:o,i=typeof s===r?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=i&&(s+=i),s},2:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return' <input type="file" name=\''+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+'\'/>\n <div class="parameter-content-type" />\n'},4:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=i&&(s+=i),s},5:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <div class=\"editor_holder\"></div>\n <textarea class='body-textarea' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+"'>"+o((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:r,typeof i===s?i.call(e,{name:"default",hash:{},data:a}):i))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <textarea class='body-textarea' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:r,typeof i===s?i.call(e,{name:"name",hash:{},data:a}):i))+"' id='"+o((i=null!=(i=t.valueId||(null!=e?e.valueId:e))?i:r,typeof i===s?i.call(e,{name:"valueId",hash:{},data:a}):i))+'\'></textarea>\n <div class="editor_holder"></div>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,t,n,a){var i,s="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(10,a),data:a}),null!=i&&(s+=i),s},10:function(e,t,n,a){var i,s=t.helperMissing,r="";return i=(t.renderTextParam||e&&e.renderTextParam||s).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(11,a),inverse:this.noop,data:a}),null!=i&&(r+=i),r},11:function(e,t,n,a){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td class='code'><label for='"+l((s=null!=(s=t.valueId||(null!=e?e.valueId:e))?s:o,typeof s===r?s.call(e,{name:"valueId",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:o,typeof s===r?s.call(e,{name:"name",hash:{},data:a}):s))+"</label></td>\n<td>\n\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=i&&(u+=i),u+='\n</td>\n<td class="markdown">',
|
||
s=null!=(s=t.description||(null!=e?e.description:e))?s:o,i=typeof s===r?s.call(e,{name:"description",hash:{},data:a}):s,null!=i&&(u+=i),u+="</td>\n<td>",s=null!=(s=t.paramType||(null!=e?e.paramType:e))?s:o,i=typeof s===r?s.call(e,{name:"paramType",hash:{},data:a}):s,null!=i&&(u+=i),u+'</td>\n<td>\n <span class="model-signature"></span>\n</td>\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,a){var i,s="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return' <option value="'+s(i(e,e))+'">'+s(i(e,e))+"</option>\n"},4:function(e,t,n,a){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='<label for="'+l((s=null!=(s=t.parameterContentTypeId||(null!=e?e.parameterContentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"parameterContentTypeId",hash:{},data:a}):s))+'" data-sw-translate>Parameter content type:</label>\n<select name="parameterContentType" id="'+l((s=null!=(s=t.parameterContentTypeId||(null!=e?e.parameterContentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"parameterContentTypeId",hash:{},data:a}):s))+'">\n';return i=t["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(u+=i),u+"</select>\n"},useData:!0}),this.Handlebars.templates.popup=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return'<div class="api-popup-dialog-wrapper">\n <div class="api-popup-title">'+o((i=null!=(i=t.title||(null!=e?e.title:e))?i:r,typeof i===s?i.call(e,{name:"title",hash:{},data:a}):i))+'</div>\n <div class="api-popup-content"></div>\n <p class="error-msg"></p>\n <div class="api-popup-actions">\n <button class="api-popup-cancel api-button gray" type="button">Cancel</button>\n </div>\n</div>\n<div class="api-popup-dialog-shadow"></div>'},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({1:function(e,t,n,a){return" : "},3:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" <li>\n <a href='"+o((i=null!=(i=t.url||(null!=e?e.url:e))?i:r,typeof i===s?i.call(e,{name:"url",hash:{},data:a}):i))+"' data-sw-translate>Raw</a>\n </li>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r,o="function",l=t.helperMissing,u=this.escapeExpression,p=t.blockHelperMissing,d="<div class='heading'>\n <h2>\n <a href='#!/"+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'\' class="toggleEndpointList" data-id="'+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'">'+u((s=null!=(s=t.name||(null!=e?e.name:e))?s:l,typeof s===o?s.call(e,{name:"name",hash:{},data:a}):s))+"</a> ";return s=null!=(s=t.summary||(null!=e?e.summary:e))?s:l,r={name:"summary",hash:{},fn:this.program(1,a),inverse:this.noop,data:a},i=typeof s===o?s.call(e,r):s,t.summary||(i=p.call(e,i,r)),null!=i&&(d+=i),s=null!=(s=t.summary||(null!=e?e.summary:e))?s:l,i=typeof s===o?s.call(e,{name:"summary",hash:{},data:a}):s,null!=i&&(d+=i),d+="\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+"' id='endpointListTogger_"+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'\' class="toggleEndpointList" data-id="'+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href=\'#\' class="collapseResource" data-id="'+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'" data-sw-translate>\n List Operations\n </a>\n </li>\n <li>\n <a href=\'#\' class="expandResource" data-id="'+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+'" data-sw-translate>\n Expand Operations\n </a>\n </li>\n',i=t["if"].call(e,null!=e?e.url:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(d+=i),d+" </ul>\n</div>\n<ul class='endpoints' id='"+u((s=null!=(s=t.id||(null!=e?e.id:e))?s:l,typeof s===o?s.call(e,{name:"id",hash:{},data:a}):s))+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,a){var i,s="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return' <option value="'+s(i(e,e))+'">'+s(i(e,e))+"</option>\n"},4:function(e,t,n,a){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='<label data-sw-translate for="'+l((s=null!=(s=t.responseContentTypeId||(null!=e?e.responseContentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"responseContentTypeId",hash:{},data:a}):s))+'">Response Content Type</label>\n<select name="responseContentType" id="'+l((s=null!=(s=t.responseContentTypeId||(null!=e?e.responseContentTypeId:e))?s:o,typeof s===r?s.call(e,{name:"responseContentTypeId",hash:{},data:a}):s))+'">\n';return i=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=i&&(u+=i),u+"</select>\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({1:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l='\n<div>\n<ul class="signature-nav">\n <li><a class="description-link" href="#" data-sw-translate>Model</a></li>\n <li><a class="snippet-link" href="#" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n <div class="description">\n ';return s=null!=(s=t.signature||(null!=e?e.signature:e))?s:o,i=typeof s===r?s.call(e,{name:"signature",hash:{},data:a}):s,null!=i&&(l+=i),l+='\n </div>\n\n <div class="snippet">\n',i=t["if"].call(e,null!=e?e.sampleJSON:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(l+=i),i=t["if"].call(e,null!=e?e.sampleXML:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=i&&(l+=i),l+" </div>\n</div>\n"},2:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u=' <div class="snippet_json">\n <pre><code>'+l((s=null!=(s=t.sampleJSON||(null!=e?e.sampleJSON:e))?s:o,typeof s===r?s.call(e,{name:"sampleJSON",hash:{},data:a}):s))+"</code></pre>\n ";return i=t["if"].call(e,null!=e?e.isParam:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+"\n </div>\n"},3:function(e,t,n,a){return'<small class="notice" data-sw-translate></small>'},5:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u=' <div class="snippet_xml">\n <pre><code>'+l((s=null!=(s=t.sampleXML||(null!=e?e.sampleXML:e))?s:o,typeof s===r?s.call(e,{name:"sampleXML",hash:{},data:a}):s))+"</code></pre>\n ";return i=t["if"].call(e,null!=e?e.isParam:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+"\n </div>\n"},7:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" "+o((i=null!=(i=t.signature||(null!=e?e.signature:e))?i:r,typeof i===s?i.call(e,{name:"signature",hash:{},data:a}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s=t.helperMissing;return i=(t.ifCond||e&&e.ifCond||s).call(e,null!=e?e.sampleJSON:e,"||",null!=e?e.sampleXML:e,{name:"ifCond",hash:{},fn:this.program(1,a),inverse:this.program(7,a),data:a}),null!=i?i:""},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({1:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return" <tr>\n <td>"+s(i(a&&a.key,e))+"</td>\n <td>"+s(i(null!=e?e.description:e,e))+"</td>\n <td>"+s(i(null!=e?e.type:e,e))+"</td>\n </tr>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u="<td width='15%' class='code'>"+l((s=null!=(s=t.code||(null!=e?e.code:e))?s:o,typeof s===r?s.call(e,{name:"code",hash:{},data:a}):s))+'</td>\n<td class="markdown">';return s=null!=(s=t.message||(null!=e?e.message:e))?s:o,i=typeof s===r?s.call(e,{name:"message",hash:{},data:a}):s,null!=i&&(u+=i),u+='</td>\n<td width=\'50%\'><span class="model-signature" /></td>\n<td class="headers">\n <table>\n <tbody>\n',i=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=i&&(u+=i),u+" </tbody>\n </table>\n</td>"},useData:!0}),window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},"model"!==e.defaultModelRendering&&(e.defaultModelRendering="schema"),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('<div id="'+this.dom_id+'"></div>'),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)}),JSONEditor.defaults.iconlibs.swagger=JSONEditor.AbstractIconLib.extend({mapping:{collapse:"collapse",expand:"expand"},icon_prefix:"swagger-"})},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(),this.authView&&this.authView.remove();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(){var e;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(),_.isEmpty(this.api.securityDefinitions)||(e=_.map(this.api.securityDefinitions,function(e,t){var n={};return n[t]=e,n}),this.authView=new SwaggerUi.Views.AuthButtonView({data:SwaggerUi.utils.parseSecurityDefinitions(e),router:this}),$("#auth_container").append(this.authView.render().el)),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 a=e.length;return e.indexOf("?")>-1&&(a=Math.min(a,e.indexOf("?"))),e.indexOf("#")>-1&&(a=Math.min(a,e.indexOf("#"))),e=e.substring(0,a),-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.text(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={},window.SwaggerUi.Models={},window.SwaggerUi.Collections={},window.SwaggerUi.partials={},window.SwaggerUi.utils={},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}),window.SwaggerUi.utils={parseSecurityDefinitions:function(e){var t=Object.assign({},window.swaggerUi.api.authSchemes||window.swaggerUi.api.securityDefinitions),n=[],a=[],i=[],s=window.SwaggerUi.utils;return Array.isArray(e)?(e.forEach(function(e){var r={},o={};for(var l in e)if(Array.isArray(e[l])){if(!t[l])continue;if(t[l]=t[l]||{},"oauth2"===t[l].type){o[l]=Object.assign({},t[l]),o[l].scopes=Object.assign({},t[l].scopes);for(var u in o[l].scopes)e[l].indexOf(u)<0&&delete o[l].scopes[u];o[l].scopes=s.parseOauth2Scopes(o[l].scopes),i=_.merge(i,o[l].scopes)}else r[l]=Object.assign({},t[l])}else"oauth2"===e[l].type?(o[l]=Object.assign({},e[l]),o[l].scopes=s.parseOauth2Scopes(o[l].scopes),i=_.merge(i,o[l].scopes)):r[l]=e[l];_.isEmpty(r)||a.push(r),_.isEmpty(o)||n.push(o)}),{auths:a,oauth2:n,scopes:i}):null},parseOauth2Scopes:function(e){var t,n=Object.assign({},e),a=[];for(t in n)a.push({scope:t,description:n[t]});return a}},SwaggerUi.Models.ApiKeyAuthModel=Backbone.Model.extend({defaults:{"in":"",name:"",title:"",value:""},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("value");return this.set("valid",e),e}}),SwaggerUi.Views.ApiKeyAuthView=Backbone.View.extend({events:{"change .input_apiKey_entry":"apiKeyChange"},selectors:{apikeyInput:".input_apiKey_entry"},template:Handlebars.templates.apikey_auth,initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){return this.$el.html(this.template(this.model.toJSON())),this},apiKeyChange:function(e){var t=$(e.target).val();t&&this.$(this.selectors.apikeyInput).removeClass("error"),this.model.set("value",t)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.isValid()||this.$(this.selectors.apikeyInput).addClass("error")}}),SwaggerUi.Views.AuthButtonView=Backbone.View.extend({events:{"click .authorize__btn":"authorizeBtnClick"},tpls:{popup:Handlebars.templates.popup,authBtn:Handlebars.templates.auth_button,authBtnOperation:Handlebars.templates.auth_button_operation},initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.isOperation=this.options.isOperation,this.model=this.model||{},this.router=this.options.router,this.auths=this.options.data.oauth2.concat(this.options.data.auths)},render:function(){var e=this.isOperation?"authBtnOperation":"authBtn";return this.$authEl=this.renderAuths(this.auths),this.$el.html(this.tpls[e](this.model)),this},authorizeBtnClick:function(e){var t;e.preventDefault(),t={title:"Available authorizations",content:this.$authEl},this.render(),this.popup=new SwaggerUi.Views.PopupView({model:t}),this.popup.render()},renderAuths:function(e){var t=$("<div>"),n=!1;return e.forEach(function(e){var a=new SwaggerUi.Views.AuthView({data:e,router:this.router}),i=a.render().el;t.append(i),a.isLogout&&(n=!0)},this),this.model.isLogout=n,t}}),SwaggerUi.Collections.AuthsCollection=Backbone.Collection.extend({constructor:function(){var e=Array.prototype.slice.call(arguments);e[0]=this.parse(e[0]),Backbone.Collection.apply(this,e)},add:function(e){var t=Array.prototype.slice.call(arguments);Array.isArray(e)?t[0]=_.map(e,function(e){return this.handleOne(e)},this):t[0]=this.handleOne(e),Backbone.Collection.prototype.add.apply(this,t)},handleOne:function(e){var t=e;if(!(e instanceof Backbone.Model))switch(e.type){case"oauth2":t=new SwaggerUi.Models.Oauth2Model(e);break;case"basic":t=new SwaggerUi.Models.BasicAuthModel(e);break;case"apiKey":t=new SwaggerUi.Models.ApiKeyAuthModel(e);break;default:t=new Backbone.Model(e)}return t},isValid:function(){var e=!0;return this.models.forEach(function(t){t.validate()||(e=!1)}),e},isAuthorized:function(){return this.length===this.where({isLogout:!0}).length},isPartiallyAuthorized:function(){return this.where({isLogout:!0}).length>0},parse:function(e){var t=Object.assign({},window.swaggerUi.api.clientAuthorizations.authz);return _.map(e,function(e,n){var a=t[n]&&"basic"===e.type&&t[n].username&&t[n].password;return _.extend(e,{title:n}),(t[n]||a)&&_.extend(e,{isLogout:!0,value:a?void 0:t[n].value,username:a?t[n].username:void 0,password:a?t[n].password:void 0,valid:!0}),e})}}),SwaggerUi.Views.AuthsCollectionView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.router=this.options.router,this.collection=new SwaggerUi.Collections.AuthsCollection(e.data),this.$innerEl=$("<div>"),this.authViews=[]},render:function(){return this.collection.each(function(e){this.renderOneAuth(e)},this),this.$el.html(this.$innerEl.html()?this.$innerEl:""),this},renderOneAuth:function(e){var t,n,a,i=e.get("type");"apiKey"===i?a="ApiKeyAuthView":"basic"===i&&0===this.$innerEl.find(".basic_auth_container").length?a="BasicAuthView":"oauth2"===i&&(a="Oauth2View"),a&&(n=new SwaggerUi.Views[a]({model:e,router:this.router}),t=n.render().el,this.authViews.push(n)),this.$innerEl.append(t)},highlightInvalid:function(){this.authViews.forEach(function(e){e.highlightInvalid()},this)}}),SwaggerUi.Views.AuthView=Backbone.View.extend({events:{"click .auth_submit__button":"authorizeClick","click .auth_logout__button":"logoutClick"},tpls:{main:Handlebars.templates.auth_view},selectors:{innerEl:".auth_inner",authBtn:".auth_submit__button"},initialize:function(e){this.options=e||{},e.data=e.data||{},this.router=this.options.router,this.authsCollectionView=new SwaggerUi.Views.AuthsCollectionView({data:e.data}),this.$el.html(this.tpls.main({isLogout:this.authsCollectionView.collection.isAuthorized(),isAuthorized:this.authsCollectionView.collection.isPartiallyAuthorized()})),this.$innerEl=this.$(this.selectors.innerEl),this.isLogout=this.authsCollectionView.collection.isPartiallyAuthorized()},render:function(){return this.$innerEl.html(this.authsCollectionView.render().el),this},authorizeClick:function(e){e.preventDefault(),e.stopPropagation(),this.authsCollectionView.collection.isValid()?this.authorize():this.authsCollectionView.highlightInvalid()},authorize:function(){this.authsCollectionView.collection.forEach(function(e){var t,n,a=e.get("type");"apiKey"===a?(t=new SwaggerClient.ApiKeyAuthorization(e.get("name"),e.get("value"),e.get("in")),this.router.api.clientAuthorizations.add(e.get("title"),t)):"basic"===a?(n=new SwaggerClient.PasswordAuthorization(e.get("username"),e.get("password")),this.router.api.clientAuthorizations.add(e.get("title"),n)):"oauth2"===a&&this.handleOauth2Login(e)},this),this.router.load()},logoutClick:function(e){e.preventDefault(),this.authsCollectionView.collection.forEach(function(e){window.swaggerUi.api.clientAuthorizations.remove(e.get("title"))}),this.router.load()},handleOauth2Login:function(e){var t,n,a,i=window.location,s=location.pathname.substring(0,location.pathname.lastIndexOf("/")),r=i.protocol+"//"+i.host+s+"/o2c.html",o=window.oAuthRedirectUrl||r,l=null,u=_.map(e.get("scopes"),function(e){return e.scope});window.OAuthSchemeKey=e.get("title"),window.enabledScopes=u;var p=e.get("flow");if("oauth2"!==e.get("type")||!p||"implicit"!==p&&"accessCode"!==p){if("oauth2"===e.get("type")&&p&&"application"===p)return n=e.attributes,window.swaggerUi.tokenName=n.tokenName||"access_token",void this.clientCredentialsFlow(u,n.tokenUrl,window.OAuthSchemeKey);if(e.get("grantTypes")){var d=e.get("grantTypes");for(var h in d)d.hasOwnProperty(h)&&"implicit"===h?(n=d[h],a=n.loginEndpoint.url,l=n.loginEndpoint.url+"?response_type=token",window.swaggerUi.tokenName=n.tokenName):d.hasOwnProperty(h)&&"accessCode"===h&&(n=d[h],a=n.tokenRequestEndpoint.url,l=n.tokenRequestEndpoint.url+"?response_type=code",window.swaggerUi.tokenName=n.tokenName)}}else n=e.attributes,l=n.authorizationUrl+"?response_type="+("implicit"===p?"token":"code"),window.swaggerUi.tokenName=n.tokenName||"access_token",window.swaggerUi.tokenUrl="accessCode"===p?n.tokenUrl:null,t=window.OAuthSchemeKey;redirect_uri=o,l+="&redirect_uri="+encodeURIComponent(o),l+="&realm="+encodeURIComponent(realm),l+="&client_id="+encodeURIComponent(clientId),l+="&scope="+encodeURIComponent(u.join(scopeSeparator)),l+="&state="+encodeURIComponent(t);for(var c in additionalQueryStringParams)l+="&"+c+"="+encodeURIComponent(additionalQueryStringParams[c]);window.open(l)},clientCredentialsFlow:function(e,t,n){var a={client_id:clientId,client_secret:clientSecret,scope:e.join(" "),grant_type:"client_credentials"};$.ajax({url:t,type:"POST",data:a,success:function(e){onOAuthComplete(e,n)},error:function(){onOAuthComplete("")}})}}),SwaggerUi.Models.BasicAuthModel=Backbone.Model.extend({defaults:{username:"",password:"",title:"basic"},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("password")&&!!this.get("username");return this.set("valid",e),e}}),SwaggerUi.Views.BasicAuthView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},events:{"change .auth_input":"inputChange"},selectors:{usernameInput:".basic_auth__username",passwordInput:".basic_auth__password"},cls:{error:"error"},template:Handlebars.templates.basic_auth,render:function(){return $(this.el).html(this.template(this.model.toJSON())),this},inputChange:function(e){var t=$(e.target),n=t.val(),a=t.prop("name");n&&t.removeClass(this.cls.error),this.model.set(a,n)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.model.get("username")||this.$(this.selectors.usernameInput).addClass(this.cls.error)}}),SwaggerUi.Views.ContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.contentTypeId="ct"+Math.random(),$(this.el).html(Handlebars.templates.content_type(this.model)),this}}),SwaggerUi.Views.HeaderView=Backbone.View.extend({events:{"click #show-pet-store-icon":"showPetStore","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},initialize:function(){},showPetStore:function(){this.trigger("update-swagger-ui",{url:"http://petstore.swagger.io/v2/swagger.json"})},showCustomOnKeyup:function(e){13===e.keyCode&&this.showCustom()},showCustom:function(e){e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val()})},update:function(e,t,n){void 0===n&&(n=!1),$("#input_baseUrl").val(e),n&&this.trigger("update-swagger-ui",{url:e})}}),SwaggerUi.Views.MainView=Backbone.View.extend({apisSorter:{alpha:function(e,t){return e.name.localeCompare(t.name)}},operationsSorters:{alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},initialize:function(e){var t,n,a,i;if(e=e||{},this.router=e.router,e.swaggerOptions.apisSorter&&(t=e.swaggerOptions.apisSorter,n=_.isFunction(t)?t:this.apisSorter[t],_.isFunction(n)&&this.model.apisArray.sort(n)),e.swaggerOptions.operationsSorter&&(t=e.swaggerOptions.operationsSorter,n=_.isFunction(t)?t:this.operationsSorters[t],_.isFunction(n)))for(a in this.model.apisArray)this.model.apisArray[a].operationsArray.sort(n);this.model.auths=[];for(a in this.model.securityDefinitions)i=this.model.securityDefinitions[a],this.model.auths.push({name:a,type:i.type,value:i});"validatorUrl"in e.swaggerOptions?this.model.validatorUrl=e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0||this.model.url.indexOf("127.0.0.1")>0?this.model.validatorUrl=null:"https:"===window.location.protocol?this.model.validatorUrl="https://online.swagger.io/validator":this.model.validatorUrl="http://online.swagger.io/validator";var s;for(s in this.model.definitions)this.model.definitions[s].type||(this.model.definitions[s].type="object")},render:function(){$(this.el).html(Handlebars.templates.main(this.model)),this.info=this.$(".info")[0],this.info&&this.info.addEventListener("click",this.onLinkClick,!0),this.model.securityDefinitions=this.model.securityDefinitions||{};for(var e={},t=0,n=0;n<this.model.apisArray.length;n++){for(var a=this.model.apisArray[n],i=a.name;"undefined"!=typeof e[i];)i=i+"_"+t,t+=1;a.id=i,e[i]=a,this.addResource(a,this.model.auths)}return $(".propWrap").hover(function(){$(".optionsWrapper",$(this)).show()},function(){$(".optionsWrapper",$(this)).hide()}),this},addResource:function(e,t){e.id=e.id.replace(/\s/g,"_"),e.definitions=this.model.definitions;var n=new SwaggerUi.Views.ResourceView({model:e,router:this.router,tagName:"li",id:"resource_"+e.id,className:"resource",auths:t,swaggerOptions:this.options.swaggerOptions});$("#resources",this.el).append(n.render().el)},clear:function(){$(this.el).html("")},onLinkClick:function(e){var t=e.target;"A"===t.tagName&&t.href&&!t.target&&(e.preventDefault(),window.open(t.href,"_blank"))}}),SwaggerUi.Models.Oauth2Model=Backbone.Model.extend({defaults:{scopes:{}},initialize:function(){this.on("change",this.validate)},setScopes:function(e,t){var n=_.extend({},this.attributes),a=_.findIndex(n.scopes,function(t){return t.scope===e});n.scopes[a].checked=t,this.set(n),this.validate()},validate:function(){var e=!1,t=this.get("scopes"),n=_.findIndex(t,function(e){return e.checked===!0});return t.length>0&&n>=0&&(e=!0),0===t.length&&(e=!0),this.set("valid",e),e}}),SwaggerUi.Views.Oauth2View=Backbone.View.extend({events:{"change .oauth-scope":"scopeChange"},template:Handlebars.templates.oauth2,render:function(){return this.$el.html(this.template(this.model.toJSON())),this},scopeChange:function(e){var t=$(e.target).prop("checked"),n=$(e.target).data("scope");this.model.setScopes(n,t)}}),SwaggerUi.Views.OperationView=Backbone.View.extend({invocationUrl:null,events:{"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","dblclick .curl":"selectText","change [name=responseContentType]":"showSnippet"},initialize:function(e){return e=e||{},this.router=e.router,this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this.model.encodedParentId=encodeURIComponent(this.parentId),e.swaggerOptions&&(this.model.defaultRendering=e.swaggerOptions.defaultModelRendering,e.swaggerOptions.showRequestHeaders&&(this.model.showRequestHeaders=!0)),this},selectText:function(e){var t,n,a=document,i=e.target.firstChild;a.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(i),t.select()):window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(i),n.removeAllRanges(),n.addRange(t))},mouseEnter:function(e){var t=$(this.el).find(".content"),n=e.pageX,a=e.pageY,i=$(window).scrollLeft(),s=$(window).scrollTop(),r=i+$(window).width(),o=s+$(window).height(),l=t.width(),u=t.height();n+l>r&&(n=r-l),i>n&&(n=i),a+u>o&&(a=o-u),s>a&&(a=s);var p={};p.top=a,p.left=n,t.css(p)},render:function(){var e,t,n,a,i,s,r,o,l,u,p,d,h,c,f,m,g,v,y,w,b,x,S,O,T,U,I,M,D,C,E,k,j,A,V,R,P,N,H,z,L;if(s=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,s||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.oauth=null,m=this.model.authorizations||this.model.security)if(Array.isArray(m))for(l=0,u=m.length;u>l;l++){n=m[l];for(o in n)for(e in this.auths)if(t=this.auths[e],o===t.name&&"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],S=t.value.scopes;for(r in S)P=S[r],k=n[o].indexOf(r),k>=0&&(v={scope:r,description:P},this.model.oauth.scopes.push(v))}}else for(r in m)if(P=m[r],"oauth2"===r)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),f=0,p=P.length;p>f;f++)v=P[f],this.model.oauth.scopes.push(v);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],O=this.model.responses;for(a in O)N=O[a],C=null,E=this.model.responses[a].schema,E&&E.$ref&&(C=E.$ref,-1!==C.indexOf("#/definitions/")&&(C=C.replace(/^.*#\/definitions\//,""))),this.model.responseMessages.push({code:a,message:N.description,responseModel:C,headers:N.headers,schema:E})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),j=null,H=this.model.produces,z=this.contains(H,"xml"),L=z?this.contains(H,"json"):!0,this.model.successResponse){V=this.model.successResponse;for(o in V)N=V[o],this.model.successCode=o,"object"==typeof N&&"function"==typeof N.createJSONSample?(this.model.successDescription=N.description,this.model.headers=this.parseResponseHeaders(N.headers),j={sampleJSON:L?JSON.stringify(SwaggerUi.partials.signature.createJSONSample(N),void 0,2):!1,isParam:!1,sampleXML:z?SwaggerUi.partials.signature.createXMLSample(N.name,N.definition,N.models):!1,signature:SwaggerUi.partials.signature.getModelSignature(N.name,N.definition,N.models,N.modelPropertyMacro)}):j={signature:SwaggerUi.partials.signature.getPrimitiveSignature(N)}}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(j={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),j?(j.defaultRendering=this.model.defaultRendering,D=new SwaggerUi.Views.SignatureView({model:j,router:this.router,tagName:"div"}),$(".model-signature",$(this.el)).append(D.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),i={isParam:!1},i.consumes=this.model.consumes,i.produces=this.model.produces,T=this.model.parameters,g=0,d=T.length;d>g;g++)w=T[g],R=w.type||w.dataType||"","undefined"==typeof R&&(C=w.schema,C&&C.$ref&&(x=C.$ref,R=0===x.indexOf("#/definitions/")?x.substring("#/definitions/".length):x)),R&&"file"===R.toLowerCase()&&(i.consumes||(i.consumes="multipart/form-data")),w.type=R;for(M=new SwaggerUi.Views.ResponseContentTypeView({model:i,router:this.router}),$(".response-content-type",$(this.el)).append(M.render().el),U=this.model.parameters,y=0,h=U.length;h>y;y++)w=U[y],this.addParameter(w,i.consumes);for(I=this.model.responseMessages,b=0,c=I.length;c>b;b++)A=I[b],A.isXML=z,A.isJSON=L,_.isUndefined(A.headers)||(A.headers=this.parseHeadersType(A.headers)),this.addStatusCode(A);if(Array.isArray(this.model.security)){var F=SwaggerUi.utils.parseSecurityDefinitions(this.model.security);F.isLogout=!_.isEmpty(window.swaggerUi.api.clientAuthorizations.authz),
|
||
this.authView=new SwaggerUi.Views.AuthButtonView({data:F,router:this.router,isOperation:!0,model:{scopes:F.scopes}}),this.$(".authorize-wrapper").append(this.authView.render().el)}return this.showSnippet(),this},parseHeadersType:function(e){var t={string:{"date-time":"dateTime",date:"date"}};return _.forEach(e,function(e){var n;e=e||{},n=t[e.type]&&t[e.type][e.format],_.isUndefined(n)||(e.type=n)}),e},contains:function(e,t){return e.filter(function(e){return e.indexOf(t)>-1?!0:void 0}).length},parseResponseHeaders:function(e){var t="; ",n=_.clone(e);return _.forEach(n,function(e){var n=[];_.forEach(e,function(e,t){var a=["type","description"];-1===a.indexOf(t.toLowerCase())&&n.push(t+": "+e)}),n.join(t),e.other=n}),n},addParameter:function(e,t){e.consumes=t,e.defaultRendering=this.model.defaultRendering,e.schema&&($.extend(!0,e.schema,this.model.definitions[e.type]),e.schema.definitions=this.model.definitions,e.schema.type||(e.schema.type="object"),e.schema.title||(e.schema.title=" "));var n=new SwaggerUi.Views.ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly,swaggerOptions:this.options.swaggerOptions});$(".operation-params",$(this.el)).append(n.render().el)},addStatusCode:function(e){e.defaultRendering=this.model.defaultRendering;var t=new SwaggerUi.Views.StatusCodeView({model:e,tagName:"tr",router:this.router});$(".operation-status",$(this.el)).append(t.render().el)},submitOperation:function(e){var t,n,a,i,s;if(null!==e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),n.find("textarea.required:visible").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1)}),n.find("select.required").each(function(){$(this).removeClass("error"),-1===this.selectedIndex&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),t){if(i=this.getInputMap(n),a=this.isFileUpload(n),s={parent:this},this.options.swaggerOptions)for(var r in this.options.swaggerOptions)s[r]=this.options.swaggerOptions[r];var o;for(o=0;o<this.model.parameters.length;o++){var l=this.model.parameters[o];if(l.jsonEditor&&l.jsonEditor.isEnabled()){var u=l.jsonEditor.getValue();i[l.name]=JSON.stringify(u)}}return s.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),s.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),a?($(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),s.useJQuery=!0,i.parameterContentType="multipart/form-data",this.map=i,this.model.execute(i,s,this.showCompleteStatus,this.showErrorStatus,this)):(this.map=i,this.model.execute(i,s,this.showCompleteStatus,this.showErrorStatus,this))}},getInputMap:function(e){var t,n,a,i,s,r,o,l,u,p,d,h;for(t={},n=e.find("input"),a=0,i=n.length;i>a;a++)s=n[a],null!==s.value&&jQuery.trim(s.value).length>0&&(t[s.name]=s.value),"file"===s.type&&(t[s.name]=s.files[0]);for(r=e.find("textarea"),o=0,l=r.length;l>o;o++)s=r[o],u=this.getTextAreaValue(s),null!==u&&jQuery.trim(u).length>0&&(t[s.name]=u);for(p=e.find("select"),d=0,h=p.length;h>d;d++)s=p[d],u=this.getSelectedValue(s),null!==u&&jQuery.trim(u).length>0&&(t[s.name]=u);return t},isFileUpload:function(e){var t,n,a,i,s=!1;for(t=e.find("input"),n=0,a=t.length;a>n;n++)i=t[n],"file"===i.type&&(s=!0);return s},success:function(e,t){t.showCompleteStatus(e)},wrap:function(e){var t,n,a,i,s,r,o;for(a={},n=e.getAllResponseHeaders().split("\r"),s=0,r=n.length;r>s;s++)i=n[s],t=i.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(a[t[0].trim()]=t[1].trim());return o={},o.content={},o.content.data=e.responseText,o.headers=a,o.request={},o.request.url=this.invocationUrl,o.status=e.status,o},getSelectedValue:function(e){if(e.multiple){for(var t=[],n=0,a=e.options.length;a>n;n++){var i=e.options[n];i.selected&&t.push(i.value)}return t.length>0?t:null}return e.value},hideResponse:function(e){e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},showResponse:function(e){var t=JSON.stringify(e,null," ").replace(/\n/g,"<br>");$(".response_body",$(this.el)).html(_.escape(t))},showErrorStatus:function(e,t){t.showStatus(e)},showCompleteStatus:function(e,t){t.showStatus(e)},formatXml:function(e){var t,n,a,i,s,r,o,l,u,p,d,h,c;for(d=/(>)(<)(\/*)/g,c=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(d,"$1\n$2$3").replace(c,"$1\n").replace(t,"$1\n$2"),p=0,a="",l=e.split("\n"),i=0,r="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,s,o,l,u,p;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(s in u)p=u[s],p&&e.push(s);return e}()[0],l=void 0===l?"other":l,t=r+"->"+l,r=l,o="",i+=h[t],o=function(){var e,t,a;for(a=[],n=e=0,t=i;t>=0?t>e:e>t;n=t>=0?++e:--e)a.push(" ");return a}().join(""),"opening->closing"===t?a=a.substr(0,a.length-1)+e+"\n":a+=o+e+"\n"},s=0,o=l.length;o>s;s++)u=l[s],n(u);return a},showStatus:function(e){var t,n;void 0===e.content?(n=e.data,t=e.url):(n=e.content.data,t=e.request.url);var a=e.headers;n=jQuery.trim(n);var i=null;a&&(i=a["Content-Type"]||a["content-type"],i&&(i=i.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml");var s,r,o=function(e){var t=document.createElement("audio");return!(!t.canPlayType||!t.canPlayType(e).replace(/no/,""))};if(n)if("application/json"===i||/\+json$/.test(i)){var l=null;try{l=JSON.stringify(JSON.parse(n),null," ")}catch(u){l="can't parse JSON. Raw result:\n\n"+n}r=$("<code />").text(l),s=$('<pre class="json" />').append(r)}else if("application/xml"===i||/\+xml$/.test(i))r=$("<code />").text(this.formatXml(n)),s=$('<pre class="xml" />').append(r);else if("text/html"===i)r=$("<code />").html(_.escape(n)),s=$('<pre class="xml" />').append(r);else if(/text\/plain/.test(i))r=$("<code />").text(n),s=$('<pre class="plain" />').append(r);else if(/^image\//.test(i))s=$("<img>").attr("src",t);else if(/^audio\//.test(i)&&o(i))s=$("<audio controls>").append($("<source>").attr("src",t).attr("type",i));else if(a["Content-Disposition"]&&/attachment/.test(a["Content-Disposition"])||a["content-disposition"]&&/attachment/.test(a["content-disposition"])||a["Content-Description"]&&/File Transfer/.test(a["Content-Description"])||a["content-description"]&&/File Transfer/.test(a["content-description"]))if("Blob"in window){var p=i||"text/html",d=new Blob([n],{type:p}),h=document.createElement("a"),c=window.URL.createObjectURL(d),f=e.url.substr(e.url.lastIndexOf("/")+1),m=[p,f,c].join(":"),g=a["content-disposition"]||a["Content-Disposition"];if("undefined"!=typeof g){var v=/filename=([^;]*);?/.exec(g);null!==v&&v.length>1&&(m=v[1])}h.setAttribute("href",c),h.setAttribute("download",m),h.innerText="Download "+f,s=$("<div/>").append(h)}else s=$('<pre class="json" />').append("Download headers detected but your browser does not support downloading binary via XHR (Blob).");else a.location||a.Location?window.location=e.url:(r=$("<code />").text(n),s=$('<pre class="json" />').append(r));else r=$("<code />").text("no content"),s=$('<pre class="json" />').append(r);var y=s;$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(t),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(y),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null," ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide();var w=this.model.asCurl(this.map,{responseContentType:i});w=w.replace("!","!"),$("div.curl",$(this.el)).html("<pre>"+_.escape(w)+"</pre>");var b=this.options.swaggerOptions;if(b.showRequestHeaders){var x=$(".sandbox",$(this.el)),S=this.getInputMap(x),O=this.model.getHeaderParams(S);delete O["Content-Type"],$(".request_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(O,null," ")).replace(/\n/g,"<br>")+"</pre>")}var T=$(".response_body",$(this.el))[0];return b.highlightSizeThreshold&&"undefined"!=typeof e.data&&e.data.length>b.highlightSizeThreshold?T:hljs.highlightBlock(T)},toggleOperationContent:function(e){var t=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content"));t.is(":visible")?($.bbq.pushState("#/",2),e.preventDefault(),Docs.collapseOperation(t)):Docs.expandOperation(t)},getTextAreaValue:function(e){var t,n,a,i;if(null===e.value||0===jQuery.trim(e.value).length)return null;if(t=this.getParamByName(e.name),t&&t.type&&"array"===t.type.toLowerCase()){for(n=e.value.split("\n"),a=[],i=0;i<n.length;i++)null!==n[i]&&jQuery.trim(n[i]).length>0&&a.push(n[i]);return a.length>0?a:null}return e.value},showSnippet:function(){var e,t=this.$("[name=responseContentType]"),n=this.$(".operation-status .snippet_xml, .response-class .snippet_xml"),a=this.$(".operation-status .snippet_json, .response-class .snippet_json");t.length&&(e=t.val(),e.indexOf("xml")>-1?(n.show(),a.hide()):(a.show(),n.hide()))},getParamByName:function(e){var t;if(this.model.parameters)for(t=0;t<this.model.parameters.length;t++)if(this.model.parameters[t].name===e)return this.model.parameters[t];return null}}),SwaggerUi.Views.ParameterContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.parameterContentTypeId="pct"+Math.random(),$(this.el).html(Handlebars.templates.parameter_content_type(this.model)),this}}),SwaggerUi.Views.ParameterView=Backbone.View.extend({events:{"change [name=parameterContentType]":"toggleParameterSnippet"},initialize:function(){Handlebars.registerHelper("isArray",function(e,t){var n=e.type&&e.type.toLowerCase();return"array"===n||e.allowMultiple?t.fn(this):t.inverse(this)})},render:function(){var e,t,n=this.model.type||this.model.dataType,a=this.model.modelSignature.type,i=this.model.modelSignature.definitions,s=this.model.schema||{},r=this.model.consumes||[];if("undefined"==typeof n&&s.$ref){var o=s.$ref;n=0===o.indexOf("#/definitions/")?o.substring("#/definitions/".length):o}this.model.type=n,this.model.paramType=this.model["in"]||this.model.paramType,this.model.isBody="body"===this.model.paramType||"body"===this.model["in"],this.model.isFile=n&&"file"===n.toLowerCase(),"undefined"==typeof this.model["default"]&&(this.model["default"]=this.model.defaultValue),this.model.hasDefault="undefined"!=typeof this.model["default"],this.model.valueId="m"+this.model.name+Math.random(),this.model.allowableValues&&(this.model.isList=!0);var l=this.contains(r,"xml"),u=l?this.contains(r,"json"):!0;e=SwaggerUi.partials.signature.createParameterJSONSample(a,i);var p=this.template();$(this.el).html(p(this.model));var d={sampleJSON:u?e:!1,sampleXML:e&&l?SwaggerUi.partials.signature.createXMLSample("",s,i,!0):!1,isParam:!0,signature:SwaggerUi.partials.signature.getParameterModelSignature(a,i),defaultRendering:this.model.defaultRendering};e?(t=new SwaggerUi.Views.SignatureView({model:d,tagName:"div"}),$(".model-signature",$(this.el)).append(t.render().el)):$(".model-signature",$(this.el)).html(this.model.signature);var h=!1;if(this.options.swaggerOptions.jsonEditor&&this.model.isBody&&this.model.schema){var c=$(this.el);this.model.jsonEditor=new JSONEditor($(".editor_holder",c)[0],{schema:this.model.schema,startval:this.model["default"],ajax:!0,disable_properties:!0,disable_edit_json:!0,iconlib:"swagger"}),d.jsonEditor=this.model.jsonEditor,$(".body-textarea",c).hide(),$(".editor_holder",c).show(),$(".parameter-content-type",c).change(function(e){"application/xml"===e.target.value?($(".body-textarea",c).show(),$(".editor_holder",c).hide(),this.model.jsonEditor.disable()):($(".body-textarea",c).hide(),$(".editor_holder",c).show(),this.model.jsonEditor.enable())})}this.model.isBody&&(h=!0);var f={isParam:h};if(f.consumes=this.model.consumes,h){var m=new SwaggerUi.Views.ParameterContentTypeView({model:f});$(".parameter-content-type",$(this.el)).append(m.render().el),this.toggleParameterSnippet()}else{var g=new SwaggerUi.Views.ResponseContentTypeView({model:f});$(".response-content-type",$(this.el)).append(g.render().el),this.toggleResponseSnippet()}return this},contains:function(e,t){return e.filter(function(e){return e.indexOf(t)>-1?!0:void 0}).length},toggleParameterSnippet:function(){var e=this.$("[name=parameterContentType]").val();this.toggleSnippet(e)},toggleResponseSnippet:function(){var e=this.$("[name=responseContentType]");e.length&&this.toggleSnippet(e.val())},toggleSnippet:function(e){e=e||"",e.indexOf("xml")>-1?(this.$(".snippet_xml").show(),this.$(".snippet_json").hide()):(this.$(".snippet_json").show(),this.$(".snippet_xml").hide())},template:function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param}}),SwaggerUi.partials.signature=function(){function e(e){var t,i=e.name,s=e.definition,r=e.config,o=e.models,l=e.config.isParam,u=[],p=s.properties,d=s.additionalProperties,h=s.xml,c=w(h);return c&&u.push(c),p||d?(p=p||{},t=_.map(p,function(e,t){var n,i;return l&&e.readOnly?"":(n=e.xml||{},i=a(t,e,o,r),n.attribute?(u.push(i),""):i)}).join(""),d&&(t+="<!-- additional elements allowed -->"),v(i,t,u)):n()}function t(e){return"<!-- Infinite loop $ref:"+e+" -->"}function n(e){return e=e?": "+e:"","<!-- invalid XML"+e+" -->"}function a(a,i,o,l){var u,p,d=_.isObject(i)?i.$ref:null;l=l||{},l.modelsToIgnore=l.modelsToIgnore||[];var h=_.isString(d)?s(d,a,o,l):r(a,i,o,l);if(!h)return n();switch(h.type){case"array":u=b(h);break;case"object":u=e(h);break;case"loop":u=t(h.name);break;default:u=S(h)}return d&&(p=l.modelsToIgnore.indexOf(d),p>-1&&l.modelsToIgnore.splice(p,1)),u}function i(e,t,n,a,i){if(arguments.length<4)throw new Error;this.config=i||{},this.config.modelsToIgnore=this.config.modelsToIgnore||[],this.name=y(e,n.xml),this.definition=n,this.models=a,this.type=t}function s(e,t,n,a){var s=u(e),r=n[s]||{},o=r.definition&&r.definition.type?r.definition.type:"object";return t=t||r.name,a.modelsToIgnore.indexOf(e)>-1?(o="loop",t=s):a.modelsToIgnore.push(e),r.definition?new i(t,o,r.definition,n,a):null}function r(e,t,n,a){var s=t.type||"object";return t?new i(e,s,t,n,a):null}function o(e,t,n,i){var s='<?xml version="1.0"?>';return d(s+a(e,t,n,{isParam:i}))}var l=function(e){return _.isPlainObject(e.schema)&&(e=l(e.schema)),e},u=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},p=function(e){if(/^Inline Model \d+$/.test(e)&&this.inlineModels){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},d=function(e){var t,n,a,i,s,r,o,l,u,p,d,h,c;for(d=/(>)(<)(\/*)/g,c=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(d,"$1\n$2$3").replace(c,"$1\n").replace(t,"$1\n$2"),p=0,a="",l=e.split("\n"),i=0,r="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,s,o,l,u,p;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(s in u)p=u[s],p&&e.push(s);return e}()[0],l=void 0===l?"other":l,t=r+"->"+l,r=l,o="",i+=h[t],o=function(){var e,t,a;for(a=[],n=e=0,t=i;t>=0?t>e:e>t;n=t>=0?++e:--e)a.push(" ");return a}().join(""),"opening->closing"===t?a=a.substr(0,a.length-1)+e+"\n":a+=o+e+"\n"},s=0,o=l.length;o>s;s++)u=l[s],n(u);return a},h=function(e,t,n,a){function i(e,t,a){var i,s=t;return e.$ref?(s=e.title||u(e.$ref),i=n[u(e.$ref)]):_.isUndefined(t)&&(s=e.title||"Inline Model "+ ++m,i={definition:e}),a!==!0&&(c[s]=_.isUndefined(i)?{}:i.definition),s}function s(e){var t='<span class="propType">',n=e.type||"object";return e.$ref?t+=i(e,u(e.$ref)):"object"===n?t+=_.isUndefined(e.properties)?"object":i(e):"array"===n?(t+="Array[",_.isArray(e.items)?t+=_.map(e.items,i).join(","):_.isPlainObject(e.items)?t+=_.isUndefined(e.items.$ref)?_.isUndefined(e.items.type)||-1!==_.indexOf(["array","object"],e.items.type)?i(e.items):e.items.type:i(e.items,u(e.items.$ref)):(console.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+="</span>"}function r(e,t){var n="",a=e.type||"object",i="array"===a;switch(_.isUndefined(e.description)||(t+=': <span class="propDesc">'+e.description+"</span>"),e["enum"]&&(t+=' = <span class="propVals">[\''+e["enum"].join("', '")+"']</span>"),i&&(a=_.isPlainObject(e.items)&&!_.isUndefined(e.items.type)?e.items.type:"object"),_.isUndefined(e["default"])||(n+=h("Default",e["default"])),a){case"string":e.minLength&&(n+=h("Min. Length",e.minLength)),e.maxLength&&(n+=h("Max. Length",e.maxLength)),e.pattern&&(n+=h("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=h("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=h("Exclusive Min.","true")),e.maximum&&(n+=h("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=h("Exclusive Max.","true")),e.multipleOf&&(n+=h("Multiple Of",e.multipleOf))}if(i&&(e.minItems&&(n+=h("Min. Items",e.minItems)),e.maxItems&&(n+=h("Max. Items",e.maxItems)),e.uniqueItems&&(n+=h("Unique Items","true")),e.collectionFormat&&(n+=h("Coll. Format",e.collectionFormat))),_.isUndefined(e.items)&&_.isArray(e["enum"])){var s;s="number"===a||"integer"===a?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=h("Enum",s)}return n.length>0&&(t='<span class="propWrap">'+t+'<table class="optionsWrapper"><tr><th colspan="2">'+a+"</th></tr>"+n+"</table></span>"),t}function o(e,t){var o,h=e.type||"object",c="array"===e.type,m=p+t+" "+(c?"[":"{")+d;return t&&f.push(t),c?_.isArray(e.items)?m+="<div>"+_.map(e.items,function(e){var t=e.type||"object";return _.isUndefined(e.$ref)?_.indexOf(["array","object"],t)>-1?"object"===t&&_.isUndefined(e.properties)?"object":i(e):r(e,t):i(e,u(e.$ref))}).join(",</div><div>"):_.isPlainObject(e.items)?m+=_.isUndefined(e.items.$ref)?_.indexOf(["array","object"],e.items.type||"object")>-1?(_.isUndefined(e.items.type)||"object"===e.items.type)&&_.isUndefined(e.items.properties)?"<div>object</div>":"<div>"+i(e.items)+"</div>":"<div>"+r(e.items,e.items.type)+"</div>":"<div>"+i(e.items,u(e.items.$ref))+"</div>":(console.log("Array type's 'items' property is not an array or an object, cannot process"),m+="<div>object</div>"):e.$ref?m+="<div>"+i(e,t)+"</div>":"object"===h?(_.isPlainObject(e.properties)&&(o=_.map(e.properties,function(t,i){var o,p=_.indexOf(e.required,i)>=0,d=_.cloneDeep(t),h=p?"required":"",c='<span class="propName '+h+'">'+i+"</span> (";return d["default"]=a(d),d=l(d),_.isUndefined(d.$ref)||(o=n[u(d.$ref)],_.isUndefined(o)||-1!==_.indexOf([void 0,"array","object"],o.definition.type)||(d=l(o.definition))),c+=s(d),p||(c+=', <span class="propOptKey">optional</span>'),t.readOnly&&(c+=', <span class="propReadOnly">read only</span>'),c+=")","<div"+(t.readOnly?' class="readOnly"':"")+">"+r(d,c)}).join(",</div>")),o&&(m+=o+"</div>")):m+="<div>"+r(e,h)+"</div>",m+p+(c?"]":"}")+d}var p='<span class="strong">',d="</span>",h=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};if(_.isObject(arguments[0])&&(e=void 0,t=arguments[0],n=arguments[1],a=arguments[2]),n=n||{},t=l(t),_.isEmpty(t))return p+"Empty"+d;if("string"==typeof t.$ref&&(e=u(t.$ref),t=n[e],"undefined"==typeof t))return p+e+" is not defined!"+d;"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof a&&(a=function(e){return(e||{})["default"]});for(var c={},f=[],m=0,g=o(t,e);_.keys(c).length>0;)_.forEach(c,function(e,t){var n=_.indexOf(f,t)>-1;delete c[t],n||(f.push(t),g+="<br />"+o(e,t))});return g},c=function(e,t,n,a){e=l(e),"function"!=typeof a&&(a=function(e){return(e||{})["default"]}),n=n||{};var i,s,r=e.type||"object",o=e.format;return _.isUndefined(e.example)?_.isUndefined(e.items)&&_.isArray(e["enum"])&&(s=e["enum"][0]):s=e.example,_.isUndefined(s)&&(e.$ref?(i=t[u(e.$ref)],_.isUndefined(i)||(_.isUndefined(n[i.name])?(n[i.name]=i,s=c(i.definition,t,n,a),delete n[i.name]):s="array"===i.type?[]:{})):_.isUndefined(e["default"])?"string"===r?s="date-time"===o?(new Date).toISOString():"date"===o?(new Date).toISOString().split("T")[0]:"string":"integer"===r?s=0:"number"===r?s=0:"boolean"===r?s=!0:"object"===r?(s={},_.forEach(e.properties,function(e,i){var r=_.cloneDeep(e);r["default"]=a(e),s[i]=c(r,t,n,a)})):"array"===r&&(s=[],_.isArray(e.items)?_.forEach(e.items,function(e){s.push(c(e,t,n,a))}):_.isPlainObject(e.items)?s.push(c(e.items,t,n,a)):_.isUndefined(e.items)?s.push({}):console.log("Array type's 'items' property is not an array or an object, cannot process")):s=e["default"]),s},f=function(e,t){return t=t||{},t[e.name]=e,e.examples&&_.isPlainObject(e.examples)&&e.examples["application/json"]?(e.definition.example=e.examples["application/json"],_.isString(e.definition.example)&&(e.definition.example=jsyaml.safeLoad(e.definition.example))):e.definition.example||(e.definition.example=e.examples),c(e.definition,e.models,t,e.modelPropertyMacro)},m=function(e,t){var n,a;return e instanceof Array&&(a=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):p(e)?(e=p(e),n=!1):n=!0,n?a?"Array["+e+"]":e.toString():a?"Array["+h(e.name,e.definition,e.models,e.modelPropertyMacro)+"]":h(e.name,e.definition,e.models,e.modelPropertyMacro)},g=function(e,t){var n,a,i;if(t=t||{},n=e instanceof Array,i=n?e[0]:e,t[i]?a=f(t[i]):p(i)&&(a=f(p(i))),a){if(a=n?[a]:a,"string"==typeof a)return a;if(_.isObject(a)){var s=a;if(a instanceof Array&&a.length>0&&(s=a[0]),s.nodeName&&"Node"==typeof s){var r=(new XMLSerializer).serializeToString(s);return d(r)}return JSON.stringify(a,null,2)}return a}},v=function(e,t,a){var i,s;return a=a||[],s=a.map(function(e){return" "+e.name+'="'+e.value+'"'}).join(""),e?(i=["<",e,s,">",t,"</",e,">"],i.join("")):n("Node name is not provided")},y=function(e,t){var n=e||"";return t=t||{},t.name&&(n=t.name),t.prefix&&(n=t.prefix+":"+n),n},w=function(e){var t="",n="xmlns";return e=e||{},e.namespace?(t=e.namespace,e.prefix&&(n+=":"+e.prefix),{name:n,value:t}):t},b=function(e){var t,i=e.name,s=e.config,r=e.definition,o=e.models,l=r.items,u=r.xml||{},p=w(u),d=[];return l?(t=a(i,l,o,s),p&&d.push(p),u.wrapped&&(t=v(i,t,d)),t):n()},x=function(e){var t,n;switch(e=e||{},n=e.items||{},t=e.type||""){case"object":return"Object is not a primitive";case"array":return"Array["+(n.format||n.type)+"]";default:return e.format||t}},S=function(e){var t,a=e.name,i=e.definition,s={string:{date:new Date(1).toISOString().split("T")[0],"date-time":new Date(1).toISOString(),"default":"string"},integer:{"default":1},number:{"default":1.1},"boolean":{"default":!0}},r=i.type,o=i.format,l=i.xml||{},u=w(l),p=[];return _.keys(s).indexOf(r)<0?n():(t=_.isArray(i["enum"])?i["enum"][0]:i.example||s[r][o]||s[r]["default"],l.attribute?{name:a,value:t}:(u&&p.push(u),v(a,t,p)))};return{getModelSignature:h,createJSONSample:f,getParameterModelSignature:m,createParameterJSONSample:g,createSchemaXML:a,createXMLSample:o,getPrimitiveSignature:x}}(),SwaggerUi.Views.PopupView=Backbone.View.extend({events:{"click .api-popup-cancel":"cancelClick"},template:Handlebars.templates.popup,className:"api-popup-dialog",selectors:{content:".api-popup-content",main:"#swagger-ui-container"},initialize:function(){this.$el.html(this.template(this.model))},render:function(){return this.$(this.selectors.content).append(this.model.content),$(this.selectors.main).first().append(this.el),this.showPopup(),this},showPopup:function(){this.$el.show()},cancelClick:function(){this.remove()}}),SwaggerUi.Views.ResourceView=Backbone.View.extend({initialize:function(e){e=e||{},this.router=e.router,this.auths=e.auths,""===this.model.description&&(this.model.description=null),this.model.description&&(this.model.summary=this.model.description)},render:function(){var e={};$(this.el).html(Handlebars.templates.resource(this.model));for(var t=0;t<this.model.operationsArray.length;t++){for(var n=this.model.operationsArray[t],a=0,i=n.nickname;"undefined"!=typeof e[i];)i=i+"_"+a,a+=1;e[i]=n,n.nickname=i,n.parentId=this.model.id,n.definitions=this.model.definitions,this.addOperation(n)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},addOperation:function(e){e.number=this.number;var t=new SwaggerUi.Views.OperationView({model:e,router:this.router,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths});$(".endpoints",$(this.el)).append(t.render().el),this.number++},callDocs:function(e,t){t.preventDefault(),Docs[e](t.currentTarget.getAttribute("data-id"))}}),SwaggerUi.Views.ResponseContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.responseContentTypeId="rct"+Math.random(),$(this.el).html(Handlebars.templates.response_content_type(this.model)),this}}),SwaggerUi.Views.SignatureView=Backbone.View.extend({events:{"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet_json":"jsonSnippetMouseDown","mousedown .snippet_xml":"xmlSnippetMouseDown"},initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.signature(this.model)),"model"===this.model.defaultRendering?this.switchToDescription():this.switchToSnippet(),this},switchToDescription:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},switchToSnippet:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).show(),$(".description",$(this.el)).hide(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},snippetToTextArea:function(e){var t=$("textarea",$(this.el.parentNode.parentNode.parentNode));""!==$.trim(t.val())&&t.prop("placeholder")!==t.val()||(t.val(e),this.model.jsonEditor&&this.model.jsonEditor.isEnabled()&&this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)))},jsonSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleJSON))},xmlSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleXML))}}),SwaggerUi.Views.StatusCodeView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e,t,n=this.router.api.models[this.model.responseModel];return $(this.el).html(Handlebars.templates.status_code(this.model)),e=this.router.api.models.hasOwnProperty(this.model.responseModel)?{sampleJSON:JSON.stringify(SwaggerUi.partials.signature.createJSONSample(n),void 0,2),sampleXML:this.model.isXML?SwaggerUi.partials.signature.createXMLSample("",this.model.schema,this.router.api.models):!1,isParam:!1,signature:SwaggerUi.partials.signature.getModelSignature(this.model.responseModel,n,this.router.api.models),defaultRendering:this.model.defaultRendering}:{signature:SwaggerUi.partials.signature.getPrimitiveSignature(this.model.schema)},t=new SwaggerUi.Views.SignatureView({model:e,tagName:"div"}),$(".model-signature",this.$el).append(t.render().el),this}})}).call(this); |