(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' '+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))+"\n"},3:function(e,t,n,a){return' \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='
\n

Api key authorization

\n
'+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
\n
\n name:\n '+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))+'\n
\n
\n in:\n '+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))+'\n
\n
\n value:\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+"
\n
\n
\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=' \n"},6:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return'
  • '+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))+"
  • \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var 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+"
    \n"},useData:!0}),this.Handlebars.templates.auth_button=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){return"Authorize\n"},useData:!0}),this.Handlebars.templates.auth_view=Handlebars.template({1:function(e,t,n,a){return' \n'},3:function(e,t,n,a){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var i,s='
    \n\n
    \n
    \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+"
    \n\n
    \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' '+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))+"\n"},5:function(e,t,n,a){return' \n'},7:function(e,t,n,a){return'
    \n password:\n \n
    \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="
    \n

    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+='

    \n
    \n
    '+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
    \n username:\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+="
    \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+"
    \n
    \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' \n"},4:function(e,t,n,a){return' \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='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),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(;++s1&&(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=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;uh;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=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=-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=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<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;e1&&o.index=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>/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="";else{var l="parameter";e.required&&(l+=" required"),t=""}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='
    '+r(s(null!=(i=null!=e?e.info:e)?i.title:i,e))+'
    \n
    ';return i=s(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(o+=i),o+="
    \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"

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

    \n '+r(s(null!=(i=null!=e?e.externalDocs:e)?i.url:i,e))+"\n"},4:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return''},6:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return"
    Created by
    "+r(s(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.name:i,e))+"
    "},8:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return""},10:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return''},12:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return""},14:function(e,t,n,a){var i,s=this.lambda,r=this.escapeExpression;return' , api version: '+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' \n \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="
    \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+="
    \n
    \n
    \n\n
      \n\n
      \n

      [ base url: "+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+"

      \n
      \n
      \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='
    • \n \n
      \n '+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+" \n
    • \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='
      \n

      Select OAuth2.0 Scopes

      \n

      '+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

      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 Learn how to use\n

      \n

      '+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))+" API requires the following scopes. Select which ones you want to grant to Swagger UI.

      \n

      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))+"

      \n

      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))+'

      \n
        \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+"
      \n
      "},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,a){return"deprecated"},3:function(e,t,n,a){return"

      Warning: Deprecated

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

      Implementation Notes

      \n
      ';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+"
      \n"},7:function(e,t,n,a){return"
      \n"},9:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='
      \n

      Response Class (Status '+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))+")

      \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

      \n
      \n
      \n
      \n'},10:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l='
      ';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+"
      "},12:function(e,t,n,a){var i,s='

      Headers

      \n \n \n \n \n \n \n \n \n \n \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+" \n
      HeaderDescriptionTypeOther
      \n"},13:function(e,t,n,a){var i=this.lambda,s=this.escapeExpression;return" \n "+s(i(a&&a.key,e))+"\n "+s(i(null!=e?e.description:e,e))+"\n "+s(i(null!=e?e.type:e,e))+"\n "+s(i(null!=e?e.other:e,e))+"\n \n"},15:function(e,t,n,a){return'

      Parameters

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

      Response Messages

      \n \n \n \n \n \n \n \n \n \n \n \n
      HTTP Status CodeReasonResponse ModelHeaders
      \n"},19:function(e,t,n,a){return""},21:function(e,t,n,a){return"
      \n \n \n \n
      \n"},23:function(e,t,n,a){return"

      Request Headers

      \n
      \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=" \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=" \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 \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""},17: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="\n\n \n\n',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+="\n",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+'\n\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" \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="\n\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+='\n',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+="\n",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+'\n\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" \n
      \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="\n\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+='\n',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+="\n",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+'\n\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' \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"
      \n \n
      \n
      \n'},7:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" \n
      \n
      \n
      \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" \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="\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\n ',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+="\n\n",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+'\n\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' \n
      \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"
      \n \n
      \n
      \n'},7:function(e,t,n,a){var i,s="function",r=t.helperMissing,o=this.escapeExpression;return" \n
      \n
      \n
      \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="\n\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\n', 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+="\n",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+'\n\n \n\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' \n"},4:function(e,t,n,a){return' \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='\n\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'
      \n
      '+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))+'
      \n
      \n

      \n
      \n \n
      \n
      \n
      '},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"
    • \n Raw\n
    • \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="
      \n

      \n '+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))+" ";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

      \n \n
      \n\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' \n"},4:function(e,t,n,a){return' \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='\n\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
      \n\n
      \n\n
      \n
      \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
      \n\n
      \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+"
      \n
      \n"},2:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='
      \n
      '+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))+"
      \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
      \n"},3:function(e,t,n,a){return''},5:function(e,t,n,a){var i,s,r="function",o=t.helperMissing,l=this.escapeExpression,u='
      \n
      '+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))+"
      \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
      \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" \n "+s(i(a&&a.key,e))+"\n "+s(i(null!=e?e.description:e,e))+"\n "+s(i(null!=e?e.type:e,e))+"\n \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=""+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))+'\n';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+='\n\n\n \n \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+" \n
      \n"},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('
      '),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=$("
      "),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=$("
      "),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;n0&&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"),$(".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,"
      ");$(".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=$("").text(l),s=$('
      ').append(r)}else if("application/xml"===i||/\+xml$/.test(i))r=$("").text(this.formatXml(n)),s=$('
      ').append(r);else if("text/html"===i)r=$("").html(_.escape(n)),s=$('
      ').append(r);else if(/text\/plain/.test(i))r=$("").text(n),s=$('
      ').append(r);else if(/^image\//.test(i))s=$("").attr("src",t);else if(/^audio\//.test(i)&&o(i))s=$("