@dialpad/dialtone-vue 3.73.3 → 3.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +6 -6
- package/dist/dialtone-vue.js +459 -437
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +3 -3
- package/dist/{emoji_picker-856956e1.cjs → emoji_picker-9f66b4e9.cjs} +1 -1
- package/dist/{emoji_picker-956e04de.js → emoji_picker-a30198f5.js} +1 -1
- package/dist/{emoji_text_wrapper-e07187bc.js → emoji_text_wrapper-6b288de8.js} +1 -1
- package/dist/{emoji_text_wrapper-b5c7c334.cjs → emoji_text_wrapper-776256cc.cjs} +1 -1
- package/dist/{index-a257a50a.js → index-0e54de41.js} +5384 -5206
- package/dist/{index-6294032c.cjs → index-52006ddd.cjs} +6 -6
- package/dist/message_input.cjs +2 -2
- package/dist/message_input.js +4 -4
- package/dist/{popover-3dbe0634.js → popover-2b504324.js} +1 -1
- package/dist/{popover-7e9c5a25.cjs → popover-f84c7e57.cjs} +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/emoji.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji_text_wrapper-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji_text_wrapper-776256cc.cjs"),o=require("./emoji_picker-9f66b4e9.cjs");require("./index-52006ddd.cjs");require("vue");exports.DtEmoji=e.DtEmoji;exports.DtEmojiTextWrapper=e._sfc_main;exports.codeToEmojiData=e.codeToEmojiData;Object.defineProperty(exports,"customEmojiAssetUrl",{enumerable:!0,get:()=>e.customEmojiAssetUrl});exports.defaultEmojiAssetUrl=e.defaultEmojiAssetUrl;Object.defineProperty(exports,"emojiFileExtensionLarge",{enumerable:!0,get:()=>e.emojiFileExtensionLarge});Object.defineProperty(exports,"emojiFileExtensionSmall",{enumerable:!0,get:()=>e.emojiFileExtensionSmall});Object.defineProperty(exports,"emojiImageUrlLarge",{enumerable:!0,get:()=>e.emojiImageUrlLarge});Object.defineProperty(exports,"emojiImageUrlSmall",{enumerable:!0,get:()=>e.emojiImageUrlSmall});exports.emojiJson=e.emojiJson;exports.emojiVersion=e.emojiVersion;exports.filterValidShortCodes=e.filterValidShortCodes;exports.findEmojis=e.findEmojis;exports.findShortCodes=e.findShortCodes;exports.getEmojiData=e.getEmojiData;exports.setCustomEmojiJson=e.setCustomEmojiJson;exports.setCustomEmojiUrl=e.setCustomEmojiUrl;exports.setEmojiAssetUrlLarge=e.setEmojiAssetUrlLarge;exports.setEmojiAssetUrlSmall=e.setEmojiAssetUrlSmall;exports.shortcodeToEmojiData=e.shortcodeToEmojiData;exports.stringToUnicode=e.stringToUnicode;exports.unicodeToString=e.unicodeToString;exports.validateCustomEmojiJson=e.validateCustomEmojiJson;exports.DtEmojiPicker=o._sfc_main;
|
package/dist/emoji.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as i, _ as t, A as m, l as r, k as j, p as l, n as E, o as n, m as d, q as g, j as U, C as p, E as u, B as c, r as f, v as x, u as C, t as D, s as S, x as A, z as T, y as h, w as J } from "./emoji_text_wrapper-
|
|
2
|
-
import { _ as k } from "./emoji_picker-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { a as i, _ as t, A as m, l as r, k as j, p as l, n as E, o as n, m as d, q as g, j as U, C as p, E as u, B as c, r as f, v as x, u as C, t as D, s as S, x as A, z as T, y as h, w as J } from "./emoji_text_wrapper-6b288de8.js";
|
|
2
|
+
import { _ as k } from "./emoji_picker-a30198f5.js";
|
|
3
|
+
import "./index-0e54de41.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
export {
|
|
6
6
|
i as DtEmoji,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),y=require("./index-6294032c.cjs");const J={class:"d-emoji-picker__search d-emoji-picker__alignment"},Q=["onKeydown"],W={__name:"emoji_search",props:{searchPlaceholderLabel:{type:String,required:!0},modelValue:{type:String,default:""}},emits:["update:modelValue","focus-emoji-selector","focus-tabset","select-first-emoji"],setup(r,{expose:p,emit:m}){const s=e.ref(null);function u(){m("update:modelValue",""),k()}function k(){s.value.focus()}return e.onMounted(()=>{k()}),p({focusSearchInput:k}),(g,b)=>(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(y.DtInput,{id:"searchInput",ref_key:"searchInput",ref:s,placeholder:r.searchPlaceholderLabel,"model-value":r.modelValue,"onUpdate:modelValue":b[0]||(b[0]=f=>g.$emit("update:modelValue",f)),onKeydown:[b[1]||(b[1]=e.withKeys(f=>g.$emit("focus-tabset"),["up"])),b[2]||(b[2]=e.withKeys(e.withModifiers(f=>g.$emit("focus-emoji-selector"),["prevent"]),["down"])),b[3]||(b[3]=e.withKeys(f=>g.$emit("select-first-emoji"),["enter"]))]},e.createSlots({leftIcon:e.withCtx(()=>[e.createVNode(y.DtIcon,{name:"search"})]),_:2},[r.modelValue.length>0?{name:"rightIcon",fn:e.withCtx(()=>[e.createElementVNode("button",{class:"d-emoji-picker__search-button",onClick:u,onKeydown:e.withKeys(u,["enter"])},[e.createVNode(y.DtIcon,{name:"close"})],40,Q)]),key:"0"}:void 0]),1032,["placeholder","model-value"])]))}},X=y._export_sfc(W,[["__scopeId","data-v-640002c1"]]);const Y={class:"d-emoji-picker__tabset"},Z={__name:"emoji_tabset",props:{showRecentlyUsedTab:{type:Boolean,default:!1},scrollIntoTab:{type:Number,required:!0},isScrolling:{type:Boolean,default:!1},emojiFilter:{type:String,default:""},tabsetLabels:{type:Array,required:!0}},emits:["selected-tabset","focus-search-input"],setup(r,{expose:p,emit:m}){const s=r,u=[{label:"Recently used",icon:"clock"},{label:"Smiley’s and people",icon:"satisfied"},{label:"Nature",icon:"living-thing"},{label:"Food",icon:"food"},{label:"Activity",icon:"object"},{label:"Travel",icon:"transportation"},{label:"Objects",icon:"lightbulb"},{label:"Symbols",icon:"heart"},{label:"Flags",icon:"flag"}],k=e.computed(()=>(s.showRecentlyUsedTab?u:u.slice(1)).map((o,i)=>({...o,label:s.tabsetLabels[i],id:(i+1).toString(),panelId:(i+1).toString()}))),g=e.computed(()=>s.emojiFilter.length>0),b=e.ref("1"),{isScrolling:f}=e.toRefs(s),B=e.ref([]);e.watch(()=>s.scrollIntoTab,()=>{!f.value&&!g.value&&(b.value=(s.scrollIntoTab+1).toString())}),e.watch(g,()=>{g.value&&(b.value=null)});function E(t){f.value||(b.value=t),m("selected-tabset",t)}function d(t){B.value.push(t.$el)}function T(){B.value[0].focus()}function h(t,o){t.key==="Enter"&&(E(o),B.value[o-1].blur()),t.key==="Tab"&&(t.preventDefault(),m("focus-search-input")),t.key==="ArrowDown"&&m("focus-search-input")}return p({focusTabset:T}),(t,o)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(y.DtTabGroup,{"tab-list-class":"d-emoji-picker__tabset-list",selected:b.value},{tabs:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(i,S)=>(e.openBlock(),e.createBlock(y.DtTab,{id:i.id,ref_for:!0,ref:_=>{_&&d(_)},key:i.id,"panel-id":i.panelId,label:i.label,"aria-controls":"d-emoji-picker-list",tabindex:S+1,onClickCapture:e.withModifiers(_=>E(i.id),["stop"]),onKeydown:_=>h(_,i.id)},{default:e.withCtx(()=>[e.createVNode(y.DtIcon,{size:"400",name:i.icon},null,8,["name"])]),_:2},1032,["id","panel-id","label","tabindex","onClickCapture","onKeydown"]))),128))]),_:1},8,["selected"])]))}},F="https://static.dialpadcdn.com/joypixels/png/unicode/32/",$=9;function x(r){const p=e.ref([]),m=e.ref([]),s=e.ref(!1),u=e.ref(!0);function k(t,o=!1){u.value=o,r("highlighted-emoji",t)}function g(t,o,i){p.value[o]||(p.value[o]=[]),p.value[o][i]=t}function b(t,o){m.value[o]=t}function f(t,o){var S,_,N;const i=s.value?(S=m.value)==null?void 0:S[o]:(N=(_=p.value)==null?void 0:_[t])==null?void 0:N[o];return i?(i.focus(),!0):!1}function B(t,o){f(t,o-1)||(p.value[t-1]?f(t-1,p.value[t-1].length-1):f(p.value.length-1,p.value[p.value.length-1].length-1))}function E(t,o){f(t,o+1)||f(t+1,0)||f(0,0)}function d(t,o){f(0,o-1)||f(0,m.value.length-1)}function T(t,o){f(0,o+1)||f(0,0)}function h(t,o,i){s.value?t==="left"?d(o,i):t==="right"&&T(o,i):t==="left"?B(o,i):t==="right"&&E(o,i)}return{emojiRefs:p,emojiFilteredRefs:m,isFiltering:s,hoverFirstEmoji:u,setEmojiRef:g,setFilteredRef:b,hoverEmoji:k,focusEmoji:f,handleHorizontalNavigation:h}}const ee={class:"d-emoji-picker__selector"},te={key:0,class:"d-emoji-picker__search-label d-emoji-picker__alignment"},oe={key:0},le={class:"d-emoji-picker__tab"},ne=["aria-label","onClick","onFocusin","onMouseover","onKeydown"],se=["alt","aria-label","title","src"],ie={key:2,class:"d-emoji-picker__alignment"},re={class:"d-emoji-picker__tab","data-qa":"filtered-emojis"},ae=["aria-label","onClick","onFocusin","onMouseover","onKeydown"],ce=["alt","aria-label","title","src"],ue={__name:"emoji_selector",props:{emojiFilter:{type:String,default:""},skinTone:{type:String,required:!0},tabsetLabels:{type:Array,required:!0},selectedTabset:{type:Object,required:!0},searchResultsLabel:{type:String,required:!0},searchNoResultsLabel:{type:String,required:!0},recentlyUsedEmojis:{type:Array,default:()=>[]}},emits:["highlighted-emoji","selected-emoji","scroll-into-tab","is-scrolling","focus-skin-selector","focus-search-input"],setup(r,{expose:p,emit:m}){const s=r,{emojiRefs:u,emojiFilteredRefs:k,isFiltering:g,hoverFirstEmoji:b,setEmojiRef:f,setFilteredRef:B,hoverEmoji:E,focusEmoji:d,handleHorizontalNavigation:T}=x(m),h=e.ref(null),t=e.ref(null),o=e.ref(null),i=["Recently used","People","Nature","Food","Activity","Travel","Objects","Symbols","Flags"],S=e.computed(()=>s.recentlyUsedEmojis.length?s.tabsetLabels.map(l=>({label:l,ref:e.ref(null)})):s.tabsetLabels.slice(1).map(l=>({label:l,ref:e.ref(null)}))),_=e.ref(S.value[0].label),N=e.computed(()=>s.recentlyUsedEmojis.length?i:i.slice(1)),V=e.ref([]),I=e.computed(()=>[...y.emojisGrouped[`People${s.skinTone}`],...y.emojisGrouped.Nature,...y.emojisGrouped.Food,...y.emojisGrouped[`Activity${s.skinTone}`],...y.emojisGrouped.Travel,...y.emojisGrouped[`Objects${s.skinTone}`],...y.emojisGrouped.Symbols,...y.emojisGrouped.Flags]),A=K(()=>{k.value=[],D()});e.watch(I,()=>{D()},{immediate:!0}),e.watch(()=>s.recentlyUsedEmojis,()=>{y.emojisGrouped["Recently used"]=s.recentlyUsedEmojis},{immediate:!0}),e.watch(()=>s.emojiFilter,()=>{M(),s.emojiFilter?g.value=!0:(g.value=!1,m("highlighted-emoji",null)),A()}),e.watch(()=>s.selectedTabset,l=>{C(l.tabId)},{deep:!0});function D(){const l=s.emojiFilter.toLowerCase();V.value=I.value.filter(n=>{const c=n.name.toLowerCase().includes(l),v=n.keywords.some(a=>a.toLowerCase().includes(l));return c||v}),e.nextTick(()=>{l&&E(V.value[0],!0)})}function K(l,n=300){let c;return(...v)=>{clearTimeout(c),c=setTimeout(()=>l(...v),n)}}function q(l){return`${F+l}.png`}function U(l){l.target.parentNode.style.display="none"}function C(l,n=!0){const v=S.value[l-1].ref.value[0];e.nextTick(()=>{const a=t.value,w=l==="1"?0:v.offsetTop-20;let j=!0,L=a.scrollTop;m("is-scrolling",!0),a.addEventListener("scroll",()=>{if(j){const R=a.scrollTop;(L<R&&R>=w||L>R&&R<=w)&&(j=!1,m("is-scrolling",!1)),L=R}}),a.scrollTop=w,n&&d(l-1,0)})}function M(){const l=t.value;l.scrollTop=0}function G(){o.value=new IntersectionObserver(l=>{l.forEach(n=>{var a,w,j,L,R;const{target:c}=n,v=parseInt(c.dataset.index);n.isIntersecting&&c.offsetTop<=h.value.offsetTop+50?(_.value=((a=S.value[v-1])==null?void 0:a.label)??((w=S.value[0])==null?void 0:w.label),m("scroll-into-tab",v-1)):n.boundingClientRect.bottom<=((j=h.value)==null?void 0:j.getBoundingClientRect().bottom)?(m("scroll-into-tab",v),_.value=(L=S.value[v])==null?void 0:L.label):v===1&&(m("scroll-into-tab",v),_.value=(R=S.value[0])==null?void 0:R.label)})}),o.value.observe(h.value),Array.from(t.value.children).forEach((l,n)=>{o.value.observe(l),l.dataset.index=n})}const O=(l,n,c)=>{var v;if(l.preventDefault(),b.value=!1,l.key==="ArrowUp"){const a=n%$;if(!d(0,n-$)){const w=k.value.length-k.value.length%$+a;d(0,w),d(0,w)||d(0,k.value.length-1)}}if(l.key==="ArrowDown"&&!d(0,n+$)){const a=n%$;(v=k.value)!=null&&v[n+($-a)]?d(0,k.value.length-1):d(0,a)}l.key==="ArrowLeft"&&T("left",0,n),l.key==="ArrowRight"&&T("right",0,n),l.key==="Tab"&&m("focus-skin-selector"),l.key==="Enter"&&m("selected-emoji",c)},z=(l,n,c,v)=>{var a,w;if(l.preventDefault(),l.key==="ArrowUp"){const j=c%$;if(n===0){const L=$-u.value[u.value.length-1].length%$,R=u.value[u.value.length-1].length+L-($-j);d(u.value.length-1,R)||d(u.value.length-1,u.value[u.value.length-1].length-1);return}if(!d(n,c-$)){const L=n-1<0?0:n-1,R=u.value[L].length,H=R-R%$+j;d(L,H)||d(n-1,u.value[n-1].length-1)}}if(l.key==="ArrowDown"&&!d(n,c+$)){const j=c%$;(w=(a=u.value)==null?void 0:a[n])!=null&&w[c+($-j)]?d(n,u.value[n].length-1):d(n+1,j)||d(0,j)||d(0,u.value[0].length-1)}l.key==="ArrowLeft"&&T("left",n,c),l.key==="ArrowRight"&&T("right",n,c),l.key==="Tab"&&(d(n+1,0)?C(n+1+1,!1):m("focus-skin-selector")),l.key==="Tab"&&l.shiftKey&&(d(n,0)&&n>0?C(n,!0):(C(1,!1),m("focus-search-input"))),l.key==="Enter"&&m("selected-emoji",v)};function P(){d(0,0)}return e.onMounted(()=>{G()}),e.onUnmounted(()=>{o.value.disconnect()}),p({focusEmojiSelector:P}),(l,n)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",{id:"d-emoji-picker-list",ref_key:"listRef",ref:t,class:"d-emoji-picker__list"},[r.emojiFilter?(e.openBlock(),e.createElementBlock("p",te,e.toDisplayString(V.value.length>0?r.searchResultsLabel:r.searchNoResultsLabel),1)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"tabCategoryRef",ref:h,class:"d-emoji-picker__category d-emoji-picker__alignment"},[e.createElementVNode("p",null,e.toDisplayString(_.value),1)],512)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),(c,v)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:v,ref_for:!0,ref:c.ref,class:"d-emoji-picker__alignment"},[v?(e.openBlock(),e.createElementBlock("p",oe,e.toDisplayString(c.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y.emojisGrouped)[e.unref(N)[v]+r.skinTone]?e.unref(y.emojisGrouped)[e.unref(N)[v]+r.skinTone]:e.unref(y.emojisGrouped)[e.unref(N)[v]],(a,w)=>(e.openBlock(),e.createElementBlock("button",{key:a.shortname,ref_for:!0,ref:j=>{j&&e.unref(f)(j,v,w)},type:"button","aria-label":a.name,onClick:j=>l.$emit("selected-emoji",a),onFocusin:j=>l.$emit("highlighted-emoji",a),onFocusout:n[0]||(n[0]=j=>l.$emit("highlighted-emoji",null)),onMouseover:j=>l.$emit("highlighted-emoji",a),onMouseleave:n[1]||(n[1]=j=>l.$emit("highlighted-emoji",null)),onKeydown:j=>z(j,v,w,a)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:a.name,"aria-label":a.name,title:a.name,src:q(a.unicode_character),onError:U},null,40,se)],40,ne))),128))])])),[[e.vShow,!r.emojiFilter]])),128)),r.emojiFilter?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(c,v)=>(e.openBlock(),e.createElementBlock("button",{key:c.shortname,ref_for:!0,ref:a=>{a&&e.unref(B)(a,v)},type:"button","aria-label":c.name,class:e.normalizeClass({"hover-emoji":v===0&&e.unref(b)}),onClick:a=>l.$emit("selected-emoji",c),onFocusin:a=>l.$emit("highlighted-emoji",c),onFocusout:n[2]||(n[2]=a=>l.$emit("highlighted-emoji",null)),onMouseover:a=>e.unref(E)(c),onMouseleave:n[3]||(n[3]=a=>e.unref(E)(null)),onKeydown:a=>O(a,v,c)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:c.name,"aria-label":c.name,title:c.name,src:`${e.unref(F)+c.unicode_character}.png`},null,8,ce)],42,ae))),128))])])):e.createCommentVNode("",!0)],512)]))}},fe=y._export_sfc(ue,[["__scopeId","data-v-067b0cfe"]]);const de={"data-qa":"skin-selector"},me={class:"d-emoji-picker__skin-list"},ve=["onKeydown","onClick"],pe=["alt","aria-label","title","src"],he={class:"d-emoji-picker__skin-selected"},ke=["aria-label"],be=["alt","aria-label","title","src"],ge={__name:"emoji_skin_selector",props:{skinTone:{type:String,required:!0},isHovering:{type:Boolean,default:!1},skinSelectorButtonTooltipLabel:{type:String,required:!0}},emits:["skin-tone","focus-tabset"],setup(r,{expose:p,emit:m}){const s=r,u=[{name:":wave_tone1:",unicode_output:"1f44b-1f3fb",skinTone:"Light",skinCode:"_tone1"},{name:":wave_tone2:",unicode_output:"1f44b-1f3fc",skinTone:"MediumLight",skinCode:"_tone2"},{name:":wave_tone3:",unicode_output:"1f44b-1f3fd",skinTone:"Medium",skinCode:"_tone3"},{name:":wave_tone4:",unicode_output:"1f44b-1f3fe",skinTone:"MediumDark",skinCode:"_tone4"},{name:":wave_tone5:",unicode_output:"1f44b-1f3ff",skinTone:"Dark",skinCode:"_tone5"},{name:":wave:",unicode_output:"1f44b",skinTone:"Default",skinCode:""}],k=e.ref(u.find(t=>t.skinTone===s.skinTone)),g=e.ref(!1),b=e.ref(null),f=e.ref([]);e.watchEffect(()=>s.isHovering&&(g.value=!1));function B(t){f.value.push(t)}function E(){b.value.focus()}function d(t){k.value=t,g.value=!1,m("skin-tone",t.skinTone),e.nextTick(()=>E())}const T=(t,o,i)=>{var S,_,N;t.preventDefault(),t.key==="ArrowLeft"&&(i===0&&((S=f.value[f.value.length-1])==null||S.focus()),(_=f.value[i-1])==null||_.focus()),t.key==="ArrowRight"&&((N=f.value[i+1])==null||N.focus()),t.key==="Enter"&&(o?d(o):h()),t.key==="Tab"&&m("focus-tabset")};function h(){g.value=!g.value,e.nextTick(()=>f.value[0].focus())}return p({focusSkinSelector:E}),(t,o)=>(e.openBlock(),e.createElementBlock("div",de,[e.withDirectives(e.createElementVNode("div",me,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,(i,S)=>e.createElementVNode("button",{ref_for:!0,ref:_=>{_&&B(_)},key:i.name,class:e.normalizeClass({selected:k.value.skinCode===i.skinCode}),onKeydown:_=>T(_,i,S),onClick:_=>d(i)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:i.name,"aria-label":i.name,title:i.name,src:`${e.unref(F)+i.unicode_output}.png`},null,8,pe)],42,ve)),64))],512),[[e.vShow,g.value]]),e.withDirectives(e.createElementVNode("div",he,[e.createVNode(y.DtTooltip,{placement:"top-end"},{anchor:e.withCtx(()=>[e.createElementVNode("button",{ref_key:"skinSelectorRef",ref:b,"aria-label":r.skinSelectorButtonTooltipLabel,tabindex:"-1",onClick:h,onKeydown:o[0]||(o[0]=i=>T(i))},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:k.value.name,"aria-label":k.value.name,title:k.value.name,src:`${e.unref(F)+k.value.unicode_output}.png`},null,8,be)],40,ke)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.skinSelectorButtonTooltipLabel)+" ",1)]),_:1})],512),[[e.vShow,!g.value]])]))}},ye=y._export_sfc(ge,[["__scopeId","data-v-3a6fb9c2"]]);const _e={class:"d-emoji-picker__data"},je=["alt","aria-label","title","src"],Se={__name:"emoji_description",props:{emoji:{type:Object,default:null}},setup(r){return(p,m)=>{var s;return e.openBlock(),e.createElementBlock("div",_e,[r.emoji?(e.openBlock(),e.createElementBlock("img",{key:0,class:"d-icon d-icon--size-500",alt:r.emoji.name,"aria-label":r.emoji.name,title:r.emoji.name,src:`${e.unref(F)+r.emoji.unicode_character}.png`},null,8,je)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString((s=r.emoji)==null?void 0:s.name),1)])}}},we=y._export_sfc(Se,[["__scopeId","data-v-48c61881"]]);const $e={class:"d-emoji-picker"},Ee={class:"d-emoji-picker--header"},Te={class:"d-emoji-picker--body"},Re={class:"d-emoji-picker--footer"},Be={__name:"emoji_picker",props:{recentlyUsedEmojis:{type:Array,default:()=>[]},searchPlaceholderLabel:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchNoResultsLabel:{type:String,required:!0},tabSetLabels:{type:Array,required:!0},skinTone:{type:String,default:"Default"},skinSelectorButtonTooltipLabel:{type:String,required:!0}},emits:["selected-emoji","skin-tone","close"],setup(r,{emit:p}){const m=r,s=e.ref(""),u=e.ref(null),k=e.ref({}),g=e.ref(0),b=e.ref(!1),f=e.computed(()=>m.recentlyUsedEmojis.length>0);function B(h){s.value="",k.value=h,k.value={...k.value,tabId:h}}function E(h){g.value=h}function d(h){b.value=h}function T(h){u.value=h}return(h,t)=>(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ee,[e.createVNode(Z,{ref:"tabsetRef","emoji-filter":s.value,"show-recently-used-tab":e.unref(f),"scroll-into-tab":g.value,"tabset-labels":r.tabSetLabels,"is-scrolling":b.value,onFocusSearchInput:t[0]||(t[0]=o=>h.$refs.searchInputRef.focusSearchInput()),onSelectedTabset:B,onKeydown:t[1]||(t[1]=e.withKeys(o=>p("close"),["esc"]))},null,8,["emoji-filter","show-recently-used-tab","scroll-into-tab","tabset-labels","is-scrolling"])]),e.createElementVNode("div",Te,[e.createVNode(X,{ref:"searchInputRef",modelValue:s.value,"onUpdate:modelValue":t[2]||(t[2]=o=>s.value=o),"search-placeholder-label":r.searchPlaceholderLabel,onSelectFirstEmoji:t[3]||(t[3]=o=>p("selected-emoji",u.value)),onFocusTabset:t[4]||(t[4]=o=>h.$refs.tabsetRef.focusTabset()),onFocusEmojiSelector:t[5]||(t[5]=o=>h.$refs.emojiSelectorRef.focusEmojiSelector()),onKeydown:t[6]||(t[6]=e.withKeys(o=>p("close"),["esc"]))},null,8,["modelValue","search-placeholder-label"]),e.createVNode(fe,{ref:"emojiSelectorRef","emoji-filter":s.value,"skin-tone":r.skinTone,"tabset-labels":r.tabSetLabels,"search-results-label":r.searchResultsLabel,"search-no-results-label":r.searchNoResultsLabel,"recently-used-emojis":r.recentlyUsedEmojis,"selected-tabset":k.value,onScrollIntoTab:E,onIsScrolling:d,onHighlightedEmoji:T,onSelectedEmoji:t[7]||(t[7]=o=>p("selected-emoji",o)),onFocusSkinSelector:t[8]||(t[8]=o=>h.$refs.skinSelectorRef.focusSkinSelector()),onFocusSearchInput:t[9]||(t[9]=o=>h.$refs.searchInputRef.focusSearchInput()),onKeydown:t[10]||(t[10]=e.withKeys(o=>p("close"),["esc"]))},null,8,["emoji-filter","skin-tone","tabset-labels","search-results-label","search-no-results-label","recently-used-emojis","selected-tabset"])]),e.createElementVNode("div",Re,[e.createVNode(we,{emoji:u.value},null,8,["emoji"]),e.createVNode(ye,{ref:"skinSelectorRef","is-hovering":!!u.value,"skin-selector-button-tooltip-label":r.skinSelectorButtonTooltipLabel,"skin-tone":r.skinTone,onSkinTone:t[11]||(t[11]=o=>p("skin-tone",o)),onFocusTabset:t[12]||(t[12]=o=>h.$refs.tabsetRef.focusTabset()),onKeydown:t[13]||(t[13]=e.withKeys(o=>p("close"),["esc"]))},null,8,["is-hovering","skin-selector-button-tooltip-label","skin-tone"])])]))}};exports._sfc_main=Be;
|
|
1
|
+
"use strict";const e=require("vue"),y=require("./index-52006ddd.cjs");const J={class:"d-emoji-picker__search d-emoji-picker__alignment"},Q=["onKeydown"],W={__name:"emoji_search",props:{searchPlaceholderLabel:{type:String,required:!0},modelValue:{type:String,default:""}},emits:["update:modelValue","focus-emoji-selector","focus-tabset","select-first-emoji"],setup(r,{expose:p,emit:m}){const s=e.ref(null);function u(){m("update:modelValue",""),k()}function k(){s.value.focus()}return e.onMounted(()=>{k()}),p({focusSearchInput:k}),(g,b)=>(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(y.DtInput,{id:"searchInput",ref_key:"searchInput",ref:s,placeholder:r.searchPlaceholderLabel,"model-value":r.modelValue,"onUpdate:modelValue":b[0]||(b[0]=f=>g.$emit("update:modelValue",f)),onKeydown:[b[1]||(b[1]=e.withKeys(f=>g.$emit("focus-tabset"),["up"])),b[2]||(b[2]=e.withKeys(e.withModifiers(f=>g.$emit("focus-emoji-selector"),["prevent"]),["down"])),b[3]||(b[3]=e.withKeys(f=>g.$emit("select-first-emoji"),["enter"]))]},e.createSlots({leftIcon:e.withCtx(()=>[e.createVNode(y.DtIcon,{name:"search"})]),_:2},[r.modelValue.length>0?{name:"rightIcon",fn:e.withCtx(()=>[e.createElementVNode("button",{class:"d-emoji-picker__search-button",onClick:u,onKeydown:e.withKeys(u,["enter"])},[e.createVNode(y.DtIcon,{name:"close"})],40,Q)]),key:"0"}:void 0]),1032,["placeholder","model-value"])]))}},X=y._export_sfc(W,[["__scopeId","data-v-640002c1"]]);const Y={class:"d-emoji-picker__tabset"},Z={__name:"emoji_tabset",props:{showRecentlyUsedTab:{type:Boolean,default:!1},scrollIntoTab:{type:Number,required:!0},isScrolling:{type:Boolean,default:!1},emojiFilter:{type:String,default:""},tabsetLabels:{type:Array,required:!0}},emits:["selected-tabset","focus-search-input"],setup(r,{expose:p,emit:m}){const s=r,u=[{label:"Recently used",icon:"clock"},{label:"Smiley’s and people",icon:"satisfied"},{label:"Nature",icon:"living-thing"},{label:"Food",icon:"food"},{label:"Activity",icon:"object"},{label:"Travel",icon:"transportation"},{label:"Objects",icon:"lightbulb"},{label:"Symbols",icon:"heart"},{label:"Flags",icon:"flag"}],k=e.computed(()=>(s.showRecentlyUsedTab?u:u.slice(1)).map((o,i)=>({...o,label:s.tabsetLabels[i],id:(i+1).toString(),panelId:(i+1).toString()}))),g=e.computed(()=>s.emojiFilter.length>0),b=e.ref("1"),{isScrolling:f}=e.toRefs(s),B=e.ref([]);e.watch(()=>s.scrollIntoTab,()=>{!f.value&&!g.value&&(b.value=(s.scrollIntoTab+1).toString())}),e.watch(g,()=>{g.value&&(b.value=null)});function E(t){f.value||(b.value=t),m("selected-tabset",t)}function d(t){B.value.push(t.$el)}function T(){B.value[0].focus()}function h(t,o){t.key==="Enter"&&(E(o),B.value[o-1].blur()),t.key==="Tab"&&(t.preventDefault(),m("focus-search-input")),t.key==="ArrowDown"&&m("focus-search-input")}return p({focusTabset:T}),(t,o)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(y.DtTabGroup,{"tab-list-class":"d-emoji-picker__tabset-list",selected:b.value},{tabs:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(i,S)=>(e.openBlock(),e.createBlock(y.DtTab,{id:i.id,ref_for:!0,ref:_=>{_&&d(_)},key:i.id,"panel-id":i.panelId,label:i.label,"aria-controls":"d-emoji-picker-list",tabindex:S+1,onClickCapture:e.withModifiers(_=>E(i.id),["stop"]),onKeydown:_=>h(_,i.id)},{default:e.withCtx(()=>[e.createVNode(y.DtIcon,{size:"400",name:i.icon},null,8,["name"])]),_:2},1032,["id","panel-id","label","tabindex","onClickCapture","onKeydown"]))),128))]),_:1},8,["selected"])]))}},F="https://static.dialpadcdn.com/joypixels/png/unicode/32/",$=9;function x(r){const p=e.ref([]),m=e.ref([]),s=e.ref(!1),u=e.ref(!0);function k(t,o=!1){u.value=o,r("highlighted-emoji",t)}function g(t,o,i){p.value[o]||(p.value[o]=[]),p.value[o][i]=t}function b(t,o){m.value[o]=t}function f(t,o){var S,_,N;const i=s.value?(S=m.value)==null?void 0:S[o]:(N=(_=p.value)==null?void 0:_[t])==null?void 0:N[o];return i?(i.focus(),!0):!1}function B(t,o){f(t,o-1)||(p.value[t-1]?f(t-1,p.value[t-1].length-1):f(p.value.length-1,p.value[p.value.length-1].length-1))}function E(t,o){f(t,o+1)||f(t+1,0)||f(0,0)}function d(t,o){f(0,o-1)||f(0,m.value.length-1)}function T(t,o){f(0,o+1)||f(0,0)}function h(t,o,i){s.value?t==="left"?d(o,i):t==="right"&&T(o,i):t==="left"?B(o,i):t==="right"&&E(o,i)}return{emojiRefs:p,emojiFilteredRefs:m,isFiltering:s,hoverFirstEmoji:u,setEmojiRef:g,setFilteredRef:b,hoverEmoji:k,focusEmoji:f,handleHorizontalNavigation:h}}const ee={class:"d-emoji-picker__selector"},te={key:0,class:"d-emoji-picker__search-label d-emoji-picker__alignment"},oe={key:0},le={class:"d-emoji-picker__tab"},ne=["aria-label","onClick","onFocusin","onMouseover","onKeydown"],se=["alt","aria-label","title","src"],ie={key:2,class:"d-emoji-picker__alignment"},re={class:"d-emoji-picker__tab","data-qa":"filtered-emojis"},ae=["aria-label","onClick","onFocusin","onMouseover","onKeydown"],ce=["alt","aria-label","title","src"],ue={__name:"emoji_selector",props:{emojiFilter:{type:String,default:""},skinTone:{type:String,required:!0},tabsetLabels:{type:Array,required:!0},selectedTabset:{type:Object,required:!0},searchResultsLabel:{type:String,required:!0},searchNoResultsLabel:{type:String,required:!0},recentlyUsedEmojis:{type:Array,default:()=>[]}},emits:["highlighted-emoji","selected-emoji","scroll-into-tab","is-scrolling","focus-skin-selector","focus-search-input"],setup(r,{expose:p,emit:m}){const s=r,{emojiRefs:u,emojiFilteredRefs:k,isFiltering:g,hoverFirstEmoji:b,setEmojiRef:f,setFilteredRef:B,hoverEmoji:E,focusEmoji:d,handleHorizontalNavigation:T}=x(m),h=e.ref(null),t=e.ref(null),o=e.ref(null),i=["Recently used","People","Nature","Food","Activity","Travel","Objects","Symbols","Flags"],S=e.computed(()=>s.recentlyUsedEmojis.length?s.tabsetLabels.map(l=>({label:l,ref:e.ref(null)})):s.tabsetLabels.slice(1).map(l=>({label:l,ref:e.ref(null)}))),_=e.ref(S.value[0].label),N=e.computed(()=>s.recentlyUsedEmojis.length?i:i.slice(1)),V=e.ref([]),I=e.computed(()=>[...y.emojisGrouped[`People${s.skinTone}`],...y.emojisGrouped.Nature,...y.emojisGrouped.Food,...y.emojisGrouped[`Activity${s.skinTone}`],...y.emojisGrouped.Travel,...y.emojisGrouped[`Objects${s.skinTone}`],...y.emojisGrouped.Symbols,...y.emojisGrouped.Flags]),A=K(()=>{k.value=[],D()});e.watch(I,()=>{D()},{immediate:!0}),e.watch(()=>s.recentlyUsedEmojis,()=>{y.emojisGrouped["Recently used"]=s.recentlyUsedEmojis},{immediate:!0}),e.watch(()=>s.emojiFilter,()=>{M(),s.emojiFilter?g.value=!0:(g.value=!1,m("highlighted-emoji",null)),A()}),e.watch(()=>s.selectedTabset,l=>{C(l.tabId)},{deep:!0});function D(){const l=s.emojiFilter.toLowerCase();V.value=I.value.filter(n=>{const c=n.name.toLowerCase().includes(l),v=n.keywords.some(a=>a.toLowerCase().includes(l));return c||v}),e.nextTick(()=>{l&&E(V.value[0],!0)})}function K(l,n=300){let c;return(...v)=>{clearTimeout(c),c=setTimeout(()=>l(...v),n)}}function q(l){return`${F+l}.png`}function U(l){l.target.parentNode.style.display="none"}function C(l,n=!0){const v=S.value[l-1].ref.value[0];e.nextTick(()=>{const a=t.value,w=l==="1"?0:v.offsetTop-20;let j=!0,L=a.scrollTop;m("is-scrolling",!0),a.addEventListener("scroll",()=>{if(j){const R=a.scrollTop;(L<R&&R>=w||L>R&&R<=w)&&(j=!1,m("is-scrolling",!1)),L=R}}),a.scrollTop=w,n&&d(l-1,0)})}function M(){const l=t.value;l.scrollTop=0}function G(){o.value=new IntersectionObserver(l=>{l.forEach(n=>{var a,w,j,L,R;const{target:c}=n,v=parseInt(c.dataset.index);n.isIntersecting&&c.offsetTop<=h.value.offsetTop+50?(_.value=((a=S.value[v-1])==null?void 0:a.label)??((w=S.value[0])==null?void 0:w.label),m("scroll-into-tab",v-1)):n.boundingClientRect.bottom<=((j=h.value)==null?void 0:j.getBoundingClientRect().bottom)?(m("scroll-into-tab",v),_.value=(L=S.value[v])==null?void 0:L.label):v===1&&(m("scroll-into-tab",v),_.value=(R=S.value[0])==null?void 0:R.label)})}),o.value.observe(h.value),Array.from(t.value.children).forEach((l,n)=>{o.value.observe(l),l.dataset.index=n})}const O=(l,n,c)=>{var v;if(l.preventDefault(),b.value=!1,l.key==="ArrowUp"){const a=n%$;if(!d(0,n-$)){const w=k.value.length-k.value.length%$+a;d(0,w),d(0,w)||d(0,k.value.length-1)}}if(l.key==="ArrowDown"&&!d(0,n+$)){const a=n%$;(v=k.value)!=null&&v[n+($-a)]?d(0,k.value.length-1):d(0,a)}l.key==="ArrowLeft"&&T("left",0,n),l.key==="ArrowRight"&&T("right",0,n),l.key==="Tab"&&m("focus-skin-selector"),l.key==="Enter"&&m("selected-emoji",c)},z=(l,n,c,v)=>{var a,w;if(l.preventDefault(),l.key==="ArrowUp"){const j=c%$;if(n===0){const L=$-u.value[u.value.length-1].length%$,R=u.value[u.value.length-1].length+L-($-j);d(u.value.length-1,R)||d(u.value.length-1,u.value[u.value.length-1].length-1);return}if(!d(n,c-$)){const L=n-1<0?0:n-1,R=u.value[L].length,H=R-R%$+j;d(L,H)||d(n-1,u.value[n-1].length-1)}}if(l.key==="ArrowDown"&&!d(n,c+$)){const j=c%$;(w=(a=u.value)==null?void 0:a[n])!=null&&w[c+($-j)]?d(n,u.value[n].length-1):d(n+1,j)||d(0,j)||d(0,u.value[0].length-1)}l.key==="ArrowLeft"&&T("left",n,c),l.key==="ArrowRight"&&T("right",n,c),l.key==="Tab"&&(d(n+1,0)?C(n+1+1,!1):m("focus-skin-selector")),l.key==="Tab"&&l.shiftKey&&(d(n,0)&&n>0?C(n,!0):(C(1,!1),m("focus-search-input"))),l.key==="Enter"&&m("selected-emoji",v)};function P(){d(0,0)}return e.onMounted(()=>{G()}),e.onUnmounted(()=>{o.value.disconnect()}),p({focusEmojiSelector:P}),(l,n)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",{id:"d-emoji-picker-list",ref_key:"listRef",ref:t,class:"d-emoji-picker__list"},[r.emojiFilter?(e.openBlock(),e.createElementBlock("p",te,e.toDisplayString(V.value.length>0?r.searchResultsLabel:r.searchNoResultsLabel),1)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"tabCategoryRef",ref:h,class:"d-emoji-picker__category d-emoji-picker__alignment"},[e.createElementVNode("p",null,e.toDisplayString(_.value),1)],512)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),(c,v)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:v,ref_for:!0,ref:c.ref,class:"d-emoji-picker__alignment"},[v?(e.openBlock(),e.createElementBlock("p",oe,e.toDisplayString(c.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y.emojisGrouped)[e.unref(N)[v]+r.skinTone]?e.unref(y.emojisGrouped)[e.unref(N)[v]+r.skinTone]:e.unref(y.emojisGrouped)[e.unref(N)[v]],(a,w)=>(e.openBlock(),e.createElementBlock("button",{key:a.shortname,ref_for:!0,ref:j=>{j&&e.unref(f)(j,v,w)},type:"button","aria-label":a.name,onClick:j=>l.$emit("selected-emoji",a),onFocusin:j=>l.$emit("highlighted-emoji",a),onFocusout:n[0]||(n[0]=j=>l.$emit("highlighted-emoji",null)),onMouseover:j=>l.$emit("highlighted-emoji",a),onMouseleave:n[1]||(n[1]=j=>l.$emit("highlighted-emoji",null)),onKeydown:j=>z(j,v,w,a)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:a.name,"aria-label":a.name,title:a.name,src:q(a.unicode_character),onError:U},null,40,se)],40,ne))),128))])])),[[e.vShow,!r.emojiFilter]])),128)),r.emojiFilter?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(c,v)=>(e.openBlock(),e.createElementBlock("button",{key:c.shortname,ref_for:!0,ref:a=>{a&&e.unref(B)(a,v)},type:"button","aria-label":c.name,class:e.normalizeClass({"hover-emoji":v===0&&e.unref(b)}),onClick:a=>l.$emit("selected-emoji",c),onFocusin:a=>l.$emit("highlighted-emoji",c),onFocusout:n[2]||(n[2]=a=>l.$emit("highlighted-emoji",null)),onMouseover:a=>e.unref(E)(c),onMouseleave:n[3]||(n[3]=a=>e.unref(E)(null)),onKeydown:a=>O(a,v,c)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:c.name,"aria-label":c.name,title:c.name,src:`${e.unref(F)+c.unicode_character}.png`},null,8,ce)],42,ae))),128))])])):e.createCommentVNode("",!0)],512)]))}},fe=y._export_sfc(ue,[["__scopeId","data-v-067b0cfe"]]);const de={"data-qa":"skin-selector"},me={class:"d-emoji-picker__skin-list"},ve=["onKeydown","onClick"],pe=["alt","aria-label","title","src"],he={class:"d-emoji-picker__skin-selected"},ke=["aria-label"],be=["alt","aria-label","title","src"],ge={__name:"emoji_skin_selector",props:{skinTone:{type:String,required:!0},isHovering:{type:Boolean,default:!1},skinSelectorButtonTooltipLabel:{type:String,required:!0}},emits:["skin-tone","focus-tabset"],setup(r,{expose:p,emit:m}){const s=r,u=[{name:":wave_tone1:",unicode_output:"1f44b-1f3fb",skinTone:"Light",skinCode:"_tone1"},{name:":wave_tone2:",unicode_output:"1f44b-1f3fc",skinTone:"MediumLight",skinCode:"_tone2"},{name:":wave_tone3:",unicode_output:"1f44b-1f3fd",skinTone:"Medium",skinCode:"_tone3"},{name:":wave_tone4:",unicode_output:"1f44b-1f3fe",skinTone:"MediumDark",skinCode:"_tone4"},{name:":wave_tone5:",unicode_output:"1f44b-1f3ff",skinTone:"Dark",skinCode:"_tone5"},{name:":wave:",unicode_output:"1f44b",skinTone:"Default",skinCode:""}],k=e.ref(u.find(t=>t.skinTone===s.skinTone)),g=e.ref(!1),b=e.ref(null),f=e.ref([]);e.watchEffect(()=>s.isHovering&&(g.value=!1));function B(t){f.value.push(t)}function E(){b.value.focus()}function d(t){k.value=t,g.value=!1,m("skin-tone",t.skinTone),e.nextTick(()=>E())}const T=(t,o,i)=>{var S,_,N;t.preventDefault(),t.key==="ArrowLeft"&&(i===0&&((S=f.value[f.value.length-1])==null||S.focus()),(_=f.value[i-1])==null||_.focus()),t.key==="ArrowRight"&&((N=f.value[i+1])==null||N.focus()),t.key==="Enter"&&(o?d(o):h()),t.key==="Tab"&&m("focus-tabset")};function h(){g.value=!g.value,e.nextTick(()=>f.value[0].focus())}return p({focusSkinSelector:E}),(t,o)=>(e.openBlock(),e.createElementBlock("div",de,[e.withDirectives(e.createElementVNode("div",me,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,(i,S)=>e.createElementVNode("button",{ref_for:!0,ref:_=>{_&&B(_)},key:i.name,class:e.normalizeClass({selected:k.value.skinCode===i.skinCode}),onKeydown:_=>T(_,i,S),onClick:_=>d(i)},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:i.name,"aria-label":i.name,title:i.name,src:`${e.unref(F)+i.unicode_output}.png`},null,8,pe)],42,ve)),64))],512),[[e.vShow,g.value]]),e.withDirectives(e.createElementVNode("div",he,[e.createVNode(y.DtTooltip,{placement:"top-end"},{anchor:e.withCtx(()=>[e.createElementVNode("button",{ref_key:"skinSelectorRef",ref:b,"aria-label":r.skinSelectorButtonTooltipLabel,tabindex:"-1",onClick:h,onKeydown:o[0]||(o[0]=i=>T(i))},[e.createElementVNode("img",{class:"d-icon d-icon--size-500",alt:k.value.name,"aria-label":k.value.name,title:k.value.name,src:`${e.unref(F)+k.value.unicode_output}.png`},null,8,be)],40,ke)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.skinSelectorButtonTooltipLabel)+" ",1)]),_:1})],512),[[e.vShow,!g.value]])]))}},ye=y._export_sfc(ge,[["__scopeId","data-v-3a6fb9c2"]]);const _e={class:"d-emoji-picker__data"},je=["alt","aria-label","title","src"],Se={__name:"emoji_description",props:{emoji:{type:Object,default:null}},setup(r){return(p,m)=>{var s;return e.openBlock(),e.createElementBlock("div",_e,[r.emoji?(e.openBlock(),e.createElementBlock("img",{key:0,class:"d-icon d-icon--size-500",alt:r.emoji.name,"aria-label":r.emoji.name,title:r.emoji.name,src:`${e.unref(F)+r.emoji.unicode_character}.png`},null,8,je)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString((s=r.emoji)==null?void 0:s.name),1)])}}},we=y._export_sfc(Se,[["__scopeId","data-v-48c61881"]]);const $e={class:"d-emoji-picker"},Ee={class:"d-emoji-picker--header"},Te={class:"d-emoji-picker--body"},Re={class:"d-emoji-picker--footer"},Be={__name:"emoji_picker",props:{recentlyUsedEmojis:{type:Array,default:()=>[]},searchPlaceholderLabel:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchNoResultsLabel:{type:String,required:!0},tabSetLabels:{type:Array,required:!0},skinTone:{type:String,default:"Default"},skinSelectorButtonTooltipLabel:{type:String,required:!0}},emits:["selected-emoji","skin-tone","close"],setup(r,{emit:p}){const m=r,s=e.ref(""),u=e.ref(null),k=e.ref({}),g=e.ref(0),b=e.ref(!1),f=e.computed(()=>m.recentlyUsedEmojis.length>0);function B(h){s.value="",k.value=h,k.value={...k.value,tabId:h}}function E(h){g.value=h}function d(h){b.value=h}function T(h){u.value=h}return(h,t)=>(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ee,[e.createVNode(Z,{ref:"tabsetRef","emoji-filter":s.value,"show-recently-used-tab":e.unref(f),"scroll-into-tab":g.value,"tabset-labels":r.tabSetLabels,"is-scrolling":b.value,onFocusSearchInput:t[0]||(t[0]=o=>h.$refs.searchInputRef.focusSearchInput()),onSelectedTabset:B,onKeydown:t[1]||(t[1]=e.withKeys(o=>p("close"),["esc"]))},null,8,["emoji-filter","show-recently-used-tab","scroll-into-tab","tabset-labels","is-scrolling"])]),e.createElementVNode("div",Te,[e.createVNode(X,{ref:"searchInputRef",modelValue:s.value,"onUpdate:modelValue":t[2]||(t[2]=o=>s.value=o),"search-placeholder-label":r.searchPlaceholderLabel,onSelectFirstEmoji:t[3]||(t[3]=o=>p("selected-emoji",u.value)),onFocusTabset:t[4]||(t[4]=o=>h.$refs.tabsetRef.focusTabset()),onFocusEmojiSelector:t[5]||(t[5]=o=>h.$refs.emojiSelectorRef.focusEmojiSelector()),onKeydown:t[6]||(t[6]=e.withKeys(o=>p("close"),["esc"]))},null,8,["modelValue","search-placeholder-label"]),e.createVNode(fe,{ref:"emojiSelectorRef","emoji-filter":s.value,"skin-tone":r.skinTone,"tabset-labels":r.tabSetLabels,"search-results-label":r.searchResultsLabel,"search-no-results-label":r.searchNoResultsLabel,"recently-used-emojis":r.recentlyUsedEmojis,"selected-tabset":k.value,onScrollIntoTab:E,onIsScrolling:d,onHighlightedEmoji:T,onSelectedEmoji:t[7]||(t[7]=o=>p("selected-emoji",o)),onFocusSkinSelector:t[8]||(t[8]=o=>h.$refs.skinSelectorRef.focusSkinSelector()),onFocusSearchInput:t[9]||(t[9]=o=>h.$refs.searchInputRef.focusSearchInput()),onKeydown:t[10]||(t[10]=e.withKeys(o=>p("close"),["esc"]))},null,8,["emoji-filter","skin-tone","tabset-labels","search-results-label","search-no-results-label","recently-used-emojis","selected-tabset"])]),e.createElementVNode("div",Re,[e.createVNode(we,{emoji:u.value},null,8,["emoji"]),e.createVNode(ye,{ref:"skinSelectorRef","is-hovering":!!u.value,"skin-selector-button-tooltip-label":r.skinSelectorButtonTooltipLabel,"skin-tone":r.skinTone,onSkinTone:t[11]||(t[11]=o=>p("skin-tone",o)),onFocusTabset:t[12]||(t[12]=o=>h.$refs.tabsetRef.focusTabset()),onKeydown:t[13]||(t[13]=e.withKeys(o=>p("close"),["esc"]))},null,8,["is-hovering","skin-selector-button-tooltip-label","skin-tone"])])]))}};exports._sfc_main=Be;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as y, onMounted as te, openBlock as j, createElementBlock as S, createVNode as K, withKeys as q, withModifiers as oe, createSlots as be, withCtx as V, createElementVNode as R, computed as B, toRefs as he, watch as U, Fragment as M, renderList as O, unref as $, createBlock as pe, nextTick as J, onUnmounted as ge, toDisplayString as z, withDirectives as W, createCommentVNode as X, vShow as Y, normalizeClass as le, watchEffect as ye, createTextVNode as ne } from "vue";
|
|
2
|
-
import { _ as Q, o as ke, D as Z, y as _e, z as je, $ as A, p as Se } from "./index-
|
|
2
|
+
import { _ as Q, o as ke, D as Z, y as _e, z as je, $ as A, p as Se } from "./index-0e54de41.js";
|
|
3
3
|
const $e = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, we = ["onKeydown"], Re = {
|
|
4
4
|
__name: "emoji_search",
|
|
5
5
|
props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as l, Q as R, P as A } from "./index-
|
|
1
|
+
import { _ as l, Q as R, P as A } from "./index-0e54de41.js";
|
|
2
2
|
import { openBlock as s, createElementBlock as E, normalizeClass as o, normalizeStyle as p, createCommentVNode as q, resolveComponent as C, Fragment as H, renderList as U, createBlock as d, createVNode as g, createElementVNode as b, mergeProps as m, withDirectives as _, vShow as S, h as f } from "vue";
|
|
3
3
|
const K = 3e6, y = {
|
|
4
4
|
circle: "d-bar-circle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-6294032c.cjs"),e=require("vue"),g=3e6,r={circle:"d-bar-circle",square:"d-bar2"},_=["body","heading"],S={sm:"24px",md:"32px",lg:"48px"},c={sm:"d-h16",md:"d-h24",lg:"d-h32"},y={computed:{skeletonOffset(){const D=this.$refs.skeleton;if(!D)return this.offset;const{top:t,height:u}=D.getBoundingClientRect();return t+u/2},skeletonStyle(){const D={};if(this.skeletonOffset===-1||!this.animate&&this.animationDuration===-1)return D;const t=this.skeletonOffset*g/1e3,u=this.animationDuration===-1?1e3:this.animationDuration;return D.animationDelay=`${t}ms`,D.animationDuration=`${u}ms`,D}}},z={name:"DtSkeletonShape",mixins:[y],props:{shape:{type:String,default:"circle",validator:D=>Object.keys(r).includes(D)},size:{type:String,default:"md"},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!0},offset:{type:Number,default:1},contentClass:{type:[String,Object,Array],default:""}},data(){return{SKELETON_SHAPES:r}},computed:{shapeStyles(){const D=S[this.size]||this.size;return{...this.skeletonStyle,"min-width":D,"max-width":D,"min-height":D,"max-height":D}}}};function P(D,t,u,n,a,F){return e.openBlock(),e.createElementBlock("div",{ref:"skeleton","data-qa":"skeleton-shape",class:e.normalizeClass(["skeleton-placeholder",a.SKELETON_SHAPES[u.shape],{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle(F.shapeStyles)},null,6)}const B=s._export_sfc(z,[["render",P]]),U={name:"DtSkeletonText",mixins:[y],props:{type:{type:String,default:"body",validator:D=>_.includes(D)},headingHeight:{type:String,default:"md",validator:D=>Object.keys(c).includes(D)},width:{type:String,default:"100%"},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!1},offset:{type:Number,default:1},contentClass:{type:String,default:""}},data(){return{SKELETON_HEADING_HEIGHTS:c}}};function R(D,t,u,n,a,F){return u.type==="body"?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"skeleton","data-qa":"skeleton-text-body",class:e.normalizeClass(["d-h8","d-bar2","skeleton-placeholder",{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle({width:u.width,...D.skeletonStyle})},null,6)):u.type==="heading"?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"skeleton","data-qa":"skeleton-text-heading",class:e.normalizeClass([a.SKELETON_HEADING_HEIGHTS[u.headingHeight],"d-bar2","skeleton-placeholder",{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle({width:u.width,...D.skeletonStyle})},null,6)):e.createCommentVNode("",!0)}const f=s._export_sfc(U,[["render",R]]),m=D=>D!==""&&!Number.isNaN(Number(D)),H={name:"DtSkeletonParagraph",components:{DtSkeletonText:f},props:{rows:{type:[Number,String],default:3,validator:m},animate:{type:Boolean,default:!0},minWidth:{type:[Number,String],default:30,validator:m},maxWidth:{type:[Number,String],default:100,validator:m},width:{type:[String,Array],default:null},randomWidth:{type:Boolean,default:!1},offset:{type:Number,default:1},animationDuration:{type:Number,default:-1},contentClass:{type:String,default:""},rowClass:{type:String,default:""}},computed:{integerRows(){return Number(this.rows)}},methods:{randomWidthPercentage(){const D=Math.min(this.minWidth,this.maxWidth),t=Math.max(this.minWidth,this.maxWidth);return`${Math.round(Math.random()*(t-D))+D}%`},getSizeParagraphRow(D){const t=this.width,u=Array.isArray(t),n=t==null?void 0:t[D-1],a=D===this.rows;return this.randomWidth?this.randomWidthPercentage():t&&!u?t:t&&u&&n?n:a?"38%":"100%"}}};function W(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-text");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-w100p",u.contentClass]),contentClass:"","data-qa":"skeleton-paragraph"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.integerRows,o=>(e.openBlock(),e.createBlock(i,{key:o,"data-qa":"skeleton-paragraph-row",class:e.normalizeClass([{"d-mb12":o!==F.integerRows}]),"content-class":u.rowClass,animate:u.animate,offset:u.offset,"animation-duration":u.animationDuration,width:F.getSizeParagraphRow(o)},null,8,["class","content-class","animate","offset","animation-duration","width"]))),128))],2)}const h=s._export_sfc(H,[["render",W]]),q={name:"DtSkeletonListItem",components:{DtSkeletonShape:B,DtSkeletonParagraph:h},props:{shape:{type:String,default:"circle",validator:D=>Object.keys(r).includes(D)},shapeSize:{type:String,default:"md"},paragraphs:{type:Object,default:()=>({rows:3,randomWidth:!0})},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!0},offset:{type:Number,default:1},shapeClass:{type:String,default:""},contentClass:{type:String,default:""}}},K={class:"d-d-flex d-fd-column d-w100p"};function V(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-shape"),o=e.resolveComponent("dt-skeleton-paragraph");return e.openBlock(),e.createElementBlock("div",{"data-qa":"skeleton-list-item",class:e.normalizeClass(["d-d-flex",{"d-ai-center":u.paragraphs.rows===1},u.contentClass])},[e.createVNode(i,{class:"d-mr8",size:u.shapeSize,shape:u.shape,"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset,"content-class":u.shapeClass},null,8,["size","shape","animation-duration","animate","offset","content-class"]),e.createElementVNode("div",K,[e.createVNode(o,e.mergeProps(u.paragraphs,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])])],2)}const j=s._export_sfc(q,[["render",V]]);const M={name:"DtSkeleton",components:{DtSkeletonText:f,DtSkeletonShape:B,DtSkeletonListItem:j,DtSkeletonParagraph:h},props:{paragraphOption:{type:[Object,Boolean],default:null},listItemOption:{type:[Object,Boolean],default:null},textOption:{type:Object,default:null},shapeOption:{type:[Object,Boolean],default:null},animationDuration:{type:Number,default:-1},ariaLabel:{type:String,default:""},animate:{type:Boolean,default:!0},offset:{type:Number,default:1}},computed:{validationOptions(){return{paragraphOption:this.paragraphOption,listItemOption:this.listItemOption,textOption:this.textOption,shapeOption:this.shapeOption}}},watch:{$props:{immediate:!0,handler:"validator"}},methods:{validator(){const D=Object.entries(this.validationOptions).filter(([t,u])=>u);if(D.length>=2){const t=`Use only one of ${D.map(([u])=>u).join(" | ")} options at the same time`;console.error(t)}}}},J=["aria-label"];function G(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-list-item"),o=e.resolveComponent("dt-skeleton-shape"),E=e.resolveComponent("dt-skeleton-paragraph"),l=e.resolveComponent("dt-skeleton-text");return e.openBlock(),e.createElementBlock("div",{"aria-busy":"true",role:"status","aria-label":u.ariaLabel},[u.listItemOption?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0},u.listItemOption===!0?{}:u.listItemOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):u.shapeOption?(e.openBlock(),e.createBlock(o,e.mergeProps({key:1},u.shapeOption===!0?{}:u.shapeOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):u.paragraphOption?(e.openBlock(),e.createBlock(E,e.mergeProps({key:2},u.paragraphOption===!0?{}:u.paragraphOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):(e.openBlock(),e.createBlock(l,e.mergeProps({key:3},u.textOption||{},{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"]))],8,J)}const k=s._export_sfc(M,[["render",G]]),Z=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,O="6.6",A="https://cdn.jsdelivr.net/joypixels/assets/"+O+"/png/unicode/32/";exports.customEmojiAssetUrl=null;exports.emojiImageUrlSmall=A;exports.emojiFileExtensionSmall=".png";exports.emojiImageUrlLarge=A;exports.emojiFileExtensionLarge=".png";const C=s.emojisIndexed;function x(){return C}function X(D,t=".png"){D.endsWith("/")||(D=D+"/"),exports.emojiImageUrlSmall=D,exports.emojiFileExtensionSmall=t}function Y(D,t=".svg"){D.endsWith("/")||(D=D+"/"),exports.emojiImageUrlLarge=D,exports.emojiFileExtensionLarge=t}function Q(D){exports.customEmojiAssetUrl=D}function $(D){b(D)}function b(D){const t=["extension","custom"],u=["name","category","shortname","extension","custom"],n=(a,F,i)=>{if(a[F]===void 0){if(!t.includes(F))return;a[F]=i}else Array.isArray(a[F])?a[F]=a[F].concat(i):a[F]=i};Object.entries(D).forEach(a=>{const[F,i]=a;if(F in C){const o=C[F];for(const E in i){const l=i[E];n(o,E,l)}}else(()=>u.every(E=>i[E]!==void 0))()?C[F]=i:console.error("The following custom emoji doesn't contain the required properties:",i)})}function p(D){function t(n,a){if(!(!n||typeof n!="object")){if("shortname"in n&&(n.shortname===D||n.shortname_alternates.includes(D)))return n.key=a,u=n,!0;Object.keys(n).some(function(F){return t(n[F],F)})}}let u;return t(x(),null),u}function L(D){let t="";for(const u of D){const n=u.codePointAt(0).toString(16);["200d","fe0f"].includes(n)||(t!==""&&(t=t+"-"),t=t+u.codePointAt(0).toString(16))}return t}function v(D){const t=D.split("-");let u="";return t.forEach(n=>{u=u+String.fromCodePoint(parseInt(n,16))}),u}function I(D){if(D.startsWith(":")&&D.endsWith(":"))return p(D);{const t=L(D),u=C[t];return u&&(u.key=t),u}}function T(D){const t=D.match(/:\w+:/g);return w(t)}function w(D){const t=D?D.filter(u=>p(u)):[];return new Set(t)}function N(D){const t=[...D.matchAll(Z())],u=t.length?t.map(n=>n[0]):[];return new Set(u)}const DD={name:"DtEmoji",components:{DtSkeleton:k},props:{code:{type:String,default:null},size:{type:String,default:"500",validator:D=>Object.keys(s.ICON_SIZE_MODIFIERS).includes(D)},imgClass:{type:[String,Object,Array],default:""},ariaLabel:{type:String,default:null},showSkeleton:{type:Boolean,default:!0}},data(){return{emojiData:null,imgLoading:!1}},computed:{emojiDataValid(){return!!this.emojiData},emojiSrc(){var D;return this.emojiDataValid?(D=this.emojiData)!=null&&D.custom?exports.customEmojiAssetUrl+this.emojiData.key+this.emojiData.extension:["100","200"].includes(this.size)?exports.emojiImageUrlSmall+this.emojiData.key+exports.emojiFileExtensionSmall:exports.emojiImageUrlLarge+this.emojiData.key+exports.emojiFileExtensionLarge:"invalid"},emojiAlt(){if(this.emojiDataValid)return this.emojiData.unicode_output?v(this.emojiData.unicode_output):this.emojiData.name},emojiLabel(){return this.emojiDataValid?this.ariaLabel?this.ariaLabel:this.emojiData.name:"Invalid Emoji"},emojiSize(){return s.ICON_SIZE_MODIFIERS[this.size]}},watch:{code:{handler:function(){this.getEmojiData()},immediate:!0},emojiSrc:{handler:async function(){this.imgLoading=!0}}},methods:{getEmojiData(){this.emojiData=I(this.code)},imageLoaded(){this.imgLoading=!1},imageErrored(){this.imgLoading=!1}}},uD=["aria-label","alt","title","src"];function eD(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(F.emojiSize)},[e.withDirectives(e.createVNode(i,{offset:0,class:e.normalizeClass(F.emojiSize),"shape-option":{shape:"square",contentClass:F.emojiSize,size:"auto"}},null,8,["class","shape-option"]),[[e.vShow,a.imgLoading&&u.showSkeleton]]),e.withDirectives(e.createElementVNode("img",{ref:"emojiImg",class:e.normalizeClass(["d-icon",F.emojiSize,u.imgClass]),"aria-label":F.emojiLabel,alt:F.emojiAlt,title:F.emojiLabel,src:F.emojiSrc,onLoad:t[0]||(t[0]=(...o)=>F.imageLoaded&&F.imageLoaded(...o)),onError:t[1]||(t[1]=(...o)=>F.imageErrored&&F.imageErrored(...o))},null,42,uD),[[e.vShow,!a.imgLoading]])],2)}const d=s._export_sfc(DD,[["render",eD]]),tD={name:"DtEmojiTextWrapper",components:{DtEmoji:d},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:D=>Object.keys(s.ICON_SIZE_MODIFIERS).includes(D)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(D,t){const u=new RegExp(`(${D.join("|")})`,"g");return t.split(u).map(a=>D.includes(a)?e.h(d,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:a}):a)},searchVNodes(D){var u;if(typeof D=="string")return this.searchCodes(D);if(typeof D.type=="symbol")return this.searchCodes(D.children);if((u=D.props)!=null&&u.innerHTML)return this.searchVNodes(D.props.innerHTML);const t=Array.isArray(D.children)?D.children:[D.children];return e.h(D.type,D.props,t.map(n=>this.searchVNodes(n)))},replaceVueComponentVNodeContent(D){},searchCodes(D){const t=T(D),u=N(D),n=[...t,...u];return n.length===0?D:this.replaceDtEmojis(n,D)}},render(){const D=this.$slots.default?this.$slots.default():[];return e.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?D:D.map(t=>this.searchVNodes(t)))}};exports.DtEmoji=d;exports.DtSkeleton=k;exports.DtSkeletonListItem=j;exports.DtSkeletonParagraph=h;exports.DtSkeletonShape=B;exports.DtSkeletonText=f;exports.SKELETON_HEADING_HEIGHTS=c;exports.SKELETON_RIPPLE_DURATION=g;exports.SKELETON_SHAPES=r;exports.SKELETON_SHAPE_SIZES=S;exports.SKELETON_TEXT_TYPES=_;exports._sfc_main=tD;exports.codeToEmojiData=I;exports.defaultEmojiAssetUrl=A;exports.emojiJson=C;exports.emojiVersion=O;exports.filterValidShortCodes=w;exports.findEmojis=N;exports.findShortCodes=T;exports.getEmojiData=x;exports.setCustomEmojiJson=$;exports.setCustomEmojiUrl=Q;exports.setEmojiAssetUrlLarge=Y;exports.setEmojiAssetUrlSmall=X;exports.shortcodeToEmojiData=p;exports.stringToUnicode=v;exports.unicodeToString=L;exports.validateCustomEmojiJson=b;
|
|
1
|
+
"use strict";const s=require("./index-52006ddd.cjs"),e=require("vue"),g=3e6,r={circle:"d-bar-circle",square:"d-bar2"},_=["body","heading"],S={sm:"24px",md:"32px",lg:"48px"},c={sm:"d-h16",md:"d-h24",lg:"d-h32"},y={computed:{skeletonOffset(){const D=this.$refs.skeleton;if(!D)return this.offset;const{top:t,height:u}=D.getBoundingClientRect();return t+u/2},skeletonStyle(){const D={};if(this.skeletonOffset===-1||!this.animate&&this.animationDuration===-1)return D;const t=this.skeletonOffset*g/1e3,u=this.animationDuration===-1?1e3:this.animationDuration;return D.animationDelay=`${t}ms`,D.animationDuration=`${u}ms`,D}}},z={name:"DtSkeletonShape",mixins:[y],props:{shape:{type:String,default:"circle",validator:D=>Object.keys(r).includes(D)},size:{type:String,default:"md"},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!0},offset:{type:Number,default:1},contentClass:{type:[String,Object,Array],default:""}},data(){return{SKELETON_SHAPES:r}},computed:{shapeStyles(){const D=S[this.size]||this.size;return{...this.skeletonStyle,"min-width":D,"max-width":D,"min-height":D,"max-height":D}}}};function P(D,t,u,n,a,F){return e.openBlock(),e.createElementBlock("div",{ref:"skeleton","data-qa":"skeleton-shape",class:e.normalizeClass(["skeleton-placeholder",a.SKELETON_SHAPES[u.shape],{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle(F.shapeStyles)},null,6)}const B=s._export_sfc(z,[["render",P]]),U={name:"DtSkeletonText",mixins:[y],props:{type:{type:String,default:"body",validator:D=>_.includes(D)},headingHeight:{type:String,default:"md",validator:D=>Object.keys(c).includes(D)},width:{type:String,default:"100%"},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!1},offset:{type:Number,default:1},contentClass:{type:String,default:""}},data(){return{SKELETON_HEADING_HEIGHTS:c}}};function R(D,t,u,n,a,F){return u.type==="body"?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"skeleton","data-qa":"skeleton-text-body",class:e.normalizeClass(["d-h8","d-bar2","skeleton-placeholder",{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle({width:u.width,...D.skeletonStyle})},null,6)):u.type==="heading"?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"skeleton","data-qa":"skeleton-text-heading",class:e.normalizeClass([a.SKELETON_HEADING_HEIGHTS[u.headingHeight],"d-bar2","skeleton-placeholder",{"skeleton-placeholder--animate":u.animate},u.contentClass]),style:e.normalizeStyle({width:u.width,...D.skeletonStyle})},null,6)):e.createCommentVNode("",!0)}const f=s._export_sfc(U,[["render",R]]),m=D=>D!==""&&!Number.isNaN(Number(D)),H={name:"DtSkeletonParagraph",components:{DtSkeletonText:f},props:{rows:{type:[Number,String],default:3,validator:m},animate:{type:Boolean,default:!0},minWidth:{type:[Number,String],default:30,validator:m},maxWidth:{type:[Number,String],default:100,validator:m},width:{type:[String,Array],default:null},randomWidth:{type:Boolean,default:!1},offset:{type:Number,default:1},animationDuration:{type:Number,default:-1},contentClass:{type:String,default:""},rowClass:{type:String,default:""}},computed:{integerRows(){return Number(this.rows)}},methods:{randomWidthPercentage(){const D=Math.min(this.minWidth,this.maxWidth),t=Math.max(this.minWidth,this.maxWidth);return`${Math.round(Math.random()*(t-D))+D}%`},getSizeParagraphRow(D){const t=this.width,u=Array.isArray(t),n=t==null?void 0:t[D-1],a=D===this.rows;return this.randomWidth?this.randomWidthPercentage():t&&!u?t:t&&u&&n?n:a?"38%":"100%"}}};function W(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-text");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-w100p",u.contentClass]),contentClass:"","data-qa":"skeleton-paragraph"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.integerRows,o=>(e.openBlock(),e.createBlock(i,{key:o,"data-qa":"skeleton-paragraph-row",class:e.normalizeClass([{"d-mb12":o!==F.integerRows}]),"content-class":u.rowClass,animate:u.animate,offset:u.offset,"animation-duration":u.animationDuration,width:F.getSizeParagraphRow(o)},null,8,["class","content-class","animate","offset","animation-duration","width"]))),128))],2)}const h=s._export_sfc(H,[["render",W]]),q={name:"DtSkeletonListItem",components:{DtSkeletonShape:B,DtSkeletonParagraph:h},props:{shape:{type:String,default:"circle",validator:D=>Object.keys(r).includes(D)},shapeSize:{type:String,default:"md"},paragraphs:{type:Object,default:()=>({rows:3,randomWidth:!0})},animationDuration:{type:Number,default:-1},animate:{type:Boolean,default:!0},offset:{type:Number,default:1},shapeClass:{type:String,default:""},contentClass:{type:String,default:""}}},K={class:"d-d-flex d-fd-column d-w100p"};function V(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-shape"),o=e.resolveComponent("dt-skeleton-paragraph");return e.openBlock(),e.createElementBlock("div",{"data-qa":"skeleton-list-item",class:e.normalizeClass(["d-d-flex",{"d-ai-center":u.paragraphs.rows===1},u.contentClass])},[e.createVNode(i,{class:"d-mr8",size:u.shapeSize,shape:u.shape,"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset,"content-class":u.shapeClass},null,8,["size","shape","animation-duration","animate","offset","content-class"]),e.createElementVNode("div",K,[e.createVNode(o,e.mergeProps(u.paragraphs,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])])],2)}const j=s._export_sfc(q,[["render",V]]);const M={name:"DtSkeleton",components:{DtSkeletonText:f,DtSkeletonShape:B,DtSkeletonListItem:j,DtSkeletonParagraph:h},props:{paragraphOption:{type:[Object,Boolean],default:null},listItemOption:{type:[Object,Boolean],default:null},textOption:{type:Object,default:null},shapeOption:{type:[Object,Boolean],default:null},animationDuration:{type:Number,default:-1},ariaLabel:{type:String,default:""},animate:{type:Boolean,default:!0},offset:{type:Number,default:1}},computed:{validationOptions(){return{paragraphOption:this.paragraphOption,listItemOption:this.listItemOption,textOption:this.textOption,shapeOption:this.shapeOption}}},watch:{$props:{immediate:!0,handler:"validator"}},methods:{validator(){const D=Object.entries(this.validationOptions).filter(([t,u])=>u);if(D.length>=2){const t=`Use only one of ${D.map(([u])=>u).join(" | ")} options at the same time`;console.error(t)}}}},J=["aria-label"];function G(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton-list-item"),o=e.resolveComponent("dt-skeleton-shape"),E=e.resolveComponent("dt-skeleton-paragraph"),l=e.resolveComponent("dt-skeleton-text");return e.openBlock(),e.createElementBlock("div",{"aria-busy":"true",role:"status","aria-label":u.ariaLabel},[u.listItemOption?(e.openBlock(),e.createBlock(i,e.mergeProps({key:0},u.listItemOption===!0?{}:u.listItemOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):u.shapeOption?(e.openBlock(),e.createBlock(o,e.mergeProps({key:1},u.shapeOption===!0?{}:u.shapeOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):u.paragraphOption?(e.openBlock(),e.createBlock(E,e.mergeProps({key:2},u.paragraphOption===!0?{}:u.paragraphOption,{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"])):(e.openBlock(),e.createBlock(l,e.mergeProps({key:3},u.textOption||{},{"animation-duration":u.animationDuration,animate:u.animate,offset:u.offset}),null,16,["animation-duration","animate","offset"]))],8,J)}const k=s._export_sfc(M,[["render",G]]),Z=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,O="6.6",A="https://cdn.jsdelivr.net/joypixels/assets/"+O+"/png/unicode/32/";exports.customEmojiAssetUrl=null;exports.emojiImageUrlSmall=A;exports.emojiFileExtensionSmall=".png";exports.emojiImageUrlLarge=A;exports.emojiFileExtensionLarge=".png";const C=s.emojisIndexed;function x(){return C}function X(D,t=".png"){D.endsWith("/")||(D=D+"/"),exports.emojiImageUrlSmall=D,exports.emojiFileExtensionSmall=t}function Y(D,t=".svg"){D.endsWith("/")||(D=D+"/"),exports.emojiImageUrlLarge=D,exports.emojiFileExtensionLarge=t}function Q(D){exports.customEmojiAssetUrl=D}function $(D){b(D)}function b(D){const t=["extension","custom"],u=["name","category","shortname","extension","custom"],n=(a,F,i)=>{if(a[F]===void 0){if(!t.includes(F))return;a[F]=i}else Array.isArray(a[F])?a[F]=a[F].concat(i):a[F]=i};Object.entries(D).forEach(a=>{const[F,i]=a;if(F in C){const o=C[F];for(const E in i){const l=i[E];n(o,E,l)}}else(()=>u.every(E=>i[E]!==void 0))()?C[F]=i:console.error("The following custom emoji doesn't contain the required properties:",i)})}function p(D){function t(n,a){if(!(!n||typeof n!="object")){if("shortname"in n&&(n.shortname===D||n.shortname_alternates.includes(D)))return n.key=a,u=n,!0;Object.keys(n).some(function(F){return t(n[F],F)})}}let u;return t(x(),null),u}function L(D){let t="";for(const u of D){const n=u.codePointAt(0).toString(16);["200d","fe0f"].includes(n)||(t!==""&&(t=t+"-"),t=t+u.codePointAt(0).toString(16))}return t}function v(D){const t=D.split("-");let u="";return t.forEach(n=>{u=u+String.fromCodePoint(parseInt(n,16))}),u}function I(D){if(D.startsWith(":")&&D.endsWith(":"))return p(D);{const t=L(D),u=C[t];return u&&(u.key=t),u}}function T(D){const t=D.match(/:\w+:/g);return w(t)}function w(D){const t=D?D.filter(u=>p(u)):[];return new Set(t)}function N(D){const t=[...D.matchAll(Z())],u=t.length?t.map(n=>n[0]):[];return new Set(u)}const DD={name:"DtEmoji",components:{DtSkeleton:k},props:{code:{type:String,default:null},size:{type:String,default:"500",validator:D=>Object.keys(s.ICON_SIZE_MODIFIERS).includes(D)},imgClass:{type:[String,Object,Array],default:""},ariaLabel:{type:String,default:null},showSkeleton:{type:Boolean,default:!0}},data(){return{emojiData:null,imgLoading:!1}},computed:{emojiDataValid(){return!!this.emojiData},emojiSrc(){var D;return this.emojiDataValid?(D=this.emojiData)!=null&&D.custom?exports.customEmojiAssetUrl+this.emojiData.key+this.emojiData.extension:["100","200"].includes(this.size)?exports.emojiImageUrlSmall+this.emojiData.key+exports.emojiFileExtensionSmall:exports.emojiImageUrlLarge+this.emojiData.key+exports.emojiFileExtensionLarge:"invalid"},emojiAlt(){if(this.emojiDataValid)return this.emojiData.unicode_output?v(this.emojiData.unicode_output):this.emojiData.name},emojiLabel(){return this.emojiDataValid?this.ariaLabel?this.ariaLabel:this.emojiData.name:"Invalid Emoji"},emojiSize(){return s.ICON_SIZE_MODIFIERS[this.size]}},watch:{code:{handler:function(){this.getEmojiData()},immediate:!0},emojiSrc:{handler:async function(){this.imgLoading=!0}}},methods:{getEmojiData(){this.emojiData=I(this.code)},imageLoaded(){this.imgLoading=!1},imageErrored(){this.imgLoading=!1}}},uD=["aria-label","alt","title","src"];function eD(D,t,u,n,a,F){const i=e.resolveComponent("dt-skeleton");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(F.emojiSize)},[e.withDirectives(e.createVNode(i,{offset:0,class:e.normalizeClass(F.emojiSize),"shape-option":{shape:"square",contentClass:F.emojiSize,size:"auto"}},null,8,["class","shape-option"]),[[e.vShow,a.imgLoading&&u.showSkeleton]]),e.withDirectives(e.createElementVNode("img",{ref:"emojiImg",class:e.normalizeClass(["d-icon",F.emojiSize,u.imgClass]),"aria-label":F.emojiLabel,alt:F.emojiAlt,title:F.emojiLabel,src:F.emojiSrc,onLoad:t[0]||(t[0]=(...o)=>F.imageLoaded&&F.imageLoaded(...o)),onError:t[1]||(t[1]=(...o)=>F.imageErrored&&F.imageErrored(...o))},null,42,uD),[[e.vShow,!a.imgLoading]])],2)}const d=s._export_sfc(DD,[["render",eD]]),tD={name:"DtEmojiTextWrapper",components:{DtEmoji:d},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:D=>Object.keys(s.ICON_SIZE_MODIFIERS).includes(D)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(D,t){const u=new RegExp(`(${D.join("|")})`,"g");return t.split(u).map(a=>D.includes(a)?e.h(d,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:a}):a)},searchVNodes(D){var u;if(typeof D=="string")return this.searchCodes(D);if(typeof D.type=="symbol")return this.searchCodes(D.children);if((u=D.props)!=null&&u.innerHTML)return this.searchVNodes(D.props.innerHTML);const t=Array.isArray(D.children)?D.children:[D.children];return e.h(D.type,D.props,t.map(n=>this.searchVNodes(n)))},replaceVueComponentVNodeContent(D){},searchCodes(D){const t=T(D),u=N(D),n=[...t,...u];return n.length===0?D:this.replaceDtEmojis(n,D)}},render(){const D=this.$slots.default?this.$slots.default():[];return e.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?D:D.map(t=>this.searchVNodes(t)))}};exports.DtEmoji=d;exports.DtSkeleton=k;exports.DtSkeletonListItem=j;exports.DtSkeletonParagraph=h;exports.DtSkeletonShape=B;exports.DtSkeletonText=f;exports.SKELETON_HEADING_HEIGHTS=c;exports.SKELETON_RIPPLE_DURATION=g;exports.SKELETON_SHAPES=r;exports.SKELETON_SHAPE_SIZES=S;exports.SKELETON_TEXT_TYPES=_;exports._sfc_main=tD;exports.codeToEmojiData=I;exports.defaultEmojiAssetUrl=A;exports.emojiJson=C;exports.emojiVersion=O;exports.filterValidShortCodes=w;exports.findEmojis=N;exports.findShortCodes=T;exports.getEmojiData=x;exports.setCustomEmojiJson=$;exports.setCustomEmojiUrl=Q;exports.setEmojiAssetUrlLarge=Y;exports.setEmojiAssetUrlSmall=X;exports.shortcodeToEmojiData=p;exports.stringToUnicode=v;exports.unicodeToString=L;exports.validateCustomEmojiJson=b;
|