diff --git a/extensions/lock/js/dist/admin.js b/extensions/lock/js/dist/admin.js index 18c06e1766..6b9d95884d 100644 --- a/extensions/lock/js/dist/admin.js +++ b/extensions/lock/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var a in r)e.o(r,a)&&!e.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:r[a]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o);const r=flarum.reg.get("core","admin/app");var a=e.n(r);a().initializers.add("lock",(()=>{a().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:a().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=o})(); +(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>l});const o=flarum.reg.get("core","admin/app");var t=e.n(o);const n=flarum.reg.get("core","common/extenders");var a=e.n(n);class s{pattern(){return"is:locked"}toFilter(e,r){return{[(r?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(e,r){return"".concat(r?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",s);const l=[(new(a().Search)).gambit("discussions",s)];t().initializers.add("lock",(()=>{t().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:t().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/admin.js.map b/extensions/lock/js/dist/admin.js.map index 6a55fa6c2c..c7ffb78c43 100644 --- a/extensions/lock/js/dist/admin.js.map +++ b/extensions/lock/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeW,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFN,OAAOC,IAAIS,IAAI,cAAe,wCAAyCR,GCfvE,UAAgB,IAAI,aACnBS,OAAO,cAAeT,ICDvB,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeU,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js b/extensions/lock/js/dist/forum.js index 6ab51df546..92910ecaf4 100644 --- a/extensions/lock/js/dist/forum.js +++ b/extensions/lock/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},d:(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>P});const e=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var u=o.n(i);const l=flarum.reg.get("core","common/components/Badge");var d=o.n(l);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var _=o.n(b);const v=flarum.reg.get("core","common/extenders");var y=o.n(v);const x=flarum.reg.get("core","forum/components/EventPost");var L=o.n(x);class h extends(L()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",h);const P=[(new(y().PostTypes)).add("discussionLocked",h),new(y().Model)(u()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,e.extend)(u().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,e.extend)(k(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(_(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(t.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,e.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); +(()=>{var o={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},d:(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>S});const e=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var l=o.n(i);const u=flarum.reg.get("core","common/components/Badge");var d=o.n(u);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var _=o.n(b);const y=flarum.reg.get("core","common/extenders");var v=o.n(y);const L=flarum.reg.get("core","forum/components/EventPost");var h=o.n(L);class x extends(h()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",x);class P{pattern(){return"is:locked"}toFilter(o,t){return{[(t?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(o,t){return"".concat(t?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",P);const S=[(new(v().Search)).gambit("discussions",P),(new(v().PostTypes)).add("discussionLocked",x),new(v().Model)(l()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,e.extend)(l().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,e.extend)(k(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(_(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(t.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,e.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js.map b/extensions/lock/js/dist/forum.js.map index 5c89086238..1f68c6c562 100644 --- a/extensions/lock/js/dist/forum.js.map +++ b/extensions/lock/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iC,aCE7C,MAAMW,UAAqC,KACxDC,OACE,MAAO,aACT,CACAC,OACE,MAAMC,EAAeC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AWC,KAAKJ,IAC7B,qBAAqB,yCAAyCK,OAAOL,EAAWL,WAAa,SAAW,OAAQ,aAEvH,IACA,eAAgC,WAC9BhB,KAAK2B,KAAK,CACRX,UAAWhB,KAAKgB,aACfY,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BZ,EAAEa,QAAQ,GAEd,GFbA,IAAAhB,QAAO,2CAA4C,qBAAqB,SAAUM,GAChFA,EAAMZ,IAAI,mBAAoB,CAC5BuB,KAAM,mBACNlC,KAAM,cACNsB,MAAO,qBAAqB,8DAEhC,GAAE,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nexport default [new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","concat","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECN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CAAyCC,GCTxD,MAAMI,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAW1B,EAAOwB,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFvB,OAAOC,IAAIa,IAAI,cAAe,wCAAyCK,GCfvE,MCEA,IDFgB,IAAI,aACnBQ,OAAO,cAAeR,ICCU,IAAI,gBACpCL,IAAI,mBAAoBC,GAAuB,IAAI,WAAa,KAChEa,UAAU,YAAYA,UAAU,YCAjC,qBAAqB,eAAe,KAClC,4CAA8C1B,GCF9C,IAAA2B,QAAO,cAAsB,UAAU,SAAUC,GAC3CxB,KAAKyB,YACPD,EAAOhB,IAAI,SAAUkB,EAAE,IAAO,CAC5BC,KAAM,SACNC,MAAO,qBAAqB,0CAC5B/B,KAAM,gBAGZ,KCPA,IAAA0B,QAAO,IAAoB,sBAAsB,SAAUM,EAAOC,GAC5DA,EAAWC,WACbF,EAAMrB,IAAI,OAAQkB,EAAE,IAAQ,CAC1B7B,KAAM,cACNmC,QAAShC,KAAKiC,WAAWC,KAAKJ,IAC7B,qBAAqB,yCAAyCV,OAAOU,EAAWL,WAAa,SAAW,OAAQ,aAEvH,IACA,eAAgC,WAC9BzB,KAAKmC,KAAK,CACRV,UAAWzB,KAAKyB,aACfW,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BX,EAAEY,QAAQ,GAEd,GFbA,IAAAf,QAAO,2CAA4C,qBAAqB,SAAUM,GAChFA,EAAMrB,IAAI,mBAAoB,CAC5B+B,KAAM,mBACN1C,KAAM,cACN+B,MAAO,qBAAqB,8DAEhC,GAAE,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","gambit","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/nicknames/js/dist/admin.js b/extensions/nicknames/js/dist/admin.js index 7a6e92bb2d..03bb0ab7d3 100644 --- a/extensions/nicknames/js/dist/admin.js +++ b/extensions/nicknames/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:n=>{var a=n&&n.__esModule?()=>n.default:()=>n;return e.d(a,{a}),a},d:(n,a)=>{for(var t in a)e.o(a,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:a[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";e.r(n);const a=flarum.reg.get("core","admin/app");var t=e.n(a);const r=flarum.reg.get("core","common/components/Alert");var s=e.n(r);const i=flarum.reg.get("core","common/components/Link");var l=e.n(i);t().initializers.add("flarum/nicknames",(()=>{t().extensionData.for("flarum-nicknames").registerSetting((function(){if("nickname"!==t().data.settings.display_name_driver)return m("div",{className:"Form-group"},m(s(),{dismissible:!1},t().translator.trans("flarum-nicknames.admin.wrong_driver",{a:m(l(),{href:t().route("basics")})})))})).registerSetting({setting:"flarum-nicknames.set_on_registration",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.set_on_registration_label")}).registerSetting({setting:"flarum-nicknames.random_username",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.random_username_label"),help:t().translator.trans("flarum-nicknames.admin.settings.random_username_help")}).registerSetting({setting:"flarum-nicknames.unique",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.unique_label")}).registerSetting({setting:"flarum-nicknames.regex",type:"text",label:t().translator.trans("flarum-nicknames.admin.settings.regex_label")}).registerSetting({setting:"flarum-nicknames.min",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.min_label")}).registerSetting({setting:"flarum-nicknames.max",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.max_label")}).registerPermission({icon:"fas fa-user-tag",label:t().translator.trans("flarum-nicknames.admin.permissions.edit_own_nickname_label"),permission:"user.editOwnNickname"},"start")}))})(),module.exports=n})(); +(()=>{var e={n:n=>{var a=n&&n.__esModule?()=>n.default:()=>n;return e.d(a,{a}),a},d:(n,a)=>{for(var t in a)e.o(a,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:a[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";e.r(n);const a=flarum.reg.get("core","admin/app");var t=e.n(a);const r=flarum.reg.get("core","common/components/Alert");var s=e.n(r);const i=flarum.reg.get("core","common/components/Link");var l=e.n(i);const o=flarum.reg.get("core","admin/components/BasicsPage");var c=e.n(o);const g=flarum.reg.get("core","common/utils/extractText");var u=e.n(g);const d=flarum.reg.get("core","common/extend");t().initializers.add("flarum/nicknames",(()=>{t().extensionData.for("flarum-nicknames").registerSetting((function(){if("nickname"!==t().data.settings.display_name_driver)return m("div",{className:"Form-group"},m(s(),{dismissible:!1},t().translator.trans("flarum-nicknames.admin.wrong_driver",{a:m(l(),{href:t().route("basics")})})))})).registerSetting({setting:"flarum-nicknames.set_on_registration",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.set_on_registration_label")}).registerSetting({setting:"flarum-nicknames.random_username",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.random_username_label"),help:t().translator.trans("flarum-nicknames.admin.settings.random_username_help")}).registerSetting({setting:"flarum-nicknames.unique",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.unique_label")}).registerSetting({setting:"flarum-nicknames.regex",type:"text",label:t().translator.trans("flarum-nicknames.admin.settings.regex_label")}).registerSetting({setting:"flarum-nicknames.min",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.min_label")}).registerSetting({setting:"flarum-nicknames.max",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.max_label")}).registerPermission({icon:"fas fa-user-tag",label:t().translator.trans("flarum-nicknames.admin.permissions.edit_own_nickname_label"),permission:"user.editOwnNickname"},"start"),(0,d.extend)(c().prototype,"driverLocale",(function(e){e.display_name.nickname=u()(t().translator.trans("flarum-nicknames.admin.basics.display_name_driver_options.nickname"))}))}))})(),module.exports=n})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/nicknames/js/dist/admin.js.map b/extensions/nicknames/js/dist/admin.js.map index e9ee8054d4..3d92d0c0fa 100644 --- a/extensions/nicknames/js/dist/adm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NC,MAAO,qBAAqB,kDAC3BP,gBAAgB,CACjBK,QAAS,yBACTC,KAAM,OACNC,MAAO,qBAAqB,iDAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BE,mBAAmB,CACpBC,KAAM,kBACNH,MAAO,qBAAqB,8DAC5BI,WAAY,wBACX,QAAQ,G","sources":["webpack://@flarum/nicknames/webpack/bootstrap","webpack://@flarum/nicknames/webpack/runtime/compat get default export","webpack://@flarum/nicknames/webpack/runtime/define property getters","webpack://@flarum/nicknames/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/nicknames/webpack/runtime/make namespace object","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/nicknames/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport Link from 'flarum/common/components/Link';\napp.initializers.add('flarum/nicknames', () => {\n app.extensionData.for('flarum-nicknames').registerSetting(function () {\n if (app.data.settings.display_name_driver === 'nickname') return;\n return m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n dismissible: false\n }, app.translator.trans('flarum-nicknames.admin.wrong_driver', {\n a: m(Link, {\n href: app.route('basics')\n })\n })));\n }).registerSetting({\n setting: 'flarum-nicknames.set_on_registration',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.set_on_registration_label')\n }).registerSetting({\n setting: 'flarum-nicknames.random_username',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.random_username_label'),\n help: app.translator.trans('flarum-nicknames.admin.settings.random_username_help')\n }).registerSetting({\n setting: 'flarum-nicknames.unique',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.unique_label')\n }).registerSetting({\n setting: 'flarum-nicknames.regex',\n type: 'text',\n label: app.translator.trans('flarum-nicknames.admin.settings.regex_label')\n }).registerSetting({\n setting: 'flarum-nicknames.min',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.min_label')\n }).registerSetting({\n setting: 'flarum-nicknames.max',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.max_label')\n }).registerPermission({\n icon: 'fas fa-user-tag',\n label: app.translator.trans('flarum-nicknames.admin.permissions.edit_own_nickname_label'),\n permission: 'user.editOwnNickname'\n }, 'start');\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerSetting","m","className","dismissible","href","setting","type","label","help","registerPermission","icon","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,0B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,+B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iBCM5D,qBAAqB,oBAAoB,KACvC,sBAAsB,oBAAoBW,iBAAgB,WACxD,GAA8C,aAA1C,sCACJ,OAAOC,EAAE,MAAO,CACdC,UAAW,cACVD,EAAE,IAAO,CACVE,aAAa,GACZ,qBAAqB,sCAAuC,CAC7DtB,EAAGoB,EAAE,IAAM,CACTG,KAAM,UAAU,eAGtB,IAAGJ,gBAAgB,CACjBK,QAAS,uCACTC,KAAM,UACNC,MAAO,qBAAqB,+DAC3BP,gBAAgB,CACjBK,QAAS,mCACTC,KAAM,UACNC,MAAO,qBAAqB,yDAC5BC,KAAM,qBAAqB,0DAC1BR,gBAAgB,CACjBK,QAAS,0BACTC,KAAM,UACNC,MAAO,qBAAqB,kDAC3BP,gBAAgB,CACjBK,QAAS,yBACTC,KAAM,OACNC,MAAO,qBAAqB,iDAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BE,mBAAmB,CACpBC,KAAM,kBACNH,MAAO,qBAAqB,8DAC5BI,WAAY,wBACX,UACH,IAAAC,QAAO,cAAsB,gBAAgB,SAAUC,GACrDA,EAAOC,aAAuB,SAAI,IAAY,qBAAqB,sEACrE,GAAE,G","sources":["webpack://@flarum/nicknames/webpack/bootstrap","webpack://@flarum/nicknames/webpack/runtime/compat get default export","webpack://@flarum/nicknames/webpack/runtime/define property getters","webpack://@flarum/nicknames/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/nicknames/webpack/runtime/make namespace object","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/components/BasicsPage')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/nicknames/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/BasicsPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport Link from 'flarum/common/components/Link';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\nimport extractText from 'flarum/common/utils/extractText';\nimport { extend } from 'flarum/common/extend';\napp.initializers.add('flarum/nicknames', () => {\n app.extensionData.for('flarum-nicknames').registerSetting(function () {\n if (app.data.settings.display_name_driver === 'nickname') return;\n return m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n dismissible: false\n }, app.translator.trans('flarum-nicknames.admin.wrong_driver', {\n a: m(Link, {\n href: app.route('basics')\n })\n })));\n }).registerSetting({\n setting: 'flarum-nicknames.set_on_registration',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.set_on_registration_label')\n }).registerSetting({\n setting: 'flarum-nicknames.random_username',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.random_username_label'),\n help: app.translator.trans('flarum-nicknames.admin.settings.random_username_help')\n }).registerSetting({\n setting: 'flarum-nicknames.unique',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.unique_label')\n }).registerSetting({\n setting: 'flarum-nicknames.regex',\n type: 'text',\n label: app.translator.trans('flarum-nicknames.admin.settings.regex_label')\n }).registerSetting({\n setting: 'flarum-nicknames.min',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.min_label')\n }).registerSetting({\n setting: 'flarum-nicknames.max',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.max_label')\n }).registerPermission({\n icon: 'fas fa-user-tag',\n label: app.translator.trans('flarum-nicknames.admin.permissions.edit_own_nickname_label'),\n permission: 'user.editOwnNickname'\n }, 'start');\n extend(BasicsPage.prototype, 'driverLocale', function (locale) {\n locale.display_name['nickname'] = extractText(app.translator.trans('flarum-nicknames.admin.basics.display_name_driver_options.nickname'));\n });\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerSetting","m","className","dismissible","href","setting","type","label","help","registerPermission","icon","permission","extend","locale","display_name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/sticky/js/dist/admin.js b/extensions/sticky/js/dist/admin.js index dc68e09089..f73cd5bee1 100644 --- a/extensions/sticky/js/dist/admin.js +++ b/extensions/sticky/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var a in t)e.o(t,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:t[a]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r);const t=flarum.reg.get("core","admin/app");var a=e.n(t);a().initializers.add("flarum-sticky",(()=>{a().extensionData.for("flarum-sticky").registerPermission({icon:"fas fa-thumbtack",label:a().translator.trans("flarum-sticky.admin.permissions.sticky_discussions_label"),permission:"discussion.sticky"},"moderate",95)}))})(),module.exports=r})(); +(()=>{var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>n});const t=flarum.reg.get("core","admin/app");var s=e.n(t);const i=flarum.reg.get("core","common/extenders");var o=e.n(i);class a{pattern(){return"is:sticky"}toFilter(e,r){return{[(r?"-":"")+"sticky"]:!0}}filterKey(){return"sticky"}fromFilter(e,r){return"".concat(r?"-":"","is:sticky")}}flarum.reg.add("flarum-sticky","common/query/discussions/StickyGambit",a);const n=[(new(o().Search)).gambit("discussions",a)];s().initializers.add("flarum-sticky",(()=>{s().extensionData.for("flarum-sticky").registerPermission({icon:"fas fa-thumbtack",label:s().translator.trans("flarum-sticky.admin.permissions.sticky_discussions_label"),permission:"discussion.sticky"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/sticky/js/dist/admin.js.map b/extensions/sticky/js/dist/admin.js.map index 7fd3732f8f..74ff2179f3 100644 --- a/extensions/sticky/js/dist/admin.js.map +++ b/extensions/sticky/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,iBAAiB,KACpC,sBAAsB,iBAAiBW,mBAAmB,CACxDC,KAAM,mBACNC,MAAO,qBAAqB,4DAC5BC,WAAY,qBACX,WAAY,GAAG,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/sticky/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('flarum-sticky', () => {\n app.extensionData.for('flarum-sticky').registerPermission({\n icon: 'fas fa-thumbtack',\n label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),\n permission: 'discussion.sticky'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFN,OAAOC,IAAIS,IAAI,gBAAiB,wCAAyCR,GCfzE,UAAgB,IAAI,aACnBS,OAAO,cAAeT,ICDvB,qBAAqB,iBAAiB,KACpC,sBAAsB,iBAAiBU,mBAAmB,CACxDC,KAAM,mBACNC,MAAO,qBAAqB,4DAC5BC,WAAY,qBACX,WAAY,GAAG,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/./src/common/query/discussions/StickyGambit.ts","webpack://@flarum/sticky/./src/common/extend.ts","webpack://@flarum/sticky/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class StickyGambit {\n pattern() {\n return 'is:sticky';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'sticky';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'sticky';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:sticky\");\n }\n}\nflarum.reg.add('flarum-sticky', 'common/query/discussions/StickyGambit', StickyGambit);","import Extend from 'flarum/common/extenders';\nimport StickyGambit from './query/discussions/StickyGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', StickyGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n app.extensionData.for('flarum-sticky').registerPermission({\n icon: 'fas fa-thumbtack',\n label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),\n permission: 'discussion.sticky'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","StickyGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js b/extensions/sticky/js/dist/forum.js index 57188237ff..e0cfc90d2d 100644 --- a/extensions/sticky/js/dist/forum.js +++ b/extensions/sticky/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>L});const s=flarum.reg.get("core","forum/app");var o=t.n(s);const r=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","common/models/Discussion");var c=t.n(n);const i=flarum.reg.get("core","common/components/Badge");var a=t.n(i);const u=flarum.reg.get("core","forum/utils/DiscussionControls");var l=t.n(u);const d=flarum.reg.get("core","forum/components/DiscussionPage");var f=t.n(d);const g=flarum.reg.get("core","common/components/Button");var y=t.n(g);const p=flarum.reg.get("core","forum/states/DiscussionListState");var k=t.n(p);const v=flarum.reg.get("core","forum/components/DiscussionListItem");var b=t.n(v);const h=flarum.reg.get("core","forum/components/IndexPage");var S=t.n(h);const x=flarum.reg.get("core","common/utils/string"),P=flarum.reg.get("core","common/utils/classList");var _=t.n(P);const D=flarum.reg.get("core","common/extenders");var O=t.n(D);const j=flarum.reg.get("core","forum/components/EventPost");var w=t.n(j);class I extends(w()){icon(){return"fas fa-thumbtack"}descriptionKey(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"}}flarum.reg.add("flarum-sticky","forum/components/DiscussionStickiedPost",I);const L=[(new(O().PostTypes)).add("discussionStickied",I),new(O().Model)(c()).attribute("isSticky").attribute("canSticky")];o().initializers.add("flarum-sticky",(()=>{(0,r.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:o().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,r.extend)(l(),"moderationControls",(function(t,e){e.canSticky()&&t.add("sticky",m(y(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(e)},o().translator.trans("flarum-sticky.forum.discussion_controls.".concat(e.isSticky()?"unsticky":"sticky","_button"))))})),l().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((()=>{o().current.matches(f())&&o().current.get("stream").update(),m.redraw()}))},(0,r.extend)(k().prototype,"requestParams",(function(t){(o().current.matches(S())||o().current.matches(f()))&&t.include.push("firstPost")})),(0,r.extend)(b().prototype,"infoItems",(function(t){const e=this.attrs.discussion;if(e.isSticky()&&!this.attrs.params.q&&!e.lastReadPostNumber()){const s=e.firstPost();if(s){const e=(0,x.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,e),-100)}}})),(0,r.extend)(b().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=_()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=e})(); +(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var r in s)t.o(s,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:s[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>M});const s=flarum.reg.get("core","forum/app");var r=t.n(s);const o=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","common/models/Discussion");var c=t.n(n);const i=flarum.reg.get("core","common/components/Badge");var a=t.n(i);const u=flarum.reg.get("core","forum/utils/DiscussionControls");var l=t.n(u);const d=flarum.reg.get("core","forum/components/DiscussionPage");var f=t.n(d);const y=flarum.reg.get("core","common/components/Button");var g=t.n(y);const k=flarum.reg.get("core","forum/states/DiscussionListState");var p=t.n(k);const b=flarum.reg.get("core","forum/components/DiscussionListItem");var v=t.n(b);const S=flarum.reg.get("core","forum/components/IndexPage");var h=t.n(S);const x=flarum.reg.get("core","common/utils/string"),P=flarum.reg.get("core","common/utils/classList");var _=t.n(P);const D=flarum.reg.get("core","common/extenders");var w=t.n(D);const O=flarum.reg.get("core","forum/components/EventPost");var j=t.n(O);class I extends(j()){icon(){return"fas fa-thumbtack"}descriptionKey(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"}}flarum.reg.add("flarum-sticky","forum/components/DiscussionStickiedPost",I);class L{pattern(){return"is:sticky"}toFilter(t,e){return{[(e?"-":"")+"sticky"]:!0}}filterKey(){return"sticky"}fromFilter(t,e){return"".concat(e?"-":"","is:sticky")}}flarum.reg.add("flarum-sticky","common/query/discussions/StickyGambit",L);const M=[(new(w().Search)).gambit("discussions",L),(new(w().PostTypes)).add("discussionStickied",I),new(w().Model)(c()).attribute("isSticky").attribute("canSticky")];r().initializers.add("flarum-sticky",(()=>{(0,o.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:r().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,o.extend)(l(),"moderationControls",(function(t,e){e.canSticky()&&t.add("sticky",m(g(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(e)},r().translator.trans("flarum-sticky.forum.discussion_controls.".concat(e.isSticky()?"unsticky":"sticky","_button"))))})),l().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((()=>{r().current.matches(f())&&r().current.get("stream").update(),m.redraw()}))},(0,o.extend)(p().prototype,"requestParams",(function(t){(r().current.matches(h())||r().current.matches(f()))&&t.include.push("firstPost")})),(0,o.extend)(v().prototype,"infoItems",(function(t){const e=this.attrs.discussion;if(e.isSticky()&&!this.attrs.params.q&&!e.lastReadPostNumber()){const s=e.firstPost();if(s){const e=(0,x.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,e),-100)}}})),(0,o.extend)(v().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=_()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js.map b/extensions/sticky/js/dist/forum.js.map index 28ef970f90..448e839199 100644 --- a/extensions/sticky/js/dist/forum.js.map +++ b/extensions/sticky/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,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KS,aACfY,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BZ,EAAEa,QAAQ,GAEd,GCfA,IAAAhB,QAAO,cAA+B,iBAAiB,SAAUiB,IAC3D,oBAAoB,MAAc,oBAAoB,OACxDA,EAAOC,QAAQC,KAAK,YAExB,KACA,IAAAnB,QAAO,cAA8B,aAAa,SAAUM,GAC1D,MAAMC,EAAad,KAAKC,MAAMa,WAC9B,GAAIA,EAAWL,aAAeT,KAAKC,MAAMuB,OAAOG,IAAMb,EAAWc,qBAAsB,CACrF,MAAMC,EAAYf,EAAWe,YAC7B,GAAIA,EAAW,CACb,MAAMC,GAAU,IAAAC,UAASF,EAAUG,eAAgB,KAGnDnB,EAAMR,IAAI,UAAWK,EAAE,MAAO,KAAMoB,IAAW,IACjD,CACF,CACF,KCpBA,IAAAvB,QAAO,cAA8B,gBAAgB,SAAUN,GACzDD,KAAKC,MAAMa,WAAWL,aACxBR,EAAMgC,UAAY,IAAUhC,EAAMgC,UAAW,8BAEjD,GJEgB,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n descriptionKey() {\n return this.attrs.post.content().sticky ? 'flarum-sticky.forum.post_stream.discussion_stickied_text' : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\nflarum.reg.add('flarum-sticky', 'forum/components/DiscussionStickiedPost', DiscussionStickiedPost);","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\nexport default [new Extend.PostTypes() //\n.add('discussionStickied', DiscussionStickiedPost), new Extend.Model(Discussion) //\n.attribute('isSticky').attribute('canSticky')];","import app from 'flarum/forum/app';\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add('sticky', m(Badge, {\n type: \"sticky\",\n label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),\n icon: \"fas fa-thumbtack\"\n }), 10);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add('sticky', m(Button, {\n icon: \"fas fa-thumbtack\",\n onclick: this.stickyAction.bind(discussion)\n }, app.translator.trans(\"flarum-sticky.forum.discussion_controls.\".concat(discussion.isSticky() ? 'unsticky' : 'sticky', \"_button\"))));\n }\n });\n DiscussionControls.stickyAction = function () {\n this.save({\n isSticky: !this.isSticky()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\nexport default function addStickyExcerpt() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in
because ItemList entries need to be vnodes\n items.add('excerpt', m(\"div\", null, excerpt), -100);\n }\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nexport default function addStickyClass() {\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.discussion.isSticky()) {\n attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n }\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionStickiedPost","icon","descriptionKey","this","attrs","post","content","sticky","add","attribute","extend","badges","isSticky","m","type","label","items","discussion","canSticky","onclick","stickyAction","bind","concat","save","then","update","redraw","params","include","push","q","lastReadPostNumber","firstPost","excerpt","truncate","contentPlain","className"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,o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AAMwC,UAAY,IAAUxC,EAAMwC,UAAW,8BAEjD,GJEgB,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/./src/common/query/discussions/StickyGambit.ts","webpack://@flarum/sticky/./src/common/extend.ts","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n descriptionKey() {\n return this.attrs.post.content().sticky ? 'flarum-sticky.forum.post_stream.discussion_stickied_text' : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\nflarum.reg.add('flarum-sticky', 'forum/components/DiscussionStickiedPost', DiscussionStickiedPost);","export default class StickyGambit {\n pattern() {\n return 'is:sticky';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'sticky';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'sticky';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:sticky\");\n }\n}\nflarum.reg.add('flarum-sticky', 'common/query/discussions/StickyGambit', StickyGambit);","import Extend from 'flarum/common/extenders';\nimport StickyGambit from './query/discussions/StickyGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', StickyGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionStickied', DiscussionStickiedPost), new Extend.Model(Discussion) //\n.attribute('isSticky').attribute('canSticky')];","import app from 'flarum/forum/app';\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add('sticky', m(Badge, {\n type: \"sticky\",\n label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),\n icon: \"fas fa-thumbtack\"\n }), 10);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add('sticky', m(Button, {\n icon: \"fas fa-thumbtack\",\n onclick: this.stickyAction.bind(discussion)\n }, app.translator.trans(\"flarum-sticky.forum.discussion_controls.\".concat(discussion.isSticky() ? 'unsticky' : 'sticky', \"_button\"))));\n }\n });\n DiscussionControls.stickyAction = function () {\n this.save({\n isSticky: !this.isSticky()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\nexport default function addStickyExcerpt() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in
because ItemList entries need to be vnodes\n items.add('excerpt', m(\"div\", null, excerpt), -100);\n }\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nexport default function addStickyClass() {\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.discussion.isSticky()) {\n attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n }\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionStickiedPost","icon","descriptionKey","this","attrs","post","content","sticky","add","StickyGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","gambit","attribute","extend","badges","isSticky","m","type","label","items","discussion","canSticky","onclick","stickyAction","bind","save","then","update","redraw","params","include","push","q","lastReadPostNumber","firstPost","excerpt","truncate","contentPlain","className"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/admin.js b/extensions/subscriptions/js/dist/admin.js new file mode 100644 index 0000000000..fdd4839812 --- /dev/null +++ b/extensions/subscriptions/js/dist/admin.js @@ -0,0 +1,2 @@ +(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>i});const o=flarum.reg.get("core","common/extenders");var t=e.n(o);class n{pattern(){return"is:(follow|ignor)(?:ing|ed)"}toFilter(e,r){return{subscription:"follow"===e[1]?"following":"ignoring"}}filterKey(){return"subscription"}fromFilter(e,r){return"".concat(r?"-":"","is:").concat(e)}}flarum.reg.add("flarum-subscriptions","common/query/discussions/SubscriptionGambit",n);const i=[(new(t().Search)).gambit("discussions",n)]})(),module.exports=r})(); +//# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/admin.js.map b/extensions/subscriptions/js/dist/admin.js.map new file mode 100644 index 0000000000..dcae3f9d23 --- /dev/null +++ b/extensions/subscriptions/js/dist/admin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,6BACT,CACAC,SAASC,EAASC,GAEhB,MAAO,CACLC,aAF0B,WAAfF,EAAQ,GAAkB,YAAc,WAIvD,CACAG,YACE,MAAO,cACT,CACAC,WAAWV,EAAOO,GAChB,MAAO,GAAGI,OAAOJ,EAAS,IAAM,GAAI,OAAOI,OAAOX,EACpD,EAEFC,OAAOC,IAAIU,IAAI,uBAAwB,8CAA+CT,GCftF,UAAgB,IAAI,aACnBU,OAAO,cAAeV,G","sources":["webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/subscriptions/./src/common/query/discussions/SubscriptionGambit.ts","webpack://@flarum/subscriptions/./src/common/extend.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class SubscriptionGambit {\n pattern() {\n return 'is:(follow|ignor)(?:ing|ed)';\n }\n toFilter(matches, negate) {\n const type = matches[1] === 'follow' ? 'following' : 'ignoring';\n return {\n subscription: type\n };\n }\n filterKey() {\n return 'subscription';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:\").concat(value);\n }\n}\nflarum.reg.add('flarum-subscriptions', 'common/query/discussions/SubscriptionGambit', SubscriptionGambit);","import Extend from 'flarum/common/extenders';\nimport SubscriptionGambit from './query/discussions/SubscriptionGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', SubscriptionGambit)];"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","SubscriptionGambit","pattern","toFilter","matches","negate","subscription","filterKey","fromFilter","concat","add","gambit"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/forum.js b/extensions/subscriptions/js/dist/forum.js index af3a114175..233c7eb47b 100644 --- a/extensions/subscriptions/js/dist/forum.js +++ b/extensions/subscriptions/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)o.o(n,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>$});const n=flarum.reg.get("core","common/extend"),r=flarum.reg.get("core","forum/app");var s=o.n(r);const e=flarum.reg.get("core","common/models/Discussion");var i=o.n(e);const a=flarum.reg.get("core","common/components/Badge");var l=o.n(a);const u=flarum.reg.get("core","common/components/Button");var c=o.n(u);const f=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(f);const b=flarum.reg.get("core","forum/utils/DiscussionControls");var g=o.n(b);function d(o){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},d(o)}function _(o,t,n){return(t=function(o){var t=function(o,t){if("object"!==d(o)||null===o)return o;var n=o[Symbol.toPrimitive];if(void 0!==n){var r=n.call(o,t);if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(o,"string");return"symbol"===d(t)?t:String(t)}(t))in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,o}const w=flarum.reg.get("core","common/components/Dropdown");var y=o.n(w);const v=flarum.reg.get("core","common/utils/extractText");var h=o.n(v);const S=flarum.reg.get("core","common/components/DetailedDropdownItem");var x=o.n(S);const P=flarum.reg.get("core","common/components/SplitDropdown");var A=o.n(P);class N extends(y()){constructor(){super(...arguments),_(this,"options",[{subscription:null,icon:"far fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]),_(this,"possibleButtonAttrs",{null:{icon:"far fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.follow_button")},follow:{icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_button")},ignore:{icon:"far fa-eye-slash",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button")}})}view(){const o=this.attrs.discussion,t=o.subscription(),n=this.possibleButtonAttrs[t],r=s().session.user.preferences(),e=r.notify_newPost_email,i=r.notify_newPost_alert,a=h()(s().translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),l=(e||i)&&null===t;return m(A(),{className:"SubscriptionMenu",buttonClassName:"SubscriptionMenu-button--".concat(t),tooltip:l?a:null,mainAction:m(c(),{className:"SubscriptionMenu-button",icon:n.icon,onclick:this.saveSubscription.bind(this,o,-1!==["follow","ignore"].indexOf(t)?null:"follow")},n.label)},this.options.map((n=>m(x(),Object.assign({},n,{onclick:this.saveSubscription.bind(this,o,n.subscription),active:t===n.subscription})))))}saveSubscription(o,t){o.save({subscription:t}),this.$(".SubscriptionMenu-button").tooltip("hide")}}flarum.reg.add("flarum-subscriptions","forum/components/SubscriptionMenu",N);const j=flarum.reg.get("core","common/components/LinkButton");var M=o.n(j);const D=flarum.reg.get("core","forum/components/IndexPage");var O=o.n(D);const k=flarum.reg.get("core","forum/components/IndexSidebar");var R=o.n(k);const T=flarum.reg.get("core","forum/states/DiscussionListState");var I=o.n(T);const B=flarum.reg.get("core","forum/states/GlobalSearchState");var L=o.n(B);const C=flarum.reg.get("core","common/components/Switch");var q=o.n(C);const F=flarum.reg.get("core","forum/components/Notification");var G=o.n(F);class z extends(G()){icon(){return"fas fa-star"}href(){const o=this.attrs.notification,t=o.subject(),n=o.content()||{};return s().route.discussion(t,n.postNumber)}content(){return s().translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-subscriptions","forum/components/NewPostNotification",z);const E=flarum.reg.get("core","common/extenders");var U=o.n(E);const $=[(new(U().Routes)).add("following","/following",O()),new(U().Model)(i()).attribute("subscription")];s().initializers.add("subscriptions",(function(){s().notificationComponents.newPost=z,(0,n.extend)(i().prototype,"badges",(function(o){let t;switch(this.subscription()){case"follow":t=m(l(),{label:s().translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":t=m(l(),{label:s().translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}t&&o.add("subscription",t)})),(0,n.extend)(g(),"userControls",(function(o,t,n){if(s().session.user&&!(n instanceof p())){const n={none:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:null},ignore:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:null}},r=t.subscription()||"none";o.add("subscription",m(c(),{icon:n[r].icon,onclick:t.save.bind(t,{subscription:n[r].save})},n[r].label))}})),(0,n.extend)(p().prototype,"sidebarItems",(function(o){if(s().session.user){const t=this.discussion;o.add("subscription",m(N,{discussion:t}),80)}})),(0,n.extend)(R().prototype,"navItems",(function(o){if(s().session.user){const t=s().search.stickyParams();o.add("following",m(M(),{href:s().route("following",t),icon:"fas fa-star"},s().translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),(0,n.extend)(O().prototype,"setTitle",(function(){"following"===s().current.get("routeName")&&s().setTitle(s().translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),(0,n.extend)(L().prototype,"params",(function(o){o.onFollowing="following"===s().current.get("routeName")})),(0,n.extend)(I().prototype,"requestParams",(function(o){this.params.onFollowing&&(o.filter||(o.filter={}),o.filter.q?o.filter.q+=" is:following":o.filter.subscription="following")})),(0,n.extend)("flarum/forum/components/SettingsPage","notificationsItems",(function(o){var t;o.add("followAfterReply",m(q(),{state:this.user.preferences().followAfterReply,onchange:o=>{this.followAfterReplyLoading=!0,this.user.savePreferences({followAfterReply:o}).then((()=>{this.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},s().translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label"))),o.add("notifyForAllPosts",m(q(),{id:"flarum_subscriptions__notify_for_all_posts",state:!(null==(t=this.user.preferences())||!t["flarum-subscriptions.notify_for_all_posts"]),onchange:o=>{this.user.savePreferences({"flarum-subscriptions.notify_for_all_posts":o})}},s().translator.trans("flarum-subscriptions.forum.settings.notify_for_all_posts_label")))})),(0,n.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("newPost",{name:"newPost",icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))}))})(),module.exports=t})(); +(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)o.o(n,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>$});const n=flarum.reg.get("core","common/extend"),r=flarum.reg.get("core","forum/app");var s=o.n(r);const e=flarum.reg.get("core","common/models/Discussion");var i=o.n(e);const a=flarum.reg.get("core","common/components/Badge");var l=o.n(a);const u=flarum.reg.get("core","common/components/Button");var c=o.n(u);const f=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(f);const b=flarum.reg.get("core","forum/utils/DiscussionControls");var g=o.n(b);function d(o){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},d(o)}function _(o,t,n){return(t=function(o){var t=function(o,t){if("object"!==d(o)||null===o)return o;var n=o[Symbol.toPrimitive];if(void 0!==n){var r=n.call(o,t);if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(o,"string");return"symbol"===d(t)?t:String(t)}(t))in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,o}const w=flarum.reg.get("core","common/components/Dropdown");var y=o.n(w);const v=flarum.reg.get("core","common/utils/extractText");var h=o.n(v);const S=flarum.reg.get("core","common/components/DetailedDropdownItem");var x=o.n(S);const P=flarum.reg.get("core","common/components/SplitDropdown");var A=o.n(P);class N extends(y()){constructor(){super(...arguments),_(this,"options",[{subscription:null,icon:"far fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]),_(this,"possibleButtonAttrs",{null:{icon:"far fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.follow_button")},follow:{icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.following_button")},ignore:{icon:"far fa-eye-slash",label:s().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button")}})}view(){const o=this.attrs.discussion,t=o.subscription(),n=this.possibleButtonAttrs[t],r=s().session.user.preferences(),e=r.notify_newPost_email,i=r.notify_newPost_alert,a=h()(s().translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),l=(e||i)&&null===t;return m(A(),{className:"SubscriptionMenu",buttonClassName:"SubscriptionMenu-button--".concat(t),tooltip:l?a:null,mainAction:m(c(),{className:"SubscriptionMenu-button",icon:n.icon,onclick:this.saveSubscription.bind(this,o,-1!==["follow","ignore"].indexOf(t)?null:"follow")},n.label)},this.options.map((n=>m(x(),Object.assign({},n,{onclick:this.saveSubscription.bind(this,o,n.subscription),active:t===n.subscription})))))}saveSubscription(o,t){o.save({subscription:t}),this.$(".SubscriptionMenu-button").tooltip("hide")}}flarum.reg.add("flarum-subscriptions","forum/components/SubscriptionMenu",N);const j=flarum.reg.get("core","common/components/LinkButton");var M=o.n(j);const D=flarum.reg.get("core","forum/components/IndexPage");var O=o.n(D);const k=flarum.reg.get("core","forum/components/IndexSidebar");var R=o.n(k);const T=flarum.reg.get("core","forum/states/DiscussionListState");var I=o.n(T);const B=flarum.reg.get("core","forum/states/GlobalSearchState");var F=o.n(B);const L=flarum.reg.get("core","common/components/Switch");var C=o.n(L);const G=flarum.reg.get("core","forum/components/Notification");var q=o.n(G);class z extends(q()){icon(){return"fas fa-star"}href(){const o=this.attrs.notification,t=o.subject(),n=o.content()||{};return s().route.discussion(t,n.postNumber)}content(){return s().translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-subscriptions","forum/components/NewPostNotification",z);const E=flarum.reg.get("core","common/extenders");var K=o.n(E);class U{pattern(){return"is:(follow|ignor)(?:ing|ed)"}toFilter(o,t){return{subscription:"follow"===o[1]?"following":"ignoring"}}filterKey(){return"subscription"}fromFilter(o,t){return"".concat(t?"-":"","is:").concat(o)}}flarum.reg.add("flarum-subscriptions","common/query/discussions/SubscriptionGambit",U);const $=[(new(K().Search)).gambit("discussions",U),(new(K().Routes)).add("following","/following",O()),new(K().Model)(i()).attribute("subscription")];s().initializers.add("subscriptions",(function(){s().notificationComponents.newPost=z,(0,n.extend)(i().prototype,"badges",(function(o){let t;switch(this.subscription()){case"follow":t=m(l(),{label:s().translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":t=m(l(),{label:s().translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}t&&o.add("subscription",t)})),(0,n.extend)(g(),"userControls",(function(o,t,n){if(s().session.user&&!(n instanceof p())){const n={none:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:null},ignore:{label:s().translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:null}},r=t.subscription()||"none";o.add("subscription",m(c(),{icon:n[r].icon,onclick:t.save.bind(t,{subscription:n[r].save})},n[r].label))}})),(0,n.extend)(p().prototype,"sidebarItems",(function(o){if(s().session.user){const t=this.discussion;o.add("subscription",m(N,{discussion:t}),80)}})),(0,n.extend)(R().prototype,"navItems",(function(o){if(s().session.user){const t=s().search.stickyParams();o.add("following",m(M(),{href:s().route("following",t),icon:"fas fa-star"},s().translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),(0,n.extend)(O().prototype,"setTitle",(function(){"following"===s().current.get("routeName")&&s().setTitle(s().translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),(0,n.extend)(F().prototype,"params",(function(o){o.onFollowing="following"===s().current.get("routeName")})),(0,n.extend)(I().prototype,"requestParams",(function(o){this.params.onFollowing&&(o.filter||(o.filter={}),o.filter.subscription="following")})),(0,n.extend)("flarum/forum/components/SettingsPage","notificationsItems",(function(o){var t;o.add("followAfterReply",m(C(),{state:this.user.preferences().followAfterReply,onchange:o=>{this.followAfterReplyLoading=!0,this.user.savePreferences({followAfterReply:o}).then((()=>{this.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},s().translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label"))),o.add("notifyForAllPosts",m(C(),{id:"flarum_subscriptions__notify_for_all_posts",state:!(null==(t=this.user.preferences())||!t["flarum-subscriptions.notify_for_all_posts"]),onchange:o=>{this.user.savePreferences({"flarum-subscriptions.notify_for_all_posts":o})}},s().translator.trans("flarum-subscriptions.forum.settings.notify_for_all_posts_label")))})),(0,n.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("newPost",{name:"newPost",icon:"fas fa-star",label:s().translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/subscriptions/js/dist/forum.js.map b/extensions/subscriptions/js/dist/forum.js.map index 7e4aa0e030..ca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,iBAAkBjF,IACjBqF,MAAK,KACN/D,KAAK6D,yBAA0B,EAC/B3C,EAAE8C,QAAQ,GACV,EAEJC,QAASjE,KAAK6D,yBACb,qBAAqB,kEACxBZ,EAAMf,IAAI,oBAAqBhB,EAAE,IAAQ,CACvCgD,GAAI,6CACJR,QAAsD,OAA3CD,EAAezD,KAAKyC,KAAK5B,iBAA0B4C,EAAa,8CAC3EG,SAAUO,IACRnE,KAAKyC,KAAKqB,gBAAgB,CACxB,4CAA6CK,GAC7C,GAEH,qBAAqB,mEAC1B,KJdA,IAAAtB,QAAO,2CAA4C,qBAAqB,SAAUI,GAChFA,EAAMf,IAAI,UAAW,CACnBkC,KAAM,UACNlE,KAAM,cACNC,MAAO,qBAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/DetailedDropdownItem')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/SplitDropdown')\"","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenu.tsx","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Switch')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/subscriptions/./src/forum/components/NewPostNotification.js","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/subscriptions/./src/forum/extend.ts","webpack://@flarum/subscriptions/./src/forum/index.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionBadge.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionControls.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionFilter.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionSettings.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/DetailedDropdownItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/SplitDropdown');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport DetailedDropdownItem from 'flarum/common/components/DetailedDropdownItem';\nimport SplitDropdown from 'flarum/common/components/SplitDropdown';\nexport default class SubscriptionMenu extends Dropdown {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"options\", [{\n subscription: null,\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text')\n }, {\n subscription: 'follow',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text')\n }, {\n subscription: 'ignore',\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text')\n }]);\n _defineProperty(this, \"possibleButtonAttrs\", {\n null: {\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button')\n },\n follow: {\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button')\n },\n ignore: {\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button')\n }\n });\n }\n view() {\n const discussion = this.attrs.discussion;\n const subscription = discussion.subscription();\n const buttonAttrs = this.possibleButtonAttrs[subscription];\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyAlert = preferences['notify_newPost_alert'];\n const tooltipText = extractText(app.translator.trans(notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'));\n const shouldShowTooltip = (notifyEmail || notifyAlert) && subscription === null;\n return m(SplitDropdown, {\n className: \"SubscriptionMenu\",\n buttonClassName: \"SubscriptionMenu-button--\".concat(subscription),\n tooltip: shouldShowTooltip ? tooltipText : null,\n mainAction: m(Button, {\n className: 'SubscriptionMenu-button',\n icon: buttonAttrs.icon,\n onclick: this.saveSubscription.bind(this, discussion, ['follow', 'ignore'].indexOf(subscription) !== -1 ? null : 'follow')\n }, buttonAttrs.label)\n }, this.options.map(attrs => m(DetailedDropdownItem, Object.assign({}, attrs, {\n onclick: this.saveSubscription.bind(this, discussion, attrs.subscription),\n active: subscription === attrs.subscription\n }))));\n }\n saveSubscription(discussion, subscription) {\n discussion.save({\n subscription\n });\n\n // @ts-ignore\n this.$('.SubscriptionMenu-button').tooltip('hide');\n }\n}\nflarum.reg.add('flarum-subscriptions', 'forum/components/SubscriptionMenu', SubscriptionMenu);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Switch');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'fas fa-star';\n }\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n return app.route.discussion(discussion, content.postNumber);\n }\n content() {\n return app.translator.trans('flarum-subscriptions.forum.notifications.new_post_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-subscriptions', 'forum/components/NewPostNotification', NewPostNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","import Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nexport default [new Extend.Routes() //\n.add('following', '/following', IndexPage), new Extend.Model(Discussion) //\n.attribute('subscription')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport addSubscriptionBadge from './addSubscriptionBadge';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addSubscriptionFilter from './addSubscriptionFilter';\nimport addSubscriptionSettings from './addSubscriptionSettings';\nimport NewPostNotification from './components/NewPostNotification';\nexport { default as extend } from './extend';\napp.initializers.add('subscriptions', function () {\n app.notificationComponents.newPost = NewPostNotification;\n addSubscriptionBadge();\n addSubscriptionControls();\n addSubscriptionFilter();\n addSubscriptionSettings();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('newPost', {\n name: 'newPost',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n let badge;\n switch (this.subscription()) {\n case 'follow':\n badge = m(Badge, {\n label: app.translator.trans('flarum-subscriptions.forum.badge.following_tooltip'),\n icon: \"fas fa-star\",\n type: \"following\"\n });\n break;\n case 'ignore':\n badge = m(Badge, {\n label: app.translator.trans('flarum-subscriptions.forum.badge.ignoring_tooltip'),\n icon: \"far fa-eye-slash\",\n type: \"ignoring\"\n });\n break;\n }\n if (badge) {\n badges.add('subscription', badge);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport SubscriptionMenu from './components/SubscriptionMenu';\nexport default function addSubscriptionControls() {\n extend(DiscussionControls, 'userControls', function (items, discussion, context) {\n if (app.session.user && !(context instanceof DiscussionPage)) {\n const states = {\n none: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'),\n icon: 'fas fa-star',\n save: 'follow'\n },\n follow: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'),\n icon: 'far fa-star',\n save: null\n },\n ignore: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'),\n icon: 'fas fa-eye',\n save: null\n }\n };\n const subscription = discussion.subscription() || 'none';\n items.add('subscription', m(Button, {\n icon: states[subscription].icon,\n onclick: discussion.save.bind(discussion, {\n subscription: states[subscription].save\n })\n }, states[subscription].label));\n }\n });\n extend(DiscussionPage.prototype, 'sidebarItems', function (items) {\n if (app.session.user) {\n const discussion = this.discussion;\n items.add('subscription', m(SubscriptionMenu, {\n discussion: discussion\n }), 80);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nexport default function addSubscriptionFilter() {\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n if (app.session.user) {\n const params = app.search.stickyParams();\n items.add('following', m(LinkButton, {\n href: app.route('following', params),\n icon: \"fas fa-star\"\n }, app.translator.trans('flarum-subscriptions.forum.index.following_link')), 50);\n }\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'following') {\n app.setTitle(app.translator.trans('flarum-subscriptions.forum.following.meta_title_text'));\n }\n });\n extend(GlobalSearchState.prototype, 'params', function (params) {\n // We can't set `q` here directly, as that would make the search bar\n // think that text has been entered, and display the \"clear\" button.\n params.onFollowing = app.current.get('routeName') === 'following';\n });\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (this.params.onFollowing) {\n params.filter || (params.filter = {});\n if (params.filter.q) {\n params.filter.q += ' is:following';\n } else {\n params.filter.subscription = 'following';\n }\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Switch from 'flarum/common/components/Switch';\nexport default function () {\n extend('flarum/forum/components/SettingsPage', 'notificationsItems', function (items) {\n var _preferences;\n items.add('followAfterReply', m(Switch, {\n state: this.user.preferences().followAfterReply,\n onchange: value => {\n this.followAfterReplyLoading = true;\n this.user.savePreferences({\n followAfterReply: value\n }).then(() => {\n this.followAfterReplyLoading = false;\n m.redraw();\n });\n },\n loading: this.followAfterReplyLoading\n }, app.translator.trans('flarum-subscriptions.forum.settings.follow_after_reply_label')));\n items.add('notifyForAllPosts', m(Switch, {\n id: \"flarum_subscriptions__notify_for_all_posts\",\n state: !!((_preferences = this.user.preferences()) != null && _preferences['flarum-subscriptions.notify_for_all_posts']),\n onchange: val => {\n this.user.savePreferences({\n 'flarum-subscriptions.notify_for_all_posts': val\n });\n }\n }, app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","undefined","res","TypeError","String","toPropertyKey","configurable","writable","SubscriptionMenu","super","arguments","this","subscription","icon","label","description","null","follow","ignore","view","discussion","attrs","buttonAttrs","possibleButtonAttrs","preferences","notifyEmail","notifyAlert","tooltipText","shouldShowTooltip","m","className","buttonClassName","concat","tooltip","mainAction","onclick","saveSubscription","bind","indexOf","options","map","assign","active","save","$","add","NewPostNotification","href","notification","subject","content","postNumber","user","fromUser","excerpt","attribute","extend","badges","badge","type","items","context","states","none","params","onFollowing","filter","q","_preferences","state","followAfterReply","onchange","followAfterReplyLoading","savePreferences","then","redraw","loading","id","val","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAA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B,QAAO,2CAA4C,qBAAqB,SAAUI,GAChFA,EAAMvB,IAAI,UAAW,CACnByC,KAAM,UACNzE,KAAM,cACNC,MAAO,qBAAqB,8DAEhC,GACF,G","sources":["webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/subscriptions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/DetailedDropdownItem')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/SplitDropdown')\"","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenu.tsx","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/components/Switch')\"","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/subscriptions/./src/forum/components/NewPostNotification.js","webpack://@flarum/subscriptions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/subscriptions/./src/common/query/discussions/SubscriptionGambit.ts","webpack://@flarum/subscriptions/./src/common/extend.ts","webpack://@flarum/subscriptions/./src/forum/extend.ts","webpack://@flarum/subscriptions/./src/forum/index.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionBadge.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionControls.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionFilter.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionSettings.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/DetailedDropdownItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/SplitDropdown');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport DetailedDropdownItem from 'flarum/common/components/DetailedDropdownItem';\nimport SplitDropdown from 'flarum/common/components/SplitDropdown';\nexport default class SubscriptionMenu extends Dropdown {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"options\", [{\n subscription: null,\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text')\n }, {\n subscription: 'follow',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text')\n }, {\n subscription: 'ignore',\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),\n description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text')\n }]);\n _defineProperty(this, \"possibleButtonAttrs\", {\n null: {\n icon: 'far fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button')\n },\n follow: {\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button')\n },\n ignore: {\n icon: 'far fa-eye-slash',\n label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button')\n }\n });\n }\n view() {\n const discussion = this.attrs.discussion;\n const subscription = discussion.subscription();\n const buttonAttrs = this.possibleButtonAttrs[subscription];\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyAlert = preferences['notify_newPost_alert'];\n const tooltipText = extractText(app.translator.trans(notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'));\n const shouldShowTooltip = (notifyEmail || notifyAlert) && subscription === null;\n return m(SplitDropdown, {\n className: \"SubscriptionMenu\",\n buttonClassName: \"SubscriptionMenu-button--\".concat(subscription),\n tooltip: shouldShowTooltip ? tooltipText : null,\n mainAction: m(Button, {\n className: 'SubscriptionMenu-button',\n icon: buttonAttrs.icon,\n onclick: this.saveSubscription.bind(this, discussion, ['follow', 'ignore'].indexOf(subscription) !== -1 ? null : 'follow')\n }, buttonAttrs.label)\n }, this.options.map(attrs => m(DetailedDropdownItem, Object.assign({}, attrs, {\n onclick: this.saveSubscription.bind(this, discussion, attrs.subscription),\n active: subscription === attrs.subscription\n }))));\n }\n saveSubscription(discussion, subscription) {\n discussion.save({\n subscription\n });\n\n // @ts-ignore\n this.$('.SubscriptionMenu-button').tooltip('hide');\n }\n}\nflarum.reg.add('flarum-subscriptions', 'forum/components/SubscriptionMenu', SubscriptionMenu);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Switch');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'fas fa-star';\n }\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n return app.route.discussion(discussion, content.postNumber);\n }\n content() {\n return app.translator.trans('flarum-subscriptions.forum.notifications.new_post_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-subscriptions', 'forum/components/NewPostNotification', NewPostNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class SubscriptionGambit {\n pattern() {\n return 'is:(follow|ignor)(?:ing|ed)';\n }\n toFilter(matches, negate) {\n const type = matches[1] === 'follow' ? 'following' : 'ignoring';\n return {\n subscription: type\n };\n }\n filterKey() {\n return 'subscription';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:\").concat(value);\n }\n}\nflarum.reg.add('flarum-subscriptions', 'common/query/discussions/SubscriptionGambit', SubscriptionGambit);","import Extend from 'flarum/common/extenders';\nimport SubscriptionGambit from './query/discussions/SubscriptionGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', SubscriptionGambit)];","import Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('following', '/following', IndexPage), new Extend.Model(Discussion) //\n.attribute('subscription')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport addSubscriptionBadge from './addSubscriptionBadge';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addSubscriptionFilter from './addSubscriptionFilter';\nimport addSubscriptionSettings from './addSubscriptionSettings';\nimport NewPostNotification from './components/NewPostNotification';\nexport { default as extend } from './extend';\napp.initializers.add('subscriptions', function () {\n app.notificationComponents.newPost = NewPostNotification;\n addSubscriptionBadge();\n addSubscriptionControls();\n addSubscriptionFilter();\n addSubscriptionSettings();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('newPost', {\n name: 'newPost',\n icon: 'fas fa-star',\n label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n let badge;\n switch (this.subscription()) {\n case 'follow':\n badge = m(Badge, {\n label: app.translator.trans('flarum-subscriptions.forum.badge.following_tooltip'),\n icon: \"fas fa-star\",\n type: \"following\"\n });\n break;\n case 'ignore':\n badge = m(Badge, {\n label: app.translator.trans('flarum-subscriptions.forum.badge.ignoring_tooltip'),\n icon: \"far fa-eye-slash\",\n type: \"ignoring\"\n });\n break;\n }\n if (badge) {\n badges.add('subscription', badge);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport SubscriptionMenu from './components/SubscriptionMenu';\nexport default function addSubscriptionControls() {\n extend(DiscussionControls, 'userControls', function (items, discussion, context) {\n if (app.session.user && !(context instanceof DiscussionPage)) {\n const states = {\n none: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'),\n icon: 'fas fa-star',\n save: 'follow'\n },\n follow: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'),\n icon: 'far fa-star',\n save: null\n },\n ignore: {\n label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'),\n icon: 'fas fa-eye',\n save: null\n }\n };\n const subscription = discussion.subscription() || 'none';\n items.add('subscription', m(Button, {\n icon: states[subscription].icon,\n onclick: discussion.save.bind(discussion, {\n subscription: states[subscription].save\n })\n }, states[subscription].label));\n }\n });\n extend(DiscussionPage.prototype, 'sidebarItems', function (items) {\n if (app.session.user) {\n const discussion = this.discussion;\n items.add('subscription', m(SubscriptionMenu, {\n discussion: discussion\n }), 80);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nexport default function addSubscriptionFilter() {\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n if (app.session.user) {\n const params = app.search.stickyParams();\n items.add('following', m(LinkButton, {\n href: app.route('following', params),\n icon: \"fas fa-star\"\n }, app.translator.trans('flarum-subscriptions.forum.index.following_link')), 50);\n }\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'following') {\n app.setTitle(app.translator.trans('flarum-subscriptions.forum.following.meta_title_text'));\n }\n });\n extend(GlobalSearchState.prototype, 'params', function (params) {\n // We can't set `q` here directly, as that would make the search bar\n // think that text has been entered, and display the \"clear\" button.\n params.onFollowing = app.current.get('routeName') === 'following';\n });\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (this.params.onFollowing) {\n params.filter || (params.filter = {});\n params.filter.subscription = 'following';\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Switch from 'flarum/common/components/Switch';\nexport default function () {\n extend('flarum/forum/components/SettingsPage', 'notificationsItems', function (items) {\n var _preferences;\n items.add('followAfterReply', m(Switch, {\n state: this.user.preferences().followAfterReply,\n onchange: value => {\n this.followAfterReplyLoading = true;\n this.user.savePreferences({\n followAfterReply: value\n }).then(() => {\n this.followAfterReplyLoading = false;\n m.redraw();\n });\n },\n loading: this.followAfterReplyLoading\n }, app.translator.trans('flarum-subscriptions.forum.settings.follow_after_reply_label')));\n items.add('notifyForAllPosts', m(Switch, {\n id: \"flarum_subscriptions__notify_for_all_posts\",\n state: !!((_preferences = this.user.preferences()) != null && _preferences['flarum-subscriptions.notify_for_all_posts']),\n onchange: val => {\n this.user.savePreferences({\n 'flarum-subscriptions.notify_for_all_posts': val\n });\n }\n }, app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","undefined","res","TypeError","String","toPropertyKey","configurable","writable","SubscriptionMenu","super","arguments","this","subscription","icon","label","description","null","follow","ignore","view","discussion","attrs","buttonAttrs","possibleButtonAttrs","preferences","notifyEmail","notifyAlert","tooltipText","shouldShowTooltip","m","className","buttonClassName","concat","tooltip","mainAction","onclick","saveSubscription","bind","indexOf","options","map","assign","active","save","$","add","NewPostNotification","href","notification","subject","content","postNumber","user","fromUser","excerpt","SubscriptionGambit","pattern","toFilter","matches","negate","filterKey","fromFilter","gambit","attribute","extend","badges","badge","type","items","context","states","none","params","onFollowing","filter","_preferences","state","followAfterReply","onchange","followAfterReplyLoading","savePreferences","then","redraw","loading","id","val","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/suspend/js/dist/admin.js b/extensions/suspend/js/dist/admin.js index ed3cd476e5..591211d79c 100644 --- a/extensions/suspend/js/dist/admin.js +++ b/extensions/suspend/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:r=>{var a=r&&r.__esModule?()=>r.default:()=>r;return e.d(a,{a}),a},d:(r,a)=>{for(var s in a)e.o(a,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:a[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r);const a=flarum.reg.get("core","admin/app");var s=e.n(a);s().initializers.add("flarum-suspend",(()=>{s().extensionData.for("flarum-suspend").registerPermission({icon:"fas fa-ban",label:s().translator.trans("flarum-suspend.admin.permissions.suspend_users_label"),permission:"user.suspend"},"moderate")}))})(),module.exports=r})(); +(()=>{var e={n:r=>{var s=r&&r.__esModule?()=>r.default:()=>r;return e.d(s,{a:s}),s},d:(r,s)=>{for(var n in s)e.o(s,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:s[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>d});const s=flarum.reg.get("core","admin/app");var n=e.n(s);const t=flarum.reg.get("core","common/extenders");var a=e.n(t);class o{pattern(){return"is:suspended"}toFilter(e,r){return{[(r?"-":"")+"suspended"]:!0}}filterKey(){return"suspended"}fromFilter(e,r){return"".concat(r?"-":"","is:suspended")}}flarum.reg.add("flarum-suspend","common/query/users/SuspendedGambit",o);const d=[(new(a().Search)).gambit("users",o)];n().initializers.add("flarum-suspend",(()=>{n().extensionData.for("flarum-suspend").registerPermission({icon:"fas fa-ban",label:n().translator.trans("flarum-suspend.admin.permissions.suspend_users_label"),permission:"user.suspend"},"moderate")}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/suspend/js/dist/admin.js.map b/extensions/suspend/js/dist/admin.js.map index 048cc7b61e..d076adce78 100644 --- a/extensions/suspend/js/dist/admin.js.map +++ b/extensions/suspend/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,kBAAkB,KACrC,sBAAsB,kBAAkBW,mBAAmB,CACzDC,KAAM,aACNC,MAAO,qBAAqB,wDAC5BC,WAAY,gBACX,WAAW,G","sources":["webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/webpack/runtime/compat get default export","webpack://@flarum/suspend/webpack/runtime/define property getters","webpack://@flarum/suspend/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/suspend/webpack/runtime/make namespace object","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/suspend/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('flarum-suspend', () => {\n app.extensionData.for('flarum-suspend').registerPermission({\n icon: 'fas fa-ban',\n label: app.translator.trans('flarum-suspend.admin.permissions.suspend_users_label'),\n permission: 'user.suspend'\n }, 'moderate');\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,cACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,cAEzB,EAEX,CACAC,YACE,MAAO,WACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,eACtC,EAEFN,OAAOC,IAAIS,IAAI,iBAAkB,qCAAsCR,GCfvE,UAAgB,IAAI,aACnBS,OAAO,QAAST,ICDjB,qBAAqB,kBAAkB,KACrC,sBAAsB,kBAAkBU,mBAAmB,CACzDC,KAAM,aACNC,MAAO,qBAAqB,wDAC5BC,WAAY,gBACX,WAAW,G","sources":["webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/webpack/runtime/compat get default export","webpack://@flarum/suspend/webpack/runtime/define property getters","webpack://@flarum/suspend/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/suspend/webpack/runtime/make namespace object","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/suspend/./src/common/query/users/SuspendedGambit.ts","webpack://@flarum/suspend/./src/common/extend.ts","webpack://@flarum/suspend/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class SuspendedGambit {\n pattern() {\n return 'is:suspended';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'suspended';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'suspended';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:suspended\");\n }\n}\nflarum.reg.add('flarum-suspend', 'common/query/users/SuspendedGambit', SuspendedGambit);","import Extend from 'flarum/common/extenders';\nimport SuspendedGambit from './query/users/SuspendedGambit';\nexport default [new Extend.Search() //\n.gambit('users', SuspendedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-suspend', () => {\n app.extensionData.for('flarum-suspend').registerPermission({\n icon: 'fas fa-ban',\n label: app.translator.trans('flarum-suspend.admin.permissions.suspend_users_label'),\n permission: 'user.suspend'\n }, 'moderate');\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","SuspendedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/suspend/js/dist/forum.js b/extensions/suspend/js/dist/forum.js index 432431f884..291347d1bb 100644 --- a/extensions/suspend/js/dist/forum.js +++ b/extensions/suspend/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={860:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,s="millisecond",n="second",r="minute",i="hour",a="day",o="week",u="month",l="quarter",d="year",c="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],s=t%100;return"["+t+(e[(s-20)%10]||e[s]||e[0])+"]"}},g=function(t,e,s){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(s)+t},v={s:g,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),n=Math.floor(s/60),r=s%60;return(e<=0?"+":"-")+g(n,2,"0")+":"+g(r,2,"0")},m:function t(e,s){if(e.date()1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!n&&r&&($=r),r||!n&&$},M=function(t,e){if(b(t))return t.clone();var s="object"==typeof e?e:{};return s.date=t,s.args=arguments,new _(s)},w=v;w.l=S,w.i=b,w.w=function(t,e){return M(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function p(t){this.$L=S(t.locale,null,!0),this.parse(t)}var g=p.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,s=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var r=n[2]-1||0,i=(n[7]||"0").substring(0,3);return s?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return w},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(t,e){var s=M(t);return this.startOf(e)<=s&&s<=this.endOf(e)},g.isAfter=function(t,e){return M(t){var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";s.r(n),s.d(n,{extend:()=>Q});const t=flarum.reg.get("core","common/extend"),e=flarum.reg.get("core","forum/app");var r=s.n(e);const i=flarum.reg.get("core","forum/utils/UserControls");var a=s.n(i);const o=flarum.reg.get("core","common/components/Button");var u=s.n(o);const l=flarum.reg.get("core","common/components/Badge");var d=s.n(l);const c=flarum.reg.get("core","common/models/User");var f=s.n(c);const h=flarum.reg.get("core","common/components/FormModal");var p=s.n(h);const g=flarum.reg.get("core","common/utils/Stream");var v=s.n(g);const y=flarum.reg.get("core","common/utils/withAttr");var b=s.n(y);const S=flarum.reg.get("core","common/utils/ItemList");var M=s.n(S),w=s(860),_=s.n(w),D=s(329),x=s.n(D);function O(){return new Date("2038-01-01")}function N(t){return _().utc(t).isSame(_().utc("2038-01-01"))}function T(t){return T="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},T(t)}function U(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==T(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var n=s.call(t,e);if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===T(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}_().extend(x()),flarum.reg.add("flarum-suspend","forum/helpers/suspensionHelper",{getPermanentSuspensionDate:O,isPermanentSuspensionDate:N,localStorageKey:function(){return"flarum-suspend.acknowledge-suspension"}});class k{constructor(){U(this,"element",void 0),U(this,"attrs",void 0),U(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const s={...t};return m(this,s,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("[".concat(this.constructor.name,'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute'));if("tag"in t)throw new Error("[".concat(this.constructor.name,'] You cannot use the "tag" attribute name with Mithril 2.'))}this.attrs=t}static initAttrs(t){}}function C(t){var e,s,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ee&&(e=null),e&&(r=9999===e.getFullYear()?"indefinitely":"limited"),this.status=v()(r),this.reason=v()(s),this.message=v()(n),this.daysRemaining=v()("limited"===r&&1-dayjs().diff(e,"days"))}className(){return"SuspendUserModal Modal--medium"}title(){return r().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})}content(){return m("div",{className:"Modal-body"},m(j,null,this.formItems().toArray(),m("div",{className:"Form-group Form-controls"},m(u(),{className:"Button Button--primary",loading:this.loading,type:"submit"},r().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))}radioItems(){const t=new(M());return t.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:b()("value",this.status)}),r().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),t.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:b()("value",this.status)}),r().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),t.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:t=>{this.status(t.target.value),m.redraw.sync(),this.$(".SuspendUserModal-days-input input").select(),t.redraw=!1}}),r().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:b()("value",this.daysRemaining),className:"FormControl"}),r().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),t}formItems(){const t=new(M());return t.add("radioItems",m(I,{label:r().translator.trans("flarum-suspend.forum.suspend_user.status_heading")},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-suspend.forum.suspend_user.reason")),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:r().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"4"})),90),t.add("message",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-suspend.forum.suspend_user.display_message")),m("textarea",{className:"FormControl",bidi:this.message,placeholder:r().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"4"})),80),t}onsubmit(t){t.preventDefault(),this.loading=!0;let e=null;switch(this.status()){case"indefinitely":e=O();break;case"limited":e=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:e,suspendReason:this.reason(),suspendMessage:this.message()}).then((()=>this.hide()),this.loaded.bind(this))}}flarum.reg.add("flarum-suspend","forum/components/SuspendUserModal",H);const A=flarum.reg.get("core","forum/components/Notification");var L=s.n(A);class P extends(L()){icon(){return"fas fa-ban"}href(){return r().route.user(this.attrs.notification.subject())}content(){const t=this.attrs.notification,e=t.content(),s=dayjs(e).from(t.createdAt(),!0);return N(e)?r().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):r().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:s})}excerpt(){return null}}flarum.reg.add("flarum-suspend","forum/components/UserSuspendedNotification",P);class W extends(L()){icon(){return"fas fa-ban"}href(){return r().route.user(this.attrs.notification.subject())}content(){return this.attrs.notification,r().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")}excerpt(){return null}}flarum.reg.add("flarum-suspend","forum/components/UserUnsuspendedNotification",W);const B=flarum.reg.get("core","common/components/Modal");var R=s.n(B);const z=flarum.reg.get("core","common/helpers/fullTime");var E=s.n(z);class Z extends(R()){oninit(t){super.oninit(t),this.message=this.attrs.message,this.until=this.attrs.until}className(){return"SuspensionInfoModal Modal"}title(){return r().translator.trans("flarum-suspend.forum.suspension_info.title")}content(){const t=N(new Date(this.until))?r().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):r().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:E()(this.until)});return m("div",{className:"Modal-body"},m(j,{className:"Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group Form-controls"},m(u(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},r().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))}hide(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()}}flarum.reg.add("flarum-suspend","forum/components/SuspensionInfoModal",Z);const J=flarum.reg.get("core","common/extenders");var V=s.n(J);const q=flarum.reg.get("core","common/Model");var K=s.n(q);const Q=[new(V().Model)(f()).attribute("canSuspend").attribute("suspendedUntil",K().transformDate).attribute("suspendReason").attribute("suspendMessage")];r().initializers.add("flarum-suspend",(()=>{r().notificationComponents.userSuspended=P,r().notificationComponents.userUnsuspended=W,(0,t.extend)(a(),"moderationControls",((t,e)=>{e.canSuspend()&&t.add("suspend",m(u(),{icon:"fas fa-ban",onclick:()=>r().modal.show(H,{user:e})},r().translator.trans("flarum-suspend.forum.user_controls.suspend_button")))})),(0,t.extend)(f().prototype,"badges",(function(t){const e=this.suspendedUntil();new Date{if(r().session.user){const t=r().session.user.suspendMessage(),e=r().session.user.suspendedUntil(),s=t&&e&&new Date{var t={860:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,s="millisecond",n="second",r="minute",i="hour",a="day",o="week",u="month",l="quarter",d="year",c="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],s=t%100;return"["+t+(e[(s-20)%10]||e[s]||e[0])+"]"}},g=function(t,e,s){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(s)+t},v={s:g,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),n=Math.floor(s/60),r=s%60;return(e<=0?"+":"-")+g(n,2,"0")+":"+g(r,2,"0")},m:function t(e,s){if(e.date()1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!n&&r&&($=r),r||!n&&$},M=function(t,e){if(b(t))return t.clone();var s="object"==typeof e?e:{};return s.date=t,s.args=arguments,new _(s)},w=v;w.l=S,w.i=b,w.w=function(t,e){return M(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function p(t){this.$L=S(t.locale,null,!0),this.parse(t)}var g=p.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,s=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var r=n[2]-1||0,i=(n[7]||"0").substring(0,3);return s?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return w},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(t,e){var s=M(t);return this.startOf(e)<=s&&s<=this.endOf(e)},g.isAfter=function(t,e){return M(t){var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";s.r(n),s.d(n,{extend:()=>Q});const t=flarum.reg.get("core","common/extend"),e=flarum.reg.get("core","forum/app");var r=s.n(e);const i=flarum.reg.get("core","forum/utils/UserControls");var a=s.n(i);const o=flarum.reg.get("core","common/components/Button");var u=s.n(o);const l=flarum.reg.get("core","common/components/Badge");var d=s.n(l);const c=flarum.reg.get("core","common/models/User");var f=s.n(c);const h=flarum.reg.get("core","common/components/FormModal");var p=s.n(h);const g=flarum.reg.get("core","common/utils/Stream");var v=s.n(g);const y=flarum.reg.get("core","common/utils/withAttr");var b=s.n(y);const S=flarum.reg.get("core","common/utils/ItemList");var M=s.n(S),w=s(860),_=s.n(w),D=s(329),x=s.n(D);function O(){return new Date("2038-01-01")}function N(t){return _().utc(t).isSame(_().utc("2038-01-01"))}function T(t){return T="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},T(t)}function U(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==T(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var n=s.call(t,e);if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===T(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}_().extend(x()),flarum.reg.add("flarum-suspend","forum/helpers/suspensionHelper",{getPermanentSuspensionDate:O,isPermanentSuspensionDate:N,localStorageKey:function(){return"flarum-suspend.acknowledge-suspension"}});class k{constructor(){U(this,"element",void 0),U(this,"attrs",void 0),U(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const s={...t};return m(this,s,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("[".concat(this.constructor.name,'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute'));if("tag"in t)throw new Error("[".concat(this.constructor.name,'] You cannot use the "tag" attribute name with Mithril 2.'))}this.attrs=t}static initAttrs(t){}}function F(t){var e,s,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ee&&(e=null),e&&(r=9999===e.getFullYear()?"indefinitely":"limited"),this.status=v()(r),this.reason=v()(s),this.message=v()(n),this.daysRemaining=v()("limited"===r&&1-dayjs().diff(e,"days"))}className(){return"SuspendUserModal Modal--medium"}title(){return r().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})}content(){return m("div",{className:"Modal-body"},m(j,null,this.formItems().toArray(),m("div",{className:"Form-group Form-controls"},m(u(),{className:"Button Button--primary",loading:this.loading,type:"submit"},r().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))}radioItems(){const t=new(M());return t.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:b()("value",this.status)}),r().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),t.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:b()("value",this.status)}),r().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),t.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:t=>{this.status(t.target.value),m.redraw.sync(),this.$(".SuspendUserModal-days-input input").select(),t.redraw=!1}}),r().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:b()("value",this.daysRemaining),className:"FormControl"}),r().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),t}formItems(){const t=new(M());return t.add("radioItems",m(I,{label:r().translator.trans("flarum-suspend.forum.suspend_user.status_heading")},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-suspend.forum.suspend_user.reason")),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:r().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"4"})),90),t.add("message",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-suspend.forum.suspend_user.display_message")),m("textarea",{className:"FormControl",bidi:this.message,placeholder:r().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"4"})),80),t}onsubmit(t){t.preventDefault(),this.loading=!0;let e=null;switch(this.status()){case"indefinitely":e=O();break;case"limited":e=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:e,suspendReason:this.reason(),suspendMessage:this.message()}).then((()=>this.hide()),this.loaded.bind(this))}}flarum.reg.add("flarum-suspend","forum/components/SuspendUserModal",H);const A=flarum.reg.get("core","forum/components/Notification");var L=s.n(A);class P extends(L()){icon(){return"fas fa-ban"}href(){return r().route.user(this.attrs.notification.subject())}content(){const t=this.attrs.notification,e=t.content(),s=dayjs(e).from(t.createdAt(),!0);return N(e)?r().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):r().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:s})}excerpt(){return null}}flarum.reg.add("flarum-suspend","forum/components/UserSuspendedNotification",P);class W extends(L()){icon(){return"fas fa-ban"}href(){return r().route.user(this.attrs.notification.subject())}content(){return this.attrs.notification,r().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")}excerpt(){return null}}flarum.reg.add("flarum-suspend","forum/components/UserUnsuspendedNotification",W);const B=flarum.reg.get("core","common/components/Modal");var R=s.n(B);const z=flarum.reg.get("core","common/helpers/fullTime");var E=s.n(z);class Z extends(R()){oninit(t){super.oninit(t),this.message=this.attrs.message,this.until=this.attrs.until}className(){return"SuspensionInfoModal Modal"}title(){return r().translator.trans("flarum-suspend.forum.suspension_info.title")}content(){const t=N(new Date(this.until))?r().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):r().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:E()(this.until)});return m("div",{className:"Modal-body"},m(j,{className:"Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group Form-controls"},m(u(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},r().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))}hide(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()}}flarum.reg.add("flarum-suspend","forum/components/SuspensionInfoModal",Z);const J=flarum.reg.get("core","common/extenders");var V=s.n(J);const q=flarum.reg.get("core","common/Model");var K=s.n(q);class G{pattern(){return"is:suspended"}toFilter(t,e){return{[(e?"-":"")+"suspended"]:!0}}filterKey(){return"suspended"}fromFilter(t,e){return"".concat(e?"-":"","is:suspended")}}flarum.reg.add("flarum-suspend","common/query/users/SuspendedGambit",G);const Q=[(new(V().Search)).gambit("users",G),new(V().Model)(f()).attribute("canSuspend").attribute("suspendedUntil",K().transformDate).attribute("suspendReason").attribute("suspendMessage")];r().initializers.add("flarum-suspend",(()=>{r().notificationComponents.userSuspended=P,r().notificationComponents.userUnsuspended=W,(0,t.extend)(a(),"moderationControls",((t,e)=>{e.canSuspend()&&t.add("suspend",m(u(),{icon:"fas fa-ban",onclick:()=>r().modal.show(H,{user:e})},r().translator.trans("flarum-suspend.forum.user_controls.suspend_button")))})),(0,t.extend)(f().prototype,"badges",(function(t){const e=this.suspendedUntil();new Date{if(r().session.user){const t=r().session.user.suspendMessage(),e=r().session.user.suspendedUntil(),s=t&&e&&new Date=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/UserControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FormModal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/Stream');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/withAttr');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\ndayjs.extend(utc);\nexport function getPermanentSuspensionDate() {\n return new Date('2038-01-01');\n}\nexport function isPermanentSuspensionDate(date) {\n return dayjs.utc(date).isSame(dayjs.utc('2038-01-01'));\n}\nexport function localStorageKey() {\n return 'flarum-suspend.acknowledge-suspension';\n}\nflarum.reg.add('flarum-suspend', 'forum/helpers/suspensionHelper', { getPermanentSuspensionDate: getPermanentSuspensionDate,isPermanentSuspensionDate: isPermanentSuspensionDate,localStorageKey: localStorageKey, });","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div',

Hello World

);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default class Component {\n constructor() {\n /**\n * The root DOM element for the component.\n */\n _defineProperty(this, \"element\", void 0);\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n _defineProperty(this, \"attrs\", void 0);\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n _defineProperty(this, \"state\", void 0);\n }\n /**\n * @inheritdoc\n */\n /**\n * @inheritdoc\n */\n oninit(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector) {\n const $element = $(this.element);\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component(attrs, children) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (children === void 0) {\n children = null;\n }\n const componentAttrs = {\n ...attrs\n };\n return m(this, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n setAttrs(attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n this.constructor.initAttrs(attrs);\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] The \\\"children\\\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute\"));\n }\n if ('tag' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] You cannot use the \\\"tag\\\" attribute name with Mithril 2.\"));\n }\n }\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs) {}\n}\nflarum.reg.add('flarum-suspend', '../../../../framework/core/js/src/common/Component', Component);","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t until) until = null;\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';else status = 'limited';\n }\n this.status = Stream(status);\n this.reason = Stream(reason);\n this.message = Stream(message);\n this.daysRemaining = Stream(status === 'limited' && -dayjs().diff(until, 'days') + 1);\n }\n className() {\n return 'SuspendUserModal Modal--medium';\n }\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', {\n user: this.attrs.user\n });\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, this.formItems().toArray(), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n className: \"Button Button--primary\",\n loading: this.loading,\n type: \"submit\"\n }, app.translator.trans('flarum-suspend.forum.suspend_user.submit_button')))));\n }\n radioItems() {\n const items = new ItemList();\n items.add('not-suspended', m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: !this.status(),\n value: \"\",\n onclick: withAttr('value', this.status)\n }), app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')), 100);\n items.add('indefinitely', m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: this.status() === 'indefinitely',\n value: \"indefinitely\",\n onclick: withAttr('value', this.status)\n }), app.translator.trans('flarum-suspend.forum.suspend_user.indefinitely_label')), 90);\n items.add('time-suspension', m(\"label\", {\n className: \"checkbox SuspendUserModal-days\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: this.status() === 'limited',\n value: \"limited\",\n onclick: e => {\n this.status(e.target.value);\n m.redraw.sync();\n this.$('.SuspendUserModal-days-input input').select();\n e.redraw = false;\n }\n }), app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_label'), this.status() === 'limited' && m(\"div\", {\n className: \"SuspendUserModal-days-input\"\n }, m(\"input\", {\n type: \"number\",\n min: \"0\",\n value: this.daysRemaining(),\n oninput: withAttr('value', this.daysRemaining),\n className: \"FormControl\"\n }), app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_days_text'))), 80);\n return items;\n }\n formItems() {\n const items = new ItemList();\n items.add('radioItems', m(FieldSet, {\n label: app.translator.trans('flarum-suspend.forum.suspend_user.status_heading')\n }, this.radioItems().toArray()), 100);\n items.add('reason', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-suspend.forum.suspend_user.reason')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.reason,\n placeholder: app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional'),\n rows: \"4\"\n })), 90);\n items.add('message', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-suspend.forum.suspend_user.display_message')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.message,\n placeholder: app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional'),\n rows: \"4\"\n })), 80);\n return items;\n }\n onsubmit(e) {\n e.preventDefault();\n this.loading = true;\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = getPermanentSuspensionDate();\n break;\n case 'limited':\n suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();\n break;\n default:\n // no default\n }\n\n this.attrs.user.save({\n suspendedUntil,\n suspendReason: this.reason(),\n suspendMessage: this.message()\n }).then(() => this.hide(), this.loaded.bind(this));\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/SuspendUserModal', SuspendUserModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { isPermanentSuspensionDate } from '../helpers/suspensionHelper';\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n content() {\n const notification = this.attrs.notification;\n const suspendedUntil = notification.content();\n const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);\n return isPermanentSuspensionDate(suspendedUntil) ? app.translator.trans('flarum-suspend.forum.notifications.user_suspended_indefinite_text') : app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n timeReadable\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/UserSuspendedNotification', UserSuspendedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n content() {\n const notification = this.attrs.notification;\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text');\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/UserUnsuspendedNotification', UserUnsuspendedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/fullTime');","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport { isPermanentSuspensionDate, localStorageKey } from '../helpers/suspensionHelper';\nimport Form from '@flarum/core/src/common/components/Form';\nexport default class SuspensionInfoModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.message = this.attrs.message;\n this.until = this.attrs.until;\n }\n className() {\n return 'SuspensionInfoModal Modal';\n }\n title() {\n return app.translator.trans('flarum-suspend.forum.suspension_info.title');\n }\n content() {\n const timespan = isPermanentSuspensionDate(new Date(this.until)) ? app.translator.trans('flarum-suspend.forum.suspension_info.indefinite') : app.translator.trans('flarum-suspend.forum.suspension_info.limited', {\n date: fullTime(this.until)\n });\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"p\", {\n className: \"helpText\"\n }, this.message), m(\"p\", {\n className: \"helpText\"\n }, timespan), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n className: \"Button Button--primary Button--block\",\n onclick: this.hide.bind(this)\n }, app.translator.trans('flarum-suspend.forum.suspension_info.dismiss_button')))));\n }\n hide() {\n localStorage.setItem(localStorageKey(), this.attrs.until.getTime());\n this.attrs.state.close();\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/SuspensionInfoModal', SuspensionInfoModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\nexport default [new Extend.Model(User).attribute('canSuspend').attribute('suspendedUntil', Model.transformDate).attribute('suspendReason').attribute('suspendMessage')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport Badge from 'flarum/common/components/Badge';\nimport User from 'flarum/common/models/User';\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add('suspend', m(Button, {\n icon: \"fas fa-ban\",\n onclick: () => app.modal.show(SuspendUserModal, {\n user\n })\n }, app.translator.trans('flarum-suspend.forum.user_controls.suspend_button')));\n }\n });\n extend(User.prototype, 'badges', function (items) {\n const until = this.suspendedUntil();\n if (new Date() < until) {\n items.add('suspended', m(Badge, {\n icon: \"fas fa-ban\",\n type: \"suspended\",\n label: app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip')\n }), 100);\n }\n });\n checkForSuspension();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport { localStorageKey } from './helpers/suspensionHelper';\nexport default function () {\n return setTimeout(() => {\n if (app.session.user) {\n const message = app.session.user.suspendMessage();\n const until = app.session.user.suspendedUntil();\n const isSuspended = message && until && new Date() < until;\n const alreadyDisplayed = localStorage.getItem(localStorageKey()) === (until == null ? void 0 : until.getTime().toString());\n if (isSuspended && !alreadyDisplayed) {\n app.modal.show(SuspensionInfoModal, {\n message,\n until\n });\n } else if (localStorage.getItem(localStorageKey())) {\n localStorage.removeItem(localStorageKey());\n }\n }\n }, 0);\n}"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","local","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","reg","getPermanentSuspensionDate","isPermanentSuspensionDate","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","res","TypeError","toPropertyKey","configurable","writable","localStorageKey","Component","oninit","vnode","setAttrs","attrs","oncreate","element","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","selector","$element","find","static","children","componentAttrs","initAttrs","Error","concat","isArray","classList","Form","view","label","description","className","assign","FieldSet","role","SuspendUserModal","super","until","user","suspendedUntil","reason","suspendReason","message","suspendMessage","status","daysRemaining","dayjs","title","content","formItems","toArray","loading","type","radioItems","items","checked","onclick","target","redraw","sync","select","oninput","bidi","placeholder","rows","onsubmit","preventDefault","save","then","hide","loaded","bind","UserSuspendedNotification","icon","href","notification","subject","timeReadable","from","createdAt","excerpt","UserUnsuspendedNotification","SuspensionInfoModal","timespan","localStorage","setItem","state","close","attribute","canSuspend","setTimeout","isSuspended","alreadyDisplayed","getItem","removeItem"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"6BAAoEA,EAAOC,QAAmI,WAAW,aAAa,IAAUC,EAAE,IAAIC,EAAE,KAAKC,EAAE,cAAcC,EAAE,SAASC,EAAE,SAASC,EAAE,OAAOC,EAAE,MAAMC,EAAE,OAAOC,EAAE,QAAQC,EAAE,UAAUC,EAAE,OAAOC,EAAE,OAAOC,EAAE,eAAeC,EAAE,6FAA6FC,EAAE,sFAAsFC,EAAE,CAACC,KAAK,KAAKC,SAAS,2DAA2DC,MAAM,KAAKC,OAAO,wFAAwFD,MAAM,KAAKE,QAAQ,SAASC,GAAG,IAAIrB,EAAE,CAAC,KAAK,KAAK,KAAK,MAAMC,EAAEoB,EAAE,IAAI,MAAM,IAAIA,GAAGrB,GAAGC,EAAE,IAAI,KAAKD,EAAEC,IAAID,EAAE,IAAI,GAAG,GA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GAAWL,GAAS,IAAItK,KAASsK,EAC/C+D,EAAmBhB,aAAaiB,QvBCnC,4CuBD4E,MAAThE,OAAgB,EAASA,EAAMnI,UAAUV,YAC3G2M,IAAgBC,EAClB,eAAelB,EAAqB,CAClCxC,UACAL,UAEO+C,aAAaiB,QvBLrB,0CuBMDjB,aAAakB,WvBNZ,wCuBQL,IACC,EDeiB,G","sources":["webpack://@flarum/suspend/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/suspend/../../../node_modules/dayjs/plugin/utc.js","webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/webpack/runtime/compat get default export","webpack://@flarum/suspend/webpack/runtime/define property getters","webpack://@flarum/suspend/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/suspend/webpack/runtime/make namespace object","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'forum/utils/UserControls')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/utils/withAttr')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/suspend/./src/forum/helpers/suspensionHelper.ts","webpack://@flarum/suspend/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/suspend/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/suspend/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/suspend/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/suspend/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/suspend/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/suspend/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/suspend/../../../framework/core/js/src/common/components/Form.tsx","webpack://@flarum/suspend/../../../framework/core/js/src/common/components/FieldSet.tsx","webpack://@flarum/suspend/./src/forum/components/SuspendUserModal.js","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/suspend/./src/forum/components/UserSuspendedNotification.js","webpack://@flarum/suspend/./src/forum/components/UserUnsuspendedNotification.js","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/helpers/fullTime')\"","webpack://@flarum/suspend/./src/forum/components/SuspensionInfoModal.js","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/suspend/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/suspend/./src/common/query/users/SuspendedGambit.ts","webpack://@flarum/suspend/./src/common/extend.ts","webpack://@flarum/suspend/./src/forum/extend.ts","webpack://@flarum/suspend/./src/forum/index.js","webpack://@flarum/suspend/./src/forum/checkForSuspension.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/UserControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FormModal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/Stream');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/withAttr');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\ndayjs.extend(utc);\nexport function getPermanentSuspensionDate() {\n return new Date('2038-01-01');\n}\nexport function isPermanentSuspensionDate(date) {\n return dayjs.utc(date).isSame(dayjs.utc('2038-01-01'));\n}\nexport function localStorageKey() {\n return 'flarum-suspend.acknowledge-suspension';\n}\nflarum.reg.add('flarum-suspend', 'forum/helpers/suspensionHelper', { getPermanentSuspensionDate: getPermanentSuspensionDate,isPermanentSuspensionDate: isPermanentSuspensionDate,localStorageKey: localStorageKey, });","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div',

Hello World

);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default class Component {\n constructor() {\n /**\n * The root DOM element for the component.\n */\n _defineProperty(this, \"element\", void 0);\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n _defineProperty(this, \"attrs\", void 0);\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n _defineProperty(this, \"state\", void 0);\n }\n /**\n * @inheritdoc\n */\n /**\n * @inheritdoc\n */\n oninit(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector) {\n const $element = $(this.element);\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component(attrs, children) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (children === void 0) {\n children = null;\n }\n const componentAttrs = {\n ...attrs\n };\n return m(this, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n setAttrs(attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n this.constructor.initAttrs(attrs);\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] The \\\"children\\\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute\"));\n }\n if ('tag' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] You cannot use the \\\"tag\\\" attribute name with Mithril 2.\"));\n }\n }\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs) {}\n}\nflarum.reg.add('flarum-suspend', '../../../../framework/core/js/src/common/Component', Component);","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t until) until = null;\n if (until) {\n if (until.getFullYear() === 9999) status = 'indefinitely';else status = 'limited';\n }\n this.status = Stream(status);\n this.reason = Stream(reason);\n this.message = Stream(message);\n this.daysRemaining = Stream(status === 'limited' && -dayjs().diff(until, 'days') + 1);\n }\n className() {\n return 'SuspendUserModal Modal--medium';\n }\n title() {\n return app.translator.trans('flarum-suspend.forum.suspend_user.title', {\n user: this.attrs.user\n });\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, this.formItems().toArray(), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n className: \"Button Button--primary\",\n loading: this.loading,\n type: \"submit\"\n }, app.translator.trans('flarum-suspend.forum.suspend_user.submit_button')))));\n }\n radioItems() {\n const items = new ItemList();\n items.add('not-suspended', m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: !this.status(),\n value: \"\",\n onclick: withAttr('value', this.status)\n }), app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')), 100);\n items.add('indefinitely', m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: this.status() === 'indefinitely',\n value: \"indefinitely\",\n onclick: withAttr('value', this.status)\n }), app.translator.trans('flarum-suspend.forum.suspend_user.indefinitely_label')), 90);\n items.add('time-suspension', m(\"label\", {\n className: \"checkbox SuspendUserModal-days\"\n }, m(\"input\", {\n type: \"radio\",\n name: \"status\",\n checked: this.status() === 'limited',\n value: \"limited\",\n onclick: e => {\n this.status(e.target.value);\n m.redraw.sync();\n this.$('.SuspendUserModal-days-input input').select();\n e.redraw = false;\n }\n }), app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_label'), this.status() === 'limited' && m(\"div\", {\n className: \"SuspendUserModal-days-input\"\n }, m(\"input\", {\n type: \"number\",\n min: \"0\",\n value: this.daysRemaining(),\n oninput: withAttr('value', this.daysRemaining),\n className: \"FormControl\"\n }), app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_days_text'))), 80);\n return items;\n }\n formItems() {\n const items = new ItemList();\n items.add('radioItems', m(FieldSet, {\n label: app.translator.trans('flarum-suspend.forum.suspend_user.status_heading')\n }, this.radioItems().toArray()), 100);\n items.add('reason', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-suspend.forum.suspend_user.reason')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.reason,\n placeholder: app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional'),\n rows: \"4\"\n })), 90);\n items.add('message', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-suspend.forum.suspend_user.display_message')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.message,\n placeholder: app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional'),\n rows: \"4\"\n })), 80);\n return items;\n }\n onsubmit(e) {\n e.preventDefault();\n this.loading = true;\n let suspendedUntil = null;\n switch (this.status()) {\n case 'indefinitely':\n suspendedUntil = getPermanentSuspensionDate();\n break;\n case 'limited':\n suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();\n break;\n default:\n // no default\n }\n\n this.attrs.user.save({\n suspendedUntil,\n suspendReason: this.reason(),\n suspendMessage: this.message()\n }).then(() => this.hide(), this.loaded.bind(this));\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/SuspendUserModal', SuspendUserModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { isPermanentSuspensionDate } from '../helpers/suspensionHelper';\nexport default class UserSuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n content() {\n const notification = this.attrs.notification;\n const suspendedUntil = notification.content();\n const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);\n return isPermanentSuspensionDate(suspendedUntil) ? app.translator.trans('flarum-suspend.forum.notifications.user_suspended_indefinite_text') : app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n timeReadable\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/UserSuspendedNotification', UserSuspendedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class UserUnsuspendedNotification extends Notification {\n icon() {\n return 'fas fa-ban';\n }\n href() {\n return app.route.user(this.attrs.notification.subject());\n }\n content() {\n const notification = this.attrs.notification;\n return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text');\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/UserUnsuspendedNotification', UserUnsuspendedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/fullTime');","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport { isPermanentSuspensionDate, localStorageKey } from '../helpers/suspensionHelper';\nimport Form from '@flarum/core/src/common/components/Form';\nexport default class SuspensionInfoModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.message = this.attrs.message;\n this.until = this.attrs.until;\n }\n className() {\n return 'SuspensionInfoModal Modal';\n }\n title() {\n return app.translator.trans('flarum-suspend.forum.suspension_info.title');\n }\n content() {\n const timespan = isPermanentSuspensionDate(new Date(this.until)) ? app.translator.trans('flarum-suspend.forum.suspension_info.indefinite') : app.translator.trans('flarum-suspend.forum.suspension_info.limited', {\n date: fullTime(this.until)\n });\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"p\", {\n className: \"helpText\"\n }, this.message), m(\"p\", {\n className: \"helpText\"\n }, timespan), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n className: \"Button Button--primary Button--block\",\n onclick: this.hide.bind(this)\n }, app.translator.trans('flarum-suspend.forum.suspension_info.dismiss_button')))));\n }\n hide() {\n localStorage.setItem(localStorageKey(), this.attrs.until.getTime());\n this.attrs.state.close();\n }\n}\nflarum.reg.add('flarum-suspend', 'forum/components/SuspensionInfoModal', SuspensionInfoModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","export default class SuspendedGambit {\n pattern() {\n return 'is:suspended';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'suspended';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'suspended';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:suspended\");\n }\n}\nflarum.reg.add('flarum-suspend', 'common/query/users/SuspendedGambit', SuspendedGambit);","import Extend from 'flarum/common/extenders';\nimport SuspendedGambit from './query/users/SuspendedGambit';\nexport default [new Extend.Search() //\n.gambit('users', SuspendedGambit)];","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Model(User).attribute('canSuspend').attribute('suspendedUntil', Model.transformDate).attribute('suspendReason').attribute('suspendMessage')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport Badge from 'flarum/common/components/Badge';\nimport User from 'flarum/common/models/User';\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-suspend', () => {\n app.notificationComponents.userSuspended = UserSuspendedNotification;\n app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n extend(UserControls, 'moderationControls', (items, user) => {\n if (user.canSuspend()) {\n items.add('suspend', m(Button, {\n icon: \"fas fa-ban\",\n onclick: () => app.modal.show(SuspendUserModal, {\n user\n })\n }, app.translator.trans('flarum-suspend.forum.user_controls.suspend_button')));\n }\n });\n extend(User.prototype, 'badges', function (items) {\n const until = this.suspendedUntil();\n if (new Date() < until) {\n items.add('suspended', m(Badge, {\n icon: \"fas fa-ban\",\n type: \"suspended\",\n label: app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip')\n }), 100);\n }\n });\n checkForSuspension();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport { localStorageKey } from './helpers/suspensionHelper';\nexport default function () {\n return setTimeout(() => {\n if (app.session.user) {\n const message = app.session.user.suspendMessage();\n const until = app.session.user.suspendedUntil();\n const isSuspended = message && until && new Date() < until;\n const alreadyDisplayed = localStorage.getItem(localStorageKey()) === (until == null ? void 0 : until.getTime().toString());\n if (isSuspended && !alreadyDisplayed) {\n app.modal.show(SuspensionInfoModal, {\n message,\n until\n });\n } else if (localStorage.getItem(localStorageKey())) {\n localStorage.removeItem(localStorageKey());\n }\n }\n }, 0);\n}"],"names":["module","exports","e","n","r","i","s","u","a","o","f","h","c","d","l","$","y","M","name","weekdays","split","months","ordinal","t","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","_","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","forEach","extend","$i","isDayjs","en","Ls","local","call","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","key","Object","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","reg","getPermanentSuspensionDate","isPermanentSuspensionDate","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","res","TypeError","toPropertyKey","configurable","writable","localStorageKey","Component","oninit","vnode","setAttrs","attrs","oncreate","element","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","selector","$element","find","static","children","componentAttrs","initAttrs","Error","concat","isArray","classList","Form","view","label","description","className","assign","FieldSet","role","SuspendUserModal","super","until","user","suspendedUntil","reason","suspendReason","message","suspendMessage","status","daysRemaining","dayjs","title","content","formItems","toArray","loading","type","radioItems","items","checked","onclick","target","redraw","sync","select","oninput","bidi","placeholder","rows","onsubmit","preventDefault","save","then","hide","loaded","bind","UserSuspendedNotification","icon","href","notification","subject","timeReadable","from","createdAt","excerpt","UserUnsuspendedNotification","SuspensionInfoModal","timespan","localStorage","setItem","state","close","SuspendedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","gambit","attribute","canSuspend","setTimeout","isSuspended","alreadyDisplayed","getItem","removeItem"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts b/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts index 2498229d32..2e0bc512f3 100644 --- a/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts +++ b/extensions/tags/js/dist-typings/admin/components/EditTagModal.d.ts @@ -1,4 +1,4 @@ -/// +/// import FormModal, { IFormModalAttrs } from 'flarum/common/components/FormModal'; import ItemList from 'flarum/common/utils/ItemList'; import Stream from 'flarum/common/utils/Stream'; diff --git a/extensions/tags/js/dist-typings/common/extend.d.ts b/extensions/tags/js/dist-typings/common/extend.d.ts index 9bf46808b4..f83ce32041 100644 --- a/extensions/tags/js/dist-typings/common/extend.d.ts +++ b/extensions/tags/js/dist-typings/common/extend.d.ts @@ -1,2 +1,2 @@ -declare const _default: import("flarum/common/extenders/Store").default[]; +declare const _default: any[]; export default _default; diff --git a/extensions/tags/js/dist-typings/common/query/discussions/TagGambit.d.ts b/extensions/tags/js/dist-typings/common/query/discussions/TagGambit.d.ts new file mode 100644 index 0000000000..8ae129ffdd --- /dev/null +++ b/extensions/tags/js/dist-typings/common/query/discussions/TagGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from 'flarum/common/query/IGambit'; +export default class TagGambit implements IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts b/extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts index 1125020ebc..27900eacdd 100644 --- a/extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts +++ b/extensions/tags/js/dist-typings/forum/components/DiscussionTaggedPost.d.ts @@ -1,4 +1,4 @@ -/// +/// export default class DiscussionTaggedPost extends EventPost { static initAttrs(attrs: any): void; descriptionKey(): "flarum-tags.forum.post_stream.added_and_removed_tags_text" | "flarum-tags.forum.post_stream.added_tags_text" | "flarum-tags.forum.post_stream.removed_tags_text"; diff --git a/extensions/tags/js/dist-typings/forum/extend.d.ts b/extensions/tags/js/dist-typings/forum/extend.d.ts index 3bf01b829b..f83ce32041 100644 --- a/extensions/tags/js/dist-typings/forum/extend.d.ts +++ b/extensions/tags/js/dist-typings/forum/extend.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/PostTypes").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default)[]; +declare const _default: any[]; export default _default; diff --git a/extensions/tags/js/dist/admin.js b/extensions/tags/js/dist/admin.js index a6b1e7eda7..a1e2d44a6b 100644 --- a/extensions/tags/js/dist/admin.js +++ b/extensions/tags/js/dist/admin.js @@ -1,3 +1,3 @@ /*! For license information please see admin.js.LICENSE.txt */ -(()=>{var t,e,n={949:(t,e,n)=>{"use strict";n.d(e,{l:()=>pn});const o=flarum.reg.get("core","admin/app");var a=n.n(o);const r=flarum.reg.get("core","common/extend"),i=flarum.reg.get("core","admin/components/PermissionGrid");var s=n.n(i);const l=flarum.reg.get("core","admin/components/PermissionDropdown");var c=n.n(l);const u=flarum.reg.get("core","common/components/Dropdown");var d=n.n(u),h=n(645),g=n.n(h),p=n(149),f=n.n(p),v=n(924),b=n(974),y=n(648);function _(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)}const w=flarum.reg.get("core","admin/components/BasicsPage");var T=n.n(w);function S(){(0,r.extend)(T().prototype,"homePageItems",(t=>{t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))}const E=flarum.reg.get("core","admin/components/SettingDropdown");var D=n.n(E);const C=flarum.reg.get("core","admin/components/AdminPage");var x=n.n(C),N=n(905),O=n(433),P=n.n(O),I=(n(780),n(836)),M=n.n(I);function k(t,e){void 0===e&&(e={});const n=[],{link:o,...a}=e;return a.className=M()("TagsLabel",a.className),t?(0,y.Z)(t).forEach((e=>{(e||1===t.length)&&n.push((0,v.Z)(e,{link:o}))})):n.push((0,v.Z)()),m("span",a,n)}flarum.reg.add("flarum-tags","common/helpers/tagsLabel",k);class A extends(P()){constructor(){super(...arguments),(0,N.Z)(this,"tags",[]),(0,N.Z)(this,"loaded",!1)}view(){const t=JSON.parse(this.attrs.settingValue()||"[]");return this.loaded||a().tagList.load(["parent"]).then((e=>{this.tags=e.filter((e=>t.includes(e.id()))),this.loaded=!0,m.redraw()})),m("div",{className:"Form-group SelectTagsSettingComponent"},m("label",null,this.attrs.label),this.attrs.help&&m("p",{className:"helpText"},this.attrs.help),this.loaded?m(g(),{className:"Button Button--text",onclick:()=>a().modal.show((()=>n.e(162).then(n.bind(n,610))),{selectedTags:this.tags,onsubmit:t=>{this.tags=t,this.attrs.settingValue(JSON.stringify(t.map((t=>t.id()))))},...this.attrs.options})},this.tags.length?k(this.tags):m("span",{className:"TagLabel untagged"},a().translator.trans("flarum-tags.admin.settings.button_text"))):m(f(),{size:"small",display:"inline"}))}}function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function F(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function j(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}flarum.reg.add("flarum-tags","admin/components/SelectTagsSettingComponent",A),flarum.reg.addChunkModule("162","610","flarum-tags","common/components/TagSelectionModal");var H=j(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Z=j(/Edge/i),W=j(/firefox/i),z=j(/safari/i)&&!j(/chrome/i)&&!j(/android/i),G=j(/iP(ad|od|hone)/i),q=j(/chrome/i)&&j(/android/i),U={capture:!1,passive:!1};function V(t,e,n){t.addEventListener(e,n,!H&&U)}function K(t,e,n){t.removeEventListener(e,n,!H&&U)}function J(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function tt(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&J(t,e):J(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var et,nt=/\s+/g;function ot(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(nt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(nt," ")}}function at(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=at(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),a=0,r=o.length;if(n)for(;a=r:a<=r))return o;if(o===st())break;o=gt(o,!1)}return!1}function ut(t,e,n,o){for(var a=0,r=0,i=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,a=Y(n,St);Tt.pluginEvent.bind(fe)(t,e,F({dragEl:Ct,parentEl:xt,ghostEl:Nt,rootEl:Ot,nextEl:Pt,lastDownEl:It,cloneEl:Mt,cloneHidden:kt,dragStarted:Gt,putSortable:Xt,activeSortable:fe.active,originalEvent:o,oldIndex:At,oldDraggableIndex:Ft,newIndex:Lt,newDraggableIndex:Bt,hideGhostForTarget:me,unhideGhostForTarget:he,cloneNowHidden:function(){kt=!0},cloneNowShown:function(){kt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},a))};function Dt(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,a=t.targetEl,r=t.cloneEl,i=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[yt]){var p,f=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||H||Z?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=a||n,p.clone=r,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=u,p.newDraggableIndex=d,p.originalEvent=m,p.pullMode=h?h.lastPutMode:void 0;var b=F(F({},g),Tt.getEventProperties(o,e));for(var y in b)p[y]=b[y];n&&n.dispatchEvent(p),f[v]&&f[v].call(e,p)}}(F({putSortable:Xt,cloneEl:Mt,targetEl:Ct,rootEl:Ot,oldIndex:At,oldDraggableIndex:Ft,newIndex:Lt,newDraggableIndex:Bt},t))}var Ct,xt,Nt,Ot,Pt,It,Mt,kt,At,Lt,Ft,Bt,Rt,Xt,Yt,jt,Ht,Zt,Wt,zt,Gt,qt,Ut,$t,Vt,Kt=!1,Jt=!1,Qt=[],te=!1,ee=!1,ne=[],oe=!1,ae=[],re="undefined"!=typeof document,ie=G,se=Z||H?"cssFloat":"float",le=re&&!q&&!G&&"draggable"in document.createElement("div"),ce=function(){if(re){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),ue=function(t,e){var n=at(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=ut(t,0,e),r=ut(t,1,e),i=a&&at(a),s=r&&at(r),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+lt(a).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+lt(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[se]||r&&"none"===n[se]&&l+c>o)?"vertical":"horizontal"},de=function(t){function e(t,n){return function(o,a,r,i){var s=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,a,r,i),n)(o,a,r,i);var l=(n?o:a).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==B(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},me=function(){!ce&&Nt&&at(Nt,"display","none")},he=function(){!ce&&Nt&&at(Nt,"display","")};re&&!q&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ge=function(t){if(Ct){t=t.touches?t.touches[0]:t;var e=(a=t.clientX,r=t.clientY,Qt.some((function(t){var e=t[yt].options.emptyInsertThreshold;if(e&&!dt(t)){var n=lt(t),o=a>=n.left-e&&a<=n.right+e,s=r>=n.top-e&&r<=n.bottom+e;return o&&s?i=t:void 0}})),i);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[yt]._onDragOver(n)}}var a,r,i},pe=function(t){Ct&&Ct.parentNode[yt]._isOutsideThisEl(t.target)};function fe(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=X({},e),t[yt]=this;var n,o,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ue(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==fe.supportPointer&&"PointerEvent"in window&&!z,emptyInsertThreshold:5};for(var r in Tt.initializePlugins(this,t,a),a)!(r in e)&&(e[r]=a[r]);for(var i in de(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&le,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?V(t,"pointerdown",this._onTapStart):(V(t,"mousedown",this._onTapStart),V(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(V(t,"dragover",this),V(t,"dragenter",this)),Qt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),X(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==at(t,"display")&&t!==fe.ghost){o.push({target:t,rect:lt(t)});var e=F({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=rt(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var a=!1,r=0;o.forEach((function(t){var n=0,o=t.target,i=o.fromRect,s=lt(o),l=o.prevFromRect,c=o.prevToRect,u=t.rect,d=rt(o,!0);d&&(s.top-=d.f,s.left-=d.e),o.toRect=s,o.thisAnimationDuration&&pt(l,s)&&!pt(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(n=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,l,c,e.options)),pt(s,i)||(o.prevFromRect=i,o.prevToRect=s,n||(n=e.options.animation),e.animate(o,u,s,n)),n&&(a=!0,r=Math.max(r,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),a?n=setTimeout((function(){"function"==typeof t&&t()}),r):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){at(t,"transition",""),at(t,"transform","");var a=rt(this.el),r=a&&a.a,i=a&&a.d,s=(e.left-n.left)/(r||1),l=(e.top-n.top)/(i||1);t.animatingX=!!s,t.animatingY=!!l,at(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),at(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),at(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){at(t,"transition",""),at(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function ve(t,e,n,o,a,r,i,s){var l,c,u=t[yt],d=u.options.onMove;return!window.CustomEvent||H||Z?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=a||e,l.relatedRect=r||lt(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function be(t){t.draggable=!1}function ye(){oe=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function we(t){return setTimeout(t,0)}function Te(t){return clearTimeout(t)}fe.prototype={constructor:fe,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(qt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Ct):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,a=o.preventOnFilter,r=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){ae.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&ae.push(o)}}(n),!Ct&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!z||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=tt(s,o.draggable,n,!1))&&s.animated||It===s)){if(At=mt(s),Ft=mt(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Dt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Et("filter",e,{evt:t}),void(a&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=tt(l,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Et("filter",e,{evt:t}),!0}))))return void(a&&t.cancelable&&t.preventDefault());o.handle&&!tt(l,o.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var o,a=this,r=a.el,i=a.options,s=r.ownerDocument;if(n&&!Ct&&n.parentNode===r){var l=lt(n);if(Ot=r,xt=(Ct=n).parentNode,Pt=Ct.nextSibling,It=n,Rt=i.group,fe.dragged=Ct,Yt={target:Ct,clientX:(e||t).clientX,clientY:(e||t).clientY},Wt=Yt.clientX-l.left,zt=Yt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Ct.style["will-change"]="all",o=function(){Et("delayEnded",a,{evt:t}),fe.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!W&&a.nativeDraggable&&(Ct.draggable=!0),a._triggerDragStart(t,e),Dt({sortable:a,name:"choose",originalEvent:t}),ot(Ct,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){it(Ct,t.trim(),be)})),V(s,"dragover",ge),V(s,"mousemove",ge),V(s,"touchmove",ge),V(s,"mouseup",a._onDrop),V(s,"touchend",a._onDrop),V(s,"touchcancel",a._onDrop),W&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ct.draggable=!0),Et("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(Z||H))o();else{if(fe.eventCanceled)return void this._onDrop();V(s,"mouseup",a._disableDelayedDrag),V(s,"touchend",a._disableDelayedDrag),V(s,"touchcancel",a._disableDelayedDrag),V(s,"mousemove",a._delayedDragTouchMoveHandler),V(s,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&V(s,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ct&&be(Ct),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._disableDelayedDrag),K(t,"touchend",this._disableDelayedDrag),K(t,"touchcancel",this._disableDelayedDrag),K(t,"mousemove",this._delayedDragTouchMoveHandler),K(t,"touchmove",this._delayedDragTouchMoveHandler),K(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?V(document,"pointermove",this._onTouchMove):V(document,e?"touchmove":"mousemove",this._onTouchMove):(V(Ct,"dragend",this),V(Ot,"dragstart",this._onDragStart));try{document.selection?we((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Kt=!1,Ot&&Ct){Et("dragStarted",this,{evt:e}),this.nativeDraggable&&V(document,"dragover",pe);var n=this.options;!t&&ot(Ct,n.dragClass,!1),ot(Ct,n.ghostClass,!0),fe.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(jt){this._lastX=jt.clientX,this._lastY=jt.clientY,me();for(var t=document.elementFromPoint(jt.clientX,jt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(jt.clientX,jt.clientY))!==e;)e=t;if(Ct.parentNode[yt]._isOutsideThisEl(t),e)do{if(e[yt]&&e[yt]._onDragOver({clientX:jt.clientX,clientY:jt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Yt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,a=t.touches?t.touches[0]:t,r=Nt&&rt(Nt,!0),i=Nt&&r&&r.a,s=Nt&&r&&r.d,l=ie&&Vt&&ht(Vt),c=(a.clientX-Yt.clientX+o.x)/(i||1)+(l?l[0]-ne[0]:0)/(i||1),u=(a.clientY-Yt.clientY+o.y)/(s||1)+(l?l[1]-ne[1]:0)/(s||1);if(!fe.active&&!Kt){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,a,this)&&!p.animated){if(p===Ct)return I(!1);if(p&&r===t.target&&(i=p),i&&(n=lt(i)),!1!==ve(Ot,r,Ct,e,i,n,t,!!i))return P(),p&&p.nextSibling?r.insertBefore(Ct,p.nextSibling):r.appendChild(Ct),xt=r,M(),I(!0)}else if(p&&function(t,e,n){var o=lt(ut(n.el,0,n.options,!0));return e?t.clientXu+c*r/2:ld-$t)return-Ut}else if(l>u+c*(1-a)/2&&ld-c*r/2)?l>u+c/2?1:-1:0}(t,i,n,a,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ee,qt===i),0!==v){var D=mt(Ct);do{D-=v,y=xt.children[D]}while(y&&("none"===at(y,"display")||y===Nt))}if(0===v||y===i)return I(!1);qt=i,Ut=v;var C=i.nextElementSibling,x=!1,N=ve(Ot,r,Ct,e,i,n,t,x=1===v);if(!1!==N)return 1!==N&&-1!==N||(x=1===N),oe=!0,setTimeout(ye,30),P(),x&&!C?r.appendChild(Ct):i.parentNode.insertBefore(Ct,x?C:i),S&&vt(S,0,E-S.scrollTop),xt=Ct.parentNode,void 0===b||ee||($t=Math.abs(b-lt(i)[T])),M(),I(!0)}if(r.contains(Ct))return I(!1)}return!1}function O(s,l){Et(s,h,F({evt:t,isOwner:u,axis:a?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:m,target:i,completed:I,onMove:function(n,o){return ve(Ot,r,Ct,e,n,lt(n),t,o)},changed:M},l))}function P(){O("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function I(e){return O("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==m&&(ot(Ct,Xt?Xt.options.ghostClass:c.options.ghostClass,!1),ot(Ct,s.ghostClass,!0)),Xt!==h&&h!==fe.active?Xt=h:h===fe.active&&Xt&&(Xt=null),m===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){O("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(i===Ct&&!Ct.animated||i===r&&!i.animated)&&(qt=null),s.dragoverBubble||t.rootEl||i===document||(Ct.parentNode[yt]._isOutsideThisEl(t.target),!e&&ge(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function M(){Lt=mt(Ct),Bt=mt(Ct,s.draggable),Dt({sortable:h,name:"change",toEl:r,newIndex:Lt,newDraggableIndex:Bt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){K(document,"mousemove",this._onTouchMove),K(document,"touchmove",this._onTouchMove),K(document,"pointermove",this._onTouchMove),K(document,"dragover",ge),K(document,"mousemove",ge),K(document,"touchmove",ge)},_offUpEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._onDrop),K(t,"touchend",this._onDrop),K(t,"pointerup",this._onDrop),K(t,"touchcancel",this._onDrop),K(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Lt=mt(Ct),Bt=mt(Ct,n.draggable),Et("drop",this,{evt:t}),xt=Ct&&Ct.parentNode,Lt=mt(Ct),Bt=mt(Ct,n.draggable),fe.eventCanceled||(Kt=!1,ee=!1,te=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Te(this.cloneId),Te(this._dragStartId),this.nativeDraggable&&(K(document,"drop",this),K(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),z&&at(document.body,"user-select",""),at(Ct,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),(Ot===xt||Xt&&"clone"!==Xt.lastPutMode)&&Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),Ct&&(this.nativeDraggable&&K(Ct,"dragend",this),be(Ct),Ct.style["will-change"]="",Gt&&!Kt&&ot(Ct,Xt?Xt.options.ghostClass:this.options.ghostClass,!1),ot(Ct,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:xt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ot!==xt?(Lt>=0&&(Dt({rootEl:xt,name:"add",toEl:xt,fromEl:Ot,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:xt,originalEvent:t}),Dt({rootEl:xt,name:"sort",toEl:xt,fromEl:Ot,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:xt,originalEvent:t})),Xt&&Xt.save()):Lt!==At&&Lt>=0&&(Dt({sortable:this,name:"update",toEl:xt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:xt,originalEvent:t})),fe.active&&(null!=Lt&&-1!==Lt||(Lt=At,Bt=Ft),Dt({sortable:this,name:"end",toEl:xt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Et("nulling",this),Ot=Ct=xt=Nt=Pt=Mt=It=kt=Yt=jt=Gt=Lt=Bt=At=Ft=qt=Ut=Xt=Rt=fe.dragged=fe.ghost=fe.clone=fe.active=null,ae.forEach((function(t){t.checked=!0})),ae.length=Ht=Zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ct&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,a=n.length,r=this.options;o{const e=t.target;this.name(e.value),this.slug((0,Ve.slug)(e.value))}})),50),t.add("slug",m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.edit_tag.slug_label")),m("input",{className:"FormControl",bidi:this.slug})),40),t.add("description",m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.edit_tag.description_label")),m("textarea",{className:"FormControl",bidi:this.description})),30),t.add("color",m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.edit_tag.color_label")),m(qe(),{className:"FormControl",placeholder:"#aaaaaa",bidi:this.color})),20),t.add("icon",m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.edit_tag.icon_label")),m("div",{className:"helpText"},a().translator.trans("flarum-tags.admin.edit_tag.icon_text",{a:m("a",{href:"https://fontawesome.com/icons?m=free",tabindex:"-1"})})),m("input",{className:"FormControl",placeholder:"fas fa-bolt",bidi:this.icon})),10),t.add("hidden",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.isHidden}),a().translator.trans("flarum-tags.admin.edit_tag.hide_label")))),10),t.add("submit",m("div",{className:"Form-group Form-controls"},m(g(),{type:"submit",className:"Button Button--primary EditTagModal-save",loading:this.loading},a().translator.trans("flarum-tags.admin.edit_tag.submit_button")),this.tag.exists&&m("button",{type:"button",className:"Button EditTagModal-delete",onclick:this.delete.bind(this)},a().translator.trans("flarum-tags.admin.edit_tag.delete_tag_button"))),-10),t}submitData(){return{name:this.name(),slug:this.slug(),description:this.description(),color:this.color(),icon:this.icon(),isHidden:this.isHidden(),primary:this.primary()}}onsubmit(t){t.preventDefault(),this.loading=!0,this.tag.save(this.submitData()).then((()=>this.hide()),(()=>this.loading=!1))}delete(){if(confirm(tn()(a().translator.trans("flarum-tags.admin.edit_tag.delete_tag_confirmation")))){const t=a().store.all("tags").filter((t=>t.parent()===this.tag));this.tag.delete().then((()=>{t.forEach((t=>t.pushData({attributes:{isChild:!1},relationships:{parent:null}}))),m.redraw()})),this.hide()}}}function nn(t){return m("li",{"data-id":t.id(),style:{color:t.color()}},m("div",{className:"TagListItem-info"},(0,b.Z)(t),m("span",{className:"TagListItem-name"},t.name()),m(g(),{className:"Button Button--link",icon:"fas fa-pencil-alt",onclick:()=>a().modal.show(en,{model:t})})),!t.isChild()&&null!==t.position()&&m("ol",{className:"TagListItem-children TagList"},(0,y.Z)(a().store.all("tags")).filter((e=>e.parent()===t)).map(nn)))}flarum.reg.add("flarum-tags","admin/components/EditTagModal",en);class on extends(Xe()){oninit(t){super.oninit(t),this.forcedRefreshKey=0,this.loading=!0,a().tagList.load(["parent"]).then((()=>{this.loading=!1,m.redraw()}))}content(){if(this.loading)return m(f(),null);const t=this.setting("flarum-tags.min_primary_tags",0),e=this.setting("flarum-tags.max_primary_tags",0),n=this.setting("flarum-tags.min_secondary_tags",0),o=this.setting("flarum-tags.max_secondary_tags",0),r=(0,y.Z)(a().store.all("tags").filter((t=>!t.parent())));return m("div",{className:"TagsContent"},m("div",{className:"TagsContent-list"},m("div",{className:"container",key:this.forcedRefreshKey,oncreate:this.onListOnCreate.bind(this)},m("div",{className:"SettingsGroups"},m("div",{className:"TagGroup"},m("label",null,a().translator.trans("flarum-tags.admin.tags.primary_heading")),m("ol",{className:"TagList TagList--primary"},r.filter((t=>null!==t.position()&&!t.isChild())).map(nn)),m(g(),{className:"Button TagList-button",icon:"fas fa-plus",onclick:()=>a().modal.show(en,{primary:!0})},a().translator.trans("flarum-tags.admin.tags.create_primary_tag_button"))),m("div",{className:"TagGroup TagGroup--secondary"},m("label",null,a().translator.trans("flarum-tags.admin.tags.secondary_heading")),m("ul",{className:"TagList"},r.filter((t=>null===t.position())).sort(((t,e)=>t.name().localeCompare(e.name()))).map(nn)),m(g(),{className:"Button TagList-button",icon:"fas fa-plus",onclick:()=>a().modal.show(en,{primary:!1})},a().translator.trans("flarum-tags.admin.tags.create_secondary_tag_button"))),m(Ze(),{label:a().translator.trans("flarum-tags.admin.tags.settings_heading")},m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.tag_settings.required_primary_heading")),m("div",{className:"helpText"},a().translator.trans("flarum-tags.admin.tag_settings.required_primary_text")),m("div",{className:"TagSettings-rangeInput"},m("input",{className:"FormControl",type:"number",min:"0",value:t(),oninput:je()("value",this.setMinTags.bind(this,t,e))}),a().translator.trans("flarum-tags.admin.tag_settings.range_separator_text"),m("input",{className:"FormControl",type:"number",min:t(),bidi:e}))),m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-tags.admin.tag_settings.required_secondary_heading")),m("div",{className:"helpText"},a().translator.trans("flarum-tags.admin.tag_settings.required_secondary_text")),m("div",{className:"TagSettings-rangeInput"},m("input",{className:"FormControl",type:"number",min:"0",value:n(),oninput:je()("value",this.setMinTags.bind(this,n,o))}),a().translator.trans("flarum-tags.admin.tag_settings.range_separator_text"),m("input",{className:"FormControl",type:"number",min:n(),bidi:o}))),m("div",{className:"Form-group Form-controls"},this.submitButton()))),m("div",{className:"TagsContent-footer"},m("p",null,a().translator.trans("flarum-tags.admin.tags.about_tags_text"))))))}onListOnCreate(t){this.$(".TagList").get().map((t=>{Be.create(t,{group:"tags",delay:50,delayOnTouchOnly:!0,touchStartThreshold:5,animation:150,swapThreshold:.65,dragClass:"sortable-dragging",ghostClass:"sortable-placeholder",onSort:t=>this.onSortUpdate(t)})}))}setMinTags(t,e,n){t(n),e(Math.max(n,e()))}onSortUpdate(t){t.from instanceof HTMLOListElement&&t.to instanceof HTMLUListElement&&a().store.getById("tags",t.item.getAttribute("data-id")).pushData({attributes:{position:null,isChild:!1},relationships:{parent:null}});const e=this.$(".TagList--primary > li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach(((t,e)=>{const n=a().store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach(((t,e)=>{a().store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),a().request({url:a().forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()}}flarum.reg.add("flarum-tags","admin/components/TagsPage",on);var an=n(351),rn=n.n(an);class sn{constructor(){(0,N.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(rn().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),rn().store.find("tags",{include:t.join(",")}).then((e=>(t.forEach((t=>this.loadedIncludes.add(t))),e)))}}flarum.reg.add("flarum-tags","common/states/TagListState",sn);const ln=flarum.reg.get("core","common/extenders");var cn=n.n(ln);const un=flarum.reg.get("core","common/utils/computed");var dn=n.n(un);const mn=flarum.reg.get("core","common/Model");var hn=n.n(mn);class gn extends(hn()){name(){return hn().attribute("name").call(this)}slug(){return hn().attribute("slug").call(this)}description(){return hn().attribute("description").call(this)}color(){return hn().attribute("color").call(this)}backgroundUrl(){return hn().attribute("backgroundUrl").call(this)}backgroundMode(){return hn().attribute("backgroundMode").call(this)}icon(){return hn().attribute("icon").call(this)}position(){return hn().attribute("position").call(this)}parent(){return hn().hasOne("parent").call(this)}children(){return hn().hasMany("children").call(this)}defaultSort(){return hn().attribute("defaultSort").call(this)}isChild(){return hn().attribute("isChild").call(this)}isHidden(){return hn().attribute("isHidden").call(this)}discussionCount(){return hn().attribute("discussionCount").call(this)}lastPostedAt(){return hn().attribute("lastPostedAt",hn().transformDate).call(this)}lastPostedDiscussion(){return hn().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return hn().attribute("isRestricted").call(this)}canStartDiscussion(){return hn().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return hn().attribute("canAddToDiscussion").call(this)}isPrimary(){return dn()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",gn);const pn=[(new(cn().Store)).add("tags",gn)];a().initializers.add("flarum-tags",(t=>{t.tagList=new sn,t.extensionData.for("flarum-tags").registerPage(on),(0,r.extend)(s().prototype,"oninit",(function(){this.loading=!0})),(0,r.extend)(s().prototype,"oncreate",(function(){a().tagList.load().then((()=>{this.loading=!1,m.redraw()}))})),(0,r.override)(s().prototype,"view",(function(t,e){return this.loading?m(f(),null):t(e)})),(0,r.override)(a(),"getRequiredPermissions",((t,e)=>{const n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((t=>n[0]+t)):t(e)})),(0,r.extend)(s().prototype,"scopeItems",(t=>{(0,y.Z)(a().store.all("tags")).filter((t=>t.isRestricted())).forEach((e=>t.add("tag"+e.id(),{label:(0,v.Z)(e),onremove:()=>e.save({isRestricted:!1}),render:t=>"setting"in t?null:"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission.startsWith("discussion.")&&!1!==t.tagScoped||t.tagScoped?m(c(),{permission:"tag".concat(e.id(),".").concat(t.permission),allowGuest:t.allowGuest}):null})))})),(0,r.extend)(s().prototype,"scopeControlItems",(t=>{const e=(0,y.Z)(a().store.all("tags").filter((t=>!t.isRestricted())));e.length&&t.add("tag",m(d(),{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:a().translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((t=>m(g(),{icon:!0,onclick:()=>t.save({isRestricted:!0})},[(0,b.Z)(t,{className:"Button-icon"})," ",t.name()])))))})),_(),S(),(0,r.extend)(s().prototype,"startItems",(t=>{t.add("allowTagChange",{icon:"fas fa-tag",label:a().translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:()=>{const t=parseInt(a().data.settings.allow_tag_change,10);return m(D(),{defaultLabel:t?a().translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):a().translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:a().translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:a().translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:a().translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)})),(0,r.extend)(x().prototype,"customSettingComponents",(function(t){t.add("flarum-tags.select-tags",(t=>m(A,Object.assign({},t,{settingValue:this.settings[t.setting]}))))}))}))},974:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var o=n(836),a=n.n(o);function r(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});const o=t&&t.icon(),{useColor:r=!0}=n;return e.className=a()([e.className,"icon text-colored",o?t.icon():"TagIcon"]),t&&r?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),o?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",r)},924:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var o=n(780),a=n.n(o),r=n(678),i=n.n(r),s=n(836),l=n.n(s),c=n(679),u=n.n(c),d=n(974);function h(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const n=a()(e,"link"),o=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const o=t.color();o&&(e.style["--tag-bg"]=o,e.className=l()(e.className,"colored",u()(o))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?i():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},o)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",h)},270:()=>{},648:(t,e,n)=>{"use strict";function o(t){return t.slice(0).sort(((t,e)=>{const n=t.position(),o=e.position();if(null===n&&null===o)return e.discussionCount()-t.discussionCount();if(null===o)return-1;if(null===n)return 1;const a=t.parent(),r=e.parent();return a===r?n-o:a&&r?a.position()-r.position():a?a===e?1:a.position()-o:r?r===t?-1:n-r.position():0}))}n.d(e,{Z:()=>o}),flarum.reg.add("flarum-tags","common/utils/sortTags",o)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},679:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},905:(t,e,n)=>{"use strict";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 a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e);if("object"!==o(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===o(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:()=>a})}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t](r,r.exports,a),r.exports}a.m=n,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,n)=>(a.f[n](t,e),e)),[])),a.u=t=>"common/components/TagSelectionModal.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",a.l=(n,o,r,i)=>{if(t[n])t[n].push(o);else{var s,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var a=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach((t=>t(o))),e)return e(o)},h=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),a.f.compat=(t,e)=>{const n=a.l;a.l=flarum.reg.loadChunk.bind(flarum.reg,n)},(()=>{var t={328:0};a.f.j=(e,n)=>{var o=a.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,a)=>o=t[e]=[n,a]));n.push(o[2]=r);var i=a.p+a.u(e),s=new Error;a.l(i,(n=>{if(a.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,o[1](s)}}),"chunk-"+e,e)}};var e=(e,n)=>{var o,r,[i,s,l]=n,c=0;if(i.some((e=>0!==t[e]))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);l&&l(a)}for(e&&e(n);c{"use strict";a.r(r),a.d(r,{extend:()=>n.l});var t=a(270),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);a.d(r,e);var n=a(949)})(),module.exports=r})(); +(()=>{var t,e,n={425:(t,e,n)=>{"use strict";n.d(e,{l:()=>Sn});const o=flarum.reg.get("core","admin/app");var r=n.n(o);const a=flarum.reg.get("core","common/extend"),i=flarum.reg.get("core","admin/components/PermissionGrid");var s=n.n(i);const l=flarum.reg.get("core","admin/components/PermissionDropdown");var c=n.n(l);const u=flarum.reg.get("core","common/components/Dropdown");var d=n.n(u),h=n(645),g=n.n(h),p=n(149),f=n.n(p),v=n(924),b=n(974),y=n(648);function w(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)}const _=flarum.reg.get("core","admin/components/BasicsPage");var S=n.n(_);function T(){(0,a.extend)(S().prototype,"homePageItems",(t=>{t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))}const E=flarum.reg.get("core","admin/components/SettingDropdown");var D=n.n(E);const C=flarum.reg.get("core","admin/components/AdminPage");var x=n.n(C),N=n(905),O=n(433),P=n.n(O),M=(n(780),n(836)),I=n.n(M);function A(t,e){void 0===e&&(e={});const n=[],{link:o,...r}=e;return r.className=I()("TagsLabel",r.className),t?(0,y.Z)(t).forEach((e=>{(e||1===t.length)&&n.push((0,v.Z)(e,{link:o}))})):n.push((0,v.Z)()),m("span",r,n)}flarum.reg.add("flarum-tags","common/helpers/tagsLabel",A);class k extends(P()){constructor(){super(...arguments),(0,N.Z)(this,"tags",[]),(0,N.Z)(this,"loaded",!1)}view(){const t=JSON.parse(this.attrs.settingValue()||"[]");return this.loaded||r().tagList.load(["parent"]).then((e=>{this.tags=e.filter((e=>t.includes(e.id()))),this.loaded=!0,m.redraw()})),m("div",{className:"Form-group SelectTagsSettingComponent"},m("label",null,this.attrs.label),this.attrs.help&&m("p",{className:"helpText"},this.attrs.help),this.loaded?m(g(),{className:"Button Button--text",onclick:()=>r().modal.show((()=>n.e(162).then(n.bind(n,610))),{selectedTags:this.tags,onsubmit:t=>{this.tags=t,this.attrs.settingValue(JSON.stringify(t.map((t=>t.id()))))},...this.attrs.options})},this.tags.length?A(this.tags):m("span",{className:"TagLabel untagged"},r().translator.trans("flarum-tags.admin.settings.button_text"))):m(f(),{size:"small",display:"inline"}))}}function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function L(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Y(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}flarum.reg.add("flarum-tags","admin/components/SelectTagsSettingComponent",k),flarum.reg.addChunkModule("162","610","flarum-tags","common/components/TagSelectionModal");var Z=Y(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),H=Y(/Edge/i),W=Y(/firefox/i),G=Y(/safari/i)&&!Y(/chrome/i)&&!Y(/android/i),z=Y(/iP(ad|od|hone)/i),q=Y(/chrome/i)&&Y(/android/i),U={capture:!1,passive:!1};function V(t,e,n){t.addEventListener(e,n,!Z&&U)}function K(t,e,n){t.removeEventListener(e,n,!Z&&U)}function J(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function tt(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&J(t,e):J(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var et,nt=/\s+/g;function ot(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(nt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(nt," ")}}function rt(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function at(t,e){var n="";if("string"==typeof t)n=t;else do{var o=rt(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,a=o.length;if(n)for(;r=a:r<=a))return o;if(o===st())break;o=gt(o,!1)}return!1}function ut(t,e,n,o){for(var r=0,a=0,i=t.children;a2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=X(n,Tt);St.pluginEvent.bind(fe)(t,e,L({dragEl:Ct,parentEl:xt,ghostEl:Nt,rootEl:Ot,nextEl:Pt,lastDownEl:Mt,cloneEl:It,cloneHidden:At,dragStarted:zt,putSortable:jt,activeSortable:fe.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Lt,newIndex:Ft,newDraggableIndex:Bt,hideGhostForTarget:me,unhideGhostForTarget:he,cloneNowHidden:function(){At=!0},cloneNowShown:function(){At=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[yt]){var p,f=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Z||H?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=r||n,p.clone=a,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=u,p.newDraggableIndex=d,p.originalEvent=m,p.pullMode=h?h.lastPutMode:void 0;var b=L(L({},g),St.getEventProperties(o,e));for(var y in b)p[y]=b[y];n&&n.dispatchEvent(p),f[v]&&f[v].call(e,p)}}(L({putSortable:jt,cloneEl:It,targetEl:Ct,rootEl:Ot,oldIndex:kt,oldDraggableIndex:Lt,newIndex:Ft,newDraggableIndex:Bt},t))}var Ct,xt,Nt,Ot,Pt,Mt,It,At,kt,Ft,Lt,Bt,Rt,jt,Xt,Yt,Zt,Ht,Wt,Gt,zt,qt,Ut,$t,Vt,Kt=!1,Jt=!1,Qt=[],te=!1,ee=!1,ne=[],oe=!1,re=[],ae="undefined"!=typeof document,ie=z,se=H||Z?"cssFloat":"float",le=ae&&!q&&!z&&"draggable"in document.createElement("div"),ce=function(){if(ae){if(Z)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),ue=function(t,e){var n=rt(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ut(t,0,e),a=ut(t,1,e),i=r&&rt(r),s=a&&rt(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+lt(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+lt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[se]||a&&"none"===n[se]&&l+c>o)?"vertical":"horizontal"},de=function(t){function e(t,n){return function(o,r,a,i){var s=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==B(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},me=function(){!ce&&Nt&&rt(Nt,"display","none")},he=function(){!ce&&Nt&&rt(Nt,"display","")};ae&&!q&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ge=function(t){if(Ct){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,a=t.clientY,Qt.some((function(t){var e=t[yt].options.emptyInsertThreshold;if(e&&!dt(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,s=a>=n.top-e&&a<=n.bottom+e;return o&&s?i=t:void 0}})),i);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[yt]._onDragOver(n)}}var r,a,i},pe=function(t){Ct&&Ct.parentNode[yt]._isOutsideThisEl(t.target)};function fe(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=j({},e),t[yt]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ue(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==fe.supportPointer&&"PointerEvent"in window&&!G,emptyInsertThreshold:5};for(var a in St.initializePlugins(this,t,r),r)!(a in e)&&(e[a]=r[a]);for(var i in de(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&le,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?V(t,"pointerdown",this._onTapStart):(V(t,"mousedown",this._onTapStart),V(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(V(t,"dragover",this),V(t,"dragenter",this)),Qt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),j(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==rt(t,"display")&&t!==fe.ghost){o.push({target:t,rect:lt(t)});var e=L({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=at(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var r=!1,a=0;o.forEach((function(t){var n=0,o=t.target,i=o.fromRect,s=lt(o),l=o.prevFromRect,c=o.prevToRect,u=t.rect,d=at(o,!0);d&&(s.top-=d.f,s.left-=d.e),o.toRect=s,o.thisAnimationDuration&&pt(l,s)&&!pt(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(n=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,l,c,e.options)),pt(s,i)||(o.prevFromRect=i,o.prevToRect=s,n||(n=e.options.animation),e.animate(o,u,s,n)),n&&(r=!0,a=Math.max(a,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),r?n=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){rt(t,"transition",""),rt(t,"transform","");var r=at(this.el),a=r&&r.a,i=r&&r.d,s=(e.left-n.left)/(a||1),l=(e.top-n.top)/(i||1);t.animatingX=!!s,t.animatingY=!!l,rt(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),rt(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),rt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){rt(t,"transition",""),rt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function ve(t,e,n,o,r,a,i,s){var l,c,u=t[yt],d=u.options.onMove;return!window.CustomEvent||Z||H?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=r||e,l.relatedRect=a||lt(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function be(t){t.draggable=!1}function ye(){oe=!1}function we(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function _e(t){return setTimeout(t,0)}function Se(t){return clearTimeout(t)}fe.prototype={constructor:fe,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(qt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Ct):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){re.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&re.push(o)}}(n),!Ct&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!G||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=tt(s,o.draggable,n,!1))&&s.animated||Mt===s)){if(kt=mt(s),Lt=mt(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Dt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Et("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=tt(l,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Et("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!tt(l,o.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var o,r=this,a=r.el,i=r.options,s=a.ownerDocument;if(n&&!Ct&&n.parentNode===a){var l=lt(n);if(Ot=a,xt=(Ct=n).parentNode,Pt=Ct.nextSibling,Mt=n,Rt=i.group,fe.dragged=Ct,Xt={target:Ct,clientX:(e||t).clientX,clientY:(e||t).clientY},Wt=Xt.clientX-l.left,Gt=Xt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Ct.style["will-change"]="all",o=function(){Et("delayEnded",r,{evt:t}),fe.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!W&&r.nativeDraggable&&(Ct.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),ot(Ct,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){it(Ct,t.trim(),be)})),V(s,"dragover",ge),V(s,"mousemove",ge),V(s,"touchmove",ge),V(s,"mouseup",r._onDrop),V(s,"touchend",r._onDrop),V(s,"touchcancel",r._onDrop),W&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ct.draggable=!0),Et("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(H||Z))o();else{if(fe.eventCanceled)return void this._onDrop();V(s,"mouseup",r._disableDelayedDrag),V(s,"touchend",r._disableDelayedDrag),V(s,"touchcancel",r._disableDelayedDrag),V(s,"mousemove",r._delayedDragTouchMoveHandler),V(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&V(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ct&&be(Ct),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._disableDelayedDrag),K(t,"touchend",this._disableDelayedDrag),K(t,"touchcancel",this._disableDelayedDrag),K(t,"mousemove",this._delayedDragTouchMoveHandler),K(t,"touchmove",this._delayedDragTouchMoveHandler),K(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?V(document,"pointermove",this._onTouchMove):V(document,e?"touchmove":"mousemove",this._onTouchMove):(V(Ct,"dragend",this),V(Ot,"dragstart",this._onDragStart));try{document.selection?_e((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Kt=!1,Ot&&Ct){Et("dragStarted",this,{evt:e}),this.nativeDraggable&&V(document,"dragover",pe);var n=this.options;!t&&ot(Ct,n.dragClass,!1),ot(Ct,n.ghostClass,!0),fe.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Yt){this._lastX=Yt.clientX,this._lastY=Yt.clientY,me();for(var t=document.elementFromPoint(Yt.clientX,Yt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yt.clientX,Yt.clientY))!==e;)e=t;if(Ct.parentNode[yt]._isOutsideThisEl(t),e)do{if(e[yt]&&e[yt]._onDragOver({clientX:Yt.clientX,clientY:Yt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Xt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=Nt&&at(Nt,!0),i=Nt&&a&&a.a,s=Nt&&a&&a.d,l=ie&&Vt&&ht(Vt),c=(r.clientX-Xt.clientX+o.x)/(i||1)+(l?l[0]-ne[0]:0)/(i||1),u=(r.clientY-Xt.clientY+o.y)/(s||1)+(l?l[1]-ne[1]:0)/(s||1);if(!fe.active&&!Kt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,r,this)&&!p.animated){if(p===Ct)return M(!1);if(p&&a===t.target&&(i=p),i&&(n=lt(i)),!1!==ve(Ot,a,Ct,e,i,n,t,!!i))return P(),p&&p.nextSibling?a.insertBefore(Ct,p.nextSibling):a.appendChild(Ct),xt=a,I(),M(!0)}else if(p&&function(t,e,n){var o=lt(ut(n.el,0,n.options,!0));return e?t.clientXu+c*a/2:ld-$t)return-Ut}else if(l>u+c*(1-r)/2&&ld-c*a/2)?l>u+c/2?1:-1:0}(t,i,n,r,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ee,qt===i),0!==v){var D=mt(Ct);do{D-=v,y=xt.children[D]}while(y&&("none"===rt(y,"display")||y===Nt))}if(0===v||y===i)return M(!1);qt=i,Ut=v;var C=i.nextElementSibling,x=!1,N=ve(Ot,a,Ct,e,i,n,t,x=1===v);if(!1!==N)return 1!==N&&-1!==N||(x=1===N),oe=!0,setTimeout(ye,30),P(),x&&!C?a.appendChild(Ct):i.parentNode.insertBefore(Ct,x?C:i),T&&vt(T,0,E-T.scrollTop),xt=Ct.parentNode,void 0===b||ee||($t=Math.abs(b-lt(i)[S])),I(),M(!0)}if(a.contains(Ct))return M(!1)}return!1}function O(s,l){Et(s,h,L({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:m,target:i,completed:M,onMove:function(n,o){return ve(Ot,a,Ct,e,n,lt(n),t,o)},changed:I},l))}function P(){O("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function M(e){return O("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==m&&(ot(Ct,jt?jt.options.ghostClass:c.options.ghostClass,!1),ot(Ct,s.ghostClass,!0)),jt!==h&&h!==fe.active?jt=h:h===fe.active&&jt&&(jt=null),m===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){O("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(i===Ct&&!Ct.animated||i===a&&!i.animated)&&(qt=null),s.dragoverBubble||t.rootEl||i===document||(Ct.parentNode[yt]._isOutsideThisEl(t.target),!e&&ge(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function I(){Ft=mt(Ct),Bt=mt(Ct,s.draggable),Dt({sortable:h,name:"change",toEl:a,newIndex:Ft,newDraggableIndex:Bt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){K(document,"mousemove",this._onTouchMove),K(document,"touchmove",this._onTouchMove),K(document,"pointermove",this._onTouchMove),K(document,"dragover",ge),K(document,"mousemove",ge),K(document,"touchmove",ge)},_offUpEvents:function(){var t=this.el.ownerDocument;K(t,"mouseup",this._onDrop),K(t,"touchend",this._onDrop),K(t,"pointerup",this._onDrop),K(t,"touchcancel",this._onDrop),K(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Ft=mt(Ct),Bt=mt(Ct,n.draggable),Et("drop",this,{evt:t}),xt=Ct&&Ct.parentNode,Ft=mt(Ct),Bt=mt(Ct,n.draggable),fe.eventCanceled||(Kt=!1,ee=!1,te=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Se(this.cloneId),Se(this._dragStartId),this.nativeDraggable&&(K(document,"drop",this),K(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),G&&rt(document.body,"user-select",""),rt(Ct,"transform",""),t&&(zt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),(Ot===xt||jt&&"clone"!==jt.lastPutMode)&&It&&It.parentNode&&It.parentNode.removeChild(It),Ct&&(this.nativeDraggable&&K(Ct,"dragend",this),be(Ct),Ct.style["will-change"]="",zt&&!Kt&&ot(Ct,jt?jt.options.ghostClass:this.options.ghostClass,!1),ot(Ct,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:xt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ot!==xt?(Ft>=0&&(Dt({rootEl:xt,name:"add",toEl:xt,fromEl:Ot,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:xt,originalEvent:t}),Dt({rootEl:xt,name:"sort",toEl:xt,fromEl:Ot,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:xt,originalEvent:t})),jt&&jt.save()):Ft!==kt&&Ft>=0&&(Dt({sortable:this,name:"update",toEl:xt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:xt,originalEvent:t})),fe.active&&(null!=Ft&&-1!==Ft||(Ft=kt,Bt=Lt),Dt({sortable:this,name:"end",toEl:xt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Et("nulling",this),Ot=Ct=xt=Nt=Pt=It=Mt=At=Xt=Yt=zt=Ft=Bt=kt=Lt=qt=Ut=jt=Rt=fe.dragged=fe.ghost=fe.clone=fe.active=null,re.forEach((function(t){t.checked=!0})),re.length=Zt=Ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ct&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,a=this.options;o{const e=t.target;this.name(e.value),this.slug((0,Ve.slug)(e.value))}})),50),t.add("slug",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.edit_tag.slug_label")),m("input",{className:"FormControl",bidi:this.slug})),40),t.add("description",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.edit_tag.description_label")),m("textarea",{className:"FormControl",bidi:this.description})),30),t.add("color",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.edit_tag.color_label")),m(qe(),{className:"FormControl",placeholder:"#aaaaaa",bidi:this.color})),20),t.add("icon",m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.edit_tag.icon_label")),m("div",{className:"helpText"},r().translator.trans("flarum-tags.admin.edit_tag.icon_text",{a:m("a",{href:"https://fontawesome.com/icons?m=free",tabindex:"-1"})})),m("input",{className:"FormControl",placeholder:"fas fa-bolt",bidi:this.icon})),10),t.add("hidden",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.isHidden}),r().translator.trans("flarum-tags.admin.edit_tag.hide_label")))),10),t.add("submit",m("div",{className:"Form-group Form-controls"},m(g(),{type:"submit",className:"Button Button--primary EditTagModal-save",loading:this.loading},r().translator.trans("flarum-tags.admin.edit_tag.submit_button")),this.tag.exists&&m("button",{type:"button",className:"Button EditTagModal-delete",onclick:this.delete.bind(this)},r().translator.trans("flarum-tags.admin.edit_tag.delete_tag_button"))),-10),t}submitData(){return{name:this.name(),slug:this.slug(),description:this.description(),color:this.color(),icon:this.icon(),isHidden:this.isHidden(),primary:this.primary()}}onsubmit(t){t.preventDefault(),this.loading=!0,this.tag.save(this.submitData()).then((()=>this.hide()),(()=>this.loading=!1))}delete(){if(confirm(tn()(r().translator.trans("flarum-tags.admin.edit_tag.delete_tag_confirmation")))){const t=r().store.all("tags").filter((t=>t.parent()===this.tag));this.tag.delete().then((()=>{t.forEach((t=>t.pushData({attributes:{isChild:!1},relationships:{parent:null}}))),m.redraw()})),this.hide()}}}flarum.reg.add("flarum-tags","admin/components/EditTagModal",en);class nn{constructor(){(0,N.Z)(this,"element",void 0),(0,N.Z)(this,"attrs",void 0),(0,N.Z)(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const n={...t};return m(this,n,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("[".concat(this.constructor.name,'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute'));if("tag"in t)throw new Error("[".concat(this.constructor.name,'] You cannot use the "tag" attribute name with Mithril 2.'))}this.attrs=t}static initAttrs(t){}}function on(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;er().modal.show(en,{model:t})})),!t.isChild()&&null!==t.position()&&m("ol",{className:"TagListItem-children TagList"},(0,y.Z)(r().store.all("tags")).filter((e=>e.parent()===t)).map(cn)))}flarum.reg.add("flarum-tags","../../../../framework/core/js/src/admin/components/FormSectionGroup",sn);class un extends(je()){oninit(t){super.oninit(t),this.forcedRefreshKey=0,this.loading=!0,r().tagList.load(["parent"]).then((()=>{this.loading=!1,m.redraw()}))}content(){if(this.loading)return m(f(),null);const t=this.setting("flarum-tags.min_primary_tags",0),e=this.setting("flarum-tags.max_primary_tags",0),n=this.setting("flarum-tags.min_secondary_tags",0),o=this.setting("flarum-tags.max_secondary_tags",0),a=(0,y.Z)(r().store.all("tags").filter((t=>!t.parent())));return m("div",{className:"TagsContent"},m("div",{className:"TagsContent-list"},m("div",{className:"container",key:this.forcedRefreshKey,oncreate:this.onListOnCreate.bind(this)},m(sn,null,m(ln,{className:"TagGroup",label:r().translator.trans("flarum-tags.admin.tags.primary_heading")},m("ol",{className:"TagList TagList--primary"},a.filter((t=>null!==t.position()&&!t.isChild())).map(cn)),m(g(),{className:"Button TagList-button",icon:"fas fa-plus",onclick:()=>r().modal.show(en,{primary:!0})},r().translator.trans("flarum-tags.admin.tags.create_primary_tag_button"))),m(ln,{className:"TagGroup TagGroup--secondary",label:r().translator.trans("flarum-tags.admin.tags.secondary_heading")},m("ul",{className:"TagList"},a.filter((t=>null===t.position())).sort(((t,e)=>t.name().localeCompare(e.name()))).map(cn)),m(g(),{className:"Button TagList-button",icon:"fas fa-plus",onclick:()=>r().modal.show(en,{primary:!1})},r().translator.trans("flarum-tags.admin.tags.create_secondary_tag_button"))),m(ln,{label:r().translator.trans("flarum-tags.admin.tags.settings_heading")},m(He(),null,m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.tag_settings.required_primary_heading")),m("div",{className:"helpText"},r().translator.trans("flarum-tags.admin.tag_settings.required_primary_text")),m("div",{className:"TagSettings-rangeInput"},m("input",{className:"FormControl",type:"number",min:"0",value:t(),oninput:Ye()("value",this.setMinTags.bind(this,t,e))}),r().translator.trans("flarum-tags.admin.tag_settings.range_separator_text"),m("input",{className:"FormControl",type:"number",min:t(),bidi:e}))),m("div",{className:"Form-group"},m("label",null,r().translator.trans("flarum-tags.admin.tag_settings.required_secondary_heading")),m("div",{className:"helpText"},r().translator.trans("flarum-tags.admin.tag_settings.required_secondary_text")),m("div",{className:"TagSettings-rangeInput"},m("input",{className:"FormControl",type:"number",min:"0",value:n(),oninput:Ye()("value",this.setMinTags.bind(this,n,o))}),r().translator.trans("flarum-tags.admin.tag_settings.range_separator_text"),m("input",{className:"FormControl",type:"number",min:n(),bidi:o}))),m("div",{className:"Form-group Form-controls"},this.submitButton())))),m("div",{className:"TagsContent-footer"},m("p",null,r().translator.trans("flarum-tags.admin.tags.about_tags_text"))))))}onListOnCreate(t){this.$(".TagList").get().map((t=>{Be.create(t,{group:"tags",delay:50,delayOnTouchOnly:!0,touchStartThreshold:5,animation:150,swapThreshold:.65,dragClass:"sortable-dragging",ghostClass:"sortable-placeholder",onSort:t=>this.onSortUpdate(t)})}))}setMinTags(t,e,n){t(n),e(Math.max(n,e()))}onSortUpdate(t){t.from instanceof HTMLOListElement&&t.to instanceof HTMLUListElement&&r().store.getById("tags",t.item.getAttribute("data-id")).pushData({attributes:{position:null,isChild:!1},relationships:{parent:null}});const e=this.$(".TagList--primary > li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach(((t,e)=>{const n=r().store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach(((t,e)=>{r().store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),r().request({url:r().forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()}}flarum.reg.add("flarum-tags","admin/components/TagsPage",un);var dn=n(351),mn=n.n(dn);class hn{constructor(){(0,N.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(mn().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),mn().store.find("tags",{include:t.join(",")}).then((e=>(t.forEach((t=>this.loadedIncludes.add(t))),e)))}}flarum.reg.add("flarum-tags","common/states/TagListState",hn);const gn=flarum.reg.get("core","common/extenders");var pn=n.n(gn);const fn=flarum.reg.get("core","common/utils/computed");var vn=n.n(fn);const bn=flarum.reg.get("core","common/Model");var yn=n.n(bn);class wn extends(yn()){name(){return yn().attribute("name").call(this)}slug(){return yn().attribute("slug").call(this)}description(){return yn().attribute("description").call(this)}color(){return yn().attribute("color").call(this)}backgroundUrl(){return yn().attribute("backgroundUrl").call(this)}backgroundMode(){return yn().attribute("backgroundMode").call(this)}icon(){return yn().attribute("icon").call(this)}position(){return yn().attribute("position").call(this)}parent(){return yn().hasOne("parent").call(this)}children(){return yn().hasMany("children").call(this)}defaultSort(){return yn().attribute("defaultSort").call(this)}isChild(){return yn().attribute("isChild").call(this)}isHidden(){return yn().attribute("isHidden").call(this)}discussionCount(){return yn().attribute("discussionCount").call(this)}lastPostedAt(){return yn().attribute("lastPostedAt",yn().transformDate).call(this)}lastPostedDiscussion(){return yn().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return yn().attribute("isRestricted").call(this)}canStartDiscussion(){return yn().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return yn().attribute("canAddToDiscussion").call(this)}isPrimary(){return vn()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",wn);class _n{pattern(){return"tag:(.+)"}toFilter(t,e){return{[(e?"-":"")+"tag"]:t[1].split(",")}}filterKey(){return"tag"}fromFilter(t,e){return"".concat(e?"-":"","tag:").concat(t)}}flarum.reg.add("flarum-tags","common/query/discussions/TagGambit",_n);const Sn=[(new(pn().Store)).add("tags",wn),(new(pn().Search)).gambit("discussions",_n)];r().initializers.add("flarum-tags",(t=>{t.tagList=new hn,t.extensionData.for("flarum-tags").registerPage(un),(0,a.extend)(s().prototype,"oninit",(function(){this.loading=!0})),(0,a.extend)(s().prototype,"oncreate",(function(){r().tagList.load().then((()=>{this.loading=!1,m.redraw()}))})),(0,a.override)(s().prototype,"view",(function(t,e){return this.loading?m(f(),null):t(e)})),(0,a.override)(r(),"getRequiredPermissions",((t,e)=>{const n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((t=>n[0]+t)):t(e)})),(0,a.extend)(s().prototype,"scopeItems",(t=>{(0,y.Z)(r().store.all("tags")).filter((t=>t.isRestricted())).forEach((e=>t.add("tag"+e.id(),{label:(0,v.Z)(e),onremove:()=>e.save({isRestricted:!1}),render:t=>"setting"in t?null:"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission.startsWith("discussion.")&&!1!==t.tagScoped||t.tagScoped?m(c(),{permission:"tag".concat(e.id(),".").concat(t.permission),allowGuest:t.allowGuest}):null})))})),(0,a.extend)(s().prototype,"scopeControlItems",(t=>{const e=(0,y.Z)(r().store.all("tags").filter((t=>!t.isRestricted())));e.length&&t.add("tag",m(d(),{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:r().translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((t=>m(g(),{icon:!0,onclick:()=>t.save({isRestricted:!0})},[(0,b.Z)(t,{className:"Button-icon"})," ",t.name()])))))})),w(),T(),(0,a.extend)(s().prototype,"startItems",(t=>{t.add("allowTagChange",{icon:"fas fa-tag",label:r().translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:()=>{const t=parseInt(r().data.settings.allow_tag_change,10);return m(D(),{defaultLabel:t?r().translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):r().translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:r().translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:r().translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:r().translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)})),(0,a.extend)(x().prototype,"customSettingComponents",(function(t){t.add("flarum-tags.select-tags",(t=>m(k,Object.assign({},t,{settingValue:this.settings[t.setting]}))))}))}))},974:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(836),r=n.n(o);function a(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});const o=t&&t.icon(),{useColor:a=!0}=n;return e.className=r()([e.className,"icon text-colored",o?t.icon():"TagIcon"]),t&&a?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),o?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",a)},924:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var o=n(780),r=n.n(o),a=n(678),i=n.n(a),s=n(836),l=n.n(s),c=n(322),u=n.n(c),d=n(974);function h(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const n=r()(e,"link"),o=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const o=t.color();o&&(e.style["--tag-bg"]=o,e.className=l()(e.className,"colored",u()(o))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?i():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},o)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",h)},270:()=>{},648:(t,e,n)=>{"use strict";function o(t){return t.slice(0).sort(((t,e)=>{const n=t.position(),o=e.position();if(null===n&&null===o)return e.discussionCount()-t.discussionCount();if(null===o)return-1;if(null===n)return 1;const r=t.parent(),a=e.parent();return r===a?n-o:r&&a?r.position()-a.position():r?r===e?1:r.position()-o:a?a===t?-1:n-a.position():0}))}n.d(e,{Z:()=>o}),flarum.reg.add("flarum-tags","common/utils/sortTags",o)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},322:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},905:(t,e,n)=>{"use strict";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 r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===o(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:()=>r})}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var a=o[t]={exports:{}};return n[t](a,a.exports,r),a.exports}r.m=n,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,n)=>(r.f[n](t,e),e)),[])),r.u=t=>"common/components/TagSelectionModal.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",r.l=(n,o,a,i)=>{if(t[n])t[n].push(o);else{var s,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var r=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((t=>t(o))),e)return e(o)},h=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),l&&document.head.appendChild(s)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),r.f.compat=(t,e)=>{const n=r.l;r.l=flarum.reg.loadChunk.bind(flarum.reg,n)},(()=>{var t={328:0};r.f.j=(e,n)=>{var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var a=new Promise(((n,r)=>o=t[e]=[n,r]));n.push(o[2]=a);var i=r.p+r.u(e),s=new Error;r.l(i,(n=>{if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,o[1](s)}}),"chunk-"+e,e)}};var e=(e,n)=>{var o,a,[i,s,l]=n,c=0;if(i.some((e=>0!==t[e]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);l&&l(r)}for(e&&e(n);c{"use strict";r.r(a),r.d(a,{extend:()=>n.l});var t=r(270),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);r.d(a,e);var n=r(425)})(),module.exports=a})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/admin.js.map b/extensions/tags/js/dist/admin.js.map index e61710cfbf..6d45568d56 100644 --- a/extensions/tags/js/dist/admin.js.map +++ b/extensions/tags/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":";UAAIA,EACAC,kDCDJ,MAAM,EAA+BC,OAAOC,IAAIC,IAAI,OAAQ,0BCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,iBCAtD,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,gDCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,oDCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,0GCA7C,SAAS,IACtBC,IAAIC,cAAcC,IAAI,eAAeC,mBAAmB,CACtDC,KAAM,aACNC,MAAOL,IAAIM,WAAWC,MAAM,uDAC5BC,WAAY,kBACX,WAAY,IAAIL,mBAAmB,CACpCC,KAAM,cACNC,MAAOL,IAAIM,WAAWC,MAAM,yDAC5BC,WAAY,mBACX,QAAS,GACd,CCVA,MAAM,EAA+BX,OAAOC,IAAIC,IAAI,OAAQ,4CCE7C,SAAS,KACtB,IAAAU,QAAO,cAAsB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C1FF,EAAMlsB,KAAO,iBACbksB,EAAMpV,KAAOqV,EACbD,EAAMI,QAAUF,EAChBL,EAAmB,GAAGG,EACvB,CACD,GAEwC,SAAWtC,EAASA,EAE/D,CACD,EAcF,IAAI2C,EAAuB,CAACC,EAA4B1jB,KACvD,IAGIugB,EAAUO,GAHT6C,EAAUC,EAAaC,GAAW7jB,EAGhB9M,EAAI,EAC3B,GAAGywB,EAASzc,MAAMxV,GAAgC,IAAxBsxB,EAAgBtxB,KAAa,CACtD,IAAI6uB,KAAYqD,EACZtD,EAAoBO,EAAE+C,EAAarD,KACrCD,EAAoB3vB,EAAE4vB,GAAYqD,EAAYrD,IAG7CsD,GAAsBA,EAAQvD,EAClC,CAEA,IADGoD,GAA4BA,EAA2B1jB,GACrD9M,EAAIywB,EAASnzB,OAAQ0C,IACzB4tB,EAAU6C,EAASzwB,GAChBotB,EAAoBO,EAAEmC,EAAiBlC,IAAYkC,EAAgBlC,IACrEkC,EAAgBlC,GAAS,KAE1BkC,EAAgBlC,GAAW,CAC5B,EAIGgD,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBxzB,QAAQmzB,EAAqBxjB,KAAK,KAAM,IAC3D6jB,EAAmBrzB,KAAOgzB,EAAqBxjB,KAAK,KAAM6jB,EAAmBrzB,KAAKwP,KAAK6jB","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/PermissionGrid')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/PermissionDropdown')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/BasicsPage')\"","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/SettingDropdown')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/AdminPage')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/admin/components/SelectTagsSettingComponent.tsx","webpack://@flarum/tags/../../../node_modules/sortablejs/modular/sortable.esm.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/ExtensionPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/withAttr')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/ColorPreviewInput')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/tags/./src/admin/components/EditTagModal.tsx","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/admin/index.ts","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.tsx","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./src/admin/addTagSelectionSettingComponent.tsx","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/PermissionGrid');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/PermissionDropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","export default function () {\n app.extensionData.for('flarum-tags').registerPermission({\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag'\n }, 'moderate', 95).registerPermission({\n icon: 'fas fa-tags',\n label: app.translator.trans('flarum-tags.admin.permissions.bypass_tag_counts_label'),\n permission: 'bypassTagCounts'\n }, 'start', 89);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/BasicsPage');","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\nexport default function () {\n extend(BasicsPage.prototype, 'homePageItems', items => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label')\n });\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/SettingDropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/AdminPage');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class SelectTagsSettingComponent extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", []);\n _defineProperty(this, \"loaded\", false);\n }\n view() {\n const value = JSON.parse(this.attrs.settingValue() || '[]');\n if (!this.loaded) {\n app.tagList.load(['parent']).then(tags => {\n this.tags = tags.filter(tag => value.includes(tag.id()));\n this.loaded = true;\n m.redraw();\n });\n }\n return m(\"div\", {\n className: \"Form-group SelectTagsSettingComponent\"\n }, m(\"label\", null, this.attrs.label), this.attrs.help && m(\"p\", {\n className: \"helpText\"\n }, this.attrs.help), !this.loaded ? m(LoadingIndicator, {\n size: \"small\",\n display: \"inline\"\n }) : m(Button, {\n className: \"Button Button--text\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'common/components/TagSelectionModal', webpackMode: 'lazy-once' */ '../../common/components/TagSelectionModal'), {\n selectedTags: this.tags,\n onsubmit: tags => {\n this.tags = tags;\n this.attrs.settingValue(JSON.stringify(tags.map(tag => tag.id())));\n },\n ...this.attrs.options\n })\n }, !!this.tags.length ? tagsLabel(this.tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.admin.settings.button_text'))));\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/SelectTagsSettingComponent', SelectTagsSettingComponent);flarum.reg.addChunkModule('162', '610', 'flarum-tags', 'common/components/TagSelectionModal');","/**!\n * Sortable 1.15.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/ExtensionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/withAttr');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/ColorPreviewInput');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport FormModal from 'flarum/common/components/FormModal';\nimport Button from 'flarum/common/components/Button';\nimport ColorPreviewInput from 'flarum/common/components/ColorPreviewInput';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from 'flarum/common/utils/string';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport Form from 'flarum/common/components/Form';\nimport tagLabel from '../../common/helpers/tagLabel';\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends FormModal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tag\", void 0);\n _defineProperty(this, \"name\", void 0);\n _defineProperty(this, \"slug\", void 0);\n _defineProperty(this, \"description\", void 0);\n _defineProperty(this, \"color\", void 0);\n _defineProperty(this, \"icon\", void 0);\n _defineProperty(this, \"isHidden\", void 0);\n _defineProperty(this, \"primary\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.tag = this.attrs.model || app.store.createRecord('tags');\n this.name = Stream(this.tag.name() || '');\n this.slug = Stream(this.tag.slug() || '');\n this.description = Stream(this.tag.description() || '');\n this.color = Stream(this.tag.color() || '');\n this.icon = Stream(this.tag.icon() || '');\n this.isHidden = Stream(this.tag.isHidden() || false);\n this.primary = Stream(this.attrs.primary || false);\n }\n className() {\n return 'EditTagModal Modal--small';\n }\n title() {\n return this.name() ? tagLabel(app.store.createRecord('tags', {\n attributes: this.submitData()\n })) : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, this.fields().toArray()));\n }\n fields() {\n const items = new ItemList();\n items.add('name', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.name_label')), m(\"input\", {\n className: \"FormControl\",\n placeholder: app.translator.trans('flarum-tags.admin.edit_tag.name_placeholder'),\n value: this.name(),\n oninput: e => {\n const target = e.target;\n this.name(target.value);\n this.slug(slug(target.value));\n }\n })), 50);\n items.add('slug', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.slug_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.slug\n })), 40);\n items.add('description', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.description_label')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.description\n })), 30);\n items.add('color', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.color_label')), m(ColorPreviewInput, {\n className: \"FormControl\",\n placeholder: \"#aaaaaa\",\n bidi: this.color\n })), 20);\n items.add('icon', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.icon_label')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a: m(\"a\", {\n href: \"https://fontawesome.com/icons?m=free\",\n tabindex: \"-1\"\n })\n })), m(\"input\", {\n className: \"FormControl\",\n placeholder: \"fas fa-bolt\",\n bidi: this.icon\n })), 10);\n items.add('hidden', m(\"div\", {\n className: \"Form-group\"\n }, m(\"div\", null, m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"checkbox\",\n bidi: this.isHidden\n }), app.translator.trans('flarum-tags.admin.edit_tag.hide_label')))), 10);\n items.add('submit', m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n type: \"submit\",\n className: \"Button Button--primary EditTagModal-save\",\n loading: this.loading\n }, app.translator.trans('flarum-tags.admin.edit_tag.submit_button')), this.tag.exists && m(\"button\", {\n type: \"button\",\n className: \"Button EditTagModal-delete\",\n onclick: this.delete.bind(this)\n }, app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_button'))), -10);\n return items;\n }\n submitData() {\n return {\n name: this.name(),\n slug: this.slug(),\n description: this.description(),\n color: this.color(),\n icon: this.icon(),\n isHidden: this.isHidden(),\n primary: this.primary()\n };\n }\n onsubmit(e) {\n e.preventDefault();\n this.loading = true;\n\n // Errors aren't passed to the modal onerror handler here.\n // This is done for better error visibility on smaller screen heights.\n this.tag.save(this.submitData()).then(() => this.hide(), () => this.loading = false);\n }\n delete() {\n if (confirm(extractText(app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_confirmation')))) {\n const children = app.store.all('tags').filter(tag => tag.parent() === this.tag);\n this.tag.delete().then(() => {\n children.forEach(tag => tag.pushData({\n attributes: {\n isChild: false\n },\n // @deprecated. Temporary hack for type safety, remove before v1.3.\n relationships: {\n parent: null\n }\n }));\n m.redraw();\n });\n this.hide();\n }\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/EditTagModal', EditTagModal);","import sortable from 'sortablejs';\nimport app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport Form from 'flarum/common/components/Form';\nimport EditTagModal from './EditTagModal';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\nfunction tagItem(tag) {\n return m(\"li\", {\n \"data-id\": tag.id(),\n style: {\n color: tag.color()\n }\n }, m(\"div\", {\n className: \"TagListItem-info\"\n }, tagIcon(tag), m(\"span\", {\n className: \"TagListItem-name\"\n }, tag.name()), m(Button, {\n className: \"Button Button--link\",\n icon: \"fas fa-pencil-alt\",\n onclick: () => app.modal.show(EditTagModal, {\n model: tag\n })\n })), !tag.isChild() && tag.position() !== null && m(\"ol\", {\n className: \"TagListItem-children TagList\"\n }, sortTags(app.store.all('tags')).filter(child => child.parent() === tag).map(tagItem)));\n}\nexport default class TagsPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n // A regular redraw won't work here, because sortable has mucked around\n // with the DOM which will confuse Mithril's diffing algorithm. Instead\n // we force a full reconstruction of the DOM by changing the key, which\n // makes mithril completely re-render the component on redraw.\n this.forcedRefreshKey = 0;\n this.loading = true;\n app.tagList.load(['parent']).then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n content() {\n if (this.loading) {\n return m(LoadingIndicator, null);\n }\n const minPrimaryTags = this.setting('flarum-tags.min_primary_tags', 0);\n const maxPrimaryTags = this.setting('flarum-tags.max_primary_tags', 0);\n const minSecondaryTags = this.setting('flarum-tags.min_secondary_tags', 0);\n const maxSecondaryTags = this.setting('flarum-tags.max_secondary_tags', 0);\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.parent()));\n return m(\"div\", {\n className: \"TagsContent\"\n }, m(\"div\", {\n className: \"TagsContent-list\"\n }, m(\"div\", {\n className: \"container\",\n key: this.forcedRefreshKey,\n oncreate: this.onListOnCreate.bind(this)\n }, m(\"div\", {\n className: \"SettingsGroups\"\n }, m(\"div\", {\n className: \"TagGroup\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tags.primary_heading')), m(\"ol\", {\n className: \"TagList TagList--primary\"\n }, tags.filter(tag => tag.position() !== null && !tag.isChild()).map(tagItem)), m(Button, {\n className: \"Button TagList-button\",\n icon: \"fas fa-plus\",\n onclick: () => app.modal.show(EditTagModal, {\n primary: true\n })\n }, app.translator.trans('flarum-tags.admin.tags.create_primary_tag_button'))), m(\"div\", {\n className: \"TagGroup TagGroup--secondary\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tags.secondary_heading')), m(\"ul\", {\n className: \"TagList\"\n }, tags.filter(tag => tag.position() === null).sort((a, b) => a.name().localeCompare(b.name())).map(tagItem)), m(Button, {\n className: \"Button TagList-button\",\n icon: \"fas fa-plus\",\n onclick: () => app.modal.show(EditTagModal, {\n primary: false\n })\n }, app.translator.trans('flarum-tags.admin.tags.create_secondary_tag_button'))), m(Form, {\n label: app.translator.trans('flarum-tags.admin.tags.settings_heading')\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tag_settings.required_primary_heading')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.tag_settings.required_primary_text')), m(\"div\", {\n className: \"TagSettings-rangeInput\"\n }, m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: \"0\",\n value: minPrimaryTags(),\n oninput: withAttr('value', this.setMinTags.bind(this, minPrimaryTags, maxPrimaryTags))\n }), app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text'), m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: minPrimaryTags(),\n bidi: maxPrimaryTags\n }))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_heading')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_text')), m(\"div\", {\n className: \"TagSettings-rangeInput\"\n }, m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: \"0\",\n value: minSecondaryTags(),\n oninput: withAttr('value', this.setMinTags.bind(this, minSecondaryTags, maxSecondaryTags))\n }), app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text'), m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: minSecondaryTags(),\n bidi: maxSecondaryTags\n }))), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, this.submitButton()))), m(\"div\", {\n className: \"TagsContent-footer\"\n }, m(\"p\", null, app.translator.trans('flarum-tags.admin.tags.about_tags_text'))))));\n }\n onListOnCreate(vnode) {\n this.$('.TagList').get().map(e => {\n sortable.create(e, {\n group: 'tags',\n delay: 50,\n delayOnTouchOnly: true,\n touchStartThreshold: 5,\n animation: 150,\n swapThreshold: 0.65,\n dragClass: 'sortable-dragging',\n ghostClass: 'sortable-placeholder',\n onSort: e => this.onSortUpdate(e)\n });\n });\n }\n setMinTags(minTags, maxTags, value) {\n minTags(value);\n maxTags(Math.max(value, maxTags()));\n }\n onSortUpdate(e) {\n // If we've moved a tag from 'primary' to 'secondary', then we'll update\n // its attributes in our local store so that when we redraw the change\n // will be made.\n if (e.from instanceof HTMLOListElement && e.to instanceof HTMLUListElement) {\n app.store.getById('tags', e.item.getAttribute('data-id')).pushData({\n attributes: {\n position: null,\n isChild: false\n },\n relationships: {\n parent: null\n }\n });\n }\n\n // Construct an array of primary tag IDs and their children, in the same\n // order that they have been arranged in.\n const order = this.$('.TagList--primary > li').map(function () {\n return {\n id: $(this).data('id'),\n children: $(this).find('li').map(function () {\n return $(this).data('id');\n }).get()\n };\n }).get();\n\n // Now that we have an accurate representation of the order which the\n // primary tags are in, we will update the tag attributes in our local\n // store to reflect this order.\n order.forEach((tag, i) => {\n const parent = app.store.getById('tags', tag.id);\n parent.pushData({\n attributes: {\n position: i,\n isChild: false\n },\n relationships: {\n parent: null\n }\n });\n tag.children.forEach((child, j) => {\n app.store.getById('tags', child).pushData({\n attributes: {\n position: j,\n isChild: true\n },\n relationships: {\n parent\n }\n });\n });\n });\n app.request({\n url: app.forum.attribute('apiUrl') + '/tags/order',\n method: 'POST',\n body: {\n order\n }\n });\n this.forcedRefreshKey++;\n m.redraw();\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/TagsPage', TagsPage);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n includes.forEach(include => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nexport default [new Extend.Store() //\n.add('tags', Tag)];","import app from 'flarum/admin/app';\nimport addTagsPermissionScope from './addTagsPermissionScope';\nimport addTagPermission from './addTagPermission';\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\nimport addTagSelectionSettingComponent from './addTagSelectionSettingComponent';\nimport TagsPage from './components/TagsPage';\nimport TagListState from '../common/states/TagListState';\nexport { default as extend } from '../common/extend';\napp.initializers.add('flarum-tags', app => {\n app.tagList = new TagListState();\n app.extensionData.for('flarum-tags').registerPage(TagsPage);\n addTagsPermissionScope();\n addTagPermission();\n addTagsHomePageOption();\n addTagChangePermission();\n addTagSelectionSettingComponent();\n});\nimport './admin';","import app from 'flarum/admin/app';\nimport { extend, override } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/admin/components/PermissionDropdown';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\nexport default function () {\n extend(PermissionGrid.prototype, 'oninit', function () {\n this.loading = true;\n });\n extend(PermissionGrid.prototype, 'oncreate', function () {\n app.tagList.load().then(() => {\n this.loading = false;\n m.redraw();\n });\n });\n override(PermissionGrid.prototype, 'view', function (original, vnode) {\n if (this.loading) {\n return m(LoadingIndicator, null);\n }\n return original(vnode);\n });\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n const required = original(globalPermission);\n return required.map(required => tagPrefix[0] + required);\n }\n return original(permission);\n });\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags')).filter(tag => tag.isRestricted()).forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({\n isRestricted: false\n }),\n render: item => {\n if ('setting' in item) return null;\n if (item.permission === 'viewForum' || item.permission === 'startDiscussion' || item.permission.startsWith('discussion.') && item.tagScoped !== false || item.tagScoped) {\n return m(PermissionDropdown, {\n permission: \"tag\".concat(tag.id(), \".\").concat(item.permission),\n allowGuest: item.allowGuest\n });\n }\n return null;\n }\n }));\n });\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n if (tags.length) {\n items.add('tag', m(Dropdown, {\n className: \"Dropdown--restrictByTag\",\n buttonClassName: \"Button Button--text\",\n label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),\n icon: \"fas fa-plus\",\n caretIcon: null\n }, tags.map(tag => m(Button, {\n icon: true,\n onclick: () => tag.save({\n isRestricted: true\n })\n }, [tagIcon(tag, {\n className: 'Button-icon'\n }), ' ', tag.name()]))));\n }\n });\n}","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport SettingDropdown from 'flarum/admin/components/SettingDropdown';\nexport default function () {\n extend(PermissionGrid.prototype, 'startItems', items => {\n items.add('allowTagChange', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n return m(SettingDropdown, {\n defaultLabel: minutes ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', {\n count: minutes\n }) : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: \"allow_tag_change\",\n options: [{\n value: '-1',\n label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')\n }, {\n value: '10',\n label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')\n }, {\n value: 'reply',\n label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')\n }]\n });\n }\n }, 90);\n });\n}","import { extend } from 'flarum/common/extend';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport SelectTagsSettingComponent from './components/SelectTagsSettingComponent';\nexport default function () {\n extend(AdminPage.prototype, 'customSettingComponents', function (items) {\n items.add('flarum-tags.select-tags', attrs => {\n return m(SelectTagsSettingComponent, Object.assign({}, attrs, {\n settingValue: this.settings[attrs.setting]\n }));\n });\n });\n}","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"common/components/TagSelectionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t328: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","flarum","reg","get","app","extensionData","for","registerPermission","icon","label","translator","trans","permission","extend","items","add","path","tagsLabel","tags","attrs","children","link","otherAttrs","className","sortTags","forEach","tag","length","push","tagLabel","m","SelectTagsSettingComponent","constructor","super","arguments","this","view","value","JSON","parse","settingValue","loaded","then","filter","includes","id","redraw","help","onclick","selectedTags","onsubmit","stringify","map","options","size","display","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread2","target","i","source","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_typeof","obj","Symbol","iterator","prototype","configurable","writable","_extends","assign","hasOwnProperty","call","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","userAgent","pattern","window","navigator","match","addChunkModule","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","capture","passive","on","el","event","fn","addEventListener","off","removeEventListener","matches","selector","substring","msMatchesSelector","webkitMatchesSelector","_","getParentOrHost","host","document","nodeType","parentNode","closest","ctx","includeCTX","_throttleTimeout","R_SPACE","toggleClass","name","state","classList","replace","css","prop","val","style","defaultView","getComputedStyle","currentStyle","matrix","selfOnly","appliedTransforms","transform","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","find","tagName","list","getElementsByTagName","n","getWindowScrollingElement","scrollingElement","documentElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","container","getBoundingClientRect","elRect","top","left","bottom","right","height","width","innerHeight","innerWidth","containerRect","parseInt","elMatrix","scaleX","a","scaleY","d","isScrolledPast","elSide","parentSide","parent","getParentAutoScrollElement","elSideVal","parentSideVal","getChild","childNum","includeDragEl","currentChild","Sortable","ghost","dragged","draggable","lastChild","last","lastElementChild","previousElementSibling","index","nodeName","toUpperCase","clone","getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","scrollLeft","scrollTop","includeSelf","elem","gotSelf","clientWidth","scrollWidth","clientHeight","scrollHeight","elemCSS","overflowX","overflowY","body","isRectEqual","rect1","rect2","Math","round","throttle","callback","ms","args","_this","setTimeout","scrollBy","x","y","Polymer","$","jQuery","Zepto","dom","cloneNode","expando","Date","getTime","plugins","defaults","initializeByDefault","PluginManager","mount","plugin","option","p","pluginName","concat","pluginEvent","eventName","sortable","evt","eventCanceled","cancel","eventNameGlobal","initializePlugins","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","_excluded","_ref","undefined","originalEvent","data","bind","dragEl","parentEl","ghostEl","rootEl","nextEl","lastDownEl","cloneEl","cloneHidden","dragStarted","moved","putSortable","activeSortable","active","oldIndex","oldDraggableIndex","newIndex","newDraggableIndex","hideGhostForTarget","_hideGhostForTarget","unhideGhostForTarget","_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","_dispatchEvent","info","targetEl","toEl","fromEl","extraEventProperties","onName","charAt","substr","CustomEvent","createEvent","initEvent","bubbles","cancelable","to","from","item","pullMode","lastPutMode","allEventProperties","dispatchEvent","activeGroup","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","targetMoveDistance","ghostRelativeParent","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","createElement","supportCssPointerEvents","cssText","pointerEvents","_detectDirection","elCSS","elWidth","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","split","touchingSideChild2","clear","_prepareGroup","toFn","pull","sameGroup","group","otherGroup","join","originalGroup","checkPull","checkPut","put","revertClone","preventDefault","stopPropagation","stopImmediatePropagation","nearestEmptyInsertDetectEvent","touches","nearest","clientX","clientY","some","threshold","emptyInsertThreshold","rect","insideHorizontally","insideVertically","ret","_onDragOver","_checkOutsideTargetEl","_isOutsideThisEl","toString","animationCallbackId","animationStates","sort","disabled","store","handle","test","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","setData","dataTransfer","textContent","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","Number","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","captureAnimationState","slice","child","fromRect","thisAnimationDuration","childMatrix","f","e","addAnimationState","removeAnimationState","splice","arr","indexOfObject","animateAll","clearTimeout","animating","animationTime","time","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","sqrt","pow","calculateRealTime","animate","max","animationResetTimer","currentRect","duration","translateX","translateY","animatingX","animatingY","forRepaintDummy","offsetWidth","repaint","animated","_onMove","dragRect","targetRect","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","_disableDraggable","_unsilent","_generateId","str","src","href","sum","charCodeAt","_nextTick","_cancelNextTick","contains","_getDirection","type","touch","pointerType","originalTarget","shadowRoot","composedPath","root","inputs","idx","checked","_saveInputCheckedState","button","isContentEditable","criteria","trim","_prepareDragStart","dragStartFn","ownerDocument","nextSibling","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","abs","floor","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","err","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","ghostMatrix","relativeScrollOffset","dx","dy","b","c","cssMatrix","appendChild","removeAttribute","_hideClone","cloneId","insertBefore","_loopId","setInterval","effectAllowed","_dragStartId","revert","vertical","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","_ghostIsLast","changed","_ghostIsFirst","firstChild","targetBeforeFirstSwap","sibling","differentLevel","differentRowCol","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_dragElInRowColumn","side1","scrolledPastTop","scrollBefore","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","_getSwapDirection","dragIndex","nextElementSibling","after","moveVector","extra","axis","insertion","_showClone","_offMoveEvents","_offUpEvents","clearInterval","removeChild","save","handleEvent","dropEffect","_globalDragOver","toArray","order","getAttribute","useAnimation","set","destroy","Array","querySelectorAll","utils","is","dst","nextTick","cancelNextTick","detectDirection","element","_len","_key","create","version","scrollEl","scrollRootEl","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","autoScrolls","scrolling","clearAutoScrolls","autoScroll","pid","clearPointerElemChangedInterval","isFallback","scroll","scrollCustomFn","sens","scrollSensitivity","speed","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","drop","toSortable","changedTouches","onSpill","Revert","Remove","startIndex","dragStart","_ref2","_ref3","_ref4","parentSortable","AutoScroll","forceAutoScrollFallback","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","EditTagModal","oninit","vnode","model","slug","description","color","isHidden","primary","title","attributes","submitData","content","fields","placeholder","oninput","bidi","tabindex","loading","exists","delete","hide","confirm","pushData","isChild","relationships","tagItem","tagIcon","position","TagsPage","forcedRefreshKey","minPrimaryTags","setting","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","oncreate","onListOnCreate","localeCompare","min","setMinTags","submitButton","onSort","onSortUpdate","minTags","maxTags","HTMLOListElement","HTMLUListElement","j","url","method","TagListState","async","loadedIncludes","query","unloadedIncludes","include","has","Promise","resolve","Set","Tag","backgroundUrl","backgroundMode","defaultSort","discussionCount","lastPostedAt","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","tagList","registerPage","override","original","tagPrefix","required","onremove","render","startsWith","tagScoped","allowGuest","buttonClassName","caretIcon","addTagPermission","addTagsHomePageOption","minutes","defaultLabel","count","settings","hasIcon","useColor","tagText","route","aPos","bPos","aParent","bParent","module","exports","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","o","chunkId","all","reduce","promises","u","g","globalThis","Function","l","done","script","needAttach","scripts","s","charset","timeout","nc","setAttribute","onScriptComplete","prev","onerror","onload","doneFns","head","r","toStringTag","scriptUrl","importScripts","location","currentScript","Error","compat","originalLoadChunk","loadChunk","installedChunks","installedChunkData","promise","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":";UAAIA,EACAC,kDCDJ,MAAM,EAA+BC,OAAOC,IAAIC,IAAI,OAAQ,0BCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,iBCAtD,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,gDCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,oDCA5D,MAAM,EAA+BF,OAAOC,IAAIC,IAAI,OAAQ,0GCA7C,SAAS,IACtBC,IAAIC,cAAcC,IAAI,eAAeC,mBAAmB,CACtDC,KAAM,aACNC,MAAOL,IAAIM,WAAWC,MAAM,uDAC5BC,WAAY,kBACX,WAAY,IAAIL,mBAAmB,CACp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AAiBhC,KAEf,KAD1BiC,EAAqBD,EAAgBhC,MACRgC,EAAgBhC,QAAWriB,GACrDskB,GAAoB,CACtB,IAAII,EAAY5uB,IAAyB,SAAfA,EAAMoY,KAAkB,UAAYpY,EAAMoY,MAChEyW,EAAU7uB,GAASA,EAAM3C,QAAU2C,EAAM3C,OAAOua,IACpD+W,EAAMG,QAAU,iBAAmBvC,EAAU,cAAgBqC,EAAY,KAAOC,EAAU,IAC1FF,EAAMrtB,KAAO,iBACbqtB,EAAMvW,KAAOwW,EACbD,EAAMI,QAAUF,EAChBL,EAAmB,GAAGG,EACvB,CACD,GAEwC,SAAWpC,EAASA,EAE/D,CACD,EAcF,IAAIyC,EAAuB,CAACC,EAA4B7kB,KACvD,IAGI4hB,EAAUO,GAHT2C,EAAUC,EAAaC,GAAWhlB,EAGhB9M,EAAI,EAC3B,GAAG4xB,EAAS5d,MAAMxV,GAAgC,IAAxByyB,EAAgBzyB,KAAa,CACtD,IAAIkwB,KAAYmD,EACZpD,EAAoBO,EAAE6C,EAAanD,KACrCD,EAAoBhxB,EAAEixB,GAAYmD,EAAYnD,IAG7CoD,GAAsBA,EAAQrD,EAClC,CAEA,IADGkD,GAA4BA,EAA2B7kB,GACrD9M,EAAI4xB,EAASt0B,OAAQ0C,IACzBivB,EAAU2C,EAAS5xB,GAChByuB,EAAoBO,EAAEiC,EAAiBhC,IAAYgC,EAAgBhC,IACrEgC,EAAgBhC,GAAS,KAE1BgC,EAAgBhC,GAAW,CAC5B,EAIG8C,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmB30B,QAAQs0B,EAAqB3kB,KAAK,KAAM,IAC3DglB,EAAmBx0B,KAAOm0B,EAAqB3kB,KAAK,KAAMglB,EAAmBx0B,KAAKwP,KAAKglB","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/PermissionGrid')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/PermissionDropdown')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/BasicsPage')\"","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/SettingDropdown')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/AdminPage')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/admin/components/SelectTagsSettingComponent.tsx","webpack://@flarum/tags/../../../node_modules/sortablejs/modular/sortable.esm.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'admin/components/ExtensionPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/withAttr')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/ColorPreviewInput')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/tags/./src/admin/components/EditTagModal.tsx","webpack://@flarum/tags/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/tags/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/tags/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/tags/../../../framework/core/js/src/admin/components/FormSectionGroup.tsx","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/query/discussions/TagGambit.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/admin/index.ts","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.tsx","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./src/admin/addTagSelectionSettingComponent.tsx","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/PermissionGrid');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/PermissionDropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","export default function () {\n app.extensionData.for('flarum-tags').registerPermission({\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag'\n }, 'moderate', 95).registerPermission({\n icon: 'fas fa-tags',\n label: app.translator.trans('flarum-tags.admin.permissions.bypass_tag_counts_label'),\n permission: 'bypassTagCounts'\n }, 'start', 89);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/BasicsPage');","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\nexport default function () {\n extend(BasicsPage.prototype, 'homePageItems', items => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label')\n });\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/SettingDropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/AdminPage');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class SelectTagsSettingComponent extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", []);\n _defineProperty(this, \"loaded\", false);\n }\n view() {\n const value = JSON.parse(this.attrs.settingValue() || '[]');\n if (!this.loaded) {\n app.tagList.load(['parent']).then(tags => {\n this.tags = tags.filter(tag => value.includes(tag.id()));\n this.loaded = true;\n m.redraw();\n });\n }\n return m(\"div\", {\n className: \"Form-group SelectTagsSettingComponent\"\n }, m(\"label\", null, this.attrs.label), this.attrs.help && m(\"p\", {\n className: \"helpText\"\n }, this.attrs.help), !this.loaded ? m(LoadingIndicator, {\n size: \"small\",\n display: \"inline\"\n }) : m(Button, {\n className: \"Button Button--text\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'common/components/TagSelectionModal', webpackMode: 'lazy-once' */ '../../common/components/TagSelectionModal'), {\n selectedTags: this.tags,\n onsubmit: tags => {\n this.tags = tags;\n this.attrs.settingValue(JSON.stringify(tags.map(tag => tag.id())));\n },\n ...this.attrs.options\n })\n }, !!this.tags.length ? tagsLabel(this.tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.admin.settings.button_text'))));\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/SelectTagsSettingComponent', SelectTagsSettingComponent);flarum.reg.addChunkModule('162', '610', 'flarum-tags', 'common/components/TagSelectionModal');","/**!\n * Sortable 1.15.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/ExtensionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/withAttr');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/ColorPreviewInput');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport FormModal from 'flarum/common/components/FormModal';\nimport Button from 'flarum/common/components/Button';\nimport ColorPreviewInput from 'flarum/common/components/ColorPreviewInput';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from 'flarum/common/utils/string';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport Form from 'flarum/common/components/Form';\nimport tagLabel from '../../common/helpers/tagLabel';\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends FormModal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tag\", void 0);\n _defineProperty(this, \"name\", void 0);\n _defineProperty(this, \"slug\", void 0);\n _defineProperty(this, \"description\", void 0);\n _defineProperty(this, \"color\", void 0);\n _defineProperty(this, \"icon\", void 0);\n _defineProperty(this, \"isHidden\", void 0);\n _defineProperty(this, \"primary\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.tag = this.attrs.model || app.store.createRecord('tags');\n this.name = Stream(this.tag.name() || '');\n this.slug = Stream(this.tag.slug() || '');\n this.description = Stream(this.tag.description() || '');\n this.color = Stream(this.tag.color() || '');\n this.icon = Stream(this.tag.icon() || '');\n this.isHidden = Stream(this.tag.isHidden() || false);\n this.primary = Stream(this.attrs.primary || false);\n }\n className() {\n return 'EditTagModal Modal--small';\n }\n title() {\n return this.name() ? tagLabel(app.store.createRecord('tags', {\n attributes: this.submitData()\n })) : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, this.fields().toArray()));\n }\n fields() {\n const items = new ItemList();\n items.add('name', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.name_label')), m(\"input\", {\n className: \"FormControl\",\n placeholder: app.translator.trans('flarum-tags.admin.edit_tag.name_placeholder'),\n value: this.name(),\n oninput: e => {\n const target = e.target;\n this.name(target.value);\n this.slug(slug(target.value));\n }\n })), 50);\n items.add('slug', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.slug_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.slug\n })), 40);\n items.add('description', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.description_label')), m(\"textarea\", {\n className: \"FormControl\",\n bidi: this.description\n })), 30);\n items.add('color', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.color_label')), m(ColorPreviewInput, {\n className: \"FormControl\",\n placeholder: \"#aaaaaa\",\n bidi: this.color\n })), 20);\n items.add('icon', m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.edit_tag.icon_label')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a: m(\"a\", {\n href: \"https://fontawesome.com/icons?m=free\",\n tabindex: \"-1\"\n })\n })), m(\"input\", {\n className: \"FormControl\",\n placeholder: \"fas fa-bolt\",\n bidi: this.icon\n })), 10);\n items.add('hidden', m(\"div\", {\n className: \"Form-group\"\n }, m(\"div\", null, m(\"label\", {\n className: \"checkbox\"\n }, m(\"input\", {\n type: \"checkbox\",\n bidi: this.isHidden\n }), app.translator.trans('flarum-tags.admin.edit_tag.hide_label')))), 10);\n items.add('submit', m(\"div\", {\n className: \"Form-group Form-controls\"\n }, m(Button, {\n type: \"submit\",\n className: \"Button Button--primary EditTagModal-save\",\n loading: this.loading\n }, app.translator.trans('flarum-tags.admin.edit_tag.submit_button')), this.tag.exists && m(\"button\", {\n type: \"button\",\n className: \"Button EditTagModal-delete\",\n onclick: this.delete.bind(this)\n }, app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_button'))), -10);\n return items;\n }\n submitData() {\n return {\n name: this.name(),\n slug: this.slug(),\n description: this.description(),\n color: this.color(),\n icon: this.icon(),\n isHidden: this.isHidden(),\n primary: this.primary()\n };\n }\n onsubmit(e) {\n e.preventDefault();\n this.loading = true;\n\n // Errors aren't passed to the modal onerror handler here.\n // This is done for better error visibility on smaller screen heights.\n this.tag.save(this.submitData()).then(() => this.hide(), () => this.loading = false);\n }\n delete() {\n if (confirm(extractText(app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_confirmation')))) {\n const children = app.store.all('tags').filter(tag => tag.parent() === this.tag);\n this.tag.delete().then(() => {\n children.forEach(tag => tag.pushData({\n attributes: {\n isChild: false\n },\n // @deprecated. Temporary hack for type safety, remove before v1.3.\n relationships: {\n parent: null\n }\n }));\n m.redraw();\n });\n this.hide();\n }\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/EditTagModal', EditTagModal);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div',

Hello World

);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default class Component {\n constructor() {\n /**\n * The root DOM element for the component.\n */\n _defineProperty(this, \"element\", void 0);\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n _defineProperty(this, \"attrs\", void 0);\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n _defineProperty(this, \"state\", void 0);\n }\n /**\n * @inheritdoc\n */\n /**\n * @inheritdoc\n */\n oninit(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector) {\n const $element = $(this.element);\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component(attrs, children) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (children === void 0) {\n children = null;\n }\n const componentAttrs = {\n ...attrs\n };\n return m(this, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n setAttrs(attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n this.constructor.initAttrs(attrs);\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] The \\\"children\\\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute\"));\n }\n if ('tag' in attrs) {\n throw new Error(\"[\".concat(this.constructor.name, \"] You cannot use the \\\"tag\\\" attribute name with Mithril 2.\"));\n }\n }\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs) {}\n}\nflarum.reg.add('flarum-tags', '../../../../framework/core/js/src/common/Component', Component);","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t app.modal.show(EditTagModal, {\n model: tag\n })\n })), !tag.isChild() && tag.position() !== null && m(\"ol\", {\n className: \"TagListItem-children TagList\"\n }, sortTags(app.store.all('tags')).filter(child => child.parent() === tag).map(tagItem)));\n}\nexport default class TagsPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n // A regular redraw won't work here, because sortable has mucked around\n // with the DOM which will confuse Mithril's diffing algorithm. Instead\n // we force a full reconstruction of the DOM by changing the key, which\n // makes mithril completely re-render the component on redraw.\n this.forcedRefreshKey = 0;\n this.loading = true;\n app.tagList.load(['parent']).then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n content() {\n if (this.loading) {\n return m(LoadingIndicator, null);\n }\n const minPrimaryTags = this.setting('flarum-tags.min_primary_tags', 0);\n const maxPrimaryTags = this.setting('flarum-tags.max_primary_tags', 0);\n const minSecondaryTags = this.setting('flarum-tags.min_secondary_tags', 0);\n const maxSecondaryTags = this.setting('flarum-tags.max_secondary_tags', 0);\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.parent()));\n return m(\"div\", {\n className: \"TagsContent\"\n }, m(\"div\", {\n className: \"TagsContent-list\"\n }, m(\"div\", {\n className: \"container\",\n key: this.forcedRefreshKey,\n oncreate: this.onListOnCreate.bind(this)\n }, m(FormSectionGroup, null, m(FormSection, {\n className: \"TagGroup\",\n label: app.translator.trans('flarum-tags.admin.tags.primary_heading')\n }, m(\"ol\", {\n className: \"TagList TagList--primary\"\n }, tags.filter(tag => tag.position() !== null && !tag.isChild()).map(tagItem)), m(Button, {\n className: \"Button TagList-button\",\n icon: \"fas fa-plus\",\n onclick: () => app.modal.show(EditTagModal, {\n primary: true\n })\n }, app.translator.trans('flarum-tags.admin.tags.create_primary_tag_button'))), m(FormSection, {\n className: \"TagGroup TagGroup--secondary\",\n label: app.translator.trans('flarum-tags.admin.tags.secondary_heading')\n }, m(\"ul\", {\n className: \"TagList\"\n }, tags.filter(tag => tag.position() === null).sort((a, b) => a.name().localeCompare(b.name())).map(tagItem)), m(Button, {\n className: \"Button TagList-button\",\n icon: \"fas fa-plus\",\n onclick: () => app.modal.show(EditTagModal, {\n primary: false\n })\n }, app.translator.trans('flarum-tags.admin.tags.create_secondary_tag_button'))), m(FormSection, {\n label: app.translator.trans('flarum-tags.admin.tags.settings_heading')\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tag_settings.required_primary_heading')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.tag_settings.required_primary_text')), m(\"div\", {\n className: \"TagSettings-rangeInput\"\n }, m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: \"0\",\n value: minPrimaryTags(),\n oninput: withAttr('value', this.setMinTags.bind(this, minPrimaryTags, maxPrimaryTags))\n }), app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text'), m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: minPrimaryTags(),\n bidi: maxPrimaryTags\n }))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_heading')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_text')), m(\"div\", {\n className: \"TagSettings-rangeInput\"\n }, m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: \"0\",\n value: minSecondaryTags(),\n oninput: withAttr('value', this.setMinTags.bind(this, minSecondaryTags, maxSecondaryTags))\n }), app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text'), m(\"input\", {\n className: \"FormControl\",\n type: \"number\",\n min: minSecondaryTags(),\n bidi: maxSecondaryTags\n }))), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, this.submitButton())))), m(\"div\", {\n className: \"TagsContent-footer\"\n }, m(\"p\", null, app.translator.trans('flarum-tags.admin.tags.about_tags_text'))))));\n }\n onListOnCreate(vnode) {\n this.$('.TagList').get().map(e => {\n sortable.create(e, {\n group: 'tags',\n delay: 50,\n delayOnTouchOnly: true,\n touchStartThreshold: 5,\n animation: 150,\n swapThreshold: 0.65,\n dragClass: 'sortable-dragging',\n ghostClass: 'sortable-placeholder',\n onSort: e => this.onSortUpdate(e)\n });\n });\n }\n setMinTags(minTags, maxTags, value) {\n minTags(value);\n maxTags(Math.max(value, maxTags()));\n }\n onSortUpdate(e) {\n // If we've moved a tag from 'primary' to 'secondary', then we'll update\n // its attributes in our local store so that when we redraw the change\n // will be made.\n if (e.from instanceof HTMLOListElement && e.to instanceof HTMLUListElement) {\n app.store.getById('tags', e.item.getAttribute('data-id')).pushData({\n attributes: {\n position: null,\n isChild: false\n },\n relationships: {\n parent: null\n }\n });\n }\n\n // Construct an array of primary tag IDs and their children, in the same\n // order that they have been arranged in.\n const order = this.$('.TagList--primary > li').map(function () {\n return {\n id: $(this).data('id'),\n children: $(this).find('li').map(function () {\n return $(this).data('id');\n }).get()\n };\n }).get();\n\n // Now that we have an accurate representation of the order which the\n // primary tags are in, we will update the tag attributes in our local\n // store to reflect this order.\n order.forEach((tag, i) => {\n const parent = app.store.getById('tags', tag.id);\n parent.pushData({\n attributes: {\n position: i,\n isChild: false\n },\n relationships: {\n parent: null\n }\n });\n tag.children.forEach((child, j) => {\n app.store.getById('tags', child).pushData({\n attributes: {\n position: j,\n isChild: true\n },\n relationships: {\n parent\n }\n });\n });\n });\n app.request({\n url: app.forum.attribute('apiUrl') + '/tags/order',\n method: 'POST',\n body: {\n order\n }\n });\n this.forcedRefreshKey++;\n m.redraw();\n }\n}\nflarum.reg.add('flarum-tags', 'admin/components/TagsPage', TagsPage);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n includes.forEach(include => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","export default class TagGambit {\n pattern() {\n return 'tag:(.+)';\n }\n toFilter(matches, negate) {\n const key = (negate ? '-' : '') + 'tag';\n return {\n [key]: matches[1].split(',')\n };\n }\n filterKey() {\n return 'tag';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"tag:\").concat(value);\n }\n}\nflarum.reg.add('flarum-tags', 'common/query/discussions/TagGambit', TagGambit);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nimport TagGambit from './query/discussions/TagGambit';\nexport default [new Extend.Store() //\n.add('tags', Tag), new Extend.Search() //\n.gambit('discussions', TagGambit)];","import app from 'flarum/admin/app';\nimport addTagsPermissionScope from './addTagsPermissionScope';\nimport addTagPermission from './addTagPermission';\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\nimport addTagSelectionSettingComponent from './addTagSelectionSettingComponent';\nimport TagsPage from './components/TagsPage';\nimport TagListState from '../common/states/TagListState';\nexport { default as extend } from '../common/extend';\napp.initializers.add('flarum-tags', app => {\n app.tagList = new TagListState();\n app.extensionData.for('flarum-tags').registerPage(TagsPage);\n addTagsPermissionScope();\n addTagPermission();\n addTagsHomePageOption();\n addTagChangePermission();\n addTagSelectionSettingComponent();\n});\nimport './admin';","import app from 'flarum/admin/app';\nimport { extend, override } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/admin/components/PermissionDropdown';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\nexport default function () {\n extend(PermissionGrid.prototype, 'oninit', function () {\n this.loading = true;\n });\n extend(PermissionGrid.prototype, 'oncreate', function () {\n app.tagList.load().then(() => {\n this.loading = false;\n m.redraw();\n });\n });\n override(PermissionGrid.prototype, 'view', function (original, vnode) {\n if (this.loading) {\n return m(LoadingIndicator, null);\n }\n return original(vnode);\n });\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n const required = original(globalPermission);\n return required.map(required => tagPrefix[0] + required);\n }\n return original(permission);\n });\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags')).filter(tag => tag.isRestricted()).forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({\n isRestricted: false\n }),\n render: item => {\n if ('setting' in item) return null;\n if (item.permission === 'viewForum' || item.permission === 'startDiscussion' || item.permission.startsWith('discussion.') && item.tagScoped !== false || item.tagScoped) {\n return m(PermissionDropdown, {\n permission: \"tag\".concat(tag.id(), \".\").concat(item.permission),\n allowGuest: item.allowGuest\n });\n }\n return null;\n }\n }));\n });\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n if (tags.length) {\n items.add('tag', m(Dropdown, {\n className: \"Dropdown--restrictByTag\",\n buttonClassName: \"Button Button--text\",\n label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),\n icon: \"fas fa-plus\",\n caretIcon: null\n }, tags.map(tag => m(Button, {\n icon: true,\n onclick: () => tag.save({\n isRestricted: true\n })\n }, [tagIcon(tag, {\n className: 'Button-icon'\n }), ' ', tag.name()]))));\n }\n });\n}","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\nimport PermissionGrid from 'flarum/admin/components/PermissionGrid';\nimport SettingDropdown from 'flarum/admin/components/SettingDropdown';\nexport default function () {\n extend(PermissionGrid.prototype, 'startItems', items => {\n items.add('allowTagChange', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n return m(SettingDropdown, {\n defaultLabel: minutes ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', {\n count: minutes\n }) : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: \"allow_tag_change\",\n options: [{\n value: '-1',\n label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')\n }, {\n value: '10',\n label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')\n }, {\n value: 'reply',\n label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')\n }]\n });\n }\n }, 90);\n });\n}","import { extend } from 'flarum/common/extend';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport SelectTagsSettingComponent from './components/SelectTagsSettingComponent';\nexport default function () {\n extend(AdminPage.prototype, 'customSettingComponents', function (items) {\n items.add('flarum-tags.select-tags', attrs => {\n return m(SelectTagsSettingComponent, Object.assign({}, attrs, {\n settingValue: this.settings[attrs.setting]\n }));\n });\n });\n}","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"common/components/TagSelectionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t328: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","flarum","reg","get","app","extensionData","for","registerPermission","icon","label","translator","trans","permission","extend","items","add","path","tagsLabel","tags","attrs","children","link","otherAttrs","className","sortTags","forEach","tag","length","push","tagLabel","m","SelectTagsSettingComponent","constructor","super","arguments","this","view","value","JSON","parse","settingValue","loaded","then","filter","includes","id","redraw","help","onclick","selectedTags","onsubmit","stringify","map","options","size","display","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread2","target","i","source","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_typeof","obj","Symbol","iterator","prototype","configurable","writable","_extends","assign","hasOwnProperty","call","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","userAgent","pattern","window","navigator","match","addChunkModule","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","capture","passive","on","el","event","fn","addEventListener","off","removeEventListener","matches","selector","substring","msMatchesSelector","webkitMatchesSelector","_","getParentOrHost","host","document","nodeType","parentNode","closest","ctx","includeCTX","_throttleTimeout","R_SPACE","toggleClass","name","state","classList","replace","css","prop","val","style","defaultView","getComputedStyle","currentStyle","matrix","selfOnly","appliedTransforms","transform","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","find","tagName","list","getElementsByTagName","n","getWindowScrollingElement","scrollingElement","documentElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","container","getBoundingClientRect","elRect","top","left","bottom","right","height","width","innerHeight","innerWidth","containerRect","parseInt","elMatrix","scaleX","a","scaleY","d","isScrolledPast","elSide","parentSide","parent","getParentAutoScrollElement","elSideVal","parentSideVal","getChild","childNum","includeDragEl","currentChild","Sortable","ghost","dragged","draggable","lastChild","last","lastElementChild","previousElementSibling","index","nodeName","toUpperCase","clone","getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","scrollLeft","scrollTop","includeSelf","elem","gotSelf","clientWidth","scrollWidth","clientHeight","scrollHeight","elemCSS","overflowX","overflowY","body","isRectEqual","rect1","rect2","Math","round","throttle","callback","ms","args","_this","setTimeout","scrollBy","x","y","Polymer","$","jQuery","Zepto","dom","cloneNode","expando","Date","getTime","plugins","defaults","initializeByDefault","PluginManager","mount","plugin","option","p","pluginName","concat","pluginEvent","eventName","sortable","evt","eventCanceled","cancel","eventNameGlobal","initializePlugins","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","_excluded","_ref","undefined","originalEvent","data","bind","dragEl","parentEl","ghostEl","rootEl","nextEl","lastDownEl","cloneEl","cloneHidden","dragStarted","moved","putSortable","activeSortable","active","oldIndex","oldDraggableIndex","newIndex","newDraggableIndex","hideGhostForTarget","_hideGhostForTarget","unhideGhostForTarget","_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","_dispatchEvent","info","targetEl","toEl","fromEl","extraEventProperties","onName","charAt","substr","CustomEvent","createEvent","initEvent","bubbles","cancelable","to","from","item","pullMode","lastPutMode","allEventProperties","dispatchEvent","activeGroup","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","targetMoveDistance","ghostRelativeParent","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","createElement","supportCssPointerEvents","cssText","pointerEvents","_detectDirection","elCSS","elWidth","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","split","touchingSideChild2","clear","_prepareGroup","toFn","pull","sameGroup","group","otherGroup","join","originalGroup","checkPull","checkPut","put","revertClone","preventDefault","stopPropagation","stopImmediatePropagation","nearestEmptyInsertDetectEvent","touches","nearest","clientX","clientY","some","threshold","emptyInsertThreshold","rect","insideHorizontally","insideVertically","ret","_onDragOver","_checkOutsideTargetEl","_isOutsideThisEl","toString","animationCallbackId","animationStates","sort","disabled","store","handle","test","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","setData","dataTransfer","textContent","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","Number","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","captureAnimationState","slice","child","fromRect","thisAnimationDuration","childMatrix","f","e","addAnimationState","removeAnimationState","splice","arr","indexOfObject","animateAll","clearTimeout","animating","animationTime","time","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","sqrt","pow","calculateRealTime","animate","max","animationResetTimer","currentRect","duration","translateX","translateY","animatingX","animatingY","forRepaintDummy","offsetWidth","repaint","animated","_onMove","dragRect","targetRect","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","_disableDraggable","_unsilent","_generateId","str","src","href","sum","charCodeAt","_nextTick","_cancelNextTick","contains","_getDirection","type","touch","pointerType","originalTarget","shadowRoot","composedPath","root","inputs","idx","checked","_saveInputCheckedState","button","isContentEditable","criteria","trim","_prepareDragStart","dragStartFn","ownerDocument","nextSibling","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","abs","floor","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","err","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","ghostMatrix","relativeScrollOffset","dx","dy","b","c","cssMatrix","appendChild","removeAttribute","_hideClone","cloneId","insertBefore","_loopId","setInterval","effectAllowed","_dragStartId","revert","vertical","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","_ghostIsLast","changed","_ghostIsFirst","firstChild","targetBeforeFirstSwap","sibling","differentLevel","differentRowCol","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_dragElInRowColumn","side1","scrolledPastTop","scrollBefore","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","_getSwapDirection","dragIndex","nextElementSibling","after","moveVector","extra","axis","insertion","_showClone","_offMoveEvents","_offUpEvents","clearInterval","removeChild","save","handleEvent","dropEffect","_globalDragOver","toArray","order","getAttribute","useAnimation","set","destroy","Array","querySelectorAll","utils","is","dst","nextTick","cancelNextTick","detectDirection","element","_len","_key","create","version","scrollEl","scrollRootEl","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","autoScrolls","scrolling","clearAutoScrolls","autoScroll","pid","clearPointerElemChangedInterval","isFallback","scroll","scrollCustomFn","sens","scrollSensitivity","speed","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","drop","toSortable","changedTouches","onSpill","Revert","Remove","startIndex","dragStart","_ref2","_ref3","_ref4","parentSortable","AutoScroll","forceAutoScrollFallback","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","EditTagModal","oninit","vnode","model","slug","description","color","isHidden","primary","title","attributes","submitData","content","fields","placeholder","oninput","bidi","tabindex","loading","exists","delete","hide","confirm","pushData","isChild","relationships","Component","setAttrs","oncreate","onbeforeupdate","onupdate","onbeforeremove","onremove","$element","static","componentAttrs","initAttrs","Error","r","t","isArray","FormSectionGroup","FormSection","tagItem","tagIcon","position","TagsPage","forcedRefreshKey","minPrimaryTags","setting","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","onListOnCreate","localeCompare","min","setMinTags","submitButton","onSort","onSortUpdate","minTags","maxTags","HTMLOListElement","HTMLUListElement","j","url","method","TagListState","async","loadedIncludes","query","unloadedIncludes","include","has","Promise","resolve","Set","Tag","backgroundUrl","backgroundMode","defaultSort","discussionCount","lastPostedAt","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","TagGambit","toFilter","negate","filterKey","fromFilter","gambit","tagList","registerPage","override","original","tagPrefix","required","render","startsWith","tagScoped","allowGuest","buttonClassName","caretIcon","addTagPermission","addTagsHomePageOption","minutes","defaultLabel","count","settings","hasIcon","useColor","tagText","route","aPos","bPos","aParent","bParent","module","exports","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","o","chunkId","all","reduce","promises","u","g","globalThis","Function","l","done","script","needAttach","scripts","s","charset","timeout","nc","setAttribute","onScriptComplete","prev","onerror","onload","doneFns","head","toStringTag","scriptUrl","importScripts","location","currentScript","compat","originalLoadChunk","loadChunk","installedChunks","installedChunkData","promise","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/tags/js/dist/forum.js b/extensions/tags/js/dist/forum.js index 8b276d21cf..efb7220cd0 100644 --- a/extensions/tags/js/dist/forum.js +++ b/extensions/tags/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t,e,s={974:(t,e,s)=>{"use strict";s.d(e,{Z:()=>a});var r=s(836),o=s.n(r);function a(t,e,s){void 0===e&&(e={}),void 0===s&&(s={});const r=t&&t.icon(),{useColor:a=!0}=s;return e.className=o()([e.className,"icon text-colored",r?t.icon():"TagIcon"]),t&&a?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",a)},924:(t,e,s)=>{"use strict";s.d(e,{Z:()=>g});var r=s(780),o=s.n(r),a=s(678),n=s.n(a),i=s(836),l=s.n(i),c=s(679),u=s.n(c),d=s(974);function g(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const s=o()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const r=t.color();r&&(e.style["--tag-bg"]=r,e.className=l()(e.className,"colored",u()(r))),s&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(s?n():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",g)},270:()=>{},648:(t,e,s)=>{"use strict";function r(t){return t.slice(0).sort(((t,e)=>{const s=t.position(),r=e.position();if(null===s&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===s)return 1;const o=t.parent(),a=e.parent();return o===a?s-r:o&&a?o.position()-a.position():o?o===e?1:o.position()-r:a?a===t?-1:s-a.position():0}))}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","common/utils/sortTags",r)},503:(t,e,s)=>{"use strict";s.d(e,{l:()=>yt});var r=s(892),o=s.n(r),a=s(905),n=s(351),i=s.n(n);class l{constructor(){(0,a.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(i().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),i().store.find("tags",{include:t.join(",")}).then((e=>(t.forEach((t=>this.loadedIncludes.add(t))),e)))}}flarum.reg.add("flarum-tags","common/states/TagListState",l);const c=flarum.reg.get("core","common/extend"),u=flarum.reg.get("core","forum/components/IndexSidebar");var d=s.n(u);const g=flarum.reg.get("core","common/components/Separator");var f=s.n(g);const p=flarum.reg.get("core","common/components/LinkButton");var h=s.n(p),v=s(678),b=s.n(v),T=s(836),y=s.n(T),x=s(974);class w extends(h()){view(t){const e=this.attrs.model,s=e&&e.description(),r=y()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(b(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:s||void 0},(0,x.Z)(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))}static initAttrs(t){super.initAttrs(t);const e=t.model;t.params.tags=e?e.slug():"untagged",t.route=app.route("tag",t.params)}}flarum.reg.add("flarum-tags","forum/components/TagLinkButton",w);const N=flarum.reg.get("core","common/components/Page");var k=s.n(N);const C=flarum.reg.get("core","forum/components/PageStructure");var _=s.n(C);const P=flarum.reg.get("core","forum/components/WelcomeHero");var S=s.n(P),D=s(149),A=s.n(D);const L=flarum.reg.get("core","common/utils/ItemList");var I=s.n(L);const Z=flarum.reg.get("core","common/helpers/humanTime");var M=s.n(Z),j=s(679),E=s.n(j),B=s(596),H=s.n(B),O=s(924),R=s(648);class q extends(k()){constructor(){super(...arguments),(0,a.Z)(this,"tags",void 0),(0,a.Z)(this,"loading",void 0)}oninit(t){super.oninit(t),o().history.push("tags",H()(o().translator.trans("flarum-tags.forum.header.back_to_tags_tooltip"))),this.tags=[];const e=o().preloadedApiDocument();e?this.tags=(0,R.Z)(e.filter((t=>!t.isChild()))):(this.loading=!0,o().tagList.load(["children","lastPostedDiscussion","parent"]).then((()=>{this.tags=(0,R.Z)(o().store.all("tags").filter((t=>!t.isChild()))),this.loading=!1,m.redraw()})))}oncreate(t){super.oncreate(t),o().setTitle(H()(o().translator.trans("flarum-tags.forum.all_tags.meta_title_text"))),o().setTitleCount(0)}view(){return m(_(),{className:"TagsPage",hero:this.hero.bind(this),sidebar:this.sidebar.bind(this)},this.contentItems().toArray())}contentItems(){const t=new(I());if(this.loading)t.add("loading",m(A(),null));else{const e=this.tags.filter((t=>null!==t.position())),s=this.tags.filter((t=>null===t.position()));t.add("tagTiles",this.tagTileListView(e),100),s.length&&t.add("cloud",this.cloudView(s),10)}return t}hero(){return m(S(),null)}sidebar(){return m(d(),null)}tagTileListView(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))}tagTileView(t){const e=t.lastPostedDiscussion(),s=(0,R.Z)(t.children()||[]);return m("li",{className:y()("TagTile",{colored:t.color()},E()(t.color())),style:{"--tag-bg":t.color()}},m(b(),{className:"TagTile-info",href:o().route.tag(t)},m("div",{className:"TagTile-heading"},t.icon()&&(0,x.Z)(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name())),m("p",{className:"TagTile-description"},t.description()),!!s&&m("div",{className:"TagTile-children"},s.map((t=>[m(b(),{href:o().route.tag(t)},t.name())," "])))),e?m(b(),{className:"TagTile-lastPostedDiscussion",href:o().route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),M()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}cloudView(t){return m("div",{className:"TagCloud"},t.map((t=>[(0,O.Z)(t,{link:!0})," "])))}}flarum.reg.add("flarum-tags","forum/components/TagsPage",q);const V=flarum.reg.get("core","forum/components/IndexPage");var $=s.n(V);const F=flarum.reg.get("core","forum/states/DiscussionListState");var K=s.n(F);const U=flarum.reg.get("core","forum/states/GlobalSearchState");var z=s.n(U),G=s(433),W=s.n(G);class J extends(W()){view(){const t=this.attrs.model,e=t.color();return m("header",{className:y()("Hero","TagHero",{"TagHero--colored":e,[E()(e)]:e}),style:e?{"--hero-bg":e}:void 0},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},t.icon()&&(0,x.Z)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))}}flarum.reg.add("flarum-tags","forum/components/TagHero",J);const Q=t=>o().store.all("tags").find((e=>0===e.slug().localeCompare(t,void 0,{sensitivity:"base"}))),X=flarum.reg.get("core","forum/components/DiscussionListItem");var Y=s.n(X);const tt=flarum.reg.get("core","forum/components/DiscussionHero");var et=s.n(tt);function st(t,e){void 0===e&&(e={});const s=[],{link:r,...o}=e;return o.className=y()("TagsLabel",o.className),t?(0,R.Z)(t).forEach((e=>{(e||1===t.length)&&s.push((0,O.Z)(e,{link:r}))})):s.push((0,O.Z)()),m("span",o,s)}s(780),flarum.reg.add("flarum-tags","common/helpers/tagsLabel",st);const rt=flarum.reg.get("core","forum/utils/DiscussionControls");var ot=s.n(rt),at=s(645),nt=s.n(at);flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/TagDiscussionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/TagDiscussionModal.tsx"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/common/components/TagSelectionModal.tsx"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/ToggleButton.js");var it=s(490);const lt=flarum.reg.get("core","common/extenders");var ct=s.n(lt);const ut=flarum.reg.get("core","common/models/Discussion");var mt=s.n(ut);const dt=flarum.reg.get("core","forum/components/EventPost");var gt=s.n(dt);class ft extends(gt()){static initAttrs(t){super.initAttrs(t);const e=t.post.content()[0],s=t.post.content()[1];function r(t,e){return t.filter((t=>-1===e.indexOf(t))).map((t=>app.store.getById("tags",t)))}t.tagsAdded=r(s,e),t.tagsRemoved=r(e,s)}icon(){return"fas fa-tag"}descriptionKey(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"}descriptionData(){const t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t}}flarum.reg.add("flarum-tags","forum/components/DiscussionTaggedPost",ft);const pt=flarum.reg.get("core","common/utils/computed");var ht=s.n(pt);const vt=flarum.reg.get("core","common/Model");var bt=s.n(vt);class Tt extends(bt()){name(){return bt().attribute("name").call(this)}slug(){return bt().attribute("slug").call(this)}description(){return bt().attribute("description").call(this)}color(){return bt().attribute("color").call(this)}backgroundUrl(){return bt().attribute("backgroundUrl").call(this)}backgroundMode(){return bt().attribute("backgroundMode").call(this)}icon(){return bt().attribute("icon").call(this)}position(){return bt().attribute("position").call(this)}parent(){return bt().hasOne("parent").call(this)}children(){return bt().hasMany("children").call(this)}defaultSort(){return bt().attribute("defaultSort").call(this)}isChild(){return bt().attribute("isChild").call(this)}isHidden(){return bt().attribute("isHidden").call(this)}discussionCount(){return bt().attribute("discussionCount").call(this)}lastPostedAt(){return bt().attribute("lastPostedAt",bt().transformDate).call(this)}lastPostedDiscussion(){return bt().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return bt().attribute("isRestricted").call(this)}canStartDiscussion(){return bt().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return bt().attribute("canAddToDiscussion").call(this)}isPrimary(){return ht()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",Tt);const yt=[(new(ct().Store)).add("tags",Tt),(new(ct().Routes)).add("tags","/tags",q).add("tag","/t/:tags",$()).helper("tag",(t=>o().route("tag",{tags:t.slug()}))),(new(ct().PostTypes)).add("discussionTagged",ft),new(ct().Model)(mt()).hasMany("tags").attribute("canTag")];o().initializers.add("flarum-tags",(function(){o().tagList=new l,(0,c.extend)(d().prototype,"navItems",(function(t){if(t.add("tags",m(h(),{icon:"fas fa-th-large",href:o().route("tags")},o().translator.trans("flarum-tags.forum.index.tags_link")),-10),o().current.matches(q))return;t.add("separator",m(f(),null),-12);const e=o().search.stickyParams(),s=o().store.all("tags"),r=o().currentTag(),a=s=>{let o=r===s;!o&&r&&(o=r.parent()===s),t.add("tag"+s.id(),m(w,{model:s,params:e,active:o},null==s?void 0:s.name()),-14)};(0,R.Z)(s).filter((t=>null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent())))).forEach(a);const n=s.filter((t=>null===t.position())).sort(((t,e)=>e.discussionCount()-t.discussionCount()));n.splice(0,3).forEach(a),n.length&&t.add("moreTags",m(h(),{href:o().route("tags")},o().translator.trans("flarum-tags.forum.index.more_link")),-16)})),o().currentTag=function(t){if(this.currentActiveTag&&!t)return this.currentActiveTag;const e=this.search.params().tags;let s=null;if(e&&(s=Q(e)),e&&!s||s&&!s.isChild()&&!s.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,this.store.find("tags",e,{include:"children,children.parent,parent,state"}).then((()=>{this.currentActiveTag=Q(e),m.redraw()})).finally((()=>{this.currentTagLoading=!1}))}if(s)return this.currentActiveTag=s,this.currentActiveTag;this.currentActiveTag=void 0},(0,c.extend)($().prototype,"view",(function(t){o().currentTag(!0)})),(0,c.override)($().prototype,"hero",(function(t){const e=o().currentTag();return e?m(J,{model:e}):t()})),(0,c.extend)($().prototype,"view",(function(t){const e=o().currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,c.extend)($().prototype,"setTitle",(function(){const t=o().currentTag();t&&o().setTitle(t.name())})),(0,c.extend)(d().prototype,"items",(function(t){const e=o().currentTag();if(e){const s=e.color(),r=e.canStartDiscussion()||!o().session.user,a=t.get("newDiscussion");s&&(a.attrs.className=y()([a.attrs.className,"Button--tagColored",E()(s)]),a.attrs.style={"--color":s}),a.attrs.disabled=!r,a.children=o().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,c.extend)(z().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,c.extend)(K().prototype,"requestParams",(function(t){var e;if("string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags){var s;const e=null!=(s=t.filter)?s:{};e.tag=this.params.tags;const r=e.q;r&&(e.q="".concat(r," tag:").concat(this.params.tags)),t.filter=e}})),(0,c.extend)(Y().prototype,"infoItems",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e),10)})),(0,c.extend)(et().prototype,"view",(function(t){const e=(0,R.Z)(this.attrs.discussion.tags());if(e&&e.length){const s=e[0].color();s&&(t.attrs.style={"--hero-bg":s},t.attrs.className=y()(t.attrs.className,"DiscussionHero--colored",E()(s)))}})),(0,c.extend)(et().prototype,"items",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e,{link:!0}),5)})),(0,c.extend)(ot(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(nt(),{icon:"fas fa-tag",onclick:()=>app.modal.show((()=>s.e(642).then(s.bind(s,884))),{discussion:e})},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))})),(0,c.extend)(d().prototype,"newDiscussionAction",(function(t){const e=o().currentTag();if(e){const s=e.parent(),r=s?[s,e]:[e];t.then((t=>t.fields.tags=r))}else o().composer.fields.tags=[]})),(0,c.extend)("flarum/forum/components/DiscussionComposer","oninit",(function(){o().tagList.load(["parent"]).then((()=>m.redraw())),this.constructor.prototype.chooseTags=function(){(0,it.Z)().length&&o().modal.show((()=>s.e(642).then(s.bind(s,884))),{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:t=>{this.composer.fields.tags=t,this.$("textarea").focus()}})}})),(0,c.extend)("flarum/forum/components/DiscussionComposer","headerItems",(function(t){const e=this.composer.fields.tags||[],s=(0,it.Z)();t.add("tags",m("a",{className:y()(["DiscussionComposer-changeTags",!s.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?st(e):m("span",{className:"TagLabel untagged"},o().translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,c.override)("flarum/forum/components/DiscussionComposer","onsubmit",(function(t){const e=this.composer.fields.tags||[],r=e.filter((t=>null!==t.position()&&!t.isChild())),a=e.filter((t=>null===t.position())),n=(0,it.Z)(),i=parseInt(o().forum.attribute("minPrimaryTags")),l=parseInt(o().forum.attribute("minSecondaryTags")),c=parseInt(o().forum.attribute("maxPrimaryTags")),u=parseInt(o().forum.attribute("maxSecondaryTags"));(!e.length&&0!==c&&0!==u||r.lengths.e(642).then(s.bind(s,884))),{selectedTags:e,onsubmit:e=>{this.composer.fields.tags=e,t()}}):t()})),(0,c.extend)("flarum/forum/components/DiscussionComposer","data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}))},490:(t,e,s)=>{"use strict";function r(t){let e=app.store.all("tags");if(t){const s=t.tags()||[];e=e.filter((t=>t.canAddToDiscussion()||s.includes(t)))}else e=e.filter((t=>t.canStartDiscussion()));return e}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","forum/utils/getSelectableTags",r)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},679:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},892:t=>{"use strict";t.exports=flarum.reg.get("core","forum/app")},232:t=>{"use strict";t.exports=flarum.reg.get("core","forum/components/DiscussionPage")},905:(t,e,s)=>{"use strict";function r(t){return r="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},r(t)}function o(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var o=s.call(t,e);if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}s.d(e,{Z:()=>o})}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var a=r[t]={exports:{}};return s[t](a,a.exports,o),a.exports}o.m=s,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var s in e)o.o(e,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,s)=>(o.f[s](t,e),e)),[])),o.u=t=>"forum/components/TagDiscussionModal.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",o.l=(s,r,a,n)=>{if(t[s])t[s].push(r);else{var i,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{i.onerror=i.onload=null,clearTimeout(g);var o=t[s];if(delete t[s],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((t=>t(r))),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var s=e.getElementsByTagName("script");s.length&&(t=s[s.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),o.f.compat=(t,e)=>{const s=o.l;o.l=flarum.reg.loadChunk.bind(flarum.reg,s)},(()=>{var t={315:0};o.f.j=(e,s)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)s.push(r[2]);else{var a=new Promise(((s,o)=>r=t[e]=[s,o]));s.push(r[2]=a);var n=o.p+o.u(e),i=new Error;o.l(n,(s=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var a=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;i.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,r[1](i)}}),"chunk-"+e,e)}};var e=(e,s)=>{var r,a,[n,i,l]=s,c=0;if(n.some((e=>0!==t[e]))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);l&&l(o)}for(e&&e(s);c{"use strict";o.r(a),o.d(a,{extend:()=>s.l});var t=o(270),e={};for(const s in t)"default"!==s&&(e[s]=()=>t[s]);o.d(a,e);var s=o(503)})(),module.exports=a})(); +(()=>{var t,e,s={974:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});var r=s(836),a=s.n(r);function o(t,e,s){void 0===e&&(e={}),void 0===s&&(s={});const r=t&&t.icon(),{useColor:o=!0}=s;return e.className=a()([e.className,"icon text-colored",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",o)},924:(t,e,s)=>{"use strict";s.d(e,{Z:()=>g});var r=s(780),a=s.n(r),o=s(678),n=s.n(o),i=s(836),l=s.n(i),c=s(322),u=s.n(c),d=s(974);function g(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const s=a()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const r=t.color();r&&(e.style["--tag-bg"]=r,e.className=l()(e.className,"colored",u()(r))),s&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(s?n():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",g)},270:()=>{},648:(t,e,s)=>{"use strict";function r(t){return t.slice(0).sort(((t,e)=>{const s=t.position(),r=e.position();if(null===s&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===s)return 1;const a=t.parent(),o=e.parent();return a===o?s-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:s-o.position():0}))}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","common/utils/sortTags",r)},679:(t,e,s)=>{"use strict";s.d(e,{l:()=>xt});var r=s(892),a=s.n(r),o=s(905),n=s(351),i=s.n(n);class l{constructor(){(0,o.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(i().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),i().store.find("tags",{include:t.join(",")}).then((e=>(t.forEach((t=>this.loadedIncludes.add(t))),e)))}}flarum.reg.add("flarum-tags","common/states/TagListState",l);const c=flarum.reg.get("core","common/extend"),u=flarum.reg.get("core","forum/components/IndexSidebar");var d=s.n(u);const g=flarum.reg.get("core","common/components/Separator");var f=s.n(g);const p=flarum.reg.get("core","common/components/LinkButton");var h=s.n(p),b=s(678),v=s.n(b),T=s(836),y=s.n(T),x=s(974);class w extends(h()){view(t){const e=this.attrs.model,s=e&&e.description(),r=y()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(v(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:s||void 0},(0,x.Z)(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))}static initAttrs(t){super.initAttrs(t);const e=t.model;t.params.tags=e?e.slug():"untagged",t.route=app.route("tag",t.params)}}flarum.reg.add("flarum-tags","forum/components/TagLinkButton",w);const N=flarum.reg.get("core","common/components/Page");var k=s.n(N);const C=flarum.reg.get("core","forum/components/PageStructure");var _=s.n(C);const P=flarum.reg.get("core","forum/components/WelcomeHero");var S=s.n(P),D=s(149),A=s.n(D);const L=flarum.reg.get("core","common/utils/ItemList");var I=s.n(L);const Z=flarum.reg.get("core","common/helpers/humanTime");var M=s.n(Z),j=s(322),E=s.n(j),B=s(596),H=s.n(B),O=s(924),R=s(648);class q extends(k()){constructor(){super(...arguments),(0,o.Z)(this,"tags",void 0),(0,o.Z)(this,"loading",void 0)}oninit(t){super.oninit(t),a().history.push("tags",H()(a().translator.trans("flarum-tags.forum.header.back_to_tags_tooltip"))),this.tags=[];const e=a().preloadedApiDocument();e?this.tags=(0,R.Z)(e.filter((t=>!t.isChild()))):(this.loading=!0,a().tagList.load(["children","lastPostedDiscussion","parent"]).then((()=>{this.tags=(0,R.Z)(a().store.all("tags").filter((t=>!t.isChild()))),this.loading=!1,m.redraw()})))}oncreate(t){super.oncreate(t),a().setTitle(H()(a().translator.trans("flarum-tags.forum.all_tags.meta_title_text"))),a().setTitleCount(0)}view(){return m(_(),{className:"TagsPage",hero:this.hero.bind(this),sidebar:this.sidebar.bind(this)},this.contentItems().toArray())}contentItems(){const t=new(I());if(this.loading)t.add("loading",m(A(),null));else{const e=this.tags.filter((t=>null!==t.position())),s=this.tags.filter((t=>null===t.position()));t.add("tagTiles",this.tagTileListView(e),100),s.length&&t.add("cloud",this.cloudView(s),10)}return t}hero(){return m(S(),null)}sidebar(){return m(d(),null)}tagTileListView(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))}tagTileView(t){const e=t.lastPostedDiscussion(),s=(0,R.Z)(t.children()||[]);return m("li",{className:y()("TagTile",{colored:t.color()},E()(t.color())),style:{"--tag-bg":t.color()}},m(v(),{className:"TagTile-info",href:a().route.tag(t)},m("div",{className:"TagTile-heading"},t.icon()&&(0,x.Z)(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name())),m("p",{className:"TagTile-description"},t.description()),!!s&&m("div",{className:"TagTile-children"},s.map((t=>[m(v(),{href:a().route.tag(t)},t.name())," "])))),e?m(v(),{className:"TagTile-lastPostedDiscussion",href:a().route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),M()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}cloudView(t){return m("div",{className:"TagCloud"},t.map((t=>[(0,O.Z)(t,{link:!0})," "])))}}flarum.reg.add("flarum-tags","forum/components/TagsPage",q);const V=flarum.reg.get("core","forum/components/IndexPage");var F=s.n(V);const $=flarum.reg.get("core","forum/states/DiscussionListState");var K=s.n($);const G=flarum.reg.get("core","forum/states/GlobalSearchState");var U=s.n(G),z=s(433),W=s.n(z);class J extends(W()){view(){const t=this.attrs.model,e=t.color();return m("header",{className:y()("Hero","TagHero",{"TagHero--colored":e,[E()(e)]:e}),style:e?{"--hero-bg":e}:void 0},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},t.icon()&&(0,x.Z)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))}}flarum.reg.add("flarum-tags","forum/components/TagHero",J);const Q=t=>a().store.all("tags").find((e=>0===e.slug().localeCompare(t,void 0,{sensitivity:"base"}))),X=flarum.reg.get("core","forum/components/DiscussionListItem");var Y=s.n(X);const tt=flarum.reg.get("core","forum/components/DiscussionHero");var et=s.n(tt);function st(t,e){void 0===e&&(e={});const s=[],{link:r,...a}=e;return a.className=y()("TagsLabel",a.className),t?(0,R.Z)(t).forEach((e=>{(e||1===t.length)&&s.push((0,O.Z)(e,{link:r}))})):s.push((0,O.Z)()),m("span",a,s)}s(780),flarum.reg.add("flarum-tags","common/helpers/tagsLabel",st);const rt=flarum.reg.get("core","forum/utils/DiscussionControls");var at=s.n(rt),ot=s(645),nt=s.n(ot);flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/TagDiscussionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/TagDiscussionModal.tsx"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/common/components/TagSelectionModal.tsx"),flarum.reg.addChunkModule("642","884","flarum-tags","/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/ToggleButton.js");var it=s(490);const lt=flarum.reg.get("core","common/extenders");var ct=s.n(lt);const ut=flarum.reg.get("core","common/models/Discussion");var mt=s.n(ut);const dt=flarum.reg.get("core","forum/components/EventPost");var gt=s.n(dt);class ft extends(gt()){static initAttrs(t){super.initAttrs(t);const e=t.post.content()[0],s=t.post.content()[1];function r(t,e){return t.filter((t=>-1===e.indexOf(t))).map((t=>app.store.getById("tags",t)))}t.tagsAdded=r(s,e),t.tagsRemoved=r(e,s)}icon(){return"fas fa-tag"}descriptionKey(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"}descriptionData(){const t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t}}flarum.reg.add("flarum-tags","forum/components/DiscussionTaggedPost",ft);const pt=flarum.reg.get("core","common/utils/computed");var ht=s.n(pt);const bt=flarum.reg.get("core","common/Model");var vt=s.n(bt);class Tt extends(vt()){name(){return vt().attribute("name").call(this)}slug(){return vt().attribute("slug").call(this)}description(){return vt().attribute("description").call(this)}color(){return vt().attribute("color").call(this)}backgroundUrl(){return vt().attribute("backgroundUrl").call(this)}backgroundMode(){return vt().attribute("backgroundMode").call(this)}icon(){return vt().attribute("icon").call(this)}position(){return vt().attribute("position").call(this)}parent(){return vt().hasOne("parent").call(this)}children(){return vt().hasMany("children").call(this)}defaultSort(){return vt().attribute("defaultSort").call(this)}isChild(){return vt().attribute("isChild").call(this)}isHidden(){return vt().attribute("isHidden").call(this)}discussionCount(){return vt().attribute("discussionCount").call(this)}lastPostedAt(){return vt().attribute("lastPostedAt",vt().transformDate).call(this)}lastPostedDiscussion(){return vt().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return vt().attribute("isRestricted").call(this)}canStartDiscussion(){return vt().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return vt().attribute("canAddToDiscussion").call(this)}isPrimary(){return ht()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",Tt);class yt{pattern(){return"tag:(.+)"}toFilter(t,e){return{[(e?"-":"")+"tag"]:t[1].split(",")}}filterKey(){return"tag"}fromFilter(t,e){return"".concat(e?"-":"","tag:").concat(t)}}flarum.reg.add("flarum-tags","common/query/discussions/TagGambit",yt);const xt=[(new(ct().Store)).add("tags",Tt),(new(ct().Search)).gambit("discussions",yt),(new(ct().Routes)).add("tags","/tags",q).add("tag","/t/:tags",F()).helper("tag",(t=>a().route("tag",{tags:t.slug()}))),(new(ct().PostTypes)).add("discussionTagged",ft),new(ct().Model)(mt()).hasMany("tags").attribute("canTag")];a().initializers.add("flarum-tags",(function(){a().tagList=new l,(0,c.extend)(d().prototype,"navItems",(function(t){if(t.add("tags",m(h(),{icon:"fas fa-th-large",href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.tags_link")),-10),a().current.matches(q))return;t.add("separator",m(f(),null),-12);const e=a().search.stickyParams(),s=a().store.all("tags"),r=a().currentTag(),o=s=>{let a=r===s;!a&&r&&(a=r.parent()===s),t.add("tag"+s.id(),m(w,{model:s,params:e,active:a},null==s?void 0:s.name()),-14)};(0,R.Z)(s).filter((t=>null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent())))).forEach(o);const n=s.filter((t=>null===t.position())).sort(((t,e)=>e.discussionCount()-t.discussionCount()));n.splice(0,3).forEach(o),n.length&&t.add("moreTags",m(h(),{href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.more_link")),-16)})),a().currentTag=function(t){if(this.currentActiveTag&&!t)return this.currentActiveTag;const e=this.search.params().tags;let s=null;if(e&&(s=Q(e)),e&&!s||s&&!s.isChild()&&!s.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,this.store.find("tags",e,{include:"children,children.parent,parent,state"}).then((()=>{this.currentActiveTag=Q(e),m.redraw()})).finally((()=>{this.currentTagLoading=!1}))}if(s)return this.currentActiveTag=s,this.currentActiveTag;this.currentActiveTag=void 0},(0,c.extend)(F().prototype,"view",(function(t){a().currentTag(!0)})),(0,c.override)(F().prototype,"hero",(function(t){const e=a().currentTag();return e?m(J,{model:e}):t()})),(0,c.extend)(F().prototype,"view",(function(t){const e=a().currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,c.extend)(F().prototype,"setTitle",(function(){const t=a().currentTag();t&&a().setTitle(t.name())})),(0,c.extend)(d().prototype,"items",(function(t){const e=a().currentTag();if(e){const s=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");s&&(o.attrs.className=y()([o.attrs.className,"Button--tagColored",E()(s)]),o.attrs.style={"--color":s}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,c.extend)(U().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,c.extend)(K().prototype,"requestParams",(function(t){var e;"string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags&&(t.filter||(t.filter={}),t.filter.tag=this.params.tags)})),(0,c.extend)(Y().prototype,"infoItems",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e),10)})),(0,c.extend)(et().prototype,"view",(function(t){const e=(0,R.Z)(this.attrs.discussion.tags());if(e&&e.length){const s=e[0].color();s&&(t.attrs.style={"--hero-bg":s},t.attrs.className=y()(t.attrs.className,"DiscussionHero--colored",E()(s)))}})),(0,c.extend)(et().prototype,"items",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e,{link:!0}),5)})),(0,c.extend)(at(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(nt(),{icon:"fas fa-tag",onclick:()=>app.modal.show((()=>s.e(642).then(s.bind(s,884))),{discussion:e})},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))})),(0,c.extend)(d().prototype,"newDiscussionAction",(function(t){const e=a().currentTag();if(e){const s=e.parent(),r=s?[s,e]:[e];t.then((t=>t.fields.tags=r))}else a().composer.fields.tags=[]})),(0,c.extend)("flarum/forum/components/DiscussionComposer","oninit",(function(){a().tagList.load(["parent"]).then((()=>m.redraw())),this.constructor.prototype.chooseTags=function(){(0,it.Z)().length&&a().modal.show((()=>s.e(642).then(s.bind(s,884))),{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:t=>{this.composer.fields.tags=t,this.$("textarea").focus()}})}})),(0,c.extend)("flarum/forum/components/DiscussionComposer","headerItems",(function(t){const e=this.composer.fields.tags||[],s=(0,it.Z)();t.add("tags",m("a",{className:y()(["DiscussionComposer-changeTags",!s.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?st(e):m("span",{className:"TagLabel untagged"},a().translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,c.override)("flarum/forum/components/DiscussionComposer","onsubmit",(function(t){const e=this.composer.fields.tags||[],r=e.filter((t=>null!==t.position()&&!t.isChild())),o=e.filter((t=>null===t.position())),n=(0,it.Z)(),i=parseInt(a().forum.attribute("minPrimaryTags")),l=parseInt(a().forum.attribute("minSecondaryTags")),c=parseInt(a().forum.attribute("maxPrimaryTags")),u=parseInt(a().forum.attribute("maxSecondaryTags"));(!e.length&&0!==c&&0!==u||r.lengths.e(642).then(s.bind(s,884))),{selectedTags:e,onsubmit:e=>{this.composer.fields.tags=e,t()}}):t()})),(0,c.extend)("flarum/forum/components/DiscussionComposer","data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}))},490:(t,e,s)=>{"use strict";function r(t){let e=app.store.all("tags");if(t){const s=t.tags()||[];e=e.filter((t=>t.canAddToDiscussion()||s.includes(t)))}else e=e.filter((t=>t.canStartDiscussion()));return e}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","forum/utils/getSelectableTags",r)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},322:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},892:t=>{"use strict";t.exports=flarum.reg.get("core","forum/app")},232:t=>{"use strict";t.exports=flarum.reg.get("core","forum/components/DiscussionPage")},905:(t,e,s)=>{"use strict";function r(t){return r="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},r(t)}function a(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var a=s.call(t,e);if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}s.d(e,{Z:()=>a})}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return s[t](o,o.exports,a),o.exports}a.m=s,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,s)=>(a.f[s](t,e),e)),[])),a.u=t=>"forum/components/TagDiscussionModal.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",a.l=(s,r,o,n)=>{if(t[s])t[s].push(r);else{var i,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{i.onerror=i.onload=null,clearTimeout(g);var a=t[s];if(delete t[s],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((t=>t(r))),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var s=e.getElementsByTagName("script");s.length&&(t=s[s.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),a.f.compat=(t,e)=>{const s=a.l;a.l=flarum.reg.loadChunk.bind(flarum.reg,s)},(()=>{var t={315:0};a.f.j=(e,s)=>{var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)s.push(r[2]);else{var o=new Promise(((s,a)=>r=t[e]=[s,a]));s.push(r[2]=o);var n=a.p+a.u(e),i=new Error;a.l(n,(s=>{if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",i.name="ChunkLoadError",i.type=o,i.request=n,r[1](i)}}),"chunk-"+e,e)}};var e=(e,s)=>{var r,o,[n,i,l]=s,c=0;if(n.some((e=>0!==t[e]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);l&&l(a)}for(e&&e(s);c{"use strict";a.r(o),a.d(o,{extend:()=>s.l});var t=a(270),e={};for(const s in t)"default"!==s&&(e[s]=()=>t[s]);a.d(o,e);var s=a(679)})(),module.exports=o})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/forum.js.map b/extensions/tags/js/dist/forum.js.map index d287e1856c..5902dfa12c 100644 --- a/extensions/tags/js/dist/forum.js.map +++ b/extensions/tags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"UAAIA,EACAC,E,qECAW,SAASC,EAAQC,EAAKC,EAAOC,QAC5B,IAAVD,IACFA,EAAQ,CAAC,QAEM,IAAbC,IACFA,EAAW,CAAC,GAEd,MAAMC,EAAUH,GAAOA,EAAII,QACrB,SACJC,GAAW,GACTH,EAQJ,OAPAD,EAAMK,UAAY,IAAU,CAACL,EAAMK,UAAW,oBAAqBH,EAAUH,EAAII,OAAS,YACtFJ,GAAOK,GACTJ,EAAMM,MAAQN,EAAMM,OAAS,CAAC,EAC9BN,EAAMM,MAAM,WAAaP,EAAIQ,SACnBR,IACVC,EAAMK,WAAa,aAEdH,EAAUM,EAAE,IAAKR,GAASQ,EAAE,OAAQR,EAC7C,CACAS,OAAOC,IAAIC,IAAI,cAAe,yBAA0Bb,E,mIChBzC,SAASc,EAASb,EAAKC,QACtB,IAAVA,IACFA,EAAQ,CAAC,GAEXA,EAAMM,MAAQN,EAAMM,OAAS,CAAC,EAC9BN,EAAMK,UAAY,aAAeL,EAAMK,WAAa,IACpD,MAAMQ,EAAO,IAAQb,EAAO,QACtBc,EAAUf,EAAMA,EAAIgB,OAASC,IAAIC,WAAWC,MAAM,oCACxD,GAAInB,EAAK,CACP,MAAMQ,EAAQR,EAAIQ,QACdA,I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4D,EAAY,KAAOC,EAAU,IAC1FF,EAAMpQ,KAAO,iBACboQ,EAAMpB,KAAOqB,EACbD,EAAMI,QAAUF,EAChBJ,EAAmB,GAAGE,EACvB,CACD,GAEwC,SAAW3D,EAASA,EAE/D,CACD,EAcF,IAAIgE,EAAuB,CAACC,EAA4BpK,KACvD,IAGIwF,EAAUW,GAHTkE,EAAUC,EAAaC,GAAWvK,EAGhBsH,EAAI,EAC3B,GAAG+C,EAASG,MAAM/K,GAAgC,IAAxBiK,EAAgBjK,KAAa,CACtD,IAAI+F,KAAY8E,EACZ/E,EAAoBS,EAAEsE,EAAa9E,KACrCD,EAAoBpM,EAAEqM,GAAY8E,EAAY9E,IAG7C+E,GAAsBA,EAAQhF,EAClC,CAEA,IADG6E,GAA4BA,EAA2BpK,GACrDsH,EAAI+C,EAASzO,OAAQ0L,IACzBnB,EAAUkE,EAAS/C,GAChB/B,EAAoBS,EAAE0D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,CAC5B,EAIGsE,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBtO,QAAQgO,EAAqB5M,KAAK,KAAM,IAC3DkN,EAAmB3L,KAAOqL,EAAqB5M,KAAK,KAAMkN,EAAmB3L,KAAKvB,KAAKkN,G","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Separator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/WelcomeHero')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/tags/./src/forum/components/TagsPage.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionHero')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/forum/extend.ts","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n includes.forEach(include => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Separator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const description = tag && tag.description();\n const className = classList('TagLinkButton hasIcon', {\n child: tag.isChild()\n }, this.attrs.className);\n return m(Link, {\n className: className,\n href: this.attrs.route,\n style: tag ? {\n '--color': tag.color()\n } : undefined,\n title: description || undefined\n }, tagIcon(tag, {\n className: 'Button-icon'\n }), m(\"span\", {\n className: \"Button-label\"\n }, tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')));\n }\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const tag = attrs.model;\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagLinkButton', TagLinkButton);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Page');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PageStructure');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/WelcomeHero');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport PageStructure from 'flarum/forum/components/PageStructure';\nimport WelcomeHero from 'flarum/forum/components/WelcomeHero';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\nexport default class TagsPage extends Page {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", void 0);\n _defineProperty(this, \"loading\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.history.push('tags', extractText(app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip')));\n this.tags = [];\n const preloaded = app.preloadedApiDocument();\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n this.loading = true;\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n this.loading = false;\n m.redraw();\n });\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n app.setTitle(extractText(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text')));\n app.setTitleCount(0);\n }\n view() {\n return m(PageStructure, {\n className: \"TagsPage\",\n hero: this.hero.bind(this),\n sidebar: this.sidebar.bind(this)\n }, this.contentItems().toArray());\n }\n contentItems() {\n const items = new ItemList();\n if (this.loading) {\n items.add('loading', m(LoadingIndicator, null));\n } else {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n items.add('tagTiles', this.tagTileListView(pinned), 100);\n if (cloud.length) {\n items.add('cloud', this.cloudView(cloud), 10);\n }\n }\n return items;\n }\n hero() {\n return m(WelcomeHero, null);\n }\n sidebar() {\n return m(IndexSidebar, null);\n }\n tagTileListView(pinned) {\n return m(\"ul\", {\n className: \"TagTiles\"\n }, pinned.map(this.tagTileView.bind(this)));\n }\n tagTileView(tag) {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n return m(\"li\", {\n className: classList('TagTile', {\n colored: tag.color()\n }, textContrastClass(tag.color())),\n style: {\n '--tag-bg': tag.color()\n }\n }, m(Link, {\n className: \"TagTile-info\",\n href: app.route.tag(tag)\n }, m(\"div\", {\n className: \"TagTile-heading\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), m(\"h3\", {\n className: \"TagTile-name\"\n }, tag.name())), m(\"p\", {\n className: \"TagTile-description\"\n }, tag.description()), !!children && m(\"div\", {\n className: \"TagTile-children\"\n }, children.map(child => [m(Link, {\n href: app.route.tag(child)\n }, child.name()), ' ']))), lastPostedDiscussion ? m(Link, {\n className: \"TagTile-lastPostedDiscussion\",\n href: app.route.discussion(lastPostedDiscussion, lastPostedDiscussion.lastPostNumber())\n }, m(\"span\", {\n className: \"TagTile-lastPostedDiscussion-title\"\n }, lastPostedDiscussion.title()), humanTime(lastPostedDiscussion.lastPostedAt())) : m(\"span\", {\n className: \"TagTile-lastPostedDiscussion\"\n }));\n }\n cloudView(cloud) {\n return m(\"div\", {\n className: \"TagCloud\"\n }, cloud.map(tag => [tagLabel(tag, {\n link: true\n }), ' ']));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagsPage', TagsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","import Component from 'flarum/common/Component';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport classList from 'flarum/common/utils/classList';\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n return m(\"header\", {\n className: classList('Hero', 'TagHero', {\n 'TagHero--colored': color,\n [textContrastClass(color)]: color\n }),\n style: color ? {\n '--hero-bg': color\n } : undefined\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"containerNarrow\"\n }, m(\"h1\", {\n className: \"Hero-title\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), \" \", tag.name()), m(\"div\", {\n className: \"Hero-subtitle\"\n }, tag.description()))));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagHero', TagHero);","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport TagHero from './components/TagHero';\nconst findTag = slug => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, {\n sensitivity: 'base'\n}) === 0);\nexport default function addTagFilter() {\n app.currentTag = function (reload) {\n if (this.currentActiveTag && !reload) {\n return this.currentActiveTag;\n }\n const slug = this.search.params().tags;\n let tag = null;\n if (slug) {\n tag = findTag(slug);\n }\n if (slug && !tag || tag && !tag.isChild() && !tag.children()) {\n if (this.currentTagLoading) {\n return;\n }\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n this.store.find('tags', slug, {\n include: 'children,children.parent,parent,state'\n }).then(() => {\n this.currentActiveTag = findTag(slug);\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n this.currentActiveTag = undefined;\n return;\n };\n extend(IndexPage.prototype, 'view', function (vdom) {\n app.currentTag(true);\n });\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function (original) {\n const tag = app.currentTag();\n if (tag) return m(TagHero, {\n model: tag\n });\n return original();\n });\n extend(IndexPage.prototype, 'view', function (vdom) {\n const tag = app.currentTag();\n if (tag) vdom.attrs.className += ' IndexPage--tag' + tag.id();\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n const tag = app.currentTag();\n if (tag) {\n app.setTitle(tag.name());\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color, and disable if the user isn't allowed to edit.\n extend(IndexSidebar.prototype, 'items', function (items) {\n const tag = app.currentTag();\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion');\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored', textContrastClass(color)]);\n newDiscussion.attrs.style = {\n '--color': color\n };\n }\n newDiscussion.attrs.disabled = !canStartDiscussion;\n newDiscussion.children = app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button');\n }\n });\n\n // Add a parameter for the global search state to pass on to the\n // DiscussionListState that will let us filter discussions by tag.\n extend(GlobalSearchState.prototype, 'params', function (params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n var _params$include;\n (_params$include = params.include) == null ? void 0 : _params$include.push('tags', 'tags.parent');\n }\n if (this.params.tags) {\n var _params$filter;\n const filter = (_params$filter = params.filter) != null ? _params$filter : {};\n filter.tag = this.params.tags;\n // TODO: replace this with a more robust system.\n const q = filter.q;\n if (q) {\n filter.q = \"\".concat(q, \" tag:\").concat(this.params.tags);\n }\n params.filter = filter;\n }\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionHero');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\nexport default function addTagControl() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', m(Button, {\n icon: \"fas fa-tag\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n discussion\n })\n }, app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button')));\n }\n });\n}flarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/TagDiscussionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/TagDiscussionModal.tsx');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/common/components/TagSelectionModal.tsx');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/ToggleButton.js');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n function diffTags(tags1, tags2) {\n return tags1.filter(tag => tags2.indexOf(tag) === -1).map(id => app.store.getById('tags', id));\n }\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n icon() {\n return 'fas fa-tag';\n }\n descriptionKey() {\n if (this.attrs.tagsAdded.length) {\n if (this.attrs.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n descriptionData() {\n const data = {};\n if (this.attrs.tagsAdded.length) {\n data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsAdded, {\n link: true\n }),\n count: this.attrs.tagsAdded.length\n });\n }\n if (this.attrs.tagsRemoved.length) {\n data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsRemoved, {\n link: true\n }),\n count: this.attrs.tagsRemoved.length\n });\n }\n return data;\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/DiscussionTaggedPost', DiscussionTaggedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nexport default [new Extend.Store() //\n.add('tags', Tag)];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagsPage from './components/TagsPage';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('tags', '/tags', TagsPage) //\n.add('tag', '/t/:tags', IndexPage) //\n.helper('tag', tag => app.route('tag', {\n tags: tag.slug()\n})), new Extend.PostTypes() //\n.add('discussionTagged', DiscussionTaggedPost), new Extend.Model(Discussion) //\n.hasMany('tags') //\n.attribute('canTag')];","import app from 'flarum/forum/app';\nimport TagListState from '../common/states/TagListState';\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-tags', function () {\n app.tagList = new TagListState();\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagList() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n items.add('tags', m(LinkButton, {\n icon: \"fas fa-th-large\",\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.tags_link')), -10);\n if (app.current.matches(TagsPage)) return;\n items.add('separator', m(Separator, null), -12);\n const params = app.search.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = app.currentTag();\n const addTag = tag => {\n let active = currentTag === tag;\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n // tag.name() is passed here as children even though it isn't used directly\n // because when we need to get the active child in SelectDropdown, we need to\n // use its children to populate the dropdown. The problem here is that `view`\n // on TagLinkButton is only called AFTER SelectDropdown, so no children are available\n // for SelectDropdown to use at the time.\n items.add('tag' + tag.id(), m(TagLinkButton, {\n model: tag,\n params: params,\n active: active\n }, tag == null ? void 0 : tag.name()), -14);\n };\n sortTags(tags).filter(tag => tag.position() !== null && (!tag.isChild() || currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))).forEach(addTag);\n const more = tags.filter(tag => tag.position() === null).sort((a, b) => b.discussionCount() - a.discussionCount());\n more.splice(0, 3).forEach(addTag);\n if (more.length) {\n items.add('moreTags', m(LinkButton, {\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.more_link')), -16);\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagLabels() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const tags = this.attrs.discussion.tags();\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function (view) {\n const tags = sortTags(this.attrs.discussion.tags());\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {\n '--hero-bg': color\n };\n view.attrs.className = classList(view.attrs.className, 'DiscussionHero--colored', textContrastClass(color));\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function (items) {\n const tags = this.attrs.discussion.tags();\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {\n link: true\n }), 5);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\nexport default function addTagComposer() {\n extend(IndexSidebar.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = app.currentTag();\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(composer => composer.fields.tags = tags);\n } else {\n app.composer.fields.tags = [];\n }\n });\n extend('flarum/forum/components/DiscussionComposer', 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw());\n\n // Add tag-selection abilities to the discussion composer.\n this.constructor.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n if (!selectableTags.length) return;\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n selectedTags: (this.composer.fields.tags || []).slice(0),\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n this.$('textarea').focus();\n }\n });\n };\n });\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend('flarum/forum/components/DiscussionComposer', 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n items.add('tags', m(\"a\", {\n className: classList(['DiscussionComposer-changeTags', !selectableTags.length && 'disabled']),\n onclick: this.chooseTags.bind(this)\n }, tags.length ? tagsLabel(tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link'))), 10);\n });\n override('flarum/forum/components/DiscussionComposer', 'onsubmit', function (original) {\n const chosenTags = this.composer.fields.tags || [];\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n const selectableTags = getSelectableTags();\n const minPrimaryTags = parseInt(app.forum.attribute('minPrimaryTags'));\n const minSecondaryTags = parseInt(app.forum.attribute('minSecondaryTags'));\n const maxPrimaryTags = parseInt(app.forum.attribute('maxPrimaryTags'));\n const maxSecondaryTags = parseInt(app.forum.attribute('maxSecondaryTags'));\n if ((!chosenTags.length && maxPrimaryTags !== 0 && maxSecondaryTags !== 0 || chosenPrimaryTags.length < minPrimaryTags || chosenSecondaryTags.length < minSecondaryTags) && selectableTags.length) {\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n original();\n }\n });\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend('flarum/forum/components/DiscussionComposer', 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n if (discussion) {\n const discussionTags = discussion.tags() || [];\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussionTags.includes(tag));\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n return tags;\n}\nflarum.reg.add('flarum-tags', 'forum/utils/getSelectableTags', getSelectableTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/DiscussionPage');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/components/TagDiscussionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","style","color","m","flarum","reg","add","tagLabel","link","tagText","name","app","translator","trans","title","description","href","route","tags","slug","isChild","sortTags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","TagListState","constructor","this","async","includes","loadedIncludes","query","unloadedIncludes","filter","include","has","length","Promise","resolve","Set","join","then","val","forEach","get","TagLinkButton","view","vnode","model","child","undefined","static","super","initAttrs","params","TagsPage","arguments","oninit","preloaded","loading","redraw","oncreate","hero","bind","sidebar","contentItems","toArray","items","pinned","cloud","tagTileListView","cloudView","map","tagTileView","lastPostedDiscussion","children","colored","lastPostNumber","lastPostedAt","TagHero","findTag","find","localeCompare","sensitivity","tagsLabel","otherAttrs","push","addChunkModule","DiscussionTaggedPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","store","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","Tag","call","backgroundUrl","backgroundMode","defaultSort","isHidden","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","helper","hasMany","attribute","extend","currentTag","addTag","active","more","splice","reload","currentActiveTag","search","currentTagLoading","finally","vdom","override","original","newDiscussion","disabled","param","_params$include","_params$filter","q","concat","discussion","canTag","onclick","modal","show","promise","composer","fields","prototype","chooseTags","getSelectableTags","selectedTags","onsubmit","$","focus","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","minPrimaryTags","parseInt","minSecondaryTags","maxPrimaryTags","maxSecondaryTags","relationships","all","discussionTags","module","exports","_typeof","obj","Symbol","iterator","_defineProperty","key","value","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","Object","defineProperty","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","o","f","e","chunkId","keys","reduce","promises","u","g","globalThis","Function","window","prop","hasOwnProperty","l","url","done","script","needAttach","scripts","document","getElementsByTagName","i","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","fn","setTimeout","type","target","head","appendChild","r","toStringTag","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"UAAIA,EACAC,E,qECAW,SAASC,EAAQC,EAAKC,EAAOC,QAC5B,IAAVD,IACFA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sE,EAAa9E,KACrCD,EAAoB3M,EAAE4M,GAAY8E,EAAY9E,IAG7C+E,GAAsBA,EAAQhF,EAClC,CAEA,IADG6E,GAA4BA,EAA2B3K,GACrD6H,EAAI+C,EAAShP,OAAQiM,IACzBnB,EAAUkE,EAAS/C,GAChB/B,EAAoBS,EAAE0D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,CAC5B,EAIGsE,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmB7O,QAAQuO,EAAqBnN,KAAK,KAAM,IAC3DyN,EAAmBlM,KAAO4L,EAAqBnN,KAAK,KAAMyN,EAAmBlM,KAAKvB,KAAKyN,G","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Separator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/WelcomeHero')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/tags/./src/forum/components/TagsPage.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionHero')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/query/discussions/TagGambit.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/forum/extend.ts","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n includes.forEach(include => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Separator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const description = tag && tag.description();\n const className = classList('TagLinkButton hasIcon', {\n child: tag.isChild()\n }, this.attrs.className);\n return m(Link, {\n className: className,\n href: this.attrs.route,\n style: tag ? {\n '--color': tag.color()\n } : undefined,\n title: description || undefined\n }, tagIcon(tag, {\n className: 'Button-icon'\n }), m(\"span\", {\n className: \"Button-label\"\n }, tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')));\n }\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const tag = attrs.model;\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagLinkButton', TagLinkButton);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Page');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PageStructure');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/WelcomeHero');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport PageStructure from 'flarum/forum/components/PageStructure';\nimport WelcomeHero from 'flarum/forum/components/WelcomeHero';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\nexport default class TagsPage extends Page {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", void 0);\n _defineProperty(this, \"loading\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.history.push('tags', extractText(app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip')));\n this.tags = [];\n const preloaded = app.preloadedApiDocument();\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n this.loading = true;\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n this.loading = false;\n m.redraw();\n });\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n app.setTitle(extractText(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text')));\n app.setTitleCount(0);\n }\n view() {\n return m(PageStructure, {\n className: \"TagsPage\",\n hero: this.hero.bind(this),\n sidebar: this.sidebar.bind(this)\n }, this.contentItems().toArray());\n }\n contentItems() {\n const items = new ItemList();\n if (this.loading) {\n items.add('loading', m(LoadingIndicator, null));\n } else {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n items.add('tagTiles', this.tagTileListView(pinned), 100);\n if (cloud.length) {\n items.add('cloud', this.cloudView(cloud), 10);\n }\n }\n return items;\n }\n hero() {\n return m(WelcomeHero, null);\n }\n sidebar() {\n return m(IndexSidebar, null);\n }\n tagTileListView(pinned) {\n return m(\"ul\", {\n className: \"TagTiles\"\n }, pinned.map(this.tagTileView.bind(this)));\n }\n tagTileView(tag) {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n return m(\"li\", {\n className: classList('TagTile', {\n colored: tag.color()\n }, textContrastClass(tag.color())),\n style: {\n '--tag-bg': tag.color()\n }\n }, m(Link, {\n className: \"TagTile-info\",\n href: app.route.tag(tag)\n }, m(\"div\", {\n className: \"TagTile-heading\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), m(\"h3\", {\n className: \"TagTile-name\"\n }, tag.name())), m(\"p\", {\n className: \"TagTile-description\"\n }, tag.description()), !!children && m(\"div\", {\n className: \"TagTile-children\"\n }, children.map(child => [m(Link, {\n href: app.route.tag(child)\n }, child.name()), ' ']))), lastPostedDiscussion ? m(Link, {\n className: \"TagTile-lastPostedDiscussion\",\n href: app.route.discussion(lastPostedDiscussion, lastPostedDiscussion.lastPostNumber())\n }, m(\"span\", {\n className: \"TagTile-lastPostedDiscussion-title\"\n }, lastPostedDiscussion.title()), humanTime(lastPostedDiscussion.lastPostedAt())) : m(\"span\", {\n className: \"TagTile-lastPostedDiscussion\"\n }));\n }\n cloudView(cloud) {\n return m(\"div\", {\n className: \"TagCloud\"\n }, cloud.map(tag => [tagLabel(tag, {\n link: true\n }), ' ']));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagsPage', TagsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","import Component from 'flarum/common/Component';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport classList from 'flarum/common/utils/classList';\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n return m(\"header\", {\n className: classList('Hero', 'TagHero', {\n 'TagHero--colored': color,\n [textContrastClass(color)]: color\n }),\n style: color ? {\n '--hero-bg': color\n } : undefined\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"containerNarrow\"\n }, m(\"h1\", {\n className: \"Hero-title\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), \" \", tag.name()), m(\"div\", {\n className: \"Hero-subtitle\"\n }, tag.description()))));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagHero', TagHero);","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport TagHero from './components/TagHero';\nconst findTag = slug => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, {\n sensitivity: 'base'\n}) === 0);\nexport default function addTagFilter() {\n app.currentTag = function (reload) {\n if (this.currentActiveTag && !reload) {\n return this.currentActiveTag;\n }\n const slug = this.search.params().tags;\n let tag = null;\n if (slug) {\n tag = findTag(slug);\n }\n if (slug && !tag || tag && !tag.isChild() && !tag.children()) {\n if (this.currentTagLoading) {\n return;\n }\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n this.store.find('tags', slug, {\n include: 'children,children.parent,parent,state'\n }).then(() => {\n this.currentActiveTag = findTag(slug);\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n this.currentActiveTag = undefined;\n return;\n };\n extend(IndexPage.prototype, 'view', function (vdom) {\n app.currentTag(true);\n });\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function (original) {\n const tag = app.currentTag();\n if (tag) return m(TagHero, {\n model: tag\n });\n return original();\n });\n extend(IndexPage.prototype, 'view', function (vdom) {\n const tag = app.currentTag();\n if (tag) vdom.attrs.className += ' IndexPage--tag' + tag.id();\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n const tag = app.currentTag();\n if (tag) {\n app.setTitle(tag.name());\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color, and disable if the user isn't allowed to edit.\n extend(IndexSidebar.prototype, 'items', function (items) {\n const tag = app.currentTag();\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion');\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored', textContrastClass(color)]);\n newDiscussion.attrs.style = {\n '--color': color\n };\n }\n newDiscussion.attrs.disabled = !canStartDiscussion;\n newDiscussion.children = app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button');\n }\n });\n\n // Add a parameter for the global search state to pass on to the\n // DiscussionListState that will let us filter discussions by tag.\n extend(GlobalSearchState.prototype, 'params', function (params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n var _params$include;\n (_params$include = params.include) == null ? void 0 : _params$include.push('tags', 'tags.parent');\n }\n if (this.params.tags) {\n params.filter || (params.filter = {});\n params.filter.tag = this.params.tags;\n }\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionHero');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\nexport default function addTagControl() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', m(Button, {\n icon: \"fas fa-tag\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n discussion\n })\n }, app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button')));\n }\n });\n}flarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/TagDiscussionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/TagDiscussionModal.tsx');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/common/components/TagSelectionModal.tsx');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', '/home/runner/work/framework/framework/extensions/tags/js/src/forum/components/ToggleButton.js');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n function diffTags(tags1, tags2) {\n return tags1.filter(tag => tags2.indexOf(tag) === -1).map(id => app.store.getById('tags', id));\n }\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n icon() {\n return 'fas fa-tag';\n }\n descriptionKey() {\n if (this.attrs.tagsAdded.length) {\n if (this.attrs.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n descriptionData() {\n const data = {};\n if (this.attrs.tagsAdded.length) {\n data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsAdded, {\n link: true\n }),\n count: this.attrs.tagsAdded.length\n });\n }\n if (this.attrs.tagsRemoved.length) {\n data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsRemoved, {\n link: true\n }),\n count: this.attrs.tagsRemoved.length\n });\n }\n return data;\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/DiscussionTaggedPost', DiscussionTaggedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","export default class TagGambit {\n pattern() {\n return 'tag:(.+)';\n }\n toFilter(matches, negate) {\n const key = (negate ? '-' : '') + 'tag';\n return {\n [key]: matches[1].split(',')\n };\n }\n filterKey() {\n return 'tag';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"tag:\").concat(value);\n }\n}\nflarum.reg.add('flarum-tags', 'common/query/discussions/TagGambit', TagGambit);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nimport TagGambit from './query/discussions/TagGambit';\nexport default [new Extend.Store() //\n.add('tags', Tag), new Extend.Search() //\n.gambit('discussions', TagGambit)];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagsPage from './components/TagsPage';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('tags', '/tags', TagsPage) //\n.add('tag', '/t/:tags', IndexPage) //\n.helper('tag', tag => app.route('tag', {\n tags: tag.slug()\n})), new Extend.PostTypes() //\n.add('discussionTagged', DiscussionTaggedPost), new Extend.Model(Discussion) //\n.hasMany('tags') //\n.attribute('canTag')];","import app from 'flarum/forum/app';\nimport TagListState from '../common/states/TagListState';\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-tags', function () {\n app.tagList = new TagListState();\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagList() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n items.add('tags', m(LinkButton, {\n icon: \"fas fa-th-large\",\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.tags_link')), -10);\n if (app.current.matches(TagsPage)) return;\n items.add('separator', m(Separator, null), -12);\n const params = app.search.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = app.currentTag();\n const addTag = tag => {\n let active = currentTag === tag;\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n // tag.name() is passed here as children even though it isn't used directly\n // because when we need to get the active child in SelectDropdown, we need to\n // use its children to populate the dropdown. The problem here is that `view`\n // on TagLinkButton is only called AFTER SelectDropdown, so no children are available\n // for SelectDropdown to use at the time.\n items.add('tag' + tag.id(), m(TagLinkButton, {\n model: tag,\n params: params,\n active: active\n }, tag == null ? void 0 : tag.name()), -14);\n };\n sortTags(tags).filter(tag => tag.position() !== null && (!tag.isChild() || currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))).forEach(addTag);\n const more = tags.filter(tag => tag.position() === null).sort((a, b) => b.discussionCount() - a.discussionCount());\n more.splice(0, 3).forEach(addTag);\n if (more.length) {\n items.add('moreTags', m(LinkButton, {\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.more_link')), -16);\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagLabels() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const tags = this.attrs.discussion.tags();\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function (view) {\n const tags = sortTags(this.attrs.discussion.tags());\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {\n '--hero-bg': color\n };\n view.attrs.className = classList(view.attrs.className, 'DiscussionHero--colored', textContrastClass(color));\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function (items) {\n const tags = this.attrs.discussion.tags();\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {\n link: true\n }), 5);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\nexport default function addTagComposer() {\n extend(IndexSidebar.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = app.currentTag();\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(composer => composer.fields.tags = tags);\n } else {\n app.composer.fields.tags = [];\n }\n });\n extend('flarum/forum/components/DiscussionComposer', 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw());\n\n // Add tag-selection abilities to the discussion composer.\n this.constructor.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n if (!selectableTags.length) return;\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n selectedTags: (this.composer.fields.tags || []).slice(0),\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n this.$('textarea').focus();\n }\n });\n };\n });\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend('flarum/forum/components/DiscussionComposer', 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n items.add('tags', m(\"a\", {\n className: classList(['DiscussionComposer-changeTags', !selectableTags.length && 'disabled']),\n onclick: this.chooseTags.bind(this)\n }, tags.length ? tagsLabel(tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link'))), 10);\n });\n override('flarum/forum/components/DiscussionComposer', 'onsubmit', function (original) {\n const chosenTags = this.composer.fields.tags || [];\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n const selectableTags = getSelectableTags();\n const minPrimaryTags = parseInt(app.forum.attribute('minPrimaryTags'));\n const minSecondaryTags = parseInt(app.forum.attribute('minSecondaryTags'));\n const maxPrimaryTags = parseInt(app.forum.attribute('maxPrimaryTags'));\n const maxSecondaryTags = parseInt(app.forum.attribute('maxSecondaryTags'));\n if ((!chosenTags.length && maxPrimaryTags !== 0 && maxSecondaryTags !== 0 || chosenPrimaryTags.length < minPrimaryTags || chosenSecondaryTags.length < minSecondaryTags) && selectableTags.length) {\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n original();\n }\n });\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend('flarum/forum/components/DiscussionComposer', 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n if (discussion) {\n const discussionTags = discussion.tags() || [];\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussionTags.includes(tag));\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n return tags;\n}\nflarum.reg.add('flarum-tags', 'forum/utils/getSelectableTags', getSelectableTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/DiscussionPage');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/components/TagDiscussionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","style","color","m","flarum","reg","add","tagLabel","link","tagText","name","app","translator","trans","title","description","href","route","tags","slug","isChild","sortTags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","TagListState","constructor","this","async","includes","loadedIncludes","query","unloadedIncludes","filter","include","has","length","Promise","resolve","Set","join","then","val","forEach","get","TagLinkButton","view","vnode","model","child","undefined","static","super","initAttrs","params","TagsPage","arguments","oninit","preloaded","loading","redraw","oncreate","hero","bind","sidebar","contentItems","toArray","items","pinned","cloud","tagTileListView","cloudView","map","tagTileView","lastPostedDiscussion","children","colored","lastPostNumber","lastPostedAt","TagHero","findTag","find","localeCompare","sensitivity","tagsLabel","otherAttrs","push","addChunkModule","DiscussionTaggedPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","store","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","Tag","call","backgroundUrl","backgroundMode","defaultSort","isHidden","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","TagGambit","pattern","toFilter","matches","negate","split","filterKey","fromFilter","value","concat","gambit","helper","hasMany","attribute","extend","currentTag","addTag","active","more","splice","reload","currentActiveTag","search","currentTagLoading","finally","vdom","override","original","newDiscussion","disabled","param","_params$include","discussion","canTag","onclick","modal","show","promise","composer","fields","prototype","chooseTags","getSelectableTags","selectedTags","onsubmit","$","focus","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","minPrimaryTags","parseInt","minSecondaryTags","maxPrimaryTags","maxSecondaryTags","relationships","all","discussionTags","module","exports","_typeof","obj","Symbol","iterator","_defineProperty","key","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","Object","defineProperty","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","o","f","e","chunkId","keys","reduce","promises","u","g","globalThis","Function","window","prop","hasOwnProperty","l","url","done","script","needAttach","scripts","document","getElementsByTagName","i","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","fn","setTimeout","type","target","head","appendChild","r","toStringTag","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file diff --git a/framework/core/js/dist-typings/admin/AdminApplication.d.ts b/framework/core/js/dist-typings/admin/AdminApplication.d.ts index 07bbc6a2f4..0d8f0eb856 100644 --- a/framework/core/js/dist-typings/admin/AdminApplication.d.ts +++ b/framework/core/js/dist-typings/admin/AdminApplication.d.ts @@ -36,7 +36,9 @@ export interface AdminApplicationData extends ApplicationData { }>; displayNameDrivers: string[]; slugDrivers: Record; + searchDrivers: Record; permissions: Record; + advancedPageEmpty: boolean; } export default class AdminApplication extends Application { extensionData: ExtensionData; diff --git a/framework/core/js/dist-typings/admin/components/AdminPage.d.ts b/framework/core/js/dist-typings/admin/components/AdminPage.d.ts index 4c63a3689b..79606a53ec 100644 --- a/framework/core/js/dist-typings/admin/components/AdminPage.d.ts +++ b/framework/core/js/dist-typings/admin/components/AdminPage.d.ts @@ -206,5 +206,6 @@ export default abstract class AdminPage; + modelLocale(): Record; } export {}; diff --git a/framework/core/js/dist-typings/admin/components/AdvancedPage.d.ts b/framework/core/js/dist-typings/admin/components/AdvancedPage.d.ts new file mode 100644 index 0000000000..1b3ccd6d55 --- /dev/null +++ b/framework/core/js/dist-typings/admin/components/AdvancedPage.d.ts @@ -0,0 +1,16 @@ +/// +import AdminPage from './AdminPage'; +import type { IPageAttrs } from '../../common/components/Page'; +import type Mithril from 'mithril'; +export default class AdvancedPage extends AdminPage { + searchDriverOptions: Record>; + oninit(vnode: Mithril.Vnode): void; + headerInfo(): { + className: string; + icon: string; + title: import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + description: import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + }; + content(): JSX.Element[]; + driverLocale(): Record>; +} diff --git a/framework/core/js/dist-typings/admin/components/BasicsPage.d.ts b/framework/core/js/dist-typings/admin/components/BasicsPage.d.ts index cc28dc71ee..8f412acce2 100644 --- a/framework/core/js/dist-typings/admin/components/BasicsPage.d.ts +++ b/framework/core/js/dist-typings/admin/components/BasicsPage.d.ts @@ -7,6 +7,10 @@ export declare type HomePageItem = { path: string; label: Mithril.Children; }; +export declare type DriverLocale = { + display_name: Record; + slug: Record>; +}; export default class BasicsPage extends AdminPage { localeOptions: Record; displayNameOptions: Record; @@ -24,4 +28,5 @@ export default class BasicsPage ext * object with `path` and `label` properties. */ homePageItems(): ItemList; + driverLocale(): DriverLocale; } diff --git a/framework/core/js/dist-typings/admin/components/FormSectionGroup.d.ts b/framework/core/js/dist-typings/admin/components/FormSectionGroup.d.ts new file mode 100644 index 0000000000..68a0fb7ff4 --- /dev/null +++ b/framework/core/js/dist-typings/admin/components/FormSectionGroup.d.ts @@ -0,0 +1,14 @@ +import Component from '../../common/Component'; +import type { ComponentAttrs } from '../../common/Component'; +import Mithril from 'mithril'; +export interface IFormSectionGroupAttrs extends ComponentAttrs { +} +export default class FormSectionGroup extends Component { + view(vnode: Mithril.Vnode): JSX.Element; +} +export interface IFormSectionAttrs extends ComponentAttrs { + label: any; +} +export declare class FormSection extends Component { + view(vnode: Mithril.Vnode): JSX.Element; +} diff --git a/framework/core/js/dist-typings/common/GambitManager.d.ts b/framework/core/js/dist-typings/common/GambitManager.d.ts new file mode 100644 index 0000000000..d658808753 --- /dev/null +++ b/framework/core/js/dist-typings/common/GambitManager.d.ts @@ -0,0 +1,12 @@ +import IGambit from './query/IGambit'; +/** + * The gambit registry. A map of resource types to gambit classes that + * should be used to filter resources of that type. Gambits are automatically + * converted to API filters when requesting resources. Gambits must be applied + * on a filter object that has a `q` property containing the search query. + */ +export default class GambitManager { + gambits: Record IGambit>>; + apply(type: string, filter: Record): Record; + from(type: string, q: string, filter: Record): string; +} diff --git a/framework/core/js/dist-typings/common/Store.d.ts b/framework/core/js/dist-typings/common/Store.d.ts index c036ef2e94..57016ee64f 100644 --- a/framework/core/js/dist-typings/common/Store.d.ts +++ b/framework/core/js/dist-typings/common/Store.d.ts @@ -1,5 +1,6 @@ import { FlarumRequestOptions } from './Application'; import Model, { ModelData, SavedModelData } from './Model'; +import GambitManager from './GambitManager'; export interface MetaInformation { [key: string]: any; } @@ -14,7 +15,7 @@ export interface ApiQueryParamsPlural { include?: string; filter?: { q: string; - } | Record; + } | Record; page?: { near?: number; offset?: number; @@ -76,6 +77,11 @@ export default class Store { models: Record; + /** + * The gambit manager that will convert search query gambits + * into API filters. + */ + gambits: GambitManager; constructor(models: Record); diff --git a/framework/core/js/dist-typings/common/extenders/Search.d.ts b/framework/core/js/dist-typings/common/extenders/Search.d.ts new file mode 100644 index 0000000000..9c6e053278 --- /dev/null +++ b/framework/core/js/dist-typings/common/extenders/Search.d.ts @@ -0,0 +1,9 @@ +import type IExtender from './IExtender'; +import type { IExtensionModule } from './IExtender'; +import type Application from '../Application'; +import IGambit from '../query/IGambit'; +export default class Search implements IExtender { + protected gambits: Record IGambit>>; + gambit(modelType: string, gambit: new () => IGambit): this; + extend(app: Application, extension: IExtensionModule): void; +} diff --git a/framework/core/js/dist-typings/common/extenders/index.d.ts b/framework/core/js/dist-typings/common/extenders/index.d.ts index 530f080b15..dbf4215796 100644 --- a/framework/core/js/dist-typings/common/extenders/index.d.ts +++ b/framework/core/js/dist-typings/common/extenders/index.d.ts @@ -2,10 +2,12 @@ import Model from './Model'; import PostTypes from './PostTypes'; import Routes from './Routes'; import Store from './Store'; +import Search from './Search'; declare const extenders: { Model: typeof Model; PostTypes: typeof PostTypes; Routes: typeof Routes; Store: typeof Store; + Search: typeof Search; }; export default extenders; diff --git a/framework/core/js/dist-typings/common/query/IGambit.d.ts b/framework/core/js/dist-typings/common/query/IGambit.d.ts new file mode 100644 index 0000000000..2be8b5d68c --- /dev/null +++ b/framework/core/js/dist-typings/common/query/IGambit.d.ts @@ -0,0 +1,6 @@ +export default interface IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/discussions/AuthorGambit.d.ts b/framework/core/js/dist-typings/common/query/discussions/AuthorGambit.d.ts new file mode 100644 index 0000000000..67923c3712 --- /dev/null +++ b/framework/core/js/dist-typings/common/query/discussions/AuthorGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class AuthorGambit implements IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/discussions/CreatedGambit.d.ts b/framework/core/js/dist-typings/common/query/discussions/CreatedGambit.d.ts new file mode 100644 index 0000000000..35d142eb28 --- /dev/null +++ b/framework/core/js/dist-typings/common/query/discussions/CreatedGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class CreatedGambit implements IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/discussions/HiddenGambit.d.ts b/framework/core/js/dist-typings/common/query/discussions/HiddenGambit.d.ts new file mode 100644 index 0000000000..d8e2e0113a --- /dev/null +++ b/framework/core/js/dist-typings/common/query/discussions/HiddenGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class HiddenGambit implements IGambit { + pattern(): string; + toFilter(_matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/discussions/UnreadGambit.d.ts b/framework/core/js/dist-typings/common/query/discussions/UnreadGambit.d.ts new file mode 100644 index 0000000000..81c5a34622 --- /dev/null +++ b/framework/core/js/dist-typings/common/query/discussions/UnreadGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class UnreadGambit implements IGambit { + pattern(): string; + toFilter(_matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/users/EmailGambit.d.ts b/framework/core/js/dist-typings/common/query/users/EmailGambit.d.ts new file mode 100644 index 0000000000..67c5f6faa0 --- /dev/null +++ b/framework/core/js/dist-typings/common/query/users/EmailGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class EmailGambit implements IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/common/query/users/GroupGambit.d.ts b/framework/core/js/dist-typings/common/query/users/GroupGambit.d.ts new file mode 100644 index 0000000000..0ceee36e99 --- /dev/null +++ b/framework/core/js/dist-typings/common/query/users/GroupGambit.d.ts @@ -0,0 +1,7 @@ +import IGambit from '../IGambit'; +export default class GroupGambit implements IGambit { + pattern(): string; + toFilter(matches: string[], negate: boolean): Record; + filterKey(): string; + fromFilter(value: string, negate: boolean): string; +} diff --git a/framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts b/framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts index 61d2379b37..b36ff5031d 100644 --- a/framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts +++ b/framework/core/js/dist-typings/forum/states/GlobalSearchState.d.ts @@ -10,6 +10,7 @@ export default class GlobalSearchState extends SearchState { * @inheritdoc */ getInitialSearch(): string; + private searchToQuery; /** * Clear the search input and the current controller's active search. */ diff --git a/framework/core/js/dist/admin.js b/framework/core/js/dist/admin.js index 6fc7559a13..b4e6a04baf 100644 --- a/framework/core/js/dist/admin.js +++ b/framework/core/js/dist/admin.js @@ -1,3 +1,3 @@ /*! For license information please see admin.js.LICENSE.txt */ -(()=>{var t,e,n={2190:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(7905);class o{constructor(){(0,r.Z)(this,"element",void 0),(0,r.Z)(this,"attrs",void 0),(0,r.Z)(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const n={...t};return m(this,n,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("[".concat(this.constructor.name,'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute'));if("tag"in t)throw new Error("[".concat(this.constructor.name,'] You cannot use the "tag" attribute name with Mithril 2.'))}this.attrs=t}static initAttrs(t){}}flarum.reg.add("core","common/Component",o)},9175:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(7905),o=n(7465);class i{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e=o.Z.store),(0,r.Z)(this,"data",{}),(0,r.Z)(this,"freshness",new Date),(0,r.Z)(this,"exists",!1),(0,r.Z)(this,"store",void 0),this.data=t,this.store=e}id(){return"id"in this.data?this.data.id:void 0}attribute(t){var e,n;return null==(e=this.data)||null==(n=e.attributes)?void 0:n[t]}pushData(t){if("id"in t&&(this.data.id=t.id),"type"in t&&(this.data.type=t.type),"attributes"in t){var e;(e=this.data).attributes||(e.attributes={});for(const e in t.attributes){const n=t.attributes[e];n&&n instanceof i&&delete t.attributes[e]}Object.assign(this.data.attributes,t.attributes)}if("relationships"in t){var n;const e=null!=(n=this.data.relationships)?n:{};for(const n in t.relationships){const r=t.relationships[n];if(null===r){delete e[n],delete t.relationships[n];continue}let o;o=r instanceof i?{data:i.getIdentifier(r)}:r instanceof Array?{data:r.map(i.getIdentifier)}:r,t.relationships[n]=o,e[n]=o}this.data.relationships=e}return this.freshness=new Date,this}pushAttributes(t){this.pushData({attributes:t})}save(t,e){void 0===e&&(e={});const n={type:this.data.type,attributes:t};if("id"in this.data&&(n.id=this.data.id),t.relationships){n.relationships={};for(const e in t.relationships){const r=t.relationships[e];null!==r&&(n.relationships[e]={data:r instanceof Array?r.map(i.getIdentifier):i.getIdentifier(r)})}delete t.relationships}const r=this.copyData();this.pushData(n);const s={data:n,meta:e.meta||void 0};return o.Z.request({method:this.exists?"PATCH":"POST",url:o.Z.forum.attribute("apiUrl")+this.apiEndpoint(),body:s,...e}).then((t=>this.store.pushPayload(t)),(t=>{throw this.pushData(r),m.redraw(),t}))}delete(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?o.Z.request({method:"DELETE",url:o.Z.forum.attribute("apiUrl")+this.apiEndpoint(),body:t,...e}).then((()=>{this.exists=!1,this.store.remove(this)})):Promise.resolve()}apiEndpoint(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")}copyData(){return JSON.parse(JSON.stringify(this.data))}rawRelationship(t){var e,n;return null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data}static attribute(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}}static hasOne(t){return function(){var e,n;const r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&r instanceof Array)throw new Error("Relationship ".concat(t," on model ").concat(this.data.type," is plural, so the hasOne method cannot be used to access it."));return!!r&&this.store.getById(r.type,r.id)}}static hasMany(t){return function(){var e,n;const r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&!(r instanceof Array))throw new Error("Relationship ".concat(t," on model ").concat(this.data.type," is singular, so the hasMany method cannot be used to access it."));return!!r&&r.map((t=>this.store.getById(t.type,t.id)))}}static transformDate(t){return null!=t?new Date(t):t}static getIdentifier(t){return t&&"id"in t.data?{type:t.data.type,id:t.data.id}:null}}flarum.reg.add("core","common/Model",i)},7465:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const r=window,o=new Proxy({},{get:(t,e)=>Reflect.get(r.app,e,r.app),set:(t,e,n)=>Reflect.set(r.app,e,n,r.app)}),i=o;flarum.reg.add("core","common/app",o)},3817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2190),o=n(8312),i=n(1268),s=n(6786),a=n(3344),l=n(7465),c=n(9133);class u extends r.Z{view(t){const e=Object.assign({},this.attrs),n=(0,s.Z)(e,"type");e.className=(0,a.Z)("Alert","Alert--".concat(n),e.className);const r=(0,s.Z)(e,"title"),u=(0,s.Z)(e,"icon"),d=(0,s.Z)(e,"content")||t.children,h=(0,s.Z)(e,"controls")||[],p=(0,s.Z)(e,"dismissible"),f=(0,s.Z)(e,"ondismiss"),g=[];return(p||void 0===p)&&g.push(m(o.Z,{"aria-label":l.Z.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:f})),m("div",e,m("div",{className:(0,a.Z)("Alert-container",e.containerClassName)},!!r&&m("div",{className:"Alert-title"},!!u&&m("span",{className:"Alert-title-icon"},m(c.Z,{name:u})),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},d),m("ul",{className:"Alert-controls"},(0,i.Z)(h.concat(g)))))}}flarum.reg.add("core","common/components/Alert",u)},3804:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(6439),o=n(2190),i=n(3344),s=n(9215),a=n(9133);class l extends o.Z{view(){const{type:t,icon:e,label:n,color:o,style:l={},...c}=this.attrs,u=(0,i.Z)("Badge",[t&&"Badge--".concat(t)],c.className,(0,s.Z)(o)),d=e?m(a.Z,{name:e,className:"Badge-icon"}):m.trust(" "),h={...l,"--badge-bg":o},p={...c,className:u,style:h},f=m("div",p,d);return n?m(r.Z,{text:n},f):f}}flarum.reg.add("core","common/components/Badge",l)},8312:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2190),o=n(7465);function i(){o.Z.forum.attribute("debug")&&console.warn(...arguments)}flarum.reg.add("core","common/helpers/fireDebugWarning",i);var s=n(3344),a=n(1552),l=n(5226),c=n(9133);class u extends r.Z{view(t){let{type:e,"aria-label":n,icon:r,disabled:o,loading:i,className:l,class:c,...u}=this.attrs;e||(e="button"),"object"==typeof n&&(n=(0,a.Z)(n)),(o||i)&&delete u.onclick,l=(0,s.Z)(c,l,{hasIcon:r,disabled:o||i,loading:i});const d={disabled:o,className:l,type:e,"aria-label":n,...u};return m("button",d,this.getButtonContent(t.children))}oncreate(t){var e,n;super.oncreate(t);const{"aria-label":r}=this.attrs;this.view!==u.prototype.view||r||(0,a.Z)(t.children)||null!=(e=this.element)&&null!=(n=e.getAttribute)&&n.call(e,"aria-label")||i('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)}getButtonContent(t){const e=this.attrs.icon;return[e&&m(c.Z,{name:e,className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(l.Z,{size:"small",display:"inline"})]}}flarum.reg.add("core","common/components/Button",u)},6352:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2190),o=n(3344);class i extends r.Z{view(t){const{label:e,description:n,className:r,...i}=t.attrs;return m("div",Object.assign({className:(0,o.Z)("Form",r)},i),m("div",{className:"Form-header"},e&&m("label",null,e),n&&m("p",{className:"helpText"},n)),m("div",{className:"Form-body"},t.children))}}flarum.reg.add("core","common/components/Form",i)},899:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(7108);class o extends r.Z{wrapper(t){return m("form",{onsubmit:this.onsubmit.bind(this)},t)}onsubmit(t){}onready(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")}onerror(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()}}flarum.reg.add("core","common/components/FormModal",o)},6697:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3804);class o extends r.Z{static initAttrs(t){super.initAttrs(t),t.group&&(t.icon=t.group.icon()||"",t.color=t.group.color()||"",t.label=void 0===t.label?t.group.nameSingular():t.label,t.type="group--"+t.group.id(),delete t.group)}}flarum.reg.add("core","common/components/GroupBadge",o)},9133:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(3344),o=n(2190);class i extends o.Z{view(t){const{name:e,...n}=t.attrs;return n.className=(0,r.Z)("icon",e,n.className),m("i",Object.assign({"aria-hidden":"true"},n))}}flarum.reg.add("core","common/components/Icon",i)},5226:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7465),o=n(2190),i=n(3344);class s extends o.Z{view(){const{display:t="block",size:e="medium",containerClassName:n,className:o,...s}=this.attrs,a=(0,i.Z)("LoadingIndicator",o),l=(0,i.Z)("LoadingIndicator-container","unset"!==t&&"LoadingIndicator-container--".concat(t),e&&"LoadingIndicator-container--".concat(e),n);return m("div",Object.assign({"aria-label":r.Z.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},s.containerAttrs,{"data-size":e,className:l}),m("div",Object.assign({"aria-hidden":"true",className:a},s)))}}flarum.reg.add("core","common/components/LoadingIndicator",s)},7108:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(7905),o=n(7465),i=n(2190),s=n(3817),a=n(8312),l=n(3344);class c extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"loading",!1),(0,r.Z)(this,"alertAttrs",null)}static get dismissibleOptions(){return{viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}}oncreate(t){super.oncreate(t),this.attrs.animateShow((()=>this.onready()))}onbeforeremove(t){if(super.onbeforeremove(t),!this.attrs.state.modal)return new Promise((t=>setTimeout(t,300)))}view(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:(0,l.Z)("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(a.Z,{icon:"fas fa-times",onclick:()=>this.hide(),className:"Button Button--icon Button--link","aria-label":o.Z.translator.trans("core.lib.modal.close")})),this.wrapper(this.inner())))}wrapper(t){return m("[",null,t)}inner(){return m("[",null,m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(s.Z,this.alertAttrs)),this.content())}onready(){}hide(){this.attrs.animateHide()}loaded(){this.loading=!1,m.redraw()}get dismissibleOptions(){return this.constructor.dismissibleOptions}}(0,r.Z)(c,"isDismissibleViaCloseButton",!0),(0,r.Z)(c,"isDismissibleViaEscKey",!0),(0,r.Z)(c,"isDismissibleViaBackdropClick",!0),flarum.reg.add("core","common/components/Modal",c)},6439:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(7905),o=n(2190),i=n(3344),s=n(1552);class a extends o.Z{constructor(){super(...arguments),(0,r.Z)(this,"firstChild",null),(0,r.Z)(this,"childDomNode",null),(0,r.Z)(this,"oldText",""),(0,r.Z)(this,"oldVisibility",void 0),(0,r.Z)(this,"shouldRecreateTooltip",!1),(0,r.Z)(this,"shouldChangeTooltipVisibility",!1)}view(t){const e=t.children,{text:n,tooltipVisible:r,showOnFocus:o=!0,position:i="top",ignoreTitleWarning:s=!1,html:a=!1,delay:l=0,...c}=this.attrs;this.attrs.title&&!s&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");const u=this.getRealText();if(u!==this.oldText&&(this.oldText=u,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a
or .");const d=e[0];if("object"!=typeof d||Array.isArray(d)||null===d)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof d.tag&&["#","[","<"].includes(d.tag))throw new Error('Tooltip component with provided with a vnode with tag "'.concat(d.tag,'". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a
or .'));return this.firstChild=d,e}oncreate(t){super.oncreate(t),this.checkDomNodeChanged(),this.recreateTooltip()}onupdate(t){super.onupdate(t),this.checkDomNodeChanged(),this.recreateTooltip()}recreateTooltip(){this.shouldRecreateTooltip&&null!==this.childDomNode&&($(this.childDomNode).tooltip("destroy","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"),this.createTooltip(),this.shouldRecreateTooltip=!1),this.shouldChangeTooltipVisibility&&(this.shouldChangeTooltipVisibility=!1,this.updateVisibility())}updateVisibility(){null!==this.childDomNode&&(!0===this.attrs.tooltipVisible?$(this.childDomNode).tooltip("show","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"):!1===this.attrs.tooltipVisible&&$(this.childDomNode).tooltip("hide","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"))}createTooltip(){if(null===this.childDomNode)return;const{showOnFocus:t=!0,position:e="top",delay:n,html:r=!1,tooltipVisible:o,text:s}=this.attrs,a="boolean"==typeof o?"manual":(0,i.Z)("hover",[t&&"focus"]),l=this.getRealText();this.childDomNode.setAttribute("title",l),this.childDomNode.setAttribute("aria-label",l),$(this.childDomNode).tooltip({html:r,delay:n,placement:e,trigger:a},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}getRealText(){const{text:t}=this.attrs;return Array.isArray(t)?(0,s.Z)(t):t}checkDomNodeChanged(){const t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)}}flarum.reg.add("core","common/components/Tooltip",a)},1268:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2903),o=n(3344);function i(t){return"object"==typeof t&&null!==t&&"tag"in t}function s(t){return i(t)&&t.tag===r.Z}function a(t,e,n){void 0===e&&(e="li"),void 0===n&&(n={});const r=e;return function(t){const e=[];let n;return t.filter(Boolean).forEach(((r,o)=>{(!s(r)||n&&!s(n)&&o!==t.length-1)&&(n=r,e.push(r))})),e}(t instanceof Array?t:[t]).map((t=>{var e;const s=[t.itemName&&"item-".concat(t.itemName)];if(i(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;var a,l,c;i(t)&&(s.push((null==(a=t.attrs)?void 0:a.itemClassName)||t.itemClassName),null!=(l=(c=t.tag).isActive)&&l.call(c,t.attrs)&&s.push("active"));const u=i(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(r,Object.assign({className:(0,o.Z)(s),key:u},n),t)}))}flarum.reg.add("core","common/helpers/listItems",a)},9215:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(6476);function o(t){return t?(0,r.Z)(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}flarum.reg.add("core","common/helpers/textContrastClass",o)},7645:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(7905),o=n(9175);class i extends o.Z{nameSingular(){return o.Z.attribute("nameSingular").call(this)}namePlural(){return o.Z.attribute("namePlural").call(this)}color(){return o.Z.attribute("color").call(this)}icon(){return o.Z.attribute("icon").call(this)}isHidden(){return o.Z.attribute("isHidden").call(this)}}(0,r.Z)(i,"ADMINISTRATOR_ID","1"),(0,r.Z)(i,"GUEST_ID","2"),(0,r.Z)(i,"MEMBER_ID","3"),flarum.reg.add("core","common/models/Group",i)},4041:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7905),o=n(7531);class i{constructor(t,e){(0,r.Z)(this,"content",void 0),(0,r.Z)(this,"priority",void 0),this.content=t,this.priority=e}}class s{constructor(){(0,r.Z)(this,"_items",{})}isEmpty(){return 0===Object.keys(this._items).length}has(t){return Object.keys(this._items).includes(t)}get(t){return this._items[t].content}getPriority(t){return this._items[t].priority}add(t,e,n){return void 0===n&&(n=0),this._items[t]=new i(e,n),this}setContent(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set content of Item. Key `".concat(t,"` is not present."));return null!==e&&(this._items[t].content=e),this}setPriority(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set priority of Item. Key `".concat(t,"` is not present."));return this._items[t].priority=e,this}remove(t){return delete this._items[t],this}merge(t){return Object.keys(t._items).forEach((e=>{const n=t._items[e];n instanceof i&&(this._items[e]=n)})),this}toArray(t){return void 0===t&&(t=!1),Object.keys(this._items).map(((e,n)=>{const r=this._items[e];return!t||(0,o.Z)(r.content)?{...r,content:this.createItemContentProxy((0,o.Z)(r.content)?r.content:Object(r.content),e)}:{...r}})).sort(((t,e)=>e.priority-t.priority)).map((t=>t.content))}toObject(){return Object.keys(this._items).reduce(((t,e)=>{const n={content:this.get(e),itemName:e,priority:this.getPriority(e)};return t[e]=n,t}),{})}createItemContentProxy(t,e){return new Proxy(t,{get:(t,n,r)=>"itemName"===n?e:Reflect.get(t,n,r),set(t,n,r,o){if(null!==e&&"itemName"===n)throw new Error("`itemName` property is read-only");return Reflect.set(t,n,r,o)}})}}flarum.reg.add("core","common/utils/ItemList",s)},6458:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(562),o=n.n(r);const i=o();flarum.reg.add("core","common/utils/Stream",o())},117:()=>{Array.prototype.flat||(Array.prototype.flat=function t(e){return(null!=e?e:1)>0?Array.prototype.reduce.call(this,((n,r)=>n.concat(Array.isArray(r)?t.call(r,e-1):r)),[]):[...this]})},3344:(t,e,n)=>{"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ei});const o=function(){for(var t,e,n=0,o="";n{"use strict";function r(t,e){const n=t[e];return delete t[e],n}n.d(e,{Z:()=>r}),flarum.reg.add("core","common/utils/extract",r)},1552:(t,e,n)=>{"use strict";function r(t){return t instanceof Array?t.map((t=>r(t))).join(""):"object"==typeof t&&null!==t?r(t.children):String(t)}n.d(e,{Z:()=>r}),flarum.reg.add("core","common/utils/extractText",r)},6476:(t,e,n)=>{"use strict";function r(t){if(!t||t.length<4)return!1;let e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}n.d(e,{Z:()=>r}),flarum.reg.add("core","common/utils/isDark",r)},7531:(t,e,n)=>{"use strict";function r(t){const e=typeof t;return"function"===e||"object"===e&&!!t}n.d(e,{Z:()=>r}),flarum.reg.add("core","common/utils/isObject",r)},9361:()=>{!function(t){"use strict";var e=function(n,r){this.options=t.extend({},e.DEFAULTS,r);var o=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=t(this),o=r.data("bs.affix"),i="object"==typeof n&&n;o||r.data("bs.affix",o=new e(this,i)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,r){var o=this.$target.scrollTop(),i=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-r&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,o=r.top,i=r.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(i=o=r),"function"==typeof o&&(o=r.top(this.$element)),"function"==typeof i&&(i=r.bottom(this.$element));var a=this.getState(s,n,o,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-i})}};var r=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),r=e.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(e,r)}))}))}(jQuery)},6013:()=>{!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function o(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),o=r(e),i={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",i)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var i=r(n),s=i.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",o);var a={relatedTarget:this};if(i.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var i=r(o),s=i.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&i.find(e).trigger("focus"),o.trigger("click");var a=i.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l{!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function i(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(o));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),l=0,c=a.length;l
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},a.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),i=o.length;i--;){var s=o[i];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.getOptions=function(n){var r=this.$element.data();for(var o in r)r.hasOwnProperty(o)&&-1!==t.inArray(o,e)&&delete r[o];return(n=t.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=s(n.template,n.whiteList,n.sanitizeFn)),n},a.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,r){n[t]!=r&&(e[t]=r)})),e},a.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},a.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},a.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},a.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var r=this,o=this.tip(),i=this.getUID(this.type);this.setContent(),o.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(s);c&&(s=s.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(c){var p=s,m=this.getPosition(this.$viewport);s="bottom"==s&&u.bottom+h>m.bottom?"top":"top"==s&&u.top-hm.width?"left":"left"==s&&u.left-ds.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-i,u=e.left+i+n;cs.right&&(o.left=s.left+s.width-u)}return o},a.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},a.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},a.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},a.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},a.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var l=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),o="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new a(this,o)),"string"==typeof e&&r[e]())}))},t.fn.tooltip.Constructor=a,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=l,this}}(jQuery)},3929:()=>{!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;return t(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||t(r).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},613:t=>{var e=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.update=function(t){this.context.putImageData(t,0,0)},e.prototype.getPixelCount=function(){return this.width*this.height},e.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},e.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var n=function(){};if(n.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},n.prototype.getPalette=function(t,n,r){void 0===n&&(n=10),(void 0===r||1>r)&&(r=10);for(var i,s,a,l,c=new e(t),u=c.getImageData().data,d=c.getPixelCount(),h=[],p=0;d>p;p+=r)s=u[0+(i=4*p)],a=u[i+1],l=u[i+2],u[i+3]>=125&&(s>250&&a>250&&l>250||h.push([s,a,l]));var m=o.quantize(h,n),f=m?m.palette():null;return c.removeCanvas(),f},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,r,o){return n.index=o,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var o=function(){function t(t,e,n){return(t<<2*l)+(e<>c,o=e[1]>>c,i=e[2]>>c,n=t(r,o,i),s[n]=(s[n]||0)+1})),s}function s(t,e){var r,o,i,s=1e6,a=0,l=1e6,u=0,d=1e6,h=0;return t.forEach((function(t){r=t[0]>>c,o=t[1]>>c,i=t[2]>>c,s>r?s=r:r>a&&(a=r),l>o?l=o:o>u&&(u=o),d>i?d=i:i>h&&(h=i)})),new n(s,a,l,u,d,h,e)}function a(e,n){if(n.count()){var o=n.r2-n.r1+1,i=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([o,i,s]);if(1==n.count())return[n.copy()];var l,c,u,d,h=0,p=[],m=[];if(a==o)for(l=n.r1;l<=n.r2;l++){for(d=0,c=n.g1;c<=n.g2;c++)for(u=n.b1;u<=n.b2;u++)d+=e[t(l,c,u)]||0;h+=d,p[l]=h}else if(a==i)for(l=n.g1;l<=n.g2;l++){for(d=0,c=n.r1;c<=n.r2;c++)for(u=n.b1;u<=n.b2;u++)d+=e[t(c,l,u)]||0;h+=d,p[l]=h}else for(l=n.b1;l<=n.b2;l++){for(d=0,c=n.r1;c<=n.r2;c++)for(u=n.g1;u<=n.g2;u++)d+=e[t(c,u,l)]||0;h+=d,p[l]=h}return p.forEach((function(t,e){m[e]=h-t})),function(t){var e,r,o,i,s,a=t+"1",c=t+"2",u=0;for(l=n[a];l<=n[c];l++)if(p[l]>h/2){for(o=n.copy(),i=n.copy(),e=l-n[a],s=(r=n[c]-l)>=e?Math.min(n[c]-1,~~(l+r/2)):Math.max(n[a],~~(l-1-e/2));!p[s];)s++;for(u=m[s];!u&&p[s-1];)u=m[--s];return o[c]=s,i[a]=o[c]+1,[o,i]}}(a==o?"r":a==i?"g":"b")}}var l=5,c=8-l;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,r=n.histo;if(!n._count_set||e){var o,i,s,a=0;for(o=n.r1;o<=n.r2;o++)for(i=n.g1;i<=n.g2;i++)for(s=n.b1;s<=n.b2;s++)index=t(o,i,s),a+=r[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var o,i,s,a,c=0,u=1<<8-l,d=0,h=0,p=0;for(i=n.r1;i<=n.r2;i++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)c+=o=r[t(i,s,a)]||0,d+=o*(i+.5)*u,h+=o*(s+.5)*u,p+=o*(a+.5)*u;n._avg=c?[~~(d/c),~~(h/c),~~(p/c)]:[~~(u*(n.r1+n.r2+1)/2),~~(u*(n.g1+n.g2+1)/2),~~(u*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>c;return gval=t[1]>>c,bval=t[2]>>c,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},o.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n(n=Math.sqrt(Math.pow(t[0]-o.peek(i).color[0],2)+Math.pow(t[1]-o.peek(i).color[1],2)+Math.pow(t[2]-o.peek(i).color[2],2)))||void 0===e)&&(e=n,r=o.peek(i).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,o=t[n].color;o[0]>251&&o[1]>251&&o[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function l(t,e){for(var n,r=1,o=0;1e3>o;)if((n=t.pop()).count()){var i=a(c,n),s=i[0],l=i[1];if(!s)return;if(t.push(s),l&&(t.push(l),r++),r>=e)return;if(o++>1e3)return}else t.push(n),o++}if(!t.length||2>n||n>256)return!1;var c=i(t);c.forEach((function(){}));var u=s(t,c),d=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));d.push(u),l(d,.75*n);for(var h=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));d.size();)h.push(d.pop());l(h,n-h.size());for(var p=new o;h.size();)p.push(h.pop());return p}}}();t.exports=n},3860:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",o="minute",i="hour",s="day",a="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()1)return t(s[0])}else{var a=e.name;y[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},N=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},E=v;E.l=x,E.i=w,E.w=function(t,e){return N(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function f(t){this.$L=x(t.locale,null,!0),this.parse(t)}var g=f.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(t,e){var n=N(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return N(t)0,g<=f.r||!f.r){g<=1&&m>0&&(f=h[m-1]);var v=d[f.l];a&&(g=a(""+g)),c="string"==typeof v?v.replace("%d",g):v(g,r,f.l,u);break}}if(r)return c;var b=u?d.future:d.past;return"function"==typeof b?b(c):b.replace("%s",c)},r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}()},7749:(t,e,n)=>{"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},2045:function(){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,r=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],i=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&o!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.metaKey&&"meta"!==o&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),o?a[s+o]=!0:(a[s+i]=!0,a[s+t.hotkeys.shiftNums[i]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[i]]=!0));for(var l=0,c=r.length;l","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},2890:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,o){"use strict";var i=[],s=Object.getPrototypeOf,a=i.slice,l=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},c=i.push,u=i.indexOf,d={},h=d.toString,p=d.hasOwnProperty,m=p.toString,f=m.call(Object),g={},v=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},y=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,o,i=(n=n||y).createElement("script");if(i.text=t,e)for(r in w)(o=e[r]||e.getAttribute&&e.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var E="3.6.1",_=function(t,e){return new _.fn.init(t,e)};function T(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!v(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}_.fn=_.prototype={jquery:E,constructor:_,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=_.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return _.each(this,t)},map:function(t){return this.pushStack(_.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(_.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),z=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+B+"$"),V={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},it=function(){h()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(A=I.call(x.childNodes),x.childNodes),A[x.childNodes.length].nodeType}catch(t){O={apply:A.length?function(t,e){P.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function at(t,e,r,o){var i,a,c,u,d,m,v,b=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!o&&(h(e),e=e||p,f)){if(11!==x&&(d=Q.exec(t)))if(i=d[1]){if(9===x){if(!(c=e.getElementById(i)))return r;if(c.id===i)return r.push(c),r}else if(b&&(c=b.getElementById(i))&&y(e,c)&&c.id===i)return r.push(c),r}else{if(d[2])return O.apply(r,e.getElementsByTagName(t)),r;if((i=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(i)),r}if(n.qsa&&!S[t+" "]&&(!g||!g.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(v=t,b=e,1===x&&(z.test(t)||U.test(t))){for((b=tt.test(t)&&vt(e.parentNode)||e)===e&&n.scope||((u=e.getAttribute("id"))?u=u.replace(rt,ot):e.setAttribute("id",u=w)),a=(m=s(t)).length;a--;)m[a]=(u?"#"+u:":scope")+" "+yt(m[a]);v=m.join(",")}try{return O.apply(r,b.querySelectorAll(v)),r}catch(e){S(t,!0)}finally{u===w&&e.removeAttribute("id")}}}return l(t.replace(q,"$1"),e,r,o)}function lt(){var t=[];return function e(n,o){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function ct(t){return t[w]=!0,t}function ut(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=e}function ht(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function mt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function ft(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ct((function(e){return e=+e,ct((function(n,r){for(var o,i=t([],n.length,e),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},i=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!Y.test(e||n&&n.nodeName||"HTML")},h=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:x;return s!=p&&9===s.nodeType&&s.documentElement?(m=(p=s).documentElement,f=!i(p),x!=p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",it,!1):o.attachEvent&&o.attachEvent("onunload",it)),n.scope=ut((function(t){return m.appendChild(t).appendChild(p.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ut((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ut((function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ut((function(t){return m.appendChild(t).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var n,r,o,i=e.getElementById(t);if(i){if((n=i.getAttributeNode("id"))&&n.value===t)return[i];for(o=e.getElementsByName(t),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===t)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&f)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=J.test(p.querySelectorAll))&&(ut((function(t){var e;m.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+j+")"),t.querySelectorAll("[id~="+w+"-]").length||g.push("~="),(e=p.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ut((function(t){t.innerHTML="";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),m.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(b=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&ut((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),v.push("!=",R)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=J.test(m.compareDocumentPosition),y=e||J.test(m.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return d=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==p||t.ownerDocument==x&&y(x,t)?-1:e==p||e.ownerDocument==x&&y(x,e)?1:u?L(u,t)-L(u,e):0:4&r?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,r=0,o=t.parentNode,i=e.parentNode,s=[t],a=[e];if(!o||!i)return t==p?-1:e==p?1:o?-1:i?1:u?L(u,t)-L(u,e):0;if(o===i)return ht(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?ht(s[r],a[r]):s[r]==x?-1:a[r]==x?1:0},p):p},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&f&&!S[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var r=b.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){S(e,!0)}return at(e,p,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=p&&h(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=p&&h(t);var o=r.attrHandle[e.toLowerCase()],i=o&&Z.call(r.attrHandle,e.toLowerCase())?o(t,e,!f):void 0;return void 0!==i?i:n.attributes||!f?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},at.escape=function(t){return(t+"").replace(rt,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,r=[],o=0,i=0;if(d=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(C),d){for(;e=t[i++];)e===t[i]&&(o=r.push(i));for(;o--;)t.splice(r[o],1)}return u=null,t},o=at.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=o(e);return n},r=at.selectors={cacheLength:50,createPseudo:ct,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&W.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=_[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&_(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=at.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,h,p,m,f=i!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!l&&!a,y=!1;if(g){if(i){for(;f;){for(h=e;h=h[f];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;m=f="only"===t&&!m&&"nextSibling"}return!0}if(m=[s?g.firstChild:g.lastChild],s&&b){for(y=(p=(c=(u=(d=(h=g)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[f]||(y=p=0)||m.pop();)if(1===h.nodeType&&++y&&h===e){u[t]=[N,p,y];break}}else if(b&&(y=p=(c=(u=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&c[1]),!1===y)for(;(h=++p&&h&&h[f]||(y=p=0)||m.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++y||(b&&((u=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[N,y]),h!==e)););return(y-=o)===r||y%r==0&&y/r>=0}}},PSEUDO:function(t,e){var n,o=r.pseudos[t]||r.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var r,i=o(t,e),s=i.length;s--;)t[r=L(t,i[s])]=!(n[r]=i[s])})):function(t){return o(t,0,n)}):o}},pseudos:{not:ct((function(t){var e=[],n=[],r=a(t.replace(q,"$1"));return r[w]?ct((function(t,e,n,o){for(var i,s=r(t,null,o,[]),a=t.length;a--;)(i=s[a])&&(t[a]=!(e[a]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return at(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||o(e)).indexOf(t)>-1}})),lang:ct((function(t){return G.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=f?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===m},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:ft(!1),disabled:ft(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return X.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;ne?e:n;--r>=0;)t.push(r);return t})),gt:gt((function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Nt(t,e,n,r,o){for(var i,s=[],a=0,l=t.length,c=null!=e;a-1&&(i[c]=!(s[c]=d))}}else v=Nt(v===s?v.splice(m,v.length):v),o?o(null,s,v,l):O.apply(s,v)}))}function _t(t){for(var e,n,o,i=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],l=s?1:0,u=wt((function(t){return t===e}),a,!0),d=wt((function(t){return L(e,t)>-1}),a,!0),h=[function(t,n,r){var o=!s&&(r||n!==c)||((e=n).nodeType?u(t,n,r):d(t,n,r));return e=null,o}];l1&&xt(h),l>1&&yt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(q,"$1"),n,l0,o=t.length>0,i=function(i,s,a,l,u){var d,m,g,v=0,b="0",y=i&&[],w=[],x=c,E=i||o&&r.find.TAG("*",u),_=N+=null==x?1:Math.random()||.1,T=E.length;for(u&&(c=s==p||s||u);b!==T&&null!=(d=E[b]);b++){if(o&&d){for(m=0,s||d.ownerDocument==p||(h(d),a=!f);g=t[m++];)if(g(d,s||p,a)){l.push(d);break}u&&(N=_)}n&&((d=!g&&d)&&v--,i&&y.push(d))}if(v+=b,n&&b!==v){for(m=0;g=e[m++];)g(y,w,s,a);if(i){if(v>0)for(;b--;)y[b]||w[b]||(w[b]=D.call(l));w=Nt(w)}O.apply(l,w),u&&!i&&w.length>0&&v+e.length>1&&at.uniqueSort(l)}return u&&(N=_,c=x),y};return n?ct(i):i}(i,o)),a.selector=t}return a},l=at.select=function(t,e,n,o){var i,l,c,u,d,h="function"==typeof t&&t,p=!o&&s(t=h.selector||t);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&f&&r.relative[l[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(i=V.needsContext.test(t)?0:l.length;i--&&(c=l[i],!r.relative[u=c.type]);)if((d=r.find[u])&&(o=d(c.matches[0].replace(et,nt),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(i,1),!(t=o.length&&yt(l)))return O.apply(n,o),n;break}}return(h||a(t,p))(o,e,!f,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=w.split("").sort(C).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ut((function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))})),ut((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ut((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ut((function(t){return null==t.getAttribute("disabled")}))||dt(j,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),at}(r);_.find=k,_.expr=k.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=k.uniqueSort,_.text=k.getText,_.isXMLDoc=k.isXML,_.contains=k.contains,_.escapeSelector=k.escape;var S=function(t,e,n){for(var r=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&_(t).is(n))break;r.push(t)}return r},C=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Z=_.expr.match.needsContext;function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return v(e)?_.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?_.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?_.grep(t,(function(t){return u.call(e,t)>-1!==n})):_.filter(e,t,n)}_.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?_.find.matchesSelector(r,t)?[r]:[]:_.find.matches(t,_.grep(e,(function(t){return 1===t.nodeType})))},_.fn.extend({find:function(t){var e,n,r=this.length,o=this;if("string"!=typeof t)return this.pushStack(_(t).filter((function(){for(e=0;e1?_.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&Z.test(t)?_(t):t||[],!1).length}});var O,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(t,e,n){var r,o;if(!t)return this;if(n=n||O,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof _?e[0]:e,_.merge(this,_.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),D.test(r[1])&&_.isPlainObject(e))for(r in e)v(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(o=y.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(_):_.makeArray(t,this)}).prototype=_.fn,O=_(y);var L=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}_.fn.extend({has:function(t){var e=_(t,this),n=e.length;return this.filter((function(){for(var t=0;t-1:1===n.nodeType&&_.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?_.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?u.call(_(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),_.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return S(t,"parentNode")},parentsUntil:function(t,e,n){return S(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return S(t,"nextSibling")},prevAll:function(t){return S(t,"previousSibling")},nextUntil:function(t,e,n){return S(t,"nextSibling",n)},prevUntil:function(t,e,n){return S(t,"previousSibling",n)},siblings:function(t){return C((t.parentNode||{}).firstChild,t)},children:function(t){return C(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(A(t,"template")&&(t=t.content||t),_.merge([],t.childNodes))}},(function(t,e){_.fn[t]=function(n,r){var o=_.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=_.filter(r,o)),this.length>1&&(j[t]||_.uniqueSort(o),L.test(t)&&o.reverse()),this.pushStack(o)}}));var B=/[^\x20\t\r\n\f]+/g;function $(t){return t}function R(t){throw t}function F(t,e,n,r){var o;try{t&&v(o=t.promise)?o.call(t).done(e).fail(n):t&&v(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}_.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return _.each(t.match(B)||[],(function(t,n){e[n]=!0})),e}(t):_.extend({},t);var e,n,r,o,i=[],s=[],a=-1,l=function(){for(o=o||t.once,r=e=!0;s.length;a=-1)for(n=s.shift();++a-1;)i.splice(n,1),n<=a&&a--})),this},has:function(t){return t?_.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=s=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=s=[],n||e||(i=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},_.extend({Deferred:function(t){var e=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return _.Deferred((function(n){_.each(e,(function(e,r){var o=v(t[r[4]])&&t[r[4]];i[r[1]]((function(){var t=o&&o.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,o){var i=0;function s(t,e,n,o){return function(){var a=this,l=arguments,c=function(){var r,c;if(!(t=i&&(n!==R&&(a=void 0,l=[r]),e.rejectWith(a,l))}};t?u():(_.Deferred.getStackHook&&(u.stackTrace=_.Deferred.getStackHook()),r.setTimeout(u))}}return _.Deferred((function(r){e[0][3].add(s(0,r,v(o)?o:$,r.notifyWith)),e[1][3].add(s(0,r,v(t)?t:$)),e[2][3].add(s(0,r,v(n)?n:R))})).promise()},promise:function(t){return null!=t?_.extend(t,o):o}},i={};return _.each(e,(function(t,r){var s=r[2],a=r[5];o[r[1]]=s.add,a&&s.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=s.fireWith})),o.promise(i),t&&t.call(i,i),i},when:function(t){var e=arguments.length,n=e,r=Array(n),o=a.call(arguments),i=_.Deferred(),s=function(t){return function(n){r[t]=this,o[t]=arguments.length>1?a.call(arguments):n,--e||i.resolveWith(r,o)}};if(e<=1&&(F(t,i.done(s(n)).resolve,i.reject,!e),"pending"===i.state()||v(o[n]&&o[n].then)))return i.then();for(;n--;)F(o[n],s(n),i.reject);return i.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&q.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},_.readyException=function(t){r.setTimeout((function(){throw t}))};var H=_.Deferred();function U(){y.removeEventListener("DOMContentLoaded",U),r.removeEventListener("load",U),_.ready()}_.fn.ready=function(t){return H.then(t).catch((function(t){_.readyException(t)})),this},_.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==t&&--_.readyWait>0||H.resolveWith(y,[_]))}}),_.ready.then=H.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?r.setTimeout(_.ready):(y.addEventListener("DOMContentLoaded",U),r.addEventListener("load",U));var z=function(t,e,n,r,o,i,s){var a=0,l=t.length,c=null==n;if("object"===N(n))for(a in o=!0,n)z(t,e,a,n[a],!0,i,s);else if(void 0!==r&&(o=!0,v(r)||(s=!0),c&&(s?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(_(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),_.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=J.get(t,e),n&&(!r||Array.isArray(n)?r=J.access(t,e,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=_.queue(t,e),r=n.length,o=n.shift(),i=_._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===e&&n.unshift("inprogress"),delete i.stop,o.call(t,(function(){_.dequeue(t,e)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:_.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),_.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,bt=/^$|^module$|\/(?:java|ecma)script/i;mt=y.createDocumentFragment().appendChild(y.createElement("div")),(ft=y.createElement("input")).setAttribute("type","radio"),ft.setAttribute("checked","checked"),ft.setAttribute("name","t"),mt.appendChild(ft),g.checkClone=mt.cloneNode(!0).cloneNode(!0).lastChild.checked,mt.innerHTML="",g.noCloneChecked=!!mt.cloneNode(!0).lastChild.defaultValue,mt.innerHTML="",g.option=!!mt.lastChild;var yt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function wt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?_.merge([t],n):n}function xt(t,e){for(var n=0,r=t.length;n",""]);var Nt=/<|&#?\w+;/;function Et(t,e,n,r,o){for(var i,s,a,l,c,u,d=e.createDocumentFragment(),h=[],p=0,m=t.length;p-1)o&&o.push(i);else if(c=at(i),s=wt(d.appendChild(i),"script"),c&&xt(s),n)for(u=0;i=s[u++];)bt.test(i.type||"")&&n.push(i);return d}var _t=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function kt(){return!1}function St(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function Ct(t,e,n,r,o,i){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Ct(t,a,n,r,e[a],i);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=kt;else if(!o)return t;return 1===i&&(s=o,o=function(t){return _().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=_.guid++)),t.each((function(){_.event.add(this,e,o,r,n)}))}function Zt(t,e,n){n?(J.set(t,e,!1),_.event.add(t,e,{namespace:!1,handler:function(t){var r,o,i=J.get(this,e);if(1&t.isTrigger&&this[e]){if(i.length)(_.event.special[e]||{}).delegateType&&t.stopPropagation();else if(i=a.call(arguments),J.set(this,e,i),r=n(this,e),this[e](),i!==(o=J.get(this,e))||r?J.set(this,e,!1):o={},i!==o)return t.stopImmediatePropagation(),t.preventDefault(),o&&o.value}else i.length&&(J.set(this,e,{value:_.event.trigger(_.extend(i[0],_.Event.prototype),i.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&_.event.add(t,e,Tt)}_.event={global:{},add:function(t,e,n,r,o){var i,s,a,l,c,u,d,h,p,m,f,g=J.get(t);if(K(t))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&_.find.matchesSelector(st,o),n.guid||(n.guid=_.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(e){return void 0!==_&&_.event.triggered!==e.type?_.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(B)||[""]).length;c--;)p=f=(a=_t.exec(e[c])||[])[1],m=(a[2]||"").split(".").sort(),p&&(d=_.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=_.event.special[p]||{},u=_.extend({type:p,origType:f,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&_.expr.match.needsContext.test(o),namespace:m.join(".")},i),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,m,s)||t.addEventListener&&t.addEventListener(p,s)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),_.event.global[p]=!0)},remove:function(t,e,n,r,o){var i,s,a,l,c,u,d,h,p,m,f,g=J.hasData(t)&&J.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(B)||[""]).length;c--;)if(p=f=(a=_t.exec(e[c])||[])[1],m=(a[2]||"").split(".").sort(),p){for(d=_.event.special[p]||{},h=l[p=(r?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=h.length;i--;)u=h[i],!o&&f!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(h.splice(i,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(t,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,m,g.handle)||_.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)_.event.remove(t,p+e[c],n,r,!0);_.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,r,o,i,s,a=new Array(arguments.length),l=_.event.fix(t),c=(J.get(this,"events")||Object.create(null))[l.type]||[],u=_.event.special[l.type]||{};for(a[0]=l,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(i=[],s={},n=0;n-1:_.find(o,this,null,[c]).length),s[o]&&i.push(r);i.length&&a.push({elem:c,handlers:i})}return c=this,l\s*$/g;function Ot(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&_(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Lt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,o,i,s,a;if(1===e.nodeType){if(J.hasData(t)&&(a=J.get(t).events))for(o in J.remove(e,"handle events"),a)for(n=0,r=a[o].length;n1&&"string"==typeof m&&!g.checkClone&&Dt.test(m))return t.each((function(o){var i=t.eq(o);f&&(e[0]=m.call(this,o,i.html())),Bt(i,e,n,r)}));if(h&&(i=(o=Et(e,t[0].ownerDocument,!1,t,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(a=(s=_.map(wt(o,"script"),It)).length;d0&&xt(s,!l&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,o=_.event.special,i=0;void 0!==(n=t[i]);i++)if(K(n)){if(e=n[J.expando]){if(e.events)for(r in e.events)o[r]?_.event.remove(n,r):_.removeEvent(n,r,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),_.fn.extend({detach:function(t){return $t(this,t,!0)},remove:function(t){return $t(this,t)},text:function(t){return z(this,(function(t){return void 0===t?_.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(_.cleanData(wt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return _.clone(this,t,e)}))},html:function(t){return z(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!yt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=_.htmlPrefilter(t);try{for(;n=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-i-l-a-.5))||0),l}function re(t,e,n){var r=qt(t),o=(!g.boxSizingReliable()||n)&&"border-box"===_.css(t,"boxSizing",!1,r),i=o,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&o||!g.reliableTrDimensions()&&A(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===_.css(t,"display",!1,r))&&t.getClientRects().length&&(o="border-box"===_.css(t,"boxSizing",!1,r),(i=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(o?"border":"content"),i,r,s)+"px"}function oe(t,e,n,r,o){return new oe.prototype.init(t,e,n,r,o)}_.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,i,s,a=Y(e),l=Ft.test(e),c=t.style;if(l||(e=Xt(a)),s=_.cssHooks[e]||_.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,r))?o:c[e];"string"==(i=typeof n)&&(o=ot.exec(n))&&o[1]&&(n=ut(t,e,o),i="number"),null!=n&&n==n&&("number"!==i||l||(n+=o&&o[3]||(_.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var o,i,s,a=Y(e);return Ft.test(e)||(e=Xt(a)),(s=_.cssHooks[e]||_.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Wt(t,e,r)),"normal"===o&&e in te&&(o=te[e]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),_.each(["height","width"],(function(t,e){_.cssHooks[e]={get:function(t,n,r){if(n)return!Jt.test(_.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Ht(t,Qt,(function(){return re(t,e,r)}))},set:function(t,n,r){var o,i=qt(t),s=!g.scrollboxSize()&&"absolute"===i.position,a=(s||r)&&"border-box"===_.css(t,"boxSizing",!1,i),l=r?ne(t,e,r,a,i):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(i[e])-ne(t,e,"border",!1,i)-.5)),l&&(o=ot.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=_.css(t,e)),ee(0,n,l)}}})),_.cssHooks.marginLeft=Gt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-Ht(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),_.each({margin:"",padding:"",border:"Width"},(function(t,e){_.cssHooks[t+e]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[t+it[r]+e]=i[r]||i[r-2]||i[0];return o}},"margin"!==t&&(_.cssHooks[t+e].set=ee)})),_.fn.extend({css:function(t,e){return z(this,(function(t,e,n){var r,o,i={},s=0;if(Array.isArray(e)){for(r=qt(t),o=e.length;s1)}}),_.Tween=oe,oe.prototype={constructor:oe,init:function(t,e,n,r,o,i){this.elem=t,this.prop=n,this.easing=o||_.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=i||(_.cssNumber[n]?"":"px")},cur:function(){var t=oe.propHooks[this.prop];return t&&t.get?t.get(this):oe.propHooks._default.get(this)},run:function(t){var e,n=oe.propHooks[this.prop];return this.options.duration?this.pos=e=_.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):oe.propHooks._default.set(this),this}},oe.prototype.init.prototype=oe.prototype,oe.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=_.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){_.fx.step[t.prop]?_.fx.step[t.prop](t):1!==t.elem.nodeType||!_.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:_.style(t.elem,t.prop,t.now+t.unit)}}},oe.propHooks.scrollTop=oe.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},_.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},_.fx=oe.prototype.init,_.fx.step={};var ie,se,ae=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function ce(){se&&(!1===y.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ce):r.setTimeout(ce,_.fx.interval),_.fx.tick())}function ue(){return r.setTimeout((function(){ie=void 0})),ie=Date.now()}function de(t,e){var n,r=0,o={height:t};for(e=e?1:0;r<4;r+=2-e)o["margin"+(n=it[r])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function he(t,e,n){for(var r,o=(pe.tweeners[e]||[]).concat(pe.tweeners["*"]),i=0,s=o.length;i1)},removeAttr:function(t){return this.each((function(){_.removeAttr(this,t)}))}}),_.extend({attr:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===t.getAttribute?_.prop(t,e,n):(1===i&&_.isXMLDoc(t)||(o=_.attrHooks[e.toLowerCase()]||(_.expr.match.bool.test(e)?me:void 0)),void 0!==n?null===n?void _.removeAttr(t,e):o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(r=o.get(t,e))?r:null==(r=_.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&A(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,o=e&&e.match(B);if(o&&1===t.nodeType)for(;n=o[r++];)t.removeAttribute(n)}}),me={set:function(t,e,n){return!1===e?_.removeAttr(t,n):t.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=fe[e]||_.find.attr;fe[e]=function(t,e,r){var o,i,s=e.toLowerCase();return r||(i=fe[s],fe[s]=o,o=null!=n(t,e,r)?s:null,fe[s]=i),o}}));var ge=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;function be(t){return(t.match(B)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(B)||[]}_.fn.extend({prop:function(t,e){return z(this,_.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[_.propFix[t]||t]}))}}),_.extend({prop:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&_.isXMLDoc(t)||(e=_.propFix[e]||e,o=_.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:t[e]=n:o&&"get"in o&&null!==(r=o.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=_.find.attr(t,"tabindex");return e?parseInt(e,10):ge.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(_.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_.propFix[this.toLowerCase()]=this})),_.fn.extend({addClass:function(t){var e,n,r,o,i,s;return v(t)?this.each((function(e){_(this).addClass(t.call(this,e,ye(this)))})):(e=we(t)).length?this.each((function(){if(r=ye(this),n=1===this.nodeType&&" "+be(r)+" "){for(i=0;i-1;)n=n.replace(" "+o+" "," ");s=be(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,o,i,s=typeof t,a="string"===s||Array.isArray(t);return v(t)?this.each((function(n){_(this).toggleClass(t.call(this,n,ye(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(i=_(this),o=0;o-1)return!0;return!1}});var xe=/\r/g;_.fn.extend({val:function(t){var e,n,r,o=this[0];return arguments.length?(r=v(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?t.call(this,n,_(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=_.map(o,(function(t){return null==t?"":t+""}))),(e=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=_.valHooks[o.type]||_.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(xe,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(t){var e=_.find.attr(t,"value");return null!=e?e:be(_.text(t))}},select:{get:function(t){var e,n,r,o=t.options,i=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?i+1:o.length;for(r=i<0?l:s?i:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),_.each(["radio","checkbox"],(function(){_.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=_.inArray(_(t).val(),e)>-1}},g.checkOn||(_.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in r;var Ne=/^(?:focusinfocus|focusoutblur)$/,Ee=function(t){t.stopPropagation()};_.extend(_.event,{trigger:function(t,e,n,o){var i,s,a,l,c,u,d,h,m=[n||y],f=p.call(t,"type")?t.type:t,g=p.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!Ne.test(f+_.event.triggered)&&(f.indexOf(".")>-1&&(g=f.split("."),f=g.shift(),g.sort()),c=f.indexOf(":")<0&&"on"+f,(t=t[_.expando]?t:new _.Event(f,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:_.makeArray(e,[t]),d=_.event.special[f]||{},o||!d.trigger||!1!==d.trigger.apply(n,e))){if(!o&&!d.noBubble&&!b(n)){for(l=d.delegateType||f,Ne.test(l+f)||(s=s.parentNode);s;s=s.parentNode)m.push(s),a=s;a===(n.ownerDocument||y)&&m.push(a.defaultView||a.parentWindow||r)}for(i=0;(s=m[i++])&&!t.isPropagationStopped();)h=s,t.type=i>1?l:d.bindType||f,(u=(J.get(s,"events")||Object.create(null))[t.type]&&J.get(s,"handle"))&&u.apply(s,e),(u=c&&s[c])&&u.apply&&K(s)&&(t.result=u.apply(s,e),!1===t.result&&t.preventDefault());return t.type=f,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(m.pop(),e)||!K(n)||c&&v(n[f])&&!b(n)&&((a=n[c])&&(n[c]=null),_.event.triggered=f,t.isPropagationStopped()&&h.addEventListener(f,Ee),n[f](),t.isPropagationStopped()&&h.removeEventListener(f,Ee),_.event.triggered=void 0,a&&(n[c]=a)),t.result}},simulate:function(t,e,n){var r=_.extend(new _.Event,n,{type:t,isSimulated:!0});_.event.trigger(r,null,e)}}),_.fn.extend({trigger:function(t,e){return this.each((function(){_.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return _.event.trigger(t,e,n,!0)}}),g.focusin||_.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){_.event.simulate(e,t.target,_.event.fix(t))};_.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,o=J.access(r,e);o||r.addEventListener(t,n,!0),J.access(r,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=J.access(r,e)-1;o?J.access(r,e,o):(r.removeEventListener(t,n,!0),J.remove(r,e))}}}));var _e=r.location,Te={guid:Date.now()},ke=/\?/;_.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||_.error("Invalid XML: "+(n?_.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Se=/\[\]$/,Ce=/\r?\n/g,Ze=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;function De(t,e,n,r){var o;if(Array.isArray(e))_.each(e,(function(e,o){n||Se.test(t)?r(t,o):De(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,r)}));else if(n||"object"!==N(e))r(t,e);else for(o in e)De(t+"["+o+"]",e[o],n,r)}_.param=function(t,e){var n,r=[],o=function(t,e){var n=v(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!_.isPlainObject(t))_.each(t,(function(){o(this.name,this.value)}));else for(n in t)De(n,t[n],e,o);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=_.prop(this,"elements");return t?_.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!_(this).is(":disabled")&&Ae.test(this.nodeName)&&!Ze.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,(function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}})):{name:e.name,value:n.replace(Ce,"\r\n")}})).get()}});var Pe=/%20/g,Oe=/#.*$/,Ie=/([?&])_=[^&]*/,Le=/^(.*?):[ \t]*([^\r\n]*)$/gm,je=/^(?:GET|HEAD)$/,Me=/^\/\//,Be={},$e={},Re="*/".concat("*"),Fe=y.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,o=0,i=e.toLowerCase().match(B)||[];if(v(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function He(t,e,n,r){var o={},i=t===$e;function s(a){var l;return o[a]=!0,_.each(t[a]||[],(function(t,a){var c=a(e,n,r);return"string"!=typeof c||i||o[c]?i?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),l}return s(e.dataTypes[0])||!o["*"]&&s("*")}function Ue(t,e){var n,r,o=_.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:r||(r={}))[n]=e[n]);return r&&_.extend(!0,t,r),t}Fe.href=_e.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,_.ajaxSettings),e):Ue(_.ajaxSettings,t)},ajaxPrefilter:qe(Be),ajaxTransport:qe($e),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o,i,s,a,l,c,u,d,h,p=_.ajaxSetup({},e),m=p.context||p,f=p.context&&(m.nodeType||m.jquery)?_(m):_.event,g=_.Deferred(),v=_.Callbacks("once memory"),b=p.statusCode||{},w={},x={},N="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Le.exec(i);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||N;return n&&n.abort(e),T(0,e),this}};if(g.promise(E),p.url=((t||p.url||_e.href)+"").replace(Me,_e.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Fe.protocol+"//"+Fe.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=_.param(p.data,p.traditional)),He(Be,p,e,E),c)return E;for(d in(u=_.event&&p.global)&&0==_.active++&&_.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!je.test(p.type),o=p.url.replace(Oe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Pe,"+")):(h=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(ke.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Ie,"$1"),h=(ke.test(o)?"&":"?")+"_="+Te.guid+++h),p.url=o+h),p.ifModified&&(_.lastModified[o]&&E.setRequestHeader("If-Modified-Since",_.lastModified[o]),_.etag[o]&&E.setRequestHeader("If-None-Match",_.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Re+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(m,E,p)||c))return E.abort();if(N="abort",v.add(p.complete),E.done(p.success),E.fail(p.error),n=He($e,p,e,E)){if(E.readyState=1,u&&f.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(a=r.setTimeout((function(){E.abort("timeout")}),p.timeout));try{c=!1,n.send(w,T)}catch(t){if(c)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,l){var d,h,y,w,x,N=e;c||(c=!0,a&&r.clearTimeout(a),n=void 0,i=l||"",E.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,o,i,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){l.unshift(o);break}if(l[0]in n)i=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){i=o;break}s||(s=o)}i=i||s}if(i)return i!==l[0]&&l.unshift(i),n[i]}(p,E,s)),!d&&_.inArray("script",p.dataTypes)>-1&&_.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(t,e,n,r){var o,i,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(i=u.shift();i;)if(t.responseFields[i]&&(n[t.responseFields[i]]=e),!l&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=i,i=u.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(!(s=c[l+" "+i]||c["* "+i]))for(o in c)if((a=o.split(" "))[1]===i&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(i=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+i}}}return{state:"success",data:e}}(p,w,E,d),d?(p.ifModified&&((x=E.getResponseHeader("Last-Modified"))&&(_.lastModified[o]=x),(x=E.getResponseHeader("etag"))&&(_.etag[o]=x)),204===t||"HEAD"===p.type?N="nocontent":304===t?N="notmodified":(N=w.state,h=w.data,d=!(y=w.error))):(y=N,!t&&N||(N="error",t<0&&(t=0))),E.status=t,E.statusText=(e||N)+"",d?g.resolveWith(m,[h,N,E]):g.rejectWith(m,[E,N,y]),E.statusCode(b),b=void 0,u&&f.trigger(d?"ajaxSuccess":"ajaxError",[E,p,d?h:y]),v.fireWith(m,[E,N]),u&&(f.trigger("ajaxComplete",[E,p]),--_.active||_.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return _.get(t,e,n,"json")},getScript:function(t,e){return _.get(t,void 0,e,"script")}}),_.each(["get","post"],(function(t,e){_[e]=function(t,n,r,o){return v(n)&&(o=o||r,r=n,n=void 0),_.ajax(_.extend({url:t,type:e,dataType:o,data:n,success:r},_.isPlainObject(t)&&t))}})),_.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),_._evalUrl=function(t,e,n){return _.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){_.globalEval(t,e,n)}})},_.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=_(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){_(this).wrapInner(t.call(this,e))})):this.each((function(){var e=_(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){_(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){_(this).replaceWith(this.childNodes)})),this}}),_.expr.pseudos.hidden=function(t){return!_.expr.pseudos.visible(t)},_.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var ze={0:200,1223:204},We=_.ajaxSettings.xhr();g.cors=!!We&&"withCredentials"in We,g.ajax=We=!!We,_.ajaxTransport((function(t){var e,n;if(g.cors||We&&!t.crossDomain)return{send:function(o,i){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),_.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return _.globalEval(t),t}}}),_.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),_.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,o){e=_("