diff --git a/apps/user_status/src/services/clearAtService.js b/apps/user_status/src/services/clearAtService.js
index 09766797afe3e..c2bbb4b6d4288 100644
--- a/apps/user_status/src/services/clearAtService.js
+++ b/apps/user_status/src/services/clearAtService.js
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-import { formatRelativeTime, t } from '@nextcloud/l10n'
+import { formatRelativeTime, getFirstDay, t } from '@nextcloud/l10n'
import { dateFactory } from './dateService.js'
/**
@@ -94,6 +94,6 @@ function getEndOfDay(date) {
*/
function getEndOfWeek(date) {
const endOfWeek = getEndOfDay(date)
- endOfWeek.setDate(date.getDate() + ((endOfWeek.getFirstDay() - 1 - endOfWeek.getDay() + 7) % 7))
+ endOfWeek.setDate(date.getDate() + ((getFirstDay() - 1 - endOfWeek.getDay() + 7) % 7))
return endOfWeek
}
diff --git a/dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs b/dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs
similarity index 91%
rename from dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs
rename to dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs
index f5aaa8fd68b09..a485b9b48b64b 100644
--- a/dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs
+++ b/dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs
@@ -1,2 +1,2 @@
-import{b as g,q as y,s as v,c as p,u as o,o as n,J as h,w as _,g as V,t as b,v as x,r as M,j as d,e as f,F as q,C as w,E as K,G as U}from"./runtime-dom.esm-bundler-Bpt0bWgp.chunk.mjs";import{c as j}from"./index-BOWtcdl5.chunk.mjs";import{a as C}from"./index-JpgrUA2Z-DKmwv3tf.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";import{g as E}from"./createElementId-DhjFt1I9-DX6OV2ut.chunk.mjs";import{N}from"./logger-D3RVzcfQ-i8woBVes.chunk.mjs";import{N as S}from"./NcSelect-DLheQ2yp-BPcVnN5w.chunk.mjs";import{N as A}from"./NcCheckboxRadioSwitch-BMsPx74L-DOD5lBHo.chunk.mjs";import{N as L}from"./NcPasswordField-uaMO2pdt-N70bZs5u.chunk.mjs";import{_ as z}from"./TrashCanOutline-CBc3qhbs.chunk.mjs";import{C as c,a as k}from"./types-CTMT8ggI.chunk.mjs";import{l as B}from"./logger-resIultJ.chunk.mjs";const P=g({__name:"ConfigurationEntry",props:y({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue");return(t,i)=>e.configOption.type!==o(c).Boolean?(n(),p(h(e.configOption.type===o(c).Password?o(L):o(z)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),name:e.configKey,required:!(e.configOption.flags&o(k).Optional),label:e.configOption.value,title:e.configOption.tooltip},null,8,["modelValue","name","required","label","title"])):(n(),p(o(A),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=l=>a.value=l),type:"switch",title:e.configOption.tooltip},{default:_(()=>[V(b(e.configOption.value),1)]),_:1},8,["modelValue","title"]))}}),R=g({__name:"AuthMechanismRsa",props:y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue"),t=M();x(t,()=>{t.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:l}=await j.post(E("/apps/files_external/ajax/public_key.php"),{keyLength:t.value});a.value.private_key=l.data.private_key,a.value.public_key=l.data.public_key}catch(l){B.error("Error generating RSA key pair",{error:l}),C(s("files_external","Error generating key pair"))}}return(l,m)=>(n(),d("div",null,[(n(!0),d(q,null,w(e.authMechanism.configuration,(r,u)=>K((n(),p(P,{key:r.value,modelValue:a.value[u],"onUpdate:modelValue":O=>a.value[u]=O,configKey:u,configOption:r},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[U,!(r.flags&o(k).Hidden)]])),128)),f(o(S),{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=r=>t.value=r),clearable:!1,inputLabel:o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","inputLabel"]),f(o(N),{disabled:!t.value,wide:"",onClick:i},{default:_(()=>[V(b(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{$ as A,P as _};
-//# sourceMappingURL=AuthMechanismRsa-DQgFdtSy.chunk.mjs.map
+import{b as g,q as y,s as v,c as p,u as o,o as n,J as h,w as _,g as V,t as b,v as x,r as M,j as d,e as f,F as q,C as w,E as K,G as U}from"./runtime-dom.esm-bundler-Bpt0bWgp.chunk.mjs";import{c as j}from"./index-BOWtcdl5.chunk.mjs";import{a as C}from"./index-JpgrUA2Z-C4P8jpnE.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";import{g as E}from"./createElementId-DhjFt1I9-DX6OV2ut.chunk.mjs";import{N}from"./logger-D3RVzcfQ-i8woBVes.chunk.mjs";import{N as S}from"./NcSelect-DLheQ2yp-CYYHfXn5.chunk.mjs";import{N as A}from"./NcCheckboxRadioSwitch-BMsPx74L-DOD5lBHo.chunk.mjs";import{N as L}from"./NcPasswordField-uaMO2pdt-N70bZs5u.chunk.mjs";import{_ as z}from"./TrashCanOutline-CBc3qhbs.chunk.mjs";import{C as c,a as k}from"./types-CTMT8ggI.chunk.mjs";import{l as B}from"./logger-resIultJ.chunk.mjs";const P=g({__name:"ConfigurationEntry",props:y({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue");return(t,i)=>e.configOption.type!==o(c).Boolean?(n(),p(h(e.configOption.type===o(c).Password?o(L):o(z)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),name:e.configKey,required:!(e.configOption.flags&o(k).Optional),label:e.configOption.value,title:e.configOption.tooltip},null,8,["modelValue","name","required","label","title"])):(n(),p(o(A),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=l=>a.value=l),type:"switch",title:e.configOption.tooltip},{default:_(()=>[V(b(e.configOption.value),1)]),_:1},8,["modelValue","title"]))}}),R=g({__name:"AuthMechanismRsa",props:y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue"),t=M();x(t,()=>{t.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:l}=await j.post(E("/apps/files_external/ajax/public_key.php"),{keyLength:t.value});a.value.private_key=l.data.private_key,a.value.public_key=l.data.public_key}catch(l){B.error("Error generating RSA key pair",{error:l}),C(s("files_external","Error generating key pair"))}}return(l,m)=>(n(),d("div",null,[(n(!0),d(q,null,w(e.authMechanism.configuration,(r,u)=>K((n(),p(P,{key:r.value,modelValue:a.value[u],"onUpdate:modelValue":O=>a.value[u]=O,configKey:u,configOption:r},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[U,!(r.flags&o(k).Hidden)]])),128)),f(o(S),{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=r=>t.value=r),clearable:!1,inputLabel:o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","inputLabel"]),f(o(N),{disabled:!t.value,wide:"",onClick:i},{default:_(()=>[V(b(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{$ as A,P as _};
+//# sourceMappingURL=AuthMechanismRsa-Bx-HKKoK.chunk.mjs.map
diff --git a/dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs.license b/dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs.license
similarity index 100%
rename from dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs.license
rename to dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs.license
diff --git a/dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs.map b/dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs.map
similarity index 98%
rename from dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs.map
rename to dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs.map
index 97c44fe71a6cf..affe24cde8899 100644
--- a/dist/AuthMechanismRsa-DQgFdtSy.chunk.mjs.map
+++ b/dist/AuthMechanismRsa-Bx-HKKoK.chunk.mjs.map
@@ -1 +1 @@
-{"version":3,"file":"AuthMechanismRsa-DQgFdtSy.chunk.mjs","sources":["../build/frontend/apps/files_external/src/components/AddExternalStorageDialog/ConfigurationEntry.vue","../build/frontend/apps/files_external/src/views/AuthMechanismRsa.vue"],"sourcesContent":["\n\n\n\n\n\t\n\t\n\t\t{{ configOption.value }}\n\t\n\n","\n\n\n\n\n\t
\n\n"],"names":["value","_useModel","__props","_unref","ConfigurationType","_createBlock","_resolveDynamicComponent","NcPasswordField","NcTextField","$event","ConfigurationFlag","NcCheckboxRadioSwitch","_createTextVNode","_toDisplayString","modelValue","keySize","ref","watch","generateKeys","data","axios","generateUrl","error","logger","showError","t","_createElementBlock","_openBlock","_Fragment","configOption","configKey","ConfigurationEntry","_vShow","_createVNode","NcSelect","NcButton"],"mappings":"6+BAaA,MAAMA,EAAQC,EAA6BC,EAAC,YAA6B,eAWjEA,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,aAF/CC,EAOiCC,EAN3BJ,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,SAAWD,EAAAI,CAAA,EAAkBJ,EAAAK,CAAA,CAAW,EAAA,kBAE5ER,EAAA,2CAAAA,EAAK,MAAAS,GACb,KAAMP,EAAA,UACN,WAAYA,EAAA,aAAa,MAAQC,EAAAO,CAAA,EAAkB,UACnD,MAAOR,EAAA,aAAa,MACpB,MAAOA,EAAA,aAAa,OAAA,iEACtBG,EAMwBF,EAAAQ,CAAA,EAAA,kBAJdX,EAAA,2CAAAA,E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C,QAAOG,CAAA,aACR,IAA0C,KAAvCf,EAAAsB,CAAA,EAAC,iBAAA,eAAA,CAAA,EAAA,CAAA,CAAA"}
\ No newline at end of file
+{"version":3,"file":"AuthMechanismRsa-Bx-HKKoK.chunk.mjs","sources":["../build/frontend/apps/files_external/src/components/AddExternalStorageDialog/ConfigurationEntry.vue","../build/frontend/apps/files_external/src/views/AuthMechanismRsa.vue"],"sourcesContent":["\n\n\n\n\n\t\n\t\n\t\t{{ configOption.value }}\n\t\n\n","\n\n\n\n\n\t
\n\t\t\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ version.label === '' ? t('files_versions', 'Name this version') : t('files_versions', 'Edit version name') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Compare to current version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Restore version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Download version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Delete version') }}\n\t\t\t\n\t\t\n\t\n\n\n\n\n\n","\n\n\t\n\t\t\n\n\t\t
\n\t\t\t{{ t('files_versions', 'Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.') }}\n\t\t
\n\t\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files_version')\n\t.detectUser()\n\t.build()\n","\n\n\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t\n\t\t\n\t
\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport default `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`\n","/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getClient } from '@nextcloud/files/dav'\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { encodePath, join } from '@nextcloud/paths'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport davRequest from '../utils/davRequest.ts'\nimport logger from '../utils/logger.ts'\n\nexport interface Version {\n\tfileId: string // The id of the file associated to the version.\n\tlabel: string // 'Current version' or ''\n\tauthor: string | null // UID for the author of the version\n\tauthorName: string | null // Display name of the author\n\tfilename: string // File name relative to the version DAV endpoint\n\tbasename: string // A base name generated from the mtime\n\tmime: string // Empty for the current version, else the actual mime type of the version\n\tetag: string // Empty for the current version, else the actual mime type of the version\n\tsize: number // File size in bytes\n\ttype: string // 'file'\n\tmtime: number // Version creation date as a timestamp\n\tpermissions: string // Only readable: 'R'\n\tpreviewUrl: string // Preview URL of the version\n\turl: string // Download URL of the version\n\tsource: string // The WebDAV endpoint of the resource\n\tfileVersion: string | null // The version id, null for the current version\n}\n\nconst client = getClient()\n\n/**\n * Get file versions for a given node\n *\n * @param node - The node to fetch versions for\n */\nexport async function fetchVersions(node: INode): Promise {\n\tconst path = `/versions/${getCurrentUser()?.uid}/versions/${node.fileid}`\n\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: davRequest,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed\n\n\t\tconst versions = response.data\n\t\t\t// Filter out root\n\t\t\t.filter(({ mime }) => mime !== '')\n\t\t\t.map((version) => formatVersion(version as Required, node))\n\n\t\tconst authorIds = new Set(versions.map((version) => String(version.author)))\n\t\tconst authors = await axios.post(generateUrl('/displaynames'), { users: [...authorIds] })\n\n\t\tfor (const version of versions) {\n\t\t\tconst author = authors.data.users[version.author ?? '']\n\t\t\tif (author) {\n\t\t\t\tversion.authorName = author\n\t\t\t}\n\t\t}\n\n\t\treturn versions\n\t} catch (exception) {\n\t\tlogger.error('Could not fetch version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Restore the given version\n *\n * @param version - The version to restore\n */\nexport async function restoreVersion(version: Version) {\n\ttry {\n\t\tlogger.debug('Restoring version', { url: version.url })\n\t\tawait client.moveFile(\n\t\t\t`/versions/${getCurrentUser()?.uid}/versions/${version.fileId}/${version.fileVersion}`,\n\t\t\t`/versions/${getCurrentUser()?.uid}/restore/target`,\n\t\t)\n\t} catch (exception) {\n\t\tlogger.error('Could not restore version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Format version\n *\n * @param version - The version data from WebDAV\n * @param node - The original node\n */\nfunction formatVersion(version: Required, node: INode): Version {\n\tconst mtime = Date.parse(version.lastmod)\n\tlet previewUrl = ''\n\n\tif (mtime === node.mtime?.getTime()) { // Version is the current one\n\t\tpreviewUrl = generateUrl('/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0&forceIcon=1&mimeFallback=1', {\n\t\t\tfileId: node.fileid,\n\t\t\tfileEtag: node.attributes.etag,\n\t\t})\n\t} else {\n\t\tpreviewUrl = generateUrl('/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1', {\n\t\t\tfile: node.path,\n\t\t\tfileVersion: version.basename,\n\t\t})\n\t}\n\n\treturn {\n\t\tfileId: node.fileid!.toString(),\n\t\t// If version-label is defined make sure it is a string (prevent issue if the label is a number an PHP returns a number then)\n\t\tlabel: version.props['version-label'] ? String(version.props['version-label']) : '',\n\t\tauthor: version.props['version-author'] ? String(version.props['version-author']) : null,\n\t\tauthorName: null,\n\t\tfilename: version.filename,\n\t\tbasename: new Date(mtime).toLocaleString(\n\t\t\t[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],\n\t\t\t{\n\t\t\t\ttimeStyle: 'long',\n\t\t\t\tdateStyle: 'medium',\n\t\t\t},\n\t\t),\n\t\tmime: version.mime,\n\t\tetag: `${version.props.getetag}`,\n\t\tsize: version.size,\n\t\ttype: version.type,\n\t\tmtime,\n\t\tpermissions: 'R',\n\t\tpreviewUrl,\n\t\turl: join('/remote.php/dav', version.filename),\n\t\tsource: generateRemoteUrl('dav') + encodePath(version.filename),\n\t\tfileVersion: version.basename,\n\t}\n}\n\n/**\n * Set version label\n *\n * @param version - The version to set the label for\n * @param newLabel - The new label\n */\nexport async function setVersionLabel(version: Version, newLabel: string) {\n\treturn await client.customRequest(\n\t\tversion.filename,\n\t\t{\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata: `\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${newLabel}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t`,\n\t\t},\n\t)\n}\n\n/**\n * Delete version\n *\n * @param version - The version to delete\n */\nexport async function deleteVersion(version: Version) {\n\tawait client.deleteFile(version.filename)\n}\n","\n\n\t
\n\n\n\n\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","props","__props","emit","__emit","previewLoaded","ref","previewErrored","capabilities","loadState","humanReadableSize","computed","formatFileSize","versionLabel","label","t","versionAuthor","getCurrentUser","versionHumanExplicitDate","getCanonicalLocale","downloadURL","getRootUrl","enableLabeling","enableDeletion","hasDeletePermissions","hasPermission","Permission","hasUpdatePermissions","isDownloadable","attribute","labelUpdate","restoreVersion","deleteVersion","nextTick","click","event","compareVersion","node","permission","_createBlock","_unref","NcListItem","_createVNode","ImageOffOutline","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","NcAvatar","_hoisted_8","_hoisted_9","NcDateTime","NcActionButton","Pencil","_createTextVNode","FileCompare","BackupRestore","NcActionLink","Download","Delete","labelInput","useTemplateRef","internalLabel","dialogButtons","buttons","setVersionLabel","svgCheck","watchEffect","NcDialog","$emit","NcTextField","_toDisplayString","logger","getLoggerBuilder","_sfc_main$1","defineComponent","containerHeight","containerTop","containerBottom","currentRowTop","currentRowBottom","visibleSections","section","visibleRows","row","distance","visibleItems","rows","items","rowIdToKeyMap","item","usedTokens","key","unusedTokens","finalMapping","id","totalHeight","sectionHeight","paddingTop","buffer","value","currentRowTopDistanceFromTop","entries","entry","cr","_normalizeStyle","_renderSlot","davRequest","client","getClient","fetchVersions","path","versions","mime","version","formatVersion","authorIds","authors","axios","generateUrl","author","exception","mtime","previewUrl","join","generateRemoteUrl","encodePath","newLabel","isMobile","useIsMobile","loading","showVersionLabelForm","editedVersion","watch","toRef","currentVersionMtime","orderedVersions","a","b","sections","initialVersionMtime","canView","canCompare","handleRestore","restoredNode","restoreStartedEventState","showSuccess","showError","handleLabelUpdateRequest","handleLabelUpdate","oldLabel","handleDelete","index","openVersion","_versions","v","VirtualScrolling","_withCtx","_Fragment","_renderList","VersionEntry","NcLoadingIcon","VersionLabelDialog"],"mappings":"6hDAoBA,MAAKA,GAAU,CACb,KAAM,oBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,uPAAuP,iDAXnQC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,2CACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAA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A,MACV,aAAc,CAAA,GACJ,QAAOkB,EACjB,CAkBK,CAnBgB,gBAAA5E,KAAe,CACpClF,EAkBK,KAAA,CAlBA,aAAYyC,EAAAzB,CAAA,EAAC,iBAAA,eAAA,EAAqC,oCAAA,EAAA,GACtCkE,EAAgB,SAAM,GACrCjF,EAAA,EAAA,EAAAP,EAc0BqK,GAAA,CAAA,IAAA,CAAA,EAAAC,GAbT9E,EAAe,CAAA,EAAI,KAA3BG,QADT7C,EAc0ByH,GAAA,CAZxB,IAAK5E,EAAI,MAAK,CAAA,EAAI,QAAQ,MAC1B,QAASyD,EAAA,MACT,WAAYC,EAAA,MACZ,YAAa5I,EAAA,OACb,QAASkF,EAAI,SAAS,QACtB,KAAMlF,EAAA,KACN,UAAWkF,EAAI,SAAS,QAAQ,QAAUmD,EAAA,MAC1C,eAAgBnD,EAAI,SAAS,QAAQ,QAAUwD,EAAA,MAC/C,QAAOa,EACP,UAASrH,EACT,UAAS2G,EACT,wBAAoBK,EAAyBhE,EAAI,SAAS,OAAO,EACjE,SAAQmE,CAAA,gJAIF,SACV,IAAkE,CAA7CrB,EAAA,WAArB3F,EAAkEC,EAAAyH,EAAA,EAAA,OAApC,MAAM,2BAAA,oCAI/B7B,EAAA,WADP7F,EAIqC2H,GAAA,OAF5B,KAAM/B,EAAA,qCAAAA,EAAoB,MAAArI,GACjC,MAAOsI,EAAA,MAAc,MACrB,iBAAciB,CAAA","x_google_ignoreList":[0,1,2]}
\ No newline at end of file
+{"version":3,"file":"FilesVersionsSidebarTab-CxP5X0EM.chunk.mjs","sources":["../node_modules/vue-material-design-icons/BackupRestore.vue","../node_modules/vue-material-design-icons/FileCompare.vue","../node_modules/vue-material-design-icons/ImageOffOutline.vue","../build/frontend/apps/files_versions/src/components/VersionEntry.vue","../build/frontend/apps/files_versions/src/components/VersionLabelDialog.vue","../build/frontend/apps/files_versions/src/utils/logger.ts","../build/frontend/apps/files_versions/src/components/VirtualScrolling.vue","../build/frontend/apps/files_versions/src/utils/davRequest.ts","../build/frontend/apps/files_versions/src/utils/versions.ts","../build/frontend/apps/files_versions/src/views/FilesVersionsSidebarTab.vue"],"sourcesContent":["\n \n \n \n\n\n","\n \n \n \n\n\n","\n \n \n \n\n\n","\n\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ version.label === '' ? t('files_versions', 'Name this version') : t('files_versions', 'Edit version name') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Compare to current version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Restore version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Download version') }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{ t('files_versions', 'Delete version') }}\n\t\t\t\n\t\t\n\t\n\n\n\n\n\n","\n\n\t\n\t\t\n\n\t\t
\n\t\t\t{{ t('files_versions', 'Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.') }}\n\t\t
\n\t\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files_version')\n\t.detectUser()\n\t.build()\n","\n\n\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t\n\t\t\n\t
\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport default `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`\n","/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getClient } from '@nextcloud/files/dav'\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { encodePath, join } from '@nextcloud/paths'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport davRequest from '../utils/davRequest.ts'\nimport logger from '../utils/logger.ts'\n\nexport interface Version {\n\tfileId: string // The id of the file associated to the version.\n\tlabel: string // 'Current version' or ''\n\tauthor: string | null // UID for the author of the version\n\tauthorName: string | null // Display name of the author\n\tfilename: string // File name relative to the version DAV endpoint\n\tbasename: string // A base name generated from the mtime\n\tmime: string // Empty for the current version, else the actual mime type of the version\n\tetag: string // Empty for the current version, else the actual mime type of the version\n\tsize: number // File size in bytes\n\ttype: string // 'file'\n\tmtime: number // Version creation date as a timestamp\n\tpermissions: string // Only readable: 'R'\n\tpreviewUrl: string // Preview URL of the version\n\turl: string // Download URL of the version\n\tsource: string // The WebDAV endpoint of the resource\n\tfileVersion: string | null // The version id, null for the current version\n}\n\nconst client = getClient()\n\n/**\n * Get file versions for a given node\n *\n * @param node - The node to fetch versions for\n */\nexport async function fetchVersions(node: INode): Promise {\n\tconst path = `/versions/${getCurrentUser()?.uid}/versions/${node.fileid}`\n\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: davRequest,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed\n\n\t\tconst versions = response.data\n\t\t\t// Filter out root\n\t\t\t.filter(({ mime }) => mime !== '')\n\t\t\t.map((version) => formatVersion(version as Required, node))\n\n\t\tconst authorIds = new Set(versions.map((version) => String(version.author)))\n\t\tconst authors = await axios.post(generateUrl('/displaynames'), { users: [...authorIds] })\n\n\t\tfor (const version of versions) {\n\t\t\tconst author = authors.data.users[version.author ?? '']\n\t\t\tif (author) {\n\t\t\t\tversion.authorName = author\n\t\t\t}\n\t\t}\n\n\t\treturn versions\n\t} catch (exception) {\n\t\tlogger.error('Could not fetch version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Restore the given version\n *\n * @param version - The version to restore\n */\nexport async function restoreVersion(version: Version) {\n\ttry {\n\t\tlogger.debug('Restoring version', { url: version.url })\n\t\tawait client.moveFile(\n\t\t\t`/versions/${getCurrentUser()?.uid}/versions/${version.fileId}/${version.fileVersion}`,\n\t\t\t`/versions/${getCurrentUser()?.uid}/restore/target`,\n\t\t)\n\t} catch (exception) {\n\t\tlogger.error('Could not restore version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Format version\n *\n * @param version - The version data from WebDAV\n * @param node - The original node\n */\nfunction formatVersion(version: Required, node: INode): Version {\n\tconst mtime = Date.parse(version.lastmod)\n\tlet previewUrl = ''\n\n\tif (mtime === node.mtime?.getTime()) { // Version is the current one\n\t\tpreviewUrl = generateUrl('/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0&forceIcon=1&mimeFallback=1', {\n\t\t\tfileId: node.fileid,\n\t\t\tfileEtag: node.attributes.etag,\n\t\t})\n\t} else {\n\t\tpreviewUrl = generateUrl('/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1', {\n\t\t\tfile: node.path,\n\t\t\tfileVersion: version.basename,\n\t\t})\n\t}\n\n\treturn {\n\t\tfileId: node.fileid!.toString(),\n\t\t// If version-label is defined make sure it is a string (prevent issue if the label is a number an PHP returns a number then)\n\t\tlabel: version.props['version-label'] ? String(version.props['version-label']) : '',\n\t\tauthor: version.props['version-author'] ? String(version.props['version-author']) : null,\n\t\tauthorName: null,\n\t\tfilename: version.filename,\n\t\tbasename: new Date(mtime).toLocaleString(\n\t\t\t[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],\n\t\t\t{\n\t\t\t\ttimeStyle: 'long',\n\t\t\t\tdateStyle: 'medium',\n\t\t\t},\n\t\t),\n\t\tmime: version.mime,\n\t\tetag: `${version.props.getetag}`,\n\t\tsize: version.size,\n\t\ttype: version.type,\n\t\tmtime,\n\t\tpermissions: 'R',\n\t\tpreviewUrl,\n\t\turl: join('/remote.php/dav', version.filename),\n\t\tsource: generateRemoteUrl('dav') + encodePath(version.filename),\n\t\tfileVersion: version.basename,\n\t}\n}\n\n/**\n * Set version label\n *\n * @param version - The version to set the label for\n * @param newLabel - The new label\n */\nexport async function setVersionLabel(version: Version, newLabel: string) {\n\treturn await client.customRequest(\n\t\tversion.filename,\n\t\t{\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata: `\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${newLabel}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t`,\n\t\t},\n\t)\n}\n\n/**\n * Delete version\n *\n * @param version - The version to delete\n */\nexport async function deleteVersion(version: Version) {\n\tawait client.deleteFile(version.filename)\n}\n","\n\n\t
\n\n\n\n","const _String = String\n\nexport default _String.fromCodePoint ||\n function stringFromCodePoint() {\n var MAX_SIZE = 0x4000\n var codeUnits = []\n var highSurrogate\n var lowSurrogate\n var index = -1\n var length = arguments.length\n if (!length) {\n return ''\n }\n var result = ''\n while (++index < length) {\n var codePoint = Number(arguments[index])\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10ffff || // not a valid Unicode code point\n Math.floor(codePoint) != codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint)\n }\n if (codePoint <= 0xffff) {\n // BMP code point\n codeUnits.push(codePoint)\n } else {\n // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000\n highSurrogate = (codePoint >> 10) + 0xd800\n lowSurrogate = (codePoint % 0x400) + 0xdc00\n codeUnits.push(highSurrogate, lowSurrogate)\n }\n if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n result += String.fromCharCode.apply(null, codeUnits)\n codeUnits.length = 0\n }\n }\n return result\n }\n","import stringFromCodePoint from '../polyfills/stringFromCodePoint'\n\nfunction unifiedToNative(unified) {\n var unicodes = unified.split('-'),\n codePoints = unicodes.map((u) => `0x${u}`)\n\n return stringFromCodePoint.apply(null, codePoints)\n}\n\nfunction uniq(arr) {\n return arr.reduce((acc, item) => {\n if (acc.indexOf(item) === -1) {\n acc.push(item)\n }\n return acc\n }, [])\n}\n\nfunction intersect(a, b) {\n const uniqA = uniq(a)\n const uniqB = uniq(b)\n\n return uniqA.filter((item) => uniqB.indexOf(item) >= 0)\n}\n\nfunction deepMerge(a, b) {\n var o = {}\n\n for (let key in a) {\n let originalValue = a[key],\n value = originalValue\n\n if (Object.prototype.hasOwnProperty.call(b, key)) {\n value = b[key]\n }\n\n if (typeof value === 'object') {\n value = deepMerge(originalValue, value)\n }\n\n o[key] = value\n }\n\n return o\n}\n\n// https://github.com/sonicdoe/measure-scrollbar\nfunction measureScrollbar() {\n if (typeof document == 'undefined') return 0\n const div = document.createElement('div')\n\n div.style.width = '100px'\n div.style.height = '100px'\n div.style.overflow = 'scroll'\n div.style.position = 'absolute'\n div.style.top = '-9999px'\n\n document.body.appendChild(div)\n const scrollbarWidth = div.offsetWidth - div.clientWidth\n document.body.removeChild(div)\n\n return scrollbarWidth\n}\n\nexport { uniq, intersect, deepMerge, unifiedToNative, measureScrollbar }\n","import { intersect, unifiedToNative } from './index'\nimport { uncompress, buildSearch } from './data'\nimport frequently from './frequently'\n\nconst SHEET_COLUMNS = 61\nconst COLONS_REGEX = /^(?:\\:([^\\:]+)\\:)(?:\\:skin-tone-(\\d)\\:)?$/\n// Skin tones\nconst SKINS = ['1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF']\n\n/**\n * Emoji data structure:\n * {\n * \"compressed\": false,\n * \"aliases\": {\n * collision: \"boom\"\n * cooking: \"fried_egg\"\n * envelope: \"email\"\n * face_with_finger_covering_closed_lips: \"shushing_face\"\n * ...\n * },\n * \"categories\": [ {\n * id: \"people\",\n * name: \"Smileys & Emotion\",\n * emojis: [ \"grinning\", \"grin\", \"joy\", ... ]\n * }, {\n * id: \"nature\",\n * name: \"Animals & Nature\",\n * emojis: [ \"monkey_face\", \"money\", \"gorilla\", ... ]\n * },\n * ...\n * ],\n * \"emojis\": [\n * smiley: {\n * added_in: \"6.0\",\n * emoticons: [\"=)\", \"=-)\"],\n * has_img_apple: true,\n * has_img_facebook: true,\n * has_img_google: true,\n * has_img_twitter: true,\n * keywords: [\"face\", \"happy\", \"joy\", \"haha\", \":D\", \":)\", \"smile\", \"funny\"],\n * name: \"Smiling Face with Open Mouth\",\n * non_qualified: undefined,\n * search: \"smiley,smiling,face,with,open,mouth,happy,joy,haha,:d,:),smile,funny,=),=-)\",\n * sheet_x: 30,\n * sheet_y: 27,\n * short_names: [\"smiley\"],\n * text: \":)\",\n * unified: \"1F603\",\n * }, {\n * +1: { // emoji with skin_variations\n * ..., // all the regular fields are present\n * name: \"Thumbs Up Sign\",\n * short_names: (2) [\"+1\", \"thumbsup\"],\n * skin_variations: {\n * 1F3FB: // each variation has additional set of fields:\n * added_in: \"8.0\",\n * has_img_apple: true,\n * has_img_facebook: true,\n * has_img_google: true,\n * has_img_twitter: true,\n * image: \"1f44d-1f3fb.png\",\n * non_qualified: null,\n * sheet_x: 14,\n * sheet_y: 50,\n * unified: \"1F44D-1F3FB\",\n * 1F3FB: {…},\n * 1F3FC: {…},\n * 1F3FD: {…},\n * 1F3FE: {…},\n * 1F3FF: {…}\n * },\n * ...\n * },\n * a: { // emoji with non_qualified field set\n * added_in: \"6.0\",\n * emoticons: undefined,\n * has_img_apple: true,\n * ...\n * non_qualified: \"1F170\",\n * unified: \"1F170-FE0F\",\n * },\n * ...\n * ]\n * }\n */\n\n/**\n * Wraps raw jason emoji data, serves as data source for\n * emoji picker components.\n *\n * Usage:\n *\n * import data from '../data/all.json'\n * let index = new EmojiIndex(data)\n *\n */\nexport class EmojiIndex {\n /**\n * Constructor.\n *\n * @param {object} data - Raw json data, see the structure above.\n * @param {object} options - additional options, as an object:\n * @param {Function} emojisToShowFilter - optional, function to filter out\n * some emojis, function(emoji) { return true|false }\n * where `emoji` is an raw emoji object, see data.emojis above.\n * @param {Array} include - optional, a list of category ids to include.\n * @param {Array} exclude - optional, a list of category ids to exclude.\n * @param {Array} custom - optional, a list custom emojis, each emoji is\n * an object, see data.emojis above for examples.\n */\n constructor(\n data,\n {\n emojisToShowFilter,\n include,\n exclude,\n custom,\n recent,\n recentLength = 20,\n } = {},\n ) {\n this._data = uncompress(data)\n // Callback to exclude specific emojis\n this._emojisFilter = emojisToShowFilter || null\n // Categories to include / exclude\n this._include = include || null\n this._exclude = exclude || null\n // Custom emojis\n this._custom = custom || []\n // Recent emojis\n // TODO: make parameter configurable\n this._recent = recent || frequently.get(recentLength)\n\n this._emojis = {}\n this._nativeEmojis = {}\n this._emoticons = {}\n\n this._categories = []\n this._recentCategory = { id: 'recent', name: 'Recent', emojis: [] }\n this._customCategory = { id: 'custom', name: 'Custom', emojis: [] }\n this._searchIndex = {}\n this.buildIndex()\n Object.freeze(this)\n }\n\n buildIndex() {\n let allCategories = this._data.categories\n\n if (this._include) {\n // Remove categories that are not in the include list.\n allCategories = allCategories.filter((item) => {\n return this._include.includes(item.id)\n })\n // Sort categories according to the include list.\n allCategories = allCategories.sort((a, b) => {\n const indexA = this._include.indexOf(a.id)\n const indexB = this._include.indexOf(b.id)\n if (indexA < indexB) {\n return -1\n }\n if (indexA > indexB) {\n return 1\n }\n return 0\n })\n }\n\n allCategories.forEach((categoryData) => {\n if (!this.isCategoryNeeded(categoryData.id)) {\n return\n }\n let category = {\n id: categoryData.id,\n name: categoryData.name,\n emojis: [],\n }\n categoryData.emojis.forEach((emojiId) => {\n let emoji = this.addEmoji(emojiId)\n if (emoji) {\n category.emojis.push(emoji)\n }\n })\n if (category.emojis.length) {\n this._categories.push(category)\n }\n })\n\n if (this.isCategoryNeeded('custom')) {\n if (this._custom.length > 0) {\n for (let customEmoji of this._custom) {\n this.addCustomEmoji(customEmoji)\n }\n }\n if (this._customCategory.emojis.length) {\n this._categories.push(this._customCategory)\n }\n }\n\n if (this.isCategoryNeeded('recent')) {\n if (this._recent.length) {\n this._recent.map((id) => {\n for (let customEmoji of this._customCategory.emojis) {\n if (customEmoji.id === id) {\n this._recentCategory.emojis.push(customEmoji)\n return\n }\n }\n if (this.hasEmoji(id)) {\n this._recentCategory.emojis.push(this.emoji(id))\n }\n return\n })\n }\n // Add recent category to the top\n if (this._recentCategory.emojis.length) {\n this._categories.unshift(this._recentCategory)\n }\n }\n }\n\n /**\n * Find the emoji from the string\n */\n findEmoji(emoji, skin) {\n // 1. Parse as :emoji_name:skin-tone-xx:\n let matches = emoji.match(COLONS_REGEX)\n\n if (matches) {\n emoji = matches[1]\n if (matches[2]) {\n skin = parseInt(matches[2], 10)\n }\n }\n\n // 2. Check if the specified emoji is an alias\n if (this._data.aliases.hasOwnProperty(emoji)) {\n emoji = this._data.aliases[emoji]\n }\n\n // 3. Check if we have the specified emoji\n if (this._emojis.hasOwnProperty(emoji)) {\n let emojiObject = this._emojis[emoji]\n if (skin) {\n return emojiObject.getSkin(skin)\n }\n return emojiObject\n }\n\n // 4. Check if we have the specified native emoji\n if (this._nativeEmojis.hasOwnProperty(emoji)) {\n return this._nativeEmojis[emoji]\n }\n return null\n }\n\n categories() {\n return this._categories\n }\n\n emoji(emojiId) {\n if (this._data.aliases.hasOwnProperty(emojiId)) {\n emojiId = this._data.aliases[emojiId]\n }\n let emoji = this._emojis[emojiId]\n if (!emoji) {\n throw new Error('Can not find emoji by id: ' + emojiId)\n }\n return emoji\n }\n\n firstEmoji() {\n let emoji = this._emojis[Object.keys(this._emojis)[0]]\n if (!emoji) {\n throw new Error('Can not get first emoji')\n }\n return emoji\n }\n\n hasEmoji(emojiId) {\n if (this._data.aliases.hasOwnProperty(emojiId)) {\n emojiId = this._data.aliases[emojiId]\n }\n if (this._emojis[emojiId]) {\n return true\n }\n return false\n }\n\n nativeEmoji(unicodeEmoji) {\n if (this._nativeEmojis.hasOwnProperty(unicodeEmoji)) {\n return this._nativeEmojis[unicodeEmoji]\n }\n return null\n }\n\n search(value, maxResults) {\n maxResults || (maxResults = 75)\n if (!value.length) {\n return null\n }\n if (value == '-' || value == '-1') {\n return [this.emoji('-1')]\n }\n\n let values = value.toLowerCase().split(/[\\s|,|\\-|_]+/)\n let allResults = []\n\n if (values.length > 2) {\n values = [values[0], values[1]]\n }\n\n allResults = values\n .map((value) => {\n // Start searchin in the global list of emojis\n let emojis = this._emojis\n let currentIndex = this._searchIndex\n let length = 0\n\n for (let charIndex = 0; charIndex < value.length; charIndex++) {\n const char = value[charIndex]\n length++\n\n currentIndex[char] || (currentIndex[char] = {})\n currentIndex = currentIndex[char]\n\n if (!currentIndex.results) {\n let scores = {}\n currentIndex.results = []\n currentIndex.emojis = {}\n\n for (let emojiId in emojis) {\n let emoji = emojis[emojiId]\n // search is a comma-separated string with words, related\n // to the emoji, for example:\n // search: \"smiley,smiling,face,joy,haha,:d,:),smile,funny,=),=-)\",\n let search = emoji._data.search\n let sub = value.substr(0, length)\n let subIndex = search.indexOf(sub)\n if (subIndex != -1) {\n let score = subIndex + 1\n if (sub == emojiId) score = 0\n\n currentIndex.results.push(emoji)\n currentIndex.emojis[emojiId] = emoji\n\n scores[emojiId] = score\n }\n }\n currentIndex.results.sort((a, b) => {\n var aScore = scores[a.id],\n bScore = scores[b.id]\n return aScore - bScore\n })\n }\n\n // continue search in the reduced set of emojis\n emojis = currentIndex.emojis\n }\n return currentIndex.results\n // The \"filter\" call removes undefined values from allResults\n // array, for example, if we have \"test \" (with trailing space),\n // we will get \"[Array, undefined]\" for allResults and after\n // the \"filter\" call it will turn into \"[Array]\"\n })\n .filter((a) => a)\n\n var results = null\n if (allResults.length > 1) {\n results = intersect.apply(null, allResults)\n } else if (allResults.length) {\n results = allResults[0]\n } else {\n results = []\n }\n if (results && results.length > maxResults) {\n results = results.slice(0, maxResults)\n }\n return results\n }\n\n addCustomEmoji(customEmoji) {\n let emojiData = Object.assign({}, customEmoji, {\n id: customEmoji.short_names[0],\n custom: true,\n })\n if (!emojiData.search) {\n emojiData.search = buildSearch(emojiData)\n }\n let emoji = new EmojiData(emojiData)\n this._emojis[emoji.id] = emoji\n this._customCategory.emojis.push(emoji)\n return emoji\n }\n\n addEmoji(emojiId) {\n // We expect the correct emoji id that is present in the emojis data.\n let data = this._data.emojis[emojiId]\n\n if (!this.isEmojiNeeded(data)) {\n return false\n }\n\n let emoji = new EmojiData(data)\n this._emojis[emojiId] = emoji\n if (emoji.native) {\n this._nativeEmojis[emoji.native] = emoji\n }\n if (emoji._skins) {\n for (let idx in emoji._skins) {\n let skin = emoji._skins[idx]\n if (skin.native) {\n this._nativeEmojis[skin.native] = skin\n }\n }\n }\n\n if (emoji.emoticons) {\n emoji.emoticons.forEach((emoticon) => {\n if (this._emoticons[emoticon]) {\n return\n }\n this._emoticons[emoticon] = emojiId\n })\n }\n return emoji\n }\n\n /**\n * Check if we need to include given category.\n *\n * @param {string} category_id - The category id.\n * @return {boolean} - Whether to include the emoji.\n */\n isCategoryNeeded(category_id) {\n let isIncluded =\n this._include && this._include.length\n ? this._include.indexOf(category_id) > -1\n : true\n let isExcluded =\n this._exclude && this._exclude.length\n ? this._exclude.indexOf(category_id) > -1\n : false\n if (!isIncluded || isExcluded) {\n return false\n }\n return true\n }\n\n /**\n * Check if we need to include given emoji.\n *\n * @param {object} emoji - The raw emoji object.\n * @return {boolean} - Whether to include the emoji.\n */\n isEmojiNeeded(emoji) {\n if (this._emojisFilter) {\n return this._emojisFilter(emoji)\n }\n return true\n }\n}\n\nexport class EmojiData {\n constructor(data) {\n this._data = Object.assign({}, data)\n this._skins = null\n if (this._data.skin_variations) {\n this._skins = []\n for (var skinIdx in SKINS) {\n let skinKey = SKINS[skinIdx]\n let variationData = this._data.skin_variations[skinKey]\n let skinData = Object.assign({}, data)\n for (let k in variationData) {\n skinData[k] = variationData[k]\n }\n delete skinData.skin_variations\n skinData['skin_tone'] = parseInt(skinIdx) + 1\n this._skins.push(new EmojiData(skinData))\n }\n }\n this._sanitized = sanitize(this._data)\n for (let key in this._sanitized) {\n this[key] = this._sanitized[key]\n }\n this.short_names = this._data.short_names\n this.short_name = this._data.short_names[0]\n Object.freeze(this)\n }\n\n getSkin(skinIdx) {\n if (skinIdx && skinIdx != 'native' && this._skins) {\n return this._skins[skinIdx - 1]\n }\n return this\n }\n\n getPosition() {\n let adjustedColumns = SHEET_COLUMNS - 1,\n x = +((100 / adjustedColumns) * this._data.sheet_x).toFixed(2),\n y = +((100 / adjustedColumns) * this._data.sheet_y).toFixed(2)\n return `${x}% ${y}%`\n }\n\n ariaLabel() {\n return [this.native].concat(this.short_names).filter(Boolean).join(', ')\n }\n}\n\nexport class EmojiView {\n /**\n * emoji - Emoji to display\n * set - string, emoji set name\n * native - boolean, whether to render native emoji\n * fallback - fallback function to render missing emoji, optional\n * emojiTooltip - wether we need to show the emoji tooltip, optional\n * emojiSize - emoji size in pixels, optional\n */\n constructor(emoji, skin, set, native, fallback, emojiTooltip, emojiSize) {\n this._emoji = emoji\n this._native = native\n this._skin = skin\n this._set = set\n this._fallback = fallback\n\n this.canRender = this._canRender()\n this.cssClass = this._cssClass()\n this.cssStyle = this._cssStyle(emojiSize)\n this.content = this._content()\n this.title = emojiTooltip === true ? emoji.short_name : null\n this.ariaLabel = emoji.ariaLabel()\n\n Object.freeze(this)\n }\n\n getEmoji() {\n return this._emoji.getSkin(this._skin)\n }\n\n _canRender() {\n return (\n this._isCustom() || this._isNative() || this._hasEmoji() || this._fallback\n )\n }\n\n _cssClass() {\n return ['emoji-set-' + this._set, 'emoji-type-' + this._emojiType()]\n }\n\n _cssStyle(emojiSize) {\n let cssStyle = {}\n if (this._isCustom()) {\n cssStyle = {\n backgroundImage: 'url(' + this.getEmoji()._data.imageUrl + ')',\n backgroundSize: '100%',\n width: emojiSize + 'px',\n height: emojiSize + 'px',\n }\n } else if (this._hasEmoji() && !this._isNative()) {\n cssStyle = {\n backgroundPosition: this.getEmoji().getPosition(),\n }\n }\n if (emojiSize) {\n if (this._isNative()) {\n // Set font-size for native emoji.\n cssStyle = Object.assign(cssStyle, {\n // font-size is used for native emoji which we need\n // to scale with 0.95 factor to have them look approximately\n // the same size as image-based emoji.\n fontSize: Math.round(emojiSize * 0.95 * 10) / 10 + 'px',\n })\n } else {\n // Set width/height for image emoji.\n cssStyle = Object.assign(cssStyle, {\n width: emojiSize + 'px',\n height: emojiSize + 'px',\n })\n }\n }\n return cssStyle\n }\n\n _content() {\n if (this._isCustom()) {\n return ''\n }\n if (this._isNative()) {\n return this.getEmoji().native\n }\n if (this._hasEmoji()) {\n return ''\n }\n return this._fallback ? this._fallback(this.getEmoji()) : null\n }\n\n _isNative() {\n return this._native\n }\n\n _isCustom() {\n return this.getEmoji().custom\n }\n\n _hasEmoji() {\n if (!this.getEmoji()._data) {\n // Return false if we have no data.\n return false\n }\n const hasImage = this.getEmoji()._data['has_img_' + this._set]\n if (hasImage === undefined) {\n // If there is no has_img_xxx in the data, we are working with\n // specific data file, like facebook.json, so we assume all\n // emojis are available (the :set setting for picker should\n // match the data file).\n return true\n }\n // Otherwise, we are using all.json and can switch between different\n // sets - in this case the `has_img_{set_name}` is a boolean that\n // indicates if there is such image or not for a given set.\n return hasImage\n }\n\n _emojiType() {\n if (this._isCustom()) {\n return 'custom'\n }\n if (this._isNative()) {\n return 'native'\n }\n if (this._hasEmoji()) {\n return 'image'\n }\n return 'fallback'\n }\n}\n\nexport function sanitize(emoji) {\n var {\n name,\n short_names,\n skin_tone,\n skin_variations,\n emoticons,\n unified,\n custom,\n imageUrl,\n } = emoji,\n id = emoji.id || short_names[0],\n colons = `:${id}:`\n\n if (custom) {\n return {\n id,\n name,\n colons,\n emoticons,\n custom,\n imageUrl,\n }\n }\n\n if (skin_tone) {\n colons += `:skin-tone-${skin_tone}:`\n }\n\n return {\n id,\n name,\n colons,\n emoticons,\n unified: unified.toLowerCase(),\n skin: skin_tone || (skin_variations ? 1 : null),\n native: unifiedToNative(unified),\n }\n}\n","const EmojiProps = {\n native: {\n type: Boolean,\n default: false,\n },\n tooltip: {\n type: Boolean,\n default: false,\n },\n fallback: {\n type: Function,\n },\n skin: {\n type: Number,\n default: 1,\n },\n set: {\n type: String,\n default: 'apple',\n },\n emoji: {\n type: [String, Object],\n required: true,\n },\n size: {\n type: Number,\n default: null,\n },\n tag: {\n type: String,\n default: 'span',\n },\n}\n\nconst PickerProps = {\n perLine: {\n type: Number,\n default: 9,\n },\n maxSearchResults: {\n type: Number,\n default: 75,\n },\n emojiSize: {\n type: Number,\n default: 24,\n },\n title: {\n type: String,\n default: 'Emoji Mart™',\n },\n emoji: {\n type: String,\n default: 'department_store',\n },\n color: {\n type: String,\n default: '#ae65c5',\n },\n set: {\n type: String,\n default: 'apple',\n },\n skin: {\n type: Number,\n default: null,\n },\n defaultSkin: {\n type: Number,\n default: 1,\n },\n native: {\n type: Boolean,\n default: false,\n },\n emojiTooltip: {\n type: Boolean,\n default: false,\n },\n autoFocus: {\n type: Boolean,\n default: false,\n },\n i18n: {\n type: Object,\n default() {\n return {}\n },\n },\n showPreview: {\n type: Boolean,\n default: true,\n },\n showSearch: {\n type: Boolean,\n default: true,\n },\n showCategories: {\n type: Boolean,\n default: true,\n },\n showSkinTones: {\n type: Boolean,\n default: true,\n },\n infiniteScroll: {\n type: Boolean,\n default: true,\n },\n pickerStyles: {\n type: Object,\n default() {\n return {}\n },\n },\n}\n\nexport { EmojiProps, PickerProps }\n","\n \n {{\n view.content\n }}\n \n\n\n\n","\n \n
\n
{{ i18n.categories[id] }}
\n
\n\n \n \n \n\n
\n \n
{{ i18n.notfound }}
\n
\n \n\n\n\n","\n\n
\n \n \n \n
\n\n\n\n\n","\n\n
\n \n
\n \n
\n\n
\n
{{ emoji.name }}
\n
\n :{{ shortName }}:\n
\n
\n {{ emoticon }}\n
\n
\n \n\n \n
\n \n
\n\n
\n {{ title }}\n
\n\n
\n \n
\n \n
\n\n\n\n\n","\n
\n $emit('arrowLeft', $event)\"\n @keydown.right=\"() => $emit('arrowRight')\"\n @keydown.down=\"() => $emit('arrowDown')\"\n @keydown.up=\"($event) => $emit('arrowUp', $event)\"\n @keydown.enter=\"() => $emit('enter')\"\n v-model=\"value\"\n />\n Use the left, right, up and down arrow keys to navigate the emoji search\n results.\n
\n\n\n\n","// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\n\n// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n\n// MIT license\n\nvar isWindowAvailable = typeof window !== 'undefined'\n\nisWindowAvailable &&\n (function () {\n var lastTime = 0\n var vendors = ['ms', 'moz', 'webkit', 'o']\n\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame =\n window[vendors[x] + 'RequestAnimationFrame']\n window.cancelAnimationFrame =\n window[vendors[x] + 'CancelAnimationFrame'] ||\n window[vendors[x] + 'CancelRequestAnimationFrame']\n }\n\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function (callback, element) {\n var currTime = new Date().getTime()\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\n var id = window.setTimeout(function () {\n callback(currTime + timeToCall)\n }, timeToCall)\n\n lastTime = currTime + timeToCall\n return id\n }\n\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id)\n }\n })()\n","export class PickerView {\n constructor(pickerComponent) {\n this._vm = pickerComponent\n this._data = pickerComponent.data\n this._perLine = pickerComponent.perLine\n\n this._categories = []\n this._categories.push(...this._data.categories())\n this._categories = this._categories.filter((category) => {\n return category.emojis.length > 0\n })\n\n this._categories[0].first = true\n Object.freeze(this._categories)\n\n this.activeCategory = this._categories[0]\n this.searchEmojis = null\n\n // Preview emoji, shown on mouse over or when we move\n // with arrow keys.\n this.previewEmoji = null\n // Indexes are used to keep the position when moving\n // with arrows: current category and current emoji\n // inside the category.\n this.previewEmojiCategoryIdx = 0\n this.previewEmojiIdx = -1\n }\n\n onScroll() {\n const scrollElement = this._vm.$refs.scroll\n\n if (!scrollElement) {\n // Reported in https://github.com/serebrov/emoji-mart-vue/issues/305\n // Would be good to understand how it can happen, but at least\n // exiting early we prevent the error.\n return\n }\n\n const scrollTop = scrollElement.scrollTop\n\n let activeCategory = this.filteredCategories[0]\n for (let i = 0, l = this.filteredCategories.length; i < l; i++) {\n let category = this.filteredCategories[i]\n let component = this._vm.getCategoryComponent(i)\n // The `-50` offset switches active category (selected in the\n // anchors bar) a bit eariler, before it actually reaches the top.\n if (component && component.$el.offsetTop - 50 > scrollTop) {\n break\n }\n activeCategory = category\n }\n this.activeCategory = activeCategory\n }\n\n get allCategories() {\n return this._categories\n }\n\n get filteredCategories() {\n if (this.searchEmojis) {\n return [\n {\n id: 'search',\n name: 'Search',\n emojis: this.searchEmojis,\n },\n ]\n }\n return this._categories.filter((category) => {\n let hasEmojis = category.emojis.length > 0\n return hasEmojis\n })\n }\n\n get previewEmojiCategory() {\n if (this.previewEmojiCategoryIdx >= 0) {\n return this.filteredCategories[this.previewEmojiCategoryIdx]\n }\n return null\n }\n\n onAnchorClick(category) {\n if (this.searchEmojis) {\n // No categories are shown when search is active.\n return\n }\n let i = this.filteredCategories.indexOf(category)\n let component = this._vm.getCategoryComponent(i)\n let scrollToComponent = () => {\n if (component) {\n let top = component.$el.offsetTop\n if (category.first) {\n top = 0\n }\n this._vm.$refs.scroll.scrollTop = top\n }\n }\n if (this._vm.infiniteScroll) {\n scrollToComponent()\n } else {\n this.activeCategory = this.filteredCategories[i]\n }\n }\n\n onSearch(value) {\n let emojis = this._data.search(value, this.maxSearchResults)\n this.searchEmojis = emojis\n\n this.previewEmojiCategoryIdx = 0\n this.previewEmojiIdx = 0\n this.updatePreviewEmoji()\n }\n\n onEmojiEnter(emoji) {\n this.previewEmoji = emoji\n this.previewEmojiIdx = -1\n this.previewEmojiCategoryIdx = -1\n }\n\n onEmojiLeave(emoji) {\n this.previewEmoji = null\n }\n\n onArrowLeft() {\n // Moving left, decrease emoji index.\n if (this.previewEmojiIdx > 0) {\n this.previewEmojiIdx -= 1\n } else {\n // If emoji index is zero, go to the previous category.\n this.previewEmojiCategoryIdx -= 1\n if (this.previewEmojiCategoryIdx < 0) {\n // If we reached first category, keep it.\n this.previewEmojiCategoryIdx = 0\n } else {\n // Update emoji index - we moved to the previous category,\n // get the last emoji in it.\n this.previewEmojiIdx =\n this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length -\n 1\n }\n }\n this.updatePreviewEmoji()\n }\n\n onArrowRight() {\n if (\n this.previewEmojiIdx <\n this.emojisLength(this.previewEmojiCategoryIdx) - 1\n ) {\n // Moving right within category, increase emoji index.\n this.previewEmojiIdx += 1\n } else {\n // Go to the next category.\n this.previewEmojiCategoryIdx += 1\n if (this.previewEmojiCategoryIdx >= this.filteredCategories.length) {\n // If we reached the last category - keep it.\n this.previewEmojiCategoryIdx = this.filteredCategories.length - 1\n } else {\n // If we moved to the next category, update emoji index to the\n // first emoji in the new category.\n this.previewEmojiIdx = 0\n }\n }\n this.updatePreviewEmoji()\n }\n\n onArrowDown() {\n // If we are out of the emoji control (index is -1), select the first\n // emoji in the first category by calling `onArrowRight`.\n if (this.previewEmojiIdx == -1) {\n return this.onArrowRight()\n }\n\n const categoryLength =\n this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length\n\n // When moving down, we can move `_perLine` icons right to\n // jump to the same position in the next row.\n let diff = this._perLine\n\n // TODO: previewCategory should match activeCategory\n // (so it would be both highlighted in UI and used\n // when we start moving with arrows after clicking\n // the category).\n\n // Note: probably we can alwasy take current row length\n // as a `diff` - it will fit both case of any row and\n // special case of the last row.\n // Note: it can be also easier to update indexes\n // directly here instead of calling onArrowRight.\n // Same is true for `onArrowUp`.\n\n // Unless if we are on the last row of the category and\n // there are less then `_perLine` emojis in it.\n // In this case we use the last row length as diff\n // so we go straight down, for example:\n //\n // 1 2 3 4 5 6\n // 7 8 9\n // A B C D E F\n //\n // If we go down from `8`, we need to move 3 emojis right\n // to lend at `B` (and 3 is the length of the last row of\n // this category).\n // And if we used 6 instead (row length, `_perLine`), we would\n // lend up at `E`.\n if (this.previewEmojiIdx + diff > categoryLength) {\n // Calculate the last row length.\n diff = categoryLength % this._perLine\n }\n for (let i = 0; i < diff; i++) {\n this.onArrowRight()\n }\n this.updatePreviewEmoji()\n }\n\n onArrowUp() {\n // Similar to `onArrowDown`, to move up we can move left\n // by `_perLine` number of emojis.\n let diff = this._perLine\n\n if (this.previewEmojiIdx - diff < 0) {\n if (this.previewEmojiCategoryIdx > 0) {\n // Unless if we are on the first line of the category and\n // the last line in the previous category is shorter than\n // `_perLine`.\n // In this case we use the last row length as diff, so\n // we go straight up, for example:\n //\n // 1 2 3 4 5\n // 6 7 8\n // 9 A B C D\n //\n // If we go up from `A`, we need to move 3 emojis left to get\n // to `7` (and 3 is the length of the last row of the previous\n // category).\n const prevCategoryLastRowLength =\n this.filteredCategories[this.previewEmojiCategoryIdx - 1].emojis\n .length % this._perLine\n // diff = this.previewEmojiIdx + prevCategoryLastRowLength\n diff = prevCategoryLastRowLength\n } else {\n diff = 0\n }\n }\n for (let i = 0; i < diff; i++) {\n this.onArrowLeft()\n }\n this.updatePreviewEmoji()\n }\n\n updatePreviewEmoji() {\n this.previewEmoji =\n this.filteredCategories[this.previewEmojiCategoryIdx].emojis[\n this.previewEmojiIdx\n ]\n\n this._vm.$nextTick(() => {\n // Scroll the view if the `previewEmoji` goes out of the visible area.\n const scrollEl = this._vm.$refs.scroll\n\n // Note: it would be more Vue-ish to mark all emojis with `ref`s\n // and then do something similar here to what we do in the\n // `getCategories` instead of using `querySelector` directly,\n // but I am not sure if having many refs would affect the performance\n // (it might, so I use `querySelector` for now).\n const emojiEl = scrollEl.querySelector('.emoji-mart-emoji-selected')\n\n const scrollHeight = scrollEl.offsetTop - scrollEl.offsetHeight\n if (\n emojiEl &&\n emojiEl.offsetTop + emojiEl.offsetHeight >\n scrollHeight + scrollEl.scrollTop\n ) {\n scrollEl.scrollTop += emojiEl.offsetHeight\n }\n if (emojiEl && emojiEl.offsetTop < scrollEl.scrollTop) {\n scrollEl.scrollTop -= emojiEl.offsetHeight\n }\n })\n }\n\n emojisLength(categoryIdx) {\n if (categoryIdx == -1) {\n return 0\n }\n return this.filteredCategories[categoryIdx].emojis.length\n }\n}\n","\n \n
\n \n
\n\n \n \n \n\n
\n
\n \n\n \n
\n
\n\n \n
\n \n
\n \n \n\n\n\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.EmojiMart=t():e.EmojiMart=t()}(\"undefined\"!=typeof self?self:this,(function(){return function(){var e={537:function(){\"undefined\"!=typeof window&&function(){for(var e=0,t=[\"ms\",\"moz\",\"webkit\",\"o\"],i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}(Object.getOwnPropertyNames(e));try{for(i.s();!(t=i.n()).done;){var n=t.value,r=e[n];e[n]=r&&\"object\"===u(r)?d(r):r}}catch(e){i.e(e)}finally{i.f()}return Object.freeze(e)}var f,v,p=function(e){if(!e.compressed)return e;for(var t in e.compressed=!1,e.emojis){var i=e.emojis[t];for(var n in h)i[n]=i[h[n]],delete i[h[n]];i.short_names||(i.short_names=[]),i.short_names.unshift(t),i.sheet_x=i.sheet[0],i.sheet_y=i.sheet[1],delete i.sheet,i.text||(i.text=\"\"),i.added_in||(i.added_in=6),i.added_in=i.added_in.toFixed(1),i.search=m(i)}return d(e)},j=[\"+1\",\"grinning\",\"kissing_heart\",\"heart_eyes\",\"laughing\",\"stuck_out_tongue_winking_eye\",\"sweat_smile\",\"joy\",\"scream\",\"disappointed\",\"unamused\",\"weary\",\"sob\",\"sunglasses\",\"heart\",\"hankey\"],g={};function y(){v=!0,f=c.get(\"frequently\")}var w={add:function(e){v||y();var t=e.id;f||(f=g),f[t]||(f[t]=0),f[t]+=1,c.set(\"last\",t),c.set(\"frequently\",f)},get:function(e){if(v||y(),!f){g={};for(var t=[],i=Math.min(e,j.length),n=0;n',custom:'',flags:'',foods:'',nature:'',objects:'',smileys:'',people:'',places:'',recent:'',symbols:''};function b(e,t,i,n,r,o,s,a){var c,u=\"function\"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=\"data-v-\"+o),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||\"undefined\"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):r&&(c=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:e,options:u}}var C=b({props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default:function(){return{}}}},emits:[\"click\"],created:function(){this.svgs=_}},(function(){var e=this,t=e._self._c;return t(\"div\",{staticClass:\"emoji-mart-anchors\",attrs:{role:\"tablist\"}},e._l(e.categories,(function(i){return t(\"button\",{key:i.id,class:{\"emoji-mart-anchor\":!0,\"emoji-mart-anchor-selected\":i.id==e.activeCategory.id},style:{color:i.id==e.activeCategory.id?e.color:\"\"},attrs:{role:\"tab\",type:\"button\",\"aria-label\":i.name,\"aria-selected\":i.id==e.activeCategory.id,\"data-title\":e.i18n.categories[i.id]},on:{click:function(t){return e.$emit(\"click\",i)}}},[t(\"div\",{attrs:{\"aria-hidden\":\"true\"},domProps:{innerHTML:e._s(e.svgs[i.id])}}),e._v(\" \"),t(\"span\",{staticClass:\"emoji-mart-anchor-bar\",style:{backgroundColor:e.color},attrs:{\"aria-hidden\":\"true\"}})])})),0)}),[],!1,null,null,null),k=C.exports;function E(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function S(e){var t=function(e,t){if(\"object\"!=u(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,\"string\");if(\"object\"!=u(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==u(t)?t:t+\"\"}function x(e,t){for(var i=0;i1114111||Math.floor(s)!=s)throw RangeError(\"Invalid code point: \"+s);s<=65535?i.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,i.push(e,t)),(n+1===r||i.length>16384)&&(o+=String.fromCharCode.apply(null,i),i.length=0)}return o};function A(e){var t=e.split(\"-\").map((function(e){return\"0x\".concat(e)}));return P.apply(null,t)}function M(e){return e.reduce((function(e,t){return-1===e.indexOf(t)&&e.push(t),e}),[])}function I(e,t){var i=M(e),n=M(t);return i.filter((function(e){return n.indexOf(e)>=0}))}function F(e,t){var i={};for(var n in e){var r=e[n],o=r;Object.prototype.hasOwnProperty.call(t,n)&&(o=t[n]),\"object\"===u(o)&&(o=F(r,o)),i[n]=o}return i}function z(e,t){var i=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if(\"string\"==typeof e)return L(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===i&&e.constructor&&(i=e.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(e):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?L(e,t):void 0}}(e))||t&&e&&\"number\"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:{},n=i.emojisToShowFilter,r=i.include,o=i.exclude,s=i.custom,a=i.recent,c=i.recentLength,u=void 0===c?20:c;E(this,e),this._data=p(t),this._emojisFilter=n||null,this._include=r||null,this._exclude=o||null,this._custom=s||[],this._recent=a||w.get(u),this._emojis={},this._nativeEmojis={},this._emoticons={},this._categories=[],this._recentCategory={id:\"recent\",name:\"Recent\",emojis:[]},this._customCategory={id:\"custom\",name:\"Custom\",emojis:[]},this._searchIndex={},this.buildIndex(),Object.freeze(this)}),[{key:\"buildIndex\",value:function(){var e=this,t=this._data.categories;if(this._include&&(t=(t=t.filter((function(t){return e._include.includes(t.id)}))).sort((function(t,i){var n=e._include.indexOf(t.id),r=e._include.indexOf(i.id);return nr?1:0}))),t.forEach((function(t){if(e.isCategoryNeeded(t.id)){var i={id:t.id,name:t.name,emojis:[]};t.emojis.forEach((function(t){var n=e.addEmoji(t);n&&i.emojis.push(n)})),i.emojis.length&&e._categories.push(i)}})),this.isCategoryNeeded(\"custom\")){if(this._custom.length>0){var i,n=z(this._custom);try{for(n.s();!(i=n.n()).done;){var r=i.value;this.addCustomEmoji(r)}}catch(e){n.e(e)}finally{n.f()}}this._customCategory.emojis.length&&this._categories.push(this._customCategory)}this.isCategoryNeeded(\"recent\")&&(this._recent.length&&this._recent.map((function(t){var i,n=z(e._customCategory.emojis);try{for(n.s();!(i=n.n()).done;){var r=i.value;if(r.id===t)return void e._recentCategory.emojis.push(r)}}catch(e){n.e(e)}finally{n.f()}e.hasEmoji(t)&&e._recentCategory.emojis.push(e.emoji(t))})),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}},{key:\"findEmoji\",value:function(e,t){var i=e.match(T);if(i&&(e=i[1],i[2]&&(t=parseInt(i[2],10))),this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),this._emojis.hasOwnProperty(e)){var n=this._emojis[e];return t?n.getSkin(t):n}return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}},{key:\"categories\",value:function(){return this._categories}},{key:\"emoji\",value:function(e){this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]);var t=this._emojis[e];if(!t)throw new Error(\"Can not find emoji by id: \"+e);return t}},{key:\"firstEmoji\",value:function(){var e=this._emojis[Object.keys(this._emojis)[0]];if(!e)throw new Error(\"Can not get first emoji\");return e}},{key:\"hasEmoji\",value:function(e){return this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),!!this._emojis[e]}},{key:\"nativeEmoji\",value:function(e){return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}},{key:\"search\",value:function(e,t){var i=this;if(t||(t=75),!e.length)return null;if(\"-\"==e||\"-1\"==e)return[this.emoji(\"-1\")];var n,r=e.toLowerCase().split(/[\\s|,|\\-|_]+/);r.length>2&&(r=[r[0],r[1]]),n=r.map((function(e){for(var t=i._emojis,n=i._searchIndex,r=0,o=function(){var i=e[s];if(r++,n[i]||(n[i]={}),!(n=n[i]).results){var o={};for(var a in n.results=[],n.emojis={},t){var c=t[a],u=c._data.search,l=e.substr(0,r),h=u.indexOf(l);if(-1!=h){var m=h+1;l==a&&(m=0),n.results.push(c),n.emojis[a]=c,o[a]=m}}n.results.sort((function(e,t){return o[e.id]-o[t.id]}))}t=n.emojis},s=0;s1?I.apply(null,n):n.length?n[0]:[])&&o.length>t&&(o=o.slice(0,t)),o}},{key:\"addCustomEmoji\",value:function(e){var t=Object.assign({},e,{id:e.short_names[0],custom:!0});t.search||(t.search=m(t));var i=new N(t);return this._emojis[i.id]=i,this._customCategory.emojis.push(i),i}},{key:\"addEmoji\",value:function(e){var t=this,i=this._data.emojis[e];if(!this.isEmojiNeeded(i))return!1;var n=new N(i);if(this._emojis[e]=n,n.native&&(this._nativeEmojis[n.native]=n),n._skins)for(var r in n._skins){var o=n._skins[r];o.native&&(this._nativeEmojis[o.native]=o)}return n.emoticons&&n.emoticons.forEach((function(i){t._emoticons[i]||(t._emoticons[i]=e)})),n}},{key:\"isCategoryNeeded\",value:function(e){var t=!this._include||!this._include.length||this._include.indexOf(e)>-1,i=!(!this._exclude||!this._exclude.length)&&this._exclude.indexOf(e)>-1;return!(!t||i)}},{key:\"isEmojiNeeded\",value:function(e){return!this._emojisFilter||this._emojisFilter(e)}}])}(),N=function(){return O((function e(t){if(E(this,e),this._data=Object.assign({},t),this._skins=null,this._data.skin_variations)for(var i in this._skins=[],q){var n=q[i],r=this._data.skin_variations[n],o=Object.assign({},t);for(var s in r)o[s]=r[s];delete o.skin_variations,o.skin_tone=parseInt(i)+1,this._skins.push(new e(o))}for(var a in this._sanitized=D(this._data),this._sanitized)this[a]=this._sanitized[a];this.short_names=this._data.short_names,this.short_name=this._data.short_names[0],Object.freeze(this)}),[{key:\"getSkin\",value:function(e){return e&&\"native\"!=e&&this._skins?this._skins[e-1]:this}},{key:\"getPosition\",value:function(){var e=+(100/60*this._data.sheet_x).toFixed(2),t=+(100/60*this._data.sheet_y).toFixed(2);return\"\".concat(e,\"% \").concat(t,\"%\")}},{key:\"ariaLabel\",value:function(){return[this.native].concat(this.short_names).filter(Boolean).join(\", \")}}])}(),$=function(){return O((function e(t,i,n,r,o,s,a){E(this,e),this._emoji=t,this._native=r,this._skin=i,this._set=n,this._fallback=o,this.canRender=this._canRender(),this.cssClass=this._cssClass(),this.cssStyle=this._cssStyle(a),this.content=this._content(),this.title=!0===s?t.short_name:null,this.ariaLabel=t.ariaLabel(),Object.freeze(this)}),[{key:\"getEmoji\",value:function(){return this._emoji.getSkin(this._skin)}},{key:\"_canRender\",value:function(){return this._isCustom()||this._isNative()||this._hasEmoji()||this._fallback}},{key:\"_cssClass\",value:function(){return[\"emoji-set-\"+this._set,\"emoji-type-\"+this._emojiType()]}},{key:\"_cssStyle\",value:function(e){var t={};return this._isCustom()?t={backgroundImage:\"url(\"+this.getEmoji()._data.imageUrl+\")\",backgroundSize:\"100%\",width:e+\"px\",height:e+\"px\"}:this._hasEmoji()&&!this._isNative()&&(t={backgroundPosition:this.getEmoji().getPosition()}),e&&(t=this._isNative()?Object.assign(t,{fontSize:Math.round(.95*e*10)/10+\"px\"}):Object.assign(t,{width:e+\"px\",height:e+\"px\"})),t}},{key:\"_content\",value:function(){return this._isCustom()?\"\":this._isNative()?this.getEmoji().native:this._hasEmoji()?\"\":this._fallback?this._fallback(this.getEmoji()):null}},{key:\"_isNative\",value:function(){return this._native}},{key:\"_isCustom\",value:function(){return this.getEmoji().custom}},{key:\"_hasEmoji\",value:function(){if(!this.getEmoji()._data)return!1;var e=this.getEmoji()._data[\"has_img_\"+this._set];return void 0===e||e}},{key:\"_emojiType\",value:function(){return this._isCustom()?\"custom\":this._isNative()?\"native\":this._hasEmoji()?\"image\":\"fallback\"}}])}();function D(e){var t=e.name,i=e.short_names,n=e.skin_tone,r=e.skin_variations,o=e.emoticons,s=e.unified,a=e.custom,c=e.imageUrl,u=e.id||i[0],l=\":\".concat(u,\":\");return a?{id:u,name:t,colons:l,emoticons:o,custom:a,imageUrl:c}:(n&&(l+=\":skin-tone-\".concat(n,\":\")),{id:u,name:t,colons:l,emoticons:o,unified:s.toLowerCase(),skin:n||(r?1:null),native:A(s)})}function B(e,t,i){return(t=S(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var H={native:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},fallback:{type:Function},skin:{type:Number,default:1},set:{type:String,default:\"apple\"},emoji:{type:[String,Object],required:!0},size:{type:Number,default:null},tag:{type:String,default:\"span\"}},U={perLine:{type:Number,default:9},maxSearchResults:{type:Number,default:75},emojiSize:{type:Number,default:24},title:{type:String,default:\"Emoji Mart™\"},emoji:{type:String,default:\"department_store\"},color:{type:String,default:\"#ae65c5\"},set:{type:String,default:\"apple\"},skin:{type:Number,default:null},defaultSkin:{type:Number,default:1},native:{type:Boolean,default:!1},emojiTooltip:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},i18n:{type:Object,default:function(){return{}}},showPreview:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showCategories:{type:Boolean,default:!0},showSkinTones:{type:Boolean,default:!0},infiniteScroll:{type:Boolean,default:!0},pickerStyles:{type:Object,default:function(){return{}}}};function V(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function W(e){for(var t=1;t0},emojiObjects:function(){var e=this;return this.emojis.map((function(t){return{emojiObject:t,emojiView:new $(t,e.emojiProps.skin,e.emojiProps.set,e.emojiProps.native,e.emojiProps.fallback,e.emojiProps.emojiTooltip,e.emojiProps.emojiSize)}}))}},components:{Emoji:J}},(function(){var e=this,t=e._self._c;return e.isVisible&&(e.isSearch||e.hasResults)?t(\"section\",{class:{\"emoji-mart-category\":!0,\"emoji-mart-no-results\":!e.hasResults},attrs:{\"aria-label\":e.i18n.categories[e.id]}},[t(\"div\",{staticClass:\"emoji-mart-category-label\"},[t(\"h3\",{staticClass:\"emoji-mart-category-label\"},[e._v(e._s(e.i18n.categories[e.id]))])]),e._v(\" \"),e._l(e.emojiObjects,(function(i){var n=i.emojiObject,r=i.emojiView;return[r.canRender?t(\"button\",{key:n.id,staticClass:\"emoji-mart-emoji\",class:e.activeClass(n),attrs:{\"aria-label\":r.ariaLabel,role:\"option\",\"aria-selected\":\"false\",\"aria-posinset\":\"1\",\"aria-setsize\":\"1812\",type:\"button\",\"data-title\":n.short_name,title:r.title},on:{mouseenter:function(t){e.emojiProps.onEnter(r.getEmoji())},mouseleave:function(t){e.emojiProps.onLeave(r.getEmoji())},click:function(t){e.emojiProps.onClick(r.getEmoji())}}},[t(\"span\",{class:r.cssClass,style:r.cssStyle},[e._v(e._s(r.content))])]):e._e()]})),e._v(\" \"),e.hasResults?e._e():t(\"div\",[t(\"emoji\",{attrs:{data:e.data,emoji:\"sleuth_or_spy\",native:e.emojiProps.native,skin:e.emojiProps.skin,set:e.emojiProps.set}}),e._v(\" \"),t(\"div\",{staticClass:\"emoji-mart-no-results-label\"},[e._v(e._s(e.i18n.notfound))])],1)],2):e._e()}),[],!1,null,null,null).exports,Z=b({props:{skin:{type:Number,required:!0}},emits:[\"change\"],data:function(){return{opened:!1}},methods:{onClick:function(e){this.opened&&e!=this.skin&&this.$emit(\"change\",e),this.opened=!this.opened}}},(function(){var e=this,t=e._self._c;return t(\"div\",{class:{\"emoji-mart-skin-swatches\":!0,\"emoji-mart-skin-swatches-opened\":e.opened}},e._l(6,(function(i){return t(\"span\",{key:i,class:{\"emoji-mart-skin-swatch\":!0,\"emoji-mart-skin-swatch-selected\":e.skin==i}},[t(\"span\",{class:\"emoji-mart-skin emoji-mart-skin-tone-\"+i,on:{click:function(t){return e.onClick(i)}}})])})),0)}),[],!1,null,null,null).exports,G=b({props:{data:{type:Object,required:!0},title:{type:String,required:!0},emoji:{type:[String,Object]},idleEmoji:{type:[String,Object],required:!0},showSkinTones:{type:Boolean,default:!0},emojiProps:{type:Object,required:!0},skinProps:{type:Object,required:!0},onSkinChange:{type:Function,required:!0}},computed:{emojiData:function(){return this.emoji?this.emoji:{}},emojiShortNames:function(){return this.emojiData.short_names},emojiEmoticons:function(){return this.emojiData.emoticons}},components:{Emoji:J,Skins:Z}},(function(){var e=this,t=e._self._c;return t(\"div\",{staticClass:\"emoji-mart-preview\"},[e.emoji?[t(\"div\",{staticClass:\"emoji-mart-preview-emoji\"},[t(\"emoji\",{attrs:{data:e.data,emoji:e.emoji,native:e.emojiProps.native,skin:e.emojiProps.skin,set:e.emojiProps.set}})],1),e._v(\" \"),t(\"div\",{staticClass:\"emoji-mart-preview-data\"},[t(\"div\",{staticClass:\"emoji-mart-preview-name\"},[e._v(e._s(e.emoji.name))]),e._v(\" \"),t(\"div\",{staticClass:\"emoji-mart-preview-shortnames\"},e._l(e.emojiShortNames,(function(i){return t(\"span\",{key:i,staticClass:\"emoji-mart-preview-shortname\"},[e._v(\":\"+e._s(i)+\":\")])})),0),e._v(\" \"),t(\"div\",{staticClass:\"emoji-mart-preview-emoticons\"},e._l(e.emojiEmoticons,(function(i){return t(\"span\",{key:i,staticClass:\"emoji-mart-preview-emoticon\"},[e._v(e._s(i))])})),0)])]:[t(\"div\",{staticClass:\"emoji-mart-preview-emoji\"},[t(\"emoji\",{attrs:{data:e.data,emoji:e.idleEmoji,native:e.emojiProps.native,skin:e.emojiProps.skin,set:e.emojiProps.set}})],1),e._v(\" \"),t(\"div\",{staticClass:\"emoji-mart-preview-data\"},[t(\"span\",{staticClass:\"emoji-mart-title-label\"},[e._v(e._s(e.title))])]),e._v(\" \"),e.showSkinTones?t(\"div\",{staticClass:\"emoji-mart-preview-skins\"},[t(\"skins\",{attrs:{skin:e.skinProps.skin},on:{change:function(t){return e.onSkinChange(t)}}})],1):e._e()]],2)}),[],!1,null,null,null).exports,K=b({props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},autoFocus:{type:Boolean,default:!1},onSearch:{type:Function,required:!0},onArrowLeft:{type:Function,required:!1},onArrowRight:{type:Function,required:!1},onArrowDown:{type:Function,required:!1},onArrowUp:{type:Function,required:!1},onEnter:{type:Function,required:!1}},emits:[\"search\",\"enter\",\"arrowUp\",\"arrowDown\",\"arrowRight\",\"arrowLeft\"],data:function(){return{value:\"\"}},computed:{emojiIndex:function(){return this.data}},watch:{value:function(){this.$emit(\"search\",this.value)}},methods:{clear:function(){this.value=\"\"}},mounted:function(){var e=this.$el.querySelector(\"input\");this.autoFocus&&e.focus()}},(function(){var e=this,t=e._self._c;return t(\"div\",{staticClass:\"emoji-mart-search\"},[t(\"input\",{directives:[{name:\"model\",rawName:\"v-model\",value:e.value,expression:\"value\"}],attrs:{type:\"text\",placeholder:e.i18n.search,role:\"textbox\",\"aria-autocomplete\":\"list\",\"aria-owns\":\"emoji-mart-list\",\"aria-label\":\"Search for an emoji\",\"aria-describedby\":\"emoji-mart-search-description\"},domProps:{value:e.value},on:{keydown:[function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"left\",37,t.key,[\"Left\",\"ArrowLeft\"])||\"button\"in t&&0!==t.button?null:function(t){return e.$emit(\"arrowLeft\",t)}.apply(null,arguments)},function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"right\",39,t.key,[\"Right\",\"ArrowRight\"])||\"button\"in t&&2!==t.button?null:function(){return e.$emit(\"arrowRight\")}.apply(null,arguments)},function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"down\",40,t.key,[\"Down\",\"ArrowDown\"])?null:function(){return e.$emit(\"arrowDown\")}.apply(null,arguments)},function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"up\",38,t.key,[\"Up\",\"ArrowUp\"])?null:function(t){return e.$emit(\"arrowUp\",t)}.apply(null,arguments)},function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"enter\",13,t.key,\"Enter\")?null:function(){return e.$emit(\"enter\")}.apply(null,arguments)}],input:function(t){t.target.composing||(e.value=t.target.value)}}}),e._v(\" \"),t(\"span\",{staticClass:\"hidden\",attrs:{id:\"emoji-picker-search-description\"}},[e._v(\"Use the left, right, up and down arrow keys to navigate the emoji search\\n results.\")])])}),[],!1,null,null,null),Q=K.exports;function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0})),this._categories[0].first=!0,Object.freeze(this._categories),this.activeCategory=this._categories[0],this.searchEmojis=null,this.previewEmoji=null,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=-1}),[{key:\"onScroll\",value:function(){var e=this._vm.$refs.scroll;if(e){for(var t=e.scrollTop,i=this.filteredCategories[0],n=0,r=this.filteredCategories.length;nt)break;i=o}this.activeCategory=i}}},{key:\"allCategories\",get:function(){return this._categories}},{key:\"filteredCategories\",get:function(){return this.searchEmojis?[{id:\"search\",name:\"Search\",emojis:this.searchEmojis}]:this._categories.filter((function(e){return e.emojis.length>0}))}},{key:\"previewEmojiCategory\",get:function(){return this.previewEmojiCategoryIdx>=0?this.filteredCategories[this.previewEmojiCategoryIdx]:null}},{key:\"onAnchorClick\",value:function(e){var t=this;if(!this.searchEmojis){var i=this.filteredCategories.indexOf(e),n=this._vm.getCategoryComponent(i);this._vm.infiniteScroll?function(){if(n){var i=n.$el.offsetTop;e.first&&(i=0),t._vm.$refs.scroll.scrollTop=i}}():this.activeCategory=this.filteredCategories[i]}}},{key:\"onSearch\",value:function(e){var t=this._data.search(e,this.maxSearchResults);this.searchEmojis=t,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=0,this.updatePreviewEmoji()}},{key:\"onEmojiEnter\",value:function(e){this.previewEmoji=e,this.previewEmojiIdx=-1,this.previewEmojiCategoryIdx=-1}},{key:\"onEmojiLeave\",value:function(e){this.previewEmoji=null}},{key:\"onArrowLeft\",value:function(){this.previewEmojiIdx>0?this.previewEmojiIdx-=1:(this.previewEmojiCategoryIdx-=1,this.previewEmojiCategoryIdx<0?this.previewEmojiCategoryIdx=0:this.previewEmojiIdx=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length-1),this.updatePreviewEmoji()}},{key:\"onArrowRight\",value:function(){this.previewEmojiIdx=this.filteredCategories.length?this.previewEmojiCategoryIdx=this.filteredCategories.length-1:this.previewEmojiIdx=0),this.updatePreviewEmoji()}},{key:\"onArrowDown\",value:function(){if(-1==this.previewEmojiIdx)return this.onArrowRight();var e=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length,t=this._perLine;this.previewEmojiIdx+t>e&&(t=e%this._perLine);for(var i=0;i0?this.filteredCategories[this.previewEmojiCategoryIdx-1].emojis.length%this._perLine:0);for(var t=0;tn+t.scrollTop&&(t.scrollTop+=i.offsetHeight),i&&i.offsetTop