diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 47e938e..75af161 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":";2BAAAA,EAAOC,QAAU,EAAjBD,cCOA,IAAIE,EAAW,SAAUD,GACvB,aAEA,IAEIE,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,CAAC,EACnDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,EACZ,CACD,IAEEF,EAAO,CAAC,EAAG,GACZ,CAAC,MAAOQ,GACPR,EAAS,SAASC,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,CACnB,CACF,CAED,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IAMzC,OAFAG,EAAUI,QAuMZ,SAA0BV,EAASE,EAAMM,GACvC,IAAIG,EAAQC,EAEZ,OAAO,SAAgBC,EAAQC,GAC7B,GAAIH,IAAUI,EACZ,MAAM,IAAIC,MAAM,gCAGlB,GAAIL,IAAUM,EAAmB,CAC/B,GAAe,UAAXJ,EACF,MAAMC,EAKR,OAAOI,GACR,CAKD,IAHAV,EAAQK,OAASA,EACjBL,EAAQM,IAAMA,IAED,CACX,IAAIK,EAAWX,EAAQW,SACvB,GAAIA,EAAU,CACZ,IAAIC,EAAiBC,EAAoBF,EAAUX,GACnD,GAAIY,EAAgB,CAClB,GAAIA,IA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AAAA,QACDtC,IAAI,uBAAwBiC,GAE/B,IAAIK,IAAAA,OAAaC,KACdC,OAAO,YACPzG,UAAmB,qBAEtB,IAAIuG,IAAAA,OAAaG,KACdC,QAAkB,uBAErB,IAAIJ,IAAAA,OAAaK,MACd5G,UAAkB,wBAClBA,UAAkB,4BCjBvB,GAAe,UAAI6G,ICQnB9G,IAAAA,aAAiBkE,IAAI,2BAA2B,WAC9ClE,IAAAA,cAAA,IACO,2BACJ+G,aAAatF,GACbuF,mBACC,CACEC,WAAY,oCACZ5C,KAAM,eACNvB,MAAO9C,IAAAA,WAAe+C,MAAM,0EAE9B,WACA,IAEDiE,mBACC,CACE3C,KAAM,eACNvB,MAAO9C,IAAAA,WAAe+C,MAAM,yEAC5BC,QAAS,WACP,IAAMkE,EAAUC,SAASnH,IAAAA,KAASoH,SAAS,kDAE3C,OAAOC,IAAAA,UAA0B,CAC/BC,aAAcJ,EACVlH,IAAAA,WAAe+C,MAAM,4DAA6D,CAAEwE,MAAOL,IAC3FlH,IAAAA,WAAe+C,MAAM,6DACzBtN,IAAK,gDACLsO,QAAS,CACP,CAAErO,MAAO,KAAMoN,MAAO9C,IAAAA,WAAe+C,MAAM,8DAC3C,CAAErN,MAAO,KAAMoN,MAAO9C,IAAAA,WAAe+C,MAAM,6DAC3C,CAAErN,MAAO,QAASoN,MAAO9C,IAAAA,WAAe+C,MAAM,+DAGnD,GAEH,QACA,GAEL","sources":["webpack://@fof/discussion-language/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/discussion-language/./node_modules/regenerator-runtime/runtime.js","webpack://@fof/discussion-language/./node_modules/twemoji-basename/index.js","webpack://@fof/discussion-language/webpack/bootstrap","webpack://@fof/discussion-language/webpack/runtime/compat get default export","webpack://@fof/discussion-language/webpack/runtime/define property getters","webpack://@fof/discussion-language/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/discussion-language/webpack/runtime/make namespace object","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/components/SettingDropdown']\"","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Select']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/discussion-language/./src/admin/utils/locales.js","webpack://@fof/discussion-language/./src/admin/utils/loadAsset.ts","webpack://@fof/discussion-language/./src/admin/utils/countries.ts","webpack://@fof/discussion-language/./src/admin/components/LanguagesSettingsPage.tsx","webpack://@fof/discussion-language/./src/admin/components/index.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/discussion-language/./src/admin/utils/index.js","webpack://@fof/discussion-language/./src/common/utils/index.js","webpack://@fof/discussion-language/./src/common/utils/flag.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/discussion-language/./src/common/models/Language.ts","webpack://@fof/discussion-language/./src/common/models/index.ts","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@fof/discussion-language/./src/common/extend.ts","webpack://@fof/discussion-language/./src/admin/extend.ts","webpack://@fof/discussion-language/./src/admin/index.js"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\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 define(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 = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(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 define(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 define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(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, in modern engines\n // we can explicitly access globalThis. In older engines 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 if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\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](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['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/SettingDropdown'];","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}","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['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","import loadAsset from './loadAsset';\n\nlet ISO6392;\n\nexport const load = async () => {\n ISO6392 = await loadAsset('iso-639-2.json');\n\n return ISO6392;\n};\n\nexport const getNameColumn = (data, native) => (native && data?.['Native name(s)']) || data?.['Language name(s)'];\n\nexport default (native) =>\n Array.from(Object.values(ISO6392 || {}))\n ?.sort((a, b) => getNameColumn(a, native)?.toLowerCase() > getNameColumn(b, native)?.toLowerCase())\n .reduce((o, data) => {\n o[data['639-1'] || data['639-2']] = getNameColumn(data, native);\n\n return o;\n }, {});\n\nexport const getName = (code, native) =>\n getNameColumn(\n ISO6392?.find((data) => [data['639-1'] || data['639-2']].includes(code)),\n native\n );\n","import app from 'flarum/admin/app';\n\nexport default async function loadAsset(name: string): Promise {\n const URL = `${app.forum.attribute('baseUrl')}/assets/extensions/fof-discussion-language/${name}`;\n\n const response = await fetch(URL);\n\n if (!response.ok) {\n if (response.status === 404) {\n throw new Error(`Missing asset (\\`${name}\\`): ${URL}`);\n }\n }\n\n return await response.json();\n}\n","import loadAsset from './loadAsset';\n\nlet countries: undefined | Record>;\n\nexport const load = async () => {\n countries = await loadAsset('countries.json');\n\n return countries;\n};\n\nexport default function getCountries(useNativeName: boolean) {\n if (!countries) return {};\n\n const key = useNativeName ? 'native' : 'name';\n\n return Object.entries(countries).reduce(\n (acc, [code, info]) => {\n acc[code] = info[key];\n\n return acc;\n },\n {} as Record\n );\n}\n\nexport const getEmoji = (code: string) => countries?.[code]?.emoji;\n","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport Select from 'flarum/common/components/Select';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport icon from 'flarum/common/helpers/icon';\nimport Stream from 'flarum/common/utils/Stream';\nimport Alert from 'flarum/common/components/Alert';\nimport getLocales, * as locales from '../utils/locales';\nimport getCountries, * as countries from '../utils/countries';\nimport Language from '../../common/models/Language';\n\nimport type Mithril from 'mithril';\n\nexport default class LanguagesSettingsPage extends ExtensionPage {\n recordsUpdating: Record = {};\n recordsDeleting: Record = {};\n\n newLocaleValue = Stream('');\n newCountryValue = Stream('');\n\n loadingData: boolean = true;\n loadingDataError: boolean = false;\n\n errorDetails: null | Error = null;\n\n isAddingNewRecord: boolean = false;\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.loadData();\n }\n\n async loadData() {\n this.loadingData = true;\n this.loadingDataError = false;\n\n m.redraw();\n\n try {\n await Promise.all([locales.load(), countries.load()]);\n\n this.loadingData = false;\n this.loadingDataError = false;\n\n m.redraw();\n } catch (e) {\n console.error(e);\n\n this.loadingData = false;\n this.loadingDataError = true;\n this.errorDetails = e as Error;\n\n m.redraw();\n }\n }\n\n content(vnode: Mithril.VnodeDOM) {\n return (\n
\n
\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.native_label'),\n setting: 'fof-discussion-language.native',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.show_flag_label'),\n setting: 'fof-discussion-language.showFlags',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.composer_default_label'),\n setting: 'fof-discussion-language.composerLocaleDefault',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.locale_sort_label'),\n setting: 'fof-discussion-language.filter_language_on_http_request',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.show_any_lang_opt_label'),\n setting: 'fof-discussion-language.showAnyLangOpt',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.tags_page_discussion_locale_label'),\n setting: 'fof-discussion-language.useLocaleForTagsPageLastDiscussion',\n })}\n
\n\n {this.submitButton(vnode)}\n\n
\n\n {this.localeSettings()}\n\n

\n This extension uses material from the Wikipedia article{' '}\n \n List of ISO 639-2 Codes\n \n , which is released under the{' '}\n Creative Commons Attribution-Share-Alike License 3.0.\n

\n
\n
\n );\n }\n\n localeSettings() {\n if (this.loadingData) return ;\n\n if (this.loadingDataError) {\n return (\n \n {app.translator.trans('fof-discussion-language.admin.settings.errors.missing_assets')}\n
\n Error: {this.errorDetails?.message}\n
\n );\n }\n\n const nativeNames = !!Number(this.setting('fof-discussion-language.native')());\n\n const locales = getLocales(nativeNames);\n const countryData = getCountries(nativeNames);\n\n return (\n <>\n
\n {app.translator.trans('fof-discussion-language.admin.settings.config.language_label')}\n {app.translator.trans('fof-discussion-language.admin.settings.config.country_label')}\n \n \n
\n
\n {Select.component({\n onchange: this.newLocaleValue,\n value: this.newLocaleValue(),\n options: locales,\n })}\n\n {Select.component({\n onchange: this.newCountryValue,\n value: this.newCountryValue(),\n options: countryData,\n })}\n\n {Button.component(\n {\n className: 'Button Button--primary',\n onclick: this.add.bind(this),\n disabled: !this.newLocaleValue() || !this.newCountryValue() || this.isAddingNewRecord,\n },\n icon(this.isAddingNewRecord ? 'fas fa-spinner fa-spin' : 'fas fa-plus')\n )}\n
\n\n
\n {app.store.all('discussion-languages').map((language) => {\n const id = language.id();\n\n const updating = this.recordsUpdating[id];\n const deleting = this.recordsDeleting[id];\n\n const country = language.country();\n\n return (\n
\n {Select.component({\n onchange: (val: string) => {\n this.recordsUpdating[id!] = true;\n\n language\n .save({\n code: val,\n })\n .then(() => {\n this.recordsUpdating[id!] = false;\n m.redraw();\n });\n },\n value: language.code(),\n options: locales,\n disabled: updating || deleting,\n })}\n\n {Select.component({\n onchange: (val: string) => {\n this.recordsUpdating[id!] = true;\n\n language\n .save({\n country: val,\n })\n .then(() => {\n this.recordsUpdating[id!] = false;\n m.redraw();\n });\n },\n value: country,\n options: countryData,\n disabled: updating || deleting,\n })}\n\n {Button.component(\n {\n className: `Button Button--danger`,\n disabled: deleting,\n onclick: this.remove.bind(this, language),\n },\n icon(deleting ? 'fas fa-spinner fa-spin' : 'fas fa-times')\n )}\n
\n );\n })}\n
\n \n );\n }\n\n onkeydown(e) {\n if (e.key === 'Enter') {\n this.add();\n e.preventDefault();\n }\n }\n\n add() {\n if (this.isAddingNewRecord || !this.newLocaleValue()) return;\n\n this.isAddingNewRecord = true;\n\n const code = this.newLocaleValue();\n const country = this.newCountryValue();\n const language = app.store.createRecord('discussion-languages');\n\n language\n .save({ code, country })\n .then(() => {\n this.newLocaleValue('');\n this.newCountryValue('');\n })\n .catch(() => {})\n .finally(() => {\n this.isAddingNewRecord = false;\n m.redraw();\n });\n }\n\n remove(language) {\n this.recordsDeleting[language.id()] = true;\n\n language\n .delete()\n .then(\n () => {},\n () => {}\n )\n .then(() => {\n delete this.recordsDeleting[language.id()];\n m.redraw();\n });\n }\n}\n","import LanguagesSettingsPage from './LanguagesSettingsPage';\n\nexport const components = {\n LanguagesSettingsPage,\n};\n","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}","import getCountry, * as countries from './countries';\nimport locales, { getName } from './locales';\nimport { utils as commonUtils } from '../../common/utils';\n\nexport const utils = {\n getCountry,\n countries,\n locales,\n getName,\n ...commonUtils,\n};\n","import flag from './flag';\n\nexport const utils = {\n flag,\n};\n","import basename from 'twemoji-basename';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default (language) => {\n if (!language) return;\n\n const emoji = language.emoji ? language.emoji() : language;\n\n return emoji ? (\n \n ) : (\n icon('fas fa-globe')\n );\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class Language extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n code() {\n return Model.attribute('code').call(this);\n }\n\n country() {\n return Model.attribute('country').call(this);\n }\n\n name() {\n return Model.attribute('name').call(this);\n }\n\n emoji() {\n return Model.attribute('emoji').call(this);\n }\n\n apiEndpoint() {\n return `/fof/discussion-language${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Language from './Language';\n\nexport const models = {\n Language,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Forum'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","import Extend from 'flarum/common/extenders';\nimport Language from '../common/models/Language';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Forum from 'flarum/common/models/Forum';\nimport Tag from 'flarum/tags/common/models/Tag';\n\nexport default [\n new Extend.Store() //\n .add('discussion-languages', Language),\n\n new Extend.Model(Discussion) //\n .hasOne('language')\n .attribute('canChangeLanguage'),\n\n new Extend.Model(Forum) //\n .hasMany('discussionLanguages'),\n\n new Extend.Model(Tag) //\n .attribute('subscriptionLanguage')\n .attribute('localisedLastDiscussion'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/admin/app';\nimport SettingDropdown from 'flarum/admin/components/SettingDropdown';\n\nimport LanguagesSettingsPage from './components/LanguagesSettingsPage';\n\nexport * from './components';\nexport * from './utils';\nexport * from '../common/models';\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/discussion-language', () => {\n app.extensionData\n .for('fof-discussion-language')\n .registerPage(LanguagesSettingsPage)\n .registerPermission(\n {\n permission: 'discussion.changeLanguageModerate',\n icon: 'fas fa-globe',\n label: app.translator.trans('fof-discussion-language.admin.permissions.allow_change_language_label'),\n },\n 'moderate',\n 65\n )\n .registerPermission(\n {\n icon: 'fas fa-globe',\n label: app.translator.trans('fof-discussion-language.admin.permissions.allow_change_language_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings['fof-discussion-language.allow_language_change']);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', { count: minutes })\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'fof-discussion-language.allow_language_change',\n options: [\n { value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button') },\n { value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button') },\n { value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button') },\n ],\n });\n },\n },\n 'start',\n 65\n );\n});\n"],"names":["module","exports","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","str","r","c","p","l","charCodeAt","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","flarum","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","_setPrototypeOf","_inheritsLoose","subClass","superClass","ISO6392","loadAsset","URL","app","attribute","fetch","response","ok","status","json","load","getNameColumn","data","native","Array","from","sort","b","toLowerCase","reduce","countries","getCountries","useNativeName","entries","acc","code","getEmoji","emoji","LanguagesSettingsPage","recordsUpdating","recordsDeleting","newLocaleValue","Stream","newCountryValue","loadingData","loadingDataError","errorDetails","isAddingNewRecord","oncreate","vnode","loadData","m","redraw","all","locales","console","content","className","buildSettingComponent","label","trans","setting","submitButton","localeSettings","href","target","rel","dismissible","message","nativeNames","Number","getLocales","countryData","style","Select","onchange","options","Button","onclick","add","bind","disabled","icon","map","language","id","updating","deleting","country","val","save","remove","onkeydown","e","preventDefault","createRecord","ExtensionPage","components","_extends","assign","source","utils","getCountry","getName","find","includes","flag","alt","draggable","loading","src","basename","Language","Model","apiEndpoint","exists","models","Extend","Discussion","hasOne","Forum","hasMany","Tag","commonExtend","registerPage","registerPermission","permission","minutes","parseInt","settings","SettingDropdown","defaultLabel","count"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":";2BAAAA,EAAOC,QAAU,EAAjBD,cCOA,IAAIE,EAAW,SAAUD,GACvB,aAEA,IAEIE,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,CAAC,EACnDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAO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I,IAAAA,WAAe6D,MAAM,6DACzB1O,IAAK,gDACL+P,QAAS,CACP,CAAE9P,MAAO,KAAMwO,MAAO5D,IAAAA,WAAe6D,MAAM,8DAC3C,CAAEzO,MAAO,KAAMwO,MAAO5D,IAAAA,WAAe6D,MAAM,6DAC3C,CAAEzO,MAAO,QAASwO,MAAO5D,IAAAA,WAAe6D,MAAM,+DAGpD,GAEF,QACA,GAEN","sources":["webpack://@fof/discussion-language/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/discussion-language/./node_modules/regenerator-runtime/runtime.js","webpack://@fof/discussion-language/./node_modules/twemoji-basename/index.js","webpack://@fof/discussion-language/webpack/bootstrap","webpack://@fof/discussion-language/webpack/runtime/compat get default export","webpack://@fof/discussion-language/webpack/runtime/define property getters","webpack://@fof/discussion-language/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/discussion-language/webpack/runtime/make namespace object","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/components/SettingDropdown']\"","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Select']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/discussion-language/./src/admin/utils/locales.js","webpack://@fof/discussion-language/./src/admin/utils/loadAsset.ts","webpack://@fof/discussion-language/./src/admin/utils/countries.ts","webpack://@fof/discussion-language/./src/admin/components/LanguagesSettingsPage.tsx","webpack://@fof/discussion-language/./src/admin/components/index.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/discussion-language/./src/admin/utils/index.js","webpack://@fof/discussion-language/./src/common/utils/index.js","webpack://@fof/discussion-language/./src/common/utils/flag.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/discussion-language/./src/common/models/Language.ts","webpack://@fof/discussion-language/./src/common/models/index.ts","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@fof/discussion-language/./src/common/extend.ts","webpack://@fof/discussion-language/./src/admin/extend.ts","webpack://@fof/discussion-language/./src/admin/index.js"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\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 define(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 = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(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 define(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 define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(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, in modern engines\n // we can explicitly access globalThis. In older engines 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 if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\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](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['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/SettingDropdown'];","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}","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['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","import loadAsset from './loadAsset';\n\nlet ISO6392;\n\nexport const load = async () => {\n ISO6392 = await loadAsset('iso-639-2.json');\n\n return ISO6392;\n};\n\nexport const getNameColumn = (data, native) => (native && data?.['Native name(s)']) || data?.['Language name(s)'];\n\nexport default (native) =>\n Array.from(Object.values(ISO6392 || {}))\n ?.sort((a, b) => getNameColumn(a, native)?.toLowerCase() > getNameColumn(b, native)?.toLowerCase())\n .reduce((o, data) => {\n o[data['639-1'] || data['639-2']] = getNameColumn(data, native);\n\n return o;\n }, {});\n\nexport const getName = (code, native) =>\n getNameColumn(\n ISO6392?.find((data) => [data['639-1'] || data['639-2']].includes(code)),\n native\n );\n","import app from 'flarum/admin/app';\n\nexport default async function loadAsset(name: string): Promise {\n const URL = `${app.forum.attribute('baseUrl')}/assets/extensions/fof-discussion-language/${name}`;\n\n const response = await fetch(URL);\n\n if (!response.ok) {\n if (response.status === 404) {\n throw new Error(`Missing asset (\\`${name}\\`): ${URL}`);\n }\n }\n\n return await response.json();\n}\n","import loadAsset from './loadAsset';\n\nlet countries: undefined | Record>;\n\nexport const load = async () => {\n countries = await loadAsset('countries.json');\n\n return countries;\n};\n\nexport default function getCountries(useNativeName: boolean) {\n if (!countries) return {};\n\n const key = useNativeName ? 'native' : 'name';\n\n return Object.entries(countries).reduce(\n (acc, [code, info]) => {\n acc[code] = info[key];\n\n return acc;\n },\n {} as Record\n );\n}\n\nexport const getEmoji = (code: string) => countries?.[code]?.emoji;\n","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport Select from 'flarum/common/components/Select';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport icon from 'flarum/common/helpers/icon';\nimport Stream from 'flarum/common/utils/Stream';\nimport Alert from 'flarum/common/components/Alert';\nimport getLocales, * as locales from '../utils/locales';\nimport getCountries, * as countries from '../utils/countries';\nimport Language from '../../common/models/Language';\n\nimport type Mithril from 'mithril';\n\nexport default class LanguagesSettingsPage extends ExtensionPage {\n recordsUpdating: Record = {};\n recordsDeleting: Record = {};\n\n newLocaleValue = Stream('');\n newCountryValue = Stream('');\n\n loadingData: boolean = true;\n loadingDataError: boolean = false;\n\n errorDetails: null | Error = null;\n\n isAddingNewRecord: boolean = false;\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.loadData();\n }\n\n async loadData() {\n this.loadingData = true;\n this.loadingDataError = false;\n\n m.redraw();\n\n try {\n await Promise.all([locales.load(), countries.load()]);\n\n this.loadingData = false;\n this.loadingDataError = false;\n\n m.redraw();\n } catch (e) {\n console.error(e);\n\n this.loadingData = false;\n this.loadingDataError = true;\n this.errorDetails = e as Error;\n\n m.redraw();\n }\n }\n\n content(vnode: Mithril.VnodeDOM) {\n return (\n
\n
\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.native_label'),\n setting: 'fof-discussion-language.native',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.show_flag_label'),\n setting: 'fof-discussion-language.showFlags',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.composer_default_label'),\n setting: 'fof-discussion-language.composerLocaleDefault',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.locale_sort_label'),\n setting: 'fof-discussion-language.filter_language_on_http_request',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.show_any_lang_opt_label'),\n setting: 'fof-discussion-language.showAnyLangOpt',\n })}\n
\n\n
\n {this.buildSettingComponent({\n type: 'bool',\n label: app.translator.trans('fof-discussion-language.admin.settings.tags_page_discussion_locale_label'),\n setting: 'fof-discussion-language.useLocaleForTagsPageLastDiscussion',\n })}\n
\n\n {this.submitButton(vnode)}\n\n
\n\n {this.localeSettings()}\n\n

\n This extension uses material from the Wikipedia article{' '}\n \n List of ISO 639-2 Codes\n \n , which is released under the{' '}\n Creative Commons Attribution-Share-Alike License 3.0.\n

\n
\n
\n );\n }\n\n localeSettings() {\n if (this.loadingData) return ;\n\n if (this.loadingDataError) {\n return (\n \n {app.translator.trans('fof-discussion-language.admin.settings.errors.missing_assets')}\n
\n Error: {this.errorDetails?.message}\n
\n );\n }\n\n const nativeNames = !!Number(this.setting('fof-discussion-language.native')());\n\n const locales = getLocales(nativeNames);\n const countryData = getCountries(nativeNames);\n\n return (\n <>\n
\n {app.translator.trans('fof-discussion-language.admin.settings.config.language_label')}\n {app.translator.trans('fof-discussion-language.admin.settings.config.country_label')}\n \n \n
\n
\n {Select.component({\n onchange: this.newLocaleValue,\n value: this.newLocaleValue(),\n options: locales,\n })}\n\n {Select.component({\n onchange: this.newCountryValue,\n value: this.newCountryValue(),\n options: countryData,\n })}\n\n {Button.component(\n {\n className: 'Button Button--primary',\n onclick: this.add.bind(this),\n disabled: !this.newLocaleValue() || !this.newCountryValue() || this.isAddingNewRecord,\n },\n icon(this.isAddingNewRecord ? 'fas fa-spinner fa-spin' : 'fas fa-plus')\n )}\n
\n\n
\n {app.store.all('discussion-languages').map((language) => {\n const id = language.id();\n\n const updating = this.recordsUpdating[id];\n const deleting = this.recordsDeleting[id];\n\n const country = language.country();\n\n return (\n
\n {Select.component({\n onchange: (val: string) => {\n this.recordsUpdating[id!] = true;\n\n language\n .save({\n code: val,\n })\n .then(() => {\n this.recordsUpdating[id!] = false;\n m.redraw();\n });\n },\n value: language.code(),\n options: locales,\n disabled: updating || deleting,\n })}\n\n {Select.component({\n onchange: (val: string) => {\n this.recordsUpdating[id!] = true;\n\n language\n .save({\n country: val,\n })\n .then(() => {\n this.recordsUpdating[id!] = false;\n m.redraw();\n });\n },\n value: country,\n options: countryData,\n disabled: updating || deleting,\n })}\n\n {Button.component(\n {\n className: `Button Button--danger`,\n disabled: deleting,\n onclick: this.remove.bind(this, language),\n },\n icon(deleting ? 'fas fa-spinner fa-spin' : 'fas fa-times')\n )}\n
\n );\n })}\n
\n \n );\n }\n\n onkeydown(e) {\n if (e.key === 'Enter') {\n this.add();\n e.preventDefault();\n }\n }\n\n add() {\n if (this.isAddingNewRecord || !this.newLocaleValue()) return;\n\n this.isAddingNewRecord = true;\n\n const code = this.newLocaleValue();\n const country = this.newCountryValue();\n const language = app.store.createRecord('discussion-languages');\n\n language\n .save({ code, country })\n .then(() => {\n this.newLocaleValue('');\n this.newCountryValue('');\n })\n .catch(() => {})\n .finally(() => {\n this.isAddingNewRecord = false;\n m.redraw();\n });\n }\n\n remove(language) {\n this.recordsDeleting[language.id()] = true;\n\n language\n .delete()\n .then(\n () => {},\n () => {}\n )\n .then(() => {\n delete this.recordsDeleting[language.id()];\n m.redraw();\n });\n }\n}\n","import LanguagesSettingsPage from './LanguagesSettingsPage';\n\nexport const components = {\n LanguagesSettingsPage,\n};\n","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}","import getCountry, * as countries from './countries';\nimport locales, { getName } from './locales';\nimport { utils as commonUtils } from '../../common/utils';\n\nexport const utils = {\n getCountry,\n countries,\n locales,\n getName,\n ...commonUtils,\n};\n","import flag from './flag';\n\nexport const utils = {\n flag,\n};\n","import basename from 'twemoji-basename';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default (language) => {\n if (!language) return;\n\n const emoji = language.emoji ? language.emoji() : language;\n\n return emoji ? (\n \n ) : (\n icon('fas fa-globe')\n );\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class Language extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n code() {\n return Model.attribute('code').call(this);\n }\n\n country() {\n return Model.attribute('country').call(this);\n }\n\n name() {\n return Model.attribute('name').call(this);\n }\n\n emoji() {\n return Model.attribute('emoji').call(this);\n }\n\n apiEndpoint() {\n return `/fof/discussion-language${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Language from './Language';\n\nexport const models = {\n Language,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Forum'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","import Extend from 'flarum/common/extenders';\nimport Language from '../common/models/Language';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Forum from 'flarum/common/models/Forum';\nimport Tag from 'flarum/tags/common/models/Tag';\n\nexport default [\n new Extend.Store() //\n .add('discussion-languages', Language),\n\n new Extend.Model(Discussion) //\n .hasOne('language')\n .attribute('canChangeLanguage'),\n\n new Extend.Model(Forum) //\n .hasMany('discussionLanguages'),\n\n new Extend.Model(Tag) //\n .attribute('subscriptionLanguage')\n .attribute('localisedLastDiscussion'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/admin/app';\nimport SettingDropdown from 'flarum/admin/components/SettingDropdown';\n\nimport LanguagesSettingsPage from './components/LanguagesSettingsPage';\n\nexport * from './components';\nexport * from './utils';\nexport * from '../common/models';\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/discussion-language', () => {\n app.extensionData\n .for('fof-discussion-language')\n .registerPage(LanguagesSettingsPage)\n .registerPermission(\n {\n permission: 'discussion.changeLanguageModerate',\n icon: 'fas fa-globe',\n label: app.translator.trans('fof-discussion-language.admin.permissions.allow_change_language_label'),\n },\n 'moderate',\n 65\n )\n .registerPermission(\n {\n icon: 'fas fa-globe',\n label: app.translator.trans('fof-discussion-language.admin.permissions.allow_change_language_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings['fof-discussion-language.allow_language_change']);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', { count: minutes })\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'fof-discussion-language.allow_language_change',\n options: [\n { value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button') },\n { value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button') },\n { value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button') },\n ],\n });\n },\n },\n 'start',\n 65\n );\n});\n"],"names":["module","exports","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","str","r","c","p","l","charCodeAt","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","flarum","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","_setPrototypeOf","_inheritsLoose","subClass","superClass","ISO6392","loadAsset","_x","_loadAsset","_regeneratorRuntime","_callee","URL","response","_context","app","attribute","fetch","ok","status","json","load","_ref","getNameColumn","data","native","_Array$from","Array","from","sort","b","_getNameColumn","_getNameColumn2","toLowerCase","reduce","countries","getCountries","useNativeName","entries","acc","_ref2","code","getEmoji","_countries","_countries$code","emoji","LanguagesSettingsPage","_ExtensionPage","_this","_len","_key","concat","recordsUpdating","recordsDeleting","newLocaleValue","Stream","newCountryValue","loadingData","loadingDataError","errorDetails","isAddingNewRecord","_proto","oncreate","vnode","loadData","_loadData","m","redraw","all","locales","t0","console","content","className","buildSettingComponent","label","trans","setting","submitButton","localeSettings","href","target","rel","_this$errorDetails","_this2","LoadingIndicator","Alert","dismissible","message","nativeNames","Number","getLocales","countryData","'['","style","Select","onchange","options","Button","onclick","add","bind","disabled","icon","map","language","id","updating","deleting","country","val","save","remove","onkeydown","e","preventDefault","_this3","createRecord","_this4","ExtensionPage","components","_extends","assign","source","utils","getCountry","getName","_ISO","find","includes","flag","alt","draggable","loading","src","basename","Language","_Model","Model","apiEndpoint","exists","models","Extend","Discussion","hasOne","Forum","hasMany","Tag","commonExtend","registerPage","registerPermission","permission","minutes","parseInt","settings","SettingDropdown","defaultLabel","count"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 8a0d6df..53df2d9 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";qBAGAA,EAAOC,QAAU,SAAUC,GAOzB,IANA,IAAIC,EAAI,GACJC,EAAI,EACJC,EAAI,EACJC,EAAI,EACJC,EAAIL,EAAIM,OAELF,EAAIC,GACTH,EAAIF,EAAIO,WAAWH,KACfD,GACFF,EAAEO,MAAM,OAAYL,EAAI,OAAW,KAAOD,EAAI,QAASO,SAAS,KAChEN,EAAI,GACK,OAAUD,GAAKA,GAAK,MAC7BC,EAAID,EAEJD,EAAEO,KAAKN,EAAEO,SAAS,KAItB,OAAOR,EAAES,KAAK,IACf,ICtBGC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaf,QAGrB,IAAID,EAASa,EAAyBE,GAAY,CAGjDd,QAAS,CAAC,GAOX,OAHAiB,EAAoBH,GAAUf,EAAQA,EAAOC,QAASa,GAG/Cd,EAAOC,OACf,CCrBAa,EAAoBK,EAAKnB,IACxB,IAAIoB,EAASpB,GAAUA,EAAOqB,WAC7B,IAAOrB,EAAiB,QACxB,IAA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AW4D,GACjB4D,aAAc,IAAIC,KAAqB,IAAhBzH,EAAW0H,IAAWC,iBANzB9B,GASzB,GC1CK,oBAAqBjJ,OAAO4G,cAElCiB,EAAAA,EAAAA,QAAOhB,GAAAA,WAAWmE,kBAAkBtL,UAAW,UAAU,WACvD,IACMuL,EADMtJ,KAAKY,MAAM2I,MACUD,uBACjCtJ,KAAKhB,SAAW2E,IAAO2F,EACxB,KAEDpD,EAAAA,EAAAA,QAAOhB,GAAAA,WAAWmE,kBAAkBtL,UAAW,mBAAmB,SAAU4G,GAAO,WACjFA,EAAMK,IACJ,wBACA,SAAK5F,UAAU,cACb,eAAQgB,IAAAA,WAAeuB,MAAM,2EAC7B,OAAGvC,UAAU,YAAYgB,IAAAA,WAAeuB,MAAM,0EAC9C,EAAC2B,EAAD,CACE9B,SAAUxB,KAAKhB,WACf8C,QAAS,SAACvE,GACW,iBAARA,GAEX,EAAKyB,SAASzB,EACf,KAvB4B,GA4BpC,KAED2I,EAAAA,EAAAA,QAAOhB,GAAAA,WAAWmE,kBAAkBtL,UAAW,eAAe,SAAU0H,GAGtE,OAFAA,EAAKzG,SAAWgB,KAAKhB,WAEdyG,CACR,IFtBF","sources":["webpack://@fof/discussion-language/./node_modules/twemoji-basename/index.js","webpack://@fof/discussion-language/webpack/bootstrap","webpack://@fof/discussion-language/webpack/runtime/compat get default export","webpack://@fof/discussion-language/webpack/runtime/define property getters","webpack://@fof/discussion-language/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/discussion-language/webpack/runtime/make namespace object","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/discussion-language/./src/common/utils/flag.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/discussion-language/./src/forum/utils/generateLanguageOptions.tsx","webpack://@fof/discussion-language/./src/forum/components/LanguageDisplay.tsx","webpack://@fof/discussion-language/./src/forum/components/LanguageDiscussionModal.js","webpack://@fof/discussion-language/./src/forum/addEditLanguageModal.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/discussion-language/./src/forum/addLanguageComposer.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/setRouteWithForcedRefresh']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/discussion-language/./src/forum/components/LanguageDropdown.tsx","webpack://@fof/discussion-language/./src/forum/addLanguageToDiscussionList.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/discussion-language/external assign \"flarum.extensions['fof-follow-tags']\"","webpack://@fof/discussion-language/./src/forum/components/index.js","webpack://@fof/discussion-language/./src/common/utils/index.js","webpack://@fof/discussion-language/./src/common/models/Language.ts","webpack://@fof/discussion-language/./src/common/models/index.ts","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/discussion-language/./src/common/extend.ts","webpack://@fof/discussion-language/./src/forum/extend.ts","webpack://@fof/discussion-language/./src/forum/index.ts","webpack://@fof/discussion-language/./src/forum/useLocalisedLastDiscussionOnTagsPage.ts","webpack://@fof/discussion-language/./src/forum/extendSubscriptionModal.js"],"sourcesContent":["/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\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](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/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","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['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import basename from 'twemoji-basename';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default (language) => {\n if (!language) return;\n\n const emoji = language.emoji ? language.emoji() : language;\n\n return emoji ? (\n \n ) : (\n icon('fas fa-globe')\n );\n};\n","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}","import Language from '../../common/models/Language';\nimport LanguageDisplay from '../components/LanguageDisplay';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\nexport default function generateLanguageOptions(extraOptions?: Record): Record {\n const options: Record = {};\n const languages = app.store.all('discussion-languages');\n\n // Populate the options with the languages\n languages.forEach((lang) => {\n options[lang.code()] = ;\n });\n\n // Merge extra options, if provided\n return { ...options, ...extraOptions };\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport flag from '../../common/utils/flag';\nimport Language from '../../common/models/Language';\nimport type Mithril from 'mithril';\nimport generateLanguageOptions from '../utils/generateLanguageOptions';\n\ninterface LanguageDisplayAttrs {\n language: Language;\n uppercase?: boolean;\n extra?: Record;\n}\n\nexport default class LanguageDisplay extends Component {\n options!: Record;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.options = generateLanguageOptions(this.attrs.extra);\n }\n\n view(): Mithril.Child {\n const { language, uppercase } = this.attrs;\n const name = language.name() || '';\n\n return (\n \n {flag(language)} {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nimport LanguageDisplay from './LanguageDisplay';\n\nexport default class LanguageDiscussionModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all('discussion-languages').filter((language) => language.code() !== 'any');\n\n this.current = this.attrs.selected || (this.attrs.discussion && this.attrs.discussion.language());\n this.selected = this.current;\n }\n\n className() {\n return 'FoFLanguageDiscussionModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('fof-discussion-language.forum.change_language.edit_title', { title: {this.attrs.discussion.title()} })\n : app.translator.trans('fof-discussion-language.forum.change_language.title');\n }\n\n content() {\n return [\n
\n
\n {this.languages.map((language) => (\n \n ))}\n
\n\n {!this.attrs.hideSubmitButton && (\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary',\n disabled: !this.selected || this.selected === this.current,\n loading: this.loading,\n icon: 'fas fa-check',\n },\n app.translator.trans('fof-discussion-language.forum.change_language.submit_button')\n )}\n
\n )}\n
,\n ];\n }\n\n select(language) {\n this.selected = language;\n\n if (this.attrs.hideSubmitButton) return this.onsubmit();\n\n m.redraw();\n }\n\n onsubmit(e) {\n if (e) e.preventDefault();\n\n const { discussion, onsubmit } = this.attrs;\n\n this.loading = true;\n\n if (!discussion) {\n this.hide();\n\n if (onsubmit) onsubmit(this.selected);\n\n return;\n }\n\n const language = this.selected;\n\n discussion\n .save({ relationships: { language } })\n .then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n\n return this.hide();\n })\n .catch(this.loaded.bind(this));\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\n\nimport LanguageDiscussionModal from './components/LanguageDiscussionModal';\n\nexport default () => {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canChangeLanguage()) {\n items.add(\n 'language',\n Button.component(\n {\n icon: 'fas fa-globe',\n onclick: () => app.modal.show(LanguageDiscussionModal, { discussion }),\n },\n app.translator.trans('fof-discussion-language.forum.discussion_controls.change_language_button')\n )\n );\n }\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\n\nimport LanguageDiscussionModal from './components/LanguageDiscussionModal';\nimport LanguageDisplay from './components/LanguageDisplay';\n\nconst sort = (a, b) => a.code().toLowerCase() > b.code().toLowerCase();\n\nexport default () => {\n extend(IndexPage.prototype, 'newDiscussionAction', function (promise) {\n const dislang = app.search.params().language;\n\n if (dislang) {\n promise.then((composer) => (composer.fields.language = app.store.getBy('discussion-languages', 'code', dislang)));\n } else {\n const localeComposer = app.forum.attribute('fof-discussion-language.composerLocaleDefault');\n app.composer.fields.language = localeComposer ? app.store.getBy('discussion-languages', 'code', app.translator.getLocale()) : '';\n }\n });\n\n DiscussionComposer.prototype.chooseLanguage = function (hide, callback) {\n app.modal.show(LanguageDiscussionModal, {\n selected: this.composer.fields.language,\n hideSubmitButton: hide,\n onsubmit: (language) => {\n this.composer.fields.language = language;\n this.$('textarea').focus();\n\n if (callback) callback();\n },\n });\n };\n\n extend(DiscussionComposer.prototype, 'headerItems', function (items) {\n // Don't add lang item to byobu composers\n if (this._isByobuComposer) return;\n\n items.add(\n 'language',\n \n \n {this.composer.fields.language\n ? LanguageDisplay.component({ language: this.composer.fields.language, uppercase: true })\n : app.translator.trans('fof-discussion-language.forum.composer_discussion.choose_language_link')}\n \n ,\n 20\n );\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function (original) {\n // Don't add lang stuff to byobu composers\n if (this._isByobuComposer) return original();\n\n if (!this.composer.fields.language) return this.chooseLanguage(true, original);\n\n original();\n });\n\n extend(DiscussionComposer.prototype, 'data', function (data) {\n // Don't add lang stuff to byobu composers\n if (this._isByobuComposer) return;\n\n data.relationships = data.relationships || {};\n\n data.relationships.language = this.composer.fields.language || app.store.all('discussion-languages').sort(sort)[0];\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/setRouteWithForcedRefresh'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown, { IDropdownAttrs } from 'flarum/common/components/Dropdown';\nimport type Mithril from 'mithril';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\nimport generateLanguageOptions from '../utils/generateLanguageOptions';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport interface LanguageDropdownAttrs extends IDropdownAttrs {\n className?: string;\n selected?: string;\n onclick?: (langId: string) => void;\n extra?: Record;\n}\n\nexport default class LanguageDropdown extends Dropdown {\n selected!: Stream;\n options!: Record;\n loaded: boolean = false;\n\n static initAttrs(attrs: LanguageDropdownAttrs): void {\n attrs.buttonClassName = 'Button';\n attrs.className = classList(attrs.className, 'Dropdown--select', 'Dropdown--language');\n super.initAttrs(attrs);\n }\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.loadLanguages();\n this.selected = Stream(this.initSelectedLanguage());\n }\n\n getDefaultLanguage(): string {\n return (app.forum.attribute('fof-discussion-language.showAnyLangOpt') ? 'any' : app.translator.getLocale()) || '';\n }\n\n initSelectedLanguage(): string {\n return this.attrs.selected || this.getDefaultLanguage();\n }\n\n loadLanguages(): void {\n if (this.loaded === false) {\n this.options = generateLanguageOptions(this.attrs.extra);\n this.loaded = true;\n }\n }\n\n buildDropdownContent(): Mithril.ChildArray {\n return Object.keys(this.options).map((langId) => {\n const isItemSelected = this.selected() === langId;\n\n return (\n {\n this.selected(langId);\n\n if (this.attrs.onclick) {\n this.attrs.onclick.call(this, langId);\n }\n }}\n aria-label={langId}\n >\n {this.options[langId]}\n \n );\n });\n }\n\n view(vnode: Mithril.Vnode) {\n const children = this.buildDropdownContent();\n\n return super.view({ ...vnode.attrs, children });\n }\n\n getButton(children: Mithril.ChildArray): Mithril.Vnode {\n return (\n \n {this.getButtonContent(children)}\n \n );\n }\n\n getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n return [\n {this.options[this.selected()]},\n this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null,\n ];\n }\n\n getMenu(items: Mithril.Vnode[]): Mithril.Vnode {\n return (\n
    \n {items}\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport setRouteWithForcedRefresh from 'flarum/common/utils/setRouteWithForcedRefresh';\n\nimport flag from '../common/utils/flag';\nimport LanguageDropdown from './components/LanguageDropdown';\n\nconst addLanguage = function (items) {\n // Ignore PDs from Byobu\n // Must be conditional call in case byobu not installed\n if (this.attrs.discussion.isPrivateDiscussion?.()) return;\n\n const language = this.attrs.discussion.language();\n\n if (!language) return;\n\n items.add(\n 'discussion-language',\n \n {flag(language) || }\n {language.name()}\n ,\n 5\n );\n};\n\nexport default () => {\n extend(DiscussionListItem.prototype, 'infoItems', addLanguage);\n extend(DiscussionHero.prototype, 'items', addLanguage);\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n const routeName = app.current.data.routeName;\n\n if (routeName === 'byobuPrivate') return;\n if (routeName === 'byobuUserPrivate') return;\n\n params.include.push('language');\n\n // Do not filter user discussions page as there is no dropdown\n if (routeName === 'user.discussions') return;\n\n // Required until https://github.com/flarum/framework/pull/3376 is released.\n if (routeName === 'following' && params.filter.q) {\n params.filter.q += ` is:${params.filter.subscription || 'following'}`;\n delete params.filter.subscription;\n }\n\n const paramLang = app.search.params().language;\n const locale = app.search.params().language ?? app.translator.getLocale();\n const showAnyOpt = app.forum.attribute('fof-discussion-language.showAnyLangOpt');\n\n if (params.filter.q) {\n if (showAnyOpt) {\n if (paramLang) {\n params.filter.q += ' language:' + paramLang;\n }\n } else {\n params.filter.q += ' language:' + locale;\n }\n } else {\n if (!showAnyOpt || paramLang) {\n params.filter.language = locale;\n }\n }\n });\n\n extend(GlobalSearchState.prototype, 'stickyParams', (params) => (params.language = m.route.param('language')));\n\n extend(IndexPage.prototype, 'viewItems', function (items) {\n // Don't add language controls to /private (fof/byobu)\n if (app.current.data.routeName === 'byobuPrivate') return;\n\n const defaultSelected = app.forum.attribute('fof-discussion-language.showAnyLangOpt') ? 'any' : app.translator.getLocale();\n\n items.add(\n 'language',\n {\n // if `key` is not a string, return early\n if (typeof key !== 'string') return;\n\n const params = app.search.params();\n\n if (key === defaultSelected) delete params.language;\n else params.language = key;\n\n setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n }}\n />\n );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-follow-tags'];","import LanguageDisplay from './LanguageDisplay';\nimport LanguageDiscussionModal from './LanguageDiscussionModal';\nimport LanguageDropdown from './LanguageDropdown';\n\nexport const components = {\n LanguageDisplay,\n LanguageDiscussionModal,\n LanguageDropdown,\n};\n","import flag from './flag';\n\nexport const utils = {\n flag,\n};\n","import Model from 'flarum/common/Model';\n\nexport default class Language extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n code() {\n return Model.attribute('code').call(this);\n }\n\n country() {\n return Model.attribute('country').call(this);\n }\n\n name() {\n return Model.attribute('name').call(this);\n }\n\n emoji() {\n return Model.attribute('emoji').call(this);\n }\n\n apiEndpoint() {\n return `/fof/discussion-language${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Language from './Language';\n\nexport const models = {\n Language,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Forum'];","import Extend from 'flarum/common/extenders';\nimport Language from '../common/models/Language';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Forum from 'flarum/common/models/Forum';\nimport Tag from 'flarum/tags/common/models/Tag';\n\nexport default [\n new Extend.Store() //\n .add('discussion-languages', Language),\n\n new Extend.Model(Discussion) //\n .hasOne('language')\n .attribute('canChangeLanguage'),\n\n new Extend.Model(Forum) //\n .hasMany('discussionLanguages'),\n\n new Extend.Model(Tag) //\n .attribute('subscriptionLanguage')\n .attribute('localisedLastDiscussion'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/forum/app';\nimport addEditLanguageModal from './addEditLanguageModal';\nimport addLanguageComposer from './addLanguageComposer';\nimport addLanguageToDiscussionList from './addLanguageToDiscussionList';\nimport useLocalisedLastDiscussionOnTagsPage from './useLocalisedLastDiscussionOnTagsPage';\nimport extendSubscriptionModal from './extendSubscriptionModal';\n\nexport * from './components';\nexport * from '../common/utils';\nexport * from '../common/models';\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/discussion-language', () => {\n addEditLanguageModal();\n addLanguageComposer();\n addLanguageToDiscussionList();\n useLocalisedLastDiscussionOnTagsPage();\n extendSubscriptionModal();\n});\n","import app from 'flarum/forum/app';\n\nimport Tag from 'flarum/tags/common/models/Tag';\n\nimport Discussion from 'flarum/common/models/Discussion';\nimport Model from 'flarum/common/Model';\n\nexport default function useLocalisedLastDiscussionOnTagsPage() {\n if (!('flarum-tags' in flarum.extensions)) return;\n\n Tag.prototype.lastPostedDiscussion = function (this: Tag) {\n const original = Model.hasOne('lastPostedDiscussion').bind(this);\n\n if (!app.forum.attribute('fof-discussion-language.useLocaleForTagsPageLastDiscussion')) {\n return original();\n }\n\n const data = this.localisedLastDiscussion();\n\n /**\n * Priorities:\n *\n * 1. User's selected forum locale\n * 2. Detected locale\n * 3. First disucssion language available\n */\n const desiredLanguageCode =\n app.session.user?.preferences?.()?.locale || (app.translator as any).formatter.locale || (app.forum as any).discussionLanguages()[0].code();\n\n const desiredLanguageId = (app.forum as any)\n .discussionLanguages()\n .find((lang: any) => lang.code() === desiredLanguageCode)\n ?.id();\n\n // If forum locale not available as a discussion lang, default to any language\n if (!desiredLanguageId) {\n return original();\n }\n\n const discussion = data[desiredLanguageId];\n\n // fall back to original attribute\n if (!discussion) return original();\n\n return new Discussion({\n attributes: {\n title: discussion.title,\n slug: discussion.id, // navigating using only ID works fine\n lastPostedAt: new Date(discussion.at * 1000).toISOString(),\n },\n });\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport { components } from '@fof-follow-tags';\nimport LanguageDropdown from './components/LanguageDropdown';\nimport Stream from 'flarum/common/utils/Stream';\n\nconst SUBSCRIPTION_LANGUAGE_PRIORITY = 80;\n\nexport default function extendSubscriptionModal() {\n if (!('fof-follow-tags' in flarum.extensions)) return;\n\n extend(components.SubscriptionModal.prototype, 'oninit', function () {\n const tag = this.attrs.model;\n const subscriptionLanguage = tag.subscriptionLanguage();\n this.language = Stream(subscriptionLanguage);\n });\n\n extend(components.SubscriptionModal.prototype, 'formOptionItems', function (items) {\n items.add(\n 'subscription_language',\n
\n \n

{app.translator.trans('fof-discussion-language.forum.sub_controls.subscription_language_help')}

\n {\n if (typeof key !== 'string') return;\n\n this.language(key);\n }}\n />\n
,\n SUBSCRIPTION_LANGUAGE_PRIORITY\n );\n });\n\n extend(components.SubscriptionModal.prototype, 'requestData', function (data) {\n data.language = this.language();\n\n return data;\n });\n}\n"],"names":["module","exports","str","r","c","p","i","l","length","charCodeAt","push","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","language","emoji","alt","country","className","draggable","loading","src","basename","icon","_extends","assign","target","arguments","source","apply","this","generateLanguageOptions","extraOptions","options","app","all","forEach","lang","code","LanguageDisplay","oninit","vnode","attrs","extra","view","uppercase","name","flag","toUpperCase","Component","LanguageDiscussionModal","languages","filter","current","selected","discussion","title","trans","content","map","onclick","select","bind","hideSubmitButton","Button","type","disabled","onsubmit","m","redraw","e","preventDefault","hide","save","relationships","then","DiscussionPage","stream","update","loaded","Modal","sort","b","toLowerCase","LanguageDropdown","initAttrs","buttonClassName","classList","loadLanguages","Stream","initSelectedLanguage","getDefaultLanguage","attribute","getLocale","buildDropdownContent","keys","langId","isItemSelected","active","children","getButton","accessibleToggleLabel","getButtonContent","caretIcon","getMenu","items","menuClassName","Dropdown","addLanguage","isPrivateDiscussion","add","extensions","components","utils","Language","id","Model","apiEndpoint","exists","data","models","Extend","Discussion","hasOne","Forum","hasMany","Tag","commonExtend","extend","DiscussionControls","canChangeLanguage","show","IndexPage","promise","dislang","params","composer","fields","getBy","localeComposer","DiscussionComposer","chooseLanguage","callback","$","focus","_isByobuComposer","component","override","original","DiscussionListItem","DiscussionHero","DiscussionListState","routeName","include","q","subscription","paramLang","locale","showAnyOpt","GlobalSearchState","route","param","defaultSelected","setRouteWithForcedRefresh","lastPostedDiscussion","localisedLastDiscussion","desiredLanguageCode","user","preferences","formatter","discussionLanguages","desiredLanguageId","find","attributes","slug","lastPostedAt","Date","at","toISOString","SubscriptionModal","subscriptionLanguage","model"],"sourceR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WAAWwE,kBAAkBzM,UAAW,UAAU,WACvD,IACM0M,EADMxK,KAAKoB,MAAMqJ,MACUD,uBACjCxK,KAAKjB,SAAWuF,IAAOkG,EACzB,KAEAxD,EAAAA,EAAAA,QAAOjB,GAAAA,WAAWwE,kBAAkBzM,UAAW,mBAAmB,SAAUwH,GAAO,IAAA3E,EAAA,KACjF2E,EAAMO,IACJ,wBACA5G,EAAA,OAAKG,UAAU,cACbH,EAAA,aAAQmB,IAAAA,WAAeiC,MAAM,2EAC7BpD,EAAA,KAAGG,UAAU,YAAYgB,IAAAA,WAAeiC,MAAM,0EAC9CpD,EAAC+E,EAAgB,CACf9B,SAAUlC,KAAKjB,WACf0D,QAAS,SAACnF,GACW,iBAARA,GAEXqD,EAAK5B,SAASzB,EAChB,KAvB6B,GA4BrC,KAEA0J,EAAAA,EAAAA,QAAOjB,GAAAA,WAAWwE,kBAAkBzM,UAAW,eAAe,SAAUyI,GAGtE,OAFAA,EAAKxH,SAAWiB,KAAKjB,WAEdwH,CACT,IFtBF","sources":["webpack://@fof/discussion-language/./node_modules/twemoji-basename/index.js","webpack://@fof/discussion-language/webpack/bootstrap","webpack://@fof/discussion-language/webpack/runtime/compat get default export","webpack://@fof/discussion-language/webpack/runtime/define property getters","webpack://@fof/discussion-language/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/discussion-language/webpack/runtime/make namespace object","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/discussion-language/./src/common/utils/flag.js","webpack://@fof/discussion-language/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/discussion-language/./src/forum/utils/generateLanguageOptions.tsx","webpack://@fof/discussion-language/./src/forum/components/LanguageDisplay.tsx","webpack://@fof/discussion-language/./src/forum/components/LanguageDiscussionModal.js","webpack://@fof/discussion-language/./src/forum/addEditLanguageModal.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/discussion-language/./src/forum/addLanguageComposer.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/setRouteWithForcedRefresh']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/discussion-language/./src/forum/components/LanguageDropdown.tsx","webpack://@fof/discussion-language/./src/forum/addLanguageToDiscussionList.js","webpack://@fof/discussion-language/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/discussion-language/external assign \"flarum.extensions['fof-follow-tags']\"","webpack://@fof/discussion-language/./src/forum/components/index.js","webpack://@fof/discussion-language/./src/common/utils/index.js","webpack://@fof/discussion-language/./src/common/models/Language.ts","webpack://@fof/discussion-language/./src/common/models/index.ts","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/discussion-language/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/discussion-language/./src/common/extend.ts","webpack://@fof/discussion-language/./src/forum/extend.ts","webpack://@fof/discussion-language/./src/forum/index.ts","webpack://@fof/discussion-language/./src/forum/useLocalisedLastDiscussionOnTagsPage.ts","webpack://@fof/discussion-language/./src/forum/extendSubscriptionModal.js"],"sourcesContent":["/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\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](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/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","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['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import basename from 'twemoji-basename';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default (language) => {\n if (!language) return;\n\n const emoji = language.emoji ? language.emoji() : language;\n\n return emoji ? (\n \n ) : (\n icon('fas fa-globe')\n );\n};\n","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}","import Language from '../../common/models/Language';\nimport LanguageDisplay from '../components/LanguageDisplay';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\nexport default function generateLanguageOptions(extraOptions?: Record): Record {\n const options: Record = {};\n const languages = app.store.all('discussion-languages');\n\n // Populate the options with the languages\n languages.forEach((lang) => {\n options[lang.code()] = ;\n });\n\n // Merge extra options, if provided\n return { ...options, ...extraOptions };\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport flag from '../../common/utils/flag';\nimport Language from '../../common/models/Language';\nimport type Mithril from 'mithril';\nimport generateLanguageOptions from '../utils/generateLanguageOptions';\n\ninterface LanguageDisplayAttrs {\n language: Language;\n uppercase?: boolean;\n extra?: Record;\n}\n\nexport default class LanguageDisplay extends Component {\n options!: Record;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.options = generateLanguageOptions(this.attrs.extra);\n }\n\n view(): Mithril.Child {\n const { language, uppercase } = this.attrs;\n const name = language.name() || '';\n\n return (\n \n {flag(language)} {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nimport LanguageDisplay from './LanguageDisplay';\n\nexport default class LanguageDiscussionModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all('discussion-languages').filter((language) => language.code() !== 'any');\n\n this.current = this.attrs.selected || (this.attrs.discussion && this.attrs.discussion.language());\n this.selected = this.current;\n }\n\n className() {\n return 'FoFLanguageDiscussionModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('fof-discussion-language.forum.change_language.edit_title', { title: {this.attrs.discussion.title()} })\n : app.translator.trans('fof-discussion-language.forum.change_language.title');\n }\n\n content() {\n return [\n
\n
\n {this.languages.map((language) => (\n \n ))}\n
\n\n {!this.attrs.hideSubmitButton && (\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary',\n disabled: !this.selected || this.selected === this.current,\n loading: this.loading,\n icon: 'fas fa-check',\n },\n app.translator.trans('fof-discussion-language.forum.change_language.submit_button')\n )}\n
\n )}\n
,\n ];\n }\n\n select(language) {\n this.selected = language;\n\n if (this.attrs.hideSubmitButton) return this.onsubmit();\n\n m.redraw();\n }\n\n onsubmit(e) {\n if (e) e.preventDefault();\n\n const { discussion, onsubmit } = this.attrs;\n\n this.loading = true;\n\n if (!discussion) {\n this.hide();\n\n if (onsubmit) onsubmit(this.selected);\n\n return;\n }\n\n const language = this.selected;\n\n discussion\n .save({ relationships: { language } })\n .then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n\n return this.hide();\n })\n .catch(this.loaded.bind(this));\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\n\nimport LanguageDiscussionModal from './components/LanguageDiscussionModal';\n\nexport default () => {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canChangeLanguage()) {\n items.add(\n 'language',\n Button.component(\n {\n icon: 'fas fa-globe',\n onclick: () => app.modal.show(LanguageDiscussionModal, { discussion }),\n },\n app.translator.trans('fof-discussion-language.forum.discussion_controls.change_language_button')\n )\n );\n }\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\n\nimport LanguageDiscussionModal from './components/LanguageDiscussionModal';\nimport LanguageDisplay from './components/LanguageDisplay';\n\nconst sort = (a, b) => a.code().toLowerCase() > b.code().toLowerCase();\n\nexport default () => {\n extend(IndexPage.prototype, 'newDiscussionAction', function (promise) {\n const dislang = app.search.params().language;\n\n if (dislang) {\n promise.then((composer) => (composer.fields.language = app.store.getBy('discussion-languages', 'code', dislang)));\n } else {\n const localeComposer = app.forum.attribute('fof-discussion-language.composerLocaleDefault');\n app.composer.fields.language = localeComposer ? app.store.getBy('discussion-languages', 'code', app.translator.getLocale()) : '';\n }\n });\n\n DiscussionComposer.prototype.chooseLanguage = function (hide, callback) {\n app.modal.show(LanguageDiscussionModal, {\n selected: this.composer.fields.language,\n hideSubmitButton: hide,\n onsubmit: (language) => {\n this.composer.fields.language = language;\n this.$('textarea').focus();\n\n if (callback) callback();\n },\n });\n };\n\n extend(DiscussionComposer.prototype, 'headerItems', function (items) {\n // Don't add lang item to byobu composers\n if (this._isByobuComposer) return;\n\n items.add(\n 'language',\n \n \n {this.composer.fields.language\n ? LanguageDisplay.component({ language: this.composer.fields.language, uppercase: true })\n : app.translator.trans('fof-discussion-language.forum.composer_discussion.choose_language_link')}\n \n ,\n 20\n );\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function (original) {\n // Don't add lang stuff to byobu composers\n if (this._isByobuComposer) return original();\n\n if (!this.composer.fields.language) return this.chooseLanguage(true, original);\n\n original();\n });\n\n extend(DiscussionComposer.prototype, 'data', function (data) {\n // Don't add lang stuff to byobu composers\n if (this._isByobuComposer) return;\n\n data.relationships = data.relationships || {};\n\n data.relationships.language = this.composer.fields.language || app.store.all('discussion-languages').sort(sort)[0];\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/setRouteWithForcedRefresh'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown, { IDropdownAttrs } from 'flarum/common/components/Dropdown';\nimport type Mithril from 'mithril';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\nimport generateLanguageOptions from '../utils/generateLanguageOptions';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport interface LanguageDropdownAttrs extends IDropdownAttrs {\n className?: string;\n selected?: string;\n onclick?: (langId: string) => void;\n extra?: Record;\n}\n\nexport default class LanguageDropdown extends Dropdown {\n selected!: Stream;\n options!: Record;\n loaded: boolean = false;\n\n static initAttrs(attrs: LanguageDropdownAttrs): void {\n attrs.buttonClassName = 'Button';\n attrs.className = classList(attrs.className, 'Dropdown--select', 'Dropdown--language');\n super.initAttrs(attrs);\n }\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.loadLanguages();\n this.selected = Stream(this.initSelectedLanguage());\n }\n\n getDefaultLanguage(): string {\n return (app.forum.attribute('fof-discussion-language.showAnyLangOpt') ? 'any' : app.translator.getLocale()) || '';\n }\n\n initSelectedLanguage(): string {\n return this.attrs.selected || this.getDefaultLanguage();\n }\n\n loadLanguages(): void {\n if (this.loaded === false) {\n this.options = generateLanguageOptions(this.attrs.extra);\n this.loaded = true;\n }\n }\n\n buildDropdownContent(): Mithril.ChildArray {\n return Object.keys(this.options).map((langId) => {\n const isItemSelected = this.selected() === langId;\n\n return (\n {\n this.selected(langId);\n\n if (this.attrs.onclick) {\n this.attrs.onclick.call(this, langId);\n }\n }}\n aria-label={langId}\n >\n {this.options[langId]}\n \n );\n });\n }\n\n view(vnode: Mithril.Vnode) {\n const children = this.buildDropdownContent();\n\n return super.view({ ...vnode.attrs, children });\n }\n\n getButton(children: Mithril.ChildArray): Mithril.Vnode {\n return (\n \n {this.getButtonContent(children)}\n \n );\n }\n\n getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n return [\n {this.options[this.selected()]},\n this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null,\n ];\n }\n\n getMenu(items: Mithril.Vnode[]): Mithril.Vnode {\n return (\n
    \n {items}\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport setRouteWithForcedRefresh from 'flarum/common/utils/setRouteWithForcedRefresh';\n\nimport flag from '../common/utils/flag';\nimport LanguageDropdown from './components/LanguageDropdown';\n\nconst addLanguage = function (items) {\n // Ignore PDs from Byobu\n // Must be conditional call in case byobu not installed\n if (this.attrs.discussion.isPrivateDiscussion?.()) return;\n\n const language = this.attrs.discussion.language();\n\n if (!language) return;\n\n items.add(\n 'discussion-language',\n \n {flag(language) || }\n {language.name()}\n ,\n 5\n );\n};\n\nexport default () => {\n extend(DiscussionListItem.prototype, 'infoItems', addLanguage);\n extend(DiscussionHero.prototype, 'items', addLanguage);\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n const routeName = app.current.data.routeName;\n\n if (routeName === 'byobuPrivate') return;\n if (routeName === 'byobuUserPrivate') return;\n\n params.include.push('language');\n\n // Do not filter user discussions page as there is no dropdown\n if (routeName === 'user.discussions') return;\n\n // Required until https://github.com/flarum/framework/pull/3376 is released.\n if (routeName === 'following' && params.filter.q) {\n params.filter.q += ` is:${params.filter.subscription || 'following'}`;\n delete params.filter.subscription;\n }\n\n const paramLang = app.search.params().language;\n const locale = app.search.params().language ?? app.translator.getLocale();\n const showAnyOpt = app.forum.attribute('fof-discussion-language.showAnyLangOpt');\n\n if (params.filter.q) {\n if (showAnyOpt) {\n if (paramLang) {\n params.filter.q += ' language:' + paramLang;\n }\n } else {\n params.filter.q += ' language:' + locale;\n }\n } else {\n if (!showAnyOpt || paramLang) {\n params.filter.language = locale;\n }\n }\n });\n\n extend(GlobalSearchState.prototype, 'stickyParams', (params) => (params.language = m.route.param('language')));\n\n extend(IndexPage.prototype, 'viewItems', function (items) {\n // Don't add language controls to /private (fof/byobu)\n if (app.current.data.routeName === 'byobuPrivate') return;\n\n const defaultSelected = app.forum.attribute('fof-discussion-language.showAnyLangOpt') ? 'any' : app.translator.getLocale();\n\n items.add(\n 'language',\n {\n // if `key` is not a string, return early\n if (typeof key !== 'string') return;\n\n const params = app.search.params();\n\n if (key === defaultSelected) delete params.language;\n else params.language = key;\n\n setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n }}\n />\n );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-follow-tags'];","import LanguageDisplay from './LanguageDisplay';\nimport LanguageDiscussionModal from './LanguageDiscussionModal';\nimport LanguageDropdown from './LanguageDropdown';\n\nexport const components = {\n LanguageDisplay,\n LanguageDiscussionModal,\n LanguageDropdown,\n};\n","import flag from './flag';\n\nexport const utils = {\n flag,\n};\n","import Model from 'flarum/common/Model';\n\nexport default class Language extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n code() {\n return Model.attribute('code').call(this);\n }\n\n country() {\n return Model.attribute('country').call(this);\n }\n\n name() {\n return Model.attribute('name').call(this);\n }\n\n emoji() {\n return Model.attribute('emoji').call(this);\n }\n\n apiEndpoint() {\n return `/fof/discussion-language${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Language from './Language';\n\nexport const models = {\n Language,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Forum'];","import Extend from 'flarum/common/extenders';\nimport Language from '../common/models/Language';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Forum from 'flarum/common/models/Forum';\nimport Tag from 'flarum/tags/common/models/Tag';\n\nexport default [\n new Extend.Store() //\n .add('discussion-languages', Language),\n\n new Extend.Model(Discussion) //\n .hasOne('language')\n .attribute('canChangeLanguage'),\n\n new Extend.Model(Forum) //\n .hasMany('discussionLanguages'),\n\n new Extend.Model(Tag) //\n .attribute('subscriptionLanguage')\n .attribute('localisedLastDiscussion'),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/forum/app';\nimport addEditLanguageModal from './addEditLanguageModal';\nimport addLanguageComposer from './addLanguageComposer';\nimport addLanguageToDiscussionList from './addLanguageToDiscussionList';\nimport useLocalisedLastDiscussionOnTagsPage from './useLocalisedLastDiscussionOnTagsPage';\nimport extendSubscriptionModal from './extendSubscriptionModal';\n\nexport * from './components';\nexport * from '../common/utils';\nexport * from '../common/models';\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/discussion-language', () => {\n addEditLanguageModal();\n addLanguageComposer();\n addLanguageToDiscussionList();\n useLocalisedLastDiscussionOnTagsPage();\n extendSubscriptionModal();\n});\n","import app from 'flarum/forum/app';\n\nimport Tag from 'flarum/tags/common/models/Tag';\n\nimport Discussion from 'flarum/common/models/Discussion';\nimport Model from 'flarum/common/Model';\n\nexport default function useLocalisedLastDiscussionOnTagsPage() {\n if (!('flarum-tags' in flarum.extensions)) return;\n\n Tag.prototype.lastPostedDiscussion = function (this: Tag) {\n const original = Model.hasOne('lastPostedDiscussion').bind(this);\n\n if (!app.forum.attribute('fof-discussion-language.useLocaleForTagsPageLastDiscussion')) {\n return original();\n }\n\n const data = this.localisedLastDiscussion();\n\n /**\n * Priorities:\n *\n * 1. User's selected forum locale\n * 2. Detected locale\n * 3. First disucssion language available\n */\n const desiredLanguageCode =\n app.session.user?.preferences?.()?.locale || (app.translator as any).formatter.locale || (app.forum as any).discussionLanguages()[0].code();\n\n const desiredLanguageId = (app.forum as any)\n .discussionLanguages()\n .find((lang: any) => lang.code() === desiredLanguageCode)\n ?.id();\n\n // If forum locale not available as a discussion lang, default to any language\n if (!desiredLanguageId) {\n return original();\n }\n\n const discussion = data[desiredLanguageId];\n\n // fall back to original attribute\n if (!discussion) return original();\n\n return new Discussion({\n attributes: {\n title: discussion.title,\n slug: discussion.id, // navigating using only ID works fine\n lastPostedAt: new Date(discussion.at * 1000).toISOString(),\n },\n });\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport { components } from '@fof-follow-tags';\nimport LanguageDropdown from './components/LanguageDropdown';\nimport Stream from 'flarum/common/utils/Stream';\n\nconst SUBSCRIPTION_LANGUAGE_PRIORITY = 80;\n\nexport default function extendSubscriptionModal() {\n if (!('fof-follow-tags' in flarum.extensions)) return;\n\n extend(components.SubscriptionModal.prototype, 'oninit', function () {\n const tag = this.attrs.model;\n const subscriptionLanguage = tag.subscriptionLanguage();\n this.language = Stream(subscriptionLanguage);\n });\n\n extend(components.SubscriptionModal.prototype, 'formOptionItems', function (items) {\n items.add(\n 'subscription_language',\n
\n \n

{app.translator.trans('fof-discussion-language.forum.sub_controls.subscription_language_help')}

\n {\n if (typeof key !== 'string') return;\n\n this.language(key);\n }}\n />\n
,\n SUBSCRIPTION_LANGUAGE_PRIORITY\n );\n });\n\n extend(components.SubscriptionModal.prototype, 'requestData', function (data) {\n data.language = this.language();\n\n return data;\n });\n}\n"],"names":["module","exports","str","r","c","p","i","l","length","charCodeAt","push","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","language","emoji","m","alt","country","className","draggable","loading","src","basename","icon","_extends","assign","target","arguments","source","apply","this","generateLanguageOptions","extraOptions","options","app","all","forEach","lang","code","LanguageDisplay","_Component","_this","_len","args","Array","_key","concat","_proto","oninit","vnode","attrs","extra","view","_this$attrs","uppercase","name","flag","toUpperCase","Component","LanguageDiscussionModal","_Modal","languages","filter","current","selected","discussion","title","trans","content","map","Button","onclick","select","bind","hideSubmitButton","type","disabled","onsubmit","redraw","e","_this2","preventDefault","hide","save","relationships","then","DiscussionPage","stream","update","loaded","Modal","sort","b","toLowerCase","LanguageDropdown","_Dropdown","initAttrs","buttonClassName","classList","loadLanguages","Stream","initSelectedLanguage","getDefaultLanguage","attribute","getLocale","buildDropdownContent","keys","langId","isItemSelected","active","children","getButton","accessibleToggleLabel","getButtonContent","caretIcon","getMenu","items","menuClassName","Dropdown","addLanguage","_this$attrs$discussio","_this$attrs$discussio2","isPrivateDiscussion","add","extensions","components","utils","Language","_Model","id","Model","apiEndpoint","exists","data","models","Extend","Discussion","hasOne","Forum","hasMany","Tag","commonExtend","extend","DiscussionControls","canChangeLanguage","show","IndexPage","promise","dislang","params","composer","fields","getBy","localeComposer","DiscussionComposer","chooseLanguage","callback","$","focus","_isByobuComposer","component","override","original","DiscussionListItem","DiscussionHero","DiscussionListState","_app$search$params$la","routeName","include","q","subscription","paramLang","locale","showAnyOpt","GlobalSearchState","route","param","defaultSelected","setRouteWithForcedRefresh","lastPostedDiscussion","_app$session$user","_app$session$user$pre","_discussionLanguages$","localisedLastDiscussion","desiredLanguageCode","user","preferences","formatter","discussionLanguages","desiredLanguageId","find","attributes","slug","lastPostedAt","Date","at","toISOString","SubscriptionModal","subscriptionLanguage","model"],"sourceRoot":""} \ No newline at end of file