vault backup: 2025-09-05 17:46:13
This commit is contained in:
1 parent
974e9b2305
commit
602ce9ce8e
19 files changed
+1329
-146
No files matched your search
Vendored
+2
-1
@@ -65,5 +65,6 @@
|
||||
"execute-code",
|
||||
"obsidian-custom-frames",
|
||||
"local-gpt",
|
||||
"ai-providers"
|
||||
"ai-providers",
|
||||
"pdf-plus"
|
||||
]
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
"contentTemplate": "# {{{title}}}\n\n{{{description}}}\n\n{{{article_title}}} //文章内容标题\n{{{content}}} //文章正文\n\n\n[Read in Cubox]({{{cubox_url}}}) \n[Read Original]({{{url}}}) \n\n---\n\n{{#highlights.length}}\n## Annotations \n\n{{#highlights}}\n> {{{text}}} \n\n{{#note}}\n{{{note}}}\n{{/note}}\n[Link️]({{{cubox_url}}}) \n\n{{/highlights}}\n{{/highlights.length}}",
|
||||
"highlightInContent": true,
|
||||
"dateFormat": "yyyy-MM-dd",
|
||||
"lastSyncTime": 1757060640564,
|
||||
"lastSyncTime": 1757064905665,
|
||||
"lastSyncCardId": "7362485231795834846",
|
||||
"lastCardUpdateTime": "2025-09-02T17:21:26.574+0800",
|
||||
"syncing": false
|
||||
|
||||
Vendored
+326
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"displayTextFormats": [
|
||||
{
|
||||
"name": "Title & page",
|
||||
"template": "{{file.basename}}, p.{{pageLabel}}"
|
||||
},
|
||||
{
|
||||
"name": "Page",
|
||||
"template": "p.{{pageLabel}}"
|
||||
},
|
||||
{
|
||||
"name": "Text",
|
||||
"template": "{{text}}"
|
||||
},
|
||||
{
|
||||
"name": "Emoji",
|
||||
"template": "📖"
|
||||
},
|
||||
{
|
||||
"name": "None",
|
||||
"template": ""
|
||||
}
|
||||
],
|
||||
"defaultDisplayTextFormatIndex": 0,
|
||||
"syncDisplayTextFormat": true,
|
||||
"syncDefaultDisplayTextFormat": false,
|
||||
"copyCommands": [
|
||||
{
|
||||
"name": "Quote",
|
||||
"template": "> ({{linkWithDisplay}})\n> {{text}}\n"
|
||||
},
|
||||
{
|
||||
"name": "Link",
|
||||
"template": "{{linkWithDisplay}}"
|
||||
},
|
||||
{
|
||||
"name": "Embed",
|
||||
"template": "!{{link}}"
|
||||
},
|
||||
{
|
||||
"name": "Callout",
|
||||
"template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> {{text}}\n"
|
||||
},
|
||||
{
|
||||
"name": "Quote in callout",
|
||||
"template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> > {{text}}\n> \n> "
|
||||
}
|
||||
],
|
||||
"useAnotherCopyTemplateWhenNoSelection": false,
|
||||
"copyTemplateWhenNoSelection": "{{linkToPageWithDisplay}}",
|
||||
"trimSelectionEmbed": false,
|
||||
"embedMargin": 50,
|
||||
"noSidebarInEmbed": true,
|
||||
"noSpreadModeInEmbed": true,
|
||||
"embedUnscrollable": false,
|
||||
"singleTabForSinglePDF": true,
|
||||
"highlightExistingTab": false,
|
||||
"existingTabHighlightOpacity": 0.5,
|
||||
"existingTabHighlightDuration": 0.75,
|
||||
"paneTypeForFirstPDFLeaf": "left",
|
||||
"openLinkNextToExistingPDFTab": true,
|
||||
"openPDFWithDefaultApp": false,
|
||||
"openPDFWithDefaultAppAndObsidian": true,
|
||||
"focusObsidianAfterOpenPDFWithDefaultApp": true,
|
||||
"syncWithDefaultApp": false,
|
||||
"dontActivateAfterOpenPDF": true,
|
||||
"dontActivateAfterOpenMD": true,
|
||||
"highlightDuration": 0.75,
|
||||
"noTextHighlightsInEmbed": false,
|
||||
"noAnnotationHighlightsInEmbed": true,
|
||||
"persistentTextHighlightsInEmbed": true,
|
||||
"persistentAnnotationHighlightsInEmbed": false,
|
||||
"highlightBacklinks": true,
|
||||
"selectionBacklinkVisualizeStyle": "highlight",
|
||||
"dblclickEmbedToOpenLink": true,
|
||||
"highlightBacklinksPane": true,
|
||||
"highlightOnHoverBacklinkPane": true,
|
||||
"backlinkHoverColor": "",
|
||||
"colors": {
|
||||
"Yellow": "#ffd000",
|
||||
"Red": "#ea5252",
|
||||
"Note": "#086ddd",
|
||||
"Important": "#bb61e5"
|
||||
},
|
||||
"defaultColor": "",
|
||||
"defaultColorPaletteItemIndex": 0,
|
||||
"syncColorPaletteItem": true,
|
||||
"syncDefaultColorPaletteItem": false,
|
||||
"colorPaletteInToolbar": true,
|
||||
"noColorButtonInColorPalette": true,
|
||||
"colorPaletteInEmbedToolbar": false,
|
||||
"quietColorPaletteTooltip": false,
|
||||
"showStatusInToolbar": true,
|
||||
"highlightColorSpecifiedOnly": false,
|
||||
"doubleClickHighlightToOpenBacklink": true,
|
||||
"hoverHighlightAction": "preview",
|
||||
"paneTypeForFirstMDLeaf": "right",
|
||||
"singleMDLeafInSidebar": true,
|
||||
"alwaysUseSidebar": true,
|
||||
"ignoreExistingMarkdownTabIn": [],
|
||||
"defaultColorPaletteActionIndex": 4,
|
||||
"syncColorPaletteAction": true,
|
||||
"syncDefaultColorPaletteAction": false,
|
||||
"proxyMDProperty": "PDF",
|
||||
"hoverPDFLinkToOpen": false,
|
||||
"ignoreHeightParamInPopoverPreview": true,
|
||||
"filterBacklinksByPageDefault": true,
|
||||
"showBacklinkToPage": true,
|
||||
"enableHoverPDFInternalLink": true,
|
||||
"recordPDFInternalLinkHistory": true,
|
||||
"alwaysRecordHistory": true,
|
||||
"renderMarkdownInStickyNote": false,
|
||||
"enablePDFEdit": true,
|
||||
"author": "Joy.AG",
|
||||
"writeHighlightToFileOpacity": 0.2,
|
||||
"defaultWriteFileToggle": false,
|
||||
"syncWriteFileToggle": true,
|
||||
"syncDefaultWriteFileToggle": false,
|
||||
"enableAnnotationDeletion": true,
|
||||
"warnEveryAnnotationDelete": false,
|
||||
"warnBacklinkedAnnotationDelete": true,
|
||||
"enableAnnotationContentEdit": true,
|
||||
"enableEditEncryptedPDF": false,
|
||||
"pdfLinkColor": "#04a802",
|
||||
"pdfLinkBorder": false,
|
||||
"replaceContextMenu": true,
|
||||
"showContextMenuOnMouseUpIf": "Mod",
|
||||
"contextMenuConfig": [
|
||||
{
|
||||
"id": "action",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "selection",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "write-file",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "annotation",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modify-annotation",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "link",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "search",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "speech",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "page",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "settings",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"selectionProductMenuConfig": [
|
||||
"color",
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"writeFileProductMenuConfig": [
|
||||
"color",
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"annotationProductMenuConfig": [
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"updateColorPaletteStateFromContextMenu": true,
|
||||
"mobileCopyAction": "pdf-plus",
|
||||
"showContextMenuOnTablet": false,
|
||||
"executeBuiltinCommandForOutline": true,
|
||||
"executeBuiltinCommandForZoom": true,
|
||||
"executeFontSizeAdjusterCommand": true,
|
||||
"closeSidebarWithShowCommandIfExist": true,
|
||||
"autoHidePDFSidebar": false,
|
||||
"defaultSidebarView": 1,
|
||||
"outlineDrag": true,
|
||||
"outlineContextMenu": true,
|
||||
"outlineLinkDisplayTextFormat": "{{file.basename}}, {{text}}",
|
||||
"outlineLinkCopyFormat": "{{linkWithDisplay}}",
|
||||
"recordHistoryOnOutlineClick": true,
|
||||
"popoverPreviewOnOutlineHover": true,
|
||||
"thumbnailDrag": true,
|
||||
"thumbnailContextMenu": true,
|
||||
"thumbnailLinkDisplayTextFormat": "{{file.basename}}, p.{{pageLabel}}",
|
||||
"thumbnailLinkCopyFormat": "{{linkWithDisplay}}",
|
||||
"recordHistoryOnThumbnailClick": true,
|
||||
"popoverPreviewOnThumbnailHover": true,
|
||||
"annotationPopupDrag": true,
|
||||
"showAnnotationPopupOnHover": true,
|
||||
"useCallout": true,
|
||||
"calloutType": "PDF",
|
||||
"calloutIcon": "highlighter",
|
||||
"highlightBacklinksInEmbed": false,
|
||||
"highlightBacklinksInHoverPopover": false,
|
||||
"highlightBacklinksInCanvas": true,
|
||||
"clickPDFInternalLinkWithModifierKey": true,
|
||||
"clickOutlineItemWithModifierKey": true,
|
||||
"clickThumbnailWithModifierKey": true,
|
||||
"focusEditorAfterAutoPaste": true,
|
||||
"clearSelectionAfterAutoPaste": true,
|
||||
"respectCursorPositionWhenAutoPaste": true,
|
||||
"blankLineAboveAppendedContent": true,
|
||||
"autoCopy": false,
|
||||
"autoFocus": false,
|
||||
"autoPaste": false,
|
||||
"autoFocusTarget": "last-active-and-open-then-last-paste",
|
||||
"autoPasteTarget": "last-active-and-open-then-last-paste",
|
||||
"openAutoFocusTargetIfNotOpened": true,
|
||||
"howToOpenAutoFocusTargetIfNotOpened": "right",
|
||||
"closeHoverEditorWhenLostFocus": true,
|
||||
"closeSidebarWhenLostFocus": false,
|
||||
"openAutoFocusTargetInEditingView": true,
|
||||
"executeCommandWhenTargetNotIdentified": true,
|
||||
"commandToExecuteWhenTargetNotIdentified": "switcher:open",
|
||||
"autoPasteTargetDialogTimeoutSec": 20,
|
||||
"autoCopyToggleRibbonIcon": true,
|
||||
"autoCopyIconName": "highlighter",
|
||||
"autoFocusToggleRibbonIcon": true,
|
||||
"autoFocusIconName": "zap",
|
||||
"autoPasteToggleRibbonIcon": true,
|
||||
"autoPasteIconName": "clipboard-paste",
|
||||
"viewSyncFollowPageNumber": true,
|
||||
"viewSyncPageDebounceInterval": 0.3,
|
||||
"openAfterExtractPages": true,
|
||||
"howToOpenExtractedPDF": "tab",
|
||||
"warnEveryPageDelete": false,
|
||||
"warnBacklinkedPageDelete": true,
|
||||
"extractPageInPlace": false,
|
||||
"askExtractPageInPlace": true,
|
||||
"pageLabelUpdateWhenInsertPage": "keep",
|
||||
"pageLabelUpdateWhenDeletePage": "keep",
|
||||
"pageLabelUpdateWhenExtractPage": "keep",
|
||||
"askPageLabelUpdateWhenInsertPage": true,
|
||||
"askPageLabelUpdateWhenDeletePage": true,
|
||||
"askPageLabelUpdateWhenExtractPage": true,
|
||||
"copyOutlineAsListFormat": "{{linkWithDisplay}}",
|
||||
"copyOutlineAsListDisplayTextFormat": "{{text}}",
|
||||
"copyOutlineAsHeadingsFormat": "{{text}}\n\n{{linkWithDisplay}}",
|
||||
"copyOutlineAsHeadingsDisplayTextFormat": "p.{{pageLabel}}",
|
||||
"copyOutlineAsHeadingsMinLevel": 2,
|
||||
"newFileNameFormat": "",
|
||||
"newFileTemplatePath": "",
|
||||
"newPDFLocation": "current",
|
||||
"newPDFFolderPath": "",
|
||||
"rectEmbedStaticImage": false,
|
||||
"rectImageFormat": "file",
|
||||
"rectImageExtension": "webp",
|
||||
"zoomToFitRect": false,
|
||||
"rectFollowAdaptToTheme": true,
|
||||
"rectEmbedResolution": 100,
|
||||
"includeColorWhenCopyingRectLink": true,
|
||||
"backlinkIconSize": 50,
|
||||
"showBacklinkIconForSelection": false,
|
||||
"showBacklinkIconForAnnotation": false,
|
||||
"showBacklinkIconForOffset": true,
|
||||
"showBacklinkIconForRect": false,
|
||||
"showBoundingRectForBacklinkedAnnot": false,
|
||||
"hideReplyAnnotation": false,
|
||||
"hideStampAnnotation": false,
|
||||
"searchLinkHighlightAll": "true",
|
||||
"searchLinkCaseSensitive": "true",
|
||||
"searchLinkMatchDiacritics": "default",
|
||||
"searchLinkEntireWord": "false",
|
||||
"dontFitWidthWhenOpenPDFLink": true,
|
||||
"preserveCurrentLeftOffsetWhenOpenPDFLink": false,
|
||||
"defaultZoomValue": "page-width",
|
||||
"scrollModeOnLoad": 0,
|
||||
"spreadModeOnLoad": 0,
|
||||
"usePageUpAndPageDown": true,
|
||||
"hoverableDropdownMenuInToolbar": true,
|
||||
"zoomLevelInputBoxInToolbar": true,
|
||||
"popoverPreviewOnExternalLinkHover": true,
|
||||
"actionOnCitationHover": "pdf-plus-bib-popover",
|
||||
"enableBibInEmbed": false,
|
||||
"enableBibInHoverPopover": false,
|
||||
"enableBibInCanvas": true,
|
||||
"citationIdPatterns": "^cite.\n^bib\\d+$",
|
||||
"copyAsSingleLine": true,
|
||||
"removeWhitespaceBetweenCJChars": true,
|
||||
"dummyFileFolderPath": "",
|
||||
"externalURIPatterns": [
|
||||
".*\\.pdf$",
|
||||
"https://arxiv.org/pdf/.*"
|
||||
],
|
||||
"modifierToDropExternalPDFToCreateDummy": [
|
||||
"Shift"
|
||||
],
|
||||
"vim": false,
|
||||
"vimrcPath": "",
|
||||
"vimVisualMotion": true,
|
||||
"vimScrollSize": 40,
|
||||
"vimLargerScrollSizeWhenZoomIn": true,
|
||||
"vimContinuousScrollSpeed": 1.2,
|
||||
"vimSmoothScroll": true,
|
||||
"vimHlsearch": true,
|
||||
"vimIncsearch": true,
|
||||
"enableVimInContextMenu": true,
|
||||
"enableVimOutlineMode": true,
|
||||
"vimSmoothOutlineMode": true,
|
||||
"vimHintChars": "hjklasdfgyuiopqwertnmzxcvb",
|
||||
"vimHintArgs": "all",
|
||||
"PATH": "",
|
||||
"autoCheckForUpdates": true,
|
||||
"fixObsidianTextSelectionBug": true
|
||||
}
|
||||
Vendored
+161
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var T1=Object.create;var Na=Object.defineProperty;var A1=Object.getOwnPropertyDescriptor;var I1=Object.getOwnPropertyNames;var B1=Object.getPrototypeOf,O1=Object.prototype.hasOwnProperty;var wm=n=>{throw TypeError(n)};var L1=(n,e,t)=>e in n?Na(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),vf=(n,e)=>{for(var t in e)Na(n,t,{get:e[t],enumerable:!0})},Fm=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I1(e))!O1.call(n,r)&&r!==t&&Na(n,r,{get:()=>e[r],enumerable:!(i=A1(e,r))||i.enumerable});return n};var Wi=(n,e,t)=>(t=n!=null?T1(B1(n)):{},Fm(e||!n||!n.__esModule?Na(t,"default",{value:n,enumerable:!0}):t,n)),M1=n=>Fm(Na({},"__esModule",{value:!0}),n);var wf=(n,e,t)=>L1(n,typeof e!="symbol"?e+"":e,t),Dm=(n,e,t)=>e.has(n)||wm("Cannot "+t);var qe=(n,e,t)=>(Dm(n,e,"read from private field"),t?t.call(n):e.get(n)),mn=(n,e,t)=>e.has(n)?wm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Lt=(n,e,t,i)=>(Dm(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t);var Ff=(n,e,t,i)=>({set _(r){Lt(n,e,r,t)},get _(){return qe(n,e,i)}});var bn=_(St=>{"use strict";var W1=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function K1(n,e){return Object.prototype.hasOwnProperty.call(n,e)}St.assign=function(n){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var i in t)K1(t,i)&&(n[i]=t[i])}}return n};St.shrinkBuf=function(n,e){return n.length===e?n:n.subarray?n.subarray(0,e):(n.length=e,n)};var G1={arraySet:function(n,e,t,i,r){if(e.subarray&&n.subarray){n.set(e.subarray(t,t+i),r);return}for(var o=0;o<i;o++)n[r+o]=e[t+o]},flattenChunks:function(n){var e,t,i,r,o,s;for(i=0,e=0,t=n.length;e<t;e++)i+=n[e].length;for(s=new Uint8Array(i),r=0,e=0,t=n.length;e<t;e++)o=n[e],s.set(o,r),r+=o.length;return s}},X1={arraySet:function(n,e,t,i,r){for(var o=0;o<i;o++)n[r+o]=e[t+o]},flattenChunks:function(n){return[].concat.apply([],n)}};St.setTyped=function(n){n?(St.Buf8=Uint8Array,St.Buf16=Uint16Array,St.Buf32=Int32Array,St.assign(St,G1)):(St.Buf8=Array,St.Buf16=Array,St.Buf32=Array,St.assign(St,X1))};St.setTyped(W1)});var $m=_(xs=>{"use strict";var Z1=bn(),Y1=4,Im=0,Bm=1,_1=2;function ms(n){for(var e=n.length;--e>=0;)n[e]=0}var J1=0,Vm=1,Q1=2,$1=3,eF=258,Yf=29,Ya=256,Ka=Ya+1+Yf,gs=30,_f=19,Hm=2*Ka+1,eo=15,jf=16,tF=7,Jf=256,zm=16,Um=17,qm=18,Xf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],xd=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],iF=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],jm=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],nF=512,yn=new Array((Ka+2)*2);ms(yn);var Wa=new Array(gs*2);ms(Wa);var Ga=new Array(nF);ms(Ga);var Xa=new Array(eF-$1+1);ms(Xa);var Qf=new Array(Yf);ms(Qf);var bd=new Array(gs);ms(bd);function Wf(n,e,t,i,r){this.static_tree=n,this.extra_bits=e,this.extra_base=t,this.elems=i,this.max_length=r,this.has_stree=n&&n.length}var Wm,Km,Gm;function Kf(n,e){this.dyn_tree=n,this.max_code=0,this.stat_desc=e}function Xm(n){return n<256?Ga[n]:Ga[256+(n>>>7)]}function Za(n,e){n.pending_buf[n.pending++]=e&255,n.pending_buf[n.pending++]=e>>>8&255}function Rt(n,e,t){n.bi_valid>jf-t?(n.bi_buf|=e<<n.bi_valid&65535,Za(n,n.bi_buf),n.bi_buf=e>>jf-n.bi_valid,n.bi_valid+=t-jf):(n.bi_buf|=e<<n.bi_valid&65535,n.bi_valid+=t)}function Xi(n,e,t){Rt(n,t[e*2],t[e*2+1])}function Zm(n,e){var t=0;do t|=n&1,n>>>=1,t<<=1;while(--e>0);return t>>>1}function rF(n){n.bi_valid===16?(Za(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)}function oF(n,e){var t=e.dyn_tree,i=e.max_code,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,c=e.stat_desc.max_length,l,d,h,u,p,f,m=0;for(u=0;u<=eo;u++)n.bl_count[u]=0;for(t[n.heap[n.heap_max]*2+1]=0,l=n.heap_max+1;l<Hm;l++)d=n.heap[l],u=t[t[d*2+1]*2+1]+1,u>c&&(u=c,m++),t[d*2+1]=u,!(d>i)&&(n.bl_count[u]++,p=0,d>=a&&(p=s[d-a]),f=t[d*2],n.opt_len+=f*(u+p),o&&(n.static_len+=f*(r[d*2+1]+p)));if(m!==0){do{for(u=c-1;n.bl_count[u]===0;)u--;n.bl_count[u]--,n.bl_count[u+1]+=2,n.bl_count[c]--,m-=2}while(m>0);for(u=c;u!==0;u--)for(d=n.bl_count[u];d!==0;)h=n.heap[--l],!(h>i)&&(t[h*2+1]!==u&&(n.opt_len+=(u-t[h*2+1])*t[h*2],t[h*2+1]=u),d--)}}function Ym(n,e,t){var i=new Array(eo+1),r=0,o,s;for(o=1;o<=eo;o++)i[o]=r=r+t[o-1]<<1;for(s=0;s<=e;s++){var a=n[s*2+1];a!==0&&(n[s*2]=Zm(i[a]++,a))}}function sF(){var n,e,t,i,r,o=new Array(eo+1);for(t=0,i=0;i<Yf-1;i++)for(Qf[i]=t,n=0;n<1<<Xf[i];n++)Xa[t++]=i;for(Xa[t-1]=i,r=0,i=0;i<16;i++)for(bd[i]=r,n=0;n<1<<xd[i];n++)Ga[r++]=i;for(r>>=7;i<gs;i++)for(bd[i]=r<<7,n=0;n<1<<xd[i]-7;n++)Ga[256+r++]=i;for(e=0;e<=eo;e++)o[e]=0;for(n=0;n<=143;)yn[n*2+1]=8,n++,o[8]++;for(;n<=255;)yn[n*2+1]=9,n++,o[9]++;for(;n<=279;)yn[n*2+1]=7,n++,o[7]++;for(;n<=287;)yn[n*2+1]=8,Line truncated
|
||||
`,"𝔑":"\u{1D511}","⁠":"\u2060"," ":"\xA0","ℕ":"\u2115","⫬":"\u2AEC","≢":"\u2262","≭":"\u226D","∦":"\u2226","∉":"\u2209","≠":"\u2260","≂̸":"\u2242\u0338","∄":"\u2204","≯":"\u226F","≱":"\u2271","≧̸":"\u2267\u0338","≫̸":"\u226B\u0338","≹":"\u2279","⩾̸":"\u2A7E\u0338","≵":"\u2275","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⋪":"\u22EA","⧏̸":"\u29CF\u0338","⋬":"\u22EC","≮":"\u226E","≰":"\u2270","≸":"\u2278","≪̸":"\u226A\u0338","⩽̸":"\u2A7D\u0338","≴":"\u2274","⪢̸":"\u2AA2\u0338","⪡̸":"\u2AA1\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⋠":"\u22E0","∌":"\u220C","⋫":"\u22EB","⧐̸":"\u29D0\u0338","⋭":"\u22ED","⊏̸":"\u228F\u0338","⋢":"\u22E2","⊐̸":"\u2290\u0338","⋣":"\u22E3","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⋡":"\u22E1","≿̸":"\u227F\u0338","⊃⃒":"\u2283\u20D2","⊉":"\u2289","≁":"\u2241","≄":"\u2244","≇":"\u2247","≉":"\u2249","∤":"\u2224","𝒩":"\u{1D4A9}","Ñ":"\xD1","Ñ":"\xD1","Ν":"\u039D","Œ":"\u0152","Ó":"\xD3","Ó":"\xD3","Ô":"\xD4","Ô":"\xD4","О":"\u041E","Ő":"\u0150","𝔒":"\u{1D512}","Ò":"\xD2","Ò":"\xD2","Ō":"\u014C","Ω":"\u03A9","Ο":"\u039F","𝕆":"\u{1D546}","“":"\u201C","‘":"\u2018","⩔":"\u2A54","𝒪":"\u{1D4AA}","Ø":"\xD8","Ø":"\xD8","Õ":"\xD5","Õ":"\xD5","⨷":"\u2A37","Ö":"\xD6","Ö":"\xD6","‾":"\u203E","⏞":"\u23DE","⎴":"\u23B4","⏜":"\u23DC","∂":"\u2202","П":"\u041F","𝔓":"\u{1D513}","Φ":"\u03A6","Π":"\u03A0","±":"\xB1","ℌ":"\u210C","ℙ":"\u2119","⪻":"\u2ABB","≺":"\u227A","⪯":"\u2AAF","≼":"\u227C","≾":"\u227E","″":"\u2033","∏":"\u220F","∷":"\u2237","∝":"\u221D","𝒫":"\u{1D4AB}","Ψ":"\u03A8",""":'"',""":'"',"𝔔":"\u{1D514}","ℚ":"\u211A","𝒬":"\u{1D4AC}","⤐":"\u2910","®":"\xAE","®":"\xAE","Ŕ":"\u0154","⟫":"\u27EB","↠":"\u21A0","⤖":"\u2916","Ř":"\u0158","Ŗ":"\u0156","Р":"\u0420","ℜ":"\u211C","∋":"\u220B","⇋":"\u21CB","⥯":"\u296F","ℜ":"\u211C","Ρ":"\u03A1","⟩":"\u27E9","→":"\u2192","⇥":"\u21E5","⇄":"\u21C4","⌉":"\u2309","⟧":"\u27E7","⥝":"\u295D","⇂":"\u21C2","⥕":"\u2955","⌋":"\u230B","⊢":"\u22A2","↦":"\u21A6","⥛":"\u295B","⊳":"\u22B3","⧐":"\u29D0","⊵":"\u22B5","⥏":"\u294F","⥜":"\u295C","↾":"\u21BE","⥔":"\u2954","⇀":"\u21C0","⥓":"\u2953","⇒":"\u21D2","ℝ":"\u211D","⥰":"\u2970","⇛":"\u21DB","ℛ":"\u211B","↱":"\u21B1","⧴":"\u29F4","Щ":"\u0429","Ш":"\u0428","Ь":"\u042C","Ś":"\u015A","⪼":"\u2ABC","Š":"\u0160","Ş":"\u015E","Ŝ":"\u015C","С":"\u0421","𝔖":"\u{1D516}","↓":"\u2193","←":"\u2190","→":"\u2192","↑":"\u2191","Σ":"\u03A3","∘":"\u2218","𝕊":"\u{1D54A}","√":"\u221A","□":"\u25A1","⊓":"\u2293","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊔":"\u2294","𝒮":"\u{1D4AE}","⋆":"\u22C6","⋐":"\u22D0","⋐":"\u22D0","⊆":"\u2286","≻":"\u227B","⪰":"\u2AB0","≽":"\u227D","≿":"\u227F","∋":"\u220B","∑":"\u2211","⋑":"\u22D1","⊃":"\u2283","⊇":"\u2287","⋑":"\u22D1","Þ":"\xDE","Þ":"\xDE","™":"\u2122","Ћ":"\u040B","Ц":"\u0426","	":" ","Τ":"\u03A4","Ť":"\u0164","&Tcedil
Line truncated
|
||||
`).replace(/\s+$/,"")}get children(){return this.childNodes.filter(e=>e instanceof n)}toString(){let e=this.tagName;if(e){let t=/^(img|br|hr|area|base|input|doctype|link|meta)$/i.test(e),i=this.rawAttrs?" "+this.rawAttrs:"";return t?`<${e}${i} />`:`<${e}${i}>${this.innerHTML}</${e}>`}else return this.innerHTML}get innerHTML(){return this.childNodes.map(e=>e.toString()).join("")}set innerHTML(e){let t=Tp(e);this.childNodes.forEach(i=>i.remove()),t.childNodes.forEach(i=>this.appendChild(i))}set_content(e){if(e instanceof Go)e=[e];else if(typeof e=="string"){let t=Tp(e);e=t.childNodes.length?t.childNodes:[new Ko(e)]}this.childNodes=e}get outerHTML(){return this.toString()}trimRight(e){for(let t=0;t<this.childNodes.length;t++){let i=this.childNodes[t];if(i.nodeType===At.ELEMENT_NODE)i.trimRight(e);else{let r=i.rawText.search(e);r>-1&&(i.value=i.rawText.substr(0,r),this.childNodes.length=t+1)}}return this}get structure(){let e=[],t=0;function i(o){e.push(" ".repeat(t)+o)}function r(o){let s=o.id?"#"+o.id:"",a=o.classNames.length?"."+o.classNames.join("."):"";i(o.tagName+s+a),t++;for(let c=0;c<o.childNodes.length;c++){let l=o.childNodes[c];l.nodeType===At.ELEMENT_NODE?r(l):l.nodeType===At.TEXT_NODE&&(l.isWhitespace||i("#text"))}t--}return r(this),e.join(`
|
||||
`)}removeWhitespace(){let e=0;for(let t=0;t<this.childNodes.length;t++){let i=this.childNodes[t];if(i.nodeType===At.TEXT_NODE){if(i.isWhitespace)continue;i.value=i.rawText.trim()}else i.nodeType===At.ELEMENT_NODE&&i.removeWhitespace();this.childNodes[e++]=i}return this.childNodes.length=e,this}querySelectorAll(e){if(!(e instanceof Wo))if(e.includes(",")){let o=e.split(","),s=new Set(o.map(a=>this.querySelectorAll(a.trim())).flat());return Array.from(s)}else return this.querySelectorAll(new Wo(e));let t=e,i=new Set,r=[];for(this.childNodes.forEach(o=>r.push(o));r.length>0;){let o=r.shift();o.nodeType===At.ELEMENT_NODE&&(t.advance(o)&&t.matched&&(i.add(o),t.rewind()),o.childNodes.forEach(s=>{r.push(s)}))}return Array.from(i)}querySelector(e){let t;e instanceof Wo?(t=e,t.reset()):t=new Wo(e);let i=[];for(let r=0;r<this.childNodes.length;r++)for(i.push([this.childNodes[r],0,!1]);i.length;){let o=na(i),s=o[0];if(o[1]===0){if(s.nodeType!==At.ELEMENT_NODE){i.pop();continue}if((o[2]=t.advance(s))&&t.matched)return s}o[1]<s.childNodes.length?i.push([s.childNodes[o[1]++],0,!1]):(o[2]&&t.rewind(),i.pop())}return null}appendChild(e){return this.childNodes.push(e),e instanceof n&&(e.parentNode=this),e}prependChild(e){return this.childNodes.unshift(e),e instanceof n&&(e.parentNode=this),e}get firstChild(){return this.childNodes[0]}get lastChild(){return na(this.childNodes)}get attributes(){if(this._attrs)return this._attrs;this._attrs={};let e=this.rawAttributes;for(let t in e)this._attrs[t]=(0,ia.decode)(e[t]);return this._attrs}get rawAttributes(){if(this._rawAttrs)return this._rawAttrs;let e={};if(this.rawAttrs){let t;for(;t=kk.exec(this.rawAttrs);)e[t[1]]=t[4]||t[5]||t[6]||""}return this._rawAttrs=e,e}setAttribute(e,t){e==="id"?this.id=t:e==="class"&&(this.classNames=t.split(/\s+/));let i=this.attributes;t===void 0?delete i[e]:i[e]=t+"",this._rawAttrs&&(t===void 0?delete this._rawAttrs[e]:this._rawAttrs[e]=(0,ia.encode)(t+"")),this.rawAttrs=Object.keys(i).map(r=>r+(i[r]===""?"":'="'+(0,ia.encode)(i[r])+'"')).join(" ")}removeAttribute(e){this.setAttribute(e,void 0)}setAttributes(e){e.id?this.id=e.id:e.class&&(this.classNames=e.class.split(/\s+/)),this.attributes&&(Object.keys(this.attributes).forEach(t=>delete this.attributes[t]),Object.keys(e).forEach(t=>this.attributes[t]=e[t]+"")),this.rawAttributes&&(Object.keys(this.rawAttributes).forEach(t=>delete this.rawAttributes[t]),Object.keys(e).forEach(t=>this.rawAttributes[t]=(0,ia.encode)(e[t]+""))),this.rawAttrs=Object.keys(e).map(t=>t+(e[t]===""?"":'="'+(0,ia.encode)(e[t]+"")+'"')).join(" ")}};pt.HTMLElement=ra;var Qh={},Ep={f145:function(n,e,t,i,r){"use strict";if(e=e||"",t=t||[],i=i||"",r=r||"",n.id!=e.substr(1))return!1;for(let o=t,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f45:function(n,e,t,i,r){"use strict";e=e||"",t=t||[],i=i||"",r=r||"";for(let o=t,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f15:function(n,e,t,i,r){"use strict";return e=e||"",t=t||[],i=i||"",r=r||"",n.id==e.substr(1)},f1:function(n,e,t,i,r){"use strict";if(e=e||"",t=t||[],i=i||"",r=r||"",n.id!=e.substr(1))return!1},f5:function(n,e,t,i,r){"use strict";return n=n||{},e=e||"",t=t||[],i=i||"",r=r||"",!0},f245:function(n,e,t,i,r){"use strict";e=e||"",t=t||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f25:function(n,e,t,i,r){"use strict";e=e||"",t=t||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f2:function(n,e,t,i,r){"use strict";e=e||"",t=t||[],i=i||"",r=r||"";let o=n.attributes;for(let s in o){let a=o[s];if(s==i&&a==r)return!0}return!1},f345:function(n,e,t,i,r){"use strict";if(e=e||"",t=t||[],i=i||"",r=r||"",n.tagName!=e)return!1;for(let o=t,s=0;s<o.length;s++)if(n.classNames.indexOf(o[s])===-1)return!1;return!0},f35:function(n,e,t,i,r){"use strict";return e=e||"",t=t||[],i=i||"",r=r||"",n.tagName==e},f3:function(n,e,t,i,r){"use strict";if(e=e||"",t=t||[],i=i||"",r=r||"",n.tagName!=e)return!1}},Wo=class{constructor(e){this.nextMatch=0,Ep.f5=Ep.f5,this.matchers=e.split(" ").map(t=>{if(Qh[t])return Qh[t];let i=t.split("."),r=i[0],o=i.slice(1).sort(),s='"use strict";',a="f",c="",l="";if(r&&r!="*"){let h;if(r[0]=="#")s+="if (el.id != "+JSON.stringify(r.substr(1))+") return false;",a+="1";else if(h=r.match(/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/)){c=h[1];let u=h[2];if(u!=="="&&u!=="!=")throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");u==="="&&(u="=="),l=h[7]||h[8],s+=`let attrs = el.attributes;for (let key in attrs){const val = attrs[key]; if (key == "${c}" && val == "${l}"){return true;}} return false;`,a+="2"}else s+="if (el.tagName != "+JSON.stringify(r)+") return false;",a+="3"}o.length>0&&(s+="for (let cls = "+JSON.stringify(o)+", i = 0; i < cls.length; i++) if (el.classNames.indexOf(cls[i]) === -1) return false;",a+="4"),s+="return true;",a+="5";let d={func:Ep[a],tagName:r||"",class
Line truncated
|
||||
`,"\f","\r","\v"],Sf=n=>/^[\n\f\r\u000B]$/.test(n),Va=n=>n.split(/[\n\f\r\u000B]/),fd=n=>n.replace(/[\n\f\r\u000B]/g," "),pd=(n,e)=>{let t=n.charCodeAt(e),i,r=e+1,o=1;return t>=55296&&t<=56319&&n.length>r&&(i=n.charCodeAt(r),i>=56320&&i<=57343&&(o=2)),[n.slice(e,e+o),o]},Ef=n=>{let e=[];for(let t=0,i=n.length;t<i;){let[r,o]=pd(n,t);e.push(r),t+=o}return e},H1=n=>{let e=km.join("|"),t=["$"];for(let r=0,o=n.length;r<o;r++){let s=n[r];if(Sf(s))throw new TypeError(`\`wordBreak\` must not include ${e}`);t.push(s===""?".":Pm(s))}let i=t.join("|");return new RegExp(`(${e})|((.*?)(${i}))`,"gm")},Tf=(n,e,t,i)=>{let r=H1(e),o=ir(n).match(r),s="",a=0,c=[],l=()=>{s!==""&&c.push(s),s="",a=0};for(let d=0,h=o.length;d<h;d++){let u=o[d];if(Sf(u))l();else{let p=i(u);a+p>t&&l(),s+=u,a+=p}}return l(),c},z1=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,Ha=n=>{let e=n.match(z1);if(!e)return;let[,t,i="01",r="01",o="00",s="00",a="00",c="Z",l="00",d="00"]=e,h=c==="Z"?"Z":`${c}${l}:${d}`;return new Date(`${t}-${i}-${r}T${o}:${s}:${a}${h}`)},us=(n,e)=>{var t;let i=0,r;for(;i<n.length;){let o=n.substring(i).match(e);if(!o)return{match:r,pos:i};r=o,i+=((t=o.index)!==null&&t!==void 0?t:0)+o[0].length}return{match:r,pos:i}};var Qr=n=>n[n.length-1],za=n=>{if(n instanceof Uint8Array)return n;let e=n.length,t=new Uint8Array(e);for(let i=0;i<e;i++)t[i]=n.charCodeAt(i);return t},Af=(...n)=>{let e=n.length,t=[];for(let s=0;s<e;s++){let a=n[s];t[s]=a instanceof Uint8Array?a:za(a)}let i=0;for(let s=0;s<e;s++)i+=n[s].length;let r=new Uint8Array(i),o=0;for(let s=0;s<e;s++){let a=t[s];for(let c=0,l=a.length;c<l;c++)r[o++]=a[c]}return r},If=n=>{let e=0;for(let r=0,o=n.length;r<o;r++)e+=n[r].length;let t=new Uint8Array(e),i=0;for(let r=0,o=n.length;r<o;r++){let s=n[r];t.set(s,i),i+=s.length}return t},xn=n=>{let e="";for(let t=0,i=n.length;t<i;t++)e+=Mt(n[t]);return e},Bf=(n,e)=>n.id-e.id,Of=(n,e)=>{let t=[];for(let i=0,r=n.length;i<r;i++){let o=n[i],s=n[i-1];(i===0||e(o)!==e(s))&&t.push(o)}return t},fs=(n,e)=>{if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0},nr=n=>{let e=n.length;for(let t=0,i=Math.floor(e/2);t<i;t++){let r=t,o=e-t-1,s=n[t];n[r]=n[o],n[o]=s}return n},Lf=n=>{let e=0;for(let t=0,i=n.length;t<i;t++)e+=n[t];return e},Mf=(n,e)=>{let t=new Array(e-n);for(let i=0,r=t.length;i<r;i++)t[i]=n+i;return t},Nf=(n,e)=>{let t=new Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=n[e[i]];return t},Rf=n=>n instanceof Uint8Array||n instanceof ArrayBuffer||typeof n=="string",$r=n=>{if(typeof n=="string")return kf(n);if(n instanceof ArrayBuffer)return new Uint8Array(n);if(n instanceof Uint8Array)return n;throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`")},Cm=[];for(let n=0;n<=255;++n)Cm[n]=n.toString(16).padStart(2,"0");var Vf=n=>{let e=new Array(n.length);for(let t=0;t<n.length;++t)e[t]=Cm[n[t]];return e.join("")};var Ai=()=>new Promise(n=>{setTimeout(()=>n(),0)});var U1=(n,e=!0)=>{let t=[];e&&t.push(239,187,191);for(let i=0,r=n.length;i<r;){let o=n.codePointAt(i);if(o<128){let s=o&127;t.push(s),i+=1}else if(o<2048){let s=o>>6&31|192,a=o&63|128;t.push(s,a),i+=1}else if(o<65536){let s=o>>12&15|224,a=o>>6&63|128,c=o&63|128;t.push(s,a,c),i+=1}else if(o<1114112){let s=o>>18&7|240,a=o>>12&63|128,c=o>>6&63|128,l=o>>0&63|128;t.push(s,a,c,l),i+=2}else throw new Error(`Invalid code point: 0x${Gi(o)}`)}return new Uint8Array(t)},Hf=(n,e=!0)=>{let t=[];e&&t.push(65279);for(let i=0,r=n.length;i<r;){let o=n.codePointAt(i);if(o<65536)t.push(o),i+=1;else if(o<1114112)t.push(gd(o),md(o)),i+=2;else throw new Error(`Invalid code point: 0x${Gi(o)}`)}return new Uint16Array(t)},zf=n=>n>=0&&n<=65535,Uf=n=>n>=65536&&n<=1114111,gd=n=>Math.floor((n-65536)/1024)+55296,md=n=>(n-65536)%1024+56320,rr;(function(n){n.BigEndian="BigEndian",n.LittleEndian="LittleEndian"})(rr||(rr={}));var Ua="\uFFFD".codePointAt(0),qa=(n,e=!0)=>{if(n.length<=1)return String.fromCodePoint(Ua);let t=e?j1(n):rr.BigEndian,i=e?2:0,r=[];for(;n.length-i>=2;){let o=Em(n[i++],n[i++],t);if(q1(o))if(n.length-i<2)r.push(Ua);else{let s=Em(n[i++],n[i++],t);Sm(s)?r.push(o,s):r.push(Ua)}else Sm(o)?(i+=2,r.push(Ua)):r.push(o)}return i<n.length&&r.push(Ua),String.fromCodePoint(...r)},q1=n=>n>=55296&&n<=56319,Sm=n=>n>=56320&&n<=57343,Em=(n,e,t)=>{if(t===rr.LittleEndian)return e<<8|n;if(t===rr.BigEndian)return n<<8|e;throw new Error(`Invalid byteOrder: ${t}`)},j1=n=>Tm(n)?rr.BigEndian:Am(n)?rr.LittleEndian:rr.BigEndian,Tm=n=>n[0]===254&&n[1]===255,Am=n=>n[0]===255&&n[1]===254,ja=n=>Tm(n)||Am(n);var qf=n=>{let e=String(n);if(Math.abs(n)<1){let t=parseInt(n.toString().split("e-")[1]);if(t){let i=n<0;i&&(n*=-1),n*=Math.pow(10,t-1),e="0."+new Array(t).join("0")+n.toString().substring(2),i&&(e="-"+e)}}else{let t=parseInt(n.toString().split("+")[1]);t>20&&(t-=20,n/=Math.pow(10,t),e=n.toString()+new Array(t+1).join("0"))}return e},ps=n=>Math.ceil(n.toString(2).length/8),or=n=>{let e=new Uint8Array(ps(n));for(let t=1Line truncated
|
||||
%${e}${e}${e}${e}`}sizeInBytes(){return 12+this.major.length+this.minor.length}copyBytesInto(e,t){let i=t;return e[t++]=P.Percent,e[t++]=P.P,e[t++]=P.D,e[t++]=P.F,e[t++]=P.Dash,t+=Ae(this.major,e,t),e[t++]=P.Period,t+=Ae(this.minor,e,t),e[t++]=P.Newline,e[t++]=P.Percent,e[t++]=129,e[t++]=129,e[t++]=129,e[t++]=129,t-i}};Al.forVersion=(n,e)=>new Al(n,e);var $i=Al;var T0=class{clone(e){throw new Ze(this.constructor.name,"clone")}toString(){throw new Ze(this.constructor.name,"toString")}sizeInBytes(){throw new Ze(this.constructor.name,"sizeInBytes")}copyBytesInto(e,t){throw new Ze(this.constructor.name,"copyBytesInto")}},Se=T0;var Il=class n extends Se{constructor(e){super(),this.numberValue=e,this.stringValue=qf(e)}asNumber(){return this.numberValue}value(){return this.numberValue}clone(){return n.of(this.numberValue)}toString(){return this.stringValue}sizeInBytes(){return this.stringValue.length}copyBytesInto(e,t){return Ae(this.stringValue,e,t),this.stringValue.length}};Il.of=n=>new Il(n);var G=Il;var Bl=class n extends Se{constructor(e){super(),this.array=[],this.context=e}size(){return this.array.length}push(e){this.array.push(e)}insert(e,t){this.array.splice(e,0,t)}indexOf(e){let t=this.array.indexOf(e);return t===-1?void 0:t}remove(e){this.array.splice(e,1)}set(e,t){this.array[e]=t}get(e){return this.array[e]}lookupMaybe(e,...t){return this.context.lookupMaybe(this.get(e),...t)}lookup(e,...t){return this.context.lookup(this.get(e),...t)}asRectangle(){if(this.size()!==4)throw new bl(this.size());let e=this.lookup(0,G).asNumber(),t=this.lookup(1,G).asNumber(),i=this.lookup(2,G).asNumber(),r=this.lookup(3,G).asNumber(),o=Math.min(e,i),s=Math.min(t,r),a=Math.abs(e-i),c=Math.abs(t-r);return{x:o,y:s,width:a,height:c}}asArray(){return this.array.slice()}clone(e){let t=n.withContext(e||this.context);for(let i=0,r=this.size();i<r;i++)t.push(this.array[i]);return t}toString(){let e="[ ";for(let t=0,i=this.size();t<i;t++)e+=this.get(t).toString(),e+=" ";return e+="]",e}sizeInBytes(){let e=3;for(let t=0,i=this.size();t<i;t++)e+=this.get(t).sizeInBytes()+1;return e}copyBytesInto(e,t){let i=t;e[t++]=P.LeftSquareBracket,e[t++]=P.Space;for(let r=0,o=this.size();r<o;r++)t+=this.get(r).copyBytesInto(e,t),e[t++]=P.Space;return e[t++]=P.RightSquareBracket,t-i}scalePDFNumbers(e,t){for(let i=0,r=this.size();i<r;i++){let o=this.lookup(i);if(o instanceof G){let s=i%2===0?e:t;this.set(i,G.of(o.asNumber()*s))}}}};Bl.withContext=n=>new Bl(n);var Z=Bl;var A0={},ho=class extends Se{constructor(e,t){if(e!==A0)throw new Dn("PDFBool");super(),this.value=t}asBoolean(){return this.value}clone(){return this}toString(){return String(this.value)}sizeInBytes(){return this.value?4:5}copyBytesInto(e,t){return this.value?(e[t++]=P.t,e[t++]=P.r,e[t++]=P.u,e[t++]=P.e,4):(e[t++]=P.f,e[t++]=P.a,e[t++]=P.l,e[t++]=P.s,e[t++]=P.e,5)}};ho.True=new ho(A0,!0);ho.False=new ho(A0,!1);var Li=ho;var Ht=new Uint8Array(256);Ht[P.LeftParen]=1;Ht[P.RightParen]=1;Ht[P.LessThan]=1;Ht[P.GreaterThan]=1;Ht[P.LeftSquareBracket]=1;Ht[P.RightSquareBracket]=1;Ht[P.LeftCurly]=1;Ht[P.RightCurly]=1;Ht[P.ForwardSlash]=1;Ht[P.Percent]=1;var ci=new Uint8Array(256);ci[P.Null]=1;ci[P.Tab]=1;ci[P.Newline]=1;ci[P.FormFeed]=1;ci[P.CarriageReturn]=1;ci[P.Space]=1;var Md=new Uint8Array(256);for(let n=0,e=256;n<e;n++)Md[n]=ci[n]||Ht[n]?1:0;Md[P.Hash]=1;var tP=n=>n.replace(/#([\dABCDEF]{2})/g,(e,t)=>Cf(t)),iP=n=>n>=P.ExclamationPoint&&n<=P.Tilde&&!Md[n],Kb={},Wb=new Map,oe=class extends Se{constructor(e,t){if(e!==Kb)throw new Dn("PDFName");super();let i="/";for(let r=0,o=t.length;r<o;r++){let s=t[r],a=ae(s);i+=iP(a)?s:`#${Gi(a)}`}this.encodedName=i}asBytes(){let e=[],t="",i=!1,r=o=>{o!==void 0&&e.push(o),i=!1};for(let o=1,s=this.encodedName.length;o<s;o++){let a=this.encodedName[o],c=ae(a),l=this.encodedName[o+1];i?c>=P.Zero&&c<=P.Nine||c>=P.a&&c<=P.f||c>=P.A&&c<=P.F?(t+=a,(t.length===2||!(l>="0"&&l<="9"||l>="a"&&l<="f"||l>="A"&&l<="F"))&&(r(parseInt(t,16)),t="")):r(c):c===P.Hash?i=!0:r(c)}return new Uint8Array(e)}decodeText(){let e=this.asBytes();return String.fromCharCode(...Array.from(e))}asString(){return this.encodedName}value(){return this.encodedName}clone(){return this}toString(){return this.encodedName}sizeInBytes(){return this.encodedName.length}copyBytesInto(e,t){return Ae(this.encodedName,e,t),this.encodedName.length}};oe.of=n=>{let e=tP(n),t=Wb.get(e);return t||(t=new oe(Kb,e),Wb.set(e,t)),t};oe.Length=oe.of("Length");oe.FlateDecode=oe.of("FlateDecode");oe.Resources=oe.of("Resources");oe.Font=oe.of("Font");oe.XObject=oe.of("XObject");oe.ExtGState=oe.of("ExtGState");oe.Contents=oe.of("Contents");oe.Type=oe.of("Type");oe.Parent=oe.of("Parent");oe.MediaBox=oe.of("MediaBox");oe.Page=oe.of("Page");oe.Annots=oe.of("Annots");oe.TrimBox=oe.of("TrimBox");oe.ArtBox=oe.of("ArtBox");oe.BleedBox=oe.of("BleedBox");oe.CropBox=oe.of("CropBox");oe.Rotate=oe.of("Rotate");oe.Title=oe.of("Title");oe.Author=oe.of("Author");oe.Subject=oe.of("Subject");oe.Creator=oe.of("Creator");oe.Keywords=oe
Line truncated
|
||||
`,t=this.entries();for(let i=0,r=t.length;i<r;i++){let[o,s]=t[i];e+=o.toString()+" "+s.toString()+`
|
||||
`}return e+=">>",e}sizeInBytes(){let e=5,t=this.entries();for(let i=0,r=t.length;i<r;i++){let[o,s]=t[i];e+=o.sizeInBytes()+s.sizeInBytes()+2}return e}copyBytesInto(e,t){let i=t;e[t++]=P.LessThan,e[t++]=P.LessThan,e[t++]=P.Newline;let r=this.entries();for(let o=0,s=r.length;o<s;o++){let[a,c]=r[o];t+=a.copyBytesInto(e,t),e[t++]=P.Space,t+=c.copyBytesInto(e,t),e[t++]=P.Newline}return e[t++]=P.GreaterThan,e[t++]=P.GreaterThan,t-i}};uo.withContext=n=>new uo(new Map,n);uo.fromMapWithContext=(n,e)=>new uo(n,e);var W=uo;var Sn=class n extends Se{constructor(e){super(),this.value=e}asBytes(){let e=this.value+(this.value.length%2===1?"0":""),t=e.length,i=new Uint8Array(e.length/2),r=0,o=0;for(;r<t;){let s=parseInt(e.substring(r,r+2),16);i[o]=s,r+=2,o+=1}return i}decodeText(){let e=this.asBytes();return ja(e)?qa(e):ul(e)}decodeDate(){let e=this.decodeText(),t=Ha(e);if(!t)throw new co(e);return t}asString(){return this.value}clone(){return n.of(this.value)}toString(){return`<${this.value}>`}sizeInBytes(){return this.value.length+2}copyBytesInto(e,t){return e[t++]=P.LessThan,t+=Ae(this.value,e,t),e[t++]=P.GreaterThan,this.value.length+2}};Sn.of=n=>new Sn(n);Sn.fromText=n=>{let e=Hf(n),t="";for(let i=0,r=e.length;i<r;i++)t+=Ki(e[i],4);return new Sn(t)};Sn.fromBytes=n=>Sn.of(Vf(n));var K=Sn;var B0=class extends Se{constructor(e){super(),this.dict=e}clone(e){throw new Ze(this.constructor.name,"clone")}getContentsString(){throw new Ze(this.constructor.name,"getContentsString")}getContents(){throw new Ze(this.constructor.name,"getContents")}getContentsSize(){throw new Ze(this.constructor.name,"getContentsSize")}updateContents(e){throw new Ze(this.constructor.name,"updateContents")}updateDict(){let e=this.getContentsSize();this.dict.set(v.Length,G.of(e))}sizeInBytes(){return this.updateDict(),this.dict.sizeInBytes()+this.getContentsSize()+18}toString(){this.updateDict();let e=this.dict.toString();return e+=`
|
||||
stream
|
||||
`,e+=this.getContentsString(),e+=`
|
||||
endstream`,e}copyBytesInto(e,t){this.updateDict();let i=t;t+=this.dict.copyBytesInto(e,t),e[t++]=P.Newline,e[t++]=P.s,e[t++]=P.t,e[t++]=P.r,e[t++]=P.e,e[t++]=P.a,e[t++]=P.m,e[t++]=P.Newline;let r=this.getContents();for(let o=0,s=r.length;o<s;o++)e[t++]=r[o];return e[t++]=P.Newline,e[t++]=P.e,e[t++]=P.n,e[t++]=P.d,e[t++]=P.s,e[t++]=P.t,e[t++]=P.r,e[t++]=P.e,e[t++]=P.a,e[t++]=P.m,t-i}},Ee=B0;var Ol=class n extends Ee{constructor(e,t,i){super(e),this.contents=t,this.transform=i}asUint8Array(){return this.contents.slice()}clone(e){return n.of(this.dict.clone(e),this.contents.slice())}getContentsString(){return xn(this.contents)}getContents(){return this.contents}getContentsSize(){return this.contents.length}updateContents(e){this.contents=e}};Ol.of=(n,e,t)=>new Ol(n,e,t);var Mi=Ol;var Xb={},Gb=new Map,Ll=class extends Se{constructor(e,t,i){if(e!==Xb)throw new Dn("PDFRef");super(),this.objectNumber=t,this.generationNumber=i,this.tag=`${t} ${i} R`}clone(){return this}toString(){return this.tag}sizeInBytes(){return this.tag.length}copyBytesInto(e,t){return Ae(this.tag,e,t),this.tag.length}};Ll.of=(n,e=0)=>{let t=`${n} ${e} R`,i=Gb.get(t);return i||(i=new Ll(Xb,n,e),Gb.set(t,i)),i};var Y=Ll;var fo=class n extends Se{constructor(e){super(),this.value=e}asBytes(){let e=[],t="",i=!1,r=o=>{o!==void 0&&e.push(o),i=!1};for(let o=0,s=this.value.length;o<s;o++){let a=this.value[o],c=ae(a),l=this.value[o+1];i?c===P.Newline||c===P.CarriageReturn?r():c===P.n?r(P.Newline):c===P.r?r(P.CarriageReturn):c===P.t?r(P.Tab):c===P.b?r(P.Backspace):c===P.f?r(P.FormFeed):c===P.LeftParen?r(P.LeftParen):c===P.RightParen?r(P.RightParen):c===P.Backspace?r(P.BackSlash):c>=P.Zero&&c<=P.Seven?(t+=a,(t.length===3||!(l>="0"&&l<="7"))&&(r(parseInt(t,8)),t="")):r(c):c===P.BackSlash?i=!0:r(c)}return new Uint8Array(e)}decodeText(){let e=this.asBytes();return ja(e)?qa(e):ul(e)}decodeDate(){let e=this.decodeText(),t=Ha(e);if(!t)throw new co(e);return t}asString(){return this.value}clone(){return n.of(this.value)}toString(){return`(${this.value})`}sizeInBytes(){return this.value.length+2}copyBytesInto(e,t){return e[t++]=P.LeftParen,t+=Ae(this.value,e,t),e[t++]=P.RightParen,this.value.length+2}};fo.of=n=>new fo(n);fo.fromDate=n=>{let e=Nt(String(n.getUTCFullYear()),4,"0"),t=Nt(String(n.getUTCMonth()+1),2,"0"),i=Nt(String(n.getUTCDate()),2,"0"),r=Nt(String(n.getUTCHours()),2,"0"),o=Nt(String(n.getUTCMinutes()),2,"0"),s=Nt(String(n.getUTCSeconds()),2,"0");return new fo(`D:${e}${t}${i}${r}${o}${s}Z`)};var J=fo;var Ml=class n{constructor(e,t){this.name=e,this.args=t||[]}clone(e){let t=new Array(this.args.length);for(let i=0,r=t.length;i<r;i++){let o=this.args[i];t[i]=o instanceof Se?o.clone(e):o}return n.of(this.name,t)}toString(){let e="";for(let t=0,i=this.args.length;t<i;t++)e+=String(this.args[t])+" ";return e+=this.name,e}sizeInBytes(){let e=0;for(let t=0,i=this.args.length;t<i;t++){let r=this.args[t];e+=(r instanceof Se?r.sizeInBytes():r.length)+1}return e+=this.name.length,e}copyBytesInto(e,t){let i=t;for(let r=0,o=this.args.length;r<o;r++){let s=this.args[r];s instanceof Se?t+=s.copyBytesInto(e,t):t+=Ae(s,e,t),e[t++]=P.Space}return t+=Ae(this.name,e,t),t-i}};Ml.of=(n,e)=>new Ml(n,e);var le=Ml;var O0;(function(n){n.NonStrokingColor="sc",n.NonStrokingColorN="scn",n.NonStrokingColorRgb="rg",n.NonStrokingColorGray="g",n.NonStrokingColorCmyk="k",n.NonStrokingColorspace="cs",n.StrokingColor="SC",n.StrokingColorN="SCN",n.StrokingColorRgb="RG",n.StrokingColorGray="G",n.StrokingColorCmyk="K",n.StrokingColorspace="CS",n.BeginMarkedContentSequence="BDC",n.BeginMarkedContent="BMC",n.EndMarkedContent="EMC",n.MarkedContentPointWithProps="DP",n.MarkedContentPoint="MP",n.DrawObject="Do",n.ConcatTransformationMatrix="cm",n.PopGraphicsState="Q",n.PushGraphicsState="q",n.SetFlatness="i",n.SetGraphicsStateParams="gs",n.SetLineCapStyle="J",n.SetLineDashPattern="d",n.SetLineJoinStyle="j",n.SetLineMiterLimit="M",n.SetLineWidth="w",n.SetTextMatrix="Tm",n.SetRenderingIntent="ri",n.AppendRectangle="re",n.BeginInlineImage="BI",n.BeginInlineImageData="ID",n.EndInlineImage="EI",n.ClipEvenOdd="W*",n.ClipNonZero="W",n.CloseAndStroke="s",n.CloseFillEvenOddAndStroke="b*",n.CloseFillNonZeroAndStroke="b",n.ClosePath="h",n.AppendBezierCurve="c",n.CurveToReplicateFinalPoint="y",n.CurveToReplicateInitialPoint="v",n.EndPath="n",n.FillEvenOddAndStroke="B*",n.FillEvenOdd="f*",n.FillNonZeroAndStroke="B",n.FillNonZero="f",n.LegacyFillNonZero="F",n.LineTo="l",n.MoveTo="m",n.ShadingFill="sh",n.StrokePath="S",n.BeginText="BT",n.EndText="ET",n.MoveText="Td",n.MoveTextSetLeading="TD",n.NextLine="T*",n.SetCharacterSpacing="Tc",n.SetFontAndSize="Tf",n.SetTextHorizontalScaling="Tz",n.SetTextLineHeight="TL",n.SetTextRenderingMode="Tr",n.SetTextRise="Ts",n.SetWordSpacing="Tw",n.ShowText="Tj",n.ShowTextAdjusted="TJ",n.ShowTextLine="'",n.ShowTextLineAndSpace='"',n.Type3D0="d0",n.Type3D1="d1",n.BeginCompatibilitySection="BX",n.EndCompatibilitySection="EX"})(O0||(O0={}));var ce=O0;var Zb=Wi(sl(),1);var L0
Line truncated
|
||||
`;return e}getUnencodedContents(){let e=new Uint8Array(this.getUnencodedContentsSize()),t=0;for(let i=0,r=this.operators.length;i<r;i++)t+=this.operators[i].copyBytesInto(e,t),e[t++]=P.Newline;return e}getUnencodedContentsSize(){let e=0;for(let t=0,i=this.operators.length;t<i;t++)e+=this.operators[t].sizeInBytes()+1;return e}};Nl.of=(n,e,t=!0)=>new Nl(n,e,t);var en=Nl;var As=class{constructor(e){this.seed=e}nextInt(){let e=Math.sin(this.seed++)*1e4;return e-Math.floor(e)}};As.withSeed=n=>new As(n);var nP=([n],[e])=>n.objectNumber-e.objectNumber,Rl=class{constructor(){this.isDecrypted=!0,this.largestObjectNumber=0,this.header=$i.forVersion(1,7),this.trailerInfo={},this.indirectObjects=new Map,this.rng=As.withSeed(1)}assign(e,t){this.indirectObjects.set(e,t),e.objectNumber>this.largestObjectNumber&&(this.largestObjectNumber=e.objectNumber)}nextRef(){return this.largestObjectNumber+=1,Y.of(this.largestObjectNumber)}register(e){let t=this.nextRef();return this.assign(t,e),t}delete(e){return this.indirectObjects.delete(e)}lookupMaybe(e,...t){let i=t.includes(He),r=e instanceof Y?this.indirectObjects.get(e):e;if(!(!r||r===He&&!i)){for(let o=0,s=t.length;o<s;o++){let a=t[o];if(a===He){if(r===He)return r}else if(r instanceof a)return r}throw new Qi(t,r)}}lookup(e,...t){let i=e instanceof Y?this.indirectObjects.get(e):e;if(t.length===0)return i;for(let r=0,o=t.length;r<o;r++){let s=t[r];if(s===He){if(i===He)return i}else if(i instanceof s)return i}throw new Qi(t,i)}getObjectRef(e){let t=Array.from(this.indirectObjects.entries());for(let i=0,r=t.length;i<r;i++){let[o,s]=t[i];if(s===e)return o}}enumerateIndirectObjects(){return Array.from(this.indirectObjects.entries()).sort(nP)}obj(e){if(e instanceof Se)return e;if(e==null)return He;if(typeof e=="string")return v.of(e);if(typeof e=="number")return G.of(e);if(typeof e=="boolean")return e?Li.True:Li.False;if(e instanceof Uint8Array)return K.fromBytes(e);if(Array.isArray(e)){let t=Z.withContext(this);for(let i=0,r=e.length;i<r;i++)t.push(this.obj(e[i]));return t}else{let t=W.withContext(this),i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let s=i[r],a=e[s];a!==void 0&&t.set(v.of(s),this.obj(a))}return t}}getLiteral(e,{deep:t=!0,literalRef:i=!1,literalStreamDict:r=!1,literalString:o=!1}={}){let s={deep:t,literalRef:i,literalStreamDict:r,literalString:o};if(e instanceof Z){let a=e.asArray();return t?a.map(c=>this.getLiteral(c,s)):a}else{if(e instanceof Li)return e.asBoolean();if(e instanceof W){let a={},c=e.entries();for(let l=0,d=c.length;l<d;l++){let[h,u]=c[l];a[this.getLiteral(h)]=t?this.getLiteral(u,s):u}return a}else{if(e instanceof v)return e.decodeText();if(e===He)return null;if(e instanceof G)return e.asNumber();if(e instanceof Y&&i)return e.objectNumber;if(e instanceof Ee&&r)return this.getLiteral(e.dict,s);if((e instanceof J||e instanceof K)&&o)return e.asString()}}return e}stream(e,t={}){return Mi.of(this.obj(t),za(e))}flateStream(e,t={}){return this.stream(Yb.default.deflate(za(e)),Object.assign(Object.assign({},t),{Filter:"FlateDecode"}))}contentStream(e,t={}){return en.of(this.obj(t),e)}formXObject(e,t={}){return this.contentStream(e,Object.assign(Object.assign({BBox:this.obj([0,0,0,0]),Matrix:this.obj([1,0,0,1,0,0])},t),{Type:"XObject",Subtype:"Form"}))}getPushGraphicsStateContentStream(){if(this.pushGraphicsStateContentStreamRef)return this.pushGraphicsStateContentStreamRef;let e=this.obj({}),t=le.of(ce.PushGraphicsState),i=en.of(e,[t]);return this.pushGraphicsStateContentStreamRef=this.register(i),this.pushGraphicsStateContentStreamRef}getPopGraphicsStateContentStream(){if(this.popGraphicsStateContentStreamRef)return this.popGraphicsStateContentStreamRef;let e=this.obj({}),t=le.of(ce.PopGraphicsState),i=en.of(e,[t]);return this.popGraphicsStateContentStreamRef=this.register(i),this.popGraphicsStateContentStreamRef}addRandomSuffix(e,t=4){return`${e}-${Math.floor(this.rng.nextInt()*Math.pow(10,t))}`}};Rl.create=()=>new Rl;var po=Rl;var pr=class n extends W{constructor(e,t,i=!0){super(e,t),this.normalized=!1,this.autoNormalizeCTM=i}clone(e){let t=n.fromMapWithContext(new Map,e||this.context,this.autoNormalizeCTM),i=this.entries();for(let r=0,o=i.length;r<o;r++){let[s,a]=i[r];t.set(s,a)}return t}Parent(){return this.lookupMaybe(v.Parent,W)}Contents(){return this.lookup(v.of("Contents"))}Annots(){return this.lookupMaybe(v.Annots,Z)}BleedBox(){return this.lookupMaybe(v.BleedBox,Z)}TrimBox(){return this.lookupMaybe(v.TrimBox,Z)}ArtBox(){return this.lookupMaybe(v.ArtBox,Z)}Resources(){let e=this.getInheritableAttribute(v.Resources);return this.context.lookupMaybe(e,W)}MediaBox(){let e=this.getInheritableAttribute(v.MediaBox);return this.context.lookup(e,Z)}CropBox(){let e=this.getInheritableAttribute(v.CropBox);return this.context.lookupMaybe(e,Z)}Rotate(){let e=this.getInheritableAttribute(v.Rotate);return this.context.lookupMaybe(e,G)}getInheritableAttribute(e){let t;return this.ascend(i=>{t||(t=i.get(e))}),t}setParent(e){this.set(v.Parent,e)}addContentStrea
Line truncated
|
||||
`;for(let t=0,i=this.subsections.length;t<i;t++){let r=this.subsections[t];e+=`${r[0].ref.objectNumber} ${r.length}
|
||||
`;for(let o=0,s=r.length;o<s;o++){let a=r[o];e+=Nt(String(a.offset),10,"0"),e+=" ",e+=Nt(String(a.ref.generationNumber),5,"0"),e+=" ",e+=a.deleted?"f":"n",e+=`
|
||||
`}}return e}sizeInBytes(){let e=5;for(let t=0,i=this.subsections.length;t<i;t++){let r=this.subsections[t],o=r.length,[s]=r;e+=2,e+=String(s.ref.objectNumber).length,e+=String(o).length,e+=20*o}return e}copyBytesInto(e,t){let i=t;return e[t++]=P.x,e[t++]=P.r,e[t++]=P.e,e[t++]=P.f,e[t++]=P.Newline,t+=this.copySubsectionsIntoBuffer(this.subsections,e,t),t-i}copySubsectionsIntoBuffer(e,t,i){let r=i,o=e.length;for(let s=0;s<o;s++){let a=this.subsections[s],c=String(a[0].ref.objectNumber);i+=Ae(c,t,i),t[i++]=P.Space;let l=String(a.length);i+=Ae(l,t,i),t[i++]=P.Newline,i+=this.copyEntriesIntoBuffer(a,t,i)}return i-r}copyEntriesIntoBuffer(e,t,i){let r=e.length;for(let o=0;o<r;o++){let s=e[o],a=Nt(String(s.offset),10,"0");i+=Ae(a,t,i),t[i++]=P.Space;let c=Nt(String(s.ref.generationNumber),5,"0");i+=Ae(c,t,i),t[i++]=P.Space,t[i++]=s.deleted?P.f:P.n,t[i++]=P.Space,t[i++]=P.Newline}return 20*r}append(e){if(this.chunkLength===0){this.subsections.push([e]),this.chunkIdx=0,this.chunkLength=1;return}let t=this.subsections[this.chunkIdx],i=t[this.chunkLength-1];e.ref.objectNumber-i.ref.objectNumber>1?(this.subsections.push([e]),this.chunkIdx+=1,this.chunkLength=1):(t.push(e),this.chunkLength+=1)}};go.create=()=>new go({ref:Y.of(0,65535),offset:0,deleted:!0});go.createEmpty=()=>new go;var mo=go;var zl=class{constructor(e){this.lastXRefOffset=String(e)}toString(){return`startxref
|
||||
${this.lastXRefOffset}
|
||||
%%EOF`}sizeInBytes(){return 16+this.lastXRefOffset.length}copyBytesInto(e,t){let i=t;return e[t++]=P.s,e[t++]=P.t,e[t++]=P.a,e[t++]=P.r,e[t++]=P.t,e[t++]=P.x,e[t++]=P.r,e[t++]=P.e,e[t++]=P.f,e[t++]=P.Newline,t+=Ae(this.lastXRefOffset,e,t),e[t++]=P.Newline,e[t++]=P.Percent,e[t++]=P.Percent,e[t++]=P.E,e[t++]=P.O,e[t++]=P.F,t-i}};zl.forLastCrossRefSectionOffset=n=>new zl(n);var gr=zl;var Ul=class{constructor(e){this.dict=e}toString(){return`trailer
|
||||
${this.dict.toString()}`}sizeInBytes(){return 8+this.dict.sizeInBytes()}copyBytesInto(e,t){let i=t;return e[t++]=P.t,e[t++]=P.r,e[t++]=P.a,e[t++]=P.i,e[t++]=P.l,e[t++]=P.e,e[t++]=P.r,e[t++]=P.Newline,t+=this.dict.copyBytesInto(e,t),t-i}};Ul.of=n=>new Ul(n);var Nd=Ul;var ql=class n extends fr{constructor(e,t,i=!0){super(e.obj({}),i),this.objects=t,this.offsets=this.computeObjectOffsets(),this.offsetsString=this.computeOffsetsString(),this.dict.set(v.of("Type"),v.of("ObjStm")),this.dict.set(v.of("N"),G.of(this.objects.length)),this.dict.set(v.of("First"),G.of(this.offsetsString.length))}getObjectsCount(){return this.objects.length}clone(e){return n.withContextAndObjects(e||this.dict.context,this.objects.slice(),this.encode)}getContentsString(){let e=this.offsetsString;for(let t=0,i=this.objects.length;t<i;t++){let[,r]=this.objects[t];e+=`${r}
|
||||
`}return e}getUnencodedContents(){let e=new Uint8Array(this.getUnencodedContentsSize()),t=Ae(this.offsetsString,e,0);for(let i=0,r=this.objects.length;i<r;i++){let[,o]=this.objects[i];t+=o.copyBytesInto(e,t),e[t++]=P.Newline}return e}getUnencodedContentsSize(){return this.offsetsString.length+Qr(this.offsets)[1]+Qr(this.objects)[1].sizeInBytes()+1}computeOffsetsString(){let e="";for(let t=0,i=this.offsets.length;t<i;t++){let[r,o]=this.offsets[t];e+=`${r} ${o} `}return e}computeObjectOffsets(){let e=0,t=new Array(this.objects.length);for(let i=0,r=this.objects.length;i<r;i++){let[o,s]=this.objects[i];t[i]=[o.objectNumber,e],e+=s.sizeInBytes()+1}return t}};ql.withContextAndObjects=(n,e,t=!0)=>new ql(n,e,t);var Is=ql;var jl=class{constructor(e,t){this.parsedObjects=0,this.shouldWaitForTick=i=>(this.parsedObjects+=i,this.parsedObjects%this.objectsPerTick===0),this.context=e,this.objectsPerTick=t}serializeToBuffer(){return Q(this,void 0,void 0,function*(){let{size:e,header:t,indirectObjects:i,xref:r,trailerDict:o,trailer:s}=yield this.computeBufferSize(),a=0,c=new Uint8Array(e);a+=t.copyBytesInto(c,a),c[a++]=P.Newline,c[a++]=P.Newline;for(let l=0,d=i.length;l<d;l++){let[h,u]=i[l],p=String(h.objectNumber);a+=Ae(p,c,a),c[a++]=P.Space;let f=String(h.generationNumber);a+=Ae(f,c,a),c[a++]=P.Space,c[a++]=P.o,c[a++]=P.b,c[a++]=P.j,c[a++]=P.Newline,a+=u.copyBytesInto(c,a),c[a++]=P.Newline,c[a++]=P.e,c[a++]=P.n,c[a++]=P.d,c[a++]=P.o,c[a++]=P.b,c[a++]=P.j,c[a++]=P.Newline,c[a++]=P.Newline;let m=u instanceof Is?u.getObjectsCount():1;this.shouldWaitForTick(m)&&(yield Ai())}return r&&(a+=r.copyBytesInto(c,a),c[a++]=P.Newline),o&&(a+=o.copyBytesInto(c,a),c[a++]=P.Newline,c[a++]=P.Newline),a+=s.copyBytesInto(c,a),c})}computeIndirectObjectSize([e,t]){let i=e.sizeInBytes()+3,r=t.sizeInBytes()+9;return i+r}createTrailerDict(){return this.context.obj({Size:this.context.largestObjectNumber+1,Root:this.context.trailerInfo.Root,Encrypt:this.context.trailerInfo.Encrypt,Info:this.context.trailerInfo.Info,ID:this.context.trailerInfo.ID})}computeBufferSize(){return Q(this,void 0,void 0,function*(){let e=$i.forVersion(1,7),t=e.sizeInBytes()+2,i=mo.create(),r=this.context.security,o=this.context.enumerateIndirectObjects();for(let l=0,d=o.length;l<d;l++){let h=o[l],[u,p]=h;r&&this.encrypt(u,p,r),i.addEntry(u,t),t+=this.computeIndirectObjectSize(h),this.shouldWaitForTick(1)&&(yield Ai())}let s=t;t+=i.sizeInBytes()+1;let a=Nd.of(this.createTrailerDict());t+=a.sizeInBytes()+2;let c=gr.forLastCrossRefSectionOffset(s);return t+=c.sizeInBytes(),{size:t,header:e,indirectObjects:o,xref:i,trailerDict:a,trailer:c}})}encrypt(e,t,i){if(t instanceof Ee){let r=i.getEncryptFn(e.objectNumber,e.generationNumber),o=t.getContents(),s=r(o);t.updateContents(s)}}};jl.forContext=(n,e)=>new jl(n,e);var Bs=jl;var Wl=class n extends Se{constructor(e){super(),this.data=e}clone(){return n.of(this.data.slice())}toString(){return`PDFInvalidObject(${this.data.length} bytes)`}sizeInBytes(){return this.data.length}copyBytesInto(e,t){let i=this.data.length;for(let r=0;r<i;r++)e[t++]=this.data[r];return i}};Wl.of=n=>new Wl(n);var Os=Wl;var rP=/\/([^\0\t\n\f\r ]+)[\0\t\n\f\r ]*(\d*\.\d+|\d+)?[\0\t\n\f\r ]+Tf/,M0=class n{constructor(e,t){this.dict=e,this.ref=t}T(){return this.dict.lookupMaybe(v.of("T"),J,K)}Ff(){let e=this.getInheritableAttribute(v.of("Ff"));return this.dict.context.lookupMaybe(e,G)}V(){let e=this.getInheritableAttribute(v.of("V"));return this.dict.context.lookup(e)}Kids(){return this.dict.lookupMaybe(v.of("Kids"),Z)}DA(){let e=this.dict.lookup(v.of("DA"));if(e instanceof J||e instanceof K)return e}setKids(e){this.dict.set(v.of("Kids"),this.dict.context.obj(e))}getParent(){let e=this.dict.get(v.of("Parent"));if(e instanceof Y){let t=this.dict.lookup(v.of("Parent"),W);return new n(t,e)}}setParent(e){e?this.dict.set(v.of("Parent"),e):this.dict.delete(v.of("Parent"))}getFullyQualifiedName(){let e=this.getParent();return e?`${e.getFullyQualifiedName()}.${this.getPartialName()}`:this.getPartialName()}getPartialName(){var e;return(e=this.T())===null||e===void 0?void 0:e.decodeText()}setPartialName(e){e?this.dict.set(v.of("T"),K.fromText(e)):this.dict.delete(v.of("T"))}setDefaultAppearance(e){this.dict.set(v.of("DA"),J.of(e))}getDefaultAppearance(){let e=this.DA();return e instanceof K?e.decodeText():e==null?void 0:e.asString()}setFontSize(e){var t;let i=(t=this.getFullyQualifiedName())!==null&&t!==void 0?t:"",r=this.getDefaultAppearance();if(!r)throw new vl(i);let o=us(r,rP);if(!o.match)throw new wl(i);let s=r.slice(0,o.pos-o.match[0].length),a=o.pos<=r.length?r.slice(o.pos):"",c=o.match[1],l=`${s} /${c} ${e} Tf ${a}`;this.setDefaultAppearance(l)}getFlags(){var e,t;return(t=(e=this.Ff())===null||e===void 0?void 0:e.asNumber())!==null&&t!==void 0?t:0}setFlags(e){this.dict.set(v.of("Ff"),G.of(e))}hasFlag(e){return(this.getFlags()&e)!==0}setFlag(e){let t=this.getFlags();this.setFlags(t|e)}clearFlag(e){let t=this.getFlags();this.setFlags(t&~e)}setFlagTo(e,t){t?this.set
Line truncated
|
||||
12 dict begin
|
||||
begincmap
|
||||
/CIDSystemInfo <<
|
||||
/Registry (Adobe)
|
||||
/Ordering (UCS)
|
||||
/Supplement 0
|
||||
>> def
|
||||
/CMapName /Adobe-Identity-UCS def
|
||||
/CMapType 2 def
|
||||
1 begincodespacerange
|
||||
<0000><ffff>
|
||||
endcodespacerange
|
||||
${n.length} beginbfchar
|
||||
${n.map(([e,t])=>`${e} ${t}`).join(`
|
||||
`)}
|
||||
endbfchar
|
||||
endcmap
|
||||
CMapName currentdict /CMap defineresource pop
|
||||
end
|
||||
end`,Qb=(...n)=>`<${n.join("")}>`,jd=n=>Ki(n,4),dP=n=>{if(zf(n))return jd(n);if(Uf(n)){let i=gd(n),r=md(n);return`${jd(i)}${jd(r)}`}let t=`0x${Gi(n)} is not a valid UTF-8 or UTF-16 codepoint.`;throw new Error(t)};var hP=n=>{let e=0,t=i=>{e|=1<<i-1};return n.fixedPitch&&t(1),n.serif&&t(2),n.symbolic&&t(3),n.script&&t(4),n.nonsymbolic&&t(6),n.italic&&t(7),n.allCap&&t(17),n.smallCap&&t(18),n.forceBold&&t(19),e},ey=n=>{let e=n["OS/2"]?n["OS/2"].sFamilyClass:0;return hP({fixedPitch:n.post.isFixedPitch,serif:1<=e&&e<=7,symbolic:!0,script:e===10,italic:n.head.macStyle.italic})};var z0=class n{static for(e,t,i,r){return Q(this,void 0,void 0,function*(){let o=yield e.create(t);return new n(o,t,i,r)})}constructor(e,t,i,r){this.allGlyphsInFontSortedById=()=>{let o=new Array(this.font.characterSet.length);for(let s=0,a=o.length;s<a;s++){let c=this.font.characterSet[s];o[s]=this.font.glyphForCodePoint(c)}return Of(o.sort(Bf),s=>s.id)},this.font=e,this.scale=1e3/this.font.unitsPerEm,this.fontData=t,this.fontName=this.font.postscriptName||"Font",this.customName=i,this.fontFeatures=r,this.baseFontName="",this.glyphCache=ht.populatedBy(this.allGlyphsInFontSortedById)}encodeText(e){let{glyphs:t}=this.font.layout(e,this.fontFeatures),i=new Array(t.length);for(let r=0,o=t.length;r<o;r++)i[r]=Ki(t[r].id,4);return K.of(i.join(""))}widthOfTextAtSize(e,t){let{glyphs:i}=this.font.layout(e,this.fontFeatures),r=0;for(let s=0,a=i.length;s<a;s++)r+=i[s].advanceWidth*this.scale;let o=t/1e3;return r*o}heightOfFontAtSize(e,t={}){let{descender:i=!0}=t,{ascent:r,descent:o,bbox:s}=this.font,a=(r||s.maxY)*this.scale,c=(o||s.minY)*this.scale,l=a-c;return i||(l-=Math.abs(o)||0),l/1e3*e}sizeOfFontAtHeight(e){let{ascent:t,descent:i,bbox:r}=this.font,o=(t||r.maxY)*this.scale,s=(i||r.minY)*this.scale;return 1e3*e/(o-s)}embedIntoContext(e,t){return this.baseFontName=this.customName||e.addRandomSuffix(this.fontName),this.embedFontDict(e,t)}embedFontDict(e,t){return Q(this,void 0,void 0,function*(){let i=yield this.embedCIDFontDict(e),r=this.embedUnicodeCmap(e),o=e.obj({Type:"Font",Subtype:"Type0",BaseFont:this.baseFontName,Encoding:"Identity-H",DescendantFonts:[i],ToUnicode:r});return t?(e.assign(t,o),t):e.register(o)})}isCFF(){return this.font.cff}embedCIDFontDict(e){return Q(this,void 0,void 0,function*(){let t=yield this.embedFontDescriptor(e),i=e.obj({Type:"Font",Subtype:this.isCFF()?"CIDFontType0":"CIDFontType2",CIDToGIDMap:"Identity",BaseFont:this.baseFontName,CIDSystemInfo:{Registry:J.of("Adobe"),Ordering:J.of("Identity"),Supplement:0},FontDescriptor:t,W:this.computeWidths()});return e.register(i)})}embedFontDescriptor(e){return Q(this,void 0,void 0,function*(){let t=yield this.embedFontStream(e),{scale:i}=this,{italicAngle:r,ascent:o,descent:s,capHeight:a,xHeight:c}=this.font,{minX:l,minY:d,maxX:h,maxY:u}=this.font.bbox,p=e.obj({Type:"FontDescriptor",FontName:this.baseFontName,Flags:ey(this.font),FontBBox:[l*i,d*i,h*i,u*i],ItalicAngle:r,Ascent:o*i,Descent:s*i,CapHeight:(a||o)*i,XHeight:(c||0)*i,StemV:0,[this.isCFF()?"FontFile3":"FontFile2"]:t});return e.register(p)})}serializeFont(){return Q(this,void 0,void 0,function*(){return this.fontData})}embedFontStream(e){return Q(this,void 0,void 0,function*(){let t=e.flateStream(yield this.serializeFont(),{Subtype:this.isCFF()?"CIDFontType0C":void 0});return e.register(t)})}embedUnicodeCmap(e){let t=$b(this.glyphCache.access(),this.glyphId.bind(this)),i=e.flateStream(t);return e.register(i)}glyphId(e){return e?e.id:-1}computeWidths(){let e=this.glyphCache.access(),t=[],i=[];for(let r=0,o=e.length;r<o;r++){let s=e[r],a=e[r-1],c=this.glyphId(s),l=this.glyphId(a);r===0?t.push(c):c-l!==1&&(t.push(i),t.push(c),i=[]),i.push(s.advanceWidth*this.scale)}return t.push(i),t}},Dr=z0;var U0=class n extends Dr{static for(e,t,i,r){return Q(this,void 0,void 0,function*(){let o=yield e.create(t);return new n(o,t,i,r)})}constructor(e,t,i,r){super(e,t,i,r),this.subset=this.font.createSubset(),this.glyphs=[],this.glyphCache=ht.populatedBy(()=>this.glyphs),this.glyphIdMap=new Map}encodeText(e){let{glyphs:t}=this.font.layout(e,this.fontFeatures),i=new Array(t.length);for(let r=0,o=t.length;r<o;r++){let s=t[r],a=this.subset.includeGlyph(s);this.glyphs[a-1]=s,this.glyphIdMap.set(s.id,a),i[r]=Ki(a,4)}return this.glyphCache.invalidate(),K.of(i.join(""))}isCFF(){return this.subset.cff}glyphId(e){return e?this.glyphIdMap.get(e.id):-1}serializeFont(){return new Promise((e,t)=>{let i=[];this.subset.encodeStream().on("data",r=>i.push(r)).on("end",()=>e(If(i))).on("error",r=>t(r))})}},Wd=U0;var Hs;(function(n){n.Source="Source",n.Data="Data",n.Alternative="Alternative",n.Supplement="Supplement",n.EncryptedPayload="EncryptedPayload",n.FormData="EncryptedPayload",n.Schema="Schema",n.Unspecified="Unspecified"})(Hs||(Hs={}));var q0=class n{static for(e,t,i={}){return new n(e,t,i)}constructor(e,t,i={}){this.fileData=e,this.fileName=t,this.options=i}embedIntoContext(e,t){return Q(this,void 0,void 0,function*(){let{mimeType:i,descriptio
Line truncated
|
||||
`);n.setDefaultAppearance(o)},Up=(n,e)=>{var t,i,r;let o=xi(e),s=xi(n.acroField),a=e.getRectangle(),c=e.getAppearanceCharacteristics(),l=e.getBorderStyle(),d=(t=l==null?void 0:l.getWidth())!==null&&t!==void 0?t:0,h=ui(c==null?void 0:c.getRotation()),{width:u,height:p}=on(a,h),f=mi(Object.assign(Object.assign({},a),{rotation:h})),m=pe(0,0,0),x=(i=vt(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:m,g=vt(c==null?void 0:c.getBackgroundColor()),b=vt(c==null?void 0:c.getBackgroundColor(),.8),w=(r=o!=null?o:s)!==null&&r!==void 0?r:m;bi(o?e:n.acroField,w);let y={x:0+d/2,y:0+d/2,width:u-d,height:p-d,thickness:1.5,borderWidth:d,borderColor:x,markColor:w};return{normal:{on:[...f,...sa(Object.assign(Object.assign({},y),{color:g,filled:!0}))],off:[...f,...sa(Object.assign(Object.assign({},y),{color:g,filled:!1}))]},down:{on:[...f,...sa(Object.assign(Object.assign({},y),{color:b,filled:!0}))],off:[...f,...sa(Object.assign(Object.assign({},y),{color:b,filled:!1}))]}}},qp=(n,e)=>{var t,i,r;let o=xi(e),s=xi(n.acroField),a=e.getRectangle(),c=e.getAppearanceCharacteristics(),l=e.getBorderStyle(),d=(t=l==null?void 0:l.getWidth())!==null&&t!==void 0?t:0,h=ui(c==null?void 0:c.getRotation()),{width:u,height:p}=on(a,h),f=mi(Object.assign(Object.assign({},a),{rotation:h})),m=pe(0,0,0),x=(i=vt(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:m,g=vt(c==null?void 0:c.getBackgroundColor()),b=vt(c==null?void 0:c.getBackgroundColor(),.8),w=(r=o!=null?o:s)!==null&&r!==void 0?r:m;bi(o?e:n.acroField,w);let y={x:u/2,y:p/2,width:u-d,height:p-d,borderWidth:d,borderColor:x,dotColor:w};return{normal:{on:[...f,...aa(Object.assign(Object.assign({},y),{color:g,filled:!0}))],off:[...f,...aa(Object.assign(Object.assign({},y),{color:g,filled:!1}))]},down:{on:[...f,...aa(Object.assign(Object.assign({},y),{color:b,filled:!0}))],off:[...f,...aa(Object.assign(Object.assign({},y),{color:b,filled:!1}))]}}},jp=(n,e,t)=>{var i,r,o,s,a;let c=xi(e),l=xi(n.acroField),d=Lr(e),h=Lr(n.acroField),u=e.getRectangle(),p=e.getAppearanceCharacteristics(),f=e.getBorderStyle(),m=p==null?void 0:p.getCaptions(),x=(i=m==null?void 0:m.normal)!==null&&i!==void 0?i:"",g=(o=(r=m==null?void 0:m.down)!==null&&r!==void 0?r:x)!==null&&o!==void 0?o:"",b=(s=f==null?void 0:f.getWidth())!==null&&s!==void 0?s:0,w=ui(p==null?void 0:p.getRotation()),{width:y,height:F}=on(u,w),D=mi(Object.assign(Object.assign({},u),{rotation:w})),C=pe(0,0,0),k=vt(p==null?void 0:p.getBorderColor()),E=vt(p==null?void 0:p.getBackgroundColor()),B=vt(p==null?void 0:p.getBackgroundColor(),.8),S={x:b,y:b,width:y-b*2,height:F-b*2},I=ca(x,{alignment:Ue.Center,fontSize:d!=null?d:h,font:t,bounds:S}),O=ca(g,{alignment:Ue.Center,fontSize:d!=null?d:h,font:t,bounds:S}),A=Math.min(I.fontSize,O.fontSize),N=(a=c!=null?c:l)!==null&&a!==void 0?a:C;bi(c||d!==void 0?e:n.acroField,N,t,A);let q={x:0+b/2,y:0+b/2,width:y-b,height:F-b,borderWidth:b,borderColor:k,textColor:N,font:t.name,fontSize:A};return{normal:[...D,...nu(Object.assign(Object.assign({},q),{color:E,textLines:[I.line]}))],down:[...D,...nu(Object.assign(Object.assign({},q),{color:B,textLines:[O.line]}))]}},Wp=(n,e,t)=>{var i,r,o,s;let a=xi(e),c=xi(n.acroField),l=Lr(e),d=Lr(n.acroField),h=e.getRectangle(),u=e.getAppearanceCharacteristics(),p=e.getBorderStyle(),f=(i=n.getText())!==null&&i!==void 0?i:"",m=(r=p==null?void 0:p.getWidth())!==null&&r!==void 0?r:0,x=ui(u==null?void 0:u.getRotation()),{width:g,height:b}=on(h,x),w=mi(Object.assign(Object.assign({},h),{rotation:x})),y=pe(0,0,0),F=vt(u==null?void 0:u.getBorderColor()),D=vt(u==null?void 0:u.getBackgroundColor()),C,k,E=n.isCombed()?0:1,B={x:m+E,y:m+E,width:g-(m+E)*2,height:b-(m+E)*2};if(n.isMultiline()){let O=su(f,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:t,bounds:B});C=O.lines,k=O.fontSize}else if(n.isCombed()){let O=zp(f,{fontSize:l!=null?l:d,font:t,bounds:B,cellCount:(o=n.getMaxLength())!==null&&o!==void 0?o:0});C=O.cells,k=O.fontSize}else{let O=ca(f,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:t,bounds:B});C=[O.line],k=O.fontSize}let S=(s=a!=null?a:c)!==null&&s!==void 0?s:y;bi(a||l!==void 0?e:n.acroField,S,t,k);let I={x:0+m/2,y:0+m/2,width:g-m,height:b-m,borderWidth:m!=null?m:0,borderColor:F,textColor:S,font:t.name,fontSize:k,color:D,textLines:C,padding:E};return[...w,...ou(I)]},Kp=(n,e,t)=>{var i,r,o;let s=xi(e),a=xi(n.acroField),c=Lr(e),l=Lr(n.acroField),d=e.getRectangle(),h=e.getAppearanceCharacteristics(),u=e.getBorderStyle(),p=(i=n.getSelected()[0])!==null&&i!==void 0?i:"",f=(r=u==null?void 0:u.getWidth())!==null&&r!==void 0?r:0,m=ui(h==null?void 0:h.getRotation()),{width:x,height:g}=on(d,m),b=mi(Object.assign(Object.assign({},d),{rotation:m})),w=pe(0,0,0),y=vt(h==null?void 0:h.getBorderColor()),F=vt(h==null?void 0:h.getBackgroundColor()),D=1,C={x:f+D,y:f+D,width:x-(f+D)*2,height:g-(f+D)*2},{line:k,fontSize:E}=ca(p,{alignment:Ue.Left,fontSize:c!=null?c:l,font:t,bounds:C}),B=(o=s!=null?s:a)!==null&&o!==void 0?o:w;bi(s||c!==void 0?e:n.acroField,B,t,E);let S={x:0+f/2,y:0+
Line truncated
|
||||
`);let C=1,k={x:u+C,y:u+C,width:f-(u+C)*2,height:m-(u+C)*2},{lines:E,fontSize:B,lineHeight:S}=su(D,{alignment:Ue.Left,fontSize:a!=null?a:c,font:t,bounds:k}),I=[];for(let N=0,q=E.length;N<q;N++){let V=E[N];F.includes(V.text)&&I.push(N)}let O=pe(153/255,193/255,218/255),A=(r=o!=null?o:s)!==null&&r!==void 0?r:g;return bi(o||a!==void 0?e:n.acroField,A,t,B),[...x,...Rp({x:0+u/2,y:0+u/2,width:f-u,height:m-u,borderWidth:u!=null?u:0,borderColor:b,textColor:A,font:t.name,fontSize:B,color:w,textLines:E,lineHeight:S,selectedColor:O,selectedLines:I,padding:C})]};var du=Wi(Ap(),1);var Hi=class{constructor(e,t,i){this.alreadyEmbedded=!1,T(e,"ref",[[Y,"PDFRef"]]),T(t,"doc",[[We,"PDFDocument"]]),T(i,"embedder",[[Ws,"PDFPageEmbedder"]]),this.ref=e,this.doc=t,this.width=i.width,this.height=i.height,this.embedder=i}scale(e){return T(e,"factor",["number"]),{width:this.width*e,height:this.height*e}}size(){return this.scale(1)}embed(){return Q(this,void 0,void 0,function*(){this.alreadyEmbedded||(yield this.embedder.embedIntoContext(this.doc.context,this.ref),this.alreadyEmbedded=!0)})}};Hi.of=(n,e,t)=>new Hi(n,e,t);var Me=class{constructor(e,t,i){this.modified=!0,T(e,"ref",[[Y,"PDFRef"]]),T(t,"doc",[[We,"PDFDocument"]]),T(i,"embedder",[[Dr,"CustomFontEmbedder"],[Fr,"StandardFontEmbedder"]]),this.ref=e,this.doc=t,this.name=i.fontName,this.embedder=i}encodeText(e){return T(e,"text",["string"]),this.modified=!0,this.embedder.encodeText(e)}widthOfTextAtSize(e,t){return T(e,"text",["string"]),T(t,"size",["number"]),this.embedder.widthOfTextAtSize(e,t)}heightAtSize(e,t){var i;return T(e,"size",["number"]),H(t==null?void 0:t.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(e,{descender:(i=t==null?void 0:t.descender)!==null&&i!==void 0?i:!0})}sizeAtHeight(e){return T(e,"height",["number"]),this.embedder.sizeOfFontAtHeight(e)}getCharacterSet(){return this.embedder instanceof Fr?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet}embed(){return Q(this,void 0,void 0,function*(){this.modified&&(yield this.embedder.embedIntoContext(this.doc.context,this.ref),this.modified=!1)})}};Me.of=(n,e,t)=>new Me(n,e,t);var yi=class{constructor(e,t,i){T(e,"ref",[[Y,"PDFRef"]]),T(t,"doc",[[We,"PDFDocument"]]),T(i,"embedder",[[Us,"JpegEmbedder"],[js,"PngEmbedder"]]),this.ref=e,this.doc=t,this.width=i.width,this.height=i.height,this.embedder=i}scale(e){return T(e,"factor",["number"]),{width:this.width*e,height:this.height*e}}scaleToFit(e,t){T(e,"width",["number"]),T(t,"height",["number"]);let i=e/this.width,r=t/this.height,o=Math.min(i,r);return this.scale(o)}size(){return this.scale(1)}embed(){return Q(this,void 0,void 0,function*(){if(this.embedder){if(!this.embedTask){let{doc:e,ref:t}=this;this.embedTask=this.embedder.embedIntoContext(e.context,t)}yield this.embedTask,this.embedder=void 0}})}};yi.of=(n,e,t)=>new yi(n,e,t);var vi;(function(n){n[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"})(vi||(vi={}));var wi=n=>{H(n==null?void 0:n.x,"options.x",["number"]),H(n==null?void 0:n.y,"options.y",["number"]),H(n==null?void 0:n.width,"options.width",["number"]),H(n==null?void 0:n.height,"options.height",["number"]),H(n==null?void 0:n.textColor,"options.textColor",[[Object,"Color"]]),H(n==null?void 0:n.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),H(n==null?void 0:n.borderColor,"options.borderColor",[[Object,"Color"]]),H(n==null?void 0:n.borderWidth,"options.borderWidth",["number"]),H(n==null?void 0:n.rotate,"options.rotate",[[Object,"Rotation"]])},at=class{constructor(e,t,i){T(e,"acroField",[[zt,"PDFAcroTerminal"]]),T(t,"ref",[[Y,"PDFRef"]]),T(i,"doc",[[We,"PDFDocument"]]),this.acroField=e,this.ref=t,this.doc=i}getName(){var e;return(e=this.acroField.getFullyQualifiedName())!==null&&e!==void 0?e:""}isReadOnly(){return this.acroField.hasFlag(Kt.ReadOnly)}enableReadOnly(){this.acroField.setFlagTo(Kt.ReadOnly,!0)}disableReadOnly(){this.acroField.setFlagTo(Kt.ReadOnly,!1)}isRequired(){return this.acroField.hasFlag(Kt.Required)}enableRequired(){this.acroField.setFlagTo(Kt.Required,!0)}disableRequired(){this.acroField.setFlagTo(Kt.Required,!1)}isExported(){return!this.acroField.hasFlag(Kt.NoExport)}enableExporting(){this.acroField.setFlagTo(Kt.NoExport,!1)}disableExporting(){this.acroField.setFlagTo(Kt.NoExport,!0)}needsAppearancesUpdate(){throw new Ze(this.constructor.name,"needsAppearancesUpdate")}defaultUpdateAppearances(e){throw new Ze(this.constructor.name,"defaultUpdateAppearances")}markAsDirty(){this.doc.getForm().markFieldAsDirty(this.ref)}markAsClean(){this.doc.getForm().markFieldAsClean(this.ref)}isDirty(){return this.doc.getForm().fieldIsDirty(this.ref)}createWidget(e){var t;let i=e.textColor,r=e.backgroundColor,o=e.borderColor,s=e.borderWidth,a=rn(e.rotate),c=e.caption,l=e.x,d=e.y,h=e.width+s,u=e.height+s,p=!!e.hidden,f=e.page;hl(a,"degreesAngle",90);let m=bo.create(this.doc.context,this.ref),x=op({x:l,y:d,width:h,height:u},s,a);m.setRectangle(x),f&&m.setP(f);let g=m.getOr
Line truncated
|
||||
`+ln(i).toString();this.acroField.setDefaultAppearance(y)}return m}updateWidgetAppearanceWithFont(e,t,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(e,{normal:this.createAppearanceStream(e,i,t),rollover:r&&this.createAppearanceStream(e,r,t),down:o&&this.createAppearanceStream(e,o,t)})}updateOnOffWidgetAppearance(e,t,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(e,{normal:this.createAppearanceDict(e,i,t),rollover:r&&this.createAppearanceDict(e,r,t),down:o&&this.createAppearanceDict(e,o,t)})}updateWidgetAppearances(e,{normal:t,rollover:i,down:r}){e.setNormalAppearance(t),i?e.setRolloverAppearance(i):e.removeRolloverAppearance(),r?e.setDownAppearance(r):e.removeDownAppearance()}createAppearanceStream(e,t,i){let{context:r}=this.acroField.dict,{width:o,height:s}=e.getRectangle(),a=i&&{Font:{[i.name]:i.ref}},c=r.formXObject(t,{Resources:a,BBox:r.obj([0,0,o,s]),Matrix:r.obj([1,0,0,1,0,0])});return r.register(c)}createImageAppearanceStream(e,t,i){var r;let{context:o}=this.acroField.dict,s=e.getRectangle(),a=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),l=(r=c==null?void 0:c.getWidth())!==null&&r!==void 0?r:0,d=ui(a==null?void 0:a.getRotation()),h=mi(Object.assign(Object.assign({},s),{rotation:d})),u=on(s,d),p=t.scaleToFit(u.width-l*2,u.height-l*2),f={x:l,y:l,width:p.width,height:p.height,rotate:te(0),xSkew:te(0),ySkew:te(0)};i===vi.Center?(f.x+=(u.width-l*2)/2-p.width/2,f.y+=(u.height-l*2)/2-p.height/2):i===vi.Right&&(f.x=u.width-l-p.width,f.y=u.height-l-p.height);let m=this.doc.context.addRandomSuffix("Image",10),x=[...h,...kc(m,f)],g={XObject:{[m]:t.ref}},b=o.formXObject(x,{Resources:g,BBox:o.obj([0,0,s.width,s.height]),Matrix:o.obj([1,0,0,1,0,0])});return o.register(b)}createAppearanceDict(e,t,i){let{context:r}=this.acroField.dict,o=this.createAppearanceStream(e,t.on),s=this.createAppearanceStream(e,t.off),a=r.obj({});return a.set(i,o),a.set(v.of("Off"),s),a}};var _t=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroCheckBox",[[En,"PDFAcroCheckBox"]]),this.acroField=e}check(){var e;let t=(e=this.acroField.getOnValue())!==null&&e!==void 0?e:v.of("Yes");this.markAsDirty(),this.acroField.setValue(t)}uncheck(){this.markAsDirty(),this.acroField.setValue(v.of("Off"))}isChecked(){let e=this.acroField.getOnValue();return!!e&&e===this.acroField.getValue()}addToPage(e,t){var i,r,o,s,a,c;T(e,"page",[[Oe,"PDFPage"]]),wi(t),t||(t={}),"textColor"in t||(t.textColor=pe(0,0,0)),"backgroundColor"in t||(t.backgroundColor=pe(1,1,1)),"borderColor"in t||(t.borderColor=pe(0,0,0)),"borderWidth"in t||(t.borderWidth=1);let l=this.createWidget({x:(i=t.x)!==null&&i!==void 0?i:0,y:(r=t.y)!==null&&r!==void 0?r:0,width:(o=t.width)!==null&&o!==void 0?o:50,height:(s=t.height)!==null&&s!==void 0?s:50,textColor:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:(a=t.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=t.rotate)!==null&&c!==void 0?c:te(0),hidden:t.hidden,page:e.ref}),d=this.doc.context.register(l.dict);this.acroField.addWidget(d),l.setAppearanceState(v.of("Off")),this.updateWidgetAppearance(l,v.of("Yes")),e.node.addAnnot(d)}needsAppearancesUpdate(){var e;let t=this.acroField.getWidgets();for(let i=0,r=t.length;i<r;i++){let o=t[i],s=o.getAppearanceState(),a=(e=o.getAppearances())===null||e===void 0?void 0:e.normal;if(!(a instanceof W)||s&&!a.has(s))return!0}return!1}defaultUpdateAppearances(){this.updateAppearances()}updateAppearances(e){var t;H(e,"provider",[Function]);let i=this.acroField.getWidgets();for(let r=0,o=i.length;r<o;r++){let s=i[r],a=(t=s.getOnValue())!==null&&t!==void 0?t:v.of("Yes");a&&this.updateWidgetAppearance(s,a,e)}this.markAsClean()}updateWidgetAppearance(e,t,i){let r=i!=null?i:Up,o=Yt(r(this,e));this.updateOnOffWidgetAppearance(e,t,o)}};_t.of=(n,e,t)=>new _t(n,e,t);var Fi=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroComboBox",[[Tn,"PDFAcroComboBox"]]),this.acroField=e}getOptions(){let e=this.acroField.getOptions(),t=new Array(e.length);for(let i=0,r=t.length;i<r;i++){let{display:o,value:s}=e[i];t[i]=(o!=null?o:s).decodeText()}return t}getSelected(){let e=this.acroField.getValues(),t=new Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i].decodeText();return t}setOptions(e){T(e,"options",[Array]);let t=new Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]={value:K.fromText(e[i])};this.acroField.setOptions(t)}addOptions(e){T(e,"options",["string",Array]);let t=Array.isArray(e)?e:[e],i=this.acroField.getOptions(),r=new Array(t.length);for(let o=0,s=t.length;o<s;o++)r[o]={value:K.fromText(t[o])};this.acroField.setOptions(i.concat(r))}select(e,t=!1){T(e,"options",["string",Array]),T(t,"merge",["boolean"]);let i=Array.isArray(e)?e:[e],r=this.getOptions();i.find(a=>!r.includes(a))&&this.enableEditing(),this.markAsDirty(),(i.length>1||i.length===1&&t)&&this.enableMultiselect();let s=new Array(i.length);for(let a=0,c=i.length;a<c;a++)s[a]=K.fromText(i[a]);if(t){let a=this.acroField.getValues();this.acroField.setValues(a.concat(s))}
Line truncated
|
||||
`)}}),e}async findPDFjsOutlineTreeNode(e){let t=null;return await this.iterAsync({enter:async i=>{if(!(t||i.isRoot())&&e.item.title===i.title){let r=e.item.dest,o=i.getNormalizedDestination();if(typeof r=="string")typeof o=="string"&&r===o&&(t=i);else{let s=await e.getPageNumber();JSON.stringify(this.lib.normalizePDFJsDestArray(r,s))===JSON.stringify(o)&&(t=i)}}}}),t}static async processOutlineRoot(e,t,i){let{app:r}=i,o=await n.fromFile(t,i);e(o.ensureRoot());let s=await o.doc.save();await r.vault.modifyBinary(t,s)}static async findAndProcessOutlineItem(e,t,i,r){let{app:o}=r,s=await n.fromFile(i,r),a=await s.findPDFjsOutlineTreeNode(e);if(!a){new Sw.Notice(`${r.manifest.name}: Failed to process the outline item.`);return}t(a);let c=await s.doc.save();await o.vault.modifyBinary(i,c)}},Su=class n{constructor(e,t){this.outlines=e,this.dict=t}get doc(){return this.outlines.doc}get lib(){return this.outlines.plugin.lib}is(e){return e!==null&&this.dict===e.dict}_get(e){let t=lt(this.dict,e);return t instanceof W?new n(this.outlines,t):null}_setOrDelete(e,t){if(t){let i=this.doc.context.getObjectRef(t.dict);i||(i=this.doc.context.register(t.dict)),this.dict.set(v.of(e),i);return}this.dict.delete(v.of(e))}get firstChild(){return this._get("First")}set firstChild(e){if(e&&!this.is(e.parent))throw new Error(`Item "${e.name}" is not a child of this item "${this.name}"`);this._setOrDelete("First",e)}get lastChild(){return this._get("Last")}set lastChild(e){if(e&&!this.is(e.parent))throw new Error(`Item "${e.name}" is not a child of this item "${this.name}"`);this._setOrDelete("Last",e)}get nextSibling(){return this._get("Next")}set nextSibling(e){if(e&&!(e.parent&&e.parent.is(this.parent)))throw new Error(`Item "${e.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Next",e)}get prevSibling(){return this._get("Prev")}set prevSibling(e){if(e&&!(e.parent&&e.parent.is(this.parent)))throw new Error(`Item "${e.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Prev",e)}get parent(){return this._get("Parent")}set parent(e){if(e&&this.isRoot())throw new Error("Cannot set parent of the root of outline");this._setOrDelete("Parent",e)}get count(){let e=lt(this.dict,"Count");return e instanceof G?e.asNumber():null}set count(e){if(e===null){this.dict.delete(v.of("Count"));return}this.dict.set(v.of("Count"),G.of(e))}get title(){if(this.isRoot())throw new Error("Root of outline does not have a title");let e=lt(this.dict,"Title");if(e instanceof J||e instanceof K)return e.decodeText();throw new Error("Title is not a string")}set title(e){if(this.isRoot())throw new Error("Cannot set title of the root of outline");this.dict.set(v.of("Title"),K.fromText(e))}get name(){if(this.isRoot())return"(Root)";let e=this.title;return this.iterAncestors(t=>{t.isRoot()||(e=`${t.title}/${e}`)}),e}get depth(){let e=0;return this.iterAncestors(()=>e++),e}isLeaf(){return!this.firstChild}isRoot(){return this.parent===null}createChild(e,t){let i;if(typeof t=="string")i=K.fromText(t);else{i=Z.withContext(this.doc.context),i.push(this.doc.getPage(t[0]).ref),i.push(v.of(t[1]));for(let s of t.slice(2))i.push(typeof s=="number"?G.of(s):He)}let r=this.doc.context.getObjectRef(this.dict);if(!r)throw new Error("Could not get ref for parent");let o={Title:K.fromText(e),Dest:i,Parent:r};if(this.lastChild){Object.assign(o,{Prev:this.doc.context.getObjectRef(this.lastChild.dict)});let s=new n(this.outlines,this.doc.context.obj(o));this.lastChild.nextSibling=s,this.lastChild=s}else{let s=new n(this.outlines,this.doc.context.obj(o));this.firstChild=s,this.lastChild=s}return this.lastChild}appendChild(e){if(e.isAncestorOf(this,!0))throw new Error("Cannot append an ancestor as a child");e.remove(),e.updateCountForAllAncestors(),e.parent=this,this.lastChild?(this.lastChild.nextSibling=e,e.prevSibling=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e,e.prevSibling=null),e.nextSibling=null,e.updateCountForAllAncestors()}remove(){return this.prevSibling&&(this.prevSibling.nextSibling=this.nextSibling),this.nextSibling&&(this.nextSibling.prevSibling=this.prevSibling),this.parent&&(this.is(this.parent.firstChild)&&(this.parent.firstChild=this.nextSibling),this.is(this.parent.lastChild)&&(this.parent.lastChild=this.prevSibling)),this}removeAndLiftUpChildren(){if(this.remove(),this.firstChild){if(!this.lastChild)throw new Error("Last child is not set despite having children");this.iterChildren(e=>{e.parent=this.parent}),this.prevSibling?(this.prevSibling.nextSibling=this.firstChild,this.firstChild.prevSibling=this.prevSibling):this.parent&&(this.parent.firstChild=this.firstChild,this.firstChild.prevSibling=null),this.nextSibling?(this.nextSibling.prevSibling=this.lastChild,this.lastChild.nextSibling=this.nextSibling):this.parent&&(this.parent.lastChild=this.lastChild,this.lastChild.nextSibling=null)}}iterChildren(e){let t=this.firstChild;for(;t;)e(t),t=t.nextSibling}async iterChildrenAsync(e){let t=this.firstChild;f
Line truncated
|
||||
`),t=await this.parseBibliographyText(e);if(t){let i=Array.from(this.destIdToBibText.keys());for(let r=0;r<t.length;r++)this.destIdToParsedBib.set(i[r],t[r]),this.events.trigger("parsed",i[r],t[r])}}spawnBibPopoverOnModKeyDown(e,t,i,r){let o=()=>{let s=new Pt.HoverPopover(t,r,200);s.hoverEl.addClass("pdf-plus-bib-popover");let a=s.hoverEl.createDiv();s.addChild(new zg(this,e,a))};this.plugin.requireModKeyForLinkHover(Eu.HOVER_LINK_SOURCE_ID)?og(i,r,o):o()}getGoogleScholarSearchUrlFromDest(e){var r;let t="",i=this.destIdToParsedBib.get(e);if(i){let{author:o,title:s,year:a,"container-title":c}=i;s&&(t+=`${s[0]}`),o&&(t+=" "+o.map(l=>l.family).join(" ")),a&&(t+=` ${a}`),c&&(t+=` ${c[0]}`)}else t=(r=this.destIdToBibText.get(e))!=null?r:"";return t?`https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=${encodeURIComponent(t)}`:null}async parseBibliographyText(e){let{app:t,plugin:i,settings:r}=this,o=r.anystylePath;if(!o)return null;let s=i.getAnyStyleInputDir();if(Pt.Platform.isDesktopApp&&t.vault.adapter instanceof Pt.FileSystemAdapter&&s){let a=t.vault.adapter.getFullPath(s);await Pt.FileSystemAdapter.mkdir(a);let c=s+`/${ug()}.txt`,l=t.vault.adapter.getFullPath(c);await t.vault.adapter.write(c,e),this.register(()=>t.vault.adapter.remove(c));let{spawn:d}=require("child_process");return new Promise(h=>{let u=d(o,["parse",l]),p="";u.stdout.on("data",f=>{if(f){p+=f.toString();return}h(null)}),u.on("error",f=>{if("code"in f&&f.code==="ENOENT"){let m=`${i.manifest.name}: AnyStyle not found at the path "${o}".`;if(i.settings.anystylePath){let x=new Pt.Notice(m,8e3);x.noticeEl.appendText(" Click "),x.noticeEl.createEl("a",{text:"here"},g=>{g.addEventListener("click",()=>{i.openSettingTab().scrollTo("anystylePath")})}),x.noticeEl.appendText(" to update the path."),console.error(m)}else console.warn(m);return h(null)}}),u.on("close",f=>{var x;if(f)return h(null);let m=JSON.parse(p);if(Array.isArray(m)){for(let g of m)for(let b of(x=g.date)!=null?x:[]){let w=b.match(/\d{4}/);if(w){g.year=w[0];break}}h(m)}h(null)})})}return null}on(e,t,i){return this.events.on(e,t,i)}};Eu.HOVER_LINK_SOURCE_ID="pdf-plus-citation-link";var pn=Eu,Hg=class{constructor(e,t){this.plugin=e,this.doc=t,this.pageRefToTextContentItemsPromise={}}onExtracted(e){return this.onExtractedCallback=e,this}async extract(){let e=await this.doc.getDestinations(),t=[];for(let i in e)if(this.plugin.lib.isCitationId(i)){let r=e[i];t.push(this.extractBibTextForDest(r).then(o=>{var s;if(o){let a=o.text;(s=this.onExtractedCallback)==null||s.call(this,i,a)}}))}await Promise.all(t)}async getTextContentItemsFromPageRef(e){var i;let t=JSON.stringify(e);return(i=this.pageRefToTextContentItemsPromise[t])!=null?i:this.pageRefToTextContentItemsPromise[t]=(async()=>{let r=await this.doc.getPageIndex(e)+1;return(await(await this.doc.getPage(r)).getTextContent()).items})()}async extractBibTextForDest(e){let t=e[0],i=await this.getTextContentItemsFromPageRef(t),r=-1;if(e[1].name==="XYZ"){let d=e[2],h=e[3];if(d===null||h===null)return null;r=i.findIndex(u=>{if(!u.str)return!1;let p=u.transform[4],f=u.transform[5]+(u.height||u.transform[0])*.8;return d<=p&&f<=h})}else if(e[1].name==="FitBH"){let d=e[2];if(d===null)return null;r=i.findIndex(h=>h.str?h.transform[5]+(h.height||h.transform[0])*.8<=d:!1)}if(r===-1)return null;let o=i[r],s=o.transform[4],a=i[r].str,c=r+1,l=[o];for(;;){let d=i[c];if(!d||d.transform[4]<=s+Math.max(d.height,8)*.1)break;d.str.trimStart().startsWith(".")||d.str.trimStart().startsWith(",")?a=a.trimEnd()+d.str.trimStart():a+=`
|
||||
`+d.str,l.push(d),c++}return a=a.trimStart().replace(/^\[\d+\]/,""),a=a.trimStart().replace(/^\(\d+\)/,""),a=a.trimStart().replace(/^\d+\./,""),{text:Yc(a),items:l}}},zg=class extends ke{constructor(e,t,i){super(e.plugin),this.bib=e,this.destId=t,this.containerEl=i,this.containerEl.addClass("pdf-plus-bib")}get child(){return this.bib.child}renderParsedBib(e){let{author:t,title:i,year:r,"container-title":o}=e;return t?(this.containerEl.createDiv("",s=>{s.createDiv("bib-title",a=>{var c;a.setText((c=i==null?void 0:i[0])!=null?c:"No title")}),s.createDiv("bib-author-year",a=>{let c=t.map(l=>{let d="";return l.given&&(d+=l.given),l.family&&(d+=" "+l.family),d}).filter(l=>l).join(", ");a.appendText(c),r&&a.appendText(` (${r})`)}),o&&s.createDiv("bib-container-title",a=>{a.setText(o[0])})}),!0):!1}async onload(){await this.render()}async render(){this.containerEl.empty();let e=!1,t=this.bib.destIdToParsedBib.get(this.destId);if(t&&(e=this.renderParsedBib(t)),!e){let i=this.bib.destIdToBibText.get(this.destId);i?(this.containerEl.createDiv({text:i}),Pt.Platform.isDesktopApp&&this.settings.anystylePath&&this.registerRenderOn("parsed")):this.bib.initialized?this.containerEl.createDiv({text:"No bibliography found"}):(this.containerEl.createDiv({text:"Loading..."}),this.registerRenderOn("extracted"))}this.containerEl.createDiv("button-container",i=>{new Pt.ButtonComponent(i).setButtonText("Google Scholar").onClick(()=>{let r=this.bib.getGoogleScholarSearchUrlFromDest(this.destId);if(!r){new Pt.Notice(`${this.plugin.manifest.name}: ${this.bib.initialized?"No bibliography found":"Still loading the bibliography information. Please try again later."}`);return}window.open(r)}),new Pt.ExtraButtonComponent(i).setIcon("lucide-settings").setTooltip("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("citation")})})}registerRenderOn(e){let t=this.bib.on(e,i=>{i===this.destId&&(this.render(),this.bib.events.offref(t))});this.registerEvent(t)}onunload(){this.containerEl.empty()}};var Tu=class{get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e,e&&(e.hoverEl.addClass("pdf-plus-pdf-link-like-popover"),this.onHoverPopoverSet(e))}onHoverPopoverSet(e){}constructor(e,t,i){this.plugin=e,this.app=e.app,this.lib=e.lib,this.child=t,this.targetEl=i,this.useModifierKey()&&this.registerClickToOpenInNewLeaf(),this.shouldShowHoverPopover()&&this.registerHover(),this.shouldRecordHistory()&&this.registerClickToRecordHistory()}get hoverLinkSourceId(){return this.constructor.HOVER_LINK_SOURCE_ID}get file(){return this.child.file}get sourcePath(){var e,t;return(t=(e=this.file)==null?void 0:e.path)!=null?t:""}registerClickToOpenInNewLeaf(){let{app:e,plugin:t,targetEl:i}=this;t.registerDomEvent(i,"click",async r=>{if(r.defaultPrevented)return;let o=Iw.Keymap.isModEvent(r);if(!o)return;r.preventDefault(),r.stopPropagation();let s=await this.getLinkText(r);s!==null&&e.workspace.openLinkText(s,this.sourcePath,o)},{capture:!0})}async customHover(e){return!1}registerHover(){let{app:e,plugin:t,targetEl:i}=this;t.registerDomEvent(i,"mouseover",async r=>{if(await this.customHover(r))return;let o=null;try{o=await this.getLinkText(r)}catch(s){if(s.name==="UnknownErrorException")return console.warn(`${this.plugin.manifest.name}: The destination was not found in this document.`);throw s}o!==null&&e.workspace.trigger("hover-link",{event:r,source:this.hoverLinkSourceId,hoverParent:this,targetEl:i,linktext:o,sourcePath:this.sourcePath})})}registerClickToRecordHistory(){let{plugin:e,targetEl:t}=this;e.registerDomEvent(t,"click",i=>{this.recordLeafHistory()},{capture:!0})}recordLeafHistory(){this.lib.workspace.iteratePDFViews(e=>{if(e.containerEl.contains(this.targetEl)){let t=e.leaf;t.recordHistory(t.getHistoryState())}})}},Au=class extends Tu{async getLinkText(e){var c,l,d;let{lib:t,child:i,targetEl:r}=this;if(!Ci(e,r))return null;let o=(c=i.pdfViewer.pdfViewer)==null?void 0:c.pdfDocument;if(!o)return null;let s=this.getDest(),a=null;return typeof s=="string"?a=await t.destIdToSubpath(s,o):a=await t.pdfJsDestArrayToSubpath(s,o),a===null?null:((d=(l=this.file)==null?void 0:l.path)!=null?d:"")+a}onHoverPopoverSet(e){let t=e.hoverEl,i=this.getDest();typeof i=="string"&&(t.dataset.dest=i)}},nd=class nd extends Au{constructor(e,t,i){super(e,t,i.container),this.linkAnnotationElement=i}static registerEvents(e,t,i){return i.data.subtype==="Link"?new nd(e,t,i):null}async getLinkText(e){var t,i;if(this.plugin.settings.actionOnCitationHover==="google-scholar-popover"&&this.lib.requirePluginNewerThan("surfing","0.9.5")){let r=this.getDest();if(this.lib.isCitationId(r)&&((t=this.child.pdfViewer.pdfViewer)==null?void 0:t.pdfDocument)){let s=(i=this.child.bib)==null?void 0:i.getGoogleScholarSearchUrlFromDest(r);if(s)return s}}return super.getLinkText(e)}getDest(){return this.linkAnnotationElement.data.dest}useModifierKey(){return this.plugin.settings.clickPDFInternalLinkWithModifierKey}shouldShowHoverPopover(){retu
Line truncated
|
||||
> {{text}}
|
||||
`},{name:"Link",template:"{{linkWithDisplay}}"},{name:"Embed",template:"!{{link}}"},{name:"Callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}
|
||||
> {{text}}
|
||||
`},{name:"Quote in callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}
|
||||
> > {{text}}
|
||||
>
|
||||
> `}],useAnotherCopyTemplateWhenNoSelection:!1,copyTemplateWhenNoSelection:"{{linkToPageWithDisplay}}",trimSelectionEmbed:!1,embedMargin:50,noSidebarInEmbed:!0,noSpreadModeInEmbed:!0,embedUnscrollable:!1,singleTabForSinglePDF:!0,highlightExistingTab:!1,existingTabHighlightOpacity:.5,existingTabHighlightDuration:.75,paneTypeForFirstPDFLeaf:"left",openLinkNextToExistingPDFTab:!0,openPDFWithDefaultApp:!1,openPDFWithDefaultAppAndObsidian:!0,focusObsidianAfterOpenPDFWithDefaultApp:!0,syncWithDefaultApp:!1,dontActivateAfterOpenPDF:!0,dontActivateAfterOpenMD:!0,highlightDuration:.75,noTextHighlightsInEmbed:!1,noAnnotationHighlightsInEmbed:!0,persistentTextHighlightsInEmbed:!0,persistentAnnotationHighlightsInEmbed:!1,highlightBacklinks:!0,selectionBacklinkVisualizeStyle:"highlight",dblclickEmbedToOpenLink:!0,highlightBacklinksPane:!0,highlightOnHoverBacklinkPane:!0,backlinkHoverColor:"",colors:{Yellow:"#ffd000",Red:"#ea5252",Note:"#086ddd",Important:"#bb61e5"},defaultColor:"",defaultColorPaletteItemIndex:0,syncColorPaletteItem:!0,syncDefaultColorPaletteItem:!1,colorPaletteInToolbar:!0,noColorButtonInColorPalette:!0,colorPaletteInEmbedToolbar:!1,quietColorPaletteTooltip:!1,showStatusInToolbar:!0,highlightColorSpecifiedOnly:!1,doubleClickHighlightToOpenBacklink:!0,hoverHighlightAction:"preview",paneTypeForFirstMDLeaf:"right",singleMDLeafInSidebar:!0,alwaysUseSidebar:!0,ignoreExistingMarkdownTabIn:[],defaultColorPaletteActionIndex:4,syncColorPaletteAction:!0,syncDefaultColorPaletteAction:!1,proxyMDProperty:"PDF",hoverPDFLinkToOpen:!1,ignoreHeightParamInPopoverPreview:!0,filterBacklinksByPageDefault:!0,showBacklinkToPage:!0,enableHoverPDFInternalLink:!0,recordPDFInternalLinkHistory:!0,alwaysRecordHistory:!0,renderMarkdownInStickyNote:!1,enablePDFEdit:!1,author:"",writeHighlightToFileOpacity:.2,defaultWriteFileToggle:!1,syncWriteFileToggle:!0,syncDefaultWriteFileToggle:!1,enableAnnotationDeletion:!0,warnEveryAnnotationDelete:!1,warnBacklinkedAnnotationDelete:!0,enableAnnotationContentEdit:!0,enableEditEncryptedPDF:!1,pdfLinkColor:"#04a802",pdfLinkBorder:!1,replaceContextMenu:!0,showContextMenuOnMouseUpIf:"Mod",contextMenuConfig:[{id:"action",visible:!0},{id:"selection",visible:!0},{id:"write-file",visible:!0},{id:"annotation",visible:!0},{id:"modify-annotation",visible:!0},{id:"link",visible:!0},{id:"text",visible:!0},{id:"search",visible:!0},{id:"speech",visible:!0},{id:"page",visible:!0},{id:"settings",visible:!0}],selectionProductMenuConfig:["color","copy-format","display"],writeFileProductMenuConfig:["color","copy-format","display"],annotationProductMenuConfig:["copy-format","display"],updateColorPaletteStateFromContextMenu:!0,mobileCopyAction:"pdf-plus",showContextMenuOnTablet:!1,executeBuiltinCommandForOutline:!0,executeBuiltinCommandForZoom:!0,executeFontSizeAdjusterCommand:!0,closeSidebarWithShowCommandIfExist:!0,autoHidePDFSidebar:!1,defaultSidebarView:1,outlineDrag:!0,outlineContextMenu:!0,outlineLinkDisplayTextFormat:"{{file.basename}}, {{text}}",outlineLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnOutlineClick:!0,popoverPreviewOnOutlineHover:!0,thumbnailDrag:!0,thumbnailContextMenu:!0,thumbnailLinkDisplayTextFormat:"{{file.basename}}, p.{{pageLabel}}",thumbnailLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnThumbnailClick:!0,popoverPreviewOnThumbnailHover:!0,annotationPopupDrag:!0,showAnnotationPopupOnHover:!0,useCallout:!0,calloutType:"PDF",calloutIcon:"highlighter",highlightBacklinksInEmbed:!1,highlightBacklinksInHoverPopover:!1,highlightBacklinksInCanvas:!0,clickPDFInternalLinkWithModifierKey:!0,clickOutlineItemWithModifierKey:!0,clickThumbnailWithModifierKey:!0,focusEditorAfterAutoPaste:!0,clearSelectionAfterAutoPaste:!0,respectCursorPositionWhenAutoPaste:!0,blankLineAboveAppendedContent:!0,autoCopy:!1,autoFocus:!1,autoPaste:!1,autoFocusTarget:"last-active-and-open-then-last-paste",autoPasteTarget:"last-active-and-open-then-last-paste",openAutoFocusTargetIfNotOpened:!0,howToOpenAutoFocusTargetIfNotOpened:"right",closeHoverEditorWhenLostFocus:!0,closeSidebarWhenLostFocus:!1,openAutoFocusTargetInEditingView:!0,executeCommandWhenTargetNotIdentified:!0,commandToExecuteWhenTargetNotIdentified:"switcher:open",autoPasteTargetDialogTimeoutSec:20,autoCopyToggleRibbonIcon:!0,autoCopyIconName:"highlighter",autoFocusToggleRibbonIcon:!0,autoFocusIconName:"zap",autoPasteToggleRibbonIcon:!0,autoPasteIconName:"clipboard-paste",viewSyncFollowPageNumber:!0,viewSyncPageDebounceInterval:.3,openAfterExtractPages:!0,howToOpenExtractedPDF:"tab",warnEveryPageDelete:!1,warnBacklinkedPageDelete:!0,extractPageInPlace:!1,askExtractPageInPlace:!0,pageLabelUpdateWhenInsertPage:"keep",pageLabelUpdateWhenDeletePage:"keep",pageLabelUpdateWhenExtractPage:"keep",askPageLabelUpdateWhenInsertPage:!0,askPageLabelUpdateWhenDeletePage:!0,askPageLabelUpdateWhenExtractPage:!0,copyOutlineAsListFormat:"{{linkWithDisplay}}",copyOutlineAsListDisplayTextFormat:"{{text}}",copyOutlineAsHeadingsFormat:`{{text}}
|
||||
|
||||
{{linkWithDisplay}}`,copyOutlineAsHeadingsDisplayTextFormat:"p.{{pageLabel}}",copyOutlineAsHeadingsMinLevel:2,newFileNameFormat:"",newFileTemplatePath:"",newPDFLocation:"current",newPDFFolderPath:"",rectEmbedStaticImage:!1,rectImageFormat:"file",rectImageExtension:"webp",zoomToFitRect:!1,rectFollowAdaptToTheme:!0,rectEmbedResolution:100,includeColorWhenCopyingRectLink:!0,backlinkIconSize:50,showBacklinkIconForSelection:!1,showBacklinkIconForAnnotation:!1,showBacklinkIconForOffset:!0,showBacklinkIconForRect:!1,showBoundingRectForBacklinkedAnnot:!1,hideReplyAnnotation:!1,hideStampAnnotation:!1,searchLinkHighlightAll:"true",searchLinkCaseSensitive:"true",searchLinkMatchDiacritics:"default",searchLinkEntireWord:"false",dontFitWidthWhenOpenPDFLink:!0,preserveCurrentLeftOffsetWhenOpenPDFLink:!1,defaultZoomValue:"page-width",scrollModeOnLoad:0,spreadModeOnLoad:0,usePageUpAndPageDown:!0,hoverableDropdownMenuInToolbar:!0,zoomLevelInputBoxInToolbar:!0,popoverPreviewOnExternalLinkHover:!0,actionOnCitationHover:"pdf-plus-bib-popover",anystylePath:"",enableBibInEmbed:!1,enableBibInHoverPopover:!1,enableBibInCanvas:!0,citationIdPatterns:`^cite.
|
||||
^bib\\d+$`,copyAsSingleLine:!0,removeWhitespaceBetweenCJChars:!0,dummyFileFolderPath:"",externalURIPatterns:[".*\\.pdf$","https://arxiv.org/pdf/.*"],modifierToDropExternalPDFToCreateDummy:["Shift"],vim:!1,vimrcPath:"",vimVisualMotion:!0,vimScrollSize:40,vimLargerScrollSizeWhenZoomIn:!0,vimContinuousScrollSpeed:1.2,vimSmoothScroll:!0,vimHlsearch:!0,vimIncsearch:!0,enableVimInContextMenu:!0,enableVimOutlineMode:!0,vimSmoothOutlineMode:!0,vimHintChars:"hjklasdfgyuiopqwertnmzxcvb",vimHintArgs:"all",PATH:"",autoCheckForUpdates:!0,fixObsidianTextSelectionBug:!0};function uC(n){return Jn.hasOwnProperty(n)}var _n=Bt("Mod").toLowerCase(),Lu=class extends ge.PluginSettingTab{constructor(t){super(t.app,t);this.plugin=t;this.events=new ge.Events;this.component=new ge.Component,this.items={},this.headings=new Map,this.iconHeadings=new Map,this.headerEls=new Map,this.promises=[],this.containerEl.addClass("pdf-plus-settings"),this.headerContainerEl=this.containerEl.createDiv("header-container"),this.contentEl=this.containerEl.createDiv("content")}addSetting(t){let i=new ge.Setting(this.contentEl);return t&&(this.items[t]=i,this.component.registerDomEvent(i.settingEl,"contextmenu",r=>{r.preventDefault(),new qg.Menu().addItem(o=>{o.setTitle("Restore default value of this setting").setIcon("lucide-undo-2").onClick(async()=>{this.plugin.settings[t]=this.plugin.getDefaultSettings()[t],await this.plugin.saveSettings(),this.redisplay(),new ge.Notice(`${this.plugin.manifest.name}: Default setting restored. Note that some options require a restart to take effect.`,6e3)})}).addItem(o=>{o.setTitle("Copy link to this setting").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=${t}`)})}).showAtMouseEvent(r)})),i}addHeading(t,i,r,o){let s=this.addSetting().setName(t).setHeading().then(a=>{if(r){let c=a.settingEl.parentElement;c&&c.insertBefore(createDiv("spacer"),a.settingEl);let l=createDiv();a.settingEl.prepend(l),(0,ge.setIcon)(l,r),a.settingEl.addClass("pdf-plus-setting-heading")}});return this.headings.set(i,s),this.component.registerDomEvent(s.settingEl,"contextmenu",a=>{a.preventDefault(),new qg.Menu().addItem(c=>{c.setTitle("Copy link to this heading").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=heading:${i}`)})}).showAtMouseEvent(a)}),r&&this.headerContainerEl.createDiv("clickable-icon header",a=>{let c=a.createDiv();(0,ge.setIcon)(c,r);let l=a.createDiv("header-title");l.setText(t),(0,ge.setTooltip)(a,t),this.component.registerDomEvent(a,"click",d=>{var h;((h=s.settingEl.previousElementSibling)!=null?h:s.settingEl).scrollIntoView({behavior:"smooth"}),this.updateHeaderElClassOnScroll(d)}),o==null||o({headerEl:a,iconEl:c,titleEl:l}),this.iconHeadings.set(i,s),this.headerEls.set(i,a)}),s}updateHeaderElClass(){var r,o,s;let t=this.containerEl.getBoundingClientRect().height,i=Array.from(this.iconHeadings.entries());for(let a=0;a<i.length;a++){let c=i[a][1].settingEl.getBoundingClientRect().top,l=(o=(r=i[a+1])==null?void 0:r[1].settingEl.getBoundingClientRect().top)!=null?o:this.contentEl.getBoundingClientRect().bottom,d=c<=t*.85&&l>=t*.2+this.headerContainerEl.clientHeight,h=i[a][0];(s=this.headerEls.get(h))==null||s.toggleClass("is-active",d)}}updateHeaderElClassOnScroll(t){var o;let i=(o=t==null?void 0:t.win)!=null?o:activeWindow,r=i.setInterval(()=>this.updateHeaderElClass(),50);i.setTimeout(()=>i.clearInterval(r),1500)}scrollTo(t,i){let r=this.items[t];r&&this.scrollToSetting(r,i)}scrollToHeading(t,i){let r=this.headings.get(t);r&&this.scrollToSetting(r,i)}scrollToSetting(t,i){let r=t.settingEl;r&&this.containerEl.scrollTo({top:r.offsetTop-this.headerContainerEl.offsetHeight,...i})}openFromObsidianUrl(t){let i=t.setting;i.startsWith("heading:")?this.plugin.openSettingTab().scrollToHeading(i.slice(8)):uC(i)&&this.plugin.openSettingTab().scrollTo(i)}getVisibilityToggler(t,i){let r=()=>{i()?t.settingEl.show():t.settingEl.hide()};return r(),r}showConditionally(t,i){let r=Array.isArray(t)?t:[t],o=r.map(s=>this.getVisibilityToggler(s,i));return this.events.on("update",()=>o.forEach(s=>s())),r}addTextSetting(t,i,r){let o=this.addSetting(t).addText(s=>{s.setValue(this.plugin.settings[t]).setPlaceholder(i!=null?i:"").then(a=>{i&&(a.inputEl.size=Math.max(a.inputEl.size,a.inputEl.placeholder.length))}).onChange(async a=>{this.plugin.settings[t]=a,await this.plugin.saveSettings()}),r&&(this.component.registerDomEvent(s.inputEl,"blur",()=>{r(o)}),this.component.registerDomEvent(s.inputEl,"keypress",a=>{a.key==="Enter"&&r(o)}))});return o}addTextAreaSetting(t,i,r){return this.addSetting(t).addTextArea(o=>{o.setValue(this.plugin.settings[t]).setPlaceholder(i!=null?i:"").onChange(async s=>{this.plugin.settings[t]=s,await this.plugin.saveSettings()}),r&&this.component.registerDomEvent(o.inputEl,"blur",r)})}addNumberSetting(t){return this.addSetting(t).addText(i=>{i.setValue(""+this.plugin.settings[t]).setPlaceholder(""+Jn[t]).then(r=>r.inputEl.type
Line truncated
|
||||
|
||||
If you prefer PayPal, please make donations via Ko-fi. Thank you!`).then(i=>{let r=i.infoEl,o=i.settingEl.firstElementChild;if(!o)return;let s=i.settingEl.createDiv();s.appendChild(o),s.appendChild(r),i.settingEl.prepend(s),i.settingEl.id="pdf-plus-funding",s.id="pdf-plus-funding-icon-info-container",o.id="pdf-plus-funding-icon",t(o)}).addButton(i=>{i.setButtonText("GitHub Sponsors").onClick(()=>{open("https://github.com/sponsors/RyotaUshio")})}).addButton(i=>{i.setButtonText("Buy Me a Coffee").onClick(()=>{open("https://www.buymeacoffee.com/ryotaushio")})}).addButton(i=>{i.setButtonText("Ko-fi").onClick(()=>{open("https://ko-fi.com/ryotaushio")})})}async renderMarkdown(t,i){this.promises.push(this._renderMarkdown(t,i)),i.addClass("markdown-rendered")}async _renderMarkdown(t,i){await ge.MarkdownRenderer.render(this.app,Array.isArray(t)?t.join(`
|
||||
`):t,i,"",this.component),i.childNodes.length===1&&i.firstChild instanceof HTMLParagraphElement&&i.replaceChildren(...i.firstChild.childNodes)}addColorSetting(t){let i=this.plugin.settings.colors,[r,o]=Object.entries(i)[t],s=o;return this.addSetting().addText(a=>{a.setPlaceholder("Color name (case-insensitive)").then(c=>{c.inputEl.size=c.inputEl.placeholder.length,(0,ge.setTooltip)(c.inputEl,"Color name (case-insensitive)")}).setValue(r).onChange(async c=>{if(c in i){new ge.Notice("This color name is already used."),a.inputEl.addClass("error");return}a.inputEl.removeClass("error"),delete i[r];for(let l of["defaultColor","backlinkHoverColor"]){let d=this.items[l];if(d){let h=d.components[0].selectEl.querySelector(`:scope > option:nth-child(${t+2})`);h&&(h.value=c,h.textContent=c)}}this.plugin.settings.defaultColor===r&&(this.plugin.settings.defaultColor=c),r=c,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addColorPicker(a=>{a.setValue(o),a.onChange(async c=>{s=o,o=c,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addExtraButton(a=>{a.setIcon("rotate-ccw").setTooltip("Return to previous color").onClick(async()=>{o=s,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})}).addExtraButton(a=>{a.setIcon("trash").setTooltip("Delete").onClick(async()=>{this.plugin.settings.defaultColor===r&&(this.plugin.settings.defaultColor=""),delete i[r],await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})})}addNameValuePairListSetting(t,i,r,o,s){let{getName:a,setName:c,getValue:l,setValue:d}=o,h=t[i],u=a(h),p=l(h);return this.addSetting().addText(f=>{f.setPlaceholder(s.name.placeholder).then(m=>{m.inputEl.size=s.name.formSize,(0,ge.setTooltip)(m.inputEl,s.name.placeholder)}).setValue(u).onChange(async m=>{if(t.some(g=>a(g)===m)){new ge.Notice(s.name.duplicateMessage),f.inputEl.addClass("error");return}f.inputEl.removeClass("error"),c(h,m);let x=this.items[r];if(x){let g=x.components[0].selectEl.querySelector(`:scope > option:nth-child(${i+1})`);g&&(g.value=m,g.textContent=m)}await this.plugin.saveSettings()})}).then(f=>{s.value.hasOwnProperty("formRows")?f.addTextArea(m=>{m.setPlaceholder(s.value.placeholder).then(x=>{x.inputEl.rows=s.value.formRows,x.inputEl.cols=s.value.formSize,(0,ge.setTooltip)(x.inputEl,s.value.placeholder)}).setValue(p).onChange(async x=>{d(h,x),await this.plugin.saveSettings()})}):f.addText(m=>{m.setPlaceholder(s.value.placeholder).then(x=>{x.inputEl.size=s.value.formSize,(0,ge.setTooltip)(x.inputEl,s.value.placeholder)}).setValue(p).onChange(async x=>{d(h,x),await this.plugin.saveSettings()})})}).addExtraButton(f=>{f.setIcon("trash").setTooltip("Delete").onClick(async()=>{if(t.length===1){new ge.Notice(s.delete.deleteLastMessage);return}t.splice(i,1),this.plugin.settings[r]>i?this.plugin.settings[r]--:this.plugin.settings[r]===i&&(this.plugin.settings[r]=0),await this.plugin.saveSettings(),this.redisplay()})}).setClass("no-border")}addNamedTemplatesSetting(t,i,r,o){return this.addNameValuePairListSetting(t,i,r,{getName:s=>s.name,setName:(s,a)=>{s.name=a},getValue:s=>s.template,setValue:(s,a)=>{s.template=a}},o)}addDisplayTextSetting(t){return this.addNamedTemplatesSetting(this.plugin.settings.displayTextFormats,t,"defaultDisplayTextFormatIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Display text format",formSize:50},delete:{deleteLastMessage:"You cannot delete the last display text format."}})}addCopyCommandSetting(t){return this.addNamedTemplatesSetting(this.plugin.settings.copyCommands,t,"defaultColorPaletteActionIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Copied text format",formSize:50,formRows:3},delete:{deleteLastMessage:"You cannot delete the last copy format."}})}addHotkeySettingButton(t,i){t.addButton(r=>{r.setButtonText("Open hotkeys settings").onClick(()=>{this.plugin.openHotkeySettingTab(i)})})}addPagePreviewSettingButton(t){return t.addButton(i=>{i.setButtonText("Open page preview settings").onClick(()=>{this.app.setting.openTabById("page-preview")})})}addRequireModKeyOnHoverSetting(t){let i=this.app.workspace.hoverLinkSources[t].display,r=this.plugin.requireModKeyForLinkHover(t);return this.addSetting().setName(`Require ${_n} key while hovering`).setDesc(`Currently ${r?"required":"not required"}. You can toggle this on and off in the core Page Preview plugin settings > ${i}.`).then(o=>this.addPagePreviewSettingButton(o))}addIconSetting(t,i){let r=a=>a.startsWith("lucide-")?a.slice(7):a,o=a=>a.startsWith("lucide-")?a:"lucide-"+a,s=a=>{var d;let c=(d=a.controlEl.querySelector(":scope>.icon-preview"))!=null?d:a.controlEl.createDiv("icon-preview");(0,ge.setIcon)(c,o(this.plugin.settings[t]));let l=a.components[0];(!i||this.plugin.settings[t])&&!c.childElementCount?(l.inputEl.addClass("error"),(0,ge.setTooltip)(l.inputEl,"No icon found")):(l.
Line truncated
|
||||
`)),this.component.registerDomEvent(d.inputEl,"focusout",async()=>{let h=d.inputEl.value;this.plugin.settings.externalURIPatterns=h.split(`
|
||||
`).map(u=>u.trim()).filter(u=>u),await this.plugin.saveSettings()})}),this.addHeading("Vim keybindings","vim","vim").then(d=>this.renderMarkdown("Tracked at [this GitHub issue](https://github.com/RyotaUshio/obsidian-pdf-plus/issues/119).",d.descEl)),this.addSetting().then(d=>{this.renderMarkdown(['The default keybindings are as follows. You can customize them be creating a "vimrc" file and providing its path in the setting below.',"","- `j`/`k`/`h`/`l`: Scroll down/up/left/right","- `J`: Go to next page","- `K`: Go to previous page","- `gg`: Go to first page","- `G`: Go to last page","- `0`/`^`/`H`: Go to top of current page","- `$`/`L`: Go to bottom of current page","- `<C-f>`/`<C-b>`: Scroll down/up as much as the viewer height (`C`=`Ctrl`)","- `<C-d>`/`<C-u>`: Scroll down/up half as much as the viewer height","- `/`/`?`: Search forward/backward","- `n`/`N`: Go to next/previous match","- `gn`/`gN`: Select search result","- `+`/`zi`: Zoom in","- `-`/`zo`: Zoom out","- `=`/`z0`: Reset zoom","- `r`: Rotate pages clockwise","- `R`: Rotate pages counterclockwise","- `y`: Yank (copy) selected text",`- \`c\`: Run the "${this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)}" command`,"- `C`: Show context menu at text selection","- `o`: Swap the start and end of the selection","- `:`: Enter command-line mode (experimental)","- `<Tab>`: Toggle outline (table of contents)","- `<S-Tab>`: Toggle thumbnails (`S`=`Shift`)","- `f`: Enter hint mode by running `:hint` (experimental)","- `<Esc>`: Go back to normal mode, abort search, etc","","Many of the commands above can be combined with counts. For example:","- `2j` scrolls down the page twice as much as `j`.","- `2J` advances two pages.","- `10G` takes you to page 10.","- `150=` sets the zoom level to 150%."],d.descEl)}),this.addToggleSetting("vim",()=>this.events.trigger("update")).setName("Enable").setDesc("Reopen the PDF viewers after changing this option."),this.showConditionally([this.addTextSetting("vimrcPath",void 0,()=>this.plugin.vimrc=null).setName("Vimrc file path (optional)").then(async d=>{await this.renderMarkdown(["Only the [Ex commands supported by PDF++](https://github.com/RyotaUshio/obsidian-pdf-plus/blob/main/src/vim/ex-commands.ts) are allowed.","","Example (not necessarily recommendations):","```",'" Use j/k, instead of J/K, to go to the next page',"map j J","map k K","",'" JavaScript commands','" - Hit Ctrl-h in Normal mode to show a message','nmap <C-h> :js alert("Hello, world!")','" - Hit Ctrl-h in Visual mode to run a .js file',"vmap <C-h> :jsfile filename.js","",'" Obsidian commands','" - Open the current PDF in the OS-default app by hitting d, e, and then f',"map def :obcommand open-with-default-app:open",'" - Go back and forth the history with Ctrl-o and Ctrl-i',"map <C-o> :obcommand app:go-back","map <C-i> :obcommand app:go-forward","```","","After changing the path or the file content, you need to reopen the PDF viewer. If the vimrc file is a hidden file or is under a hidden folder, you need to reload PDF++ or the app."],d.descEl);let h=d.components[0].inputEl;new Hc(this.app,h).onSelect(({item:u})=>{this.plugin.settings.vimrcPath=u.path,this.plugin.saveSettings()})}),this.addHeading("Visual mode","vim-visual"),this.addToggleSetting("vimVisualMotion").setName("Use motion keys to adjust text selection").then(d=>{this.renderMarkdown(["When some text is selected, you can modify the range of selection using the `j,` `k`, `h`, `l`, `w`, `e`, `b`, `0`, `^`, `$`, `H`, and `L` keys, similarly to Vim's visual mode (`H`/`L` are mapped to `^`/`$` by default). If disabled, you can use `j`/`k`/`h`/`l`/`0`/`^`/`$`/`H`/`L` keys to scroll the page regardless of text selection. Reload the viewer or the app after changing this option.","","Tips:","- You can use `o` to swap the start and end of the selection.","- As you know, `/` and `?` keys initiate search. Pressing `gn`/`gN` after the search will select the search result. You can also use search to extend the current selection to the search result.","","Note: On mobile, word-wise motions (`w`/`e`/`b`) might not work as expected around punctuations. Contributions to fix this are welcome!"],d.descEl)}),this.addHeading("Outline mode","vim-outline"),this.addToggleSetting("enableVimOutlineMode").setName("Enter outline mode when opening PDF outline view").then(d=>{this.renderMarkdown(["If enabled, you will enter the outline mode by opening the PDF outline view (from the icon in the toolbar or by `<Tab>`), and you can use the following keybindings, similarly to [Zathura](https://pwmt.org/projects/zathura/)'s index mode.","","- `j`: Move down","- `k`: Move up","- `h`: Collapse & move to parent entry","- `l`: Expand entry & move to child entry","- `H`: Collapse all entries","- `L`: Expand all entries","- `<CR>/<Space>`: Open the selected entry (`<CR>`=`Enter`)","- `<Esc>`: Close sidebar and go back to normal mode","","If disabled, you can use j/k/h/l/HLine truncated
|
||||
:hint [<target1> <target2> ...] - Enter hint mode and show hint marks for the specified targets in the current page. Inspired by [Tridactyl](https://github.com/tridactyl/tridactyl)'s hint mode.
|
||||
|
||||
If no target is specified, the default targets (configured in PDF++ settings) will be used.
|
||||
The accepted targets are:
|
||||
|
||||
- \`all\`: all of the followings
|
||||
- \`link\`: internal & external links
|
||||
- \`annot\`: (non-link) annotations written in the file
|
||||
- \`backlink\`: backlink highlighting, i.e., highlights that is not written in the file itself
|
||||
`,func:(...e)=>{e.length===0&&(e=n.settings.vimHintArgs.trim().split(/\s+/)),e.includes("all")&&(e=["link","annot","backlink"]),n.hintMode.setTarget(...e.map(t=>{switch(t){case"link":return 0;case"annot":return 1;case"backlink":return 2;default:throw Error(`Unknown hint target: ${t}`)}})),setTimeout(()=>n.enterHintMode())}}],yC=(n,e=12,t=!0)=>(n=n.replace(new RegExp(`^ {${e}}`,"gm"),"").replace(/^\s*/,""),t?n.replace(/([<>])/g,"\\$1"):n),Yr=(n,e,t=!1)=>`:${n} <from> <to> - Map <from> to <to> ${t?"non-recusively ":""}in ${e.length>1?e.slice(0,-1).join(", ")+" and "+e.at(-1)+" modes":e[0]+" mode"}. If <to> is an ex-command, it must be start with ":".`;var Zu=class extends gn{constructor(t){super(t);this.history=[];this.historyIndex=0;this.isActive=!1;this.dom=this.vim.viewer.containerEl.createDiv("pdf-plus-vim-command",i=>{this.register(()=>i.remove()),i.appendText(":"),this.inputEl=i.createEl("input",{cls:"pdf-plus-vim-command-input"},r=>{r.placeholder="type a command or page number...",r.addEventListener("focusout",()=>{setTimeout(()=>{this.isActive&&this.vim.enterNormalMode()})}),r.addEventListener("keydown",o=>{if(!o.isComposing&&o.key==="Enter"){this.submitCommand();return}if(o.key==="Escape"||o.key==="Backspace"&&!r.value){this.vim.enterNormalMode(),o.preventDefault();return}if(o.key==="ArrowUp"||o.key==="ArrowDown"){o.preventDefault(),this.navigateHistory(o.key==="ArrowDown");return}})}),i.hide()}),this.vimScope.registerKeymaps(["command"],{"<C-u>":()=>this.inputEl.value="","<C-w>":()=>this.inputEl.value=this.inputEl.value.replace(/\S+\s*$/,"")}),this.excmds=Qw(this.vim),this.suggest=new Qg(this).onSelect(({item:{minNargs:i}})=>setTimeout(()=>{if(!i){this.submitCommand();return}this.inputEl.value+=" "})),this.settings.vimrcPath&&this.viewer.then(i=>{let r=i.pdfViewer.eventBus;r&&r.on("pagesloaded",()=>setTimeout(()=>{if(this.plugin.vimrc===null){let o=(0,rs.normalizePath)(this.settings.vimrcPath);this.app.vault.adapter.read(o).then(s=>this.runScript(this.plugin.vimrc=s))}else this.runScript(this.plugin.vimrc)},{once:!0}))})}async executeCommand(t,i={error:["notice","console.error"],history:!0}){if(i={error:[],history:!0,...i},i.history&&(this.history.push(t),this.history.length>100&&this.history.shift(),this.historyIndex=this.history.length),t.startsWith("!")){if(!rs.Platform.isDesktopApp){this.reportError(`${this.plugin.manifest.name} (Vim mode): Shell command is not supported on mobile`,i.error);return}let{exec:a}=require("child_process"),c=process.env;return this.settings.PATH&&(c.PATH=this.settings.PATH),new Promise((l,d)=>a(t.slice(1),{env:c},(h,u,p)=>{h&&d(h),u&&(alert(u),l(u)),p&&console.warn(p)}))}if(/^[1-9]\d*$/.test(t)){let a=+t;this.pdfViewer&&(this.pdfViewer.currentPageNumber=a);return}let[r,...o]=t.split(/\s+/),s=this.findCommand(r);if(s){if(s.minNargs&&o.length<s.minNargs){this.reportError(`${this.plugin.manifest.name} (Vim mode): Expected ${s.minNargs} or more arguments for command "${s.id}" but got ${o.length}`,i.error);return}return s.func(...o)}this.reportError(`${this.plugin.manifest.name} (Vim mode): Unknown command "${t}"`,i.error)}findCommand(t){return this.excmds.find(i=>i.pattern&&i.pattern.test(t)||i.id===t)}submitCommand(){let t=this.inputEl.value.trim();if(t){this.history[this.historyIndex]===t&&this.history.splice(this.historyIndex,1);try{this.executeCommand(t)}catch(r){new rs.Notice(`${this.plugin.manifest.name} (Vim mode): Error occurred while executing the command : ${r}`),console.error(r)}}this.vim.enterNormalMode()}runScript(t){this.parseScript(t).forEach(r=>this.executeCommand(r,{error:["console.warn"],history:!1}))}parseScript(t){return t.split(/\r?\n/).filter(i=>i.trim()&&!i.trimStart().startsWith('"')).join(`
|
||||
`).replace(/\\\n/g,"").split(`
|
||||
`)}enter(){this.inputEl.value="",this.dom.show(),this.inputEl.focus(),this.isActive=!0}exit(){this.isActive=!1,this.inputEl.value="",this.dom.hide()}navigateHistory(t){let i=this.inputEl;if(this.historyIndex<this.history.length||!i.value){let r=this.historyIndex+(t?1:-1);if(r<0)return;r<=this.history.length&&(this.historyIndex=r);let o=this.history[r]||"";i.value=o,i.setSelectionRange(o.length,o.length)}}reportError(t,i){for(let r of i)r==="notice"?new rs.Notice(t):r==="console.error"?console.error(t):r==="console.warn"&&console.warn(t)}},Qg=class extends Nr{constructor(e){super(e.app,e.inputEl,{blurOnSelect:!1}),this.commandLineMode=e;let t=this.scope.keys.find(o=>o.key==="Escape"&&o.modifiers==="");t&&this.scope.unregister(t);let i=this.scope.keys.find(o=>o.key==="ArrowDown"&&o.modifiers===""),r=this.scope.keys.find(o=>o.key==="ArrowUp"&&o.modifiers==="");i&&(this.scope.unregister(i),this.scope.register([],"Tab",i.func)),r&&(this.scope.unregister(r),this.scope.register(["Shift"],"Tab",r.func))}getItems(){return this.commandLineMode.excmds}getItemText(e){return e.id}};var Yu=class extends ke{constructor(t,i,r){super(t);this.pages=new Map;this.pdfViewer=i,this.file=r}onload(){this.registerEvent(this.app.vault.on("modify",t=>{t===this.file&&this.pages.clear()}))}getPageParser(t){let i=this.pages.get(t);if(!i){let r=this.pdfViewer.getPageView(t-1);if(r){let o=r.textLayer,s=o&&Dt(o);if(s){let{textContentItems:a,textDivs:c}=s;i=new $g(r,a,c),this.pages.set(t,i)}}}return i}},$g=class{constructor(e,t,i){this.lineStartIndices=null;this.pageView=e,this.items=t,this.divs=i}getBoundIndicesOfLine(e,t){var a;let i=this._getIndexWithinLineStartIndicesForLineContainingItem(e),r=(a=this.lineStartIndices[i+t])!=null?a:null;if(r===null)return null;let o=this.lineStartIndices[i+1+t],s=o===void 0?this.items.length-1:o-1;for(;s>r&&!this.items[s].str.length;)s--;return{start:r,end:s}}getLineShiftPosition(e,t){let i=this.getBoundIndicesOfLine(e.index,t);if(!i)return null;let r=this._getHorizontalRangeOfChar(e);if(!r)return null;let{start:o,end:s}=i,a=o;for(;a<=s;a++){let d=this.items[a],h=this._getHorizontalRangeOfItem(d);if(Cg(r,h))break}for(a>s&&(a=s);a>o&&!this.items[a].str.length;)a--;let c=this.items[a],l=0;for(;;){let d=this._getHorizontalRangeOfChar({index:a,offset:l});if(!d)return null;if(d.from>=r.from||d.to>=r.to)return{index:a,offset:l};if(l+1<c.str.length)l++;else return{index:a,offset:c.str.length-1}}}_getIndexWithinLineStartIndicesForLineContainingItem(e){this.lineStartIndices||this.parse();let{found:t,index:i}=hn(this.lineStartIndices,r=>e-r);return t?i:i-1}parse(){let e=this._findIndexOfFirstNonEmptyItem();if(e===-1){this.lineStartIndices=[0];return}this.lineStartIndices=[e];let t=[this.items[e]];for(let i=e+1;i<this.items.length;i++){let r=this.items[i];if(this.isItemNonEmpty(r)){let o=this._getVerticalRangeOfItem(r),s=this._getMergedRangeOfItems(t.slice(-10));t.push(r),s&&!Sg(o,s)&&this.lineStartIndices.push(i)}}}_findIndexOfFirstNonEmptyItem(){return this.items.findIndex(e=>this.isItemNonEmpty(e))}isItemNonEmpty(e){let t=this._getVerticalRangeOfItem(e);return t.from<t.to}_getVerticalRangeOfItem(e){return{from:e.transform[5],to:e.transform[5]+e.height}}_getMergedRangeOfItems(e,t="vertical"){if(e.length===0)return null;let i=e.map(t==="vertical"?this._getVerticalRangeOfItem.bind(this):this._getHorizontalRangeOfItem.bind(this)),r=Math.min(...i.map(s=>s.from)),o=Math.max(...i.map(s=>s.to));return{from:r,to:o}}_getHorizontalRangeOfItem(e){return{from:e.transform[4],to:e.transform[4]+e.width}}_getHorizontalRangeOfChar(e){let t=e.index,i=e.offset,r=this.items[t];if(r.chars&&r.chars.length>=r.str.length){let p=r.chars[i];return{from:p.r[0],to:p.r[2]}}let o=this.divs[t],s=Wn(o,i);if(!s)return null;let{node:a,offset:c}=s,l=o.doc.createRange();l.setStart(a,c),l.setEnd(a,c+1);let d=l.getBoundingClientRect(),[[h],[u]]=[...xu(this.pageView,[{x:d.left,y:d.bottom},{x:d.right,y:d.top}])];return{from:h,to:u}}};var _u=class n extends ke{constructor(t,i){super(t);this._structureParser=null;this.viewer=i,this.vimScope=new zu(this.viewer.scope),this.vimScope.registerKeymaps(["normal","visual","outline"],{":":()=>this.enterCommandMode(),"<Tab>":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===2?r.close():r.switchView(2,!0)}},"<S-Tab>":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===1?r.close():r.switchView(1,!0)}},f:()=>this.commandLineMode.executeCommand("hint")}),this.vimScope.registerKeymaps(["normal","visual","outline"],{j:r=>this.scroll.scrollTo("down",r),k:r=>this.scroll.scrollTo("up",r),h:r=>this.scroll.scrollTo("left",r),l:r=>this.scroll.scrollTo("right",r),J:ba(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.nextPage()}),K:ba(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.previousPage()}),gg:()=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=1),G:r=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=r!=null?r:this.pdfViewer.pagesCount),0:
Line truncated
|
||||
${i.map(l=>"- "+l.path).join(`
|
||||
`)}
|
||||
Aborting.`;throw Error(c)}return(a=i.first())!=null?a:null}findLinkedFile(e){let t=null,i=this.lib.workspace.getActiveGroupLeaves();if(i){for(let r of i)if(r.view instanceof os.FileView&&r.view.file&&r.view.file!==e){t=r.view.file;break}}return t}};var Qu=class extends Be{constructor(){super(...arguments);this.statusDurationMs=2e3}getPageAndTextRangeFromSelection(t){if(t=t!=null?t:activeWindow.getSelection(),!t)return null;let i=this.lib.getPageElFromSelection(t);if(!i||i.dataset.pageNumber===void 0)return null;let r=+i.dataset.pageNumber,o=t.rangeCount>0?t.getRangeAt(0):null;if(o){let s=this.getTextSelectionRange(i,o);if(s)return{page:r,selection:s}}return{page:r}}getTextSelectionRange(t,i){if(i&&!i.collapsed){let r=gu(t,i.startContainer),o=gu(t,i.endContainer);if(r&&o){let s=r.dataset.idx,a=o.dataset.idx,c=mu(r,i.startContainer,i.startOffset),l=mu(o,i.endContainer,i.endOffset);if(s!==void 0&&a!==void 0&&c!==null&&l!==null)return{beginIndex:+s-this.plugin.textDivFirstIdx,beginOffset:c,endIndex:+a-this.plugin.textDivFirstIdx,endOffset:l}}}return null}getTemplateVariables(t){var d,h,u;let i=activeWindow.getSelection();if(!i)return null;let r=this.lib.getPageElFromSelection(i);if(!r||r.dataset.pageNumber===void 0)return null;let o=this.lib.getPDFViewerChildAssociatedWithNode(r),s=o==null?void 0:o.file;if(!s)return null;let a=+r.dataset.pageNumber;i.toString()||(a=(h=(d=o.pdfViewer.pdfViewer)==null?void 0:d.currentPageNumber)!=null?h:a);let c=o.getTextSelectionRangeStr(r);if(!c)return null;let l=Gc({page:a,selection:c,...t});return{child:o,file:s,subpath:l,page:a,pageCount:o.pdfViewer.pagesCount,pageLabel:(u=o.getPage(a).pageLabel)!=null?u:""+a,text:this.lib.toSingleLine(i.toString())}}getLinkTemplateVariables(t,i,r,o,s,a,c,l){l=l!=null?l:"";let d=this.app.fileManager.generateMarkdownLink(r,l,o).slice(1),h=this.app.metadataCache.fileToLinktext(r,l)+o;this.app.vault.getConfig("useMarkdownLinks")&&(h=Vr(h));let u=this.getDisplayText(t,i,r,s,a,c),p=this.lib.generateMarkdownLink(r,l,o,u||void 0).slice(1),f=this.app.fileManager.generateMarkdownLink(r,l,`#page=${s}`).slice(1),m=this.lib.generateMarkdownLink(r,l,`#page=${s}`,u||void 0).slice(1);return{link:d,linktext:h,display:u,linkWithDisplay:p,linkToPage:f,linkToPageWithDisplay:m}}getDisplayText(t,i,r,o,s,a){var c;if(!i){let l=this.lib.getColorPaletteFromChild(t);l?i=this.settings.displayTextFormats[l.displayTextFormatIndex].template:i=this.settings.displayTextFormats[this.settings.defaultDisplayTextFormatIndex].template}try{return new ad(this.plugin,{file:r,page:o,pageCount:t.pdfViewer.pagesCount,pageLabel:(c=t.getPage(o).pageLabel)!=null?c:""+o,text:s,comment:a!=null?a:""}).evalTemplate(i).trim()}catch(l){console.error(l),new qi.Notice(`${this.plugin.manifest.name}: Display text format is invalid. Error: ${l.message}`,3e3)}}getTextToCopy(t,i,r,o,s,a,c,l,d,h){var m,x,g,b,w,y;let u=t.getPage(s);if(typeof h!="string"){let F=ga(a).get("annotation");h=typeof F=="string"&&((w=(b=(g=(x=(m=u==null?void 0:u.annotationLayer)==null?void 0:m.annotationLayer)==null?void 0:x.getAnnotation(F))==null?void 0:g.data)==null?void 0:b.contentsObj)==null?void 0:w.str),h=this.lib.toSingleLine(h||"")}return new ad(this.plugin,{file:o,page:s,pageLabel:(y=u.pageLabel)!=null?y:""+s,pageCount:t.pdfViewer.pagesCount,text:c,comment:h,colorName:l,calloutType:this.settings.calloutType,...this.lib.copyLink.getLinkTemplateVariables(t,r,o,a,s,c,h,d)}).evalTemplate(i)}async getTextToCopyForOutlineItem(t,i,r,o){return(await this.getTextToCopyForOutlineItemDynamic(t,i,r))(o)}async getTextToCopyForOutlineItemDynamic(t,i,r){let o=await r.getExplicitDestination(),s=await r.getPageNumber(),a=this.lib.normalizePDFJsDestArray(o,s),c=this.lib.destArrayToSubpath(a);return l=>this.getTextToCopy(t,this.settings.outlineLinkCopyFormat,this.settings.outlineLinkDisplayTextFormat,i,s,c,r.item.title,"",l)}getSelectionLinkInfo(){var s;let t=this.lib.getColorPaletteAssociatedWithSelection();if(!t)return null;let i=this.settings.copyCommands[t.actionIndex].template,r=(s=t.selectedColorName)!=null?s:void 0,o=t.writeFile;return{template:i,colorName:r,writeFile:o}}getAnnotationLinkInfo(){let t=this.plugin.lastAnnotationPopupChild;if(!t)return null;let i=t.activeAnnotationPopupEl;if(!i)return null;let r=i.querySelector(".popupMeta div.clickable-icon:has(svg.lucide-copy)");if(!r)return null;let o=this.lib.getColorPaletteAssociatedWithNode(r),s;o?s=this.settings.copyCommands[o.actionIndex].template:s=this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template;let a=this.lib.getAnnotationInfoFromPopupEl(i);if(!a)return null;let{page:c,id:l}=a;return{child:t,copyButtonEl:r,template:s,page:c,id:l}}copyLinkToSelection(t,i,r,o){let s=this.getTemplateVariables(r?{color:r.toLowerCase()}:{});if(s){let{child:a,file:c,subpath:l,page:d,text:h}=s;if(!h)if(this.settings.useAnotherCopyTemplateWhenNoSelection)i.copyFormat=this.settings.copyTemplateWhenNoSelection;else return!1;return t||(async()=>{var m;let u=this.g
Line truncated
|
||||
|
||||
`+p.slice(1),await navigator.clipboard.writeText(f);let y=async()=>{(i.containerEl.win!==window||m.destroyed)&&(m=await(await this.lib.loadPDFDocument(l)).getPage(r));let F=await this.lib.pdfPageToImageArrayBuffer(m,{type:`image/${x}`,cropRect:o,renderParams:this.lib.getOptionalRenderParameters()});return await this.app.vault.createBinary(g,F)};a?(await y(),this.onCopyFinish(f)):this.onCopyFinish(f,y)}else f=`})`+`
|
||||
|
||||
`+p.slice(1),await navigator.clipboard.writeText(f),this.onCopyFinish(f);this.plugin.lastCopiedDestInfo={file:l,destArray:[r-1,"FitR",...o]},d==null||d.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(f,a,d!=null?d:void 0)})()}return!0}copyLinkToSearch(t,i,r,o,s,a){if(!i.file)return!1;let c=i.file,l=this.lib.getColorPaletteFromChild(i);if(!t){let d=this.lib.copyLink.getDisplayText(i,void 0,c,r,o),h=this.lib.generateMarkdownLink(c,"",`#search=${o}`,d).slice(1);(async()=>(await navigator.clipboard.writeText(h),this.onCopyFinish(h),l==null||l.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(h,s,l!=null?l:void 0)))()}return!0}makeCanvasTextNodeFromSelection(t,i,r,o){var a;let s=this.getTemplateVariables(o?{color:o.toLowerCase()}:{});if(s){let{child:c,file:l,subpath:d,page:h,text:u}=s;if(!u)return!1;if(!t){let p=this.getTextToCopy(c,r,void 0,l,h,d,u,(a=o==null?void 0:o.toLowerCase())!=null?a:"");i.createTextNode({pos:i.posCenter(),position:"center",text:p})}return!0}return!1}makeCanvasTextNodeFromAnnotation(t,i,r,o,s,a){let c=r.file;if(!c)return!1;if(!t){let l=r.getPage(s);r.getAnnotatedText(l,a).then(d=>{let h=this.getTextToCopy(r,o,void 0,c,s,`#page=${s}&annotation=${a}`,d!=null?d:"","");i.createTextNode({pos:i.posCenter(),position:"center",text:h})})}return!0}async autoPaste(t){let i=this.getAutoFocusOrAutoPasteTarget(this.settings.autoPasteTarget);if(i)return await this.pasteTextToFile(t,i),!0;if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let r=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!r)return new qi.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let o=!1;return new Promise(s=>{let a=this.app.workspace.on("file-open",async l=>{l&&l.extension==="md"&&(this.app.workspace.offref(a),await this.pasteTextToFile(t,l,!0),this.plugin.lastPasteFile=l,s(!0))}),c=this.lib.workspace.hoverEditor;this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",l=>{l&&c.isHoverEditorLeaf(l)&&c.postProcessHoverEditorLeaf(l)}),this.app.commands.executeCommandById(r.id),activeWindow.setTimeout(()=>{if(!o){let{noticeEl:l}=new qi.Notice(`${this.plugin.manifest.name}: Could not find the auto-paste target markdown file within ${this.settings.autoPasteTargetDialogTimeoutSec} seconds.`);l.appendText(" Click "),l.createEl("a",{text:"here"},d=>{d.addEventListener("click",()=>{this.plugin.openSettingTab().scrollTo("autoPasteTargetDialogTimeoutSec")})}),l.appendText(" to change the timeout duration."),this.app.workspace.offref(a),s(!1)}},this.settings.autoPasteTargetDialogTimeoutSec*1e3)}).then(s=>(o=!0,s))}async autoFocus(){let t=this.getAutoFocusOrAutoPasteTarget(this.settings.autoFocusTarget);if(t){let{leaf:o,isExistingLeaf:s}=await this.prepareMarkdownLeafForPaste(t);return o&&o.view instanceof qi.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:!0,goEnd:!s}),!0}if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let i=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!i)return new qi.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let r=this.lib.workspace.hoverEditor;return this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",o=>{o&&r.isHoverEditorLeaf(o)&&r.postProcessHoverEditorLeaf(o)}),this.app.commands.executeCommandById(i.id)}getAutoFocusOrAutoPasteTarget(t){let i=this.plugin.lastActiveMarkdownFile,r=this.plugin.lastPasteFile,o=!!(i&&this.lib.workspace.isMarkdownFileOpened(i)),s=null;return t==="last-paste"?s=r:t==="last-active"?s=i:t==="last-active-and-open"?o&&(s=i):t==="last-paste-then-last-active"?s=r!=null?r:i:t==="last-paste-then-last-active-and-open"?r?s=r:o&&(s=i):t==="last-active-and-open-then-last-paste"&&(o?s=i:r&&(s=r)),s&&s.extension==="md"?s:null}async prepareMarkdownLeafForPaste(t){let i=this.lib.workspace.getExistingLeafForMarkdownFile(t),r=!!i;if(!i&&this.settings.openAutoFocusTargetIfNotOpened){let o=this.settings.howToOpenAutoFocusTargetIfNotOpened;if(o==="hover-editor"){let s=await this.lib.workspace.hoverEditor.createNewHoverEditorLeaf({hoverPopover:null},null,t.path,"");s&&(i=s)}else i=this.lib.workspace.getLeaf(o),await i.openFile(t,{active:!1});if(i&&this.settings.openAutoFocusTargetInEditingView){await this.lib.workspace.ensureViewLoaded(i);let s=i.view;s instanceof qi.MarkdownView&&(await s.setState({mode:"source"},{history:!1}),s.setEphemeralState({focus:!1}))}}return i&&(await this.lib.workspace.ensureViewLoaded(i),this.lib.workspace.hoverEditor.postProcessHoverEditorLeaf(i),this.settings.close
Line truncated
|
||||
|
||||
`:`
|
||||
`),l+=t,c.setValue(l)}a.save(),await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!this.settings.respectCursorPositionWhenAutoPaste})}else await this.app.vault.process(i,a=>(a=a.trimEnd(),a&&(a+=this.settings.blankLineAboveAppendedContent?`
|
||||
|
||||
`:`
|
||||
`),a+=t,a)),o&&activeWindow.setTimeout(async()=>{o.view instanceof qi.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!0})})}async updateAndRevealCursorInEditor(t,i){let{focus:r,goEnd:o}=i,s=t.editor;r&&(o&&s.exec("goEnd"),await this.lib.workspace.revealLeaf(t.leaf),this.app.workspace.setActiveLeaf(t.leaf),s.focus());let a=s.coordsAtPos(s.getCursor(),!0);if(a){let c=s.getScrollInfo();if(a.top<c.top||a.top>c.top+c.clientHeight){let l={from:s.getCursor("from"),to:s.getCursor("to")};s.scrollIntoView(l,!0)}}}watchPaste(t,i){this.plugin.registerOneTimeEvent(this.app.workspace,"editor-paste",(r,o,s)=>{var d;if(((d=s.file)==null?void 0:d.extension)!=="md"||!r.clipboardData)return;let c=r.clipboardData.getData("text/plain").replace(/\r\n/g,`
|
||||
`),l=t.replace(/\r\n/g,`
|
||||
`);c===l&&(this.plugin.lastPasteFile=s.file,i==null||i()),s instanceof qi.MarkdownView&&setTimeout(()=>s.save())})}onCopyFinish(t,i){this.watchPaste(t,i),this.plugin.lastCopiedDestInfo=null}async autoFocusOrAutoPaste(t,i,r){if(i||this.settings.autoPaste)if(await this.autoPaste(t)){if(r==null||r.setStatus("Link copied & pasted",this.statusDurationMs),!this.settings.focusEditorAfterAutoPaste&&this.settings.clearSelectionAfterAutoPaste){let s=activeWindow.getSelection();s&&this.lib.copyLink.getPageAndTextRangeFromSelection(s)&&s.empty()}}else r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs);else this.settings.autoFocus&&(await this.autoFocus()||r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs))}};var $u=class extends Be{computeMergedHighlightRects(e,t,i,r,o){let{textContentItems:s,textDivs:a}=e,c=[],l=null,d=[];o===0&&(r--,o=s[r].str.length);for(let h=t;h<=r;h++){let u=s[h],p=a[h];if(!u.str)continue;let f=this.computeHighlightRectForItem(u,p,h,t,i,r,o);f&&(l?this.areRectanglesMergeable(l,f)?(l=this.mergeRectangles(l,f),d.push(h)):(c.push({rect:l,indices:d}),l=f,d=[h]):(l=f,d=[h]))}return l&&c.push({rect:l,indices:d}),c}computeHighlightRectForItem(e,t,i,r,o,s,a){return e.chars&&e.chars.length>=e.str.length?this.computeHighlightRectForItemFromChars(e,i,r,o,s,a):this.computeHighlightRectForItemFromTextLayer(e,t,i,r,o,s,a)}computeHighlightRectForItemFromChars(e,t,i,r,o,s){let a=e.chars.slice(e.chars.findIndex(u=>u.c===e.str.charAt(0)),e.chars.findLastIndex(u=>u.c===e.str.charAt(e.str.length-1))+1),c=t===i?r:0,l=(t===o?Math.min(s,a.length):a.length)-1;if(c>a.length-1||l<0)return null;let d=a[c],h=a[l];return[Math.min(d.r[0],h.r[0]),Math.min(d.r[1],h.r[1]),Math.max(d.r[2],h.r[2]),Math.max(d.r[3],h.r[3])]}computeHighlightRectForItemFromTextLayer(e,t,i,r,o,s,a){let c=e.transform[4],l=e.transform[5],d=e.transform[4]+e.width,h=e.transform[5]+e.height,u=t.doc.createRange();if(i===r){let m=Wn(t,o);m?u.setStart(m.node,m.offset):u.setStartBefore(t)}else u.setStartBefore(t);if(i===s){let m=Wn(t,a);m?u.setEnd(m.node,m.offset):u.setEndAfter(t)}else u.setEndAfter(t);let p=u.getBoundingClientRect(),f=t.getBoundingClientRect();return[c+(p.left-f.left)/f.width*e.width,l+(p.bottom-f.bottom)/f.height*e.height,d-(f.right-p.right)/f.width*e.width,h-(f.top-p.top)/f.height*e.height]}areRectanglesMergeable(e,t){return this.areRectanglesMergeableHorizontally(e,t)||this.areRectanglesMergeableVertically(e,t)}areRectanglesMergeableHorizontally(e,t){let[i,r,o,s]=e,[a,c,l,d]=t,h=(r+s)/2,u=(c+d)/2,p=Math.abs(s-r),f=Math.abs(d-c),m=Math.max(p,f)*.5;return Math.abs(h-u)<m}areRectanglesMergeableVertically(e,t){let[i,r,o,s]=e,[a,c,l,d]=t,h=Math.abs(o-i),u=Math.abs(l-a),p=Math.abs(s-r),f=Math.abs(d-c),m=Math.max(h,u)*.1;return Math.abs(i-a)<m&&Math.abs(o-l)<m&&p/h>.85&&f/u>.85}mergeRectangles(...e){let t=e.map(s=>s[0]),i=e.map(s=>s[1]),r=e.map(s=>s[2]),o=e.map(s=>s[3]);return[Math.min(...t),Math.min(...i),Math.max(...r),Math.max(...o)]}rectsToQuadPoints(e){return e.flatMap(([t,i,r,o])=>[t,o,r,o,t,i,r,i])}};var ef=require("obsidian");var tf=class extends Be{getPDFPlusBacklinkHighlightLayer(e){var i;let t=e.div;return(i=t.querySelector("div.pdf-plus-backlink-highlight-layer"))!=null?i:t.createDiv("pdf-plus-backlink-highlight-layer",r=>{window.pdfjsLib.setLayerDimensions(r,e.viewport)})}placeRectInPage(e,t){let i=t.pdfPage.view,r=i[0],o=i[1],s=i[2]-i[0],a=i[3]-i[1],c=window.pdfjsLib.Util.normalizeRect([e[0],i[3]-e[1]+i[1],e[2],i[3]-e[3]+i[1]]),d=this.getPDFPlusBacklinkHighlightLayer(t).createDiv("pdf-plus-backlink");return d.setCssStyles({left:`${100*(c[0]-r)/s}%`,top:`${100*(c[1]-o)/a}%`,width:`${100*(c[2]-c[0])/s}%`,height:`${100*(c[3]-c[1])/a}%`}),d}highlightSubpath(e,t){var i,r,o;if(((i=e.subpathHighlight)==null?void 0:i.type)==="text"){let s=new ef.Component;s.load(),this.lib.onTextLayerReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="text")return;let{page:c,range:l}=e.subpathHighlight;c===a&&(e.highlightText(c,l),t>0&&setTimeout(()=>{e.clearTextHighlight()},t*1e3),s.unload())})}else if(((r=e.subpathHighlight)==null?void 0:r.type)==="annotation"){let s=new ef.Component;s.load(),this.lib.onAnnotationLayerReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="annotation")return;let{page:c,id:l}=e.subpathHighlight;c===a&&(e.highlightAnnotation(c,l),t>0&&setTimeout(()=>e.clearAnnotationHighlight(),t*1e3),s.unload())})}else if(((o=e.subpathHighlight)==null?void 0:o.type)==="rect"){let s=new ef.Component;s.load(),this.lib.onPageReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="rect")return;let{page:c,rect:l}=e.subpathHighlight;c===a&&(this.highlightRect(e,c,l),t>0&&setTimeout(()=>{this.clearRectHighlight(e)},t*1e3),s.unload())})}}highlightRect(e,t,i){if(this.clearRectHighlight(e),1<=t&&t<=e.pdfViewer.pagesCount){let r=e.getPage(t);r!=null&&r.div.dataset.loaded&&(e.rectHighlight=this.pl
Line truncated
|
||||
`);return a=this.lib.toSingleLine(a),[s.id,{text:a,rgb:s.rgb,comment:s.comment}]}))}getTextByRect(e,t){let[i,r,o,s]=t,a="",c={index:-1,offset:-1},l={index:-1,offset:-1};for(let d=0;d<e.length;d++){let h=e[d];if(h.chars&&h.chars.length)for(let u=0;u<h.chars.length;u++){let p=h.chars[u],f=(p.r[0]+p.r[2])/2,m=(p.r[1]+p.r[3])/2;i<=f&&f<=o&&r<=m&&m<=s&&(a+=p.u,c.index===-1&&c.offset===-1&&(c={index:d,offset:u}),l={index:d,offset:u+1})}}return{text:a,from:c,to:l}}};var sf=class extends Be{constructor(t){super(t);this.plugin=t;this.geometry=new $u(t),this.viewer=new tf(t),this.writeFile=new rf(t),this.extract=new of(t)}};var Qe=require("obsidian");function EC(n){return["tab","split","window"].contains(n)}function TC(n){return["right","left","down","up"].contains(n)}function u1(n){return["right-sidebar","left-sidebar"].contains(n)}var af=class extends Be{constructor(...e){super(...e),this.hoverEditor=new tm(...e)}iteratePDFViews(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;this.lib.isPDFView(i)&&e(i)})}iterateBacklinkViews(e){this.app.workspace.getLeavesOfType("backlink").forEach(t=>e(t.view))}iterateCanvasViews(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;this.lib.isCanvasView(i)&&e(i)})}iteratePDFEmbeds(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;i instanceof Qe.MarkdownView?this.lib.getAllPDFEmbedsInMarkdownView(i).forEach(e):this.lib.isCanvasView(i)?this.lib.getAllPDFEmbedsInCanvasView(i).forEach(e):this.lib.isExcalidrawView(i)&&this.lib.getAllPDFEmbedsInExcalidrawView(i).forEach(e)})}iteratePDFViewerComponents(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;this.lib.isPDFView(i)?e(i.viewer,i.file):i instanceof Qe.MarkdownView?this.lib.getAllPDFEmbedsInMarkdownView(i).forEach(r=>e(r.viewer,r.file)):this.lib.isCanvasView(i)?this.lib.getAllPDFEmbedsInCanvasView(i).forEach(r=>e(r.viewer,r.file)):this.lib.isExcalidrawView(i)&&this.lib.getAllPDFEmbedsInExcalidrawView(i).forEach(r=>e(r.viewer,r.file))})}iteratePDFViewerChild(e){this.iteratePDFViewerComponents(t=>{t.then(i=>e(i))})}getActivePDFView(){var t;if(this.plugin.classes.PDFView)return this.app.workspace.getActiveViewOfType(this.plugin.classes.PDFView);let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isPDFView(e)?e:null}getActiveCanvasView(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isCanvasView(e)?e:null}getActiveExcalidrawView(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isExcalidrawView(e)?e:null}getExistingLeafForPDFFile(e){return this.getExistingLeafForFile(e)}getActiveGroupLeaves(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.group;return e?this.app.workspace.getGroupLeaves(e):null}async openMarkdownLinkFromPDF(e,t,i,r){var a;let o;i?o=this.app.workspace.getLeaf(i):u1(this.settings.paneTypeForFirstMDLeaf)&&this.settings.alwaysUseSidebar?o=this.getMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):o=this.getMarkdownLeafForLinkFromPDF(e,t);let s={};if(r){if("pos"in r){let{pos:c}=r;s.eState={line:c.start.line,startLoc:c.start,endLoc:c.end}}else{let{line:c}=r;s.eState={line:c}}s.eState.scroll=s.eState.line,s.eState.focus=!this.settings.dontActivateAfterOpenMD}o.parentSplit instanceof Qe.WorkspaceTabs&&o.parentSplit===((a=this.app.workspace.activeLeaf)==null?void 0:a.parentSplit)||(s.active=!this.plugin.settings.dontActivateAfterOpenMD),await o.openLinkText(e,t,s),await this.revealLeaf(o)}getMarkdownLeafInSidebar(e){var t;return this.settings.singleMDLeafInSidebar?(t=this.lib.workspace.getExistingMarkdownLeafInSidebar(e))!=null?t:this.lib.workspace.getNewLeafInSidebar(e):this.lib.workspace.getNewLeafInSidebar(e)}getMarkdownLeafForLinkFromPDF(e,t){var a;let{path:i}=(0,Qe.parseLinktext)(e),r=this.app.metadataCache.getFirstLinkpathDest(i,t),o,s;return this.app.workspace.iterateAllLeaves(c=>{if(o)return;let l=!0;if(c.view.getViewType()==="markdown"){let d=c.getRoot();for(let h of this.settings.ignoreExistingMarkdownTabIn)if(d===this.app.workspace[h])return;c.parentSplit instanceof Qe.WorkspaceTabs&&c.parentSplit.children.some(u=>{if(u instanceof Qe.WorkspaceLeaf&&u.view.getViewType()==="pdf")return this.getFilePathFromView(u.view)===t})&&(l=!1),l&&(s=c.parentSplit),r&&this.getFilePathFromView(c.view)===r.path&&(o=c)}}),o||(u1(this.settings.paneTypeForFirstMDLeaf)&&this.settings.singleMDLeafInSidebar&&s&&this.isInSidebar(s)?o=(a=this.getExistingMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf))!=null?a:this.lib.workspace.getNewLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):o=s?this.app.workspace.createLeafInParent(s,-1):this.getLeaf(this.plugin.settings.paneTypeForFirstMDLeaf)),o}isInSidebar(e){let t=e.getRoot();return t===this.app.workspace.rightSplit||t===this.app.workspace.leftSplit}getLeaf(e){return e===""&&(e=!1),typeof e=="boolean"||EC(e)?this.app.workspace.getLeaf(e):TC(e)?this.getLeafBySplit(e):this.getLeafInSidebar(e)}getLeafBySplit(e){let t=this.app.workspace.
Line truncated
|
||||
`):this.app.fileManager.generateMarkdownLink(e[0],"");await navigator.clipboard.writeText(i),new _r.Notice(`${this.plugin.manifest.name}: Copied!`)}),new _r.ButtonComponent(t).setButtonText("Close").onClick(()=>{this.close()})})}};var cf=class extends Be{constructor(...e){super(...e);let t=[{id:"copy-link-to-selection",name:"Copy link to selection or annotation",checkCallback:i=>this.copyLink(i,!1)},{id:"rectangular-selection",name:"Start rectangular selection",checkCallback:i=>this.copyEmbedLinkToRectangularSelection(i,!1)},{id:"context-menu",name:"Show context menu at selection",checkCallback:i=>this.showContextMenu(i)},{id:"extract-annotation-and-copy-links",name:"Extract & copy annotations in this PDF",checkCallback:i=>this.extractHighlightedText(i)},{id:"copy-link-to-page-view",name:"Copy link to current page view",checkCallback:i=>this.copyLinkToPageView(i)},{id:"outline",name:"Show outline",checkCallback:i=>this.showOutline(i)},{id:"thumbnail",name:"Show thumbnail",checkCallback:i=>this.showThumbnail(i)},{id:"close-sidebar",name:"Close PDF sidebar",checkCallback:i=>this.closeSidebar(i)},{id:"toggle-sidebar",name:"Toggle PDF sidebar",checkCallback:i=>this.toggleSidebar(i)},{id:"fit-width",name:"Fit width",checkCallback:i=>this.setScaleValue(i,"page-width")},{id:"fit-height",name:"Fit height",checkCallback:i=>this.setScaleValue(i,"page-height")},{id:"zoom-in",name:"Zoom in",checkCallback:i=>this.zoom(i,!0)},{id:"zoom-out",name:"Zoom out",checkCallback:i=>this.zoom(i,!1)},{id:"adapt-to-theme",name:"Adapt to theme",checkCallback:i=>this.toggleAdaptToTheme(i,!0)},{id:"not-adapt-to-theme",name:"Don't adapt to theme",checkCallback:i=>this.toggleAdaptToTheme(i,!1)},{id:"toggle-adapt-to-theme",name:'Toggle "adapt to theme"',checkCallback:i=>this.toggleAdaptToTheme(i)},{id:"go-to-page",name:"Go to page",checkCallback:i=>this.focusAndSelectPageNumberEl(i)},{id:"copy-format-menu",name:"Show copy format menu",checkCallback:i=>this.showCopyFormatMenu(i)},{id:"display-text-format-menu",name:"Show display text format menu",checkCallback:i=>this.showDisplayTextFormatMenu(i)},{id:"enable-pdf-edit",name:"Enable PDF edit",checkCallback:i=>this.setWriteFile(i,!0)},{id:"disable-pdf-edit",name:"Disable PDF edit",checkCallback:i=>this.setWriteFile(i,!1)},{id:"toggle-auto-focus",name:"Toggle auto-focus",callback:()=>this.toggleAutoFocus()},{id:"toggle-auto-paste",name:"Toggle auto-paste",callback:()=>this.toggleAutoPaste()},{id:"toggle-auto-copy",name:"Toggle auto-copy",callback:()=>this.plugin.autoCopyMode.toggle()},{id:"add-page",name:"Add new page at the end",checkCallback:i=>this.addPage(i)},{id:"insert-page-before",name:"Insert page before this page",checkCallback:i=>this.insertPage(i,!0)},{id:"insert-page-after",name:"Insert page after this page",checkCallback:i=>this.insertPage(i,!1)},{id:"delete-page",name:"Delete this page",checkCallback:i=>this.deletePage(i)},{id:"extract-this-page",name:"Extract this page to a new file",checkCallback:i=>this.extractThisPage(i)},{id:"divide",name:"Divide this PDF into two files at this page",checkCallback:i=>this.dividePDF(i)},{id:"edit-page-labels",name:"Edit page labels",checkCallback:i=>this.editPageLabels(i)},{id:"copy-outline-as-list",name:"Copy PDF outline as markdown list",checkCallback:i=>this.copyOutline(i,"list")},{id:"copy-outline-as-headings",name:"Copy PDF outline as markdown headings",checkCallback:i=>this.copyOutline(i,"heading")},{id:"add-outline-item",name:"Add to outline (bookmark)",checkCallback:i=>this.addOutlineItem(i)},{id:"create-new-note",name:"Create new note for auto-focus or auto-paste",callback:()=>this.createNewNote()},{id:"copy-debug-info",name:"Copy debug info",callback:()=>this.copyDebugInfo()},{id:"load-debug-info",name:"Load debug info",checkCallback:i=>this.loadDebugInfo(i)},{id:"create-pdf",name:"Create new PDF",callback:()=>this.createPDF()},{id:"import",name:"Import this PDF into vault",checkCallback:i=>this.importExternalFileIntoVault(i)},{id:"open-external",name:"Open this PDF in the original location",checkCallback:i=>this.openExternalSource(i)},{id:"create-dummy",name:"Create dummy file for external PDF",callback:()=>this.createDummyForExternalPDF()},{id:"restore-default",name:"Restore default settings",callback:()=>new lf(this.plugin).open()},{id:"open-dataview-inline-fields-modal",name:"Check Dataview inline fields",checkCallback:i=>this.plugin.requiresDataviewInlineFieldsMigration?(i||Aa.open(this.plugin),!0):!1}];this.commands={};for(let i of t)this.commands[i.id]=i}registerCommands(){Object.values(this.commands).forEach(e=>{this.plugin.addCommand(this.plugin.obsidianHasFocusBug?this.restorePDFLeafFocus(e):e)})}restorePDFLeafFocus(e){let t=e.checkCallback;if(!t)return e;let i=null;return{...e,checkCallback:r=>{var o,s;return r?(i=(s=(o=this.lib.workspace.getActivePDFView())==null?void 0:o.leaf)!=null?s:null,t(r)):(i&&i!==this.app.workspace.activeLeaf&&(this.app.workspace.setActiveLeaf(i,{focus:!0}),i=null),t(r))}}}getCommand(e){return
Line truncated
|
||||
`:t==="heading"&&(d+="#".repeat(f.depth+c-1)+` ${w}
|
||||
`)}}}),navigator.clipboard.writeText(d),new ct.Notice(`${this.plugin.manifest.name}: Outline copied to clipboard.`)})()}return!0}addOutlineItem(e){let t=this.lib.workspace.getActivePDFView(),i=t==null?void 0:t.file,r=t==null?void 0:t.viewer.child;if(!t||!i||!r||!this.lib.isEditable(r))return!1;let o=t.getState(),s=this.lib.viewStateToDestArray(o,!0);return s?(e||new jr(this.plugin,"Add to outline").ask().then(async({title:a})=>{let c=await Ge.fromFile(i,this.plugin),l=c.doc;c.ensureRoot().createChild(a,s).updateCountForAllAncestors(),c.ensureRoot().sortChildren(),await this.app.vault.modifyBinary(i,await l.save())}),!0):!1}async createNewNote(){var d;let e=this.app.workspace.getActiveFile(),t=(d=e==null?void 0:e.path)!=null?d:"",i=this.app.fileManager.getNewFileParent(t),r="",o="";if(e&&e.extension==="pdf"){let h=new sd(this.plugin,{file:e,folder:e.parent,app:this.app}),u=this.settings.newFileNameFormat;u&&(r=h.evalTemplate(u));let p=this.settings.newFileTemplatePath;if(p){let f=this.app.vault.getAbstractFileByPath(p);f instanceof ct.TFile&&(o=await this.app.vault.read(f),o=h.evalTemplate(o))}}let s=await this.app.fileManager.createNewMarkdownFile(i,r,o||void 0),a=async()=>{let{leaf:h,isExistingLeaf:u}=await this.lib.copyLink.prepareMarkdownLeafForPaste(s);if(h){await this.lib.workspace.revealLeaf(h),this.app.workspace.setActiveLeaf(h);let p=h.view;if(p instanceof ct.MarkdownView){let f=p.editor;f.focus(),u||f.exec("goEnd")}}};if(this.settings.howToOpenAutoFocusTargetIfNotOpened!=="hover-editor"){await a();return}let l=this.app.metadataCache.on("resolve",async h=>{h===s&&(this.app.metadataCache.offref(l),setTimeout(()=>a(),100))})}extractHighlightedText(e){let t=this.lib.getPDFViewerChild();if(!t)return!1;let i=t.file;if(!i)return!1;if(!e){let r=this.lib.getColorPaletteFromChild(t),o=r?this.settings.copyCommands[r.actionIndex].template:this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template,s="";(async()=>{var l;let a=(l=this.lib.getPDFDocument(!0))!=null?l:await this.lib.loadPDFDocument(i);(await this.lib.highlight.extract.getAnnotatedTextsInDocument(a)).forEach((d,h)=>{d.forEach(({text:u,rgb:p,comment:f},m)=>{s&&(s=s.trimEnd()+`
|
||||
|
||||
`);let x=p?`${p.r},${p.g},${p.b}`:"";s+=this.lib.copyLink.getTextToCopy(t,o,void 0,i,h,`#page=${h}&annotation=${m}`,u,x,void 0,f)})}),s?(await navigator.clipboard.writeText(s),new ct.Notice(`${this.plugin.manifest.name}: Highlighted text copied to clipboard.`)):new ct.Notice(`${this.plugin.manifest.name}: No highlighted text found.`)})()}return!0}async copyDebugInfo(){let e=await yg(this.app),t=Object.assign({},this.settings,{author:"*".repeat(this.settings.author.length)}),i=vg(this.app),r=this.plugin.domManager.styleEl.textContent,o=`#### Obsidian debug info
|
||||
|
||||
`;for(let[s,a]of Object.entries(e)){if(Array.isArray(a)){o+=`- ${s}: ${a.length}
|
||||
`,a.forEach(c=>{o+=` - ${c}
|
||||
`});continue}o+=`- ${s}: ${a}
|
||||
`}o+=`
|
||||
#### PDF++ debug info
|
||||
|
||||
`,o+="```\n"+JSON.stringify({settings:t,styleSettings:i,styleSheet:r})+"\n```\n",await navigator.clipboard.writeText(o),new ct.Notice(`${this.plugin.manifest.name}: Debug info copied to clipboard.`)}loadDebugInfo(e){return this.plugin.isDebugMode?(e||(async()=>{try{let{settings:t,styleSettings:i,styleSheet:r}=JSON.parse(await navigator.clipboard.readText());new ct.Notice(`${this.plugin.manifest.name}: Debug info loaded from clipboard.`),console.debug("Loaded debug info:"),console.debug("- settings:",t),console.debug("- styleSettings:",i),console.debug("- styleSheet:",r),window.pdfPlusDebugInfo={settings:t,styleSettings:i,styleSheet:r},this.plugin.settings=t;let o=this.app.setting.pluginTabs.find(s=>s.id===this.plugin.manifest.id);o&&await o.hide()}catch(t){console.error(t),new ct.Notice(`${this.plugin.manifest.name}: Debug info not found in clipboard.`)}})(),!0):!1}importExternalFileIntoVault(e){let t=this.lib.getPDFViewerChild(!0);return!t||!t.isFileExternal||!t.palette?!1:(e||t.palette.importFile(),!0)}openExternalSource(e){let t=this.lib.getPDFViewerChild(!0),i=t==null?void 0:t.file;return!t||!t.isFileExternal||!i?!1:(e||(async()=>{let r=(await this.app.vault.read(i)).trim();window.open(r,"_blank")})(),!0)}createDummyForExternalPDF(){new Fa(this.plugin).open()}showContextMenu(e){let t=this.lib.getPDFViewerChild(!0);if(!t)return!1;let r=t.containerEl.doc.getSelection();return!r||!r.focusNode||r.isCollapsed?!1:(e||Ru(this.plugin,t,r),!0)}};var ii=require("obsidian");var df=class extends Be{constructor(...e){super(...e),this.fileOperator=new nm(this.plugin),this.linkUpdater=new rm(this.plugin)}isEnabled(){return this.settings.enablePDFEdit}async addPage(e){return await this.linkUpdater.updateLinks(()=>this.fileOperator.addPage(e),[e],(t,i)=>({}))}async insertPage(e,t,i,r){return await this.linkUpdater.updateLinks(()=>this.fileOperator.insertPage(e,t,i,r),[e],(o,s)=>({pageNumber:typeof s=="number"&&s>=t?s+1:s}))}async removePage(e,t,i){return await this.linkUpdater.updateLinks(()=>this.fileOperator.removePage(e,t,i),[e],(r,o)=>({pageNumber:typeof o=="number"&&o>t?o-1:o}))}async mergeFiles(e,t,i){let r=(await this.fileOperator.read(e)).getPageCount();return await this.linkUpdater.updateLinks(()=>this.fileOperator.mergeFiles(e,t,i),[e,t],(o,s)=>o===e?{}:{file:e,pageNumber:typeof s=="number"?s+r:s})}async extractPages(e,t,i,r,o,s){let a;return Array.isArray(t)?a=t:(t.from===void 0&&(t.from=1),t.to===void 0&&(t.to=(await this.fileOperator.read(e)).getPageCount()),a=fg(t.from,t.to+1)),await this.linkUpdater.updateLinks(()=>this.fileOperator.extractPages(e,a,i,r,o,s),[e],(c,l)=>{if(l===void 0)return{};if(a.includes(l))return{file:i,pageNumber:a.filter(d=>d<=l).length};if(s){let d=a.filter(h=>h<l).length;return d>0?{pageNumber:l-d}:{}}return{}})}},nm=class extends Be{constructor(...e){super(...e),this.pageLabelUpdater=new om(this.plugin)}async read(e){return await this.lib.loadPdfLibDocument(e)}async write(e,t,i){let r=await t.save(),o=this.app.vault.getAbstractFileByPath(e);if(o instanceof ii.TFile)return i||new ii.Notice(`${this.plugin.manifest.name}: File already exists: ${e}`),await this.app.vault.modifyBinary(o,r),o;if(o===null){let s=(0,ii.normalizePath)(e.split("/").slice(0,-1).join("/"));return s&&(this.app.vault.getAbstractFileByPath(s)||await this.app.vault.createFolder(s)),await this.app.vault.createBinary(e,r)}return null}async addPage(e){let t=await this.read(e),i=t.getPage(t.getPageCount()-1),{width:r,height:o}=i.getSize();return t.addPage([r,o]),await this.write(e.path,t,!0)}async insertPage(e,t,i,r){let o=await this.read(e);this.pageLabelUpdater.insertPage(o,t,r);let s=o.getPage(i-1),{width:a,height:c}=s.getSize();return o.insertPage(t-1,[a,c]),await this.write(e.path,o,!0)}async removePage(e,t,i){let r=await this.read(e);return this.pageLabelUpdater.removePage(r,t,i),r.removePage(t-1),await(await Ge.fromDocument(r,this.plugin)).prune(),await this.write(e.path,r,!0)}async mergeFiles(e,t,i){let[r,o]=await Promise.all([this.read(e),this.read(t)]);this.pageLabelUpdater.mergeFiles(r,o,i);let s=await r.copyPages(o,o.getPageIndices());for(let c of s)r.addPage(c);let a=await this.write(e.path,r,!0);return a===null?null:(await this.app.fileManager.trashFile(t),a)}async extractPages(e,t,i,r,o,s){if(t.length===0)throw new Error("No pages to extract");return s?await this.extractPagesInPlace(e,t,i,r,o):await this.extractPagesAsNewFile(e,t,i,r,o)}async extractPagesInPlace(e,t,i,r,o){let[s,a]=await Promise.all([this.read(e),this.read(e)]),c=[];for(let h=1;h<=s.getPageCount();h++)t.includes(h)||c.push(h);this.pageLabelUpdater.removePages(s,t,o),this.pageLabelUpdater.removePages(a,c,o);for(let h=s.getPageCount();h>=1;h--)t.includes(h)?s.removePage(h-1):a.removePage(h-1);await Promise.all([s,a].map(async h=>{await(await Ge.fromDocument(h,this.plugin)).prune()}));let[l,d]=await Promise.all([this.write(e.path,s,!0),this.write(i,a,r)]);return d}async extractPagesAsNewFile(e,t,i,r,o){let s=await this.read(e),a=[];for(l
Line truncated
|
||||
`)}}return f})}else{let p=e.key;await this.app.fileManager.processFrontMatter(o,f=>{f[p]=u})}}},om=class extends Be{addPage(e){}insertPage(e,t,i){Ui.processDocument(e,r=>{if(i){r.divideRangeAtPage(t,!0).shiftRangesAfterPage(t,1).divideRangeAtPage(t,!1,o=>{delete o.prefix,delete o.style});return}r.shiftRangesAfterPage(t,1)})}removePage(e,t,i){this.removePages(e,[t],i)}removePages(e,t,i){Ui.processDocument(e,r=>{t.sort((o,s)=>s-o).forEach(o=>{this.removePageFromLabels(r,o,i)})})}removePageFromLabels(e,t,i){if(i){e.divideRangeAtPage(t+1,!0).shiftRangesAfterPage(t+1,-1);return}e.shiftRangesAfterPage(t+1,-1)}mergeFiles(e,t,i){}};var uf=require("obsidian");var sm=class{constructor(e){wf(this,"value");wf(this,"next");this.value=e}},ni,ss,as,cd=class{constructor(){mn(this,ni);mn(this,ss);mn(this,as);this.clear()}enqueue(e){let t=new sm(e);qe(this,ni)?(qe(this,ss).next=t,Lt(this,ss,t)):(Lt(this,ni,t),Lt(this,ss,t)),Ff(this,as)._++}dequeue(){let e=qe(this,ni);if(e)return Lt(this,ni,qe(this,ni).next),Ff(this,as)._--,e.value}peek(){if(qe(this,ni))return qe(this,ni).value}clear(){Lt(this,ni,void 0),Lt(this,ss,void 0),Lt(this,as,0)}get size(){return qe(this,as)}*[Symbol.iterator](){let e=qe(this,ni);for(;e;)yield e.value,e=e.next}*drain(){for(;qe(this,ni);)yield this.dequeue()}};ni=new WeakMap,ss=new WeakMap,as=new WeakMap;function am(n){f1(n);let e=new cd,t=0,i=()=>{t<n&&e.size>0&&(t++,e.dequeue()())},r=()=>{t--,i()},o=async(c,l,d)=>{let h=(async()=>c(...d))();l(h);try{await h}catch(u){}r()},s=(c,l,d)=>{new Promise(h=>{e.enqueue(h)}).then(o.bind(void 0,c,l,d)),t<n&&i()},a=(c,...l)=>new Promise(d=>{s(c,d,l)});return Object.defineProperties(a,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value(){e.clear()}},concurrency:{get:()=>n,set(c){f1(c),n=c,queueMicrotask(()=>{for(;t<n&&e.size>0;)i()})}},map:{async value(c,l){let d=c.map((h,u)=>this(l,h,u));return Promise.all(d)}}}),a}function f1(n){if(!((Number.isInteger(n)||n===Number.POSITIVE_INFINITY)&&n>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var hf=class hf extends uf.Component{constructor(t,i,r,o,s,a,c,l){super();this.plugin=t;this.ctx=i;this.file=r;this.subpath=o;this.pageNumber=s;this.rect=a;this.width=c;this.annotationId=l;this.app=i.app,this.containerEl=i.containerEl,this.rect=window.pdfjsLib.Util.normalizeRect(a),this.containerEl.addClass("pdf-cropped-embed"),c&&this.containerEl.setAttribute("width",""+c)}get lib(){return this.plugin.lib}onload(){super.onload(),this.shouldUpdateOnModify()&&this.registerEvent(this.app.vault.on("modify",t=>{t===this.file&&this.loadFile()})),this.plugin.settings.rectFollowAdaptToTheme&&(this.registerEvent(this.app.workspace.on("css-change",()=>{this.loadFile()})),this.registerEvent(this.plugin.on("adapt-to-theme-change",()=>{this.loadFile()})))}shouldUpdateOnModify(){return typeof this.annotationId=="string"}async loadFile(){let t=await hf.limit(this.computeDataUrl.bind(this));await new Promise((i,r)=>{this.containerEl.empty(),this.containerEl.createEl("img",{attr:{src:t}},o=>{o.addEventListener("load",()=>i()),o.addEventListener("error",c=>r(c));let s=this.containerEl.getAttribute("width"),a=this.containerEl.getAttribute("height");s&&o.setAttribute("width",s),a&&o.setAttribute("height",a)}),activeWindow.setTimeout(()=>r(),5e3)})}async computeDataUrl(){let t=await this.lib.loadPDFDocument(this.file),i=await t.getPage(this.pageNumber);if(this.annotationId){let s=(await i.getAnnotations()).find(a=>a.id===this.annotationId);s&&Array.isArray(s.rect)&&(this.rect=window.pdfjsLib.Util.normalizeRect(s.rect))}let r=await this.lib.pdfPageToImageDataUrl(i,{type:"image/png",cropRect:this.rect,renderParams:this.lib.getOptionalRenderParameters()});return await t.destroy(),r}};hf.limit=am(uf.Platform.isMobile?3:10);var Jr=hf;var ff=class extends Be{get ttsPlugin(){var e;return(e=this.app.plugins.plugins["obsidian-tts"])!=null?e:null}isEnabled(){return!!this.ttsPlugin}async speak(e){var t;await((t=this.ttsPlugin)==null?void 0:t.say(e))}};var Qn=require("obsidian");var pf=class extends Be{async createDummyFilesInFolder(e,t){if(!!!this.app.vault.getFolderByPath(e))try{await this.app.vault.createFolder(e)}catch(r){return console.error(`${this.plugin.manifest.name}: Failed to create folder "${e}" due to the following error: `,r),[]}return await Promise.all(t.map(async r=>{let o=r.split("/").pop().replace(/%20/g," ");Qn.Platform.isWin&&(o=o.replace(/\?/g," "));let s=(0,Qn.normalizePath)(e+"/"+o);s.endsWith(".pdf")&&(s=s.slice(0,-4));let a=this.app.vault.getAvailablePath(s,"pdf");try{return await this.app.vault.create(a,r)}catch(c){throw console.error(`${this.plugin.manifest.name}: Failed to create a dummy file "${a}" due to the following error: `,c),c}}))}async createDummyFilesFromObsidianUrl(e){let t=e["create-dummy"].replace(/^.*((https?)|(file):\/\/)/,"$1"),i=new Fa(this.plugin);if(i.source=t.startsWith("http")?"web":"file",i.uris=[t],"folder"in e){let r=e.folder;i.folderPath=(0,Qn.normalizePath)(r)
Line truncated
|
||||
|
||||
`),t.replaceSelection(l)})}}getUrisFromDataTransfer(e){if(window.electron){let i=Array.from(e.files);if(i.length&&i.every(r=>r.type==="application/pdf"))return i.map(r=>{let o=window.electron.webUtils.getPathForFile(r);return this.absolutePathToFileUri(o)})}let t=e.getData("text/uri-list").split(`\r
|
||||
`).filter(i=>!i.startsWith("#"));return t.length&&t.every(i=>this.isUriPdf(i))?t:[]}getFolderPathForDummyFiles(e){var i;let t=this.settings.dummyFileFolderPath||this.app.vault.getConfig("attachmentFolderPath");return t==="."||t.startsWith("./")?(0,Qn.normalizePath)(((i=e==null?void 0:e.parent)!=null?i:this.app.vault.getRoot()).path+"/"+t.slice(1)):(0,Qn.normalizePath)(t)}absolutePathToFileUri(e){return e=e.replace(/\\/g,"/").replace(/ /g,"%20"),"file://"+(e.startsWith("/")?"":"/")+e}isUriPdf(e){return this.settings.externalURIPatterns.map(t=>new RegExp(t)).some(t=>t.test(e))}};var gf=class{constructor(e){this.utils=Tg;this.PDFCroppedEmbed=Jr;this.PDFOutlines=Ge;this.NameTree=wa;this.NumberTree=Wr;this.PDFNamedDestinations=Pa;this.PDFPageLabels=Ui;this.app=e.app,this.plugin=e,this.commands=new cf(e),this.copyLink=new Qu(e),this.highlight=new sf(e),this.workspace=new af(e),this.composer=new df(e),this.dummyFileManager=new pf(e),this.speech=new ff(e)}registerPDFEvent(e,t,i,r){let o=async s=>{await r(s),i||t.off(e,o)};i==null||i.register(()=>t.off(e,o)),t.on(e,o)}onPageReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{i(s+1,o,!1)}),this.registerPDFEvent("pagerendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}onTextLayerReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{o.textLayer&&i(s+1,o,!1)}),this.registerPDFEvent("textlayerrendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}onAnnotationLayerReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{o.annotationLayer&&i(s+1,o,!1)}),this.registerPDFEvent("annotationlayerrendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}applyPDFViewStateToViewer(e,t){let i=()=>{typeof t.left=="number"&&typeof t.top=="number"&&typeof t.zoom=="number"?e.scrollPageIntoView({pageNumber:t.page,destArray:[t.page,{name:"XYZ"},t.left,t.top,t.zoom]}):e.currentPageNumber=t.page};e.pagesCount?i():this.registerPDFEvent("pagesloaded",e.eventBus,null,()=>i())}getPageElAssociatedWithNode(e){let t=e.instanceOf(HTMLElement)?e:e.parentElement;if(!t)return null;let i=t.closest(".page");return!i||!i.instanceOf(HTMLElement)?null:i}getPageElFromSelection(e){let t=e.rangeCount>0?e.getRangeAt(0):null;return t?this.getPageElAssociatedWithNode(t.startContainer):null}getPageElFromEvent(e){return qc(e,e.target)?this.getPageElAssociatedWithNode(e.target):null}getPageNumberFromEvent(e){let t=this.getPageElFromEvent(e),i=t==null?void 0:t.dataset.pageNumber;return i===void 0?null:+i}getToolbarAssociatedWithNode(e){let t=e.instanceOf(HTMLElement)?e:e.parentElement;if(!t)return null;let i=t.closest(".pdf-container"),r=i==null?void 0:i.previousElementSibling;return r&&r.hasClass("pdf-toolbar")?r:null}getToolbarAssociatedWithSelection(){let e=activeWindow.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0);return this.getToolbarAssociatedWithNode(t.startContainer)}return null}getColorPalette(){var t;let e=(t=this.getPDFViewerChild(!0))!=null?t:this.plugin.lastAnnotationPopupChild;return e?this.getColorPaletteFromChild(e):this.getColorPaletteAssociatedWithSelection()}getColorPaletteOptions(){let e=this.getColorPalette();if(e)return e.getState();let t=this.plugin.settings;return{selectedColorName:[null,...Object.keys(t.colors)][t.defaultColorPaletteItemIndex],actionIndex:t.defaultColorPaletteActionIndex,displayTextFormatIndex:t.defaultDisplayTextFormatIndex,writeFile:t.defaultWriteFileToggle}}getColorPaletteAssociatedWithNode(e){var r;let t=this.getToolbarAssociatedWithNode(e);if(!t)return null;let i=t.querySelector("."+ti.CLS);return i&&(r=ti.elInstanceMap.get(i))!=null?r:null}getColorPaletteAssociatedWithSelection(){let e=activeWindow.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0);return this.getColorPaletteAssociatedWithNode(t.startContainer)}return null}getColorPaletteFromChild(e){var i;let t=(i=e.pdfViewer.dom)==null?void 0:i.viewerEl;return t?this.getColorPaletteAssociatedWithNode(t):null}getColorPaletteContainedIn(e){for(let[t,i]of ti.elInstanceMap)if(e.contains(t))return i;return null}getPDFViewerChildAssociatedWithNode(e){let t,i=e.instanceOf(HTMLElement)?e:e.parentElement;if(i){let r=i.closest(".pdf-container");r&&(t=this.plugin.pdfViewerChildren.get(r))}return t||this.workspace.iteratePDFViewerChild(r=>{!t&&r.containerEl.contains(e)&&(t=r)}),t!=null?t:null}getPDFViewerChildFromSelection(e){let t=e.rangeCount>0?e.getRangeAt(0):null;return t?this.getPDFViewerChildAssociatedWithNode(t.startContainer):null}async destIdToSubpath(e,t){let i=await t.getDestination(e);return i?this.pdfJsDestArrayToSubpath(i,t):null}async pdfJsDestArrayToSubpath(e,t){let i=await t.getPageIndex(e[0]);return this.destArrayToSubpath(this.normalizePDFJsDestArray(e,i+1))}normalizePDFJsDestArray(e,t){return[t-1,e[1].name,...e.slice(2)]}normalizePdfLibDestArray(e,t){let i=e.get(0);if(!(i instanceof Y))return null;let r=t.getPages().findIndex(s=>s.ref===i);if(r===-1)return null;let o=e.get(1);return o instanceof v?[r,o.decodeText(),...e.asArray().slice(2).map
Line truncated
|
||||
`))}isEditable(e){return this.plugin.settings.enablePDFEdit&&!e.isFileExternal}requirePluginVersion(e,t){let i=this.app.plugins.plugins[e];if(!i)return!1;let r=i.manifest.version;return r===t||pa(r,t)}requirePluginNewerThan(e,t){let i=this.app.plugins.plugins[e];if(!i)return!1;let r=i.manifest.version;return pa(r,t)}onDocumentReady(e,t){if(e.pdfLoadingTask){e.pdfLoadingTask.promise.then(i=>t(i));return}e.pdfPlusCallbacksOnDocumentLoaded||(e.pdfPlusCallbacksOnDocumentLoaded=[]),e.pdfPlusCallbacksOnDocumentLoaded.push(t)}toSingleLine(e){return Yc(e,this.plugin.settings.removeWhitespaceBetweenCJChars)}async write(e,t,i){let r=this.app.vault.getAbstractFileByPath(e);if(r instanceof ve.TFile)return i||new ve.Notice(`${this.plugin.manifest.name}: File already exists: ${e}`),typeof t=="string"?await this.app.vault.modify(r,t):await this.app.vault.modifyBinary(r,t),r;if(r===null){let o=(0,ve.normalizePath)(e.split("/").slice(0,-1).join("/"));return o&&(this.app.vault.getAbstractFileByPath(o)||await this.app.vault.createFolder(o)),typeof t=="string"?await this.app.vault.create(e,t):await this.app.vault.createBinary(e,t)}return null}isCitationId(e){return typeof e=="string"&&this.plugin.citationIdRegex.test(e)}async checkForUpdates(e){var u,p;let{result:t,error:i}=await OC((0,ve.requestUrl)({url:"https://api.github.com/repos/ryotaushio/obsidian-pdf-plus/releases?per_page=10&page=1",headers:{accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}}));if(i||t.status!==200)return i&&console.error(i),{success:!1,shouldUpdate:!1,detail:"Failed to connect to GitHub to check for updates."};let{result:r,error:o}=BC(()=>t.json);if(o)return console.error(o),{success:!1,shouldUpdate:!1,detail:"Failed to parse JSON releases from GitHub."};if(!Array.isArray(r)||r.length===0)return{success:!1,shouldUpdate:!1,detail:"No releases found on GitHub."};r.sort((f,m)=>new Date(m.published_at).getTime()-new Date(f.published_at).getTime());let s=(u=e==null?void 0:e.currentVersion)!=null?u:this.plugin.manifest.version,a=r.filter(f=>!f.prerelease&&!f.draft&&pa(f.tag_name,s));if(a.length===0)return{success:!0,shouldUpdate:!1,detail:"Already up-to-date."};if(a.some(f=>{let m=f.body.split(`
|
||||
`)[0];return/^\s*<!--\s*important\s*-->\s*$/.test(m)}))return{success:!0,shouldUpdate:!0,detail:"There is a newer version that should be updated to immediately."};let l=a.last(),d=(new Date().getTime()-new Date(l.published_at).getTime())/(1e3*60*60),h=(p=e==null?void 0:e.minHoursSinceRelease)!=null?p:24;return d<h?{success:!0,shouldUpdate:!1,detail:`There is a newer version, but it was released less than ${h} hours ago.`}:{success:!0,shouldUpdate:!0,detail:`There is a newer version released ${d.toFixed(1)} hours ago.`}}};function BC(n){try{return{result:n(),error:null}}catch(e){return{result:null,error:e}}}async function OC(n){try{return{result:await n,error:null}}catch(e){return{result:null,error:e}}}var p1=require("obsidian");var mf=class extends ke{constructor(e){if(super(e),this.settings.autoCopyToggleRibbonIcon){let t=!1;this.iconEl=e.settings.autoCopyToggleRibbonIcon?e.addRibbonIcon(this.settings.autoCopyIconName,`${e.manifest.name}: Toggle auto-copy`,()=>{t||this.toggle()}):null,this.iconEl&&this.registerDomEvent(this.iconEl,"contextmenu",i=>{if(t)return;let r=new p1.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("auto-copy")})}),r.onHide(()=>{t=!1}),r.showAtMouseEvent(i),t=!0})}}toggle(e){e=e!=null?e:!this.settings.autoCopy,e?this.enable():this.disable()}enable(){this.settings.autoCopy=!0,this.plugin.saveSettings(),this.load()}disable(){this.settings.autoCopy=!1,this.plugin.saveSettings(),this.unload()}onload(){var e;(e=this.iconEl)==null||e.addClass("is-active")}onunload(){var e;(e=this.iconEl)==null||e.removeClass("is-active")}};var g1=require("obsidian");var xf=class extends ke{constructor(e){super(e),this.styleEl=e.registerEl(createEl("style",{attr:{id:"pdf-plus-style"}})),document.head.append(this.styleEl)}update(){this.unload(),this.plugin.removeChild(this),this.plugin.addChild(this)}registerEl(e){return this.register(()=>e.remove()),e}onload(){this.plugin.trigger("update-dom"),this.updateStyleEl(),this.updateClass("pdf-plus-click-embed-to-open-link",this.settings.dblclickEmbedToOpenLink),this.updateClass("pdf-plus-backlink-selection-highlight",this.settings.selectionBacklinkVisualizeStyle==="highlight"),this.updateClass("pdf-plus-backlink-selection-underline",this.settings.selectionBacklinkVisualizeStyle==="underline"),this.app.workspace.trigger("css-change")}updateClass(e,t){document.body.toggleClass(e,t),this.register(()=>document.body.removeClass(e))}updateStyleEl(){let e=this.plugin.settings;this.styleEl.textContent=Object.entries(e.colors).map(([r,o])=>cn(o)?[`.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color="${r.toLowerCase()}"],`,`.pdf-embed[data-highlight-color="${r.toLowerCase()}"] .textLayer .mod-focused {`,` --pdf-plus-color: ${o};`,` --pdf-plus-backlink-icon-color: ${o};`,` --pdf-plus-rect-color: ${o};`,"}"].join(`
|
||||
`):"").join(`
|
||||
`);let t=e.colors[e.defaultColor];(!t||!cn(t))&&(t="rgb(var(--text-highlight-bg-rgb))"),this.styleEl.textContent+=[`
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight) {`,` --pdf-plus-color: ${t};`,` --pdf-plus-backlink-icon-color: ${t};`,` --pdf-plus-rect-color: ${t};`,"}"].join(`
|
||||
`);let i=e.colors[e.backlinkHoverColor];(!i||!cn(i))&&(i=Mw),this.styleEl.textContent+=[`
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.hovered-highlight {`,` --pdf-plus-color: ${i};`,` --pdf-plus-backlink-icon-color: ${i};`,` --pdf-plus-rect-color: ${i};`,"}"].join(`
|
||||
`);for(let[r,o]of Object.entries(e.colors))cn(o)&&(this.styleEl.textContent+=[`
|
||||
.${ti.CLS}-item[data-highlight-color="${r.toLowerCase()}"] > .${ti.CLS}-item-inner {`,` background-color: ${o};`,"}"].join(`
|
||||
`));this.styleEl.textContent+=[`
|
||||
.${ti.CLS}-item:not([data-highlight-color]) > .${ti.CLS}-item-inner {`," background-color: transparent;","}"].join(`
|
||||
`),this.styleEl.textContent+=[`
|
||||
.workspace-leaf.pdf-plus-link-opened.is-highlighted::before {`,` opacity: ${e.existingTabHighlightOpacity};`,"}"].join(`
|
||||
`),this.setCSSColorVariables(),this.updateCalloutStyle()}updateCalloutStyle(){var i;if(!this.plugin.settings.useCallout)return;let e=this.plugin.settings.calloutType.toLowerCase();for(let r of Object.keys(this.plugin.settings.colors)){let o=(i=this.toCSSVariableName(r))!=null?i:"--pdf-plus-default-color-rgb";this.styleEl.textContent+=[`
|
||||
.callout[data-callout="${e}"][data-callout-metadata="${r.toLowerCase()}"] {`,` --callout-color: var(${o});`," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(`
|
||||
`)}this.styleEl.textContent+=[`
|
||||
.callout[data-callout="${e}"] {`," --callout-color: var(--pdf-plus-default-color-rgb);"," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(`
|
||||
`);let t=this.plugin.settings.calloutIcon;t?this.styleEl.textContent+=[`
|
||||
.callout[data-callout="${e}"] {`,` --callout-icon: lucide-${t};`,"}"].join(`
|
||||
`):this.styleEl.textContent+=[`
|
||||
.callout[data-callout="${e}"] .callout-icon {`," display: none;","}"].join(`
|
||||
`)}registerCalloutRenderer(){let e=this.plugin.settings.calloutType.toLowerCase();this.plugin.registerMarkdownPostProcessor((t,i)=>{for(let r of t.querySelectorAll(`.callout[data-callout="${e}"][data-callout-metadata*=","]`))i.addChild(new lm(r))})}setCSSColorVariables(){let e=this.plugin.settings;for(let[i,r]of Object.entries(e.colors)){let o=this.toCSSVariableName(i),s=Mr(r);if(o!==null&&s!==null){let{r:a,g:c,b:l}=s;this.styleEl.textContent+=[`
|
||||
body {`,` ${o}: ${a}, ${c}, ${l}`,"}"].join(`
|
||||
`)}}let t=!1;if(e.defaultColor in e.colors){let i=this.toCSSVariableName(e.defaultColor);i!==null&&(this.styleEl.textContent+=[`
|
||||
body {`,` --pdf-plus-default-color-rgb: var(${i})`,"}"].join(`
|
||||
`),t=!0)}t||(this.styleEl.textContent+=[`
|
||||
body {`," --pdf-plus-default-color-rgb: var(--text-highlight-bg-rgb)","}"].join(`
|
||||
`))}toCSSVariableName(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-");return t=t.replace(/^-+|-+$/g,""),t?"--pdf-plus-"+t+"-rgb":null}getRgb(e){let t="--pdf-plus-default-color-rgb";if(e){let o=this.toCSSVariableName(e);o&&(t=o)}let i=getComputedStyle(document.body).getPropertyValue(t);return eg(i)}},lm=class extends g1.MarkdownRenderChild{onload(){let e=this.containerEl.dataset.calloutMetadata;if(e){let t=e.split(",").map(r=>parseInt(r));t.length===3&&t.every(r=>0<=r&&r<=255)&&this.containerEl.style.setProperty("--callout-color",t.join(", "))}}};var bf=class extends we.Plugin{constructor(){super(...arguments);this.lib=new gf(this);this.events=new we.Events;this.autoFocusToggleIconEl=null;this.autoPasteToggleIconEl=null;this.patchStatus={workspace:!1,pagePreview:!1,pdfView:!1,pdfInternals:!1,pdfOutlineViewer:!1,backlink:!1};this.classes={};this.lastPasteFile=null;this.lastActiveMarkdownFile=null;this.lastAnnotationPopupChild=null;this.lastCopiedDestInfo=null;this.vimrc=null;this.pdfViewerChildren=new Map;this.shownMenus=new Set;this.requiresDataviewInlineFieldsMigration=!1;this.isDebugMode=!1}async onload(){this.checkVersion(),this.addIcons(),await(0,we.loadPdfJs)(),await this.loadSettings(),await this.saveSettings(),this.domManager=this.addChild(new xf(this)),this.domManager.registerCalloutRenderer(),this.registerRibbonIcons(),this.patchObsidian(),this.registerPDFEmbedCreator(),this.registerHoverLinkSources(),this.registerCommands(),this.registerGlobalVariables(),this.registerEvents(),this.startTrackingActiveMarkdownFile(),this.registerObsidianProtocolHandler("pdf-plus",this.obsidianProtocolHandler.bind(this)),this.addSettingTab(this.settingTab=new Lu(this)),this.registerStyleSettings(),this.checkDeprecatedSettings(),this.checkDataviewInlineFields(),this.registerAutoCheckForUpdates()}async onunload(){await this.cleanUpResources()}async cleanUpResources(){await this.cleanUpAnystyleFiles()}async cleanUpAnystyleFiles(){let t=this.app.vault.adapter;if(we.Platform.isDesktopApp&&t instanceof we.FileSystemAdapter){let i=this.getAnyStyleInputDir();if(i)try{await t.rmdir(i,!0)}catch(r){if(r.code!=="ENOENT")throw r}}}checkVersion(){this.textDivFirstIdx=we.apiVersion==="1.8.0"?1:0,this.obsidianHasFocusBug=!(0,we.requireApiVersion)("1.9.0"),this.obsidianHasTextSelectionBug=(0,we.requireApiVersion)("1.9.0"),Da.openIfNecessary(this)}addIcons(){(0,we.addIcon)("vim",'<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial" font-size="48" fill="currentColor" style="letter-spacing:2; font-weight:bold;">VIM</text>')}getDefaultSettings(){return structuredClone(Jn)}async restoreDefaultSettings(){this.settings=this.getDefaultSettings(),await this.saveSettings()}async loadSettings(){if(this.settings=Object.assign(this.getDefaultSettings(),await this.loadData()),this.setCitationIdRegex(),!this.settings.anystylePath){let t=this.loadLocalStorage("anystylePath");typeof t=="string"&&(this.settings.anystylePath=t)}(this.settings.defaultDisplayTextFormatIndex<0||this.settings.defaultDisplayTextFormatIndex>=this.settings.displayTextFormats.length)&&(this.settings.defaultDisplayTextFormatIndex=0),(this.settings.defaultColorPaletteActionIndex<0||this.settings.defaultColorPaletteActionIndex>=this.settings.copyCommands.length)&&(this.settings.defaultColorPaletteActionIndex=0),this.validateAutoFocusAndAutoPasteSettings();for(let[t,i]of Object.entries(this.settings.colors))this.settings.colors[t]=i.toLowerCase();this.settings.paneTypeForFirstMDLeaf==="split"&&(this.settings.paneTypeForFirstMDLeaf="right");for(let t of this.settings.copyCommands)t.hasOwnProperty("format")&&(t.template=t.format,delete t.format);if(this.settings.hasOwnProperty("aliasFormat")&&(this.settings.displayTextFormats.push({name:"Custom",template:this.settings.aliasFormat}),delete this.settings.aliasFormat),this.settings.hasOwnProperty("showCopyLinkToSearchInContextMenu")){let t=this.settings.contextMenuConfig.find(({id:i})=>i==="search");t&&t.visible&&(t.visible=this.settings.showCopyLinkToSearchInContextMenu),delete this.settings.showCopyLinkToSearchInContextMenu}this.settings.showContextMenuOnMouseUpIf==="mod"&&(this.settings.showContextMenuOnMouseUpIf="Mod"),this.settings.enableEditEncryptedPDF=!1,this.renameSetting("enalbeWriteHighlightToFile","enablePDFEdit"),this.renameSetting("selectToCopyToggleRibbonIcon","autoCopyToggleRibbonIcon"),this.renameCommand("pdf-plus:toggle-select-to-copy",`${this.manifest.id}:toggle-auto-copy`),this.renameSetting("removeWhitespaceBetweenCJKChars","removeWhitespaceBetweenCJChars"),this.loadContextMenuConfig()}renameSetting(t,i){this.settings.hasOwnProperty(t)&&(this.settings[i]=this.settings[t],delete this.settings[t])}renameCommand(t,i){let{hotkeyManager:r}=this.app,o=r.getHotkeys(t);o&&(r.removeHotkeys(t),r.setHotkeys(i,o))}loadContextMenuConfig(){let t=this.getDefaultSettings().contextMenuConfig,i=[];for(let r of t){let o=this.settings.contextMenuConfig.find(({id:s})=>s===r.id);i.push(o!=null?o:
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
crypto-js/ripemd160.js:
|
||||
(** @preserve
|
||||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*)
|
||||
|
||||
crypto-js/mode-ctr-gladman.js:
|
||||
(** @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*)
|
||||
*/
|
||||
|
||||
/* nosourcemap */
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "pdf-plus",
|
||||
"name": "PDF++",
|
||||
"version": "0.40.31",
|
||||
"minAppVersion": "1.5.8",
|
||||
"description": "The most Obsidian-native PDF annotation tool ever.",
|
||||
"author": "Ryota Ushio",
|
||||
"authorUrl": "https://github.com/RyotaUshio",
|
||||
"fundingUrl": {
|
||||
"GitHub Sponsor": "https://github.com/sponsors/RyotaUshio",
|
||||
"Buy Me a Coffee": "https://www.buymeacoffee.com/ryotaushio",
|
||||
"Ko-fi": "https://ko-fi.com/ryotaushio"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+694
@@ -0,0 +1,694 @@
|
||||
/* @settings
|
||||
|
||||
name: PDF++
|
||||
id: pdf-plus
|
||||
settings:
|
||||
-
|
||||
id: pdf-highlight
|
||||
title: Highlights
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-highlight-opacity
|
||||
title: Highlight opacity
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.2
|
||||
-
|
||||
id: pdf-plus-highlight-padding-vertical-em
|
||||
title: Highlight padding (top & bottom)
|
||||
description: Boldness of highlights (em)
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.05
|
||||
format: em
|
||||
-
|
||||
id: pdf-plus-highlight-padding-horizontal-em
|
||||
title: Highlight padding (left & right)
|
||||
description: Boldness of highlights (em)
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.05
|
||||
format: em
|
||||
-
|
||||
id: pdf-plus-highlight-border-radius
|
||||
title: Highlight edge roundness
|
||||
description: Radius of the highlight edge (em). 0 for sharp edges and 0.5 for rounded edges.
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 0.5
|
||||
step: 0.01
|
||||
default: 0.1
|
||||
format: em
|
||||
-
|
||||
id: pdf-rect
|
||||
title: Rectanglular selection
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-rect-highlight-opacity
|
||||
title: Rectangle highlight opacity
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 1
|
||||
-
|
||||
id: pdf-plus-rect-highlight-border-width
|
||||
title: Rectangle highlight border width (px)
|
||||
type: variable-number-slider
|
||||
min: 1
|
||||
max: 10
|
||||
step: 1
|
||||
default: 2
|
||||
format: px
|
||||
-
|
||||
id: hover-popover
|
||||
title: Hover popovers
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-backlink-popover
|
||||
title: Backlink popovers
|
||||
description: Styles for popovers displayed when hovering over backlinked highlights or rectangular selections in PDF viewer
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-backlink-popover-width
|
||||
title: Backlink popover width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 450
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-backlink-popover-height
|
||||
title: Backlink popover height (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 400
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover
|
||||
title: PDF internal link popovers
|
||||
description: Styles for popovers displayed when hovering over internal links, outline items or thumbnails in PDF viewer
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover-width
|
||||
title: PDF internal link popover width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 450
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover-height
|
||||
title: PDF internal link popover height (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 400
|
||||
format: px
|
||||
-
|
||||
id: pdf-toolbar
|
||||
title: PDF toolbars
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: hide-pdf-embed-toolbar
|
||||
title: Hide toolbar in PDF embeds with a page specified
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: hide-pdf-toolbar-in-hover-editor
|
||||
title: Hide PDF toolbar in Hover Editor
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: pdf-sidebar
|
||||
title: PDF sidebars
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-sidebar-width
|
||||
title: Sidebar width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 140
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-vim
|
||||
title: Vim keybindings
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-vim-hin
|
||||
title: Hint mode
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-vim-hint-inverted
|
||||
title: Inverted color scheme
|
||||
type: class-toggle
|
||||
default: false
|
||||
*/
|
||||
|
||||
:root {
|
||||
--pdf-plus-highlight-padding-default-em: 0.05em;
|
||||
}
|
||||
|
||||
.hide-pdf-embed-toolbar .pdf-embed[src*="#"] .pdf-toolbar,
|
||||
.hide-pdf-embed-toolbar .popover.hover-popover.hover-editor .pdf-embed[src*="#"] .pdf-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide-pdf-toolbar-in-hover-editor .popover.hover-popover.hover-editor .view-content>.pdf-toolbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* When hovering over a highlighted text in PDF viewer, highlight the corresponding item in backlink pane */
|
||||
.backlink-pane .search-result-file-match.hovered-backlink,
|
||||
.backlink-pane .search-result-file-matches:has(.better-search-views-tree) .better-search-views-file-match.hovered-backlink:not(:hover) {
|
||||
background-color: var(--text-selection);
|
||||
}
|
||||
|
||||
.setting-item.no-border,
|
||||
.pdf-plus-settings.vertical-tab-content .setting-item.no-border {
|
||||
border-top: none;
|
||||
|
||||
&.small-padding {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item-control input.error {
|
||||
border-color: var(--background-modifier-error);
|
||||
}
|
||||
|
||||
.setting-item-description.error {
|
||||
color: var(--background-modifier-error);
|
||||
}
|
||||
|
||||
.is-mobile,
|
||||
.is-tablet {
|
||||
.pdf-plus-color-palette .pdf-plus-color-palette-item-inner {
|
||||
width: calc(var(--swatch-width) * 0.85);
|
||||
height: calc(var(--swatch-width) * 0.85);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-color-palette {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.pdf-plus-color-palette-item {
|
||||
/* Avoid text selections to be cleared when tapping on a color palette item on the mobile app */
|
||||
/* https://github.com/RyotaUshio/obsidian-pdf-plus/issues/169 */
|
||||
user-select: none;
|
||||
|
||||
.pdf-plus-color-palette-item-inner {
|
||||
width: var(--swatch-width);
|
||||
height: var(--swatch-width);
|
||||
border-radius: 50%;
|
||||
border: var(--input-border-width) solid var(--background-modifier-border);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-color-palette-status-container {
|
||||
padding: var(--size-2-2) var(--size-2-3);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-ui-small);
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.menu .menu-item.pdf-plus-color-menu-item {
|
||||
padding-left: 0;
|
||||
|
||||
.pdf-plus-color-indicator {
|
||||
border-radius: 50%;
|
||||
border-width: 0;
|
||||
height: var(--size-4-3);
|
||||
width: var(--size-4-3);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-toolbar .clickable-icon.is-disabled {
|
||||
background-color: inherit;
|
||||
|
||||
&>svg {
|
||||
color: var(--text-faint);
|
||||
}
|
||||
}
|
||||
|
||||
/* .pdf-page-input, */
|
||||
.pdf-zoom-level-input {
|
||||
width: 6ch;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pdf-zoom-level-percent {
|
||||
white-space: nowrap;
|
||||
margin-right: var(--size-4-1);
|
||||
font-size: var(--font-ui-small);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content {
|
||||
--pdf-plus-settings-header-height: var(--size-4-12);
|
||||
|
||||
padding-top: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .header-container {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
height: var(--pdf-plus-settings-header-height);
|
||||
line-height: var(--pdf-plus-settings-header-height);
|
||||
text-align: center;
|
||||
background-color: var(--background-secondary);
|
||||
border-bottom: 1px solid var(--divider-color);
|
||||
padding: 0 var(--size-4-4);
|
||||
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.header {
|
||||
line-height: normal;
|
||||
|
||||
.header-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .content {
|
||||
padding-top: var(--size-4-8);
|
||||
padding-bottom: var(--size-4-16);
|
||||
padding-left: var(--size-4-12);
|
||||
padding-right: var(--size-4-12);
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .spacer {
|
||||
height: var(--pdf-plus-settings-header-height);
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .top-note {
|
||||
min-height: var(--pdf-plus-settings-header-height);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-ui-smaller);
|
||||
}
|
||||
|
||||
.pdf-plus-settings .setting-item-description,
|
||||
.pdf-plus-modal .setting-item-description {
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-settings .ignore-split-setting.setting-item {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.annotationLayer .popupContent {
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink {
|
||||
position: absolute;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
box-sizing: content-box;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .rect-highlight {
|
||||
background-color: rgb(var(--text-highlight-bg-rgb));
|
||||
border-radius: var(--radius-m);
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
body:not(.pdf-plus-backlink-selection-underline) .pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
background-color: rgb(from var(--pdf-plus-color) r g b / var(--pdf-plus-highlight-opacity, 0.2));
|
||||
padding: var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em));
|
||||
margin: calc(var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) * -1) calc(var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em)) * -1);
|
||||
border-radius: var(--pdf-plus-highlight-border-radius, 0.1em);
|
||||
}
|
||||
|
||||
body.pdf-plus-backlink-selection-underline {
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
opacity: 1.0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="0"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-bottom: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="90"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-right: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="180"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-top: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="270"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-left: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-fit-r {
|
||||
border: dashed rgb(from var(--pdf-plus-rect-color) r g b / var(--pdf-plus-rect-highlight-opacity, 1)) var(--pdf-plus-rect-highlight-border-width, 2px);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-icon {
|
||||
position: absolute;
|
||||
--icon-size: 100%;
|
||||
}
|
||||
|
||||
[data-main-rotation="90"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
[data-main-rotation="180"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
[data-main-rotation="270"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-edit-modal {
|
||||
.desc {
|
||||
margin-bottom: var(--size-4-4);
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
background: var(--background-modifier-form-field);
|
||||
border: var(--input-border-width) solid var(--background-modifier-border);
|
||||
border-radius: var(--input-radius);
|
||||
padding: var(--size-4-1) var(--size-4-2);
|
||||
text-align: left;
|
||||
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Arrange two children of .setting-item, namely .setting-item-info and .setting-item-contrl, vertically */
|
||||
.setting-item:last-child:has(textarea) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: left;
|
||||
align-items: flex-start;
|
||||
|
||||
.setting-item-control {
|
||||
width: 100%;
|
||||
padding-top: var(--size-4-2);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-edit-modal-save-instructions {
|
||||
color: var(--text-muted);
|
||||
font-size: calc(var(--font-text-size) * 0.65);
|
||||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
.popupWrapper {
|
||||
--pdf-popup-width: 310px;
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-icon-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
margin-right: calc(var(--size-4-1) * -1);
|
||||
margin-left: calc(var(--size-2-1) * -1);
|
||||
|
||||
.clickable-icon {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-draggable .popup {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#pdf-plus-funding {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: left;
|
||||
align-items: flex-end;
|
||||
|
||||
.setting-item-control {
|
||||
padding-top: var(--size-4-4);
|
||||
}
|
||||
}
|
||||
|
||||
#pdf-plus-funding-icon-info-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* justify-content: left; */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#pdf-plus-funding-icon {
|
||||
margin-right: var(--size-4-4);
|
||||
}
|
||||
|
||||
.page-label-range:first-of-type {
|
||||
margin-top: var(--size-4-4);
|
||||
}
|
||||
|
||||
.page-label-range:not(:first-of-type) {
|
||||
margin-top: var(--size-4-9);
|
||||
}
|
||||
|
||||
.pdf-plus-page-label-modal {
|
||||
z-index: var(--he-popover-layer-inactive, var(--layer-popover));
|
||||
|
||||
.page-labels-loading {
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
margin: var(--size-4-4);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-restore-default-modal {
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.pdf-content-container {
|
||||
--sidebar-width: var(--pdf-plus-sidebar-width, 140px);
|
||||
}
|
||||
|
||||
body {
|
||||
--container-pdf-cropped-width: var(--line-width);
|
||||
--container-pdf-cropped-max-width: var(--max-width);
|
||||
}
|
||||
|
||||
.internal-embed.pdf-cropped-embed {
|
||||
width: var(--container-pdf-cropped-width);
|
||||
max-width: var(--container-pdf-cropped-max-width);
|
||||
|
||||
img {
|
||||
cursor: text !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.popover.hover-popover>.pdf-cropped-embed img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.pdf-plus-selecting * {
|
||||
cursor: crosshair !important;
|
||||
|
||||
.textLayer {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-container .pdf-plus-select-box {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
border: dashed var(--background-modifier-border) 2px;
|
||||
background-color: hsla(var(--interactive-accent-hsl), 0.15);
|
||||
}
|
||||
|
||||
/* From Obsidian's app.css (.annotationLayer .mod-focused / .annotationLayer .boundingRect)*/
|
||||
.pdf-plus-annotation-bounding-rect {
|
||||
background-color: rgba(var(--text-highlight-bg-rgb), 0.1);
|
||||
border-radius: var(--radius-s);
|
||||
box-shadow: var(--shadow-s);
|
||||
box-sizing: content-box;
|
||||
margin: calc(var(--size-4-2) * -1);
|
||||
border: var(--size-4-1) solid rgba(var(--text-highlight-bg-rgb), 0.8);
|
||||
padding: var(--size-4-1);
|
||||
z-index: 0;
|
||||
/* Avoid preventing annotation click */
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-backlink-popover {
|
||||
--popover-width: var(--pdf-plus-backlink-popover-width, 450px);
|
||||
--popover-height: var(--pdf-plus-backlink-popover-height, 400px);
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-pdf-link-like-popover {
|
||||
--popover-pdf-width: var(--pdf-plus-pdf-link-like-popover-width, 450px);
|
||||
--popover-pdf-height: var(--pdf-plus-pdf-link-like-popover-height, 400px);
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-bib-popover {
|
||||
--popover-width: 400px;
|
||||
--pdf-plus-bib-metadata-font-size: var(--font-ui-small);
|
||||
|
||||
/* Workaround to prevent bib popovers from being covered by Hover Editor
|
||||
when the bib popover is spawned from a hover editor
|
||||
(https://github.com/RyotaUshio/obsidian-pdf-plus/issues/459).
|
||||
Hover Editor decides z-index based on --layer-slides, so we need to set a higher z-index. */
|
||||
z-index: calc(var(--layer-slides) + 1);
|
||||
|
||||
.pdf-plus-bib {
|
||||
padding: var(--size-4-3);
|
||||
font-size: var(--font-ui-medium);
|
||||
|
||||
/* Make text inside citation hover selectable (https://github.com/RyotaUshio/obsidian-pdf-plus/issues/252) */
|
||||
-moz-user-select: text;
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
|
||||
.bib-title {
|
||||
font-weight: bold;
|
||||
padding-bottom: var(--size-4-2);
|
||||
}
|
||||
|
||||
.bib-author-year {
|
||||
color: var(--text-muted);
|
||||
text-align: left;
|
||||
font-size: var(--pdf-plus-bib-metadata-font-size);
|
||||
}
|
||||
|
||||
.bib-container-title {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
text-align: left;
|
||||
font-size: var(--pdf-plus-bib-metadata-font-size);
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin-top: 1em;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--size-4-2);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-vim-command {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
/* height: var(--size-4-8); */
|
||||
font-family: monospace;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.page.pdf-plus-vim-hint-mode [data-pdf-plus-vim-hint]::after {
|
||||
content: attr(data-pdf-plus-vim-hint);
|
||||
color: var(--pdf-plus-vim-hint-color);
|
||||
text-transform: uppercase;
|
||||
font-size: var(--font-ui-medium);
|
||||
font-weight: bold;
|
||||
background-color: var(--pdf-plus-vim-hint-background-color);
|
||||
border: var(--size-2-1) solid hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
border-radius: 10%;
|
||||
padding: 0 var(--size-2-2);
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
body {
|
||||
--pdf-plus-vim-hint-color: var(--text-normal);
|
||||
--pdf-plus-vim-hint-background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
body.pdf-plus-vim-hint-inverted {
|
||||
--pdf-plus-vim-hint-color: var(--text-on-accent);
|
||||
--pdf-plus-vim-hint-background-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
}
|
||||
+36
-36
@@ -1,9 +1,45 @@
|
||||
{
|
||||
"recentFiles": [
|
||||
{
|
||||
"basename": "859期英语报",
|
||||
"path": "08-Inbox/公司文件/859期英语报.pdf"
|
||||
},
|
||||
{
|
||||
"basename": "中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版)",
|
||||
"path": "08-Inbox/公司文件/中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版).pdf"
|
||||
},
|
||||
{
|
||||
"basename": "2025-09-05",
|
||||
"path": "01-工作日记/2025-09-05.md"
|
||||
},
|
||||
{
|
||||
"basename": "未命名",
|
||||
"path": "未命名.canvas"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-03",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-03.md"
|
||||
},
|
||||
{
|
||||
"basename": "(5)韩信作战无人能比做人不能比人_长空星照_新浪博客",
|
||||
"path": "08-Inbox/(5)韩信作战无人能比做人不能比人_长空星照_新浪博客.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-07-04",
|
||||
"path": "08-Inbox/2025-07-04.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025年8月工作与技术实践总结",
|
||||
"path": "08-Inbox/2025年8月工作与技术实践总结.md"
|
||||
},
|
||||
{
|
||||
"basename": "当期文献速览",
|
||||
"path": "90-学习教程/99-黑曜石玩家指南/2-obsidian读文献/当期文献速览.md"
|
||||
},
|
||||
{
|
||||
"basename": "本章小结-恭喜习得内功",
|
||||
"path": "90-学习教程/99-黑曜石玩家指南/2-obsidian读文献/本章小结-恭喜习得内功.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-09 待办事宜",
|
||||
"path": "00-待办计划/2025-09 待办事宜.md"
|
||||
@@ -163,42 +199,6 @@
|
||||
{
|
||||
"basename": "August_Diary_Summary_Report@20250901_121407",
|
||||
"path": "60-Imports/64-AI/August_Diary_Summary_Report@20250901_121407.md"
|
||||
},
|
||||
{
|
||||
"basename": "八月工作学习总结@20250903_153656",
|
||||
"path": "60-Imports/64-AI/八月工作学习总结@20250903_153656.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-31",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-31.md"
|
||||
},
|
||||
{
|
||||
"basename": "每周小结",
|
||||
"path": "09-Templates/每周小结.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-04",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-04.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-03",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-03.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-02",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-02.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-01",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-01.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-29",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-29.md"
|
||||
},
|
||||
{
|
||||
"basename": "2025-08-30",
|
||||
"path": "80-日记归档/81-工作日记/202508/2025-08-30.md"
|
||||
}
|
||||
],
|
||||
"omittedPaths": [],
|
||||
|
||||
+4
-48
@@ -996,28 +996,6 @@
|
||||
"hash": "c56e8195398caf06c70e630623945284",
|
||||
"highlights": []
|
||||
},
|
||||
{
|
||||
"title": "派早报:杜比视界 2 标准公布等",
|
||||
"description": "瑞士推出开源大型语言模型 Apertus,ChatGPT 将引入家长控制功能等。<a href=\"https://sspai.com/post/102262\" target=\"_blank\">查看全文</a>",
|
||||
"content": "瑞士推出开源大型语言模型 Apertus,ChatGPT 将引入家长控制功能等。<a href=\"https://sspai.com/post/102262\" target=\"_blank\">查看全文</a>",
|
||||
"category": "",
|
||||
"link": "https://sspai.com/post/102262",
|
||||
"creator": "少数派编辑部",
|
||||
"pubDate": "Wed, 03 Sep 2025 07:45:00 +0800",
|
||||
"enclosure": "",
|
||||
"enclosureType": "",
|
||||
"image": "",
|
||||
"id": "",
|
||||
"language": "zh",
|
||||
"folder": "资讯",
|
||||
"feed": "少数派",
|
||||
"read": false,
|
||||
"favorite": false,
|
||||
"created": false,
|
||||
"tags": [],
|
||||
"hash": "c27713a3393ecc2023a0947529bac33f",
|
||||
"highlights": []
|
||||
},
|
||||
{
|
||||
"title": "打仗缺钱怎么办?宋朝皇帝:快让仪仗队的大象出去卖艺!",
|
||||
"description": "<div><div><div class=\"rich_media_content\" id=\"js_content\"><section style=\"margin: 0px 8px 8px; padding: 0px; white-space: normal; font-size: 16px; text-align: justify; line-height: 1.75em;\"><span><span style=\"font-size: 15px; color: rgb(136, 136, 136);\"><img class=\"rich_pages js_insertlocalimg wxw-img\" src=\"http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_gif/laADTC8BCK6M7Nv6wvsPyLPCsN7uraAJxdXiby5XB2BE6S0ulr9Fs213uZ85nlxAalcgRcLFiaSVdOVlrtCZRibIw/640?wx_fmt=gif\" style=\"margin-top: 0px; margin-right: 0px; margin-left: 0px; padding: 0px; vertical-align: bottom; height: auto !important;\" /></span></span></section><section style=\"margin: 0px 8px 8px; padding: 0px; white-space: normal; font-size: 16px; text-align: justify; line-height: 1.75em;\"><span><br /></span></section><section style=\"text-align: center;\"><img class=\"rich_pages wxw-img\" src=\"http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/laADTC8BCK5tkMtGyC0QvI9hRpfJRQnWdnVBX6rxY4PpaBs8sMXMK9SIIO5t0ZIVKUuAv570dfliaaiccZPPvlYA/640?wx_fmt=png&from=appmsg\" style=\"height: auto !important;\" type=\"block\" /></section><section style=\"margin: 0px 8px; padding: 0px; white-space: normal; text-align: center; line-height: 1.75em;\"><span><span><br /></span></span></section><section style=\"margin: 0px 8px; padding: 0px; white-space: normal; text-align: center; line-height: 1.75em;\"><span><span>本 文 约 3500字</span></span><span><br /></span></section><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px; white-space: normal;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px;\"><section style=\"margin: 0px; padding: 0px 8px; letter-spacing: 0.544px;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px;\"><section><span style=\"margin: 0px; padding: 0px; color: rgb(178, 178, 178); font-size: 12px; letter-spacing: 1px;\"><span>阅 读 需 要 12 分钟</span></span></section></section></section></section></section><p style=\"margin: 8px;\"><span><br /></span></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><span style=\"font-weight: normal;\">我们读范仲淹</span></span></font><font face=\"宋体\"><span><span style=\"font-weight: normal;\">“浊酒一杯家万里,燕然未勒归无计”,感受其戍边艰辛;看《杨家将》浴血抗辽、狄青征讨西夏,知其惨烈。但支撑前线“金戈铁马”的巨额军费从何而来?答案之一,竟藏在北宋皇家养象所的“门票”里!</span></span></font></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><br /></span></font></p><section style=\"text-align: center;\"><img class=\"rich_pages wxw-img\" src=\"http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/laADTC8BCK5tkMtGyC0QvI9hRpfJRQnWtb4qRgyFbT3dib3ibib074bupXd5dmiatIwNIUDyArObEbPplXwe287Mww/640?wx_fmt=jpeg\" style=\"width: 238px; height: auto !important;\" type=\"block\" /></section><p style=\"margin: 8px;\"><font face=\"宋体\"><span><br /></span></font><span><p></p></span></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><span style=\"font-weight: normal;\">当市民花几个铜板,争相围观东南亚进贡的珍稀大象表演跪拜、吼叫、驮人时,门票收入正涓涓流入国库。这些本该只在皇家典礼上露脸的</span></span></font><font face=\"宋体\"><span><span style=\"font-weight: normal;\">“祥瑞”,被逼转型“卖艺”,成了特殊的“筹款大使”。</span></span></font></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><br /></span></font><span><p></p></span></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><span style=\"font-weight: normal;\">一边是边疆烽火与财政重压,一边是皇家动物园里的萌兽</span></span></font><font face=\"宋体\"><span><span style=\"font-weight: normal;\">“营业”,北宋朝廷在困局中展现的务实与灵活,尽显于此。</span></span></font></p><p style=\"margin: 8px;\"><font face=\"宋体\"><span><br /></span></font></p><section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><img class=\"rich_pages wxw-img\" src=\"http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/laADTC8BCK5tkMtGyC0QvI9hRpfJRQnW6Jf77wXaKloLIRKmPGmOVv0rTicIW9uibuibYFUfGHjqT9qYgBuJPiaE1Q/640?wx_fmt=png&from=appmsg\" style=\"width: 382px; height: auto !important;\" type=\"block\" /></section><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px; white-space: normal;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px; white-space: normal;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px; white-space: normal;\"><section label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px;\"><section style=\"margin: 0px; padding:Line truncated
|
||||
@@ -2895,7 +2873,7 @@
|
||||
{
|
||||
"title": "有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂!",
|
||||
"description": "你是不是也想找一款功能齐全的免费办公工具?不想每处理一个需求,就要去找一个工具。 你是不是也经常为各种批量处理的场景而烦恼? 100 份 Word 批量添加页眉页脚、PDF 批量删除水印、批量进行格式转换……每一个需求,单个文件处理其实都很简单,但如果要处理大量的文件时,就往 ",
|
||||
"content": "\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1201\" height=\"523\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1.jpg\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 3\" class=\"wp-image-53609\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 3\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1.jpg 1201w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1-804x350.jpg 804w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" /></figure>\n\n\n\n<p>你是不是也想找一款功能齐全的免费办公工具?不想每处理一个需求,就要去找一个工具。</p>\n\n\n\n<p>你是不是也经常为各种批量处理的场景而烦恼?</p>\n\n\n\n<p><strong>100 份 Word 批量添加页眉页脚</strong>、<strong>PDF 批量删除水印</strong>、<strong>批量进行格式转换</strong>……每一个需求,单个文件处理其实都很简单,但如果要处理大量的文件时,就往往让人崩溃。</p>\n\n\n\n<p>今天青小蛙给大家推荐一款「<strong><a href=\"https://www.inxunoffice.com/\" target=\"_blank\" rel=\"noopener\">鹰迅批量处理工具箱</a></strong>」,就可以很好的解决这些问题。</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1055\" height=\"734\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/image001.avif\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 4\" class=\"wp-image-53613\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 4\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/image001.avif 1055w, https://do-cdn.appinn.com/static3/images/2025/09/image001-768x534.jpg 768w\" sizes=\"(max-width: 1055px) 100vw, 1055px\" /></figure></div>\n\n\n<h2 class=\"wp-block-heading\"><strong>推荐理由</strong></h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>功能超全,一个顶十。</strong></h3>\n\n\n\n<p>市面上很少有整合如此齐全的工具箱集合,大多数同类产品往往只提供单一的功能。</p>\n\n\n\n<p>它集齐了集Word工具、PDF工具、Excel工具、PPT工具、图片处理工具、文件重命名工具、文件整理工具、其他辅助工具9大工具于一体的<strong>超级工具箱</strong>,每一个工具下面都有非常多实用的功能。</p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>批量处理,效率飙升。</strong></h3>\n\n\n\n<p>它既可以处理单个文件,也可以同时批量处理几千份文件。</p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>所有功能都能免费使用</strong>。</h3>\n\n\n\n<p>不需要会员,就可以进行文件处理。免费版与会员版功能完全一致,唯一的区别就是免费版限制单次文件处理的数量,会员版没有任何限制。</p>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>支持离线处理。</strong></h3>\n\n\n\n<p>电脑没有网络,也能使用。是一款可以离线处理的办公效率神器。</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1450\" height=\"1008\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/image003-1.avif\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 5\" class=\"wp-image-53614\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 5\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/image003-1.avif 1450w, https://do-cdn.appinn.com/static3/images/2025/09/image003-1-768x534.jpg 768w\" sizes=\"(max-width: 1450px) 100vw, 1450px\" /><figcaption class=\"wp-element-caption\">「鹰迅办公」Word工具图</figcaption></figure></div>\n\n\n<h2 class=\"wp-block-heading\"><strong>点击访问「<a href=\"https://www.inxunoffice.com/\" target=\"_blank\" rel=\"noopener\">鹰迅批量处理工具箱</a>」官网</strong></h2>\n\n\n\n<p>鹰迅办公采用<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong>免费使用 + 增值付费</strong></mark>模式</p>\n\n\n\n<p>所有功能均可不限次数免费使用(每次最多同时处理5个文件)</p>\n\n\n\n<p><img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f447.png\" alt=\"👇\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /> 想要同时处理更多文件,需要会员 <img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f447.png\" alt=\"👇\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<h2Line truncated
|
||||
"content": "\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1201\" height=\"523\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1.jpg\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 4\" class=\"wp-image-53609\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 4\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1.jpg 1201w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-03T155159.180-1-804x350.jpg 804w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" /></figure>\n\n\n\n<p>你是不是也想找一款功能齐全的免费办公工具?不想每处理一个需求,就要去找一个工具。</p>\n\n\n\n<p>你是不是也经常为各种批量处理的场景而烦恼?</p>\n\n\n\n<p><strong>100 份 Word 批量添加页眉页脚</strong>、<strong>PDF 批量删除水印</strong>、<strong>批量进行格式转换</strong>……每一个需求,单个文件处理其实都很简单,但如果要处理大量的文件时,就往往让人崩溃。</p>\n\n\n\n<p>今天青小蛙给大家推荐一款「<strong><a href=\"https://www.inxunoffice.com/\" target=\"_blank\" rel=\"noopener\">鹰迅批量处理工具箱</a></strong>」,就可以很好的解决这些问题。</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1055\" height=\"734\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/image001.avif\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 5\" class=\"wp-image-53613\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 5\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/image001.avif 1055w, https://do-cdn.appinn.com/static3/images/2025/09/image001-768x534.jpg 768w\" sizes=\"(max-width: 1055px) 100vw, 1055px\" /></figure></div>\n\n\n<h2 class=\"wp-block-heading\"><strong>推荐理由</strong></h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>功能超全,一个顶十。</strong></h3>\n\n\n\n<p>市面上很少有整合如此齐全的工具箱集合,大多数同类产品往往只提供单一的功能。</p>\n\n\n\n<p>它集齐了集Word工具、PDF工具、Excel工具、PPT工具、图片处理工具、文件重命名工具、文件整理工具、其他辅助工具9大工具于一体的<strong>超级工具箱</strong>,每一个工具下面都有非常多实用的功能。</p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>批量处理,效率飙升。</strong></h3>\n\n\n\n<p>它既可以处理单个文件,也可以同时批量处理几千份文件。</p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>所有功能都能免费使用</strong>。</h3>\n\n\n\n<p>不需要会员,就可以进行文件处理。免费版与会员版功能完全一致,唯一的区别就是免费版限制单次文件处理的数量,会员版没有任何限制。</p>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>支持离线处理。</strong></h3>\n\n\n\n<p>电脑没有网络,也能使用。是一款可以离线处理的办公效率神器。</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1450\" height=\"1008\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/image003-1.avif\" alt=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 6\" class=\"wp-image-53614\" title=\"有了这款免费的「鹰迅办公」批量处理神器,效率直接开挂! 6\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/image003-1.avif 1450w, https://do-cdn.appinn.com/static3/images/2025/09/image003-1-768x534.jpg 768w\" sizes=\"(max-width: 1450px) 100vw, 1450px\" /><figcaption class=\"wp-element-caption\">「鹰迅办公」Word工具图</figcaption></figure></div>\n\n\n<h2 class=\"wp-block-heading\"><strong>点击访问「<a href=\"https://www.inxunoffice.com/\" target=\"_blank\" rel=\"noopener\">鹰迅批量处理工具箱</a>」官网</strong></h2>\n\n\n\n<p>鹰迅办公采用<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong>免费使用 + 增值付费</strong></mark>模式</p>\n\n\n\n<p>所有功能均可不限次数免费使用(每次最多同时处理5个文件)</p>\n\n\n\n<p><img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f447.png\" alt=\"👇\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /> 想要同时处理更多文件,需要会员 <img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f447.png\" alt=\"👇\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<h2Line truncated
|
||||
"category": "Windows",
|
||||
"link": "https://www.appinn.com/inxunoffice/",
|
||||
"creator": "青小蛙",
|
||||
@@ -2939,7 +2917,7 @@
|
||||
{
|
||||
"title": "精准离职倒计时 – 20秒算出离职日?打工人的包办跑路指南!",
|
||||
"description": "My Lastday 是一款精准离职倒计时应用(iPad、iPhone),它通过几个简单的灵魂拷问,只需要20秒就能帮你算出离职日。不止如此,还能写写离职日记,一定要选个好心情啊。为了防止你后悔,待办事项都是预先设计好的,跟着做,包离职的。@Appinn 感谢 @WQ 的推荐。 这个…挺 ",
|
||||
"content": "\n<p><strong>My Lastday</strong> 是一款<strong>精准离职倒计时应用</strong>(iPad、iPhone),它通过几个简单的灵魂拷问,只需要20秒就能帮你算出离职日。不止如此,还能写写离职日记,一定要选个好心情啊。为了防止你后悔,待办事项都是预先设计好的,跟着做,包离职的。@Appinn</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479.jpg\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 9\" class=\"wp-image-53628\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 9\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>感谢 @WQ 的推荐。</p>\n\n\n\n<p>这个…挺离谱的。</p>\n\n\n\n<p>青小蛙也不知道有没有用。</p>\n\n\n\n<p>不过,离职需谨慎啊、离职需谨慎啊、离职需谨慎啊</p>\n\n\n\n<p>先来看视频:</p>\n\n\n\n<div class=\"aspect-ratio\">\n<iframe src=\"//player.bilibili.com/player.html?isOutside=true&aid=115145036532248&bvid=BV16aaUzqEBR&cid=32152423679&p=1&autoplay=0\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"></iframe>\n</div>\n\n\n\n<h2 class=\"wp-block-heading\">精准离职倒计时</h2>\n\n\n\n<p>青小蛙尝试了一下,一共用了20秒钟,完成灵魂拷问之后,就获得了一个离职日期。</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"996\" height=\"1036\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 10\" class=\"wp-image-53629\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 10\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x.avif 996w, https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x-768x799.jpg 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" /></figure>\n\n\n\n<p>你可以把这个日期放到桌面小部件上,也能没事打开应用看看:</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"984\" height=\"1016\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 11\" class=\"wp-image-53630\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 11\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x.avif 984w, https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x-768x793.jpg 768w\" sizes=\"(max-width: 984px) 100vw, 984px\" /></figure>\n\n\n\n<p>当青小蛙把这个东西分享给正在离职的v同学看时,他指着「精准离职倒计时」说:</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"604\" height=\"342\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164553@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 12\" class=\"wp-image-53631\" style=\"width:412px;height:auto\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 12\"></figure></div>\n\n\n<p><img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f602.png\" alt=\"😂\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<p>离职日记是…没什么用的。正经人谁写日记啊。</p>\n\n\n\n<p>最有意思还是里面内置的离职待办:</p>\n\n\n\n<h2 class=\"wp-block-heading\">离职前必做的9件事</h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"492\" height=\"1016\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164406@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 13\" class=\"wp-image-53632\" style=\"width:390px;height:auto\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 13\"></figure></div>\n\n\n<p>开始青小蛙还以为是一个<a href=\"https://www.appinn.comLine truncated
|
||||
"content": "\n<p><strong>My Lastday</strong> 是一款<strong>精准离职倒计时应用</strong>(iPad、iPhone),它通过几个简单的灵魂拷问,只需要20秒就能帮你算出离职日。不止如此,还能写写离职日记,一定要选个好心情啊。为了防止你后悔,待办事项都是预先设计好的,跟着做,包离职的。@Appinn</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479.jpg\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 10\" class=\"wp-image-53628\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 10\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-04T162707.479-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>感谢 @WQ 的推荐。</p>\n\n\n\n<p>这个…挺离谱的。</p>\n\n\n\n<p>青小蛙也不知道有没有用。</p>\n\n\n\n<p>不过,离职需谨慎啊、离职需谨慎啊、离职需谨慎啊</p>\n\n\n\n<p>先来看视频:</p>\n\n\n\n<div class=\"aspect-ratio\">\n<iframe src=\"//player.bilibili.com/player.html?isOutside=true&aid=115145036532248&bvid=BV16aaUzqEBR&cid=32152423679&p=1&autoplay=0\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"></iframe>\n</div>\n\n\n\n<h2 class=\"wp-block-heading\">精准离职倒计时</h2>\n\n\n\n<p>青小蛙尝试了一下,一共用了20秒钟,完成灵魂拷问之后,就获得了一个离职日期。</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"996\" height=\"1036\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 11\" class=\"wp-image-53629\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 11\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x.avif 996w, https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164215@2x-768x799.jpg 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" /></figure>\n\n\n\n<p>你可以把这个日期放到桌面小部件上,也能没事打开应用看看:</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"984\" height=\"1016\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 12\" class=\"wp-image-53630\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 12\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x.avif 984w, https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164354@2x-768x793.jpg 768w\" sizes=\"(max-width: 984px) 100vw, 984px\" /></figure>\n\n\n\n<p>当青小蛙把这个东西分享给正在离职的v同学看时,他指着「精准离职倒计时」说:</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"604\" height=\"342\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164553@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 13\" class=\"wp-image-53631\" style=\"width:412px;height:auto\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 13\"></figure></div>\n\n\n<p><img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f602.png\" alt=\"😂\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<p>离职日记是…没什么用的。正经人谁写日记啊。</p>\n\n\n\n<p>最有意思还是里面内置的离职待办:</p>\n\n\n\n<h2 class=\"wp-block-heading\">离职前必做的9件事</h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"492\" height=\"1016\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250904164406@2x.avif\" alt=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 14\" class=\"wp-image-53632\" style=\"width:390px;height:auto\" title=\"精准离职倒计时 - 20秒算出离职日?打工人的包办跑路指南! 14\"></figure></div>\n\n\n<p>开始青小蛙还以为是一个<a href=\"https://www.appinn.cLine truncated
|
||||
"category": "iOS",
|
||||
"link": "https://www.appinn.com/my-lastday-for-ios/",
|
||||
"creator": "青小蛙",
|
||||
@@ -2983,7 +2961,7 @@
|
||||
{
|
||||
"title": "Rovo Dev CLI – 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token",
|
||||
"description": "Rovo Dev CLI 是一款与 Claude Code 功能类似的命令行 AI 开发者助手,可以在终端中帮你编程、修改代码。目前提供 Claude Sonnet 4、GPT-5 两种模型,每天免费 2000 万 Token。@Appinn 2025年9月3日更新,现在免费用户每天只有500万了。 ",
|
||||
"content": "\n<p><strong>Rovo Dev CLI</strong> 是一款与 Claude Code 功能类似的命令行 AI 开发者助手,可以在<a href=\"https://www.appinn.com/terminal-tty-and-shell/\" data-type=\"post\" data-id=\"53234\">终端</a>中帮你编程、修改代码。目前提供 Claude Sonnet 4、GPT-5 两种模型,<s>每天免费 2000 万 Token</s>。@<a href=\"https://www.appinn.com/rovo-dev-cli/\">Appinn</a></p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">2025年9月3日更新,现在免费用户每天只有500万了。</mark></p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098.jpg\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 16\" class=\"wp-image-53570\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 16\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>Rovo Dev CLI 是 Atlassian 推出工具,而 Atlassian 旗下拥有 Confluence、Jira、Bitbucket、Trello 等知名产品。</p>\n\n\n\n<p>目前的 Rovo Dev CLI 提供两种模型:Claude Sonnet 4、GPT-5</p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"722\" height=\"284\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250902140459@2x-2.avif\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 17\" class=\"wp-image-53571\" style=\"width:469px;height:auto\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 17\"></figure>\n\n\n\n<p>并且非常大方的提供每日 2000 万 Token,24小时重置一次:</p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"644\" height=\"494\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250902140614@2x.avif\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 18\" class=\"wp-image-53572\" style=\"width:470px;height:auto\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 18\"></figure>\n\n\n\n<h2 class=\"wp-block-heading\">注册 && 安装方式</h2>\n\n\n\n<p>步骤不少,跟着来就行。</p>\n\n\n\n<h3 class=\"wp-block-heading\">1. 注册 Atlassian 账号</h3>\n\n\n\n<p>在<a href=\"https://id.atlassian.com/login\" target=\"_blank\" rel=\"noopener\">官网注册</a>即可,如果你有 Confluence、Jira、Bitbucket、Trello 这些账号,那么直接登录就行,他们现在整合了一套登录界面。</p>\n\n\n\n<h3 class=\"wp-block-heading\">2. 安装 <strong>Rovo Dev CLI</strong></h3>\n\n\n\n<h4 class=\"wp-block-heading\">Windows</h4>\n\n\n\n<p>打开 PowerShell 安装:</p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# x86-64 架构\nInvoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_amd64/acli.exe" -OutFile acli.exe\n# ARM64 架构\nInvoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_arm64/acli.exe" -OutFile acli.exe\n\n# 验证安装是否成功\n.\\acli.exe --help\n\n# (可选)将 acli.exe 所在目录加入系统 PATH,便于全局调用\n# 控制面板 > 系统 > 高级系统设置 > 环境变量 > 在 Path 中添加目录路径\n# 添加后可直接使用\nacli.exe --help\n</pre></div>\n\n\n<h4 class=\"wp-block-heading\">macOS</h4>\n\n\n\n<p>在终端中运行:</p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# Intel 芯片\ncurl -LO "https://acli.atlassian.com/darwin/latest/acli_darwin_amd64/acli"\n\n# Apple Silicon 芯片\ncurl -LO "https://acli.atlassian.com/darwin/latest/acli_darwin_arm64/acli"\n\n# 设置权限并移动到系统 PATH 中\nchmod +x ./acli\n./acli --help\n\nsudo mv ./acli /usr/local/bin/acli\nsudo chown root: /usr/local/bin/acli\n\n# 验证\nacli --help \n</pre></div>\n\n\n<h4 class=\"wp-block-heading\">Linux</h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# x86-64 架构\ncurl -LO "https://acli.atlassian.com/linux/latest/acli_linux_amd64/acLine truncated
|
||||
"content": "\n<p><strong>Rovo Dev CLI</strong> 是一款与 Claude Code 功能类似的命令行 AI 开发者助手,可以在<a href=\"https://www.appinn.com/terminal-tty-and-shell/\" data-type=\"post\" data-id=\"53234\">终端</a>中帮你编程、修改代码。目前提供 Claude Sonnet 4、GPT-5 两种模型,<s>每天免费 2000 万 Token</s>。@<a href=\"https://www.appinn.com/rovo-dev-cli/\">Appinn</a></p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">2025年9月3日更新,现在免费用户每天只有500万了。</mark></p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098.jpg\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 17\" class=\"wp-image-53570\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 17\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/09/Copy-of-appinn-homework-2025-09-02T135819.098-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>Rovo Dev CLI 是 Atlassian 推出工具,而 Atlassian 旗下拥有 Confluence、Jira、Bitbucket、Trello 等知名产品。</p>\n\n\n\n<p>目前的 Rovo Dev CLI 提供两种模型:Claude Sonnet 4、GPT-5</p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"722\" height=\"284\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250902140459@2x-2.avif\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 18\" class=\"wp-image-53571\" style=\"width:469px;height:auto\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 18\"></figure>\n\n\n\n<p>并且非常大方的提供每日 2000 万 Token,24小时重置一次:</p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"644\" height=\"494\" src=\"https://do-cdn.appinn.com/static3/images/2025/09/Screen-20250902140614@2x.avif\" alt=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 19\" class=\"wp-image-53572\" style=\"width:470px;height:auto\" title=\"Rovo Dev CLI - 可使用 Claude Sonnet 4、GPT-5 的免费 Claude Code,每天 500 万 Token 19\"></figure>\n\n\n\n<h2 class=\"wp-block-heading\">注册 && 安装方式</h2>\n\n\n\n<p>步骤不少,跟着来就行。</p>\n\n\n\n<h3 class=\"wp-block-heading\">1. 注册 Atlassian 账号</h3>\n\n\n\n<p>在<a href=\"https://id.atlassian.com/login\" target=\"_blank\" rel=\"noopener\">官网注册</a>即可,如果你有 Confluence、Jira、Bitbucket、Trello 这些账号,那么直接登录就行,他们现在整合了一套登录界面。</p>\n\n\n\n<h3 class=\"wp-block-heading\">2. 安装 <strong>Rovo Dev CLI</strong></h3>\n\n\n\n<h4 class=\"wp-block-heading\">Windows</h4>\n\n\n\n<p>打开 PowerShell 安装:</p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# x86-64 架构\nInvoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_amd64/acli.exe" -OutFile acli.exe\n# ARM64 架构\nInvoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_arm64/acli.exe" -OutFile acli.exe\n\n# 验证安装是否成功\n.\\acli.exe --help\n\n# (可选)将 acli.exe 所在目录加入系统 PATH,便于全局调用\n# 控制面板 > 系统 > 高级系统设置 > 环境变量 > 在 Path 中添加目录路径\n# 添加后可直接使用\nacli.exe --help\n</pre></div>\n\n\n<h4 class=\"wp-block-heading\">macOS</h4>\n\n\n\n<p>在终端中运行:</p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# Intel 芯片\ncurl -LO "https://acli.atlassian.com/darwin/latest/acli_darwin_amd64/acli"\n\n# Apple Silicon 芯片\ncurl -LO "https://acli.atlassian.com/darwin/latest/acli_darwin_arm64/acli"\n\n# 设置权限并移动到系统 PATH 中\nchmod +x ./acli\n./acli --help\n\nsudo mv ./acli /usr/local/bin/acli\nsudo chown root: /usr/local/bin/acli\n\n# 验证\nacli --help \n</pre></div>\n\n\n<h4 class=\"wp-block-heading\">Linux</h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\">\n# x86-64 架构\ncurl -LO "https://acli.atlassian.com/linux/latest/acli_linux_amd64/acLine truncated
|
||||
"category": "AI",
|
||||
"link": "https://www.appinn.com/rovo-dev-cli/",
|
||||
"creator": "青小蛙",
|
||||
@@ -3027,7 +3005,7 @@
|
||||
{
|
||||
"title": "微软正式表态 Windows 11 8月更新与 SSD 硬盘故障无任何联系|WI1138854",
|
||||
"description": "微软已在服务警报中表态:经过彻底调查,没有发现 2025 年 8 月的安全更新(KB5063878)与社交媒体上报道的存储中断之间存在任何联系。@Appinn 闹的沸沸扬扬 KB5063878 更新事件已经有一段时间了(微软8月份更新 Win11,真把用户的 1TB 硬盘炸了?还能抢救吗?,昨日微软 ",
|
||||
"content": "\n<p>微软已在服务警报中表态:经过彻底调查,没有发现 2025 年 8 月的安全更新(<strong>KB5063878</strong>)与社交媒体上报道的存储中断之间存在任何联系。@Appinn</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1.jpg\" alt=\"微软正式表态 Windows 11 8月更新与 SSD 硬盘故障无任何联系|WI1138854 29\" class=\"wp-image-53538\" title=\"微软正式表态 Windows 11 8月更新与 SSD 硬盘故障无任何联系|WI1138854 29\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>闹的沸沸扬扬 <strong>KB5063878</strong> 更新事件已经有一段时间了(<a href=\"https://www.appinn.com/windows11-kb5063878/\" data-type=\"post\" data-id=\"53417\">微软8月份更新 Win11,真把用户的 1TB 硬盘炸了?还能抢救吗?</a>,昨日微软在仅企业用户可见的<a href=\"https://admin.cloud.microsoft/Adminportal/Home?source=applauncher#/windowsreleasehealth/:/issue/WI1138854\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>服务警报</strong>页面</a>(该页面无法直接访问)中宣布了以下内容:</p>\n\n\n\n<p>(注:青小蛙也没见到此页面,不过从其他信息源确认这些内容:<a href=\"https://www.nichepcgamer.com/archives/microsoft-says-ssd-failures-not-linked-to-windows11-24h2-kb5063878.html\" target=\"_blank\" rel=\"noopener\">nichepcgamer</a>、<a href=\"https://www.askwoody.com/forums/topic/ms-defcon-3-kb5063878-may-threaten-ssds/#post-2805921\" target=\"_blank\" rel=\"noopener\">askwoody</a>、<a href=\"https://www.bleepingcomputer.com/news/microsoft/microsoft-says-recent-KB5063878-windows-update-didnt-kill-your-ssd/\" target=\"_blank\" rel=\"noopener\">bleepingcomputer</a>)</p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>关于社交媒体上关于安装 2025 年 8 月更新后出现存储故障的报道</strong></h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>操作系统:Windows 11 24H2</li>\n\n\n\n<li>消息 ID:WI1138854</li>\n\n\n\n<li>原始 KB:KB5063878</li>\n\n\n\n<li>状态:已解决</li>\n</ul>\n\n\n\n<p>我们(Microsoft)正在调查在2025年8月13日(日本时间)发布的 Windows 11 24H2 更新程序安装后,SSD 或 HDD 在操作系统中无法被识别、或变得无法读取的社交媒体报告。</p>\n\n\n\n<p>有报告称,在使用率超过60%的驱动器上,写入大于50GB的大容量文件可能导致上述问题。</p>\n\n\n\n<p>我们一直积极与存储设备合作伙伴努力,尝试复现该问题。截至首次通告发布时,无论是我们自身的内部测试还是遥测数据,都没有显示磁盘故障或文件损坏的增加。我们客户支持团队同样没有接到用户反映出现此问题的报告。</p>\n\n\n\n<h3 class=\"wp-block-heading\">解决方案</h3>\n\n\n\n<p>经过彻底调查,我们未发现2025年8月安全更新(以及社交媒体上报告的存储障碍)之间存在关联。</p>\n\n\n\n<p>正如以往一样,我们会继续监控每次Windows更新后的用户反馈,并将在未来遇到相关报告时持续调查。我们将继续致力于听取和回应客户的疑虑与反馈。如果你在安装Windows更新后遇到问题,请联系[企业支持],或通过“反馈Hub”应用向我们提交你的问题。</p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"/>\n\n\n\n<p>所以,可以这样说,微软正式确认了 KB5063878 更新不会导致 SSD 故障。</p>\n\n\n\n<p>就…怎么说呢,现在我也不知道具体怎么情况了。</p>\n\n\n\n<p>你说更新吧,它已经更新过了 <img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f602.png\" alt=\"😂\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<p>你说不更新吧,可以<a href=\"https://www.appinn.com/pause-windows11-update-500-weeks/\" data-type=\"post\" data-id=\"53524\">让 Windows 11 禁止更新 500 周</a>。</p>\n\n\n\n<p>但是,微软既然敢对企业客户说不是他自己的问题,那想必也是经过无数测试才得出的结论,否则坑自己企业客户岂不是自讨苦吃。</p>\n\n\n\n<p>这个事情啊,就该用用,该玩玩。</p>\n\n\n\n<p>关于 SSD 的故障,青小蛙也遇到过一次,系统盘,使用时间挺长的了。遇到故障的前一天还完全正常,Line truncated
|
||||
"content": "\n<p>微软已在服务警报中表态:经过彻底调查,没有发现 2025 年 8 月的安全更新(<strong>KB5063878</strong>)与社交媒体上报道的存储中断之间存在任何联系。@Appinn</p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1.jpg\" alt=\"微软正式表态 Windows 11 8月更新与 SSD 硬盘故障无任何联系|WI1138854 30\" class=\"wp-image-53538\" title=\"微软正式表态 Windows 11 8月更新与 SSD 硬盘故障无任何联系|WI1138854 30\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-30T114242.863-1-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure>\n\n\n\n<p>闹的沸沸扬扬 <strong>KB5063878</strong> 更新事件已经有一段时间了(<a href=\"https://www.appinn.com/windows11-kb5063878/\" data-type=\"post\" data-id=\"53417\">微软8月份更新 Win11,真把用户的 1TB 硬盘炸了?还能抢救吗?</a>,昨日微软在仅企业用户可见的<a href=\"https://admin.cloud.microsoft/Adminportal/Home?source=applauncher#/windowsreleasehealth/:/issue/WI1138854\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>服务警报</strong>页面</a>(该页面无法直接访问)中宣布了以下内容:</p>\n\n\n\n<p>(注:青小蛙也没见到此页面,不过从其他信息源确认这些内容:<a href=\"https://www.nichepcgamer.com/archives/microsoft-says-ssd-failures-not-linked-to-windows11-24h2-kb5063878.html\" target=\"_blank\" rel=\"noopener\">nichepcgamer</a>、<a href=\"https://www.askwoody.com/forums/topic/ms-defcon-3-kb5063878-may-threaten-ssds/#post-2805921\" target=\"_blank\" rel=\"noopener\">askwoody</a>、<a href=\"https://www.bleepingcomputer.com/news/microsoft/microsoft-says-recent-KB5063878-windows-update-didnt-kill-your-ssd/\" target=\"_blank\" rel=\"noopener\">bleepingcomputer</a>)</p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>关于社交媒体上关于安装 2025 年 8 月更新后出现存储故障的报道</strong></h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>操作系统:Windows 11 24H2</li>\n\n\n\n<li>消息 ID:WI1138854</li>\n\n\n\n<li>原始 KB:KB5063878</li>\n\n\n\n<li>状态:已解决</li>\n</ul>\n\n\n\n<p>我们(Microsoft)正在调查在2025年8月13日(日本时间)发布的 Windows 11 24H2 更新程序安装后,SSD 或 HDD 在操作系统中无法被识别、或变得无法读取的社交媒体报告。</p>\n\n\n\n<p>有报告称,在使用率超过60%的驱动器上,写入大于50GB的大容量文件可能导致上述问题。</p>\n\n\n\n<p>我们一直积极与存储设备合作伙伴努力,尝试复现该问题。截至首次通告发布时,无论是我们自身的内部测试还是遥测数据,都没有显示磁盘故障或文件损坏的增加。我们客户支持团队同样没有接到用户反映出现此问题的报告。</p>\n\n\n\n<h3 class=\"wp-block-heading\">解决方案</h3>\n\n\n\n<p>经过彻底调查,我们未发现2025年8月安全更新(以及社交媒体上报告的存储障碍)之间存在关联。</p>\n\n\n\n<p>正如以往一样,我们会继续监控每次Windows更新后的用户反馈,并将在未来遇到相关报告时持续调查。我们将继续致力于听取和回应客户的疑虑与反馈。如果你在安装Windows更新后遇到问题,请联系[企业支持],或通过“反馈Hub”应用向我们提交你的问题。</p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"/>\n\n\n\n<p>所以,可以这样说,微软正式确认了 KB5063878 更新不会导致 SSD 故障。</p>\n\n\n\n<p>就…怎么说呢,现在我也不知道具体怎么情况了。</p>\n\n\n\n<p>你说更新吧,它已经更新过了 <img src=\"https://s.w.org/images/core/emoji/16.0.1/72x72/1f602.png\" alt=\"😂\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" /></p>\n\n\n\n<p>你说不更新吧,可以<a href=\"https://www.appinn.com/pause-windows11-update-500-weeks/\" data-type=\"post\" data-id=\"53524\">让 Windows 11 禁止更新 500 周</a>。</p>\n\n\n\n<p>但是,微软既然敢对企业客户说不是他自己的问题,那想必也是经过无数测试才得出的结论,否则坑自己企业客户岂不是自讨苦吃。</p>\n\n\n\n<p>这个事情啊,就该用用,该玩玩。</p>\n\n\n\n<p>关于 SSD 的故障,青小蛙也遇到过一次,系统盘,使用时间挺长的了。遇到故障的前一天还完全正常,Line truncated
|
||||
"category": "Windows",
|
||||
"link": "https://www.appinn.com/windows11-aug-update-no-ssd-issue/",
|
||||
"creator": "青小蛙",
|
||||
@@ -3068,28 +3046,6 @@
|
||||
"hash": "8601483400eb86ebcce6d9fce4af0a2e",
|
||||
"highlights": []
|
||||
},
|
||||
{
|
||||
"title": "装机推荐,效率加倍:开学季 23 款正版软件特价,6 折起,PixPin、Trancy、MS 365 等等",
|
||||
"description": "转眼间已到开学季!我们的朋友数码荔枝为大家带来了「装机推荐,效率加倍」特惠活动! 活动精选了一批高效实用的学习、办公软件,低至 6 折优惠,轻松带回家,一共 23 款,可以慢慢挑。 优惠活动持续至 2025 年 9 月 12 日,也可以直接前往活动会场,带走你的心仪软件! 具体折扣软件列表 Wind ",
|
||||
"content": "\n<p>转眼间已到开学季!我们的朋友数码荔枝为大家带来了「<strong>装机推荐,效率加倍</strong>」特惠活动!</p>\n\n\n\n<p>活动精选了一批高效实用的学习、办公软件,低至 <strong>6 折</strong>优惠,轻松带回家,一共 23 款,可以慢慢挑。</p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1608\" height=\"700\" src=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-29T122217.959.jpg\" alt=\"装机推荐,效率加倍:开学季 23 款正版软件特价,6 折起,PixPin、Trancy、MS 365 等等 31\" class=\"wp-image-53520\" title=\"装机推荐,效率加倍:开学季 23 款正版软件特价,6 折起,PixPin、Trancy、MS 365 等等 31\" srcset=\"https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-29T122217.959.jpg 1608w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-29T122217.959-768x334.jpg 768w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-29T122217.959-1536x669.jpg 1536w, https://do-cdn.appinn.com/static3/images/2025/08/Copy-of-appinn-homework-2025-08-29T122217.959-804x350.jpg 804w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" /></figure></div>\n\n\n<p>优惠活动持续至 <strong>2025 年 9 月 12 日</strong>,也可以直接<a href=\"https://lizhi.shop/site/search_list/category_id/64?order_by=1&cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">前往活动会场</a>,带走你的心仪软件!</p>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\">具体折扣软件列表</h2>\n\n\n\n<h2 class=\"wp-block-heading\">Windows</h2>\n\n\n\n<h3 class=\"wp-block-heading\">Wise Care 365 Pro – 电脑系统智慧清理加速工具</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/wise-care-365-pro?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/wise-care-365-pro?cid=jxlwguir</a><br />折扣详情:7折:¥34.30 <del>¥49.00</del></p>\n\n\n\n<p>集成系统垃圾清理、注册表优化、隐私保护、性能加速等功能,为你的电脑持久保驾护航。</p>\n\n\n\n<h3 class=\"wp-block-heading\">IObit Uninstaller 15 Pro – 专业软件卸载清理工具</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/iobit-uninstaller-pro?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/iobit-uninstaller-pro?cid=jxlwguir</a><br />折扣详情:特价:¥21.00 <del>¥59.00</del></p>\n\n\n\n<p>彻底卸载顽固程序和插件,清理系统及浏览器残留垃圾,维护系统纯净。</p>\n\n\n\n<h3 class=\"wp-block-heading\">傲梅轻松备份 – 系统备份还原 增量备份工具</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/aomei-backupper?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/aomei-backupper?cid=jxlwguir</a><br />折扣详情:6折:¥53.40 <del>¥89.00</del></p>\n\n\n\n<p>专注系统数据备份与恢复,支持多种备份策略,保障数据安全。</p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"/>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\">macOS</h2>\n\n\n\n<h3 class=\"wp-block-heading\">Bartender 5 – Mac 菜单栏图标管理工具</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/bartender?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/bartender?cid=jxlwguir</a><br />折扣详情:8折:¥87.20 <del>¥109.00</del></p>\n\n\n\n<p>自动隐藏、分组整理菜单栏图标,自由定制样式,让 Mac 菜单栏简洁有序。</p>\n\n\n\n<h3 class=\"wp-block-heading\">Parallels Desktop 26 – Mac 上优秀的虚拟机软件 PD 激活码 赠送Win11</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/parallels-desktop?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/parallels-desktop?cid=jxlwguir</a><br />折扣详情:特价:¥349.00 <del>¥618.00</del></p>\n\n\n\n<p>无缝运行 Windows、Linux 等多系统,高效支持跨平台协作与开发。</p>\n\n\n\n<h3 class=\"wp-block-heading\">QSpace – Mac 高效多视图文件管理器 代替访达</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/qspace?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/qspace?cid=jxlwguir</a><br />折扣详情:特价:¥75.00 <del>¥89.00</del></p>\n\n\n\n<p>多标签多窗口操作、强大文件管理,轻松替代原生 Finder。</p>\n\n\n\n<h3 class=\"wp-block-heading\">App Cleaner & Uninstaller 8 – Mac 软件卸载清理工具 安全彻底删除</h3>\n\n\n\n<p>购买地址:<a href=\"https://lizhi.shop/products/app-cleaner-uninstaller?cid=jxlwguir\" target=\"_blank\" rel=\"noopener\">https://lizhi.shop/products/app-cleanLine truncated
|
||||
"category": "团购",
|
||||
"link": "https://www.appinn.com/lizhi-202509/",
|
||||
"creator": "青小蛙",
|
||||
"pubDate": "Fri, 29 Aug 2025 07:01:17 +0000",
|
||||
"enclosure": "",
|
||||
"enclosureType": "",
|
||||
"image": "",
|
||||
"id": "",
|
||||
"language": "zh",
|
||||
"folder": "资讯",
|
||||
"feed": "小众软件",
|
||||
"read": false,
|
||||
"favorite": false,
|
||||
"created": false,
|
||||
"tags": [],
|
||||
"hash": "3fd4219ebfaa8757b9f7ee91a9e97c71",
|
||||
"highlights": []
|
||||
},
|
||||
{
|
||||
"title": "China urges U.S. to abandon excessive use of national security concept",
|
||||
"description": "<div><div><p>BEIJING, June 5 (Xinhua) -- China has urged the United States to abandon its generalized and excessive use of the national security concept, and to collaborate with all parties in maintaining a rules-based multilateral trading system, the Ministry of Commerce said on Thursday.</p> <p>At a regular press conference, He Yongqian, spokesperson for the ministry, made the remarks when asked to comment on the U.S. decision to raise tariffs on imported steel, aluminium and their derivative products from 25 percent to 50 percent.</p> <p>He said that such U.S. moves not only harm others and itself, but also will severely disrupt the stability of global industrial and supply chains.</p> <p>The United States should abandon the zero-sum mentality, address respective concerns through equal dialogue, and jointly maintain the stability of global industrial and supply chains, He said. </p><p id='org_name'>Source: Xinhua</p></div></div>",
|
||||
|
||||
+3
-1
@@ -59,6 +59,8 @@
|
||||
"00-待办计划/2025-09 待办事宜.md": "0e26530a8b487c881c543cf8e0cdc726a2133ea7afa57ae915659fa4e7d8cc7f",
|
||||
"60-Imports/64-AI/新疆好玩吗?.md": "19aa7b1d7e4c4712ee65a1e3d14a40b1cf3ac5f32958abb12487e1ba0ba2686a",
|
||||
"60-Imports/63-WuCai/2025/09/Dataview进阶(1)基础字段 obsidian文档咖啡豆版.md": "92e66e579330235014a0c1dc6947da35fd160442ed50e2a21720a0a67bd83bae",
|
||||
"01-工作日记/2025-09-05.md": "07abafb3dc88159a6b6e37bd4490077270152c1f0cc98add4118190ed1d7899e"
|
||||
"01-工作日记/2025-09-05.md": "23668152bdf87298844a162e5f13d21eb8e925554619f6902b0a8d321aafada7",
|
||||
"60-Imports/63-WuCai/2025/09/主页 阿甘网盘.md": "d4a9c22c8ac98dde1aafbfde72bd08d48101eecb6b4e3ec90632c3002332bfe8",
|
||||
"80-日记归档/81-工作日记/202508/2025-08-03.md": "3070cf7080a72ddae4e07ac8b81e2a2a2e5a393bc2b78e012bf2a9ce8b358f36"
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -9,7 +9,7 @@
|
||||
"refreshNotes": false,
|
||||
"notesToRefresh": [],
|
||||
"reimportShowConfirmation": true,
|
||||
"lastCursor": "eyJsYXN0SGlnaGxpZ2h0UEtJRCI6MCwibG5pIjowLCJja1BLSUQiOjAsImNrTklEIjowLCJja1QiOjAsInMiOjE3NTY5MDgwMzAwMTM3NzZ9",
|
||||
"lastCursor": "eyJsYXN0SGlnaGxpZ2h0UEtJRCI6MCwibG5pIjowLCJja1BLSUQiOjAsImNrTklEIjowLCJja1QiOjAsInMiOjE3NTcwNjExNjg4MTMyODF9",
|
||||
"dataVersion": 0,
|
||||
"notePaths": {
|
||||
"HHAFF3D": "60-Imports/63-WuCai/2025/07/wucai-2025-07-07.md",
|
||||
@@ -23,7 +23,8 @@
|
||||
"HH2MFD6": "60-Imports/63-WuCai/2025/08/群晖Active backup for Businese全系统备份套件详细使用指南 增量备份 多平台支持虚拟机_NAS存储.md",
|
||||
"HH2M9HE": "60-Imports/63-WuCai/2025/08/【NAS备份】彻底摆脱丢数据的噩梦群晖NAS备份硬核实战教程分享 - 知乎.md",
|
||||
"HH22M7E": "60-Imports/63-WuCai/2025/08/Plex重大变更:无论使用自己还是别人的媒体服务器远程播放都必须付费 – 蓝点网.md",
|
||||
"HHHC77C": "60-Imports/63-WuCai/2025/09/Dataview进阶(1)基础字段 obsidian文档咖啡豆版.md"
|
||||
"HHHC77C": "60-Imports/63-WuCai/2025/09/Dataview进阶(1)基础字段 obsidian文档咖啡豆版.md",
|
||||
"HHHFAFM": "60-Imports/63-WuCai/2025/09/主页 阿甘网盘.md"
|
||||
},
|
||||
"exportConfig": {
|
||||
"titleFormat": 11,
|
||||
|
||||
Vendored
+40
-45
@@ -4,21 +4,23 @@
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "52c52be6af792b11",
|
||||
"id": "1e02e0bfb35f958b",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "b98b48d9165a0618",
|
||||
"id": "f9432942b5628d09",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"type": "pdf",
|
||||
"state": {
|
||||
"file": "01-工作日记/2025-09-05.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
"file": "08-Inbox/公司文件/859期英语报.pdf",
|
||||
"page": 1,
|
||||
"left": -11,
|
||||
"top": 796,
|
||||
"zoom": 1.3443627450980393
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "2025-09-05"
|
||||
"icon": "lucide-file-text",
|
||||
"title": "859期英语报"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -93,19 +95,9 @@
|
||||
"icon": "sheets-in-box",
|
||||
"title": "File Tree"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "820bc95bf2882f66",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-tree-view",
|
||||
"state": {},
|
||||
"icon": "sheets-in-box",
|
||||
"title": "File Tree"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 5
|
||||
"currentTab": 4
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
@@ -188,13 +180,13 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "01-工作日记/2025-09-05.md",
|
||||
"file": "08-Inbox/公司文件/中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版).pdf",
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "2025-09-05 的大纲"
|
||||
"title": "中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版) 的大纲"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -286,18 +278,17 @@
|
||||
"workspaces:管理工作区布局": true,
|
||||
"zk-prefixer:创建时间戳笔记": true,
|
||||
"markdown-importer:打开 Markdown 格式转换器": true,
|
||||
"obsidian-git:Open Git source control": false,
|
||||
"obsidian-git:Open Git source control": true,
|
||||
"obsidian-excalidraw-plugin:新建绘图文件": false,
|
||||
"remotely-save:Remotely Save": false,
|
||||
"obsidian-wordpress:发布到 WordPress": false,
|
||||
"templater-obsidian:Templater": false,
|
||||
"templater-obsidian:Templater": true,
|
||||
"fuzzy-chinese-pinyin:FuzzySearch": false,
|
||||
"obsidian-raindrop-highlights:Sync your Raindrop bookmarks": false,
|
||||
"obsidian-full-calendar:Open Full Calendar": false,
|
||||
"obsidian-importer:Open Importer": false,
|
||||
"copilot:Open Copilot Chat": false,
|
||||
"DEVONlink-obsidian:DEVONlink": false,
|
||||
"periodic-notes:Open today": false,
|
||||
"memos-ai-sync:Sync Memos": false,
|
||||
"translate:Open translation view": false,
|
||||
"obsidian-calibre-plugin:Calibre": false,
|
||||
@@ -305,8 +296,7 @@
|
||||
"media-extended:Open media": false,
|
||||
"diary-ics:日记日历订阅": false,
|
||||
"cubox-sync:Cubox": false,
|
||||
"file-tree-alternative:File Tree Alternative Plugin": false,
|
||||
"hidden-folder-obsidian:隐藏文件夹": false,
|
||||
"file-tree-alternative:File Tree Alternative Plugin": true,
|
||||
"password-protection:开启密码保护": false,
|
||||
"sheet-plus:创建 Excel 文件": false,
|
||||
"wucai-highlights-official:Start WuCai syncing": false,
|
||||
@@ -314,14 +304,33 @@
|
||||
"timelines-revamped:Insert Timeline Event": false,
|
||||
"timelines-revamped:Insert Timeline Event (Frontmatter)": false,
|
||||
"onlyoffice:New OnlyOffice Document": false,
|
||||
"obsidian42-brat:BRAT": false,
|
||||
"soundscapes:Soundscapes: My Music": false
|
||||
"obsidian42-brat:BRAT": true,
|
||||
"soundscapes:Soundscapes: My Music": false,
|
||||
"pdf-plus:PDF++: Toggle auto-copy": false,
|
||||
"pdf-plus:PDF++: Toggle auto-focus": false,
|
||||
"pdf-plus:PDF++: Toggle auto-paste": false,
|
||||
"hidden-folder-obsidian:隐藏文件夹": false,
|
||||
"periodic-notes:Open today": false
|
||||
}
|
||||
},
|
||||
"active": "b98b48d9165a0618",
|
||||
"active": "f9432942b5628d09",
|
||||
"lastOpenFiles": [
|
||||
"00-待办计划/2025-09 待办事宜.md",
|
||||
"08-Inbox/公司文件/中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版).pdf",
|
||||
"08-Inbox/公司文件/859期英语报.pdf",
|
||||
"01-工作日记/2025-09-05.md",
|
||||
"未命名.canvas",
|
||||
"80-日记归档/81-工作日记/202508/2025-08-03.md",
|
||||
"60-Imports/63-WuCai/2025/09/主页 阿甘网盘.md",
|
||||
"08-Inbox/(5)韩信作战无人能比做人不能比人_长空星照_新浪博客.md",
|
||||
"08-Inbox/2025-07-04.md",
|
||||
"08-Inbox/2025年8月工作与技术实践总结.md",
|
||||
"90-学习教程/99-黑曜石玩家指南/2-obsidian读文献/当期文献速览.md",
|
||||
"08-Inbox/公司文件/中通服创发科技有限责任公司2025年度择优招聘合同制员工实施细则(发文版)(1).pdf",
|
||||
"08-Inbox/公司文件",
|
||||
"08-Inbox/未命名文件夹",
|
||||
"90-学习教程/99-黑曜石玩家指南/2-obsidian读文献/本章小结-恭喜习得内功.md",
|
||||
"pdf 批注.md",
|
||||
"00-待办计划/2025-09 待办事宜.md",
|
||||
"60-Imports/63-WuCai/2025/09/Dataview进阶(1)基础字段 obsidian文档咖啡豆版.md",
|
||||
"60-Imports/63-WuCai/2025/09",
|
||||
"01-工作日记/2025-09-03.md",
|
||||
@@ -338,15 +347,6 @@
|
||||
"01-工作日记/2025-09-02.md",
|
||||
"01-工作日记/2025-09-01.md",
|
||||
"10-WebClipper/知识体系/让笔记流动起来——Obsidian重塑知识体系 - 少数派.md",
|
||||
"10-WebClipper/知识体系/Obsidian 知识体系搭建:入门篇 (一)_牛客网.md",
|
||||
"10-WebClipper/知识体系/(74 封私信) Obsidian知识管理体系搭建实战指南 - 知乎.md",
|
||||
"06-数字仓库/端口映射对照表.md",
|
||||
"06-数字仓库/065-认证/订阅.md",
|
||||
"06-数字仓库/065-认证/端口转发.md",
|
||||
"06-数字仓库/065-认证/外网服务.md",
|
||||
"06-数字仓库/065-认证/路由器映射表.md",
|
||||
"08-Inbox/端口转发.md",
|
||||
"08-Inbox/Excel 2025-08-01 17.49.04.univer.md",
|
||||
"08-Inbox/SMM-2025-07-19-17-38-53.smm",
|
||||
"08-Inbox/数据备份流程.png",
|
||||
"08-Inbox/数据备份流程.xmind",
|
||||
@@ -359,14 +359,9 @@
|
||||
"10-WebClipper/assets/1d0fabe426dcca2d0fb84820f1be9b6872aeede8_2_434x500.jpg",
|
||||
"50-Memos/2025/09",
|
||||
"08-Inbox/知识库分类导图.smm",
|
||||
"08-Inbox/数据备份实现流程.smm",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python-Java 客户端 API 应用 - 老牛啊 - 博客园.html",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python_Java 客户端 API 应用 - 老牛啊 - 博客园/assets/1756615191422.png",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python_Java 客户端 API 应用 - 老牛啊 - 博客园/assets/1756615190796.png",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python_Java 客户端 API 应用 - 老牛啊 - 博客园/assets/1756615192002.png",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python_Java 客户端 API 应用 - 老牛啊 - 博客园/assets",
|
||||
"70-SimpRead/output/Ollama 完整教程:本地 LLM 管理、WebUI 对话、Python_Java 客户端 API 应用 - 老牛啊 - 博客园",
|
||||
"未命名 1.canvas",
|
||||
"未命名.canvas"
|
||||
"未命名 1.canvas"
|
||||
]
|
||||
}
|
||||
+11
-2
@@ -6,7 +6,7 @@ tags:
|
||||
rating: ⭐️
|
||||
excerpt:
|
||||
created: 2025-09-05T10:04
|
||||
updated: 2025-09-05T10:19
|
||||
updated: 2025-09-05T17:18
|
||||
---
|
||||
## 1TODO
|
||||
- [ ] 多喝水,避免久坐不动
|
||||
@@ -18,7 +18,12 @@ updated: 2025-09-05T10:19
|
||||

|
||||
|
||||
- DayOne导出txt文件,怎么导入memos?
|
||||
|
||||
- 安装了PDF++插件:
|
||||
之前学习了Mac下PDF Expert,可以到处批注,使用这个插件直接输出批注笔记!
|
||||
alist流览pdf文件,是iframe,五彩等插件批注不起作用
|
||||
- 如何设置欧路浏览器插件不要随便显示浮动菜单?
|
||||
- onlyoffice:alist修改了3480(108)后,view.html文件要添加到容器?否则报file not found!
|
||||
-
|
||||
|
||||
## 3 Tips
|
||||
|
||||
@@ -46,3 +51,7 @@ FROM "01-Diary/本周事务" OR "03-Projects" OR "05-Life" OR "06-Cards"
|
||||
WHERE (file.mtime>=date(<% tp.date.now("YYYY-MM-DD") %>) AND file.mtime<date(<% tp.date.now("YYYY-MM-DD", 1) %>)) OR (file.ctime>=date(<% tp.date.now("YYYY-MM-DD") %>) AND file.ctime<date(<% tp.date.now("YYYY-MM-DD", 1) %>))
|
||||
SORT file.mtime desc
|
||||
```
|
||||
|
||||
无犯罪记录,无处分或被问责处理等不良记录,或受组织处理或纪律处分但影响期已满
|
||||
|
||||
韩信是汉初著名的军事家,是刘邦手下的“三杰”之一,刘邦评价他:“统帅百万大军,战则必胜,攻则必取”,的确是非常到位。然而,这样一位盖世军事奇才,先是被降爵,最后被灭族,竟然落得了一个凄惨的下场。这当中当然有刘邦残忍狠毒的性格以及刘氏天下的政治需要,但是却有一个问题,除了后世之人给与他极大的同情之外,当时的人为什么就没有多少反映呢?与他形成鲜明对比的是,彭越也被刘邦灭族,并下令不准给他祭奠,可是那个栾布竟公开违抗皇命,大大方方地来到挂着彭越人头的城门下给彭越汇报出使情况。难道韩信就真的比不上一个彭越?说起来,韩信这个人,作战真是无人能比,但要是说起做人来,的确是有很多不及人的地方
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
---
|
||||
标题: 主页 | 阿甘网盘
|
||||
笔记ID: HHHFAFM
|
||||
笔记类型: page
|
||||
星标: false
|
||||
tags:
|
||||
域名: himan.picp.net
|
||||
域名2: picp.net
|
||||
作者: ""
|
||||
原文链接: http://himan.picp.net:5300/
|
||||
五彩链接: https://marker.dotalk.cn/#/?nx=HHHFAFM&vs=1
|
||||
划线数量: 1
|
||||
创建时间: 2025-09-05 16:32
|
||||
更新时间: 2025-09-05 16:32
|
||||
created: 2025-09-05T17:05
|
||||
updated: 2025-09-05T17:05
|
||||
---
|
||||
|
||||
## 主页 | 阿甘网盘
|
||||
|
||||
|
||||
## 页面笔记
|
||||
|
||||
|
||||
## 划线列表
|
||||
- 本站所有资料,均来自互联网,主要用于学习之目的,不得用于商业用途! 如有版权问题,请联系本站处理 [Link](http://himan.picp.net:5300/#WCREFX-12092108)
|
||||
|
||||
## 全文剪藏
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
---
|
||||
title: 🐈日志<% tp.file.title %>
|
||||
date: <% tp.date.now("YYYY-MM-DD HH:mm:ss") %>
|
||||
tags:
|
||||
- dailynote
|
||||
rating: ⭐️
|
||||
excerpt:
|
||||
createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期日, 八月 3日 2025, 7:03:35 早上
|
||||
date modified: 星期日, 八月 3日 2025, 6:40:22 晚上
|
||||
createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期日, 八月 3日 2025, 7:03:35 早上
|
||||
created: 2025-08-30T10:17
|
||||
updated: 2025-09-05T17:13
|
||||
---
|
||||
## 1TODO
|
||||
- [ ] 多喝水,避免久坐不动
|
||||
@@ -40,7 +33,7 @@ https://www.zhiniw.com/
|
||||
- neoserver:与手机端的iCloud同步不能实现,可能是盗版
|
||||
- nezha监控设备多一些,安装agent就行,neo只要ssh,但是范围小,必须支持开启ssh
|
||||
- 随手草稿本文件统一命名为:Draft2025XX DT+iAWriter+OB
|
||||
- PDF软件评测:PDF ReaderPro 必须要高级会员才能使用修改功能,免了!只作为读取时使用,PDF Export全功能可以使用,还是破解的,可以将批注导出到MD文件,很不错!
|
||||
- PDF软件评测:PDF ReaderPro 必须要高级会员才能使用修改功能,免了!只作为读取时使用,<font color="#2DC26B">PDF Export全功能可以使用,还是破解的,可以将批注导出到MD文件,很不错!</font>
|
||||
- DT安装了OCR插件,扫描图片能很快入库!
|
||||
- 同步软件评测和调试结果
|
||||
- 1 Syncovery:下载了10.15.6 ARM安装后可以用,没有测试。是否支持定时同步?
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
Reference in new issue
Block a user