1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="6d696fe5-2e0b-4ab2-adc8-82fa9d5306ed",t._sentryDebugIdIdentifier="sentry-dbid-6d696fe5-2e0b-4ab2-adc8-82fa9d5306ed")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"20260930061839"},(self.webpackChunkflomo=self.webpackChunkflomo||[]).push([[6500],{76500:function(t,e,i){i.r(e),i.d(e,{default:function(){return k}}),i(54820),i(6203);var s=i(28748),n=i(30112),o=i(77288),a=i(75722),r=i(86693),m=i(73460),d=i(21573),l=i(96733),h=i(76712),c=i(70202),g=i(5761),u=i(44180),p=i(90720),T=i(67154),b=i(69558),y=i(92641),f=i(74042),M=i(55926),I=i(17465),$=i(96575),C={name:"NavigationBar",props:{tags:{type:Array,default:()=>[]},selectedTag:{type:String,default:""},isSearch:{type:Boolean,default:!1},sort:{type:String,default:""},startDate:{type:String,default:""}},components:{BreadcrumbTrail:f.A,CircleCheckBig:o.A,Download:a.A,RefreshCcw:r.A},setup(t,{emit:e}){const{isDeleting:i,deleteTagAndMemos:s,deleteTagOnly:n}=(0,y.A)({$emit:e}),{isSyncing:o}=(0,b.A)(),{isMobile:a,windowWidth:r}=(0,T.Q)();return{isDeleting:i,deleteTagAndMemosHook:s,deleteTagOnlyHook:n,isMobile:a,isSyncing:o,windowWidth:r}},data(){return{breadcrumbItems:[],tag_position:{clientX:0,clientY:0},currentTag:null,displayItems:[],resizeObserver:null,hiddenItems:[],tooltip:{sync_now:!1,sync_status:!1},tagEmojiCache:new Map,containerWidth:0,maxItemWidth:I.a2,tagArray:[],sortOptions:[{key:"sortedCreationTimesDesc",label:this.$t("components.MemoList.sortMemoOption2")},{key:"sortedCreationTimesAsc",label:this.$t("components.MemoList.sortMemoOption1")},{key:"sortedEditTimestampsDesc",label:this.$t("components.MemoList.sortMemoOption3")},{key:"sortedEditTimestampsAsc",label:this.$t("components.MemoList.sortMemoOption4")}],listContainerWidth:0}},computed:{sidebarShow(){return this.$store.state.sidebarShow},isOnLine(){return this.$store.state.isOnLine},emoji_tag(){return this.$store.state.emoji_tag},sortCondition(){return this.isSearch&&this.sort?this.sort:this.$store.getters["sortMemo/sortCondition"]},pinned_tags(){return this.$store.getters.pinned_tags.map(t=>t.name)},currentSortLabel(){const t=this.sortOptions.find(t=>t.key===this.sortCondition);return t?this.$t(t.label):""},showLastTag(){return(this.isMobile||this.listContainerWidth<640)&&this.tags.length>0},getItemMaxWidth(){return t=>(0,I.XI)({displayItems:this.displayItems,containerWidth:this.containerWidth,index:t,maxItemWidth:this.maxItemWidth,windowWidth:this.windowWidth,sidebarCollapsed:0==this.sidebarShow})}},methods:{getLastTag(){return this.tags&&this.tags.length>0?this.tags[this.tags.length-1]:""},getBreadcrumbChildren(t,e){const i=(0,$.b)(t,this.tags,e)||this.selectedTag||t.title,s=this.pinned_tags.includes(i)?"pin":"unpin";return t.children.filter(t=>t.command!==s)},getBreadcrumbItemDisplayText(t,e,i=!1){const s=t&&t.title?t.title:"";if(!i||!(0,I.tv)(t))return s;const n=this.getTagEmoji((0,$.b)(t,this.tags,e));return n?`${n} ${s}`:s},getBreadcrumbItemEmoji(t){return(0,I.tv)(t)?this.getTagEmoji((0,$.b)(t,this.tags,t.originalIndex)):""},getTagEmoji(t){if(!t||"string"!=typeof t||""===t.trim())return"";if(this.tagEmojiCache.has(t))return this.tagEmojiCache.get(t);const e=this.emoji_tag[t]||"";return-1==e?"":(this.tagEmojiCache.set(t,e),e)},pinTag(){this.currentTag?this.currentTag.split("/").indexOf("")>-1?this.$message.error(this.$t("components.TagTree.pin_tag_cannot_be_empty")):this.$store.state.pinned_tags.length>=10?this.$message.error(this.$t("components.TagTree.max_pinned_tag_count")):s.Ay.pinTag(this.currentTag).then(t=>{this.$store.commit("addPinnedTag",{...t,value:this.currentTag}),this.$message.success(this.$t("components.TagTree.pin_tag_success")),n.default.emit("calcPinnedTag")}):this.$message.error(this.$t("components.TagTree.pin_tag_cannot_be_empty"))},unpinTag(){s.Ay.unpinTag(this.currentTag).then(t=>{this.$store.commit("removePinnedTag",this.currentTag),this.$message.success(this.$t("components.TagTree.unpin_tag_success")),n.default.emit("calcPinnedTag")})}
1,changeTag(){this.openTagEditor()},buildTagEditorPayload(){var t=this.tag_position||{clientX:0,clientY:0};return{tag_name:this.currentTag||this.selectedTag,tag_position:{clientX:t.clientX,clientY:t.clientY+95},type:"tags"}},openTagEditor(t=0){const e=this.buildTagEditorPayload();window.setTimeout(()=>{n.default.emit("rename-tag",e)},t)},deleteTagOnly(){if(!this.currentTag)return void this.$message.error("Tag cannot be empty");const t={value:this.currentTag,display:this.currentTag};this.deleteTagOnlyHook(t,!1,this.selectedTag)},deleteTagAndMemos(){if(!this.currentTag)return void this.$message.error("Tag cannot be empty");const t={value:this.currentTag,display:this.currentTag,count:""};this.deleteTagAndMemosHook(t,!1,this.selectedTag)},multiSelect(){this.$store.dispatch("memoList/SetMultiSelect",!0)},async exportMemo(){const t=this.$store.getters.advancedSearchQuery;await(0,M.x3)(this.$t("export.confirm.title"),{title:this.$t("export.confirm.tip"),confirmButtonText:this.$t("export.confirm.confirm"),cancelButtonText:this.$t("export.confirm.cancel"),type:"warning"})&&(t&&Object.keys(t).length?n.default.emit("memo-export",t):n.default.emit("memo-export",{tag:this.selectedTag}))},sortingMethod(t){this.isSearch?this.$emit("handleSort",t):(this.$store.dispatch("sortMemo/setSortCondition",t),n.default.emit("refresh-memo-list",t))},handleCommand(t){const e={pin:()=>this.pinTag(),unpin:()=>this.unpinTag(),rename:()=>this.changeTag(t),changeTag:()=>this.changeTag(t),multiSelect:()=>this.multiSelect(),exportMemo:()=>this.exportMemo(),parentTag:()=>this.goToParentTag()}[t.command];e?e():console.warn(`Unknown command: ${t.command}`)},goToParentTag(){if(!this.currentTag)return;const t=this.currentTag.split("/");if(t.length>1){const e=t.slice(0,-1).join("/");this.$store.commit("setSelectedTag",e),n.default.emit("tagClicked",e)}else this.clickHome()},handleChildCommand(t){const e={deleteTagOnly:()=>this.deleteTagOnly(),deleteTagAndMemos:()=>this.deleteTagAndMemos(),sortedCreationTimesDesc:()=>this.sortingMethod(t.command),sortedCreationTimesAsc:()=>this.sortingMethod(t.command),sortedEditTimestampsDesc:()=>this.sortingMethod(t.command),sortedEditTimestampsAsc:()=>this.sortingMethod(t.command)}[t.command];e?e():console.warn(`Unknown child command: ${t.command}`)},isComponent(t){return"object"==typeof t||"function"==typeof t},buildHomeMenuItems(){return[{title:this.$t("components.MemoList.multiSelect"),icon:o.A,command:"multiSelect"},{title:this.$t("components.MemoList.sortingMethod"),subtitle:this.currentSortLabel,icon:m.A,children:this.buildSortMenuItems()},{title:this.$t("components.Querybar.export"),icon:a.A,command:"exportMemo"}]},buildTagMenuItems(){const t=[];return this.showLastTag&&this.tags.length>1&&t.push({title:this.$t("components.MemoList.parentTag"),icon:d.A,command:"parentTag"}),this.pinned_tags.includes(this.currentTag)?t.push({title:this.$t("components.MemoList.unpin"),icon:l.A,command:"unpin"}):t.push({title:this.$t("components.MemoList.pin"),icon:h.A,command:"pin"}),t.push({title:this.$t("components.MemoList.rename"),icon:c.A,command:"rename"}),t.push({title:""}),t.push({title:this.$t("components.MemoList.selectMemo"),icon:o.A,command:"multiSelect"},{title:this.$t("components.MemoList.sortingMethod"),icon:m.A,command:"sortingMethod",subtitle:this.currentSortLabel,children:this.buildSortMenuItems()}),t.push({title:""}),t.push({title:this.$t("components.MemoList.deleteMemo"),icon:g.A,command:"deleteMemo",type:"danger",children:this.buildDeleteMenuItems()}),t},buildSortMenuItems(){return this.sortOptions.map(t=>({title:t.label,command:t.key,rightIcon:this.sortCondition===t.key?u.A:""}))},buildDeleteMenuItems(){return[{titleKey:"components.TagTree.delete_tag_only",command:"deleteTagOnly"},{titleKey:"components.TagTree.delete_tag_and_memos",command:"deleteTagAndMemos"}].map(t=>({title:this.$t(t.titleKey),command:t.command,type:"danger"}))},checkBreadcrumbOverflow(){this.$refs.breadcrumbContainer&&(this.displayItems=[...this.breadcrumbItems],this.$nextTick(()=>{var t;const e=(null===(t=this.$refs.breadcrumbContainer)||void 0===t?void 0:t.$el)||this.$refs.breadcrumbContainer;this.containerWidth=e.offsetWidth;const i=e.querySelectorAll(".el-breadcrumb__item");(0,I.bo)(i)&&this.createEllipsisItems()}))},clickTag(t,e){-1!==e&&(this.currentTag="object"==typeof e?(0,$.b)(e,this.tags,e.originalIndex):this.tags.slice(0,e).join("/"),this.currentTag&&(this.$store.commit("setSelectedTag",this.currentTag.trim()),n.default.emit("tagClicked",this.currentTag.trim())))},buildBreadcrumbItems(t){if(this.breadcrumbItems=this.showLastTag?[(0,I.tL)({type:I.hH.HOME_LABEL,title:this.$t("components.search.home"),children:t.length||this.startDate?[]:this.buildHomeMenuItems()})]:[(0,I.tL)({type:I.hH.HOME_ICON,title:p.A,children:t.length||this.startDate?[]:this.buildHomeMenuItems()}),(0,I.tL)({type:I.hH.HOME_LABEL,title:this.$t("components.search.home"),children:t.length||this.startDate?[]:this.buildHomeMenuItems()})],t&&t.length>0){this.currentTag=t.join("/");const e=(0,$.m)(t,()=>this.buildTagMenuItems());this.breadcrumbItems=this.breadcrumbItems.concat(e)}this.startDate&&this.breadcrumbItems.push((0,I.tL)({type:I.hH.FILTER,title:this.startDate,children:this.buildHomeMenuItems()})),this.$nextTick(()=>{this.checkBreadcrumbOverflow()})},createEllipsisItems(){const{displayItems:t,hiddenItems:e}=(0,I.DJ)(this.breadcrumbItems,this.showLastTag);this.displayItems=t,this.hiddenItems=e},handleEllipsisPopoverClick(t,e){this.handleEllipsisItemClick(t,e)},handleTagMenuOpen(){!this.currentTag&&this.selectedTag&&(this.currentTag=this.selectedTag)},setCurrentTagForMenu(t){this.currentTag=this.selectedTag,this.tag_position={clientX:t.clientX,clientY:t.clientY}},handlePopoverMenuClick(t){"rename"!==t.command&&"changeTag"!==t.command?t.command&&this.handleCommand(t):this.openTagEditor(120)},handlePopoverSubMenuClick(t){t.command&&this.handleChildCommand(t)},handleEllipsisItemClick(t,e){if((0,I.I7)(t))return void this.clickHome();const i=(0,$.b)(t,this.tags,t.originalIndex);i&&(this.$store.commit("setSelectedTag",i.trim()),n.default.emit("tagClicked",i.trim()))},getEllipsisItemDisplayText(t){return t.title},getEllipsisItemTooltip(t){return t.displayPath},updateListContainerLayout(){const t=document.querySelector(".main-container");t&&(this.listContainerWidth=t.offsetWidth,this.listContainerWidth<640||window.innerWidth<768?this.maxItemWidth=this.listContainerWidth-240-16-40-(0==this.sidebarShow?I.zF:0):this.maxItemWidth=I.a2)},clickHome(){this.$store.dispatch("resetFilter"),n.default.emit("tagClicked")}},mounted(){this.$nextTick(()=>{this.updateListContainerLayout(),this.buildBreadcrumbItems(this.tags)})},beforeUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()},watch:{tags:{handler(t){this.buildBreadcrumbItems(t)},immediate:!1},windowWidth:{handler(){this.updateListContainerLayout(),this.buildBreadcrumbItems(this.tags)},immediate:!1}}},k=(0,i(53460).A)(C,function(){var t=this;return(0,t._self._c)("BreadcrumbTrail",{ref:"breadcrumbContainer",attrs:{"display-items":t.displayItems,"hidden-items":t.hiddenItems,"get-item-max-width":t.getItemMaxWidth,"get-breadcrumb-children":t.getBreadcrumbChildren,"get-breadcrumb-item-display-text":t.getBreadcrumbItemDisplayText,"get-breadcrumb-item-emoji":t.getBreadcrumbItemEmoji,"get-ellipsis-item-display-text":t.getEllipsisItemDisplayText,"is-component":t.isComponent},on:{"ellipsis-click":t.handleEllipsisPopoverClick,"tag-menu-open":t.handleTagMenuOpen,"tag-menu-trigger-click":t.setCurrentTagForMenu,"item-click":t.clickTag,"menu-item-click":t.handlePopoverMenuClick,"sub-menu
1-item-click":t.handlePopoverSubMenuClick,"home-click":t.clickHome}})},[],!1,null,null,null).exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.