@luizleon/sf.prefeiturasp.vuecomponents 5.0.25 → 5.0.26

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.
@@ -407,10 +407,10 @@ If you think this parameter should be updatable, request it here: https://github
407
407
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
408
408
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
409
409
 
410
- For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.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"){s.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},{}):{}},T=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"),T(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 s.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(),T=0;T<localStorage.length;T++){var b=localStorage.key(T);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 T="kc-callback-"+v,b=localStorage.getItem(T);return b&&(localStorage.removeItem(T),b=JSON.parse(b)),h(),b}},u.add=function(v){h();var T="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(T,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(T("kc-callback-"+b,"",h(-100)),P)return JSON.parse(P)}},u.add=function(b){T("kc-callback-"+b.state,JSON.stringify(b),h(60))},u.removeItem=function(b){T(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""},T=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){te(this,"oidc");te(this,"isAuthenticated",!1);te(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 Po=()=>Di;function nf(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const of=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function rf(t){return i.getCurrentInstance()}function sf(t){return Array.isArray(t)?t:[t]}function af(t,e=!0,n){rf()?i.onMounted(t,n):e?t():i.nextTick(t)}const Ri=of?window:void 0;function Ct(t){var e;const n=i.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function lf(){const t=i.ref(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function cf(t){const e=lf();return i.computed(()=>(e.value,!!t()))}function uf(t,e,n={}){const{window:o=Ri,...r}=n;let s;const l=cf(()=>o&&"ResizeObserver"in o),a=()=>{s&&(s.disconnect(),s=void 0)},c=i.computed(()=>{const p=i.toValue(t);return Array.isArray(p)?p.map(y=>Ct(y)):[Ct(p)]}),d=i.watch(c,p=>{if(a(),l.value&&o){s=new ResizeObserver(e);for(const y of p)y&&s.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,s=i.computed(()=>{var p,y;return(y=(p=Ct(t))==null?void 0:p.namespaceURI)==null?void 0:y.includes("svg")}),l=i.ref(e.width),a=i.ref(e.height),{stop:c}=uf(t,([p])=>{const y=r==="border-box"?p.borderBoxSize:r==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(o&&s.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=i.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"],s={},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,M,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??M??S},w.setLevel=function(N,X){return U=oe(N),X!==!1&&ue(U),f.call(w)},w.setDefaultLevel=function(N){M=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 s)s[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=s[L];return w||(w=s[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 s},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=i.ref(!0),s=i.ref(0),l=i.ref(!1),a=i.ref(!1),c=i.ref(""),d=i.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:s,pageTitle:c,isDarkMode:l,ToggleTheme:()=>zt.Toggle(),EnableDarkMode:()=>zt.EnableDarkMode(),EnableLightMode:()=>zt.EnableLightMode(),ClearStoredTheme:()=>zt.ClearStoredTheme(),LogoutAsync:async()=>{const y=Oi(),{oidc:k}=Po();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}=Po();y.login()},isLoggingOut:a,mainRef:d,mainWidth:f,isMainXs:i.computed(()=>f.value<=384),isMainSm:i.computed(()=>f.value>384),isMainMd:i.computed(()=>f.value>768),isMainLg:i.computed(()=>f.value>992),isMainXl:i.computed(()=>f.value>1280),isMain2Xl:i.computed(()=>f.value>1536),isMain3Xl:i.computed(()=>f.value>1920)}),new MutationObserver(()=>{l.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{s.value=document.documentElement.scrollTop}),zt.SetInitialTheme()}},yf=xn;class Lo extends Error{constructor(n=[]){const o=Array.isArray(n)?n:[n];super(o[0]);te(this,"errors",[]);this.errors=o}}class Vi{constructor(e=null){te(this,"errors",[]);te(this,"_value",null);te(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 Lo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class Hi{get IsVisible(){return ft.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(s=>{ft.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${Li.sanitize(o)}</div>`}).then(()=>s(!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 xo(t.error)||console.error(t.error),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return xo(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const vf=t=>{t.config.errorHandler=(e,n,o)=>{xo(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},xo=t=>{try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Lo||t instanceof Vi?(ji().AlertErrorAsync(t.errors),!0):!1};function wf(){return i.inject(Ir)}const On=()=>wf(),kf={class:"font-percentage"},Fi="--font-size-increment",_f="tamanho-fonte",Sf=et(i.defineComponent({__name:"FontSize",setup(t){const e=i.ref(!1),n=i.ref(0),o=()=>{n.value=Vn(),e.value=!0},r=()=>{e.value=!1},s=()=>document.documentElement,l=()=>parseInt(getComputedStyle(s()).getPropertyValue(Fi)||"1"),a=y=>{y<.5||y>1.6||(s().style.setProperty(Fi,y.toString()),p.value=y)},c=()=>{a(p.value+.1)},d=()=>{a(p.value-.1)},f=()=>{a(1)},p=i.ref(1);return i.onBeforeMount(()=>{localStorage.removeItem(_f)}),i.onMounted(()=>{p.value=l()}),(y,k)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(Ue,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),e.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{class:i.normalizeClass(["border","fadein","font-size-wrapper"]),style:i.normalizeStyle({zIndex:n.value+1})},[i.createElementVNode("div",{class:"icon",onClick:d}),i.createElementVNode("span",kf,i.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),i.createElementVNode("div",{class:"icon add",onClick:c}),i.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),i.createElementVNode("div",{class:"font-size-mask",style:i.normalizeStyle({zIndex:n.value}),onClick:r},null,4)],64)):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),Cf=i.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=On(),n=i.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(r,s)=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),Ef={class:"nav-menu-header"},If={class:"nav-menu-inner-close"},Tf={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(i.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:o,pageTitle:r,scrollY:s,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=On(),C=i.ref(null),A=()=>{if(!C.value||!o.value)return!1;C.value.offsetWidth!==n&&d()};return i.onMounted(()=>{gt.useRouter().afterEach(()=>{A()})}),(L,w)=>(i.openBlock(),i.createElementBlock("main",{ref_key:"mainRef",ref:k,class:i.normalizeClass({disabled:i.unref(y),"nav-menu-visible":i.unref(o)})},[i.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:i.normalizeClass({"nav-menu-hidden":!i.unref(o)})},[i.createElementVNode("div",Ef,[w[0]||(w[0]=i.createElementVNode("span",null,"Menu",-1)),i.createElementVNode("div",If,[i.createVNode(Ue,{button:!0,icon:"close",onClick:i.unref(l)},null,8,["onClick"])])]),i.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),i.createElementVNode("div",Tf,[i.createElementVNode("div",{id:"top-bar",class:i.normalizeClass({"shadow-bottom":i.unref(s)>72})},[i.createVNode(Ue,{button:!0,icon:i.unref(o)?"menu_open":"menu",tooltip:"Menu",onClick:i.unref(l)},null,8,["icon","onClick"]),i.createElementVNode("div",Af,i.toDisplayString(i.unref(y)?"Saindo...":i.unref(r)),1),w[1]||(w[1]=i.createElementVNode("span",{class:"sep"},null,-1)),i.createElementVNode("div",Pf,[i.createVNode(Ue,{button:!0,size:"sm",icon:i.unref(a)?"light_mode":"dark_mode",tooltip:i.unref(a)?"Modo claro":"Modo escuro",onClick:i.unref(c)},null,8,["icon","tooltip","onClick"]),i.createVNode(Sf),e.auth?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[e.auth.isAuthenticated?(i.openBlock(),i.createBlock(Ue,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:i.unref(f)},null,8,["onClick"])):(i.openBlock(),i.createBlock(Ue,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:i.unref(p)},null,8,["onClick"]))],64)):i.createCommentVNode("",!0)])],2),i.createElementVNode("div",Lf,[i.unref(y)?(i.openBlock(),i.createElementBlock("div",xf,[i.createVNode(Uo)])):i.renderSlot(L.$slots,"content",{key:1},void 0,!0)])]),i.createElementVNode("footer",null,[w[4]||(w[4]=i.createElementVNode("div",{class:"logo-fazenda"},null,-1)),i.createElementVNode("div",Of,[i.createElementVNode("span",$f,[i.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=i.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),i.createElementVNode("span",Bf,[i.renderSlot(L.$slots,"footer-endereco-fazenda",{},()=>[w[3]||(w[3]=i.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])])]),i.createVNode(Cf)],2))}}),[["__scopeId","data-v-35786704"]]),Mf=i.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=On(),n=t;return i.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:"1rem",paddingY:"0.5rem",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:`0 -1px 5px 0 color-mix(in srgb, currentColor 20%, transparent),
410
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.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"){s.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},{}):{}},T=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"),T(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 s.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(),T=0;T<localStorage.length;T++){var b=localStorage.key(T);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 T="kc-callback-"+v,b=localStorage.getItem(T);return b&&(localStorage.removeItem(T),b=JSON.parse(b)),h(),b}},u.add=function(v){h();var T="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(T,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(T("kc-callback-"+b,"",h(-100)),P)return JSON.parse(P)}},u.add=function(b){T("kc-callback-"+b.state,JSON.stringify(b),h(60))},u.removeItem=function(b){T(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""},T=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){te(this,"oidc");te(this,"isAuthenticated",!1);te(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 Po=()=>Di;function nf(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const of=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function rf(t){return i.getCurrentInstance()}function sf(t){return Array.isArray(t)?t:[t]}function af(t,e=!0,n){rf()?i.onMounted(t,n):e?t():i.nextTick(t)}const Ri=of?window:void 0;function Ct(t){var e;const n=i.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function lf(){const t=i.ref(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function cf(t){const e=lf();return i.computed(()=>(e.value,!!t()))}function uf(t,e,n={}){const{window:o=Ri,...r}=n;let s;const l=cf(()=>o&&"ResizeObserver"in o),a=()=>{s&&(s.disconnect(),s=void 0)},c=i.computed(()=>{const p=i.toValue(t);return Array.isArray(p)?p.map(y=>Ct(y)):[Ct(p)]}),d=i.watch(c,p=>{if(a(),l.value&&o){s=new ResizeObserver(e);for(const y of p)y&&s.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,s=i.computed(()=>{var p,y;return(y=(p=Ct(t))==null?void 0:p.namespaceURI)==null?void 0:y.includes("svg")}),l=i.ref(e.width),a=i.ref(e.height),{stop:c}=uf(t,([p])=>{const y=r==="border-box"?p.borderBoxSize:r==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(o&&s.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=i.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"],s={},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,M,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??M??S},w.setLevel=function(N,X){return U=oe(N),X!==!1&&ue(U),f.call(w)},w.setDefaultLevel=function(N){M=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 s)s[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=s[L];return w||(w=s[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 s},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=i.ref(!0),s=i.ref(0),l=i.ref(!1),a=i.ref(!1),c=i.ref(""),d=i.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:s,pageTitle:c,isDarkMode:l,ToggleTheme:()=>zt.Toggle(),EnableDarkMode:()=>zt.EnableDarkMode(),EnableLightMode:()=>zt.EnableLightMode(),ClearStoredTheme:()=>zt.ClearStoredTheme(),LogoutAsync:async()=>{const y=Oi(),{oidc:k}=Po();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}=Po();y.login()},isLoggingOut:a,mainRef:d,mainWidth:f,isMainXs:i.computed(()=>f.value<=384),isMainSm:i.computed(()=>f.value>384),isMainMd:i.computed(()=>f.value>768),isMainLg:i.computed(()=>f.value>992),isMainXl:i.computed(()=>f.value>1280),isMain2Xl:i.computed(()=>f.value>1536),isMain3Xl:i.computed(()=>f.value>1920)}),new MutationObserver(()=>{l.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{s.value=document.documentElement.scrollTop}),zt.SetInitialTheme()}},yf=xn;class Lo extends Error{constructor(n=[]){const o=Array.isArray(n)?n:[n];super(o[0]);te(this,"errors",[]);this.errors=o}}class Vi{constructor(e=null){te(this,"errors",[]);te(this,"_value",null);te(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 Lo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class Hi{get IsVisible(){return ft.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(s=>{ft.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${Li.sanitize(o)}</div>`}).then(()=>s(!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 xo(t.error)||console.error(t.error),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return xo(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const vf=t=>{t.config.errorHandler=(e,n,o)=>{xo(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},xo=t=>{try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Lo||t instanceof Vi?(ji().AlertErrorAsync(t.errors),!0):!1};function wf(){return i.inject(Ir)}const On=()=>wf(),kf={class:"font-percentage"},Fi="--font-size-increment",_f="tamanho-fonte",Sf=et(i.defineComponent({__name:"FontSize",setup(t){const e=i.ref(!1),n=i.ref(0),o=()=>{n.value=Vn(),e.value=!0},r=()=>{e.value=!1},s=()=>document.documentElement,l=()=>parseInt(getComputedStyle(s()).getPropertyValue(Fi)||"1"),a=y=>{y<.5||y>1.6||(s().style.setProperty(Fi,y.toString()),p.value=y)},c=()=>{a(p.value+.1)},d=()=>{a(p.value-.1)},f=()=>{a(1)},p=i.ref(1);return i.onBeforeMount(()=>{localStorage.removeItem(_f)}),i.onMounted(()=>{p.value=l()}),(y,k)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(Ue,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),e.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",{class:i.normalizeClass(["border","fadein","font-size-wrapper"]),style:i.normalizeStyle({zIndex:n.value+1})},[i.createElementVNode("div",{class:"icon",onClick:d}),i.createElementVNode("span",kf,i.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),i.createElementVNode("div",{class:"icon add",onClick:c}),i.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),i.createElementVNode("div",{class:"font-size-mask",style:i.normalizeStyle({zIndex:n.value}),onClick:r},null,4)],64)):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),Cf=i.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=On(),n=i.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(r,s)=>(i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),Ef={class:"nav-menu-header"},If={class:"nav-menu-inner-close"},Tf={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(i.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:o,pageTitle:r,scrollY:s,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=On(),C=i.ref(null),A=()=>{if(!C.value||!o.value)return!1;C.value.offsetWidth!==n&&d()};return i.onMounted(()=>{gt.useRouter().afterEach(()=>{A()})}),(L,w)=>(i.openBlock(),i.createElementBlock("main",{ref_key:"mainRef",ref:k,class:i.normalizeClass({disabled:i.unref(y),"nav-menu-visible":i.unref(o)})},[i.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:i.normalizeClass({"nav-menu-hidden":!i.unref(o)})},[i.createElementVNode("div",Ef,[w[0]||(w[0]=i.createElementVNode("span",null,"Menu",-1)),i.createElementVNode("div",If,[i.createVNode(Ue,{button:!0,icon:"close",onClick:i.unref(l)},null,8,["onClick"])])]),i.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),i.createElementVNode("div",Tf,[i.createElementVNode("div",{id:"top-bar",class:i.normalizeClass({"shadow-bottom":i.unref(s)>72})},[i.createVNode(Ue,{button:!0,icon:i.unref(o)?"menu_open":"menu",tooltip:"Menu",onClick:i.unref(l)},null,8,["icon","onClick"]),i.createElementVNode("div",Af,i.toDisplayString(i.unref(y)?"Saindo...":i.unref(r)),1),w[1]||(w[1]=i.createElementVNode("span",{class:"sep"},null,-1)),i.createElementVNode("div",Pf,[i.createVNode(Ue,{button:!0,size:"sm",icon:i.unref(a)?"light_mode":"dark_mode",tooltip:i.unref(a)?"Modo claro":"Modo escuro",onClick:i.unref(c)},null,8,["icon","tooltip","onClick"]),i.createVNode(Sf),e.auth?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[e.auth.isAuthenticated?(i.openBlock(),i.createBlock(Ue,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:i.unref(f)},null,8,["onClick"])):(i.openBlock(),i.createBlock(Ue,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:i.unref(p)},null,8,["onClick"]))],64)):i.createCommentVNode("",!0)])],2),i.createElementVNode("div",Lf,[i.unref(y)?(i.openBlock(),i.createElementBlock("div",xf,[i.createVNode(Uo)])):i.renderSlot(L.$slots,"content",{key:1},void 0,!0)])]),i.createElementVNode("footer",null,[w[4]||(w[4]=i.createElementVNode("div",{class:"logo-fazenda"},null,-1)),i.createElementVNode("div",Of,[i.createElementVNode("span",$f,[i.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=i.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),i.createElementVNode("span",Bf,[i.renderSlot(L.$slots,"footer-endereco-fazenda",{},()=>[w[3]||(w[3]=i.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])])]),i.createVNode(Cf)],2))}}),[["__scopeId","data-v-35786704"]]),Mf=i.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=On(),n=t;return i.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:`0 -1px 5px 0 color-mix(in srgb, currentColor 20%, transparent),
411
411
  0 1px 1px 0 color-mix(in srgb, currentColor 14%, transparent),
412
412
  0 1px 3px 0 color-mix(in srgb, currentColor 12%, transparent)`},colorScheme:{dark:{root:{shadow:`0 -1px 5px 0 color-mix(in srgb, currentColor 20%, transparent),
413
413
  0 1px 10px 0 color-mix(in srgb, currentColor 14%, transparent),
414
- 0 1px 3px 0 color-mix(in srgb, currentColor 12%, transparent)`}}},title:{fontWeight:"700",fontSize:"{text-md}"},body:{padding:"var(--content-gutter)"}},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"}}},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:"{bg.color}",color:"{text.color}",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important",hoverBorderColor:"{primary.color} !important",placeholderColor:"{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"}}}};class pt{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 s=getComputedStyle(r).zIndex;return+s==+s?+s: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 pt.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return pt.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return pt.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Rf{constructor(e){te(this,"sub");te(this,"username");te(this,"name");te(this,"email");te(this,"roles");te(this,"groups");te(this,"userinfo");te(this,"department");te(this,"jobTitle");te(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?pt.MaskCpf(this.username):this.username.length===14?pt.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=i.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=i.computed(()=>t.value==="development"),o=i.computed(()=>t.value==="pack"),r=i.computed(()=>t.value==="hml"),s=i.computed(()=>t.value==="production"),l=i.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:s,user:l,$reset:a}}const Vf=t=>{const e=new Set;function n(o){const{name:r,children:s}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].join(`
414
+ 0 1px 3px 0 color-mix(in srgb, currentColor 12%, transparent)`}}},title:{fontWeight:"700",fontSize:"{text-md}"},body:{padding:"var(--content-gutter)"}},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:"{bg.color}",color:"{text.color}",borderColor:"{border.color} !important",borderRadius:"{border.radius} !important",shadow:"none !important",hoverBorderColor:"{primary.color} !important",placeholderColor:"{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"}}}};class pt{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 s=getComputedStyle(r).zIndex;return+s==+s?+s: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 pt.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return pt.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return pt.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Rf{constructor(e){te(this,"sub");te(this,"username");te(this,"name");te(this,"email");te(this,"roles");te(this,"groups");te(this,"userinfo");te(this,"department");te(this,"jobTitle");te(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?pt.MaskCpf(this.username):this.username.length===14?pt.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=i.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=i.computed(()=>t.value==="development"),o=i.computed(()=>t.value==="pack"),r=i.computed(()=>t.value==="hml"),s=i.computed(()=>t.value==="production"),l=i.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:s,user:l,$reset:a}}const Vf=t=>{const e=new Set;function n(o){const{name:r,children:s}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].join(`
415
415
  `));e.add(r)}if(s&&Array.isArray(s))for(const l of s)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}});function Hf(){document.documentElement.classList.add("app-mounted")}D.AppError=Lo,D.AppResult=Vi,D.BaseAppState=Uf,D.ConfigAuth=tf,D.EnsureUniqueRouteNames=Vf,D.RemovePreloader=Hf,D.SfButton=ws,D.SfContent=Il,D.SfDrawer=Ho,D.SfHelpButton=El,D.SfIcon=Ue,D.SfLoadingCircle=Vo,D.SfMain=Nf,D.SfMessage=Cs,D.SfNavMenu=Cl,D.SfPageTitle=Mf,D.SfTabNavigation=bs,D.SfTooltip=Ro,D.UseAlert=ji,D.UseAlertService=bf,D.UseAppInject=On,D.UseAuth=Po,D.UseConfirm=Oi,D.UseConfirmService=Rd,D.User=Rf,D.Utilities=pt,D._logger=yf,D.configSF=gf,D.globalErrorHandler=vf,D.themePreset=Df,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
416
416
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map