request-templater
Version:
RequestTemplater is a class for generating HTTP request examples based on templates for different programming languages.
8 lines • 259 kB
JavaScript
/*!
* Request Templater v1.3.3
*
* Copyright (C) 2012-2024 Pavel Kuz`min (@s00d).
*
* Date: Sat, 01 Jun 2024 19:52:37 GMT
*/
var RequestTemplater=function(){"use strict";function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function n(e,n,t){return n&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function t(e,n,t){return(n=i(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){if(e!==n)throw new TypeError("Cannot instantiate an arrow function")}function a(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,i,s,o=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n);else for(;!(c=(r=i.call(t)).done)&&(o.push(r.value),o.length!==n);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw a}}return o}}(n,t)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var r={}.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(n,t):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof n?n:n+""}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l=function(e){return e&&e.Math===Math&&e},u=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof o&&o)||l("object"==typeof o&&o)||function(){return this}()||Function("return this")(),d={},p=function(e){try{return!!e()}catch(e){return!0}},h=!p((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!p((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),m=f,g=Function.prototype.call,b=m?g.bind(g):function(){return g.apply(g,arguments)},y={},v={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,E=_&&!v.call({1:2},1);y.f=E?function(e){var n=_(this,e);return!!n&&n.enumerable}:v;var S,w,k=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}},N=f,C=Function.prototype,T=C.call,O=N&&C.bind.bind(T,T),A=N?O:function(e){return function(){return T.apply(e,arguments)}},R=A,q=R({}.toString),x=R("".slice),D=function(e){return x(q(e),8,-1)},M=p,L=D,U=Object,$=A("".split),I=M((function(){return!U("z").propertyIsEnumerable(0)}))?function(e){return"String"===L(e)?$(e,""):U(e)}:U,j=function(e){return null==e},B=j,P=TypeError,H=function(e){if(B(e))throw new P("Can't call method on "+e);return e},F=I,z=H,K=function(e){return F(z(e))},G="object"==typeof document&&document.all,J=void 0===G&&void 0!==G?function(e){return"function"==typeof e||e===G}:function(e){return"function"==typeof e},W=J,Z=function(e){return"object"==typeof e?null!==e:W(e)},V=u,Q=J,X=function(e,n){return arguments.length<2?(t=V[e],Q(t)?t:void 0):V[e]&&V[e][n];var t},Y=A({}.isPrototypeOf),ee=u,ne="undefined"!=typeof navigator&&String(navigator.userAgent)||"",te=ee.process,re=ee.Deno,ae=te&&te.versions||re&&re.version,ie=ae&&ae.v8;ie&&(w=(S=ie.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!w&&ne&&(!(S=ne.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=ne.match(/Chrome\/(\d+)/))&&(w=+S[1]);var se=w,oe=se,ce=p,le=u.String,ue=!!Object.getOwnPropertySymbols&&!ce((function(){var e=Symbol("symbol detection");return!le(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oe&&oe<41})),de=ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,pe=X,he=J,fe=Y,me=Object,ge=de?function(e){return"symbol"==typeof e}:function(e){var n=pe("Symbol");return he(n)&&fe(n.prototype,me(e))},be=String,ye=J,ve=function(e){try{return be(e)}catch(e){return"Object"}},_e=TypeError,Ee=function(e){if(ye(e))return e;throw new _e(ve(e)+" is not a function")},Se=Ee,we=j,ke=function(e,n){var t=e[n];return we(t)?void 0:Se(t)},Ne=b,Ce=J,Te=Z,Oe=TypeError,Ae={exports:{}},Re=u,qe=Object.defineProperty,xe=function(e,n){try{qe(Re,e,{value:n,configurable:!0,writable:!0})}catch(t){Re[e]=n}return n},De=u,Me=xe,Le="__core-js_shared__",Ue=Ae.exports=De[Le]||Me(Le,{});(Ue.versions||(Ue.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var $e=Ae.exports,Ie=$e,je=function(e,n){return Ie[e]||(Ie[e]=n||{})},Be=H,Pe=Object,He=function(e){return Pe(Be(e))},Fe=He,ze=A({}.hasOwnProperty),Ke=Object.hasOwn||function(e,n){return ze(Fe(e),n)},Ge=A,Je=0,We=Math.random(),Ze=Ge(Number("1").toString),Ve=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ze(++Je+We,36)},Qe=je,Xe=Ke,Ye=Ve,en=ue,nn=de,tn=u.Symbol,rn=Qe("wks"),an=nn?tn.for||tn:tn&&tn.withoutSetter||Ye,sn=function(e){return Xe(rn,e)||(rn[e]=en&&Xe(tn,e)?tn[e]:an("Symbol."+e)),rn[e]},on=b,cn=Z,ln=ge,un=ke,dn=function(e,n){var t,r;if("string"===n&&Ce(t=e.toString)&&!Te(r=Ne(t,e)))return r;if(Ce(t=e.valueOf)&&!Te(r=Ne(t,e)))return r;if("string"!==n&&Ce(t=e.toString)&&!Te(r=Ne(t,e)))return r;throw new Oe("Can't convert object to primitive value")},pn=TypeError,hn=sn("toPrimitive"),fn=function(e,n){if(!cn(e)||ln(e))return e;var t,r=un(e,hn);if(r){if(void 0===n&&(n="default"),t=on(r,e,n),!cn(t)||ln(t))return t;throw new pn("Can't convert object to primitive value")}return void 0===n&&(n="number"),dn(e,n)},mn=fn,gn=ge,bn=function(e){var n=mn(e,"string");return gn(n)?n:n+""},yn=Z,vn=u.document,_n=yn(vn)&&yn(vn.createElement),En=function(e){return _n?vn.createElement(e):{}},Sn=En,wn=!h&&!p((function(){return 7!==Object.defineProperty(Sn("div"),"a",{get:function(){return 7}}).a})),kn=h,Nn=b,Cn=y,Tn=k,On=K,An=bn,Rn=Ke,qn=wn,xn=Object.getOwnPropertyDescriptor;d.f=kn?xn:function(e,n){if(e=On(e),n=An(n),qn)try{return xn(e,n)}catch(e){}if(Rn(e,n))return Tn(!Nn(Cn.f,e,n),e[n])};var Dn={},Mn=h&&p((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ln=Z,Un=String,$n=TypeError,In=function(e){if(Ln(e))return e;throw new $n(Un(e)+" is not an object")},jn=h,Bn=wn,Pn=Mn,Hn=In,Fn=bn,zn=TypeError,Kn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Jn="enumerable",Wn="configurable",Zn="writable";Dn.f=jn?Pn?function(e,n,t){if(Hn(e),n=Fn(n),Hn(t),"function"==typeof e&&"prototype"===n&&"value"in t&&Zn in t&&!t[Zn]){var r=Gn(e,n);r&&r[Zn]&&(e[n]=t.value,t={configurable:Wn in t?t[Wn]:r[Wn],enumerable:Jn in t?t[Jn]:r[Jn],writable:!1})}return Kn(e,n,t)}:Kn:function(e,n,t){if(Hn(e),n=Fn(n),Hn(t),Bn)try{return Kn(e,n,t)}catch(e){}if("get"in t||"set"in t)throw new zn("Accessors not supported");return"value"in t&&(e[n]=t.value),e};var Vn=Dn,Qn=k,Xn=h?function(e,n,t){return Vn.f(e,n,Qn(1,t))}:function(e,n,t){return e[n]=t,e},Yn={exports:{}},et=h,nt=Ke,tt=Function.prototype,rt=et&&Object.getOwnPropertyDescriptor,at=nt(tt,"name"),it={EXISTS:at,PROPER:at&&"something"===function(){}.name,CONFIGURABLE:at&&(!et||et&&rt(tt,"name").configurable)},st=J,ot=$e,ct=A(Function.toString);st(ot.inspectSource)||(ot.inspectSource=function(e){return ct(e)});var lt,ut,dt,pt=ot.inspectSource,ht=J,ft=u.WeakMap,mt=ht(ft)&&/native code/.test(String(ft)),gt=Ve,bt=je("keys"),yt=function(e){return bt[e]||(bt[e]=gt(e))},vt={},_t=mt,Et=u,St=Z,wt=Xn,kt=Ke,Nt=$e,Ct=yt,Tt=vt,Ot="Object already initialized",At=Et.TypeError,Rt=Et.WeakMap;if(_t||Nt.state){var qt=Nt.state||(Nt.state=new Rt);qt.get=qt.get,qt.has=qt.has,qt.set=qt.set,lt=function(e,n){if(qt.has(e))throw new At(Ot);return n.facade=e,qt.set(e,n),n},ut=function(e){return qt.get(e)||{}},dt=function(e){return qt.has(e)}}else{var xt=Ct("state");Tt[xt]=!0,lt=function(e,n){if(kt(e,xt))throw new At(Ot);return n.facade=e,wt(e,xt,n),n},ut=function(e){return kt(e,xt)?e[xt]:{}},dt=function(e){return kt(e,xt)}}var Dt={set:lt,get:ut,has:dt,enforce:function(e){return dt(e)?ut(e):lt(e,{})},getterFor:function(e){return function(n){var t;if(!St(n)||(t=ut(n)).type!==e)throw new At("Incompatible receiver, "+e+" required");return t}}},Mt=A,Lt=p,Ut=J,$t=Ke,It=h,jt=it.CONFIGURABLE,Bt=pt,Pt=Dt.enforce,Ht=Dt.get,Ft=String,zt=Object.defineProperty,Kt=Mt("".slice),Gt=Mt("".replace),Jt=Mt([].join),Wt=It&&!Lt((function(){return 8!==zt((function(){}),"length",{value:8}).length})),Zt=String(String).split("String"),Vt=Yn.exports=function(e,n,t){"Symbol("===Kt(Ft(n),0,7)&&(n="["+Gt(Ft(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(n="get "+n),t&&t.setter&&(n="set "+n),(!$t(e,"name")||jt&&e.name!==n)&&(It?zt(e,"name",{value:n,configurable:!0}):e.name=n),Wt&&t&&$t(t,"arity")&&e.length!==t.arity&&zt(e,"length",{value:t.arity});try{t&&$t(t,"constructor")&&t.constructor?It&&zt(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Pt(e);return $t(r,"source")||(r.source=Jt(Zt,"string"==typeof n?n:"")),e};Function.prototype.toString=Vt((function(){return Ut(this)&&Ht(this).source||Bt(this)}),"toString");var Qt=Yn.exports,Xt=J,Yt=Dn,er=Qt,nr=xe,tr=function(e,n,t,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:n;if(Xt(t)&&er(t,i,r),r.global)a?e[n]=t:nr(n,t);else{try{r.unsafe?e[n]&&(a=!0):delete e[n]}catch(e){}a?e[n]=t:Yt.f(e,n,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},rr={},ar=Math.ceil,ir=Math.floor,sr=Math.trunc||function(e){var n=+e;return(n>0?ir:ar)(n)},or=function(e){var n=+e;return n!=n||0===n?0:sr(n)},cr=or,lr=Math.max,ur=Math.min,dr=or,pr=Math.min,hr=function(e){var n=dr(e);return n>0?pr(n,9007199254740991):0},fr=hr,mr=function(e){return fr(e.length)},gr=K,br=function(e,n){var t=cr(e);return t<0?lr(t+n,0):ur(t,n)},yr=mr,vr=function(e){return function(n,t,r){var a=gr(n),i=yr(a);if(0===i)return!e&&-1;var s,o=br(r,i);if(e&&t!=t){for(;i>o;)if((s=a[o++])!=s)return!0}else for(;i>o;o++)if((e||o in a)&&a[o]===t)return e||o||0;return!e&&-1}},_r={includes:vr(!0),indexOf:vr(!1)},Er=Ke,Sr=K,wr=_r.indexOf,kr=vt,Nr=A([].push),Cr=function(e,n){var t,r=Sr(e),a=0,i=[];for(t in r)!Er(kr,t)&&Er(r,t)&&Nr(i,t);for(;n.length>a;)Er(r,t=n[a++])&&(~wr(i,t)||Nr(i,t));return i},Tr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Or=Cr,Ar=Tr.concat("length","prototype");rr.f=Object.getOwnPropertyNames||function(e){return Or(e,Ar)};var Rr={};Rr.f=Object.getOwnPropertySymbols;var qr=X,xr=rr,Dr=Rr,Mr=In,Lr=A([].concat),Ur=qr("Reflect","ownKeys")||function(e){var n=xr.f(Mr(e)),t=Dr.f;return t?Lr(n,t(e)):n},$r=Ke,Ir=Ur,jr=d,Br=Dn,Pr=p,Hr=J,Fr=/#|\.prototype\./,zr=function(e,n){var t=Gr[Kr(e)];return t===Wr||t!==Jr&&(Hr(n)?Pr(n):!!n)},Kr=zr.normalize=function(e){return String(e).replace(Fr,".").toLowerCase()},Gr=zr.data={},Jr=zr.NATIVE="N",Wr=zr.POLYFILL="P",Zr=zr,Vr=u,Qr=d.f,Xr=Xn,Yr=tr,ea=xe,na=function(e,n,t){for(var r=Ir(n),a=Br.f,i=jr.f,s=0;s<r.length;s++){var o=r[s];$r(e,o)||t&&$r(t,o)||a(e,o,i(n,o))}},ta=Zr,ra=function(e,n){var t,r,a,i,s,o=e.target,c=e.global,l=e.stat;if(t=c?Vr:l?Vr[o]||ea(o,{}):Vr[o]&&Vr[o].prototype)for(r in n){if(i=n[r],a=e.dontCallGetSet?(s=Qr(t,r))&&s.value:t[r],!ta(c?r:o+(l?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;na(i,a)}(e.sham||a&&a.sham)&&Xr(i,"sham",!0),Yr(t,r,i,e)}},aa=D,ia=Array.isArray||function(e){return"Array"===aa(e)},sa=TypeError,oa=h,ca=Dn,la=k,ua={};ua[sn("toStringTag")]="z";var da="[object z]"===String(ua),pa=da,ha=J,fa=D,ma=sn("toStringTag"),ga=Object,ba="Arguments"===fa(function(){return arguments}()),ya=pa?fa:function(e){var n,t,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,n){try{return e[n]}catch(e){}}(n=ga(e),ma))?t:ba?fa(n):"Object"===(r=fa(n))&&ha(n.callee)?"Arguments":r},va=A,_a=p,Ea=J,Sa=ya,wa=pt,ka=function(){},Na=X("Reflect","construct"),Ca=/^\s*(?:class|function)\b/,Ta=va(Ca.exec),Oa=!Ca.test(ka),Aa=function(e){if(!Ea(e))return!1;try{return Na(ka,[],e),!0}catch(e){return!1}},Ra=function(e){if(!Ea(e))return!1;switch(Sa(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Oa||!!Ta(Ca,wa(e))}catch(e){return!0}};Ra.sham=!0;var qa=!Na||_a((function(){var e;return Aa(Aa.call)||!Aa(Object)||!Aa((function(){e=!0}))||e}))?Ra:Aa,xa=ia,Da=qa,Ma=Z,La=sn("species"),Ua=Array,$a=function(e){var n;return xa(e)&&(n=e.constructor,(Da(n)&&(n===Ua||xa(n.prototype))||Ma(n)&&null===(n=n[La]))&&(n=void 0)),void 0===n?Ua:n},Ia=function(e,n){return new($a(e))(0===n?0:n)},ja=p,Ba=se,Pa=sn("species"),Ha=function(e){return Ba>=51||!ja((function(){var n=[];return(n.constructor={})[Pa]=function(){return{foo:1}},1!==n[e](Boolean).foo}))},Fa=ra,za=p,Ka=ia,Ga=Z,Ja=He,Wa=mr,Za=function(e){if(e>9007199254740991)throw sa("Maximum allowed index exceeded");return e},Va=function(e,n,t){oa?ca.f(e,n,la(0,t)):e[n]=t},Qa=Ia,Xa=Ha,Ya=se,ei=sn("isConcatSpreadable"),ni=Ya>=51||!za((function(){var e=[];return e[ei]=!1,e.concat()[0]!==e})),ti=function(e){if(!Ga(e))return!1;var n=e[ei];return void 0!==n?!!n:Ka(e)};Fa({target:"Array",proto:!0,arity:1,forced:!ni||!Xa("concat")},{concat:function(e){var n,t,r,a,i,s=Ja(this),o=Qa(s,0),c=0;for(n=-1,r=arguments.length;n<r;n++)if(ti(i=-1===n?s:arguments[n]))for(a=Wa(i),Za(c+a),t=0;t<a;t++,c++)t in i&&Va(o,c,i[t]);else Za(c+1),Va(o,c++,i);return o.length=c,o}});var ri=D,ai=A,ii=function(e){if("Function"===ri(e))return ai(e)},si=Ee,oi=f,ci=ii(ii.bind),li=function(e,n){return si(e),void 0===n?e:oi?ci(e,n):function(){return e.apply(n,arguments)}},ui=I,di=He,pi=mr,hi=Ia,fi=A([].push),mi=function(e){var n=1===e,t=2===e,r=3===e,a=4===e,i=6===e,s=7===e,o=5===e||i;return function(c,l,u,d){for(var p,h,f=di(c),m=ui(f),g=pi(m),b=li(l,u),y=0,v=d||hi,_=n?v(c,g):t||s?v(c,0):void 0;g>y;y++)if((o||y in m)&&(h=b(p=m[y],y,f),e))if(n)_[y]=h;else if(h)switch(e){case 3:return!0;case 5:return p;case 6:return y;case 2:fi(_,p)}else switch(e){case 4:return!1;case 7:fi(_,p)}return i?-1:r||a?a:_}},gi={forEach:mi(0),map:mi(1),filter:mi(2),some:mi(3),every:mi(4),find:mi(5),findIndex:mi(6),filterReject:mi(7)},bi=gi.filter;ra({target:"Array",proto:!0,forced:!Ha("filter")},{filter:function(e){return bi(this,e,arguments.length>1?arguments[1]:void 0)}});var yi=p,vi=function(e,n){var t=[][e];return!!t&&yi((function(){t.call(null,n||function(){return 1},1)}))},_i=gi.forEach,Ei=vi("forEach")?[].forEach:function(e){return _i(this,e,arguments.length>1?arguments[1]:void 0)};ra({target:"Array",proto:!0,forced:[].forEach!==Ei},{forEach:Ei}),ra({target:"Array",stat:!0},{isArray:ia});var Si=ra,wi=I,ki=K,Ni=vi,Ci=A([].join);Si({target:"Array",proto:!0,forced:wi!==Object||!Ni("join",",")},{join:function(e){return Ci(ki(this),void 0===e?",":e)}});var Ti=gi.map;ra({target:"Array",proto:!0,forced:!Ha("map")},{map:function(e){return Ti(this,e,arguments.length>1?arguments[1]:void 0)}});var Oi=Ee,Ai=He,Ri=I,qi=mr,xi=TypeError,Di="Reduce of empty array with no initial value",Mi=function(e){return function(n,t,r,a){var i=Ai(n),s=Ri(i),o=qi(i);if(Oi(t),0===o&&r<2)throw new xi(Di);var c=e?o-1:0,l=e?-1:1;if(r<2)for(;;){if(c in s){a=s[c],c+=l;break}if(c+=l,e?c<0:o<=c)throw new xi(Di)}for(;e?c>=0:o>c;c+=l)c in s&&(a=t(a,s[c],c,i));return a}},Li={left:Mi(!1),right:Mi(!0)},Ui="process"===D(u.process),$i=Li.left;ra({target:"Array",proto:!0,forced:!Ui&&se>79&&se<83||!vi("reduce")},{reduce:function(e){var n=arguments.length;return $i(this,e,n,n>1?arguments[1]:void 0)}});var Ii=He,ji=fn;ra({target:"Date",proto:!0,arity:1,forced:p((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var n=Ii(this),t=ji(n,"number");return"number"!=typeof t||isFinite(t)?n.toISOString():null}});var Bi=A([].slice),Pi=A,Hi=Ee,Fi=Z,zi=Ke,Ki=Bi,Gi=f,Ji=Function,Wi=Pi([].concat),Zi=Pi([].join),Vi={},Qi=Gi?Ji.bind:function(e){var n=Hi(this),t=n.prototype,r=Ki(arguments,1),a=function(){var t=Wi(r,Ki(arguments));return this instanceof a?function(e,n,t){if(!zi(Vi,n)){for(var r=[],a=0;a<n;a++)r[a]="a["+a+"]";Vi[n]=Ji("C,a","return new C("+Zi(r,",")+")")}return Vi[n](e,t)}(n,t.length,t):n.apply(e,t)};return Fi(t)&&(a.prototype=t),a},Xi=Qi;ra({target:"Function",proto:!0,forced:Function.bind!==Xi},{bind:Xi});var Yi=Qt,es=Dn,ns=h,ts=it.EXISTS,rs=A,as=function(e,n,t){return t.get&&Yi(t.get,n,{getter:!0}),t.set&&Yi(t.set,n,{setter:!0}),es.f(e,n,t)},is=Function.prototype,ss=rs(is.toString),os=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,cs=rs(os.exec);ns&&!ts&&as(is,"name",{configurable:!0,get:function(){try{return cs(os,ss(this))[1]}catch(e){return""}}});var ls=!p((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),us=Ke,ds=J,ps=He,hs=ls,fs=yt("IE_PROTO"),ms=Object,gs=ms.prototype,bs=hs?ms.getPrototypeOf:function(e){var n=ps(e);if(us(n,fs))return n[fs];var t=n.constructor;return ds(t)&&n instanceof t?t.prototype:n instanceof ms?gs:null},ys=Cr,vs=Tr,_s=Object.keys||function(e){return ys(e,vs)},Es=h,Ss=p,ws=A,ks=bs,Ns=_s,Cs=K,Ts=ws(y.f),Os=ws([].push),As=Es&&Ss((function(){var e=Object.create(null);return e[2]=2,!Ts(e,2)})),Rs=function(e){return function(n){for(var t,r=Cs(n),a=Ns(r),i=As&&null===ks(r),s=a.length,o=0,c=[];s>o;)t=a[o++],Es&&!(i?t in r:Ts(r,t))||Os(c,e?[t,r[t]]:r[t]);return c}},qs={entries:Rs(!0),values:Rs(!1)},xs=qs.entries;ra({target:"Object",stat:!0},{entries:function(e){return xs(e)}});var Ds=He,Ms=_s;ra({target:"Object",stat:!0,forced:p((function(){Ms(1)}))},{keys:function(e){return Ms(Ds(e))}});var Ls=ya,Us=da?{}.toString:function(){return"[object "+Ls(this)+"]"};da||tr(Object.prototype,"toString",Us,{unsafe:!0});var $s=ya,Is=String,js=function(e){if("Symbol"===$s(e))throw new TypeError("Cannot convert a Symbol value to a string");return Is(e)},Bs=In,Ps=function(){var e=Bs(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n},Hs=p,Fs=u.RegExp,zs=Hs((function(){var e=Fs("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Ks=zs||Hs((function(){return!Fs("a","y").sticky})),Gs={BROKEN_CARET:zs||Hs((function(){var e=Fs("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Ks,UNSUPPORTED_Y:zs},Js={},Ws=h,Zs=Mn,Vs=Dn,Qs=In,Xs=K,Ys=_s;Js.f=Ws&&!Zs?Object.defineProperties:function(e,n){Qs(e);for(var t,r=Xs(n),a=Ys(n),i=a.length,s=0;i>s;)Vs.f(e,t=a[s++],r[t]);return e};var eo,no=X("document","documentElement"),to=In,ro=Js,ao=Tr,io=vt,so=no,oo=En,co="prototype",lo="script",uo=yt("IE_PROTO"),po=function(){},ho=function(e){return"<"+lo+">"+e+"</"+lo+">"},fo=function(e){e.write(ho("")),e.close();var n=e.parentWindow.Object;return e=null,n},mo=function(){try{eo=new ActiveXObject("htmlfile")}catch(e){}var e,n,t;mo="undefined"!=typeof document?document.domain&&eo?fo(eo):(n=oo("iframe"),t="java"+lo+":",n.style.display="none",so.appendChild(n),n.src=String(t),(e=n.contentWindow.document).open(),e.write(ho("document.F=Object")),e.close(),e.F):fo(eo);for(var r=ao.length;r--;)delete mo[co][ao[r]];return mo()};io[uo]=!0;var go,bo,yo=Object.create||function(e,n){var t;return null!==e?(po[co]=to(e),t=new po,po[co]=null,t[uo]=e):t=mo(),void 0===n?t:ro.f(t,n)},vo=p,_o=u.RegExp,Eo=vo((function(){var e=_o(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),So=p,wo=u.RegExp,ko=So((function(){var e=wo("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),No=b,Co=A,To=js,Oo=Ps,Ao=Gs,Ro=yo,qo=Dt.get,xo=Eo,Do=ko,Mo=je("native-string-replace",String.prototype.replace),Lo=RegExp.prototype.exec,Uo=Lo,$o=Co("".charAt),Io=Co("".indexOf),jo=Co("".replace),Bo=Co("".slice),Po=(bo=/b*/g,No(Lo,go=/a/,"a"),No(Lo,bo,"a"),0!==go.lastIndex||0!==bo.lastIndex),Ho=Ao.BROKEN_CARET,Fo=void 0!==/()??/.exec("")[1];(Po||Fo||Ho||xo||Do)&&(Uo=function(e){var n,t,r,a,i,s,o,c=this,l=qo(c),u=To(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,n=No(Uo,d,u),c.lastIndex=d.lastIndex,n;var p=l.groups,h=Ho&&c.sticky,f=No(Oo,c),m=c.source,g=0,b=u;if(h&&(f=jo(f,"y",""),-1===Io(f,"g")&&(f+="g"),b=Bo(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==$o(u,c.lastIndex-1))&&(m="(?: "+m+")",b=" "+b,g++),t=new RegExp("^(?:"+m+")",f)),Fo&&(t=new RegExp("^"+m+"$(?!\\s)",f)),Po&&(r=c.lastIndex),a=No(Lo,h?t:c,b),h?a?(a.input=Bo(a.input,g),a[0]=Bo(a[0],g),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Po&&a&&(c.lastIndex=c.global?a.index+a[0].length:r),Fo&&a&&a.length>1&&No(Mo,a[0],t,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&p)for(a.groups=s=Ro(null),i=0;i<p.length;i++)s[(o=p[i])[0]]=a[o[1]];return a});var zo=Uo;ra({target:"RegExp",proto:!0,forced:/./.exec!==zo},{exec:zo});var Ko,Go=Z,Jo=D,Wo=sn("match"),Zo=function(e){var n;return Go(e)&&(void 0!==(n=e[Wo])?!!n:"RegExp"===Jo(e))},Vo=TypeError,Qo=function(e){if(Zo(e))throw new Vo("The method doesn't accept regular expressions");return e},Xo=sn("match"),Yo=function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[Xo]=!1,"/./"[e](n)}catch(e){}}return!1},ec=ra,nc=ii,tc=d.f,rc=hr,ac=js,ic=Qo,sc=H,oc=Yo,cc=nc("".slice),lc=Math.min,uc=oc("endsWith");ec({target:"String",proto:!0,forced:!!(uc||(Ko=tc(String.prototype,"endsWith"),!Ko||Ko.writable))&&!uc},{endsWith:function(e){var n=ac(sc(this));ic(e);var t=arguments.length>1?arguments[1]:void 0,r=n.length,a=void 0===t?r:lc(rc(t),r),i=ac(e);return cc(n,a-i.length,a)===i}});var dc=b,pc=tr,hc=zo,fc=p,mc=sn,gc=Xn,bc=mc("species"),yc=RegExp.prototype,vc=function(e,n,t,r){var a=mc(e),i=!fc((function(){var n={};return n[a]=function(){return 7},7!==""[e](n)})),s=i&&!fc((function(){var n=!1,t=/a/;return"split"===e&&((t={}).constructor={},t.constructor[bc]=function(){return t},t.flags="",t[a]=/./[a]),t.exec=function(){return n=!0,null},t[a](""),!n}));if(!i||!s||t){var o=/./[a],c=n(a,""[e],(function(e,n,t,r,a){var s=n.exec;return s===hc||s===yc.exec?i&&!a?{done:!0,value:dc(o,n,t,r)}:{done:!0,value:dc(e,t,n,r)}:{done:!1}}));pc(String.prototype,e,c[0]),pc(yc,a,c[1])}r&&gc(yc[a],"sham",!0)},_c=A,Ec=or,Sc=js,wc=H,kc=_c("".charAt),Nc=_c("".charCodeAt),Cc=_c("".slice),Tc=function(e){return function(n,t){var r,a,i=Sc(wc(n)),s=Ec(t),o=i.length;return s<0||s>=o?e?"":void 0:(r=Nc(i,s))<55296||r>56319||s+1===o||(a=Nc(i,s+1))<56320||a>57343?e?kc(i,s):r:e?Cc(i,s,s+2):a-56320+(r-55296<<10)+65536}},Oc={codeAt:Tc(!1),charAt:Tc(!0)}.charAt,Ac=function(e,n,t){return n+(t?Oc(e,n).length:1)},Rc=b,qc=In,xc=J,Dc=D,Mc=zo,Lc=TypeError,Uc=function(e,n){var t=e.exec;if(xc(t)){var r=Rc(t,e,n);return null!==r&&qc(r),r}if("RegExp"===Dc(e))return Rc(Mc,e,n);throw new Lc("RegExp#exec called on incompatible receiver")},$c=b,Ic=In,jc=j,Bc=hr,Pc=js,Hc=H,Fc=ke,zc=Ac,Kc=Uc;vc("match",(function(e,n,t){return[function(n){var t=Hc(this),r=jc(n)?void 0:Fc(n,e);return r?$c(r,n,t):new RegExp(n)[e](Pc(t))},function(e){var r=Ic(this),a=Pc(e),i=t(n,r,a);if(i.done)return i.value;if(!r.global)return Kc(r,a);var s=r.unicode;r.lastIndex=0;for(var o,c=[],l=0;null!==(o=Kc(r,a));){var u=Pc(o[0]);c[l]=u,""===u&&(r.lastIndex=zc(a,Bc(r.lastIndex),s)),l++}return 0===l?null:c}]}));var Gc=f,Jc=Function.prototype,Wc=Jc.apply,Zc=Jc.call,Vc="object"==typeof Reflect&&Reflect.apply||(Gc?Zc.bind(Wc):function(){return Zc.apply(Wc,arguments)}),Qc=A,Xc=He,Yc=Math.floor,el=Qc("".charAt),nl=Qc("".replace),tl=Qc("".slice),rl=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,al=/\$([$&'`]|\d{1,2})/g,il=Vc,sl=b,ol=A,cl=vc,ll=p,ul=In,dl=J,pl=j,hl=or,fl=hr,ml=js,gl=H,bl=Ac,yl=ke,vl=function(e,n,t,r,a,i){var s=t+e.length,o=r.length,c=al;return void 0!==a&&(a=Xc(a),c=rl),nl(i,c,(function(i,c){var l;switch(el(c,0)){case"$":return"$";case"&":return e;case"`":return tl(n,0,t);case"'":return tl(n,s);case"<":l=a[tl(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>o){var d=Yc(u/10);return 0===d?i:d<=o?void 0===r[d-1]?el(c,1):r[d-1]+el(c,1):i}l=r[u-1]}return void 0===l?"":l}))},_l=Uc,El=sn("replace"),Sl=Math.max,wl=Math.min,kl=ol([].concat),Nl=ol([].push),Cl=ol("".indexOf),Tl=ol("".slice),Ol="$0"==="a".replace(/./,"$0"),Al=!!/./[El]&&""===/./[El]("a","$0");cl("replace",(function(e,n,t){var r=Al?"$":"$0";return[function(e,t){var r=gl(this),a=pl(e)?void 0:yl(e,El);return a?sl(a,e,r,t):sl(n,ml(r),e,t)},function(e,a){var i=ul(this),s=ml(e);if("string"==typeof a&&-1===Cl(a,r)&&-1===Cl(a,"$<")){var o=t(n,i,s,a);if(o.done)return o.value}var c=dl(a);c||(a=ml(a));var l,u=i.global;u&&(l=i.unicode,i.lastIndex=0);for(var d,p=[];null!==(d=_l(i,s))&&(Nl(p,d),u);){""===ml(d[0])&&(i.lastIndex=bl(s,fl(i.lastIndex),l))}for(var h,f="",m=0,g=0;g<p.length;g++){for(var b,y=ml((d=p[g])[0]),v=Sl(wl(hl(d.index),s.length),0),_=[],E=1;E<d.length;E++)Nl(_,void 0===(h=d[E])?h:String(h));var S=d.groups;if(c){var w=kl([y],_,v,s);void 0!==S&&Nl(w,S),b=ml(il(a,void 0,w))}else b=vl(y,s,v,_,S,a);v>=m&&(f+=Tl(s,m,v)+b,m=v+y.length)}return f+Tl(s,m)}]}),!!ll((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ol||Al);var Rl=ra,ql=ii,xl=d.f,Dl=hr,Ml=js,Ll=Qo,Ul=H,$l=Yo,Il=ql("".slice),jl=Math.min,Bl=$l("startsWith"),Pl=!Bl&&!!function(){var e=xl(String.prototype,"startsWith");return e&&!e.writable}();Rl({target:"String",proto:!0,forced:!Pl&&!Bl},{startsWith:function(e){var n=Ml(Ul(this));Ll(e);var t=Dl(jl(arguments.length>1?arguments[1]:void 0,n.length)),r=Ml(e);return Il(n,t,t+r.length)===r}});var Hl=En("span").classList,Fl=Hl&&Hl.constructor&&Hl.constructor.prototype,zl=u,Kl={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Gl=Fl===Object.prototype?void 0:Fl,Jl=Ei,Wl=Xn,Zl=function(e){if(e&&e.forEach!==Jl)try{Wl(e,"forEach",Jl)}catch(n){e.forEach=Jl}};for(var Vl in Kl)Kl[Vl]&&Zl(zl[Vl]&&zl[Vl].prototype);Zl(Gl);var Ql=gi.some;ra({target:"Array",proto:!0,forced:!vi("some")},{some:function(e){return Ql(this,e,arguments.length>1?arguments[1]:void 0)}});var Xl=A,Yl=tr,eu=Date.prototype,nu="Invalid Date",tu="toString",ru=Xl(eu[tu]),au=Xl(eu.getTime);String(new Date(NaN))!==nu&&Yl(eu,tu,(function(){var e=au(this);return e==e?ru(this):nu}));var iu=qs.values;ra({target:"Object",stat:!0},{values:function(e){return iu(e)}});var su=b,ou=Ke,cu=Y,lu=Ps,uu=RegExp.prototype,du=it.PROPER,pu=tr,hu=In,fu=js,mu=p,gu=function(e){var n=e.flags;return void 0!==n||"flags"in uu||ou(e,"flags")||!cu(uu,e)?n:su(lu,e)},bu="toString",yu=RegExp.prototype,vu=yu[bu],_u=mu((function(){return"/a/b"!==vu.call({source:"a",flags:"b"})})),Eu=du&&vu.name!==bu;(_u||Eu)&&pu(yu,bu,(function(){var e=hu(this);return"/"+fu(e.source)+"/"+fu(gu(e))}),{unsafe:!0});var Su={"swift/urlsession":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\n// Create a new URLRequest object\nvar request = URLRequest(url: URL(string: "'),d(p),d('")!)\n\n// Set the request method\nrequest.httpMethod = "'),d(h),d('"\n\n// Set the request content type header\nrequest.addValue("'),d(f),d('", forHTTPHeaderField: "Content-Type")\n\n'),m.length>0&&(d("\n// Add headers to the request\n"),m.forEach(function(e){r(this,i),d('\nrequest.addValue("'),d(n(e.value)),d('", forHTTPHeaderField: "'),d(n(e.name)),d('")\n')}.bind(this))),d("\n\n"),b.length>0&&(d("\n// Add cookies to the request\n"),b.forEach(function(e){r(this,i),d('\nrequest.addValue("'),d(n(e.value)),d('", forHTTPHeaderField: "'),d(n(e.name)),d('")\n')}.bind(this))),d("\n\n"),"POST"===h&&g.length>0&&(d("// Set the request body\n"),1===g.length&&"file"===g[0].type?d('\nlet fileUrl = URL(fileURLWithPath: "/path/to/file")\nlet data = try Data(contentsOf: fileUrl)\nrequest.httpBody = data\n'):(d("\nlet postDataDict = "),d(n(JSON.stringify(g.reduce(function(e,n){return r(this,i),Array.isArray(n.value)||s(n.value),e[n.name]=n.value,e}.bind(this),{})))),d('\nlet postData = postDataDict.map { (key, value) -> String in\nlet encodedKey = key.addingPercentEncoding(withAllowedCharacters: .alphanumerics) ?? ""\nlet encodedValue = String(describing: value).addingPercentEncoding(withAllowedCharacters: .alphanumerics) ?? ""\nreturn "(encodedKey)=(encodedValue)"\n}.joined(separator: "&")\nlet postDataEncoded = postData.data(using: .utf8)\nrequest.httpBody = postDataEncoded\n'))),d('\n\n// Create a new URLSession object\nlet session = URLSession.shared\n\n// Send the request\nlet task = session.dataTask(with: request) { (data, response, error) in\nguard let data = data else { return }\nprint("Response:", String(data: data, encoding: .utf8)!)\n}\n\ntask.resume()\n'),u},"swift/alamofire":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method;e.mimeType;var f=e.headers,m=e.postData,g=e.cookies;return d('\n// Construct the request URL\nlet fullUrl = "'),d(p),d('"\n\n// Set up the request headers\nvar headers: HTTPHeaders = [:]\n'),f.forEach(function(e){r(this,i),d('\nheaders["'),d(n(e.name)),d('"] = "'),d(n(e.value)),d('"\n')}.bind(this)),d("\n\n"),g.length>0&&(d("\n// Add cookies to the request\n"),g.forEach(function(e){r(this,i),d('\nlet cookie = HTTPCookie(properties: [\n .domain: "'),d(n(e.domain)),d('",\n .path: "'),d(n(e.path)),d('",\n .name: "'),d(n(e.name)),d('",\n .value: "'),d(n(e.value)),d('",\n])!\nHTTPCookieStorage.shared.setCookie(cookie)\n')}.bind(this)),d("\n")),d("\n\n// Set up the request parameters\nvar parameters: Parameters = [:]\n"),m.forEach(function(e){r(this,i),d("\n"),Array.isArray(e.value)||"object"===s(e.value)?(d("\nif let jsonData = try? JSONSerialization.data(withJSONObject: "),d(n(JSON.stringify(e.value))),d(', options: []) {\n if let jsonString = String(data: jsonData, encoding: .utf8) {\n parameters["'),d(n(e.name)),d('"] = jsonString\n }\n}\n')):(d('\nparameters["'),d(n(e.name)),d('"] = "'),d(n(e.value)),d('"\n')),d("\n")}.bind(this)),d("\n\n// Create the request\nAF.request(fullUrl, method: ."),d(n(h.toLowerCase())),d(', parameters: parameters, headers: headers).response { response in\n switch response.result {\n case .success(let data):\n if let data = data {\n print("Response:", String(data: data, encoding: .utf8)!)\n }\n case .failure(let error):\n print("Error:", error.localizedDescription)\n }\n}\n'),u},"scala/scalaj-http":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nimport scalaj.http._\n\nval url = "'),d(n(p)),d('"\nval method = "'),d(n(h)),d('"\nval mimeType = "'),d(n(f)),d('"\nval headers = '),m.length>0?(d("Seq(\n"),m.forEach(function(e){r(this,i),d('\n ("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"),\n')}.bind(this)),d("\n)")):d("Nil"),d("\nval cookies = "),b.length>0?(d("Seq(\n"),b.forEach(function(e){r(this,i),d('\n HttpCookie("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"),\n')}.bind(this)),d("\n)")):d("Nil"),d("\nval postData = "),g.length>0?(d("Seq(\n"),g.forEach(function(e){r(this,i),d("\n"),Array.isArray(e.value)||"object"===s(e.value)?(d('\n ("'),d(n(e.name)),d('", "'),d(n(JSON.stringify(e.value))),d('"),\n')):(d('\n ("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"),\n')),d("\n")}.bind(this)),d("\n)")):d("Nil"),d("\n\n// Construct the request\nval request = Http(url).method(method)\n .headers(headers)\n .cookies(cookies)\n .timeout(connTimeoutMs = 10000, readTimeoutMs = 60000)\n .option(HttpOptions.followRedirects(true))\n\n// Add request body if needed\nif (postData.nonEmpty) {\n val entity = "),1===g.length&&"file"===g[0].type?(d("\n MultipartFormData(Seq(\n "),g.forEach(function(e){r(this,i),d('\n FileData("'),d(n(e.name)),d('", new java.io.File("'),d(n(e.value)),d('"))\n ')}.bind(this)),d("\n )).toEntity\n ")):d('\n HttpConstants.writePostData(postData).getBytes("UTF-8")\n '),d('\n request.postData(entity, mimeType)\n}\n\n// Send the request\nval response = request.asString\n\n// Handle the response\nif (response.isSuccess) {\n println("Response: " + response.body)\n} else {\n println("Error: " + response.code + " " + response.statusLine)\n}\n'),u},"scala/http4s":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nimport cats.effect._\nimport org.http4s._\nimport org.http4s.client.blaze._\nimport org.http4s.client.dsl.io._\nimport org.http4s.headers._\nimport org.http4s.MediaType._\n\nval url = "'),d(n(p)),d('"\nval method = "'),d(n(h)),d('"\nval mimeType = "'),d(n(f)),d('"\nval headers = '),m.length>0?(d("Headers(\n"),m.forEach(function(e){r(this,i),d('\n Header.apply("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"),\n')}.bind(this)),d("\n)")):d("Headers.empty"),d("\nval cookies = "),b.length>0?(d("Seq(\n"),b.forEach(function(e){r(this,i),d('\n RequestCookie("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"),\n')}.bind(this)),d("\n)")):d("Seq.empty"),d("\nval postData = "),g.length>0?(d("UrlForm(\n"),g.forEach(function(e){r(this,i),d("\n"),Array.isArray(e.value)||"object"===s(e.value)?(d('\n "'),d(n(e.name)),d('" -> "'),d(n(JSON.stringify(e.value))),d('",\n')):(d('\n "'),d(n(e.name)),d('" -> "'),d(n(e.value)),d('",\n')),d("\n")}.bind(this)),d("\n)")):d("UrlForm.empty"),d("\n\n// Construct the request\nimplicit val cs = IO.contextShift(ExecutionContext.global)\nval client = Http1Client[IO]().unsafeRunSync()\nval request = Method."),d(n(h.toUpperCase())),d('(Uri.unsafeFromString(url), postData)\n .withHeaders(headers)\n .withCredentials(Credentials(cookies))\n\n// Send the request\nval response = client.expect[String](request).unsafeRunSync()\n\n// Handle the response\nprintln("Response: " + response)\n\n// Clean up\nclient.shutdownNow()\n'),u},"scala/akka":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nimport akka.actor.ActorSystem\nimport akka.http.scaladsl.Http\nimport akka.http.scaladsl.model._\nimport akka.stream.ActorMaterializer\nimport akka.stream.scaladsl._\nimport scala.concurrent.Future\nimport scala.util.{Failure, Success}\n\nval url = "'),d(n(p)),d('"\nval method = "'),d(n(h)),d('"\nval mimeType = "'),d(n(f)),d('"\nval headers = List(\n'),m.forEach(function(e){r(this,i),d('\n HttpHeader.parse("'),d(n(e.name)),d('", "'),d(n(e.value)),d('").asInstanceOf[HttpHeader],\n')}.bind(this)),d("\n)\nval cookies = List(\n"),b.forEach(function(e){r(this,i),d('\n HttpCookiePair("'),d(n(e.name)),d('", "'),d(n(e.value)),d('").asInstanceOf[HttpCookiePair],\n')}.bind(this)),d("\n)\nval postData = List(\n"),g.forEach(function(e){r(this,i),d("\n "),Array.isArray(e.value)||"object"===s(e.value)?(d('\n FormData.BodyPart.Strict("'),d(n(e.name)),d('", HttpEntity(ContentTypes.application/json, "'),d(n(JSON.stringify(e.value))),d('")).asInstanceOf[FormData.BodyPart.Strict],\n ')):(d('\n FormData.BodyPart.Strict("'),d(n(e.name)),d('", "'),d(n(e.value)),d('").asInstanceOf[FormData.BodyPart.Strict],\n ')),d("\n")}.bind(this)),d("\n)\n\n// Construct the request\nimplicit val system = ActorSystem()\nimplicit val materializer = ActorMaterializer()\nimplicit val executionContext = system.dispatcher\n\nval request = HttpRequest(\n method = HttpMethods."),d(n(h.toUpperCase())),d(",\n uri = url,\n headers = headers,\n entity = "),g.length>0?d("FormData(postData).toEntity"):d("HttpEntity.Empty"),d('\n).addCredentials(cookies)\n\n// Send the request\nval responseFuture: Future[HttpResponse] = Http().singleRequest(request)\n\n// Handle the response\nresponseFuture.onComplete {\n case Success(response) =>\n response.entity.dataBytes.runWith(Sink.fold("")(_ + _.utf8String))\n .onComplete {\n case Success(responseBody) => println("Response: " + responseBody)\n case Failure(ex) => println("Failed to get response body: " + ex.getMessage)\n }\n case Failure(ex) => println("Error: " + ex.getMessage)\n}\n'),u},"rust/surf":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method;e.mimeType;var f=e.headers,m=e.postData,g=e.cookies;return d('\nuse surf::http::{Method, Url, headers::{Headers, HeaderValue}};\n\n// Construct the request URL\nlet url = Url::new("'),d(n(p)),d('").unwrap();\n\n// Set up the request\nlet mut req = surf::Request::new('),d(n(h)),d(" , url);\n\n"),f.length>0&&(d("\n// Add headers to the request\n"),f.forEach(function(e){r(this,i),d('\nreq.insert_header("'),d(n(e.name)),d('", HeaderValue::from_str("'),d(n(e.value)),d('").unwrap());\n')}.bind(this)),d("\n")),d("\n\n"),g.length>0&&(d("\n// Add cookies to the request\n"),g.forEach(function(e){r(this,i),d('\nreq.insert_cookie(surf::http::Cookie::new("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"));\n')}.bind(this)),d("\n")),d("\n\n"),m.length>0&&(d("\n// Send the request\nlet body = "),1===m.length&&"file"===m[0].type?(d("\nsurf::Body::from(surf::http::Form::from("),m[0].value,d("))\n")):(d('\nsurf::Body::from("'),d(n(m.map(function(e){return r(this,i),Array.isArray(e.value)||"object"===s(e.value)?e.name+"="+encodeURIComponent(JSON.stringify(e.value)):e.name+"="+encodeURIComponent(e.value)}.bind(this)).join("&"))),d('")\n')),d(";\nreq.set_body(body);\n")),d('\n\n// Send the request and handle the response\nlet res = async {\n let mut res = req.await?;\n let body = res.body_string().await?;\n println!("Response: {}", body);\n Ok(())\n}.await;\n\n// Handle errors\nif let Err(err) = res {\n eprintln!("Error: {}", err);\n}\n'),u},"rust/reqwest":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nlet url = "'),d(n(p)),d('";\nlet method = "'),d(n(h)),d('";\nlet mime_type = "'),d(n(f)),d('";\n\nlet headers = reqwest::header::HeaderMap::new();\n'),m.forEach(function(e){r(this,i),d('\nheaders.insert("'),d(n(e.name)),d('", "'),d(n(e.value)),d('".parse().unwrap());\n')}.bind(this)),d("\n\nlet mut cookies = reqwest::cookie::CookieJar::new();\n"),b.forEach(function(e){r(this,i),d('\ncookies.add(reqwest::cookie::Cookie::new("'),d(n(e.name)),d('", "'),d(n(e.value)),d('"));\n')}.bind(this)),d("\n\nlet mut request_builder = reqwest::Client::new().request(method, url);\nrequest_builder = request_builder.headers(headers);\nrequest_builder = request_builder.cookie_store(cookies);\n\n// Add post data to the request\n"),g.length>0&&(d("\n"),1===g.length&&"file"===g[0].type?(d('\nlet form_data = reqwest::multipart::Form::new()\n.file("'),d(n(g[0].name)),d('", "'),d(n(g[0].value)),d('").unwrap();\nlet request_builder = request_builder.multipart(form_data);\n')):(d('\nlet post_data = "'),d(n(g.map(function(e){return r(this,i),Array.isArray(e.value)||"object"===s(e.value)?e.name+"="+encodeURIComponent(JSON.stringify(e.value)):e.name+"="+encodeURIComponent(e.value)}.bind(this)).join("&"))),d('";\nlet request_builder = request_builder.body(post_data);\n')),d("\n")),d('\n\nlet response = request_builder.send().await.unwrap();\nlet response_text = response.text().await.unwrap();\nprintln!("Response: {}", response_text);\n'),u},"rust/hyper":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\n// Create a new Hyper client object\nlet client = hyper::Client::new();\n\n// Construct the request URL\nlet full_url = "'),d(n(p)),d('";\n\n// Create the request\nlet mut req = hyper::Request::new(hyper::Method::'),d(n(h)),d(", full_url);\n\n"),m.length>0&&(d("\n// Add headers to the request\n"),m.forEach(function(e){r(this,i),d("\nreq.headers_mut().insert(hyper::header::"),d(n(e.name)),d(", "),d(n(e.value)),d(".parse().unwrap());\n")}.bind(this)),d("\n")),d("\n\n"),b.length>0&&(d("\n// Add cookies to the request\n"),b.forEach(function(e){r(this,i),d('\nreq.headers_mut().insert(hyper::header::COOKIE, format!("'),d(n(e.name)),d("={"),d(n(e.value)),d('}; "));\n')}.bind(this)),d("\n")),d("\n\n"),g.length>0&&(d("\n // Add the request body\n"),1===g.length&&"file"===g[0].type?(d('\nlet form = multipart::Form::new()\n.file("'),d(n(g[0].name)),d('", "'),d(n(g[0].value)),d('")\n.unwrap();\nlet mut body = hyper::Body::from(form.stream());\n')):(d('\nlet body = hyper::Body::from("'),d(n(g.map(function(e){return r(this,i),Array.isArray(e.value)||"object"===s(e.value)?e.name+"="+encodeURIComponent(JSON.stringify(e.value)):e.name+"="+encodeURIComponent(e.value)}.bind(this)).join("&"))),d('");\n')),d('\nreq.headers_mut().insert(hyper::header::CONTENT_TYPE, "'),d(n(f)),d('".parse().unwrap());\nreq.headers_mut().insert(hyper::header::CONTENT_LENGTH, body.len().into());\nreq.set_body(body);\n')),d('\n\n// Send the request and get the response\nlet res = client.request(req).await?;\n\n// Print the response\nprintln!("Response: \\n{:?}", res);\n'),u},"ruby/restclient":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d("\nrequire 'rest-client'\n\nurl = \""),d(n(p)),d('"\nmethod = "'),d(n(h)),d('"\nmimeType = "'),d(n(f)),d('"\n\nheaders = {\n '),m.forEach(function(e){r(this,i),d('\n "'),d(n(e.name)),d('" => "'),d(n(e.value)),d('",\n ')}.bind(this)),d("\n}\n\ncookies = {\n "),b.forEach(function(e){r(this,i),d('\n "'),d(n(e.name)),d('" => "'),d(n(e.value)),d('",\n ')}.bind(this)),d("\n}\n\n"),"GET"===h?d("\n response = RestClient.get(url, headers: headers, cookies: cookies)\n"):(d('\n body = "'),d(n(g.map(function(e){return r(this,i),Array.isArray(e.value)||"object"===s(e.value)?e.name+"="+encodeURIComponent(JSON.stringify(e.value)):e.name+"="+encodeURIComponent(e.value)}.bind(this)).join("&"))),d('"\n response = RestClient::'),d(n(h.downcase)),d("(url, body, headers: headers, cookies: cookies, content_type: mimeType)\n")),d('\n\nputs "Response: #{response.body}"\n'),u},"ruby/http":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d("\nrequire 'net/http'\nrequire 'uri'\n\nurl = URI(\""),d(n(p)),d('")\nmethod = "'),d(n(h)),d('"\nmimeType = "'),d(n(f)),d('"\n\n'),"GET"===h?d("\n req = Net::HTTP::Get.new(url)\n"):(d('\n body = "'),d(n(g.map(function(e){return r(this,i),Array.isArray(e.value)||"object"===s(e.value)?e.name+"="+encodeURIComponent(JSON.stringify(e.value)):e.name+"="+encodeURIComponent(e.value)}.bind(this)).join("&"))),d('"\n req = Net::HTTP::'),d(n(h.capitalize)),d(".new(url)\n req.body = body\n req.content_type = mimeType\n")),d("\n\n"),m.forEach(function(e){r(this,i),d("\n req['"),d(n(e.name)),d("'] = '"),d(n(e.value)),d("'\n")}.bind(this)),d("\n\n"),b.forEach(function(e){r(this,i),d("\n req['Cookie'] = '"),d(n(e.name)),d("="),d(n(e.value)),d("'\n")}.bind(this)),d("\n\nres = Net::HTTP.start(url.hostname, url.port, use_ssl: url.scheme == 'https') do |http|\n http.request(req)\nend\n\nputs \"Response: #{res.body}\"\n"),u},"python/requests":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nimport requests\n\n# Extract parameters from the options object\nfullUrl = "'),d(n(p)),d('"\nmethod = "'),d(n(h)),d('"\nmimeType = "'),d(n(f)),d('"\nheaders = {\n '),m.forEach(function(e){r(this,i),d("\n '"),d(n(e.name)),d("': '"),d(n(e.value)),d("',\n ")}.bind(this)),d("\n}\npostData = {\n"),g.forEach(function(e){r(this,i),d("\n'"),d(n(e.name)),d("': "),Array.isArray(e.value)||"object"===s(e.value)?(d("\n '"),d(n(JSON.stringify(e.value))),d("',\n")):(d("\n '"),d(n(e.value)),d("',\n")),d("\n")}.bind(this)),d("\n}\ncookies = {\n "),b.forEach(function(e){r(this,i),d("\n '"),d(n(e.name)),d("': '"),d(n(e.value)),d("',\n ")}.bind(this)),d('\n}\n\n# Set up the request\nreq = requests.Request(method, fullUrl, headers=headers, cookies=cookies)\n\n# Add data to the request\nif postData:\n req.data = postData\n\n# Construct the prepared request\nprepared_req = req.prepare()\n\n# Send the request and get the response\nsession = requests.Session()\nresponse = session.send(prepared_req)\n\n# Handle the response\nprint(f"{response.status_code} {response.reason}")\nprint(response.text)\n\n# Handle errors\nif response.status_code >= 400:\n print("Error:", response.status_code, response.reason)\n'),u},"python/http":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}var p=e.url,h=e.method,f=e.mimeType,m=e.headers,g=e.postData,b=e.cookies;return d('\nimport http.client\n\n# Extract parameters from the options object\nfullUrl = "'),d(n(p)),d('"\nmethod = "'),d(n(h)),d('"\nmimeType = "'),d(n(f)),d('"\nheaders = [\n '),m.forEach(function(e){r(this,i),d("\n ('"),d(n(e.name)),d("', '"),d(n(e.value)),d("'),\n ")}.bind(this)),d("\n]\npostData = {\n"),g.forEach(function(e){r(this,i),d("\n'"),d(n(e.name)),d("': "),Array.isArray(e.value)||"object"===s(e.value)?(d("\n '"),d(n(JSON.stringify(e.value))),d("',\n")):(d("\n '"),d(n(e.value)),d("',\n")),d("\n")}.bind(this)),d("\n}\ncookies = {\n "),b.forEach(function(e){r(this,i),d("\n '"),d(n(e.name)),d("': '"),d(n(e.value)),d("',\n ")}.bind(this)),d("\n}\n\n# Set up the request\nconn = http.client.HTTPSConnection(fullUrl)\n\n# Add headers to the request\nfor header in headers:\n conn.request(method, url, headers=header)\n\n# Add cookies to the request\ncookie_str = '; '.join([f\"{name}={value}\" for name, value in cookies.items()])\n conn.request(method, url, headers={'Cookie': cookie_str})\n\n# Send the request\nif postData:\n postData_str = '&'.join([f\"{name}={value}\" for name, value in postData.items()])\n conn.request(method, url, body=postData_str, headers={'Content-Type': mimeType})\nelse:\n conn.request(method, url)\n\n# Handle the response\nres = conn.getresponse()\nprint(res.status, res.reason)\ndata = res.read()\nprint(data.decode(\"utf-8\"))\n\n# Handle errors\nif res.status >= 400:\n print(\"Error:\", res.status, res.reason)\n"),u},"powershell/webrequest":function(e,n,t,a){var i=this;n=n||function(e){return null==e?"":String(e).replace(c,l)};var o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=/[&<>'"]/g;function l(e){return o[e]||e}var u="";function d(e){null!=e&&(u+=e)}return d('$url = "'),d(n(url)),d('"\n$method = "'),d(n(method)),d('"\n$mimeType = "'),d(n(mimeType)),d('"\n\n$headers = @{\n'),headers.forEach(function(e){r(this,i),d('\n "'),d(n(e.name)),d('" = "'),d(n(e.value)),d('",\n')}.bind(this)),d("\n}\n\n$cookies = @{\n"),cookies.forEach(function(e){r(this,i),d('\n "'),d(n(e.name)),d('" = "'),d(n(e.value)),d('",\n')}.bind(this)