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CAACD,GAAG,CAAC,GAC1B,CAGJ,EAAG,CAAClB,EAAYX,EAAewB,EAAa,EAEvCb,GAKH,uB,UACE,UAACoB,EAAAA,EAASA,CAAAA,CAACC,MAAON,GAAW,U,GAC7B,UAACO,EAAAA,EAAQA,CAAAA,CAACC,KAAK,K,GACf,UAACC,EAAAA,EAAUA,CAAAA,C,SACT,UAAC5C,EAAeA,CAAAA,E,GAElB,UAAC6C,EAAAA,EAAQA,CAAAA,C,SACP,UAACC,MAAAA,CAAIC,UCrEK,U,SDsEPtB,EAAkBuB,MAAM,CAAG,EAC1B,UAACC,EAAAA,EAAmBA,CAAAA,CAClBC,IAAK9B,EACL+B,SAAU1B,C,GAGZ,UAAC2B,EAAAA,EAAaA,CAAAA,CACZC,KAAK,MACLC,QACE,UAACC,EAAAA,EAAiBA,CAAAA,CAChBL,IAAK9B,EACLoC,YAAa5C,EAAiBoB,EAAE,GAGpCf,cAAeL,EAAiBK,aAAa,E,QA1BhD,UAACwC,EAAAA,YAAYA,CAAAA,CAAAA,EAiCxB,EAEaC,EAAY,KACvB,IAAMC,EAASC,CAAAA,EAAAA,EAAAA,CAAAA,IAEf,MAAO,UAACrD,EAAAA,CAAUC,MAAOmD,EAAOnD,KAAK,EACvC,C","sources":["webpack://@affine/web/../core/src/pages/workspace/tag/header.tsx","webpack://@affine/web/../core/src/pages/workspace/tag/index.tsx","webpack://@affine/web/../core/src/pages/workspace/tag/index.css.ts"],"sourcesContent":["import { PageDisplayMenu } from '@affine/core/components/page-list';\nimport { Header } from '@affine/core/components/pure/header';\nimport { WorkspaceModeFilterTab } from '@affine/core/components/pure/workspace-mode-filter-tab';\n\nexport const TagDetailHeader = () => {\n return (\n }\n right={}\n />\n );\n};\n","import {\n TagPageListHeader,\n VirtualizedPageList,\n} from '@affine/core/components/page-list';\nimport { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-meta';\nimport { TagService } from '@affine/core/modules/tag';\nimport {\n useIsActiveView,\n ViewBody,\n ViewHeader,\n ViewIcon,\n ViewTitle,\n} from '@affine/core/modules/workbench';\nimport {\n GlobalContextService,\n useLiveData,\n useService,\n WorkspaceService,\n} from '@toeverything/infra';\nimport { useEffect, useMemo } from 'react';\nimport { useParams } from 'react-router-dom';\n\nimport { PageNotFound } from '../../404';\nimport { EmptyPageList } from '../page-list-empty';\nimport { TagDetailHeader } from './header';\nimport * as styles from './index.css';\n\nexport const TagDetail = ({ tagId }: { tagId?: string }) => {\n const globalContext = useService(GlobalContextService).globalContext;\n const currentWorkspace = useService(WorkspaceService).workspace;\n const pageMetas = useBlockSuiteDocMeta(currentWorkspace.docCollection);\n\n const tagList = useService(TagService).tagList;\n const currentTag = useLiveData(tagList.tagByTagId$(tagId));\n\n const pageIds = useLiveData(currentTag?.pageIds$);\n\n const filteredPageMetas = useMemo(() => {\n const pageIdsSet = new Set(pageIds);\n return pageMetas.filter(page => pageIdsSet.has(page.id));\n }, [pageIds, pageMetas]);\n\n const isActiveView = useIsActiveView();\n const tagName = useLiveData(currentTag?.value$);\n\n useEffect(() => {\n if (isActiveView && currentTag) {\n globalContext.tagId.set(currentTag.id);\n globalContext.isTag.set(true);\n\n return () => {\n globalContext.tagId.set(null);\n globalContext.isTag.set(false);\n };\n }\n return;\n }, [currentTag, globalContext, isActiveView]);\n\n if (!currentTag) {\n return ;\n }\n\n return (\n <>\n \n \n \n \n \n \n \n {filteredPageMetas.length > 0 ? (\n \n ) : (\n \n }\n docCollection={currentWorkspace.docCollection}\n />\n )}\n \n \n >\n );\n};\n\nexport const Component = () => {\n const params = useParams();\n\n return ;\n};\n","import \"../core/src/pages/workspace/tag/index.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/pages/workspace/tag/index.css.ts.vanilla.css\\\",\\\"source\\\":\\\"LmJyOWUxcTAgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBmbGV4OiAxOwogIGhlaWdodDogMTAwJTsKICB3aWR0aDogMTAwJTsKfQ==\\\"}!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var body = 'br9e1q0';"],"names":["TagDetailHeader","Header","center","WorkspaceModeFilterTab","activeFilter","right","PageDisplayMenu","TagDetail","tagId","globalContext","useService","GlobalContextService","currentWorkspace","WorkspaceService","workspace","pageMetas","useBlockSuiteDocMeta","docCollection","tagList","TagService","currentTag","useLiveData","tagByTagId$","pageIds","pageIds$","filteredPageMetas","useMemo","pageIdsSet","Set","filter","page","has","id","isActiveView","useIsActiveView","tagName","value$","useEffect","set","isTag","ViewTitle","title","ViewIcon","icon","ViewHeader","ViewBody","div","className","length","VirtualizedPageList","tag","listItem","EmptyPageList","type","heading","TagPageListHeader","workspaceId","PageNotFound","Component","params","useParams"],"sourceRoot":""}