pixelfed/public/js/account-import.js

28 lines
38 KiB
JavaScript
Raw Normal View History

2024-07-10 06:11:42 +00:00
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/account-import"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=script&lang=js":
/*!***********************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=script&lang=js ***!
\***********************************************************************************************************************************************************************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var s=n(/*! @zip.js/zip.js */"./node_modules/@zip.js/zip.js/index.js");function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=t[n];return s}function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return e};var t,e={},n=Object.prototype,s=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},l=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function p(t,e,n,s){var o=e&&e.prototype instanceof y?e:y,r=Object.create(o.prototype),a=new E(s||[]);return i(r,"_invoke",{value:k(t,n,a)}),r}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",v="executing",g="completed",b={};function y(){}function _(){}function w(){}var x={};u(x,l,(function(){return this}));var C=Object.getPrototypeOf,j=C&&C(C(R([])));j&&j!==n&&s.call(j,l)&&(x=j);var I=w.prototype=y.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(i,r,a,l){var c=f(t[i],t,r);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==o(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(u).then((function(t){d.value=t,a(d)}),(function(t){return n("throw",t,a,l)}))}l(c.arg)}var r;i(this,"_invoke",{value:function(t,s){function o(){return new e((function(e,o){n(t,s,e,o)}))}return r=r?r.then(o,o):o()}})}function k(e,n,s){var o=m;return function(i,r){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===i)throw r;return{value:t,done:!0}}for(s.method=i,s.arg=r;;){var a=s.delegate;if(a){var l=P(a,s);if(l){if(l===b)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(o===m)throw o=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);o=v;var c=f(e,n,s);if("normal"===c.type){if(o=s.done?g:h,c.arg===b)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(o=g,s.method="throw",s.arg=c.arg)}}}function P(e,n){var s=n.method,o=e.iterator[s];if(o===t)return n.delegate=null,"throw"===s&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==s&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var r=i.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.del
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{render:()=>s,staticRenderFns:()=>o});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"h-100 pf-import"},[t.loaded?[e("input",{ref:"zipInput",staticClass:"d-none",attrs:{type:"file",name:"file"},on:{change:t.zipInputChanged}}),t._v(" "),1===t.page?[t._m(0),t._v(" "),e("hr"),t._v(" "),t._m(1),t._v(" "),e("section",{staticClass:"mt-4"},[e("ul",{staticClass:"list-group"},[e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center",staticStyle:{gap:"1rem"}},[e("div",[e("p",{staticClass:"font-weight-bold mb-1"},[t._v("Import from Instagram")]),t._v(" "),t.showDisabledWarning?e("p",{staticClass:"small mb-0"},[t._v("This feature has been disabled by the administrators.")]):t.showNotAllowedWarning?e("p",{staticClass:"small mb-0"},[t._v("You have not been permitted to use this feature, or have reached the maximum limits. For more info, view the "),e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/kb/import"}},[t._v("Import Help Center")]),t._v(" page.")]):e("p",{staticClass:"small mb-0"},[t._v("Upload the JSON export from Instagram in .zip format."),e("br"),t._v("For more information click "),e("a",{attrs:{href:"/site/kb/import"}},[t._v("here")]),t._v(".")])]),t._v(" "),t.showDisabledWarning||t.showNotAllowedWarning?t._e():e("div",[1===t.step||t.invalidArchive?e("button",{staticClass:"font-weight-bold btn btn-primary rounded-pill px-4 btn-lg",attrs:{type:"button",disabled:t.showDisabledWarning},on:{click:function(e){return t.selectArchive()}}},[t._v("\n Import\n ")]):2===t.step?[e("div",{staticClass:"d-flex justify-content-center align-items-center flex-column"},[t.showUploadLoader?e("b-spinner",{attrs:{small:""}}):e("button",{staticClass:"font-weight-bold btn btn-outline-primary btn-sm btn-block",attrs:{type:"button"},on:{click:function(e){return t.reviewImports()}}},[t._v("Review Imports")]),t._v(" "),t.zipName?e("p",{staticClass:"small font-weight-bold mt-2 mb-0"},[t._v(t._s(t.zipName))]):t._e()],1)]:t._e()],2)])])]),t._v(" "),e("ul",{staticClass:"list-group mt-3"},[t.processingCount?e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(2),t._v(" "),e("div",[e("span",{staticClass:"btn btn-danger rounded-pill py-0 font-weight-bold",attrs:{disabled:""}},[t._v(t._s(t.processingCount))])])])]):t._e(),t._v(" "),t.finishedCount?e("li",{staticClass:"list-group-item d-flex justify-content-between flex-column",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(3),t._v(" "),e("div",[e("button",{staticClass:"font-weight-bold btn btn-primary btn-sm rounded-pill px-4 btn-block",attrs:{type:"button",disabled:!t.finishedCount},on:{click:function(e){return t.handleReviewPosts()}}},[t._v("\n Review "+t._s(t.finishedCount)+" Posts\n ")])])])]):t._e()])])]:2===t.page?[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[t._m(4),t._v(" "),e("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill px-4",class:{disabled:!t.selectedMedia||!t.selectedMedia.length},attrs:{disabled:!t.selectedMedia||!t.selectedMedia.length||t.importButtonLoading},on:{click:function(e){return t.handleImport()}}},[t.importButtonLoading?e("b-spinner",{attrs:{small:""}}):e("span",[t._v("Import")])],1)]),t._v(" "),e("hr"),t._v(" "),e("section",[e("div",{staticClass:"d-flex justify-content-between align-items-center mb-3"},[t.selectedMedia&&t.sele
/*!***********************************************!*\
!*** ./resources/assets/js/account-import.js ***!
\***********************************************/(t,e,n)=>{Vue.component("account-import",n(/*! ./../components/AccountImport.vue */"./resources/assets/components/AccountImport.vue").default)},"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true":
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var s=n(/*! ../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */"./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js"),o=n.n(s)()((function(t){return t[1]}));o.push([t.id,".pf-import .media-selector .selected[data-v-4a2e52dd] {\n border: 5px solid red;\n}",""]);const i=o},"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true":
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var s=n(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),o=n.n(s),i=n(/*! !!../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true */"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true"),r={insert:"head",singleton:!1};o()(i.default,r);const a=i.default.locals||{}},"./resources/assets/components/AccountImport.vue":
/*!*******************************************************!*\
!*** ./resources/assets/components/AccountImport.vue ***!
\*******************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var s=n(/*! ./AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true */"./resources/assets/components/AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true"),o=n(/*! ./AccountImport.vue?vue&type=script&lang=js */"./resources/assets/components/AccountImport.vue?vue&type=script&lang=js"),i={};for(const t in o)"default"!==t&&(i[t]=()=>o[t]);n.d(e,i);n(/*! ./AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true */"./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true");var r=(0,n(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(o.default,s.render,s.staticRenderFns,!1,null,"4a2e52dd",null);r.options.__file="resources/assets/components/AccountImport.vue";const a=r.exports},"./resources/assets/components/AccountImport.vue?vue&type=script&lang=js":
/*!*******************************************************************************!*\
!*** ./resources/assets/components/AccountImport.vue?vue&type=script&lang=js ***!
\*******************************************************************************/(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var s=n(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountImport.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=script&lang=js"),o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);const i=s.default},"./resources/assets/components/AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true":
/*!*************************************************************************************************!*\
!*** ./resources/assets/components/AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true ***!
\*************************************************************************************************/(t,e,n)=>{"use strict";n.r(e);var s=n(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=template&id=4a2e52dd&scoped=true"),o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o)},"./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true":
/*!****************************************************************************************************************!*\
!*** ./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true ***!
\****************************************************************************************************************/(t,e,n)=>{"use strict";n.r(e);var s=n(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true */"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/AccountImport.vue?vue&type=style&index=0&id=4a2e52dd&lang=scss&scoped=true"),o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o)}},t=>{t.O(0,["/js/vendor"],(()=>{return e="./resources/assets/js/account-import.js",t(t.s=e);var e}));t.O()}]);