import './d91e4e4a.js';

var n=function(){return (n=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function t(n,t,e,r){return new(e||(e=Promise))(function(o,i){function a(n){try{u(r.next(n));}catch(n){i(n);}}function c(n){try{u(r.throw(n));}catch(n){i(n);}}function u(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e(function(n){n(t);})).then(a,c);}u((r=r.apply(n,t||[])).next());})}function e(n,t){var e,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(n,a);}catch(n){i=[6,n],r=0;}finally{e=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var r,o=window.location.origin,i=""+(o.indexOf("localhost")>-1?"https://www.xunlianying.vip":o);function a(t,e,r){var o={authorization:""+localStorage.getItem("AUTH")},a={authorization:""+localStorage.getItem("AUTH"),"content-type":"application/json"},c={method:"POST",body:!0!==(null==r?void 0:r.isFormData)?JSON.stringify(e):e,headers:!0!==(null==r?void 0:r.isFormData)?n(n({},o),a):o};return fetch(""+i+t,c).then(function(n){return n.json()}).catch(function(n){return n}).then(function(n){var t=n;if("4001"===String(t.code))null!=(null==r?void 0:r.callback)?r.callback():window.location.replace("/web/plume/login");else if("2001"!==t.code)throw new Error(t.msg);return n})}!function(n){n.OPEN="OPEN",n.SELECT="SELECT",n.CHECK="CHECK";}(r||(r={}));var u=function(r){return t(void 0,void 0,void 0,function(){return e(this,function(t){return [2,a("/comment/v1/50/practice/update",n(n({},r),{tags:[]}))]})})};

export { r, u };
//# sourceMappingURL=18a657cf.js.map
