from _typeshed import Incomplete
from arelle import FunctionIxt as FunctionIxt, Locale as Locale, ModelValue as ModelValue, UrlUtil as UrlUtil, XbrlConst as XbrlConst, XbrlUtil as XbrlUtil, XmlUtil as XmlUtil
from arelle.HashUtil import Md5Sum as Md5Sum, md5hash as md5hash
from arelle.ModelDtsObject import ModelResource as ModelResource
from arelle.ModelFormulaObject import Aspect as Aspect
from arelle.ModelObject import ModelObject as ModelObject
from arelle.ModelObjectFactory import elementSubstitutionModelClass as elementSubstitutionModelClass
from arelle.PrototypeInstanceObject import DimValuePrototype as DimValuePrototype
from arelle.ValidateXbrlCalcs import inferredDecimals as inferredDecimals, inferredPrecision as inferredPrecision, rangeValue as rangeValue, roundValue as roundValue
from arelle.XmlValidate import INVALID as INVALID, UNVALIDATED as UNVALIDATED, VALID as VALID
from collections.abc import Generator
from lxml import etree as etree
from typing import Any

Aspect: Incomplete
Type: Incomplete
utrEntries: Incomplete
utrSymbol: Incomplete
POSINF: Incomplete
NEGINF: Incomplete
DECIMALONE: Incomplete

class NewFactItemOptions:
    entityIdentScheme: str
    entityIdentValue: str
    startDate: str
    endDate: str
    monetaryUnit: str
    monetaryDecimals: str
    nonMonetaryDecimals: str
    def __init__(self, savedOptions: Incomplete | None = ..., xbrlInstance: Incomplete | None = ...) -> None: ...
    @property
    def startDateDate(self): ...
    @property
    def endDateDate(self): ...

class ModelFact(ModelObject):
    modelTupleFacts: Incomplete
    def init(self, modelDocument) -> None: ...
    @property
    def concept(self): ...
    @property
    def contextID(self): ...
    @property
    def context(self): ...
    @property
    def unit(self): ...
    @property
    def unitID(self): ...
    @unitID.setter
    def unitID(self, value) -> None: ...
    @property
    def utrEntries(self): ...
    def unitSymbol(self): ...
    @property
    def conceptContextUnitHash(self): ...
    @property
    def isItem(self): ...
    @property
    def isTuple(self): ...
    @property
    def isNumeric(self): ...
    @property
    def isInteger(self): ...
    @property
    def isMultiLanguage(self): ...
    @property
    def isFraction(self): ...
    @property
    def parentElement(self): ...
    @property
    def ancestorQnames(self): ...
    @property
    def decimals(self): ...
    @decimals.setter
    def decimals(self, value) -> None: ...
    @property
    def precision(self): ...
    @property
    def xmlLang(self): ...
    @property
    def xsiNil(self): ...
    @property
    def isNil(self): ...
    @isNil.setter
    def isNil(self, value) -> None: ...
    @property
    def value(self): ...
    @property
    def fractionValue(self): ...
    @property
    def effectiveValue(self): ...
    @property
    def vEqValue(self): ...
    def isVEqualTo(self, other, deemP0Equal: bool = ..., deemP0inf: bool = ..., normalizeSpace: bool = ..., numericIntervalConsistency: bool = ...): ...
    def isDuplicateOf(self, other, topLevel: bool = ..., deemP0Equal: bool = ..., unmatchedFactsStack: Incomplete | None = ...): ...
    @property
    def md5sum(self): ...
    @property
    def propertyView(self): ...
    @property
    def viewConcept(self): ...

class ModelInlineValueObject:
    xValue: Any
    def init(self, modelDocument) -> None: ...
    @property
    def sign(self): ...
    @property
    def format(self): ...
    @property
    def scale(self): ...
    @property
    def scaleInt(self): ...
    xValid: Incomplete
    def setInvalid(self) -> None: ...
    @property
    def value(self): ...
    @property
    def textValue(self): ...
    @property
    def stringValue(self): ...

class ModelInlineFact(ModelInlineValueObject, ModelFact):
    def init(self, modelDocument) -> None: ...
    @property
    def qname(self): ...
    @property
    def tupleID(self): ...
    @property
    def tupleRef(self): ...
    @property
    def order(self): ...
    @property
    def parentElement(self): ...
    def ixIter(self, childOnly: bool = ...) -> Generator[Incomplete, None, None]: ...
    @property
    def fractionValue(self): ...
    @property
    def footnoteRefs(self): ...
    def __iter__(self): ...
    @property
    def propertyView(self): ...

class ModelInlineFraction(ModelInlineFact):
    def init(self, modelDocument) -> None: ...
    @property
    def textValue(self): ...

class ModelInlineFractionTerm(ModelInlineValueObject, ModelObject):
    isNil: bool
    modelTupleFacts: Incomplete
    def init(self, modelDocument) -> None: ...
    @property
    def qname(self): ...
    @property
    def concept(self): ...
    @property
    def isInteger(self): ...
    def __iter__(self): ...

class ModelContext(ModelObject):
    segDimValues: Incomplete
    scenDimValues: Incomplete
    qnameDims: Incomplete
    errorDimValues: Incomplete
    segNonDimValues: Incomplete
    scenNonDimValues: Incomplete
    def init(self, modelDocument) -> None: ...
    def clearCachedProperties(self) -> None: ...
    @property
    def isStartEndPeriod(self): ...
    @property
    def isInstantPeriod(self): ...
    @property
    def isForeverPeriod(self): ...
    @property
    def startDatetime(self): ...
    @startDatetime.setter
    def startDatetime(self, value) -> None: ...
    @property
    def endDatetime(self): ...
    @endDatetime.setter
    def endDatetime(self, value) -> None: ...
    @property
    def instantDatetime(self): ...
    @instantDatetime.setter
    def instantDatetime(self, value) -> None: ...
    @property
    def period(self): ...
    @property
    def periodHash(self): ...
    @property
    def entity(self): ...
    @property
    def entityIdentifierElement(self): ...
    @property
    def entityIdentifier(self): ...
    @property
    def entityIdentifierHash(self): ...
    @property
    def hasSegment(self): ...
    @property
    def segment(self): ...
    @property
    def hasScenario(self): ...
    @property
    def scenario(self): ...
    def dimValues(self, contextElement): ...
    def hasDimension(self, dimQname): ...
    def dimValue(self, dimQname): ...
    def dimMemberQname(self, dimQname, includeDefaults: bool = ...): ...
    def dimAspects(self, defaultDimensionAspects: Incomplete | None = ...): ...
    @property
    def dimsHash(self): ...
    def nonDimValues(self, contextElement): ...
    @property
    def segmentHash(self): ...
    @property
    def scenarioHash(self): ...
    @property
    def nonDimSegmentHash(self): ...
    @property
    def nonDimScenarioHash(self): ...
    @property
    def nonDimHash(self): ...
    @property
    def contextDimAwareHash(self): ...
    @property
    def contextNonDimAwareHash(self): ...
    @property
    def md5sum(self): ...
    def isPeriodEqualTo(self, cntx2): ...
    def isEntityIdentifierEqualTo(self, cntx2): ...
    def isEqualTo(self, cntx2, dimensionalAspectModel: Incomplete | None = ...): ...
    def isEqualTo_(self, cntx2, dimensionalAspectModel): ...
    @property
    def propertyView(self): ...

class ModelDimensionValue(ModelObject):
    def init(self, modelDocument) -> None: ...
    def __hash__(self): ...
    @property
    def md5sum(self): ...
    @property
    def dimensionQname(self): ...
    @property
    def dimension(self): ...
    @property
    def isExplicit(self): ...
    @property
    def typedMember(self): ...
    @property
    def isTyped(self): ...
    @property
    def memberQname(self): ...
    @property
    def member(self): ...
    def isEqualTo(self, other, equalMode=...): ...
    @property
    def contextElement(self): ...
    @property
    def propertyView(self): ...

def measuresOf(parent): ...
def measuresStr(m): ...

class ModelUnit(ModelObject):
    def init(self, modelDocument) -> None: ...
    @property
    def measures(self): ...
    @property
    def hash(self): ...
    @property
    def md5hash(self): ...
    @property
    def md5sum(self): ...
    @property
    def isDivide(self): ...
    @property
    def isSingleMeasure(self): ...
    def isEqualTo(self, unit2): ...
    @property
    def value(self): ...
    def utrEntries(self, modelType): ...
    def utrSymbol(self, modelType): ...
    @property
    def propertyView(self): ...

class ModelInlineFootnote(ModelResource):
    def init(self, modelDocument) -> None: ...
    @property
    def qname(self): ...
    @property
    def footnoteID(self): ...
    @property
    def value(self): ...
    @property
    def textValue(self): ...
    @property
    def stringValue(self): ...
    @property
    def htmlValue(self): ...
    @property
    def role(self): ...
    @property
    def xlinkLabel(self): ...
    @property
    def xmlLang(self): ...
    @property
    def attributes(self): ...
    def viewText(self, labelrole: Incomplete | None = ..., lang: Incomplete | None = ...): ...
    @property
    def propertyView(self): ...

class ModelInlineXbrliXbrl(ModelObject):
    def init(self, modelDocument) -> None: ...
    @property
    def qname(self): ...
    @property
    def parentElement(self) -> None: ...
    def ixIter(self, childOnly: bool = ...) -> Generator[Incomplete, None, Incomplete]: ...
