diff --git a/js/dist/admin.js b/js/dist/admin.js index 443b93a..45fcad7 100755 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var o={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},d:(e,t)=>{for(var l in t)o.o(t,l)&&!o.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};(()=>{"use strict";o.r(e);const t=flarum.core.compat["admin/app"];var l=o.n(t);const n=flarum.extensions["fof-follow-tags"],s=flarum.core.compat["common/app"];var r=o.n(s),a=n.utils.followingPageOptions;const i=function(o){var e=a(o);return e.users=r().translator.trans("ianm-follow-users.lib.following_link"),e};l().initializers.add("ianm-follow-users",(function(){l().extensionData.for("ianm-follow-users").registerPermission({icon:"fas fa-user-friends",label:l().translator.trans("ianm-follow-users.admin.permissions.be_followed_label"),permission:"user.beFollowed"},"reply",95).registerSetting({label:l().translator.trans("ianm-follow-users.admin.settings.button-on-profile-label"),type:"bool",setting:"ianm-follow-users.button-on-profile"}).registerSetting({label:l().translator.trans("ianm-follow-users.admin.settings.stats-on-profile-label"),type:"bool",setting:"ianm-follow-users.stats-on-profile"}),l().initializers.has("fof/follow-tags")&&(n.utils.followingPageOptions=i,n.utils.followingPageOptions("admin.settings"))}))})(),module.exports=e})(); +(()=>{var o={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return o.d(s,{a:s}),s},d:(e,s)=>{for(var t in s)o.o(s,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)};(()=>{"use strict";const e=flarum.core.compat["admin/app"];var s=o.n(e);const t=flarum.extensions["fof-follow-tags"],l=flarum.core.compat["common/app"];var n=o.n(l),r=t.utils.followingPageOptions;const a=function(o){var e=r(o);return e.users=n().translator.trans("ianm-follow-users.lib.following_link"),e};s().initializers.add("ianm-follow-users",(function(){s().extensionData.for("ianm-follow-users").registerPermission({icon:"fas fa-user-friends",label:s().translator.trans("ianm-follow-users.admin.permissions.be_followed_label"),permission:"user.beFollowed"},"reply",95).registerSetting({label:s().translator.trans("ianm-follow-users.admin.settings.button-on-profile-label"),type:"bool",setting:"ianm-follow-users.button-on-profile"}).registerSetting({label:s().translator.trans("ianm-follow-users.admin.settings.stats-on-profile-label"),type:"bool",setting:"ianm-follow-users.stats-on-profile"}),s().initializers.has("fof/follow-tags")&&(t.utils.followingPageOptions=a,t.utils.followingPageOptions("admin.settings"))}))})(),module.exports={}})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 3b17b9d..3d7e9f8 100755 --- a/js/dist/admin.js.map +++ b/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,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOG,WAAW,mBCAjD,EAA+BH,OAAOC,KAAKC,OAAO,c,aCUlDE,EAAWC,EAAAA,MAAkBC,qBAGnC,iBAAgBC,GAEd,IAAMC,EAAUJ,EAASG,GAKzB,OAHAC,EAAQC,MAAQC,IAAAA,WAAeC,MAAM,wCAG9BH,CACR,ECjBDE,IAAAA,aAAiBE,IAAI,qBAAqB,WACxCF,IAAAA,cAAiB,IACV,qBACJG,mBACC,CACEC,KAAM,sBACNC,MAAOL,IAAAA,WAAeC,MAAM,yDAC5BK,WAAY,mBAEd,QACA,IAEDC,gBAAgB,CACfF,MAAOL,IAAAA,WAAeC,MAAM,4DAC5BO,KAAM,OACNC,QAAS,wCAEVF,gBAAgB,CACfF,MAAOL,IAAAA,WAAeC,MAAM,2DAC5BO,KAAM,OACNC,QAAS,uCAGTT,IAAAA,aAAiBU,IAAI,qBAEvBf,EAAAA,MAAkBC,qBAAuBA,EAEzCD,EAAAA,MAAkBC,qBAAqB,kBAE3C,G","sources":["webpack://@ianm/follow-users/webpack/bootstrap","webpack://@ianm/follow-users/webpack/runtime/compat get default export","webpack://@ianm/follow-users/webpack/runtime/define property getters","webpack://@ianm/follow-users/webpack/runtime/hasOwnProperty shorthand","webpack://@ianm/follow-users/webpack/runtime/make namespace object","webpack://@ianm/follow-users/external root \"flarum.core.compat['admin/app']\"","webpack://@ianm/follow-users/external assign \"flarum.extensions['fof-follow-tags']\"","webpack://@ianm/follow-users/external root \"flarum.core.compat['common/app']\"","webpack://@ianm/follow-users/./src/common/helpers/followingPageOptions.js","webpack://@ianm/follow-users/./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.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-follow-tags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\nimport * as follow_tags from '@fof-follow-tags';\n\n// We need to add options to the list of options available on the following page\n// As `follow_tags.utils.followingPageOptions` is a function, we cannot really\n// extend or override it with the Flarum helpers.\n// As the result of this function is cached after its first execution,\n// we can use the below version and execute this one to cache the desired options.\n\n// Save the reference to the original function, as it will be overriden\nconst original = follow_tags.utils.followingPageOptions;\n\n// Customized version of the helper with addition options for followed users\nexport default (section) => {\n // Get the original options\n const options = original(section);\n\n options.users = app.translator.trans('ianm-follow-users.lib.following_link');\n\n // Return the mutated options list\n return options;\n};\n","import app from 'flarum/admin/app';\nimport * as follow_tags from '@fof-follow-tags';\nimport followingPageOptions from '../common/helpers/followingPageOptions';\n\napp.initializers.add('ianm-follow-users', () => {\n app.extensionData\n .for('ianm-follow-users')\n .registerPermission(\n {\n icon: 'fas fa-user-friends',\n label: app.translator.trans('ianm-follow-users.admin.permissions.be_followed_label'),\n permission: 'user.beFollowed',\n },\n 'reply',\n 95\n )\n .registerSetting({\n label: app.translator.trans('ianm-follow-users.admin.settings.button-on-profile-label'),\n type: 'bool',\n setting: 'ianm-follow-users.button-on-profile',\n })\n .registerSetting({\n label: app.translator.trans('ianm-follow-users.admin.settings.stats-on-profile-label'),\n type: 'bool',\n setting: 'ianm-follow-users.stats-on-profile',\n });\n\n if (app.initializers.has('fof/follow-tags')) {\n // Replace the original function with our customized version\n follow_tags.utils.followingPageOptions = followingPageOptions;\n // Execute the customized helper to cache the returned list of options\n follow_tags.utils.followingPageOptions('admin.settings');\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","core","compat","extensions","original","follow_tags","followingPageOptions","section","options","users","app","trans","add","registerPermission","icon","label","permission","registerSetting","type","setting","has"],"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,I,mBCAlF,MAAM,EAA+BI,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOG,WAAW,mBCAjD,EAA+BH,OAAOC,KAAKC,OAAO,c,aCUlDE,EAAWC,EAAAA,MAAkBC,qBAGnC,iBAAgBC,GAEd,IAAMC,EAAUJ,EAASG,GAKzB,OAHAC,EAAQC,MAAQC,IAAAA,WAAeC,MAAM,wCAG9BH,CACR,ECjBDE,IAAAA,aAAiBE,IAAI,qBAAqB,WACxCF,IAAAA,cAAiB,IACV,qBACJG,mBACC,CACEC,KAAM,sBACNC,MAAOL,IAAAA,WAAeC,MAAM,yDAC5BK,WAAY,mBAEd,QACA,IAEDC,gBAAgB,CACfF,MAAOL,IAAAA,WAAeC,MAAM,4DAC5BO,KAAM,OACNC,QAAS,wCAEVF,gBAAgB,CACfF,MAAOL,IAAAA,WAAeC,MAAM,2DAC5BO,KAAM,OACNC,QAAS,uCAGTT,IAAAA,aAAiBU,IAAI,qBAEvBf,EAAAA,MAAkBC,qBAAuBA,EAEzCD,EAAAA,MAAkBC,qBAAqB,kBAE3C,G","sources":["webpack://@ianm/follow-users/webpack/bootstrap","webpack://@ianm/follow-users/webpack/runtime/compat get default export","webpack://@ianm/follow-users/webpack/runtime/define property getters","webpack://@ianm/follow-users/webpack/runtime/hasOwnProperty shorthand","webpack://@ianm/follow-users/external root \"flarum.core.compat['admin/app']\"","webpack://@ianm/follow-users/external assign \"flarum.extensions['fof-follow-tags']\"","webpack://@ianm/follow-users/external root \"flarum.core.compat['common/app']\"","webpack://@ianm/follow-users/./src/common/helpers/followingPageOptions.js","webpack://@ianm/follow-users/./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))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-follow-tags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\nimport * as follow_tags from '@fof-follow-tags';\n\n// We need to add options to the list of options available on the following page\n// As `follow_tags.utils.followingPageOptions` is a function, we cannot really\n// extend or override it with the Flarum helpers.\n// As the result of this function is cached after its first execution,\n// we can use the below version and execute this one to cache the desired options.\n\n// Save the reference to the original function, as it will be overriden\nconst original = follow_tags.utils.followingPageOptions;\n\n// Customized version of the helper with addition options for followed users\nexport default (section) => {\n // Get the original options\n const options = original(section);\n\n options.users = app.translator.trans('ianm-follow-users.lib.following_link');\n\n // Return the mutated options list\n return options;\n};\n","import app from 'flarum/admin/app';\nimport * as follow_tags from '@fof-follow-tags';\nimport followingPageOptions from '../common/helpers/followingPageOptions';\n\napp.initializers.add('ianm-follow-users', () => {\n app.extensionData\n .for('ianm-follow-users')\n .registerPermission(\n {\n icon: 'fas fa-user-friends',\n label: app.translator.trans('ianm-follow-users.admin.permissions.be_followed_label'),\n permission: 'user.beFollowed',\n },\n 'reply',\n 95\n )\n .registerSetting({\n label: app.translator.trans('ianm-follow-users.admin.settings.button-on-profile-label'),\n type: 'bool',\n setting: 'ianm-follow-users.button-on-profile',\n })\n .registerSetting({\n label: app.translator.trans('ianm-follow-users.admin.settings.stats-on-profile-label'),\n type: 'bool',\n setting: 'ianm-follow-users.stats-on-profile',\n });\n\n if (app.initializers.has('fof/follow-tags')) {\n // Replace the original function with our customized version\n follow_tags.utils.followingPageOptions = followingPageOptions;\n // Execute the customized helper to cache the returned list of options\n follow_tags.utils.followingPageOptions('admin.settings');\n }\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","flarum","core","compat","extensions","original","follow_tags","followingPageOptions","section","options","users","app","trans","add","registerPermission","icon","label","permission","registerSetting","type","setting","has"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index e0b5aab..6d82052 100755 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,3 @@ -(()=>{var t={195:(t,e,r)=>{t.exports=r(236)},252:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=e.parse=void 0,o(r(952),e);var s=r(952);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a(s).default}});var i=r(784);Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a(i).default}})},952:function(t,e){"use strict";var r=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,a=e.length;o":"child","<":"parent","~":"sibling","+":"adjacent"},i={"#":["id","equals"],".":["class","element"]},l=new Set(["has","not","matches","is","where","host","host-context"]),u=new Set(r(["descendant"],Object.keys(s).map((function(t){return s[t]})),!0)),c=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function f(t){return u.has(t.type)}e.isTraversal=f;var h=new Set(["contains","icontains"]),m=new Set(['"',"'"]);function p(t,e,r){var n=parseInt(e,16)-65536;return n!=n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function d(t){return t.replace(o,p)}function w(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function v(t,e,r,o){var u,p;void 0===r&&(r={});var g=[],b=!1;function _(t){var r=e.slice(o+t).match(n);if(!r)throw new Error("Expected name, found "+e.slice(o));var a=r[0];return o+=t+a.length,d(a)}function x(t){for(;w(e.charAt(o+t));)t++;o+=t}function L(t){for(var r=0;"\\"===e.charAt(--t);)r++;return 1==(1&r)}function F(){if(g.length>0&&f(g[g.length-1]))throw new Error("Did not expect successive traversals.")}for(x(0);""!==e;){var A=e.charAt(o);if(w(A))b=!0,x(1);else if(A in s)F(),g.push({type:s[A]}),b=!1,x(1);else if(","===A){if(0===g.length)throw new Error("Empty sub-selector");t.push(g),g=[],b=!1,x(1)}else if(e.startsWith("/*",o)){var C=e.indexOf("*/",o+2);if(C<0)throw new Error("Comment was not terminated");o=C+2}else if(b&&(F(),g.push({type:"descendant"}),b=!1),A in i){var O=i[A],j=O[0],k=O[1];g.push({type:"attribute",name:j,action:k,value:_(1),namespace:null,ignoreCase:!!r.xmlMode&&null})}else if("["===A){x(1);var E=null;"|"===e.charAt(o)&&(E="",o+=1),e.startsWith("*|",o)&&(E="*",o+=2);var P=_(0);null===E&&"|"===e.charAt(o)&&"="!==e.charAt(o+1)&&(E=P,P=_(1)),(null!==(u=r.lowerCaseAttributeNames)&&void 0!==u?u:!r.xmlMode)&&(P=P.toLowerCase()),x(0),k="exists";var S=a.get(e.charAt(o));if(S){if(k=S,"="!==e.charAt(o+1))throw new Error("Expected `=`");x(2)}else"="===e.charAt(o)&&(k="equals",x(1));var U="",N=null;if("exists"!==k){if(m.has(e.charAt(o))){for(var B=e.charAt(o),M=o+1;M0&&o0&&0===e.length)throw new Error("Empty sub-selector");t.push(e)}e.default=function(t,e){var r=[],n=v(r,""+t,e,0);if(n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return u(t.namespace)+"*";case"tag":return l(t);case"pseudo-element":return"::"+c(t.name);case"pseudo":return null===t.data?":"+c(t.name):"string"==typeof t.data?":"+c(t.name)+"("+c(t.data)+")":":"+c(t.name)+"("+a(t.data)+")";case"attribute":if("id"===t.name&&"equals"===t.action&&!t.ignoreCase&&!t.namespace)return"#"+c(t.value);if("class"===t.name&&"element"===t.action&&!t.ignoreCase&&!t.namespace)return"."+c(t.value);var e=l(t);return"exists"===t.action?"["+e+"]":"["+e+n[t.action]+"='"+c(t.value)+"'"+(t.ignoreCase?"i":!1===t.ignoreCase?"s":"")+"]"}}function l(t){return""+u(t.namespace)+c(t.name)}function u(t){return null!==t?("*"===t?"*":c(t))+"|":""}function c(t){return t.split("").map((function(t){return o.has(t)?"\\"+t:t})).join("")}e.default=a},236:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),s=new j(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===m)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw a;return E()}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var i=A(s,r);if(i){if(i===d)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var l=c(t,e,r);if("normal"===l.type){if(n=r.done?p:h,l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=p,r.method="throw",r.arg=l.arg)}}}(t,r,s),a}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",m="executing",p="completed",d={};function w(){}function v(){}function y(){}var g={};g[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(k([])));_&&_!==r&&n.call(_,a)&&(g=_);var x=y.prototype=w.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,a,s,i){var l=c(t[o],t,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,i)}),(function(t){r("throw",t,s,i)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,i)}))}i(l.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=c(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o=0;--a){var s=this.tryEntries[a],i=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(l&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{extend:()=>gt});const t=flarum.core.compat["forum/app"];var e=r.n(t);const o=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/components/NotificationGrid"];var s=r.n(a);function i(t,e,r,n,o,a,s){try{var i=t[a](s),l=i.value}catch(t){return void r(t)}i.done?e(l):Promise.resolve(l).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,l,"next",t)}function l(t){i(a,n,o,s,l,"throw",t)}s(void 0)}))}}var u=r(195),c=r.n(u);const f=flarum.core.compat["forum/utils/UserControls"];var h=r.n(f);const p=flarum.core.compat["common/components/Button"];var d=r.n(p);function w(){return w=Object.assign||function(t){for(var e=1;e1?n-1:0),a=1;a{var t={362:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=e.parse=void 0,o(r(761),e);var s=r(761);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a(s).default}});var i=r(519);Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a(i).default}})},761:function(t,e){"use strict";var r=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,a=e.length;o":"child","<":"parent","~":"sibling","+":"adjacent"},i={"#":["id","equals"],".":["class","element"]},l=new Set(["has","not","matches","is","where","host","host-context"]),u=new Set(r(["descendant"],Object.keys(s).map((function(t){return s[t]})),!0)),c=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function f(t){return u.has(t.type)}e.isTraversal=f;var p=new Set(["contains","icontains"]),m=new Set(['"',"'"]);function h(t,e,r){var n=parseInt(e,16)-65536;return n!=n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}function d(t){return t.replace(o,h)}function v(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function w(t,e,r,o){var u,h;void 0===r&&(r={});var g=[],b=!1;function _(t){var r=e.slice(o+t).match(n);if(!r)throw new Error("Expected name, found "+e.slice(o));var a=r[0];return o+=t+a.length,d(a)}function x(t){for(;v(e.charAt(o+t));)t++;o+=t}function L(t){for(var r=0;"\\"===e.charAt(--t);)r++;return!(1&~r)}function F(){if(g.length>0&&f(g[g.length-1]))throw new Error("Did not expect successive traversals.")}for(x(0);""!==e;){var A=e.charAt(o);if(v(A))b=!0,x(1);else if(A in s)F(),g.push({type:s[A]}),b=!1,x(1);else if(","===A){if(0===g.length)throw new Error("Empty sub-selector");t.push(g),g=[],b=!1,x(1)}else if(e.startsWith("/*",o)){var O=e.indexOf("*/",o+2);if(O<0)throw new Error("Comment was not terminated");o=O+2}else if(b&&(F(),g.push({type:"descendant"}),b=!1),A in i){var j=i[A],S=j[0],C=j[1];g.push({type:"attribute",name:S,action:C,value:_(1),namespace:null,ignoreCase:!!r.xmlMode&&null})}else if("["===A){x(1);var k=null;"|"===e.charAt(o)&&(k="",o+=1),e.startsWith("*|",o)&&(k="*",o+=2);var P=_(0);null===k&&"|"===e.charAt(o)&&"="!==e.charAt(o+1)&&(k=P,P=_(1)),(null!==(u=r.lowerCaseAttributeNames)&&void 0!==u?u:!r.xmlMode)&&(P=P.toLowerCase()),x(0),C="exists";var U=a.get(e.charAt(o));if(U){if(C=U,"="!==e.charAt(o+1))throw new Error("Expected `=`");x(2)}else"="===e.charAt(o)&&(C="equals",x(1));var E="",N=null;if("exists"!==C){if(m.has(e.charAt(o))){for(var M=e.charAt(o),B=o+1;B0&&o0&&0===e.length)throw new Error("Empty sub-selector");t.push(e)}e.default=function(t,e){var r=[],n=w(r,""+t,e,0);if(n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return u(t.namespace)+"*";case"tag":return l(t);case"pseudo-element":return"::"+c(t.name);case"pseudo":return null===t.data?":"+c(t.name):"string"==typeof t.data?":"+c(t.name)+"("+c(t.data)+")":":"+c(t.name)+"("+a(t.data)+")";case"attribute":if("id"===t.name&&"equals"===t.action&&!t.ignoreCase&&!t.namespace)return"#"+c(t.value);if("class"===t.name&&"element"===t.action&&!t.ignoreCase&&!t.namespace)return"."+c(t.value);var e=l(t);return"exists"===t.action?"["+e+"]":"["+e+n[t.action]+"='"+c(t.value)+"'"+(t.ignoreCase?"i":!1===t.ignoreCase?"s":"")+"]"}}function l(t){return""+u(t.namespace)+c(t.name)}function u(t){return null!==t?("*"===t?"*":c(t))+"|":""}function c(t){return t.split("").map((function(t){return o.has(t)?"\\"+t:t})).join("")}e.default=a},24:(t,e,r)=>{var n=r(735).default;function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},a=Object.prototype,s=a.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function m(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new E(n||[]);return i(a,"_invoke",{value:C(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=m;var d="suspendedStart",v="suspendedYield",w="executing",y="completed",g={};function b(){}function _(){}function x(){}var L={};p(L,u,(function(){return this}));var F=Object.getPrototypeOf,A=F&&F(F(N([])));A&&A!==a&&s.call(A,u)&&(L=A);var O=x.prototype=b.prototype=Object.create(L);function j(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,l){var u=h(t[o],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==n(f)&&s.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,l)}))}l(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function C(t,r,n){var o=d;return function(a,s){if(o===w)throw Error("Generator is already running");if(o===y){if("throw"===a)throw s;return{value:e,done:!0}}for(n.method=a,n.arg=s;;){var i=n.delegate;if(i){var l=k(i,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=w;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?y:v,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var s=a.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function U(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=s.call(a,"catchLoc"),u=s.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),U(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;U(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},735:t=>{function e(r){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},183:(t,e,r)=>{var n=r(24)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{extend:()=>gt});const t=flarum.core.compat["forum/app"];var e=r.n(t);const o=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/components/NotificationGrid"];var s=r.n(a);function i(t,e,r,n,o,a,s){try{var i=t[a](s),l=i.value}catch(t){return void r(t)}i.done?e(l):Promise.resolve(l).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,l,"next",t)}function l(t){i(a,n,o,s,l,"throw",t)}s(void 0)}))}}var u=r(183),c=r.n(u);const f=flarum.core.compat["forum/utils/UserControls"];var p=r.n(f);const h=flarum.core.compat["common/components/Button"];var d=r.n(h);function v(){return v=Object.assign?Object.assign.bind():function(t){for(var e=1;e1?n-1:0),a=1;a\": \"child\",\n \"<\": \"parent\",\n \"~\": \"sibling\",\n \"+\": \"adjacent\",\n};\nvar attribSelectors = {\n \"#\": [\"id\", \"equals\"],\n \".\": [\"class\", \"element\"],\n};\n// Pseudos, whose data property is parsed as well.\nvar unpackPseudos = new Set([\n \"has\",\n \"not\",\n \"matches\",\n \"is\",\n \"where\",\n \"host\",\n \"host-context\",\n]);\nvar traversalNames = new Set(__spreadArray([\n \"descendant\"\n], Object.keys(Traversals).map(function (k) { return Traversals[k]; }), true));\n/**\n * Attributes that are case-insensitive in HTML.\n *\n * @private\n * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors\n */\nvar caseInsensitiveAttributes = new Set([\n \"accept\",\n \"accept-charset\",\n \"align\",\n \"alink\",\n \"axis\",\n \"bgcolor\",\n \"charset\",\n \"checked\",\n \"clear\",\n \"codetype\",\n \"color\",\n \"compact\",\n \"declare\",\n \"defer\",\n \"dir\",\n \"direction\",\n \"disabled\",\n \"enctype\",\n \"face\",\n \"frame\",\n \"hreflang\",\n \"http-equiv\",\n \"lang\",\n \"language\",\n \"link\",\n \"media\",\n \"method\",\n \"multiple\",\n \"nohref\",\n \"noresize\",\n \"noshade\",\n \"nowrap\",\n \"readonly\",\n \"rel\",\n \"rev\",\n \"rules\",\n \"scope\",\n \"scrolling\",\n \"selected\",\n \"shape\",\n \"target\",\n \"text\",\n \"type\",\n \"valign\",\n \"valuetype\",\n \"vlink\",\n]);\n/**\n * Checks whether a specific selector is a traversal.\n * This is useful eg. in swapping the order of elements that\n * are not traversals.\n *\n * @param selector Selector to check.\n */\nfunction isTraversal(selector) {\n return traversalNames.has(selector.type);\n}\nexports.isTraversal = isTraversal;\nvar stripQuotesFromPseudos = new Set([\"contains\", \"icontains\"]);\nvar quotes = new Set(['\"', \"'\"]);\n// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152\nfunction funescape(_, escaped, escapedWhitespace) {\n var high = parseInt(escaped, 16) - 0x10000;\n // NaN means non-codepoint\n return high !== high || escapedWhitespace\n ? escaped\n : high < 0\n ? // BMP codepoint\n String.fromCharCode(high + 0x10000)\n : // Supplemental Plane codepoint (surrogate pair)\n String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);\n}\nfunction unescapeCSS(str) {\n return str.replace(reEscape, funescape);\n}\nfunction isWhitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\n/**\n * Parses `selector`, optionally with the passed `options`.\n *\n * @param selector Selector to parse.\n * @param options Options for parsing.\n * @returns Returns a two-dimensional array.\n * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),\n * the second contains the relevant tokens for that selector.\n */\nfunction parse(selector, options) {\n var subselects = [];\n var endIndex = parseSelector(subselects, \"\" + selector, options, 0);\n if (endIndex < selector.length) {\n throw new Error(\"Unmatched selector: \" + selector.slice(endIndex));\n }\n return subselects;\n}\nexports.default = parse;\nfunction parseSelector(subselects, selector, options, selectorIndex) {\n var _a, _b;\n if (options === void 0) { options = {}; }\n var tokens = [];\n var sawWS = false;\n function getName(offset) {\n var match = selector.slice(selectorIndex + offset).match(reName);\n if (!match) {\n throw new Error(\"Expected name, found \" + selector.slice(selectorIndex));\n }\n var name = match[0];\n selectorIndex += offset + name.length;\n return unescapeCSS(name);\n }\n function stripWhitespace(offset) {\n while (isWhitespace(selector.charAt(selectorIndex + offset)))\n offset++;\n selectorIndex += offset;\n }\n function isEscaped(pos) {\n var slashCount = 0;\n while (selector.charAt(--pos) === \"\\\\\")\n slashCount++;\n return (slashCount & 1) === 1;\n }\n function ensureNotTraversal() {\n if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {\n throw new Error(\"Did not expect successive traversals.\");\n }\n }\n stripWhitespace(0);\n while (selector !== \"\") {\n var firstChar = selector.charAt(selectorIndex);\n if (isWhitespace(firstChar)) {\n sawWS = true;\n stripWhitespace(1);\n }\n else if (firstChar in Traversals) {\n ensureNotTraversal();\n tokens.push({ type: Traversals[firstChar] });\n sawWS = false;\n stripWhitespace(1);\n }\n else if (firstChar === \",\") {\n if (tokens.length === 0) {\n throw new Error(\"Empty sub-selector\");\n }\n subselects.push(tokens);\n tokens = [];\n sawWS = false;\n stripWhitespace(1);\n }\n else if (selector.startsWith(\"/*\", selectorIndex)) {\n var endIndex = selector.indexOf(\"*/\", selectorIndex + 2);\n if (endIndex < 0) {\n throw new Error(\"Comment was not terminated\");\n }\n selectorIndex = endIndex + 2;\n }\n else {\n if (sawWS) {\n ensureNotTraversal();\n tokens.push({ type: \"descendant\" });\n sawWS = false;\n }\n if (firstChar in attribSelectors) {\n var _c = attribSelectors[firstChar], name_1 = _c[0], action = _c[1];\n tokens.push({\n type: \"attribute\",\n name: name_1,\n action: action,\n value: getName(1),\n namespace: null,\n // TODO: Add quirksMode option, which makes `ignoreCase` `true` for HTML.\n ignoreCase: options.xmlMode ? null : false,\n });\n }\n else if (firstChar === \"[\") {\n stripWhitespace(1);\n // Determine attribute name and namespace\n var namespace = null;\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = \"\";\n selectorIndex += 1;\n }\n if (selector.startsWith(\"*|\", selectorIndex)) {\n namespace = \"*\";\n selectorIndex += 2;\n }\n var name_2 = getName(0);\n if (namespace === null &&\n selector.charAt(selectorIndex) === \"|\" &&\n selector.charAt(selectorIndex + 1) !== \"=\") {\n namespace = name_2;\n name_2 = getName(1);\n }\n if ((_a = options.lowerCaseAttributeNames) !== null && _a !== void 0 ? _a : !options.xmlMode) {\n name_2 = name_2.toLowerCase();\n }\n stripWhitespace(0);\n // Determine comparison operation\n var action = \"exists\";\n var possibleAction = actionTypes.get(selector.charAt(selectorIndex));\n if (possibleAction) {\n action = possibleAction;\n if (selector.charAt(selectorIndex + 1) !== \"=\") {\n throw new Error(\"Expected `=`\");\n }\n stripWhitespace(2);\n }\n else if (selector.charAt(selectorIndex) === \"=\") {\n action = \"equals\";\n stripWhitespace(1);\n }\n // Determine value\n var value = \"\";\n var ignoreCase = null;\n if (action !== \"exists\") {\n if (quotes.has(selector.charAt(selectorIndex))) {\n var quote = selector.charAt(selectorIndex);\n var sectionEnd = selectorIndex + 1;\n while (sectionEnd < selector.length &&\n (selector.charAt(sectionEnd) !== quote ||\n isEscaped(sectionEnd))) {\n sectionEnd += 1;\n }\n if (selector.charAt(sectionEnd) !== quote) {\n throw new Error(\"Attribute value didn't end\");\n }\n value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));\n selectorIndex = sectionEnd + 1;\n }\n else {\n var valueStart = selectorIndex;\n while (selectorIndex < selector.length &&\n ((!isWhitespace(selector.charAt(selectorIndex)) &&\n selector.charAt(selectorIndex) !== \"]\") ||\n isEscaped(selectorIndex))) {\n selectorIndex += 1;\n }\n value = unescapeCSS(selector.slice(valueStart, selectorIndex));\n }\n stripWhitespace(0);\n // See if we have a force ignore flag\n var forceIgnore = selector.charAt(selectorIndex);\n // If the forceIgnore flag is set (either `i` or `s`), use that value\n if (forceIgnore === \"s\" || forceIgnore === \"S\") {\n ignoreCase = false;\n stripWhitespace(1);\n }\n else if (forceIgnore === \"i\" || forceIgnore === \"I\") {\n ignoreCase = true;\n stripWhitespace(1);\n }\n }\n // If `xmlMode` is set, there are no rules; otherwise, use the `caseInsensitiveAttributes` list.\n if (!options.xmlMode) {\n // TODO: Skip this for `exists`, as there is no value to compare to.\n ignoreCase !== null && ignoreCase !== void 0 ? ignoreCase : (ignoreCase = caseInsensitiveAttributes.has(name_2));\n }\n if (selector.charAt(selectorIndex) !== \"]\") {\n throw new Error(\"Attribute selector didn't terminate\");\n }\n selectorIndex += 1;\n var attributeSelector = {\n type: \"attribute\",\n name: name_2,\n action: action,\n value: value,\n namespace: namespace,\n ignoreCase: ignoreCase,\n };\n tokens.push(attributeSelector);\n }\n else if (firstChar === \":\") {\n if (selector.charAt(selectorIndex + 1) === \":\") {\n tokens.push({\n type: \"pseudo-element\",\n name: getName(2).toLowerCase(),\n });\n continue;\n }\n var name_3 = getName(1).toLowerCase();\n var data = null;\n if (selector.charAt(selectorIndex) === \"(\") {\n if (unpackPseudos.has(name_3)) {\n if (quotes.has(selector.charAt(selectorIndex + 1))) {\n throw new Error(\"Pseudo-selector \" + name_3 + \" cannot be quoted\");\n }\n data = [];\n selectorIndex = parseSelector(data, selector, options, selectorIndex + 1);\n if (selector.charAt(selectorIndex) !== \")\") {\n throw new Error(\"Missing closing parenthesis in :\" + name_3 + \" (\" + selector + \")\");\n }\n selectorIndex += 1;\n }\n else {\n selectorIndex += 1;\n var start = selectorIndex;\n var counter = 1;\n for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {\n if (selector.charAt(selectorIndex) === \"(\" &&\n !isEscaped(selectorIndex)) {\n counter++;\n }\n else if (selector.charAt(selectorIndex) === \")\" &&\n !isEscaped(selectorIndex)) {\n counter--;\n }\n }\n if (counter) {\n throw new Error(\"Parenthesis not matched\");\n }\n data = selector.slice(start, selectorIndex - 1);\n if (stripQuotesFromPseudos.has(name_3)) {\n var quot = data.charAt(0);\n if (quot === data.slice(-1) && quotes.has(quot)) {\n data = data.slice(1, -1);\n }\n data = unescapeCSS(data);\n }\n }\n }\n tokens.push({ type: \"pseudo\", name: name_3, data: data });\n }\n else {\n var namespace = null;\n var name_4 = void 0;\n if (firstChar === \"*\") {\n selectorIndex += 1;\n name_4 = \"*\";\n }\n else if (reName.test(selector.slice(selectorIndex))) {\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = \"\";\n selectorIndex += 1;\n }\n name_4 = getName(0);\n }\n else {\n /*\n * We have finished parsing the selector.\n * Remove descendant tokens at the end if they exist,\n * and return the last index, so that parsing can be\n * picked up from here.\n */\n if (tokens.length &&\n tokens[tokens.length - 1].type === \"descendant\") {\n tokens.pop();\n }\n addToken(subselects, tokens);\n return selectorIndex;\n }\n if (selector.charAt(selectorIndex) === \"|\") {\n namespace = name_4;\n if (selector.charAt(selectorIndex + 1) === \"*\") {\n name_4 = \"*\";\n selectorIndex += 2;\n }\n else {\n name_4 = getName(1);\n }\n }\n if (name_4 === \"*\") {\n tokens.push({ type: \"universal\", namespace: namespace });\n }\n else {\n if ((_b = options.lowerCaseTags) !== null && _b !== void 0 ? _b : !options.xmlMode) {\n name_4 = name_4.toLowerCase();\n }\n tokens.push({ type: \"tag\", name: name_4, namespace: namespace });\n }\n }\n }\n }\n addToken(subselects, tokens);\n return selectorIndex;\n}\nfunction addToken(subselects, tokens) {\n if (subselects.length > 0 && tokens.length === 0) {\n throw new Error(\"Empty sub-selector\");\n }\n subselects.push(tokens);\n}\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar actionTypes = {\n equals: \"\",\n element: \"~\",\n start: \"^\",\n end: \"$\",\n any: \"*\",\n not: \"!\",\n hyphen: \"|\",\n};\nvar charsToEscape = new Set(__spreadArray(__spreadArray([], Object.keys(actionTypes)\n .map(function (typeKey) { return actionTypes[typeKey]; })\n .filter(Boolean), true), [\n \":\",\n \"[\",\n \"]\",\n \" \",\n \"\\\\\",\n \"(\",\n \")\",\n \"'\",\n], false));\n/**\n * Turns `selector` back into a string.\n *\n * @param selector Selector to stringify.\n */\nfunction stringify(selector) {\n return selector.map(stringifySubselector).join(\", \");\n}\nexports.default = stringify;\nfunction stringifySubselector(token) {\n return token.map(stringifyToken).join(\"\");\n}\nfunction stringifyToken(token) {\n switch (token.type) {\n // Simple types\n case \"child\":\n return \" > \";\n case \"parent\":\n return \" < \";\n case \"sibling\":\n return \" ~ \";\n case \"adjacent\":\n return \" + \";\n case \"descendant\":\n return \" \";\n case \"universal\":\n return getNamespace(token.namespace) + \"*\";\n case \"tag\":\n return getNamespacedName(token);\n case \"pseudo-element\":\n return \"::\" + escapeName(token.name);\n case \"pseudo\":\n if (token.data === null)\n return \":\" + escapeName(token.name);\n if (typeof token.data === \"string\") {\n return \":\" + escapeName(token.name) + \"(\" + escapeName(token.data) + \")\";\n }\n return \":\" + escapeName(token.name) + \"(\" + stringify(token.data) + \")\";\n case \"attribute\": {\n if (token.name === \"id\" &&\n token.action === \"equals\" &&\n !token.ignoreCase &&\n !token.namespace) {\n return \"#\" + escapeName(token.value);\n }\n if (token.name === \"class\" &&\n token.action === \"element\" &&\n !token.ignoreCase &&\n !token.namespace) {\n return \".\" + escapeName(token.value);\n }\n var name_1 = getNamespacedName(token);\n if (token.action === \"exists\") {\n return \"[\" + name_1 + \"]\";\n }\n return \"[\" + name_1 + actionTypes[token.action] + \"='\" + escapeName(token.value) + \"'\" + (token.ignoreCase ? \"i\" : token.ignoreCase === false ? \"s\" : \"\") + \"]\";\n }\n }\n}\nfunction getNamespacedName(token) {\n return \"\" + getNamespace(token.namespace) + escapeName(token.name);\n}\nfunction getNamespace(namespace) {\n return namespace !== null\n ? (namespace === \"*\" ? \"*\" : escapeName(namespace)) + \"|\"\n : \"\";\n}\nfunction escapeName(str) {\n return str\n .split(\"\")\n .map(function (c) { return (charsToEscape.has(c) ? \"\\\\\" + c : c); })\n .join(\"\");\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\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].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _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}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nconst trans = (key) => (opts) => app.translator.trans(`ianm-follow-users.lib.follow_levels.${key}`, opts);\n\nexport const FollowLevels = Object.freeze([\n {\n value: 'unfollow',\n name: trans('unfollow.name'),\n description: trans('unfollow.description'),\n },\n {\n value: 'follow',\n name: trans('follow.name'),\n description: trans('follow.description'),\n },\n {\n value: 'lurk',\n name: trans('lurk.name'),\n description: trans('lurk.description'),\n },\n]);\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport User from 'flarum/common/models/User';\nimport Button from 'flarum/common/components/Button';\nimport Select from 'flarum/common/components/Select';\nimport { FollowLevels } from '../../common/FollowLevels';\n\nexport class SelectFollowUserTypeModal extends Modal {\n state = {\n /**\n * User being followed\n *\n * @type User | null\n */\n user: null,\n\n /**\n * Is the modal currently saving?\n *\n * @type boolean\n */\n saving: false,\n\n /**\n * Currently selected follow level.\n *\n * @type \"lurk\" | \"follow\" | \"unfollow\"\n * @example \"lurk\"\n */\n followState: undefined,\n };\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.state.user = this.attrs.user;\n\n this.state.followState = this.state.user.followed() || 'unfollow';\n }\n\n className = () => 'iam_follow_users-selectFollowLevelModal';\n\n title() {\n return this.trans('title', { username: {this.state.user?.displayName?.()} });\n }\n\n content() {\n // If `this.user` isn't a valid User, exit quickly to prevent complete forum errors.\n if (!(this.state.user instanceof User)) {\n // Show a more detailed error if this happens when the forum is in debug mode.\n return (\n
\n

{this.trans(`no_user_attr_provided_err${app.forum.attribute('debug') ? '_debug' : ''}`)}

\n
\n );\n }\n\n const user = this.state.user;\n\n const availableLevelOptions = FollowLevels.reduce((acc, curr) => ({ ...acc, [curr.value]: curr.name() }), {});\n const selectedLevel = FollowLevels.find((l) => l.value === this.state.followState);\n\n return (\n
\n
\n {this.trans('description', { user })}\n\n
\n \n\n \n\n {/* Helper text to describe the selected follow level */}\n

{selectedLevel.description({ user })}

\n
\n
\n
\n \n \n
\n
\n );\n }\n\n /**\n * Handles a change on the element and saves the new value to a class property.\n */\n onFollowLevelChange() {\n /**\n * @type HTMLInputElement\n */\n const selectElement = this.$('.Select-input')[0];\n\n this.state.followState = selectElement.value || 'unfollow';\n }\n\n /**\n * Helper for app.translator.trans, already including the initial keys up to `modals.select_follow_level`.\n */\n trans(key, ...opts) {\n return app.translator.trans(`ianm-follow-users.forum.modals.select_follow_level.${key}`, ...opts);\n }\n\n onsubmit() {\n this.saveFollowLevel();\n }\n\n /**\n * Sends the new follow state to the\n */\n async saveFollowLevel() {\n const newFollowState = this.state.followState === 'unfollow' ? null : this.state.followState;\n\n this.state.saving = true;\n\n // Exit early if level not changed\n if (this.state.user.attribute('following') === newFollowState) {\n this.hide();\n return;\n }\n\n const x = await this.state.user.save({ followUsers: newFollowState });\n\n this.hide();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserCard'];","import { parse as cssWhat, Selector } from 'css-what';\nimport type Mithril from 'mithril';\n\ntype VdomChildren = Mithril.Vnode> | Mithril.Vnode>[];\n\ntype ManipulationFunction = (vnode: Mithril.Vnode>) => void;\n\nexport function findAndRemoveFirstVdomChild(vdom: VdomChildren, selector: string): boolean {\n const node = findFirstVdomChild(vdom, selector);\n\n if (node === undefined) return false;\n\n // Set to empty fragment\n node.tag = '[';\n node.attrs = { removedViaVdomUtils: true };\n node.children = [];\n\n return true;\n}\n\nexport function findFirstVdomChild(\n vdom: VdomChildren,\n selector: string,\n manipulationFunc?: ManipulationFunction\n): Mithril.Vnode> | undefined {\n const parsedSelector = cssWhat(selector);\n\n return searchChildren(vdom, parsedSelector, manipulationFunc);\n}\n\nfunction searchChildren(\n vdom: (Mithril.Child | Mithril.Children)[] | (Mithril.Child | Mithril.Children),\n selectors: Selector[][],\n manipulationFunc?: ManipulationFunction\n): Mithril.Vnode> | undefined {\n let nodes: (Mithril.Child | Mithril.Children)[];\n\n if (!Array.isArray(vdom)) {\n nodes = [vdom];\n } else {\n nodes = vdom;\n }\n\n let found: Mithril.Vnode, {}> | undefined = undefined;\n\n nodes.some((node): boolean => {\n if (typeof node === 'boolean' || typeof node === 'number' || typeof node === 'string' || node === null || node === undefined) return false;\n\n if (Array.isArray(node)) {\n let result = searchChildren(node, selectors, manipulationFunc);\n\n if (result) {\n found = result;\n return true;\n }\n\n return false;\n }\n\n if (doesChildMatchSelectors(node, selectors)) {\n found = node;\n return true;\n }\n\n if (Array.isArray(node.children)) {\n let result = searchChildren(node.children, selectors);\n\n if (result) {\n found = result;\n return true;\n }\n\n return false;\n }\n\n return false;\n });\n\n if (manipulationFunc && found) manipulationFunc(found);\n\n return found;\n}\n\nfunction doesChildMatchSelectors(child: Mithril.Vnode>, selectors: Selector[][]): boolean {\n return selectors.some((selector) => {\n return selector.every((criterion): boolean => {\n switch (criterion.type) {\n case 'tag':\n return child.tag === criterion.name;\n\n case 'attribute':\n if (!child.attrs) return false;\n\n if (criterion.name === 'class') criterion.name = 'className';\n\n let attr = child.attrs[criterion.name];\n\n if (criterion.name === 'className' && typeof attr === 'string') {\n attr = attr.trim();\n }\n\n if (criterion.ignoreCase && typeof attr === 'string') {\n attr = attr.toLowerCase();\n criterion.value = criterion.value.toLowerCase();\n }\n\n switch (criterion.action) {\n case 'exists':\n return child.attrs.hasOwnProperty(criterion.name);\n case 'equals':\n return attr === criterion.value;\n case 'start':\n return attr?.startsWith?.(criterion.value) || false;\n case 'end':\n return attr?.endsWith?.(criterion.value) || false;\n case 'element':\n return (attr as string)?.split?.(' ')?.includes?.(criterion.value) || false;\n }\n }\n\n return false;\n });\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport { SelectFollowUserTypeModal } from './components/SelectFollowLevelModal';\nimport User from 'flarum/common/models/User';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport { findFirstVdomChild } from './util/findVdomChild';\n\n/**\n * Opens the SelectFollowLevelModal with the provided user.\n *\n * @param {User} user\n */\nfunction openFollowLevelModal(user) {\n if (!(user instanceof User)) return;\n\n app.modal.show(SelectFollowUserTypeModal, { user });\n}\n\nexport default function addFollowControls() {\n extend(UserControls, 'userControls', function (items, user) {\n const followingBlockingUser = !user.canBeFollowed() && user.followed();\n const icon = 'fas fa-user-friends';\n\n if (followingBlockingUser) {\n items.add(\n 'unfollow',\n {\n const x = await user.save({ followUsers: null });\n m.redraw();\n }}\n >\n {app.translator.trans('ianm-follow-users.forum.user_controls.unfollow_button')}\n \n );\n }\n\n if (\n !app.session.user ||\n app.session.user === user ||\n !user.canBeFollowed() ||\n followingBlockingUser ||\n (app.forum.attribute('ianm-follow-users.button-on-profile') &&\n !(app.current.data.routeName === 'fof_user_directory' && app.forum.attribute('userDirectorySmallCards')))\n ) {\n return;\n }\n\n items.add(\n 'follow',\n \n );\n });\n\n extend(UserCard.prototype, 'view', function (view) {\n const user = this.attrs.user;\n if (\n !app.forum.attribute('ianm-follow-users.button-on-profile') ||\n !app.session.user ||\n app.session.user === user ||\n !user.canBeFollowed() ||\n view.attrs.className.includes('UserCard--small')\n ) {\n return;\n }\n\n const followButton = (\n \n );\n\n findFirstVdomChild(view, '.UserCard-profile', (vdom) => {\n vdom.children.splice(2, 0, followButton);\n });\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewDiscussionNotification extends Notification {\n icon() {\n return 'fas fa-user-friends';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n return app.translator.trans('ianm-follow-users.forum.notifications.new_discussion_text', {\n user: this.attrs.notification.fromUser(),\n title: this.attrs.notification.subject().title(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'fas fa-user-friends';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n return app.translator.trans('ianm-follow-users.forum.notifications.new_post_text', {\n user: this.attrs.notification.fromUser(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewFollowerNotification extends Notification {\n icon() {\n return 'fas fa-user-plus';\n }\n\n href() {\n const notification = this.attrs.notification;\n const user = notification.subject();\n\n return app.route.user(user);\n }\n\n content() {\n return app.translator.trans('ianm-follow-users.forum.notifications.new_follower_text', {\n user: this.attrs.notification.fromUser(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewUnfollowerNotification extends Notification {\n icon() {\n return 'fas fa-user-minus';\n }\n\n href() {\n const notification = this.attrs.notification;\n const user = notification.subject();\n\n return app.route.user(user);\n }\n\n content() {\n return app.translator.trans('ianm-follow-users.forum.notifications.new_unfollower_text', {\n user: this.attrs.notification.fromUser(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-follow-tags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-user-directory'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","import app from 'flarum/common/app';\nimport * as follow_tags from '@fof-follow-tags';\n\n// We need to add options to the list of options available on the following page\n// As `follow_tags.utils.followingPageOptions` is a function, we cannot really\n// extend or override it with the Flarum helpers.\n// As the result of this function is cached after its first execution,\n// we can use the below version and execute this one to cache the desired options.\n\n// Save the reference to the original function, as it will be overriden\nconst original = follow_tags.utils.followingPageOptions;\n\n// Customized version of the helper with addition options for followed users\nexport default (section) => {\n // Get the original options\n const options = original(section);\n\n options.users = app.translator.trans('ianm-follow-users.lib.following_link');\n\n // Return the mutated options list\n return options;\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Separator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Placeholder'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport UserCard from 'flarum/forum/components/UserCard';\n\nexport default class FollowedUserListItem extends Component {\n view() {\n const { user } = this.attrs;\n\n return (\n
\n \n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","import app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport { SelectFollowUserTypeModal } from './SelectFollowLevelModal';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport FollowedUserListItem from './FollowedUserListItem';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class ProfilePage extends UserPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.refresh();\n }\n\n refresh() {\n this.loading = true;\n this.loadUser(app.session.user.username());\n this.followedUsers = app.session.user.followedUsers();\n\n this.loading = false;\n m.redraw();\n }\n\n changeUserFollowOptions(user) {\n app.modal.show(SelectFollowUserTypeModal, { user });\n }\n\n content() {\n if (this.loading) {\n return (\n
\n \n
\n );\n }\n\n if (this.followedUsers.length === 0) {\n return (\n
\n \n
\n );\n }\n\n return (\n
\n
    \n {this.followedUsers.map((user) => {\n return (\n
  • \n \n
  • \n );\n })}\n
\n
\n );\n }\n\n show() {\n this.user = app.session.user;\n\n m.redraw();\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport ProfilePage from './components/ProfilePage';\n\nexport default [\n new Extend.Model(User)\n .attribute('followed')\n .hasMany('followedUsers')\n .hasMany('followedBy')\n .attribute('blocksFollow')\n .attribute('canBeFollowed')\n .attribute('followingCount')\n .attribute('followerCount'),\n\n new Extend.Routes().add('user.followedUsers', '/u/:username/followedUsers', ProfilePage),\n];\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addFollowControls from './addFollowControls';\nimport addProfilePage from './addProfilePage';\nimport NewDiscussionNotification from './components/NewDiscussionNotification';\nimport NewPostNotification from './components/NewPostNotification';\nimport NewFollowerNotification from './components/NewFollowerNotification';\nimport NewUnfollowerNotification from './components/NewUnfollowerNotification';\nimport addFollowBadge from './addFollowBadge';\nimport addPrivacySetting from './addPrivacySetting';\nimport addFollowingUsers from './addFollowingUsers';\nimport addUserCardStats from './addUserCardStats';\n\nexport { default as extend } from './extend';\n\napp.initializers.add(\n 'ianm-follow-users',\n () => {\n addFollowControls();\n addProfilePage();\n addFollowBadge();\n addPrivacySetting();\n addFollowingUsers();\n addUserCardStats();\n\n app.notificationComponents.newFollower = NewFollowerNotification;\n app.notificationComponents.newUnfollower = NewUnfollowerNotification;\n app.notificationComponents.newDiscussionByUser = NewDiscussionNotification;\n app.notificationComponents.newPostByUser = NewPostNotification;\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('newFollower', {\n name: 'newFollower',\n icon: 'fas fa-user-plus',\n label: app.translator.trans('ianm-follow-users.forum.settings.notify_new_follower_label'),\n });\n items.add('newUnfollower', {\n name: 'newUnfollower',\n icon: 'fas fa-user-minus',\n label: app.translator.trans('ianm-follow-users.forum.settings.notify_new_unfollower_label'),\n });\n items.add('newDiscussionByUser', {\n name: 'newDiscussionByUser',\n icon: 'fas fa-user-friends',\n label: app.translator.trans('ianm-follow-users.forum.settings.notify_new_discussion_label'),\n });\n items.add('newPostByUser', {\n name: 'newPostByUser',\n icon: 'fas fa-user-friends',\n label: app.translator.trans('ianm-follow-users.forum.settings.notify_new_post_label'),\n });\n });\n },\n -1\n);\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport UserPage from 'flarum/forum/components/UserPage';\n\nexport default function () {\n extend(UserPage.prototype, 'navItems', function (items) {\n if (app.session.user && app.session.user === this.user) {\n const followedUsersCount = this.user.followingCount();\n\n items.add(\n 'followed-users',\n \n {app.translator.trans('ianm-follow-users.forum.profile_link')}\n {followedUsersCount}\n \n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport User from 'flarum/common/models/User';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addFollowBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.user()?.followed?.()) {\n badges.add(\n 'user-following',\n \n );\n }\n });\n\n extend(User.prototype, 'badges', function (badges) {\n if (this.followed()) {\n badges.add(\n 'user-following',\n \n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default function () {\n extend(SettingsPage.prototype, 'privacyItems', function (items) {\n items.add(\n 'follow-users-block',\n {\n this.blocksFollowLoading = true;\n\n this.user.savePreferences({ blocksFollow: value }).then(() => {\n this.blocksFollowLoading = false;\n m.redraw();\n });\n }}\n loading={this.blocksFollowLoading}\n >\n {app.translator.trans('ianm-follow-users.forum.settings.block_follow')}\n \n );\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport * as follow_tags from '@fof-follow-tags';\nimport * as user_directory from '@fof-user-directory';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport followingPageOptions from '../common/helpers/followingPageOptions';\nimport Separator from 'flarum/common/components/Separator';\n\nexport default function () {\n if (app.initializers.has('fof/follow-tags')) {\n // Replace the original function with our customized version\n follow_tags.utils.followingPageOptions = followingPageOptions;\n // Execute the customized helper to cache the returned list of options\n follow_tags.utils.followingPageOptions('forum.index.following');\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (!follow_tags.utils.isFollowingPage() || !app.session.user) return;\n\n if (!this.followTags) {\n this.followTags = follow_tags.utils.getDefaultFollowingFiltering();\n }\n\n const followTags = this.followTags;\n\n if (app.current.get('routeName') === 'following' && followTags === 'users') {\n params.filter['following-users'] = true;\n\n delete params.filter.subscription;\n }\n });\n }\n\n if (app.initializers.has('fof-user-directory')) {\n extend(user_directory.UserDirectoryPage.prototype, 'groupItems', function (items) {\n items.add(\n 'follow-users',\n user_directory.CheckableButton.component(\n {\n className: 'GroupFilterButton',\n icon: 'fas fa-user-friends',\n checked: this.enabledSpecialGroupFilters['ianm-follow-users'] === 'is:followeduser',\n onclick: () => {\n const id = 'ianm-follow-users';\n if (this.enabledSpecialGroupFilters[id] === 'is:followeduser') {\n this.enabledSpecialGroupFilters[id] = '';\n } else {\n this.enabledSpecialGroupFilters[id] = 'is:followeduser';\n }\n\n this.changeParams(this.params().sort);\n },\n },\n app.translator.trans('ianm-follow-users.forum.filter.following')\n ),\n 65\n );\n\n items.add('separator', , 50);\n });\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport app from 'flarum/forum/app';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport type Mithril from 'mithril';\n\nexport default function addUserCardStats() {\n extend(UserCard.prototype, 'infoItems', function (items: ItemList) {\n if (!this.attrs.user || !app.forum.attribute('ianm-follow-users.stats-on-profile')) return;\n\n const user = this.attrs.user;\n const followedUsersCount = user.followingCount();\n const followersUsersCount = user.followerCount();\n\n items.add(\n 'followers',\n
\n \n {icon('fas fa-user-friends')}\n {followedUsersCount} {' '}\n {app.translator.trans('ianm-follow-users.forum.followed', { count: followedUsersCount })}\n {followersUsersCount}{' '}\n {app.translator.trans('ianm-follow-users.forum.followers', { count: followersUsersCount })}\n \n
,\n 40\n );\n });\n}\n"],"names":["__createBinding","this","Object","create","o","m","k","k2","undefined","defineProperty","enumerable","get","__exportStar","exports","p","prototype","hasOwnProperty","call","__importDefault","mod","__esModule","value","stringify","parse","require","parse_1","stringify_1","__spreadArray","to","from","pack","arguments","length","ar","i","l","Array","slice","concat","isTraversal","reName","reEscape","actionTypes","Map","Traversals","attribSelectors","unpackPseudos","Set","traversalNames","keys","map","caseInsensitiveAttributes","selector","has","type","stripQuotesFromPseudos","quotes","funescape","_","escaped","escapedWhitespace","high","parseInt","String","fromCharCode","unescapeCSS","str","replace","isWhitespace","c","parseSelector","subselects","options","selectorIndex","_a","_b","tokens","sawWS","getName","offset","match","Error","name","stripWhitespace","charAt","isEscaped","pos","slashCount","ensureNotTraversal","firstChar","push","startsWith","endIndex","indexOf","_c","name_1","action","namespace","ignoreCase","xmlMode","name_2","lowerCaseAttributeNames","toLowerCase","possibleAction","quote","sectionEnd","valueStart","forceIgnore","attributeSelector","name_3","data","start","counter","quot","name_4","test","pop","addToken","lowerCaseTags","equals","element","end","any","not","hyphen","charsToEscape","typeKey","filter","Boolean","stringifySubselector","join","token","stringifyToken","getNamespace","getNamespacedName","escapeName","split","_typeof","_regeneratorRuntime","module","e","t","r","n","Symbol","a","iterator","asyncIterator","u","toStringTag","define","configurable","writable","wrap","Generator","Context","makeInvokeMethod","tryCatch","arg","h","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","key","obj","prop","flarum","core","compat","asyncGeneratorStep","_asyncToGenerator","apply","_next","_throw","_extends","assign","bind","_setPrototypeOf","_inheritsLoose","trans","opts","app","FollowLevels","freeze","description","SelectFollowUserTypeModal","_Modal","_this","_len","args","_key","state","user","saving","followState","className","_proto","oninit","vnode","attrs","followed","title","_this$state$user","username","content","_this2","User","class","attribute","availableLevelOptions","reduce","acc","curr","_extends2","selectedLevel","find","for","Select","disabled","id","onchange","onFollowLevelChange","Button","onclick","hide","saveFollowLevel","loading","selectElement","$","_app$translator","_len2","_key2","onsubmit","_saveFollowLevel","_callee","newFollowState","_context","save","followUsers","Modal","findFirstVdomChild","vdom","manipulationFunc","searchChildren","cssWhat","selectors","nodes","isArray","found","some","node","result","child","every","criterion","_attr","_attr2","_attr3","tag","attr","trim","endsWith","includes","doesChildMatchSelectors","children","openFollowLevelModal","show","NewDiscussionNotification","_Notification","icon","href","discussion","notification","subject","fromUser","excerpt","Notification","NewPostNotification","postNumber","NewFollowerNotification","NewUnfollowerNotification","extensions","original","follow_tags","followingPageOptions","section","users","FollowedUserListItem","_Component","view","UserCard","controlsButtonClassName","Component","ProfilePage","_UserPage","refresh","loadUser","followedUsers","redraw","changeUserFollowOptions","LoadingIndicator","Placeholder","text","UserPage","Extend","hasMany","add","extend","UserControls","items","followingBlockingUser","canBeFollowed","routeName","followButton","splice","followedUsersCount","followingCount","LinkButton","slug","Discussion","badges","_this$user","Badge","label","SettingsPage","Switch","preferences","blocksFollow","blocksFollowLoading","savePreferences","DiscussionListState","params","isFollowingPage","followTags","getDefaultFollowingFiltering","subscription","user_directory","component","checked","enabledSpecialGroupFilters","changeParams","sort","Separator","followersUsersCount","followerCount","count","newFollower","newUnfollower","newDiscussionByUser","newPostByUser","NotificationGrid"],"sourceRoot":""} \ No newline at end of file