@luizleon/sf.prefeiturasp.vuecomponents 5.0.30 → 5.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -409,6 +409,6 @@ If you think this parameter should be updatable, request it here: https://github
409
409
 
410
410
  For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",v),u.setSuccess()))};window.addEventListener("message",v,!1)}else u.setSuccess();return N(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function Xe(u){if(!u||u=="default")return{login:function(_){return window.location.assign(e.createLoginUrl(_)),Y().promise},logout:async function(_){if(((_==null?void 0:_.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(_));return}const O=e.createLogoutUrl(_),x=await fetch(O,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:e.idToken,client_id:e.clientId,post_logout_redirect_uri:n.redirectUri(_,!1)})});if(x.redirected){window.location.href=x.url;return}if(x.ok){window.location.reload();return}throw new Error("Logout failed, request returned an error code.")},register:function(_){return window.location.assign(e.createRegisterUrl(_)),Y().promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.location.href=_;else throw"Not supported by the OIDC server";return Y().promise},redirectUri:function(_,E){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(_,E,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(_,E,O):window.open(_,E,O)},v=function(_){return _&&_.cordovaOptions?Object.keys(_.cordovaOptions).reduce(function(E,O){return E[O]=_.cordovaOptions[O],E},{}):{}},I=function(_){return Object.keys(_).reduce(function(E,O){return E.push(O+"="+_[O]),E},[]).join(",")},b=function(_){var E=v(_);return E.location="no",_&&_.prompt=="none"&&(E.hidden="yes"),I(E)},P=function(){return e.redirectUri||"http://localhost"};return{login:function(_){var E=Y(),O=b(_),x=e.createLoginUrl(_),R=h(x,"_blank",O),F=!1,Ce=!1,me=function(){Ce=!0,R.close()};return R.addEventListener("loadstart",function(pe){if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);S(Ze,E),me(),F=!0}}),R.addEventListener("loaderror",function(pe){if(!F)if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);S(Ze,E),me(),F=!0}else E.setError(),me()}),R.addEventListener("exit",function(pe){Ce||E.setError({reason:"closed_by_user"})}),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_),x=h(O,"_blank","location=no,hidden=yes,clearcache=yes"),R;return x.addEventListener("loadstart",function(F){F.url.indexOf(P())==0&&x.close()}),x.addEventListener("loaderror",function(F){F.url.indexOf(P())==0||(R=!0),x.close()}),x.addEventListener("exit",function(F){R?E.setError():(e.clearToken(),E.setSuccess())}),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(),x=b(_),R=h(O,"_blank",x);return R.addEventListener("loadstart",function(F){if(F.url.indexOf(P())==0){R.close();var Ce=ne(F.url);S(Ce,E)}}),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u"){var E=h(_,"_blank","location=no");E.addEventListener("loadstart",function(O){O.url.indexOf(P())==0&&E.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(_){return P()}}}if(u=="cordova-native")return i.enable=!1,{login:function(_){var E=Y(),O=e.createLoginUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);S(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),E.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);S(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.cordova.plugins.browsertab.openUrl(_);else throw"Not supported by the OIDC server"},redirectUri:function(_){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+u}var Fe=function(){if(!(this instanceof Fe))return new Fe;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var u=this;function h(){for(var v=new Date().getTime(),I=0;I<localStorage.length;I++){var b=localStorage.key(I);if(b&&b.indexOf("kc-callback-")==0){var P=localStorage.getItem(b);if(P)try{var _=JSON.parse(P).expires;(!_||_<v)&&localStorage.removeItem(b)}catch{localStorage.removeItem(b)}}}}u.get=function(v){if(v){var I="kc-callback-"+v,b=localStorage.getItem(I);return b&&(localStorage.removeItem(I),b=JSON.parse(b)),h(),b}},u.add=function(v){h();var I="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(I,JSON.stringify(v))}},ze=function(){if(!(this instanceof ze))return new ze;var u=this;u.get=function(b){if(b){var P=v("kc-callback-"+b);if(I("kc-callback-"+b,"",h(-100)),P)return JSON.parse(P)}},u.add=function(b){I("kc-callback-"+b.state,JSON.stringify(b),h(60))},u.removeItem=function(b){I(b,"",h(-100))};var h=function(b){var P=new Date;return P.setTime(P.getTime()+b*60*1e3),P},v=function(b){for(var P=b+"=",_=document.cookie.split(";"),E=0;E<_.length;E++){for(var O=_[E];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(P)==0)return O.substring(P.length,O.length)}return""},I=function(b,P,_){var E=b+"="+P+"; expires="+_.toUTCString()+"; ";document.cookie=E}};function ht(){try{return new Fe}catch{}return new ze}function $e(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}function Qd(t){const e=String.fromCodePoint(...t);return btoa(e)}class ef{constructor(e){ee(this,"oidc");ee(this,"isAuthenticated",!1);ee(this,"authenticatedWith",null);this.oidc=new Mi(e)}async InitAsync(e={}){return await this.oidc.init(e).then(async n=>(this.isAuthenticated=n,this.authenticatedWith=this.AuthenticatedWith(),n)).catch(n=>(console.info("Ocorreu um erro na inicialização. Verifique o console para mais detalhes."),console.error(n),!1))}LoginGovBr(){this.oidc.login({idpHint:"GOV.BR"})}LoginSenhaweb(){var n;const e=(n=this.oidc.authServerUrl)!=null&&n.startsWith("https://keycloak.dev.apps.sf.prefeitura.sp.gov.br")?"senhawebdev":"senhaweb";this.oidc.login({idpHint:e})}AuthenticatedWith(){var n,o;const e=this.oidc.tokenParsed;return e?(n=e.identity_provider)!=null&&n.startsWith("GOV.BR")?"govbr":(o=e.identity_provider)!=null&&o.startsWith("senhaweb")?"senhaweb":"ad":null}}let Di;function tf(t){Di=new ef(t)}const Lo=()=>Di;function nf(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const of=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function rf(t){return s.getCurrentInstance()}function sf(t){return Array.isArray(t)?t:[t]}function af(t,e=!0,n){rf()?s.onMounted(t,n):e?t():s.nextTick(t)}const Ri=of?window:void 0;function Ct(t){var e;const n=s.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function lf(){const t=s.ref(!1),e=s.getCurrentInstance();return e&&s.onMounted(()=>{t.value=!0},e),t}function cf(t){const e=lf();return s.computed(()=>(e.value,!!t()))}function uf(t,e,n={}){const{window:o=Ri,...r}=n;let i;const l=cf(()=>o&&"ResizeObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},c=s.computed(()=>{const p=s.toValue(t);return Array.isArray(p)?p.map(y=>Ct(y)):[Ct(p)]}),d=s.watch(c,p=>{if(a(),l.value&&o){i=new ResizeObserver(e);for(const y of p)y&&i.observe(y,r)}},{immediate:!0,flush:"post"}),f=()=>{a(),d()};return nf(f),{isSupported:l,stop:f}}function df(t,e={width:0,height:0},n={}){const{window:o=Ri,box:r="content-box"}=n,i=s.computed(()=>{var p,y;return(y=(p=Ct(t))==null?void 0:p.namespaceURI)==null?void 0:y.includes("svg")}),l=s.ref(e.width),a=s.ref(e.height),{stop:c}=uf(t,([p])=>{const y=r==="border-box"?p.borderBoxSize:r==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(o&&i.value){const k=Ct(t);if(k){const C=k.getBoundingClientRect();l.value=C.width,a.value=C.height}}else if(y){const k=sf(y);l.value=k.reduce((C,{inlineSize:A})=>C+A,0),a.value=k.reduce((C,{blockSize:A})=>C+A,0)}else l.value=p.contentRect.width,a.value=p.contentRect.height},n);af(()=>{const p=Ct(t);p&&(l.value="offsetWidth"in p?p.offsetWidth:e.width,a.value="offsetHeight"in p?p.offsetHeight:e.height)});const d=s.watch(()=>Ct(t),p=>{l.value=p?e.width:0,a.value=p?e.height:0});function f(){c(),d()}return{width:l,height:a,stop:f}}function ff(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ln={exports:{}},mf=Ln.exports,Ui;function pf(){return Ui||(Ui=1,function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(mf,function(){var e=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},l=null;function a(A,L){var w=A[L];if(typeof w.bind=="function")return w.bind(A);try{return Function.prototype.bind.call(w,A)}catch{return function(){return Function.prototype.apply.apply(w,[A,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(A){return A==="debug"&&(A="log"),typeof console===n?!1:A==="trace"&&o?c:console[A]!==void 0?a(console,A):console.log!==void 0?a(console,"log"):e}function f(){for(var A=this.getLevel(),L=0;L<r.length;L++){var w=r[L];this[w]=L<A?e:this.methodFactory(w,A,this.name)}if(this.log=this.debug,typeof console===n&&A<this.levels.SILENT)return"No console available for logging"}function p(A){return function(){typeof console!==n&&(f.call(this),this[A].apply(this,arguments))}}function y(A,L,w){return d(A)||p.apply(this,arguments)}function k(A,L){var w=this,S,D,U,G="loglevel";typeof A=="string"?G+=":"+A:typeof A=="symbol"&&(G=void 0);function ue(N){var X=(r[N]||"silent").toUpperCase();if(!(typeof window===n||!G)){try{window.localStorage[G]=X;return}catch{}try{window.document.cookie=encodeURIComponent(G)+"="+X+";"}catch{}}}function ne(){var N;if(!(typeof window===n||!G)){try{N=window.localStorage[G]}catch{}if(typeof N===n)try{var X=window.document.cookie,de=encodeURIComponent(G),fe=X.indexOf(de+"=");fe!==-1&&(N=/^([^;]+)/.exec(X.slice(fe+de.length+1))[1])}catch{}return w.levels[N]===void 0&&(N=void 0),N}}function Pe(){if(!(typeof window===n||!G)){try{window.localStorage.removeItem(G)}catch{}try{window.document.cookie=encodeURIComponent(G)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function oe(N){var X=N;if(typeof X=="string"&&w.levels[X.toUpperCase()]!==void 0&&(X=w.levels[X.toUpperCase()]),typeof X=="number"&&X>=0&&X<=w.levels.SILENT)return X;throw new TypeError("log.setLevel() called with invalid level: "+N)}w.name=A,w.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},w.methodFactory=L||y,w.getLevel=function(){return U??D??S},w.setLevel=function(N,X){return U=oe(N),X!==!1&&ue(U),f.call(w)},w.setDefaultLevel=function(N){D=oe(N),ne()||w.setLevel(N,!1)},w.resetLevel=function(){U=null,Pe(),f.call(w)},w.enableAll=function(N){w.setLevel(w.levels.TRACE,N)},w.disableAll=function(N){w.setLevel(w.levels.SILENT,N)},w.rebuild=function(){if(l!==w&&(S=oe(l.getLevel())),f.call(w),l===w)for(var N in i)i[N].rebuild()},S=oe(l?l.getLevel():"WARN");var Y=ne();Y!=null&&(U=oe(Y)),f.call(w)}l=new k,l.getLogger=function(L){if(typeof L!="symbol"&&typeof L!="string"||L==="")throw new TypeError("You must supply a name when creating a logger.");var w=i[L];return w||(w=i[L]=new k(L,l.methodFactory)),w};var C=typeof window!==n?window.log:void 0;return l.noConflict=function(){return typeof window!==n&&window.log===l&&(window.log=C),l},l.getLoggers=function(){return i},l.default=l,l})}(Ln)),Ln.exports}var hf=pf();const xn=ff(hf),gf={install(t,e){const n=e??{};xn.setDefaultLevel(n.enableLogging?xn.levels.DEBUG:xn.levels.SILENT);const o=240;document.documentElement.style.setProperty("--nav-menu-width",`${o}px`);const r=s.ref(!0),i=s.ref(0),l=s.ref(!1),a=s.ref(!1),c=s.ref(""),d=s.ref(null),{width:f}=df(d);t.provide(Ir,{navMenuWidth:o,isMenuOpened:r,ToggleMenu:()=>{r.value=!r.value},OpenMenu:()=>{r.value=!0},CloseMenu:()=>{r.value=!1},scrollY:i,pageTitle:c,isDarkMode:l,ToggleTheme:()=>zt.Toggle(),EnableDarkMode:()=>zt.EnableDarkMode(),EnableLightMode:()=>zt.EnableLightMode(),ClearStoredTheme:()=>zt.ClearStoredTheme(),LogoutAsync:async()=>{const y=Oi(),{oidc:k}=Lo();await y.ConfirmAsync("Deseja realmente sair da sua conta?")&&(a.value=!0,await new Promise(A=>setTimeout(A,1e3)),k.logout({redirectUri:window.location.origin}))},Login:()=>{const{oidc:y}=Lo();y.login()},isLoggingOut:a,mainRef:d,mainWidth:f,isMainXs:s.computed(()=>f.value<=384),isMainSm:s.computed(()=>f.value>384),isMainMd:s.computed(()=>f.value>768),isMainLg:s.computed(()=>f.value>992),isMainXl:s.computed(()=>f.value>1280),isMain2Xl:s.computed(()=>f.value>1536),isMain3Xl:s.computed(()=>f.value>1920)}),new MutationObserver(()=>{l.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{i.value=document.documentElement.scrollTop}),zt.SetInitialTheme()}},yf=xn;class xo extends Error{constructor(n=[]){const o=Array.isArray(n)?n:[n];super(o[0]);ee(this,"errors",[]);this.errors=o}}class Vi{constructor(e=null){ee(this,"errors",[]);ee(this,"_value",null);ee(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){if(Array.isArray(e)){e.forEach(n=>this.WithError(n));return}this.errors.push(e),this.isSuccessfulHttpStatusCode||(this._httpStatusCode=400)}get isSuccessfulHttpStatusCode(){return this._httpStatusCode>=200&&this._httpStatusCode<300}[Symbol.toPrimitive](e){if(e==="throw")throw new xo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class Hi{get IsVisible(){return mt.isVisible()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{mt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${Io.sanitize(o)}</div>`}).then(()=>i(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}const ji=()=>new Hi,bf=()=>new Hi;window.addEventListener("error",function(t){return Oo(t.error)||console.error(t.error||t.message),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return Oo(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const vf=t=>{t.config.errorHandler=(e,n,o)=>{Oo(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},Oo=t=>{try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof xo||t instanceof Vi?(ji().AlertErrorAsync(t.errors),!0):!1};function wf(){return s.inject(Ir)}const On=()=>wf(),kf={class:"font-percentage"},Fi="--font-size-increment",_f="tamanho-fonte",Sf=et(s.defineComponent({__name:"FontSize",setup(t){const e=s.ref(!1),n=s.ref(0),o=()=>{n.value=Vn(),e.value=!0},r=()=>{e.value=!1},i=()=>document.documentElement,l=()=>parseInt(getComputedStyle(i()).getPropertyValue(Fi)||"1"),a=y=>{y<.5||y>1.6||(i().style.setProperty(Fi,y.toString()),p.value=y)},c=()=>{a(p.value+.1)},d=()=>{a(p.value-.1)},f=()=>{a(1)},p=s.ref(1);return s.onBeforeMount(()=>{localStorage.removeItem(_f)}),s.onMounted(()=>{p.value=l()}),(y,k)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Ue,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),e.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("div",{class:s.normalizeClass(["border","fadein","font-size-wrapper"]),style:s.normalizeStyle({zIndex:n.value+1})},[s.createElementVNode("div",{class:"icon",onClick:d}),s.createElementVNode("span",kf,s.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),s.createElementVNode("div",{class:"icon add",onClick:c}),s.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),s.createElementVNode("div",{class:"font-size-mask",style:s.normalizeStyle({zIndex:n.value}),onClick:r},null,4)],64)):s.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),Cf=s.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=On(),n=s.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(r,i)=>(s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),Ef={class:"nav-menu-header"},Tf={class:"nav-menu-inner-close"},If={class:"main-content"},Af={class:"page-title"},Pf={class:"action"},Lf={id:"content"},xf={key:0,id:"logging-out"},Of={class:"info-fazenda"},$f={class:"font-bold"},Bf={class:"info-endereco text-muted"},Nf=et(s.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:o,pageTitle:r,scrollY:i,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=On(),C=s.ref(null),A=()=>{if(!C.value||!o.value)return!1;C.value.offsetWidth!==n&&d()};return s.onMounted(()=>{gt.useRouter().afterEach(()=>{A()})}),(L,w)=>(s.openBlock(),s.createElementBlock("main",{ref_key:"mainRef",ref:k,class:s.normalizeClass({disabled:s.unref(y),"nav-menu-visible":s.unref(o)})},[s.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:s.normalizeClass({"nav-menu-hidden":!s.unref(o)})},[s.createElementVNode("div",Ef,[w[0]||(w[0]=s.createElementVNode("span",null,"Menu",-1)),s.createElementVNode("div",Tf,[s.createVNode(Ue,{button:!0,icon:"close",onClick:s.unref(l)},null,8,["onClick"])])]),s.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),s.createElementVNode("div",If,[s.createElementVNode("div",{id:"top-bar",class:s.normalizeClass({"shadow-bottom":s.unref(i)>72})},[s.createVNode(Ue,{button:!0,icon:s.unref(o)?"menu_open":"menu",tooltip:"Menu",onClick:s.unref(l)},null,8,["icon","onClick"]),s.createElementVNode("div",Af,s.toDisplayString(s.unref(y)?"Saindo...":s.unref(r)),1),w[1]||(w[1]=s.createElementVNode("span",{class:"sep"},null,-1)),s.createElementVNode("div",Pf,[s.createVNode(Ue,{button:!0,size:"sm",icon:s.unref(a)?"light_mode":"dark_mode",tooltip:s.unref(a)?"Modo claro":"Modo escuro",onClick:s.unref(c)},null,8,["icon","tooltip","onClick"]),s.createVNode(Sf),e.auth?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[e.auth.isAuthenticated?(s.openBlock(),s.createBlock(Ue,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:s.unref(f)},null,8,["onClick"])):(s.openBlock(),s.createBlock(Ue,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:s.unref(p)},null,8,["onClick"]))],64)):s.createCommentVNode("",!0)])],2),s.createElementVNode("div",Lf,[s.unref(y)?(s.openBlock(),s.createElementBlock("div",xf,[s.createVNode(Vo)])):s.renderSlot(L.$slots,"content",{key:1},void 0,!0)])]),s.createElementVNode("footer",null,[w[4]||(w[4]=s.createElementVNode("div",{class:"logo-fazenda"},null,-1)),s.createElementVNode("div",Of,[s.createElementVNode("span",$f,[s.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=s.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),s.createElementVNode("span",Bf,[s.renderSlot(L.$slots,"footer-endereco-fazenda",{},()=>[w[3]||(w[3]=s.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])])]),s.createVNode(Cf)],2))}}),[["__scopeId","data-v-35786704"]]),Mf=s.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=On(),n=t;return s.watchEffect(()=>{document.title=n.title,e.value=n.title}),(o,r)=>null}}),zi={surface:{0:"{surface.0.color}",50:"{surface.100.color}",100:"{surface.100.color}",200:"{surface.200.color}",300:"{surface.300.color}",400:"{surface.400.color}",500:"{surface.1000.color}",600:"{surface.600.color}",700:"{surface.700.color}",800:"{surface.800.color}",900:"{surface.900.color}",950:"{surface.1000.color}"},primary:{color:"{primary.color}",contrastColor:"{bg.color}",hoverColor:"{primary.hover.color}",activeColor:"{primary.color}"},highlight:{background:"{primary.color}",color:"{bg.color}"},formField:{background:"{surface.0.color}",disabledBackground:"{surface.0.color}",filledBackground:"{surface.100.color}",filledFocusBackground:"{surface.100.color}",borderColor:"{surface.1000.color}",hoverBorderColor:"{primary.color}",focusBorderColor:"{primary.color}",invalidBorderColor:"{error.color}",color:"{text.color}",disabledColor:"{disabled.color}",placeholderColor:"{muted.color}",floatLabelColor:"{secondary.color}",floatLabelFocusColor:"{secondary.color}",floatLabelInvalidColor:"{error.color}",iconColor:"{primary.color}"},text:{color:"{text.color}",hoverColor:"{primary.color}",mutedColor:"{muted.color}",hoverMutedColor:"{muted.color}"},mask:{background:"{maskbg.color}",color:"{surface.200.color}"},content:{background:"{bg.color}",color:"{text.color}",border:{color:"{surface.1000.color}",radius:"6px"},hover:{background:"{primary.hover.color}",color:"{primary.color}"}}},Df={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"{primary.color}",100:"{primary.color}",200:"{primary.color}",300:"{primary.color}",400:"{primary.color}",500:"{primary.color}",600:"{primary.color}",700:"{primary.color}",800:"{primary.color}",900:"{primary.color}",950:"{primary.color}"},colorScheme:{light:{...zi},dark:{...zi}}},components:{blockui:{root:{borderRadius:"0px"}},button:{root:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{paddingX:"0.625rem",paddingY:"0.375rem"},lg:{paddingX:"0.875rem",paddingY:"0.575rem"},primary:{hoverBackground:"{primary.color} !important",hoverBorderColor:"{primary.color} !important"}},text:{secondary:{color:"{secondary.color} !important",hoverBackground:"{surface.200.color} !important"}}},card:{root:{borderRadius:"{border-radius}",background:"{bg-color}",shadow:"none"},title:{fontWeight:"700",fontSize:"{text-md}"},body:{padding:"var(--content-gutter)"},css:()=>`.p-card {
411
411
  border: 1px solid var(--border-color);
412
- }`},checkbox:{root:{background:"{surface.100.color} !important",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",checkedBackground:"{primary.color} !important",checkedHoverBackground:"{primary.color} !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"{border.color}",background:"{surface.100.color}",shadow:"none"},colorScheme:{dark:{root:{background:"{surface.300.color}"}}}},datatable:{root:{borderColor:"{border.color} !important"},header:{borderColor:"{border.color} !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"{border.color} !important",hoverColor:"{primary.color} !important",hoverBackground:"{primary.hover.color} !important"},bodyCell:{borderColor:"{border.color} !important"},footer:{borderColor:"{border.color} !important"},row:{stripedBackground:"{surface.100.color} !important"}},datepicker:{today:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}},dialog:{root:{background:"{bg.color} !important",color:"{text.color} !important",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important"},title:{fontSize:"{font.size} !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{content-gutter-sm} !important"},content:{padding:"{content.gutter} !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{content-gutter-sm} !important"}},inputtext:{root:{background:"{surface.100.color}",color:"{text.color}",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important",hoverBorderColor:"{primary.color} !important",placeholderColor:"{text.muted.color}"}},popover:{root:{background:"{bg.color}",color:"{text.color}",borderColor:"{border.color}",borderRadius:"{border.radius}",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"{bg.color}",color:"{primary.color}",hoverBorderColor:"{primary.color}",placeholderColor:"{muted.color}",disabledColor:"{disabled.color}"},option:{focusBackground:"{primary.hover.color}",focusColor:"{primary.color}",selectedFocusColor:"{bg.color}",selectedFocusBackground:"{primary.color}"},overlay:{background:"{bg.color}",borderColor:"{border.color}"},dropdown:{color:"{primary.color}"}},skeleton:{root:{background:"{surface.700.color} !important",animationBackground:"{surface.100.color} !important"}},textarea:{root:{background:"{surface.100.color}",hoverBorderColor:"{primary.color}",placeholderColor:"{text.muted.color}"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"{text.color}",color:"{bg.color}",detailColor:"{bg.color}"}},dark:{contrast:{background:"{bg.color}",color:"{text.color}",detailColor:"{text.color}"}}},info:{background:"{info.color}",color:"{info.hover.color}",detailColor:"{text.color}"},success:{background:"{success.color}",color:"{success.hover.color}",detailColor:"{text.color}"},warn:{background:"{warn.color}",color:"{warn.hover.color}",detailColor:"{text.color}"},error:{background:"{error.color}",color:"{error.hover.color}",detailColor:"{text.color}"},secondary:{background:"{secondary.color}",color:"{secondary.hover.color}",detailColor:"{text.color}"}}}};class at{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const r of e)n+=`, ${r}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(r=>{const i=getComputedStyle(r).zIndex;return+i==+i?+i:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,r=e.toString();return n.replace(/#/g,()=>r[o++]||"")}static MaskCpf(e){return at.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return at.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return at.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Rf{constructor(e){ee(this,"sub");ee(this,"username");ee(this,"name");ee(this,"email");ee(this,"roles");ee(this,"groups");ee(this,"userinfo");ee(this,"department");ee(this,"jobTitle");ee(this,"idp");this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?at.MaskCpf(this.username):this.username.length===14?at.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){var n;const e=((n=this.userinfo)==null?void 0:n.identity_provider)??null;return(e==null?void 0:e.toLocaleLowerCase())==="gov.br"?"govbr":e!=null&&e.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){var e;return((e=this.userinfo)==null?void 0:e.department)??null}SetJobTitle(){var e;return((e=this.userinfo)==null?void 0:e.jobTitle)??null}}function Uf(){const t=s.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=s.computed(()=>t.value==="development"),o=s.computed(()=>t.value==="pack"),r=s.computed(()=>t.value==="hml"),i=s.computed(()=>t.value==="production"),l=s.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:i,user:l,$reset:a}}const Vf=t=>{const e=new Set;function n(o){const{name:r,children:i}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].join(`
412
+ }`},checkbox:{root:{background:"{surface.100.color} !important",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",checkedBackground:"{primary.color} !important",checkedHoverBackground:"{primary.color} !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"{border.color}",background:"{surface.100.color}",shadow:"none"},colorScheme:{dark:{root:{background:"{surface.300.color}"}}}},datatable:{root:{borderColor:"{border.color} !important"},header:{borderColor:"{border.color} !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"{border.color} !important",hoverColor:"{primary.color} !important",hoverBackground:"{primary.hover.color} !important"},bodyCell:{borderColor:"{border.color} !important"},footer:{borderColor:"{border.color} !important"},row:{stripedBackground:"{surface.100.color} !important"}},datepicker:{today:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}},dialog:{root:{background:"{bg.color} !important",color:"{text.color} !important",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important"},title:{fontSize:"{font.size} !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{content-gutter-sm} !important"},content:{padding:"{content.gutter} !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{content-gutter-sm} !important"}},inputtext:{root:{background:"{surface.100.color}",color:"{text.color}",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important",hoverBorderColor:"{primary.color} !important",placeholderColor:"{text.muted.color}"}},popover:{root:{background:"{bg.color}",color:"{text.color}",borderColor:"{border.color}",borderRadius:"{border.radius}",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"{bg.color}",color:"{primary.color}",hoverBorderColor:"{primary.color}",placeholderColor:"{muted.color}",disabledColor:"{disabled.color}"},option:{focusBackground:"{surface.200.color}",focusColor:"{primary.color}",selectedFocusColor:"{bg.color}",selectedFocusBackground:"{primary.color}"},overlay:{background:"{bg.color}",borderColor:"{border.color}"},dropdown:{color:"{primary.color}"}},skeleton:{root:{background:"{surface.700.color} !important",animationBackground:"{surface.100.color} !important"}},textarea:{root:{background:"{surface.100.color}",hoverBorderColor:"{primary.color}",placeholderColor:"{text.muted.color}"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"{text.color}",color:"{bg.color}",detailColor:"{bg.color}"}},dark:{contrast:{background:"{bg.color}",color:"{text.color}",detailColor:"{text.color}"}}},info:{background:"{info.color}",color:"{info.hover.color}",detailColor:"{text.color}"},success:{background:"{success.color}",color:"{success.hover.color}",detailColor:"{text.color}"},warn:{background:"{warn.color}",color:"{warn.hover.color}",detailColor:"{text.color}"},error:{background:"{error.color}",color:"{error.hover.color}",detailColor:"{text.color}"},secondary:{background:"{secondary.color}",color:"{secondary.hover.color}",detailColor:"{text.color}"}}}};class at{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const r of e)n+=`, ${r}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(r=>{const i=getComputedStyle(r).zIndex;return+i==+i?+i:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,r=e.toString();return n.replace(/#/g,()=>r[o++]||"")}static MaskCpf(e){return at.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return at.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return at.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Rf{constructor(e){ee(this,"sub");ee(this,"username");ee(this,"name");ee(this,"email");ee(this,"roles");ee(this,"groups");ee(this,"userinfo");ee(this,"department");ee(this,"jobTitle");ee(this,"idp");this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?at.MaskCpf(this.username):this.username.length===14?at.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){var n;const e=((n=this.userinfo)==null?void 0:n.identity_provider)??null;return(e==null?void 0:e.toLocaleLowerCase())==="gov.br"?"govbr":e!=null&&e.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){var e;return((e=this.userinfo)==null?void 0:e.department)??null}SetJobTitle(){var e;return((e=this.userinfo)==null?void 0:e.jobTitle)??null}}function Uf(){const t=s.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=s.computed(()=>t.value==="development"),o=s.computed(()=>t.value==="pack"),r=s.computed(()=>t.value==="hml"),i=s.computed(()=>t.value==="production"),l=s.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:i,user:l,$reset:a}}const Vf=t=>{const e=new Set;function n(o){const{name:r,children:i}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].join(`
413
413
  `));e.add(r)}if(i&&Array.isArray(i))for(const l of i)n(l)}for(const o of t)n(o)};Promise.prototype.TrackStateWith||(Promise.prototype.TrackStateWith=async function(t){t.value=!0;try{return await this}finally{t.value=!1}});class Hf{constructor(){ee(this,"current",null);ee(this,"resolve",null)}async showAsync(e,n){const o={message:e,life:n??5e3};return this.Render(o)}async Render(e){return new Promise(n=>{this.resolve=n,this.current&&(this.current.style.opacity="0",setTimeout((function(){this.parentElement&&this.parentElement.removeChild(this)}).bind(this.current),500));const o=document.createElement("div"),r=document.createElement("div"),i=document.createElement("div");r.className="content",i.className="progress",r.appendChild(i),o.className="sf-toast",o.style.zIndex=(at.GetMaxZindex()+1).toString(),o.appendChild(r),this.current=o,document.body.appendChild(o),o.addEventListener("transitionend",c=>{c.propertyName==="opacity"&&o.style.opacity==="0"&&(document.body.removeChild(o),this.current&&this.current===o&&(this.current=null))});const l=[];Array.isArray(e.message)?l.push(...e.message):l.push(e.message);for(const c of l){const d=document.createElement("p");d.innerHTML=Io.sanitize(c),r.appendChild(d)}const a=document.createElement("i");if(a.classList.add("icon","material-symbols-outlined"),a.innerText="close",a.addEventListener("click",()=>{this.Close()}),r.appendChild(a),getComputedStyle(o).bottom,getComputedStyle(o).top,o.classList.add("visible"),e.life){i.style.transitionDuration=`${e.life-300}ms`,r.classList.add("animate"),setTimeout(()=>{this.current===o&&this.Close()},e.life);return}})}Close(){this.resolve&&this.resolve(),this.current&&this.current.classList.remove("visible")}}const jf=new Hf,Ff=()=>jf;function zf(){document.documentElement.classList.add("app-mounted")}M.AppError=xo,M.AppResult=Vi,M.BaseAppState=Uf,M.ConfigAuth=tf,M.EnsureUniqueRouteNames=Vf,M.RemovePreloader=zf,M.SfButton=ws,M.SfContent=Tl,M.SfDrawer=jo,M.SfHelpButton=El,M.SfIcon=Ue,M.SfLoadingCircle=Ho,M.SfMain=Nf,M.SfMessage=Cs,M.SfNavMenu=Cl,M.SfPageTitle=Mf,M.SfTabNavigation=bs,M.SfTooltip=Uo,M.UseAlert=ji,M.UseAlertService=bf,M.UseAppInject=On,M.UseAuth=Lo,M.UseConfirm=Oi,M.UseConfirmService=Rd,M.UseSimpleToast=Ff,M.User=Rf,M.Utilities=at,M._logger=yf,M.configSF=gf,M.globalErrorHandler=vf,M.themePreset=Df,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
414
414
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map