/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var v=(t,e)=>{for(var n in e)a(t,n,{get:e[n],enumerable:!0})},f=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of h(e))!x.call(t,c)&&c!==n&&a(t,c,{get:()=>e[c],enumerable:!(r=g(e,c))||r.enumerable});return t};var L=t=>f(a({},"__esModule",{value:!0}),t);var B={};v(B,{default:()=>C});module.exports=L(B);var o=require("obsidian");var s='';function A(t){let e=/\[([^\]]+)\]\([^)]+\)/g;return t.replace(e,(n,r)=>r)}function $(t){let e=/(?`_${r}_`)}function N(t){return t.replaceAll("**","*")}function m(t){return t.replaceAll("~~","~")}function I(t){let e=/^>(\S+)/gm;return t=t.replace(e,(n,r)=>`> ${r}`),t=t.replaceAll(`> `,""),t}function y(t){let e=/^(#{1,6})\s*(.+)/gm;return t.replace(e,(n,r,c)=>`*${c.trim()}*`)}function z(t){let e=/!\[.*?\]\(.*?\)/g;return t.replace(e,(n,r)=>"")}function M(t){let e=/==([^=]+)==/g;return t.replace(e,(n,r)=>`*${r}*`)}function b(t){let e=/\$([^$]+)\$/g;return t.replace(e,(n,r)=>`\`${r}\``)}function E(t){let e=/\n{3,}/g;return t.replace(e,(n,r)=>` `)}function S(t){let e=/-{3,}/g;return t.replace(e,(n,r)=>"")}function i(t){return t=z(t),t=A(t),t=$(t),t=y(t),t=N(t),t=m(t),t=I(t),t=M(t),t=b(t),t=S(t),t=E(t),t}function p(t){return i(t)}var C=class extends o.Plugin{async onload(){(0,o.addIcon)("whatsapp",s),this.addRibbonIcon("whatsapp","Exportar nota",async()=>{await this.exportNote()}),this.addCommand({id:"whatsapp-export-note-export",name:"Exportar nota",callback:async()=>{await this.exportNote()}})}onunload(){}async exportNote(){new o.Notice("Exportar nota");let e=this.app.workspace.getActiveFile();if(!e){new o.Notice("Abra uma nota para que ela possa ser exportada!");return}let n=await this.app.vault.read(e),r=p(n),c=e.path.split("/").slice(0,-1).join("/"),l=new Date,u=`${c}/${e.name.replaceAll(".md","")}-whatsapp-${l.toISOString().replaceAll(":","_")}.md`;await this.app.vault.create(u,r),new o.Notice("Nota exportada com sucesso, copie o conte\xFAdo dela e envie para o whatsapp")}}; /* nosourcemap */